OLD | NEW |
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 #include "core/html/HTMLSlotElement.h" | 110 #include "core/html/HTMLSlotElement.h" |
111 #include "core/html/HTMLTableRowsCollection.h" | 111 #include "core/html/HTMLTableRowsCollection.h" |
112 #include "core/html/HTMLTemplateElement.h" | 112 #include "core/html/HTMLTemplateElement.h" |
113 #include "core/html/parser/HTMLParserIdioms.h" | 113 #include "core/html/parser/HTMLParserIdioms.h" |
114 #include "core/input/EventHandler.h" | 114 #include "core/input/EventHandler.h" |
115 #include "core/inspector/InspectorInstrumentation.h" | 115 #include "core/inspector/InspectorInstrumentation.h" |
116 #include "core/layout/LayoutTextFragment.h" | 116 #include "core/layout/LayoutTextFragment.h" |
117 #include "core/layout/api/LayoutBoxItem.h" | 117 #include "core/layout/api/LayoutBoxItem.h" |
118 #include "core/layout/api/LayoutViewItem.h" | 118 #include "core/layout/api/LayoutViewItem.h" |
119 #include "core/loader/DocumentLoader.h" | 119 #include "core/loader/DocumentLoader.h" |
120 #include "core/observer/ResizeObservation.h" | |
121 #include "core/page/ChromeClient.h" | 120 #include "core/page/ChromeClient.h" |
122 #include "core/page/FocusController.h" | 121 #include "core/page/FocusController.h" |
123 #include "core/page/Page.h" | 122 #include "core/page/Page.h" |
124 #include "core/page/PointerLockController.h" | 123 #include "core/page/PointerLockController.h" |
125 #include "core/page/SpatialNavigation.h" | 124 #include "core/page/SpatialNavigation.h" |
126 #include "core/page/scrolling/RootScrollerController.h" | 125 #include "core/page/scrolling/RootScrollerController.h" |
127 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" | 126 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" |
128 #include "core/page/scrolling/ScrollState.h" | 127 #include "core/page/scrolling/ScrollState.h" |
129 #include "core/page/scrolling/ScrollStateCallback.h" | 128 #include "core/page/scrolling/ScrollStateCallback.h" |
130 #include "core/paint/PaintLayer.h" | 129 #include "core/paint/PaintLayer.h" |
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 document().activeChainNodeDetached(*this); | 1631 document().activeChainNodeDetached(*this); |
1633 document().userActionElements().didDetach(*this); | 1632 document().userActionElements().didDetach(*this); |
1634 } | 1633 } |
1635 | 1634 |
1636 if (context.clearInvalidation) | 1635 if (context.clearInvalidation) |
1637 document().styleEngine().styleInvalidator().clearInvalidation(*this); | 1636 document().styleEngine().styleInvalidator().clearInvalidation(*this); |
1638 | 1637 |
1639 if (svgFilterNeedsLayerUpdate()) | 1638 if (svgFilterNeedsLayerUpdate()) |
1640 document().unscheduleSVGFilterLayerUpdateHack(*this); | 1639 document().unscheduleSVGFilterLayerUpdateHack(*this); |
1641 | 1640 |
1642 setNeedsResizeObserverUpdate(); | |
1643 | |
1644 DCHECK(needsAttach()); | 1641 DCHECK(needsAttach()); |
1645 } | 1642 } |
1646 | 1643 |
1647 bool Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, Compu
tedStyle* newStyle) | 1644 bool Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, Compu
tedStyle* newStyle) |
1648 { | 1645 { |
1649 DCHECK_EQ(currentStyle, computedStyle()); | 1646 DCHECK_EQ(currentStyle, computedStyle()); |
1650 DCHECK(layoutObject()); | 1647 DCHECK(layoutObject()); |
1651 | 1648 |
1652 if (!currentStyle) | 1649 if (!currentStyle) |
1653 return false; | 1650 return false; |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 if (hasRareData()) | 2686 if (hasRareData()) |
2690 return elementRareData()->resizeObserverData(); | 2687 return elementRareData()->resizeObserverData(); |
2691 return nullptr; | 2688 return nullptr; |
2692 } | 2689 } |
2693 | 2690 |
2694 HeapHashMap<Member<ResizeObserver>, Member<ResizeObservation>>& Element::ensureR
esizeObserverData() | 2691 HeapHashMap<Member<ResizeObserver>, Member<ResizeObservation>>& Element::ensureR
esizeObserverData() |
2695 { | 2692 { |
2696 return ensureElementRareData().ensureResizeObserverData(); | 2693 return ensureElementRareData().ensureResizeObserverData(); |
2697 } | 2694 } |
2698 | 2695 |
2699 void Element::setNeedsResizeObserverUpdate() | |
2700 { | |
2701 if (auto* data = resizeObserverData()) { | |
2702 for (auto& observation : data->values()) | |
2703 observation->elementSizeChanged(); | |
2704 } | |
2705 } | |
2706 | |
2707 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() | 2696 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() |
2708 static Element* contextElementForInsertion(const String& where, Element* element
, ExceptionState& exceptionState) | 2697 static Element* contextElementForInsertion(const String& where, Element* element
, ExceptionState& exceptionState) |
2709 { | 2698 { |
2710 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft
erEnd")) { | 2699 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft
erEnd")) { |
2711 Element* parent = element->parentElement(); | 2700 Element* parent = element->parentElement(); |
2712 if (!parent) { | 2701 if (!parent) { |
2713 exceptionState.throwDOMException(NoModificationAllowedError, "The el
ement has no parent."); | 2702 exceptionState.throwDOMException(NoModificationAllowedError, "The el
ement has no parent."); |
2714 return nullptr; | 2703 return nullptr; |
2715 } | 2704 } |
2716 return parent; | 2705 return parent; |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3815 | 3804 |
3816 DEFINE_TRACE_WRAPPERS(Element) | 3805 DEFINE_TRACE_WRAPPERS(Element) |
3817 { | 3806 { |
3818 if (hasRareData()) { | 3807 if (hasRareData()) { |
3819 visitor->traceWrappers(elementRareData()); | 3808 visitor->traceWrappers(elementRareData()); |
3820 } | 3809 } |
3821 ContainerNode::traceWrappers(visitor); | 3810 ContainerNode::traceWrappers(visitor); |
3822 } | 3811 } |
3823 | 3812 |
3824 } // namespace blink | 3813 } // namespace blink |
OLD | NEW |