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

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 a missing element interface. 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 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after
2748 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat e) 2748 void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat e)
2749 { 2749 {
2750 if (document().frame()) { 2750 if (document().frame()) {
2751 if (!document().frame()->eventHandler().isPointerEventActive(pointerId)) 2751 if (!document().frame()->eventHandler().isPointerEventActive(pointerId))
2752 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId "); 2752 exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId ");
2753 else 2753 else
2754 document().frame()->eventHandler().releasePointerCapture(pointerId, this); 2754 document().frame()->eventHandler().releasePointerCapture(pointerId, this);
2755 } 2755 }
2756 } 2756 }
2757 2757
2758 bool Element::hasPointerCapture(int pointerId)
2759 {
2760 return document().frame() && document().frame()->eventHandler().hasPointerCa pture(pointerId, this);
2761 }
2762
2758 String Element::innerText() 2763 String Element::innerText()
2759 { 2764 {
2760 // We need to update layout, since plainText uses line boxes in the layout t ree. 2765 // We need to update layout, since plainText uses line boxes in the layout t ree.
2761 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 2766 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
2762 2767
2763 if (!layoutObject()) 2768 if (!layoutObject())
2764 return textContent(true); 2769 return textContent(true);
2765 2770
2766 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne rText); 2771 return plainText(EphemeralRange::rangeOfContents(*this), TextIteratorForInne rText);
2767 } 2772 }
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
3799 3804
3800 DEFINE_TRACE_WRAPPERS(Element) 3805 DEFINE_TRACE_WRAPPERS(Element)
3801 { 3806 {
3802 if (hasRareData()) { 3807 if (hasRareData()) {
3803 visitor->traceWrappers(elementRareData()); 3808 visitor->traceWrappers(elementRareData());
3804 } 3809 }
3805 ContainerNode::traceWrappers(visitor); 3810 ContainerNode::traceWrappers(visitor);
3806 } 3811 }
3807 3812
3808 } // namespace blink 3813 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698