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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2322213002: Refactor ElementShadow by separating v0 related features as ElementShadowV0 (Closed)
Patch Set: addressed Created 4 years, 3 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "core/dom/PseudoElement.h" 70 #include "core/dom/PseudoElement.h"
71 #include "core/dom/ScriptableDocumentParser.h" 71 #include "core/dom/ScriptableDocumentParser.h"
72 #include "core/dom/SelectorQuery.h" 72 #include "core/dom/SelectorQuery.h"
73 #include "core/dom/StyleChangeReason.h" 73 #include "core/dom/StyleChangeReason.h"
74 #include "core/dom/StyleEngine.h" 74 #include "core/dom/StyleEngine.h"
75 #include "core/dom/Text.h" 75 #include "core/dom/Text.h"
76 #include "core/dom/custom/CustomElement.h" 76 #include "core/dom/custom/CustomElement.h"
77 #include "core/dom/custom/CustomElementRegistry.h" 77 #include "core/dom/custom/CustomElementRegistry.h"
78 #include "core/dom/custom/V0CustomElement.h" 78 #include "core/dom/custom/V0CustomElement.h"
79 #include "core/dom/custom/V0CustomElementRegistrationContext.h" 79 #include "core/dom/custom/V0CustomElementRegistrationContext.h"
80 #include "core/dom/shadow/ElementShadow.h"
81 #include "core/dom/shadow/ElementShadowV0.h"
80 #include "core/dom/shadow/InsertionPoint.h" 82 #include "core/dom/shadow/InsertionPoint.h"
81 #include "core/dom/shadow/ShadowRoot.h" 83 #include "core/dom/shadow/ShadowRoot.h"
82 #include "core/dom/shadow/ShadowRootInit.h" 84 #include "core/dom/shadow/ShadowRootInit.h"
83 #include "core/dom/shadow/SlotAssignment.h" 85 #include "core/dom/shadow/SlotAssignment.h"
84 #include "core/editing/EditingUtilities.h" 86 #include "core/editing/EditingUtilities.h"
85 #include "core/editing/FrameSelection.h" 87 #include "core/editing/FrameSelection.h"
86 #include "core/editing/iterators/TextIterator.h" 88 #include "core/editing/iterators/TextIterator.h"
87 #include "core/editing/serializers/Serialization.h" 89 #include "core/editing/serializers/Serialization.h"
88 #include "core/events/EventDispatcher.h" 90 #include "core/events/EventDispatcher.h"
89 #include "core/events/FocusEvent.h" 91 #include "core/events/FocusEvent.h"
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 1290
1289 if (hasRareData()) 1291 if (hasRareData())
1290 elementRareData()->clearClassListValueForQuirksMode(); 1292 elementRareData()->clearClassListValueForQuirksMode();
1291 } 1293 }
1292 1294
1293 bool Element::shouldInvalidateDistributionWhenAttributeChanged(ElementShadow* el ementShadow, const QualifiedName& name, const AtomicString& newValue) 1295 bool Element::shouldInvalidateDistributionWhenAttributeChanged(ElementShadow* el ementShadow, const QualifiedName& name, const AtomicString& newValue)
1294 { 1296 {
1295 DCHECK(elementShadow); 1297 DCHECK(elementShadow);
1296 if (elementShadow->isV1()) 1298 if (elementShadow->isV1())
1297 return false; 1299 return false;
1298 const SelectRuleFeatureSet& featureSet = elementShadow->ensureSelectFeatureS et(); 1300 const SelectRuleFeatureSet& featureSet = elementShadow->v0().ensureSelectFea tureSet();
1299 1301
1300 if (name == HTMLNames::idAttr) { 1302 if (name == HTMLNames::idAttr) {
1301 AtomicString oldId = elementData()->idForStyleResolution(); 1303 AtomicString oldId = elementData()->idForStyleResolution();
1302 AtomicString newId = makeIdForStyleResolution(newValue, document().inQui rksMode()); 1304 AtomicString newId = makeIdForStyleResolution(newValue, document().inQui rksMode());
1303 if (newId != oldId) { 1305 if (newId != oldId) {
1304 if (!oldId.isEmpty() && featureSet.hasSelectorForId(oldId)) 1306 if (!oldId.isEmpty() && featureSet.hasSelectorForId(oldId))
1305 return true; 1307 return true;
1306 if (!newId.isEmpty() && featureSet.hasSelectorForId(newId)) 1308 if (!newId.isEmpty() && featureSet.hasSelectorForId(newId))
1307 return true; 1309 return true;
1308 } 1310 }
(...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after
3824 3826
3825 DEFINE_TRACE_WRAPPERS(Element) 3827 DEFINE_TRACE_WRAPPERS(Element)
3826 { 3828 {
3827 if (hasRareData()) { 3829 if (hasRareData()) {
3828 visitor->traceWrappers(elementRareData()); 3830 visitor->traceWrappers(elementRareData());
3829 } 3831 }
3830 ContainerNode::traceWrappers(visitor); 3832 ContainerNode::traceWrappers(visitor);
3831 } 3833 }
3832 3834
3833 } // namespace blink 3835 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/BUILD.gn ('k') | third_party/WebKit/Source/core/dom/shadow/ElementShadow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698