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

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

Issue 1548523002: Use Document, rather than document element, for implicit root. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: rebaseline Created 4 years, 11 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/css/resolver/StyleResolver.h" 47 #include "core/css/resolver/StyleResolver.h"
48 #include "core/css/resolver/StyleResolverParentScope.h" 48 #include "core/css/resolver/StyleResolverParentScope.h"
49 #include "core/css/resolver/StyleResolverStats.h" 49 #include "core/css/resolver/StyleResolverStats.h"
50 #include "core/dom/AXObjectCache.h" 50 #include "core/dom/AXObjectCache.h"
51 #include "core/dom/Attr.h" 51 #include "core/dom/Attr.h"
52 #include "core/dom/CSSSelectorWatch.h" 52 #include "core/dom/CSSSelectorWatch.h"
53 #include "core/dom/ClientRect.h" 53 #include "core/dom/ClientRect.h"
54 #include "core/dom/ClientRectList.h" 54 #include "core/dom/ClientRectList.h"
55 #include "core/dom/DatasetDOMStringMap.h" 55 #include "core/dom/DatasetDOMStringMap.h"
56 #include "core/dom/ElementDataCache.h" 56 #include "core/dom/ElementDataCache.h"
57 #include "core/dom/ElementIntersectionObserverData.h"
58 #include "core/dom/ElementRareData.h" 57 #include "core/dom/ElementRareData.h"
59 #include "core/dom/ElementTraversal.h" 58 #include "core/dom/ElementTraversal.h"
60 #include "core/dom/ExceptionCode.h" 59 #include "core/dom/ExceptionCode.h"
61 #include "core/dom/FirstLetterPseudoElement.h" 60 #include "core/dom/FirstLetterPseudoElement.h"
62 #include "core/dom/Fullscreen.h" 61 #include "core/dom/Fullscreen.h"
63 #include "core/dom/LayoutTreeBuilder.h" 62 #include "core/dom/LayoutTreeBuilder.h"
64 #include "core/dom/MutationObserverInterestGroup.h" 63 #include "core/dom/MutationObserverInterestGroup.h"
65 #include "core/dom/MutationRecord.h" 64 #include "core/dom/MutationRecord.h"
66 #include "core/dom/NamedNodeMap.h" 65 #include "core/dom/NamedNodeMap.h"
67 #include "core/dom/NodeComputedStyle.h" 66 #include "core/dom/NodeComputedStyle.h"
67 #include "core/dom/NodeIntersectionObserverData.h"
68 #include "core/dom/PresentationAttributeStyle.h" 68 #include "core/dom/PresentationAttributeStyle.h"
69 #include "core/dom/PseudoElement.h" 69 #include "core/dom/PseudoElement.h"
70 #include "core/dom/ScriptableDocumentParser.h" 70 #include "core/dom/ScriptableDocumentParser.h"
71 #include "core/dom/SelectorQuery.h" 71 #include "core/dom/SelectorQuery.h"
72 #include "core/dom/StyleChangeReason.h" 72 #include "core/dom/StyleChangeReason.h"
73 #include "core/dom/StyleEngine.h" 73 #include "core/dom/StyleEngine.h"
74 #include "core/dom/Text.h" 74 #include "core/dom/Text.h"
75 #include "core/dom/custom/CustomElement.h" 75 #include "core/dom/custom/CustomElement.h"
76 #include "core/dom/custom/CustomElementRegistrationContext.h" 76 #include "core/dom/custom/CustomElementRegistrationContext.h"
77 #include "core/dom/shadow/InsertionPoint.h" 77 #include "core/dom/shadow/InsertionPoint.h"
(...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 if (!exceptionState.hadException()) 2587 if (!exceptionState.hadException())
2588 return newChild; 2588 return newChild;
2589 } 2589 }
2590 return nullptr; 2590 return nullptr;
2591 } 2591 }
2592 2592
2593 exceptionState.throwDOMException(SyntaxError, "The value provided ('" + wher e + "') is not one of 'beforeBegin', 'afterBegin', 'beforeEnd', or 'afterEnd'.") ; 2593 exceptionState.throwDOMException(SyntaxError, "The value provided ('" + wher e + "') is not one of 'beforeBegin', 'afterBegin', 'beforeEnd', or 'afterEnd'.") ;
2594 return nullptr; 2594 return nullptr;
2595 } 2595 }
2596 2596
2597 ElementIntersectionObserverData* Element::intersectionObserverData() const 2597 NodeIntersectionObserverData* Element::intersectionObserverData() const
2598 { 2598 {
2599 if (elementRareData()) 2599 if (elementRareData())
2600 return elementRareData()->intersectionObserverData(); 2600 return elementRareData()->intersectionObserverData();
2601 return nullptr; 2601 return nullptr;
2602 } 2602 }
2603 2603
2604 ElementIntersectionObserverData& Element::ensureIntersectionObserverData() 2604 NodeIntersectionObserverData& Element::ensureIntersectionObserverData()
2605 { 2605 {
2606 return ensureElementRareData().ensureIntersectionObserverData(); 2606 return ensureElementRareData().ensureIntersectionObserverData();
2607 } 2607 }
2608 2608
2609 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() 2609 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml()
2610 static Element* contextElementForInsertion(const String& where, Element* element , ExceptionState& exceptionState) 2610 static Element* contextElementForInsertion(const String& where, Element* element , ExceptionState& exceptionState)
2611 { 2611 {
2612 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft erEnd")) { 2612 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft erEnd")) {
2613 Element* parent = element->parentElement(); 2613 Element* parent = element->parentElement();
2614 if (!parent) { 2614 if (!parent) {
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 { 3644 {
3645 #if ENABLE(OILPAN) 3645 #if ENABLE(OILPAN)
3646 if (hasRareData()) 3646 if (hasRareData())
3647 visitor->trace(elementRareData()); 3647 visitor->trace(elementRareData());
3648 visitor->trace(m_elementData); 3648 visitor->trace(m_elementData);
3649 #endif 3649 #endif
3650 ContainerNode::trace(visitor); 3650 ContainerNode::trace(visitor);
3651 } 3651 }
3652 3652
3653 } // namespace blink 3653 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698