OLD | NEW |
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. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
10 * | 10 * |
(...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 exception_state); | 3059 exception_state); |
3060 if (!fragment) | 3060 if (!fragment) |
3061 return; | 3061 return; |
3062 InsertAdjacent(where, fragment, exception_state); | 3062 InsertAdjacent(where, fragment, exception_state); |
3063 } | 3063 } |
3064 | 3064 |
3065 void Element::setPointerCapture(int pointer_id, | 3065 void Element::setPointerCapture(int pointer_id, |
3066 ExceptionState& exception_state) { | 3066 ExceptionState& exception_state) { |
3067 if (GetDocument().GetFrame()) { | 3067 if (GetDocument().GetFrame()) { |
3068 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( | 3068 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( |
3069 pointer_id)) | 3069 pointer_id)) { |
3070 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); | 3070 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); |
3071 else if (!isConnected()) | 3071 } else if (!isConnected()) { |
3072 exception_state.ThrowDOMException(kInvalidStateError, | 3072 exception_state.ThrowDOMException(kInvalidStateError, |
3073 "InvalidStateError"); | 3073 "InvalidStateError"); |
3074 else | 3074 } else if (GetDocument().GetPage() && GetDocument() |
| 3075 .GetPage() |
| 3076 ->GetPointerLockController() |
| 3077 .GetElement()) { |
| 3078 exception_state.ThrowDOMException(kInvalidStateError, |
| 3079 "InvalidStateError"); |
| 3080 } else { |
3075 GetDocument().GetFrame()->GetEventHandler().SetPointerCapture(pointer_id, | 3081 GetDocument().GetFrame()->GetEventHandler().SetPointerCapture(pointer_id, |
3076 this); | 3082 this); |
| 3083 } |
3077 } | 3084 } |
3078 } | 3085 } |
3079 | 3086 |
3080 void Element::releasePointerCapture(int pointer_id, | 3087 void Element::releasePointerCapture(int pointer_id, |
3081 ExceptionState& exception_state) { | 3088 ExceptionState& exception_state) { |
3082 if (GetDocument().GetFrame()) { | 3089 if (GetDocument().GetFrame()) { |
3083 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( | 3090 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( |
3084 pointer_id)) | 3091 pointer_id)) |
3085 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); | 3092 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); |
3086 else | 3093 else |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4337 } | 4344 } |
4338 | 4345 |
4339 DEFINE_TRACE_WRAPPERS(Element) { | 4346 DEFINE_TRACE_WRAPPERS(Element) { |
4340 if (HasRareData()) { | 4347 if (HasRareData()) { |
4341 visitor->TraceWrappers(GetElementRareData()); | 4348 visitor->TraceWrappers(GetElementRareData()); |
4342 } | 4349 } |
4343 ContainerNode::TraceWrappers(visitor); | 4350 ContainerNode::TraceWrappers(visitor); |
4344 } | 4351 } |
4345 | 4352 |
4346 } // namespace blink | 4353 } // namespace blink |
OLD | NEW |