Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: Source/core/html/HTMLFormControlElement.cpp

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 15 matching lines...) Expand all
26 #include "core/html/HTMLFormControlElement.h" 26 #include "core/html/HTMLFormControlElement.h"
27 27
28 #include "core/events/Event.h" 28 #include "core/events/Event.h"
29 #include "core/html/HTMLDataListElement.h" 29 #include "core/html/HTMLDataListElement.h"
30 #include "core/html/HTMLFieldSetElement.h" 30 #include "core/html/HTMLFieldSetElement.h"
31 #include "core/html/HTMLFormElement.h" 31 #include "core/html/HTMLFormElement.h"
32 #include "core/html/HTMLInputElement.h" 32 #include "core/html/HTMLInputElement.h"
33 #include "core/html/HTMLLegendElement.h" 33 #include "core/html/HTMLLegendElement.h"
34 #include "core/html/ValidityState.h" 34 #include "core/html/ValidityState.h"
35 #include "core/frame/UseCounter.h" 35 #include "core/frame/UseCounter.h"
36 #include "core/inspector/ConsoleMessage.h"
36 #include "core/page/Page.h" 37 #include "core/page/Page.h"
37 #include "core/page/ValidationMessageClient.h" 38 #include "core/page/ValidationMessageClient.h"
38 #include "core/rendering/RenderBox.h" 39 #include "core/rendering/RenderBox.h"
39 #include "core/rendering/RenderTheme.h" 40 #include "core/rendering/RenderTheme.h"
40 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
41 42
42 namespace blink { 43 namespace blink {
43 44
44 using namespace HTMLNames; 45 using namespace HTMLNames;
45 46
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 m_isAutofilled = autofilled; 205 m_isAutofilled = autofilled;
205 setNeedsStyleRecalc(SubtreeStyleChange); 206 setNeedsStyleRecalc(SubtreeStyleChange);
206 } 207 }
207 208
208 static bool shouldAutofocusOnAttach(const HTMLFormControlElement* element) 209 static bool shouldAutofocusOnAttach(const HTMLFormControlElement* element)
209 { 210 {
210 if (!element->isAutofocusable()) 211 if (!element->isAutofocusable())
211 return false; 212 return false;
212 if (element->document().isSandboxed(SandboxAutomaticFeatures)) { 213 if (element->document().isSandboxed(SandboxAutomaticFeatures)) {
213 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. 214 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
214 element->document().addConsoleMessage(SecurityMessageSource, ErrorMessag eLevel, "Blocked autofocusing on a form control because the form's frame is sand boxed and the 'allow-scripts' permission is not set."); 215 element->document().addConsoleMessage(ConsoleMessage::create(SecurityMes sageSource, ErrorMessageLevel, "Blocked autofocusing on a form control because t he form's frame is sandboxed and the 'allow-scripts' permission is not set."));
215 return false; 216 return false;
216 } 217 }
217 218
218 return true; 219 return true;
219 } 220 }
220 221
221 void HTMLFormControlElement::attach(const AttachContext& context) 222 void HTMLFormControlElement::attach(const AttachContext& context)
222 { 223 {
223 HTMLElement::attach(context); 224 HTMLElement::attach(context);
224 225
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 533
533 void HTMLFormControlElement::setFocus(bool flag) 534 void HTMLFormControlElement::setFocus(bool flag)
534 { 535 {
535 LabelableElement::setFocus(flag); 536 LabelableElement::setFocus(flag);
536 537
537 if (!flag && wasChangedSinceLastFormControlChangeEvent()) 538 if (!flag && wasChangedSinceLastFormControlChangeEvent())
538 dispatchFormControlChangeEvent(); 539 dispatchFormControlChangeEvent();
539 } 540 }
540 541
541 } // namespace Webcore 542 } // namespace Webcore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698