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

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

Issue 2220043002: Added PointerEvent.hasPointerCapture API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an entry to global-interface-listing Created 4 years, 4 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat e) 2759 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat e)
2760 { 2760 {
2761 if (document().frame()) { 2761 if (document().frame()) {
2762 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) 2762 if (!document().frame()->eventHandler().isPointerEventActive(pointerId))
2763 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId "); 2763 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId ");
2764 else 2764 else
2765 document().frame()->eventHandler().releasePointerCapture(pointerId, this); 2765 document().frame()->eventHandler().releasePointerCapture(pointerId, this);
2766 } 2766 }
2767 } 2767 }
2768 2768
2769 bool Element::hasPointerCapture(int pointerId)
2770 {
2771 return document().frame() && document().frame()->eventHandler().hasPointerCa pture(pointerId, this);
2772 }
2773
2769 String Element::innerText() 2774 String Element::innerText()
2770 { 2775 {
2771 // We need to update layout, since plainText uses line boxes in the layout t ree. 2776 // We need to update layout, since plainText uses line boxes in the layout t ree.
2772 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 2777 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
2773 2778
2774 if (!layoutObject()) 2779 if (!layoutObject())
2775 return textContent(true); 2780 return textContent(true);
2776 2781
2777 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne rText); 2782 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne rText);
2778 } 2783 }
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
3810 3815
3811 DEFINE_TRACE_WRAPPERS(Element) 3816 DEFINE_TRACE_WRAPPERS(Element)
3812 { 3817 {
3813 if (hasRareData()) { 3818 if (hasRareData()) {
3814 visitor->traceWrappers(elementRareData()); 3819 visitor->traceWrappers(elementRareData());
3815 } 3820 }
3816 ContainerNode::traceWrappers(visitor); 3821 ContainerNode::traceWrappers(visitor);
3817 } 3822 }
3818 3823
3819 } // namespace blink 3824 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698