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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1838973003: Send lostpointercapture on touch capturing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating the test and implicit capture on touchPressed Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 6523dac47b4d641b4552b341d50e41fc7b81a1bc..475e1dbb25dbfd88a91e93923a6b879b586f694d 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2651,6 +2651,9 @@ void Element::setPointerCapture(int pointerId, ExceptionState& exceptionState)
exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId");
else if (!inDocument())
exceptionState.throwDOMException(InvalidStateError, "InvalidStateError");
+ // TODO(crbug.com/579553): This next "else if" is a hack to suppress capturing for touches
mustaq 2016/04/04 15:37:26 ...hack to notify JS that we don't (yet) support e
Navid Zolghadr 2016/04/04 16:26:57 Done.
+ else if (document().frame()->eventHandler().getPointerEventType(pointerId) == WebPointerProperties::PointerType::Touch)
+ exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId");
else
document().frame()->eventHandler().setPointerCapture(pointerId, this);
}
@@ -2661,6 +2664,9 @@ void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat
if (document().frame()) {
if (!document().frame()->eventHandler().isPointerEventActive(pointerId))
exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId");
+ // TODO(crbug.com/579553): This next "else if" is a hack to suppress capturing for touches
mustaq 2016/04/04 15:37:26 Ditto.
Navid Zolghadr 2016/04/04 16:26:57 Done.
+ else if (document().frame()->eventHandler().getPointerEventType(pointerId) == WebPointerProperties::PointerType::Touch)
+ exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId");
else
document().frame()->eventHandler().releasePointerCapture(pointerId, this);
}

Powered by Google App Engine
This is Rietveld 408576698