| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 { | 43 { |
| 44 setPseudo(AtomicString("-webkit-clear-button", AtomicString::ConstructFromLi
teral)); | 44 setPseudo(AtomicString("-webkit-clear-button", AtomicString::ConstructFromLi
teral)); |
| 45 setAttribute(idAttr, ShadowElementNames::clearButton()); | 45 setAttribute(idAttr, ShadowElementNames::clearButton()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 PassRefPtr<ClearButtonElement> ClearButtonElement::create(Document* document, Cl
earButtonOwner& clearButtonOwner) | 48 PassRefPtr<ClearButtonElement> ClearButtonElement::create(Document* document, Cl
earButtonOwner& clearButtonOwner) |
| 49 { | 49 { |
| 50 return adoptRef(new ClearButtonElement(document, clearButtonOwner)); | 50 return adoptRef(new ClearButtonElement(document, clearButtonOwner)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void ClearButtonElement::detach() | 53 void ClearButtonElement::detach(const AttachContext& context) |
| 54 { | 54 { |
| 55 if (m_capturing) { | 55 if (m_capturing) { |
| 56 if (Frame* frame = document()->frame()) | 56 if (Frame* frame = document()->frame()) |
| 57 frame->eventHandler()->setCapturingMouseEventsNode(0); | 57 frame->eventHandler()->setCapturingMouseEventsNode(0); |
| 58 } | 58 } |
| 59 HTMLDivElement::detach(); | 59 HTMLDivElement::detach(context); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void ClearButtonElement::releaseCapture() | 62 void ClearButtonElement::releaseCapture() |
| 63 { | 63 { |
| 64 if (!m_capturing) | 64 if (!m_capturing) |
| 65 return; | 65 return; |
| 66 | 66 |
| 67 if (Frame* frame = document()->frame()) { | 67 if (Frame* frame = document()->frame()) { |
| 68 frame->eventHandler()->setCapturingMouseEventsNode(0); | 68 frame->eventHandler()->setCapturingMouseEventsNode(0); |
| 69 m_capturing = false; | 69 m_capturing = false; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 if (!event->defaultHandled()) | 110 if (!event->defaultHandled()) |
| 111 HTMLDivElement::defaultEventHandler(event); | 111 HTMLDivElement::defaultEventHandler(event); |
| 112 } | 112 } |
| 113 | 113 |
| 114 bool ClearButtonElement::isClearButtonElement() const | 114 bool ClearButtonElement::isClearButtonElement() const |
| 115 { | 115 { |
| 116 return true; | 116 return true; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } | 119 } |
| OLD | NEW |