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

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: Restore earlier approach + UpdateDistribution() 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 void HTMLElement::ParseAttribute(const AttributeModificationParams& params) { 460 void HTMLElement::ParseAttribute(const AttributeModificationParams& params) {
460 if (params.name == tabindexAttr || params.name == XMLNames::langAttr) 461 if (params.name == tabindexAttr || params.name == XMLNames::langAttr)
461 return Element::ParseAttribute(params); 462 return Element::ParseAttribute(params);
462 463
463 if (params.name == dirAttr) { 464 if (params.name == dirAttr) {
464 DirAttributeChanged(params.new_value); 465 DirAttributeChanged(params.new_value);
465 } else if (params.name == langAttr) { 466 } else if (params.name == langAttr) {
466 PseudoStateChanged(CSSSelector::kPseudoLang); 467 PseudoStateChanged(CSSSelector::kPseudoLang);
467 } else if (params.name == inertAttr) { 468 } else if (params.name == inertAttr) {
468 UseCounter::Count(GetDocument(), WebFeature::kInertAttribute); 469 UseCounter::Count(GetDocument(), WebFeature::kInertAttribute);
470 UpdateDistribution();
471 GetDocument().GetFrame()->SetIsInert(GetDocument().LocalOwner() &&
472 GetDocument().LocalOwner()->IsInert());
469 } else if (params.name == nonceAttr) { 473 } else if (params.name == nonceAttr) {
470 if (params.new_value != g_empty_atom) 474 if (params.new_value != g_empty_atom)
471 setNonce(params.new_value); 475 setNonce(params.new_value);
472 } else { 476 } else {
473 const AtomicString& event_name = EventNameForAttributeName(params.name); 477 const AtomicString& event_name = EventNameForAttributeName(params.name);
474 if (!event_name.IsNull()) { 478 if (!event_name.IsNull()) {
475 SetAttributeEventListener( 479 SetAttributeEventListener(
476 event_name, 480 event_name,
477 CreateAttributeEventListener(this, params.name, params.new_value, 481 CreateAttributeEventListener(this, params.name, params.new_value,
478 EventParameterName())); 482 EventParameterName()));
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 1185
1182 #ifndef NDEBUG 1186 #ifndef NDEBUG
1183 1187
1184 // For use in the debugger 1188 // For use in the debugger
1185 void dumpInnerHTML(blink::HTMLElement*); 1189 void dumpInnerHTML(blink::HTMLElement*);
1186 1190
1187 void dumpInnerHTML(blink::HTMLElement* element) { 1191 void dumpInnerHTML(blink::HTMLElement* element) {
1188 printf("%s\n", element->innerHTML().Ascii().data()); 1192 printf("%s\n", element->innerHTML().Ascii().data());
1189 } 1193 }
1190 #endif 1194 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698