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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: nit addressed Created 3 years, 6 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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/editing/serializers/Serialization.h" 49 #include "core/editing/serializers/Serialization.h"
50 #include "core/editing/spellcheck/SpellChecker.h" 50 #include "core/editing/spellcheck/SpellChecker.h"
51 #include "core/events/EventListener.h" 51 #include "core/events/EventListener.h"
52 #include "core/events/KeyboardEvent.h" 52 #include "core/events/KeyboardEvent.h"
53 #include "core/frame/Settings.h" 53 #include "core/frame/Settings.h"
54 #include "core/frame/UseCounter.h" 54 #include "core/frame/UseCounter.h"
55 #include "core/frame/csp/ContentSecurityPolicy.h" 55 #include "core/frame/csp/ContentSecurityPolicy.h"
56 #include "core/html/HTMLBRElement.h" 56 #include "core/html/HTMLBRElement.h"
57 #include "core/html/HTMLDimension.h" 57 #include "core/html/HTMLDimension.h"
58 #include "core/html/HTMLFormElement.h" 58 #include "core/html/HTMLFormElement.h"
59 #include "core/html/HTMLFrameOwnerElement.h"
59 #include "core/html/HTMLInputElement.h" 60 #include "core/html/HTMLInputElement.h"
60 #include "core/html/HTMLTemplateElement.h" 61 #include "core/html/HTMLTemplateElement.h"
61 #include "core/html/parser/HTMLParserIdioms.h" 62 #include "core/html/parser/HTMLParserIdioms.h"
62 #include "core/layout/LayoutBoxModelObject.h" 63 #include "core/layout/LayoutBoxModelObject.h"
63 #include "core/layout/LayoutObject.h" 64 #include "core/layout/LayoutObject.h"
64 #include "core/page/SpatialNavigation.h" 65 #include "core/page/SpatialNavigation.h"
65 #include "core/svg/SVGSVGElement.h" 66 #include "core/svg/SVGSVGElement.h"
66 #include "platform/Language.h" 67 #include "platform/Language.h"
67 #include "platform/text/BidiResolver.h" 68 #include "platform/text/BidiResolver.h"
68 #include "platform/text/BidiTextRun.h" 69 #include "platform/text/BidiTextRun.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 void HTMLElement::ParseAttribute(const AttributeModificationParams& params) { 459 void HTMLElement::ParseAttribute(const AttributeModificationParams& params) {
459 if (params.name == tabindexAttr || params.name == XMLNames::langAttr) 460 if (params.name == tabindexAttr || params.name == XMLNames::langAttr)
460 return Element::ParseAttribute(params); 461 return Element::ParseAttribute(params);
461 462
462 if (params.name == dirAttr) { 463 if (params.name == dirAttr) {
463 DirAttributeChanged(params.new_value); 464 DirAttributeChanged(params.new_value);
464 } else if (params.name == langAttr) { 465 } else if (params.name == langAttr) {
465 PseudoStateChanged(CSSSelector::kPseudoLang); 466 PseudoStateChanged(CSSSelector::kPseudoLang);
466 } else if (params.name == inertAttr) { 467 } else if (params.name == inertAttr) {
467 UseCounter::Count(GetDocument(), WebFeature::kInertAttribute); 468 UseCounter::Count(GetDocument(), WebFeature::kInertAttribute);
469 UpdateDistribution();
470 GetDocument().GetFrame()->SetIsInert(GetDocument().LocalOwner() &&
471 GetDocument().LocalOwner()->IsInert());
468 } else if (params.name == nonceAttr) { 472 } else if (params.name == nonceAttr) {
469 if (params.new_value != g_empty_atom) 473 if (params.new_value != g_empty_atom)
470 setNonce(params.new_value); 474 setNonce(params.new_value);
471 } else { 475 } else {
472 const AtomicString& event_name = EventNameForAttributeName(params.name); 476 const AtomicString& event_name = EventNameForAttributeName(params.name);
473 if (!event_name.IsNull()) { 477 if (!event_name.IsNull()) {
474 SetAttributeEventListener( 478 SetAttributeEventListener(
475 event_name, 479 event_name,
476 CreateAttributeEventListener(this, params.name, params.new_value, 480 CreateAttributeEventListener(this, params.name, params.new_value,
477 EventParameterName())); 481 EventParameterName()));
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1184
1181 #ifndef NDEBUG 1185 #ifndef NDEBUG
1182 1186
1183 // For use in the debugger 1187 // For use in the debugger
1184 void dumpInnerHTML(blink::HTMLElement*); 1188 void dumpInnerHTML(blink::HTMLElement*);
1185 1189
1186 void dumpInnerHTML(blink::HTMLElement* element) { 1190 void dumpInnerHTML(blink::HTMLElement* element) {
1187 printf("%s\n", element->innerHTML().Ascii().data()); 1191 printf("%s\n", element->innerHTML().Ascii().data());
1188 } 1192 }
1189 #endif 1193 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLDialogElement.cpp ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698