| 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 3f81b6d16ea1a13085c0da5c6c8f7578f0135a2b..3f6a8a6965340343a7c832385ab09f0b31bae87c 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -3073,14 +3073,19 @@ void Element::setPointerCapture(int pointer_id,
|
| ExceptionState& exception_state) {
|
| if (GetDocument().GetFrame()) {
|
| if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive(
|
| - pointer_id))
|
| + pointer_id)) {
|
| exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId");
|
| - else if (!isConnected())
|
| + } else if (!isConnected() ||
|
| + (GetDocument().GetPage() && GetDocument()
|
| + .GetPage()
|
| + ->GetPointerLockController()
|
| + .GetElement())) {
|
| exception_state.ThrowDOMException(kInvalidStateError,
|
| "InvalidStateError");
|
| - else
|
| + } else {
|
| GetDocument().GetFrame()->GetEventHandler().SetPointerCapture(pointer_id,
|
| this);
|
| + }
|
| }
|
| }
|
|
|
|
|