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

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

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Rebase Created 4 years, 10 months 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
OLDNEW
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 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 { 169 {
170 #if !ENABLE(OILPAN) 170 #if !ENABLE(OILPAN)
171 // Need to remove form association while this is still an HTMLInputElement 171 // Need to remove form association while this is still an HTMLInputElement
172 // so that virtual functions are called correctly. 172 // so that virtual functions are called correctly.
173 setForm(0); 173 setForm(0);
174 // setForm(0) may register this to a document-level radio button group. 174 // setForm(0) may register this to a document-level radio button group.
175 // We should unregister it to avoid accessing a deleted object. 175 // We should unregister it to avoid accessing a deleted object.
176 if (type() == InputTypeNames::radio) 176 if (type() == InputTypeNames::radio)
177 document().formController().radioButtonGroupScope().removeButton(this); 177 document().formController().radioButtonGroupScope().removeButton(this);
178 if (m_hasTouchEventHandler && document().frameHost()) 178 if (m_hasTouchEventHandler && document().frameHost())
179 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*th is, EventHandlerRegistry::TouchEvent); 179 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*th is, EventHandlerRegistry::TouchEventBlocking);
Rick Byers 2016/02/04 22:18:57 nit: Add a TODO saying to make this passive, refer
180 #endif 180 #endif
181 } 181 }
182 182
183 const AtomicString& HTMLInputElement::name() const 183 const AtomicString& HTMLInputElement::name() const
184 { 184 {
185 return m_name.isNull() ? emptyAtom : m_name; 185 return m_name.isNull() ? emptyAtom : m_name;
186 } 186 }
187 187
188 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState (const FormControlState& state) 188 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState (const FormControlState& state)
189 { 189 {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 { 413 {
414 ASSERT(m_inputTypeView); 414 ASSERT(m_inputTypeView);
415 415
416 bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler(); 416 bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler();
417 if (hasTouchEventHandler == !!m_hasTouchEventHandler) 417 if (hasTouchEventHandler == !!m_hasTouchEventHandler)
418 return; 418 return;
419 // If the Document is being or has been stopped, don't register any handlers . 419 // If the Document is being or has been stopped, don't register any handlers .
420 if (document().frameHost() && document().lifecycle().state() < DocumentLifec ycle::Stopping) { 420 if (document().frameHost() && document().lifecycle().state() < DocumentLifec ycle::Stopping) {
421 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry(); 421 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry();
422 if (hasTouchEventHandler) 422 if (hasTouchEventHandler)
423 registry.didAddEventHandler(*this, EventHandlerRegistry::TouchEvent) ; 423 registry.didAddEventHandler(*this, EventHandlerRegistry::TouchEventB locking);
424 else 424 else
425 registry.didRemoveEventHandler(*this, EventHandlerRegistry::TouchEve nt); 425 registry.didRemoveEventHandler(*this, EventHandlerRegistry::TouchEve ntBlocking);
426 m_hasTouchEventHandler = hasTouchEventHandler; 426 m_hasTouchEventHandler = hasTouchEventHandler;
427 } 427 }
428 } 428 }
429 429
430 void HTMLInputElement::initializeTypeInParsing() 430 void HTMLInputElement::initializeTypeInParsing()
431 { 431 {
432 ASSERT(m_parsingInProgress); 432 ASSERT(m_parsingInProgress);
433 ASSERT(!m_inputType); 433 ASSERT(!m_inputType);
434 ASSERT(!m_inputTypeView); 434 ASSERT(!m_inputTypeView);
435 435
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 void HTMLInputElement::ensurePrimaryContent() 1921 void HTMLInputElement::ensurePrimaryContent()
1922 { 1922 {
1923 m_inputTypeView->ensurePrimaryContent(); 1923 m_inputTypeView->ensurePrimaryContent();
1924 } 1924 }
1925 1925
1926 bool HTMLInputElement::hasFallbackContent() const 1926 bool HTMLInputElement::hasFallbackContent() const
1927 { 1927 {
1928 return m_inputTypeView->hasFallbackContent(); 1928 return m_inputTypeView->hasFallbackContent();
1929 } 1929 }
1930 } // namespace blink 1930 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698