| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 inline SearchFieldCancelButtonElement::SearchFieldCancelButtonElement( | 159 inline SearchFieldCancelButtonElement::SearchFieldCancelButtonElement( |
| 160 Document& document) | 160 Document& document) |
| 161 : HTMLDivElement(document), m_capturing(false) {} | 161 : HTMLDivElement(document), m_capturing(false) {} |
| 162 | 162 |
| 163 SearchFieldCancelButtonElement* SearchFieldCancelButtonElement::create( | 163 SearchFieldCancelButtonElement* SearchFieldCancelButtonElement::create( |
| 164 Document& document) { | 164 Document& document) { |
| 165 SearchFieldCancelButtonElement* element = | 165 SearchFieldCancelButtonElement* element = |
| 166 new SearchFieldCancelButtonElement(document); | 166 new SearchFieldCancelButtonElement(document); |
| 167 element->setShadowPseudoId(AtomicString("-webkit-search-cancel-button")); | 167 element->setShadowPseudoId(AtomicString("-webkit-search-cancel-button")); |
| 168 element->setAttribute(idAttr, ShadowElementNames::clearButton()); | 168 element->setAttribute(idAttr, ShadowElementNames::searchClearButton()); |
| 169 return element; | 169 return element; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void SearchFieldCancelButtonElement::detachLayoutTree( | 172 void SearchFieldCancelButtonElement::detachLayoutTree( |
| 173 const AttachContext& context) { | 173 const AttachContext& context) { |
| 174 if (m_capturing) { | 174 if (m_capturing) { |
| 175 if (LocalFrame* frame = document().frame()) | 175 if (LocalFrame* frame = document().frame()) |
| 176 frame->eventHandler().setCapturingMouseEventsNode(nullptr); | 176 frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
| 177 } | 177 } |
| 178 HTMLDivElement::detachLayoutTree(context); | 178 HTMLDivElement::detachLayoutTree(context); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 202 | 202 |
| 203 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() { | 203 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() { |
| 204 const HTMLInputElement* input = toHTMLInputElement(ownerShadowHost()); | 204 const HTMLInputElement* input = toHTMLInputElement(ownerShadowHost()); |
| 205 if (input && !input->isDisabledOrReadOnly()) | 205 if (input && !input->isDisabledOrReadOnly()) |
| 206 return true; | 206 return true; |
| 207 | 207 |
| 208 return HTMLDivElement::willRespondToMouseClickEvents(); | 208 return HTMLDivElement::willRespondToMouseClickEvents(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace blink | 211 } // namespace blink |
| OLD | NEW |