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); |
} |