Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp

Issue 2568443002: INPUT element: Do not use identical ID name for SearchFieldCancelButtonElement and ClearButtonEleme… (Closed)
Patch Set: step_func_done Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/ShadowElementNames.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/ShadowElementNames.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698