Chromium Code Reviews| 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 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3067 exception_state); | 3067 exception_state); |
| 3068 if (!fragment) | 3068 if (!fragment) |
| 3069 return; | 3069 return; |
| 3070 InsertAdjacent(where, fragment, exception_state); | 3070 InsertAdjacent(where, fragment, exception_state); |
| 3071 } | 3071 } |
| 3072 | 3072 |
| 3073 void Element::setPointerCapture(int pointer_id, | 3073 void Element::setPointerCapture(int pointer_id, |
| 3074 ExceptionState& exception_state) { | 3074 ExceptionState& exception_state) { |
| 3075 if (GetDocument().GetFrame()) { | 3075 if (GetDocument().GetFrame()) { |
| 3076 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( | 3076 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( |
| 3077 pointer_id)) | 3077 pointer_id)) { |
| 3078 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); | 3078 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); |
| 3079 else if (!isConnected()) | 3079 } else if (!isConnected()) { |
| 3080 exception_state.ThrowDOMException(kInvalidStateError, | 3080 exception_state.ThrowDOMException(kInvalidStateError, |
| 3081 "InvalidStateError"); | 3081 "InvalidStateError"); |
| 3082 else | 3082 } else if (GetDocument().GetPage() && GetDocument() |
|
mustaq
2017/05/26 14:56:18
Nit: Combine with the above |if| with an OR, since
lanwei
2017/05/29 18:30:07
Done.
| |
| 3083 .GetPage() | |
| 3084 ->GetPointerLockController() | |
| 3085 .GetElement()) { | |
| 3086 exception_state.ThrowDOMException(kInvalidStateError, | |
| 3087 "InvalidStateError"); | |
| 3088 } else { | |
| 3083 GetDocument().GetFrame()->GetEventHandler().SetPointerCapture(pointer_id, | 3089 GetDocument().GetFrame()->GetEventHandler().SetPointerCapture(pointer_id, |
| 3084 this); | 3090 this); |
| 3091 } | |
| 3085 } | 3092 } |
| 3086 } | 3093 } |
| 3087 | 3094 |
| 3088 void Element::releasePointerCapture(int pointer_id, | 3095 void Element::releasePointerCapture(int pointer_id, |
| 3089 ExceptionState& exception_state) { | 3096 ExceptionState& exception_state) { |
| 3090 if (GetDocument().GetFrame()) { | 3097 if (GetDocument().GetFrame()) { |
| 3091 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( | 3098 if (!GetDocument().GetFrame()->GetEventHandler().IsPointerEventActive( |
| 3092 pointer_id)) | 3099 pointer_id)) |
| 3093 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); | 3100 exception_state.ThrowDOMException(kInvalidPointerId, "InvalidPointerId"); |
| 3094 else | 3101 else |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4348 } | 4355 } |
| 4349 | 4356 |
| 4350 DEFINE_TRACE_WRAPPERS(Element) { | 4357 DEFINE_TRACE_WRAPPERS(Element) { |
| 4351 if (HasRareData()) { | 4358 if (HasRareData()) { |
| 4352 visitor->TraceWrappers(GetElementRareData()); | 4359 visitor->TraceWrappers(GetElementRareData()); |
| 4353 } | 4360 } |
| 4354 ContainerNode::TraceWrappers(visitor); | 4361 ContainerNode::TraceWrappers(visitor); |
| 4355 } | 4362 } |
| 4356 | 4363 |
| 4357 } // namespace blink | 4364 } // namespace blink |
| OLD | NEW |