| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/dom/MouseEvent.h" | 29 #include "core/dom/MouseEvent.h" |
| 30 #include "core/html/shadow/ShadowElementNames.h" | 30 #include "core/html/shadow/ShadowElementNames.h" |
| 31 #include "core/page/EventHandler.h" | 31 #include "core/page/EventHandler.h" |
| 32 #include "core/page/Frame.h" | 32 #include "core/page/Frame.h" |
| 33 #include "core/rendering/RenderView.h" | 33 #include "core/rendering/RenderView.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 using namespace HTMLNames; | 37 using namespace HTMLNames; |
| 38 | 38 |
| 39 inline ClearButtonElement::ClearButtonElement(Document* document, ClearButtonOwn
er& clearButtonOwner) | 39 inline ClearButtonElement::ClearButtonElement(Document& document, ClearButtonOwn
er& clearButtonOwner) |
| 40 : HTMLDivElement(divTag, document) | 40 : HTMLDivElement(divTag, document) |
| 41 , m_clearButtonOwner(&clearButtonOwner) | 41 , m_clearButtonOwner(&clearButtonOwner) |
| 42 , m_capturing(false) | 42 , m_capturing(false) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 PassRefPtr<ClearButtonElement> ClearButtonElement::create(Document* document, Cl
earButtonOwner& clearButtonOwner) | 46 PassRefPtr<ClearButtonElement> ClearButtonElement::create(Document& document, Cl
earButtonOwner& clearButtonOwner) |
| 47 { | 47 { |
| 48 RefPtr<ClearButtonElement> element = adoptRef(new ClearButtonElement(documen
t, clearButtonOwner)); | 48 RefPtr<ClearButtonElement> element = adoptRef(new ClearButtonElement(documen
t, clearButtonOwner)); |
| 49 element->setPart(AtomicString("-webkit-clear-button", AtomicString::Construc
tFromLiteral)); | 49 element->setPart(AtomicString("-webkit-clear-button", AtomicString::Construc
tFromLiteral)); |
| 50 element->setAttribute(idAttr, ShadowElementNames::clearButton()); | 50 element->setAttribute(idAttr, ShadowElementNames::clearButton()); |
| 51 return element.release(); | 51 return element.release(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ClearButtonElement::detach(const AttachContext& context) | 54 void ClearButtonElement::detach(const AttachContext& context) |
| 55 { | 55 { |
| 56 if (m_capturing) { | 56 if (m_capturing) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 if (!event->defaultHandled()) | 111 if (!event->defaultHandled()) |
| 112 HTMLDivElement::defaultEventHandler(event); | 112 HTMLDivElement::defaultEventHandler(event); |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool ClearButtonElement::isClearButtonElement() const | 115 bool ClearButtonElement::isClearButtonElement() const |
| 116 { | 116 { |
| 117 return true; | 117 return true; |
| 118 } | 118 } |
| 119 | 119 |
| 120 } | 120 } |
| OLD | NEW |