| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #include "core/html/HTMLDocument.h" | 98 #include "core/html/HTMLDocument.h" |
| 99 #include "core/html/HTMLElement.h" | 99 #include "core/html/HTMLElement.h" |
| 100 #include "core/html/HTMLFormControlsCollection.h" | 100 #include "core/html/HTMLFormControlsCollection.h" |
| 101 #include "core/html/HTMLFrameElementBase.h" | 101 #include "core/html/HTMLFrameElementBase.h" |
| 102 #include "core/html/HTMLFrameOwnerElement.h" | 102 #include "core/html/HTMLFrameOwnerElement.h" |
| 103 #include "core/html/HTMLOptionsCollection.h" | 103 #include "core/html/HTMLOptionsCollection.h" |
| 104 #include "core/html/HTMLPlugInElement.h" | 104 #include "core/html/HTMLPlugInElement.h" |
| 105 #include "core/html/HTMLTableRowsCollection.h" | 105 #include "core/html/HTMLTableRowsCollection.h" |
| 106 #include "core/html/HTMLTemplateElement.h" | 106 #include "core/html/HTMLTemplateElement.h" |
| 107 #include "core/html/parser/HTMLParserIdioms.h" | 107 #include "core/html/parser/HTMLParserIdioms.h" |
| 108 #include "core/input/EventHandler.h" |
| 108 #include "core/inspector/InspectorInstrumentation.h" | 109 #include "core/inspector/InspectorInstrumentation.h" |
| 109 #include "core/layout/LayoutTextFragment.h" | 110 #include "core/layout/LayoutTextFragment.h" |
| 110 #include "core/layout/LayoutView.h" | 111 #include "core/layout/LayoutView.h" |
| 111 #include "core/loader/DocumentLoader.h" | 112 #include "core/loader/DocumentLoader.h" |
| 112 #include "core/page/ChromeClient.h" | 113 #include "core/page/ChromeClient.h" |
| 113 #include "core/page/FocusController.h" | 114 #include "core/page/FocusController.h" |
| 114 #include "core/page/Page.h" | 115 #include "core/page/Page.h" |
| 115 #include "core/page/PointerLockController.h" | 116 #include "core/page/PointerLockController.h" |
| 116 #include "core/page/SpatialNavigation.h" | 117 #include "core/page/SpatialNavigation.h" |
| 117 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" | 118 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 ElementRareData* data = elementRareData(); | 1544 ElementRareData* data = elementRareData(); |
| 1544 | 1545 |
| 1545 data->clearRestyleFlags(); | 1546 data->clearRestyleFlags(); |
| 1546 | 1547 |
| 1547 if (ElementAnimations* elementAnimations = data->elementAnimations()) | 1548 if (ElementAnimations* elementAnimations = data->elementAnimations()) |
| 1548 elementAnimations->cssAnimations().cancel(); | 1549 elementAnimations->cssAnimations().cancel(); |
| 1549 | 1550 |
| 1550 if (data->intersectionObserverData()) | 1551 if (data->intersectionObserverData()) |
| 1551 data->intersectionObserverData()->deactivateAllIntersectionObservers
(*this); | 1552 data->intersectionObserverData()->deactivateAllIntersectionObservers
(*this); |
| 1552 } | 1553 } |
| 1554 |
| 1555 if (document().frame()) |
| 1556 document().frame()->eventHandler().elementRemoved(this); |
| 1553 } | 1557 } |
| 1554 | 1558 |
| 1555 void Element::attach(const AttachContext& context) | 1559 void Element::attach(const AttachContext& context) |
| 1556 { | 1560 { |
| 1557 ASSERT(document().inStyleRecalc()); | 1561 ASSERT(document().inStyleRecalc()); |
| 1558 | 1562 |
| 1559 // We've already been through detach when doing an attach, but we might | 1563 // We've already been through detach when doing an attach, but we might |
| 1560 // need to clear any state that's been added since then. | 1564 // need to clear any state that's been added since then. |
| 1561 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { | 1565 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { |
| 1562 ElementRareData* data = elementRareData(); | 1566 ElementRareData* data = elementRareData(); |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 RefPtrWillBeRawPtr<Element> contextElement = contextElementForInsertion(wher
e, this, exceptionState); | 2649 RefPtrWillBeRawPtr<Element> contextElement = contextElementForInsertion(wher
e, this, exceptionState); |
| 2646 if (!contextElement) | 2650 if (!contextElement) |
| 2647 return; | 2651 return; |
| 2648 | 2652 |
| 2649 RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentForInnerOuterH
TML(markup, contextElement.get(), AllowScriptingContent, "insertAdjacentHTML", e
xceptionState); | 2653 RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentForInnerOuterH
TML(markup, contextElement.get(), AllowScriptingContent, "insertAdjacentHTML", e
xceptionState); |
| 2650 if (!fragment) | 2654 if (!fragment) |
| 2651 return; | 2655 return; |
| 2652 insertAdjacent(where, fragment.get(), exceptionState); | 2656 insertAdjacent(where, fragment.get(), exceptionState); |
| 2653 } | 2657 } |
| 2654 | 2658 |
| 2659 void Element::setPointerCapture(int pointerId, ExceptionState& exceptionState) |
| 2660 { |
| 2661 if (document().frame()) { |
| 2662 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) |
| 2663 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2664 else if (!inDocument()) |
| 2665 exceptionState.throwDOMException(InvalidStateError, "InvalidStateErr
or"); |
| 2666 else |
| 2667 document().frame()->eventHandler().setPointerCapture(pointerId, this
); |
| 2668 } |
| 2669 } |
| 2670 |
| 2671 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat
e) |
| 2672 { |
| 2673 if (document().frame()) { |
| 2674 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) |
| 2675 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2676 else |
| 2677 document().frame()->eventHandler().releasePointerCapture(pointerId,
this); |
| 2678 } |
| 2679 } |
| 2680 |
| 2655 String Element::innerText() | 2681 String Element::innerText() |
| 2656 { | 2682 { |
| 2657 // We need to update layout, since plainText uses line boxes in the layout t
ree. | 2683 // We need to update layout, since plainText uses line boxes in the layout t
ree. |
| 2658 document().updateLayoutIgnorePendingStylesheets(); | 2684 document().updateLayoutIgnorePendingStylesheets(); |
| 2659 | 2685 |
| 2660 if (!layoutObject()) | 2686 if (!layoutObject()) |
| 2661 return textContent(true); | 2687 return textContent(true); |
| 2662 | 2688 |
| 2663 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne
rText); | 2689 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne
rText); |
| 2664 } | 2690 } |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3650 { | 3676 { |
| 3651 #if ENABLE(OILPAN) | 3677 #if ENABLE(OILPAN) |
| 3652 if (hasRareData()) | 3678 if (hasRareData()) |
| 3653 visitor->trace(elementRareData()); | 3679 visitor->trace(elementRareData()); |
| 3654 visitor->trace(m_elementData); | 3680 visitor->trace(m_elementData); |
| 3655 #endif | 3681 #endif |
| 3656 ContainerNode::trace(visitor); | 3682 ContainerNode::trace(visitor); |
| 3657 } | 3683 } |
| 3658 | 3684 |
| 3659 } // namespace blink | 3685 } // namespace blink |
| OLD | NEW |