| 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 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 insertAdjacent(where, fragment.get(), exceptionState); | 2644 insertAdjacent(where, fragment.get(), exceptionState); |
| 2645 } | 2645 } |
| 2646 | 2646 |
| 2647 void Element::setPointerCapture(int pointerId, ExceptionState& exceptionState) | 2647 void Element::setPointerCapture(int pointerId, ExceptionState& exceptionState) |
| 2648 { | 2648 { |
| 2649 if (document().frame()) { | 2649 if (document().frame()) { |
| 2650 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) | 2650 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) |
| 2651 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); | 2651 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2652 else if (!inDocument()) | 2652 else if (!inDocument()) |
| 2653 exceptionState.throwDOMException(InvalidStateError, "InvalidStateErr
or"); | 2653 exceptionState.throwDOMException(InvalidStateError, "InvalidStateErr
or"); |
| 2654 // TODO(crbug.com/579553): This next "else if" is a hack to notify JS th
at we don't (yet) support |
| 2655 // explicit set/release of touch pointers (which are implicitly captured
for performance reasons). |
| 2656 else if (document().frame()->eventHandler().getPointerEventType(pointerI
d) == WebPointerProperties::PointerType::Touch) |
| 2657 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2654 else | 2658 else |
| 2655 document().frame()->eventHandler().setPointerCapture(pointerId, this
); | 2659 document().frame()->eventHandler().setPointerCapture(pointerId, this
); |
| 2656 } | 2660 } |
| 2657 } | 2661 } |
| 2658 | 2662 |
| 2659 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat
e) | 2663 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat
e) |
| 2660 { | 2664 { |
| 2661 if (document().frame()) { | 2665 if (document().frame()) { |
| 2662 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) | 2666 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) |
| 2663 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); | 2667 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2668 // TODO(crbug.com/579553): This next "else if" is a hack to notify JS th
at we don't (yet) support |
| 2669 // explicit set/release of touch pointers (which are implicitly captured
for performance reasons). |
| 2670 else if (document().frame()->eventHandler().getPointerEventType(pointerI
d) == WebPointerProperties::PointerType::Touch) |
| 2671 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId
"); |
| 2664 else | 2672 else |
| 2665 document().frame()->eventHandler().releasePointerCapture(pointerId,
this); | 2673 document().frame()->eventHandler().releasePointerCapture(pointerId,
this); |
| 2666 } | 2674 } |
| 2667 } | 2675 } |
| 2668 | 2676 |
| 2669 String Element::innerText() | 2677 String Element::innerText() |
| 2670 { | 2678 { |
| 2671 // We need to update layout, since plainText uses line boxes in the layout t
ree. | 2679 // We need to update layout, since plainText uses line boxes in the layout t
ree. |
| 2672 document().updateLayoutIgnorePendingStylesheets(); | 2680 document().updateLayoutIgnorePendingStylesheets(); |
| 2673 | 2681 |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3669 { | 3677 { |
| 3670 #if ENABLE(OILPAN) | 3678 #if ENABLE(OILPAN) |
| 3671 if (hasRareData()) | 3679 if (hasRareData()) |
| 3672 visitor->trace(elementRareData()); | 3680 visitor->trace(elementRareData()); |
| 3673 visitor->trace(m_elementData); | 3681 visitor->trace(m_elementData); |
| 3674 #endif | 3682 #endif |
| 3675 ContainerNode::trace(visitor); | 3683 ContainerNode::trace(visitor); |
| 3676 } | 3684 } |
| 3677 | 3685 |
| 3678 } // namespace blink | 3686 } // namespace blink |
| OLD | NEW |