OLD | NEW |
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 HTMLInputElement::~HTMLInputElement() | 168 HTMLInputElement::~HTMLInputElement() |
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 |
| 179 // TODO(dtapuska): Make this passive touch listener see crbug.com/584438 |
178 if (m_hasTouchEventHandler && document().frameHost()) | 180 if (m_hasTouchEventHandler && document().frameHost()) |
179 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*th
is, EventHandlerRegistry::TouchEvent); | 181 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*th
is, EventHandlerRegistry::TouchEventBlocking); |
180 #endif | 182 #endif |
181 } | 183 } |
182 | 184 |
183 const AtomicString& HTMLInputElement::name() const | 185 const AtomicString& HTMLInputElement::name() const |
184 { | 186 { |
185 return m_name.isNull() ? emptyAtom : m_name; | 187 return m_name.isNull() ? emptyAtom : m_name; |
186 } | 188 } |
187 | 189 |
188 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) | 190 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) |
189 { | 191 { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 void HTMLInputElement::updateTouchEventHandlerRegistry() | 414 void HTMLInputElement::updateTouchEventHandlerRegistry() |
413 { | 415 { |
414 ASSERT(m_inputTypeView); | 416 ASSERT(m_inputTypeView); |
415 | 417 |
416 bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler(); | 418 bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler(); |
417 if (hasTouchEventHandler == !!m_hasTouchEventHandler) | 419 if (hasTouchEventHandler == !!m_hasTouchEventHandler) |
418 return; | 420 return; |
419 // If the Document is being or has been stopped, don't register any handlers
. | 421 // If the Document is being or has been stopped, don't register any handlers
. |
420 if (document().frameHost() && document().lifecycle().state() < DocumentLifec
ycle::Stopping) { | 422 if (document().frameHost() && document().lifecycle().state() < DocumentLifec
ycle::Stopping) { |
421 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 423 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
| 424 // TODO(dtapuska): Make this passive touch listener see crbug.com/584438 |
422 if (hasTouchEventHandler) | 425 if (hasTouchEventHandler) |
423 registry.didAddEventHandler(*this, EventHandlerRegistry::TouchEvent)
; | 426 registry.didAddEventHandler(*this, EventHandlerRegistry::TouchEventB
locking); |
424 else | 427 else |
425 registry.didRemoveEventHandler(*this, EventHandlerRegistry::TouchEve
nt); | 428 registry.didRemoveEventHandler(*this, EventHandlerRegistry::TouchEve
ntBlocking); |
426 m_hasTouchEventHandler = hasTouchEventHandler; | 429 m_hasTouchEventHandler = hasTouchEventHandler; |
427 } | 430 } |
428 } | 431 } |
429 | 432 |
430 void HTMLInputElement::initializeTypeInParsing() | 433 void HTMLInputElement::initializeTypeInParsing() |
431 { | 434 { |
432 ASSERT(m_parsingInProgress); | 435 ASSERT(m_parsingInProgress); |
433 ASSERT(!m_inputType); | 436 ASSERT(!m_inputType); |
434 ASSERT(!m_inputTypeView); | 437 ASSERT(!m_inputTypeView); |
435 | 438 |
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 void HTMLInputElement::ensurePrimaryContent() | 1924 void HTMLInputElement::ensurePrimaryContent() |
1922 { | 1925 { |
1923 m_inputTypeView->ensurePrimaryContent(); | 1926 m_inputTypeView->ensurePrimaryContent(); |
1924 } | 1927 } |
1925 | 1928 |
1926 bool HTMLInputElement::hasFallbackContent() const | 1929 bool HTMLInputElement::hasFallbackContent() const |
1927 { | 1930 { |
1928 return m_inputTypeView->hasFallbackContent(); | 1931 return m_inputTypeView->hasFallbackContent(); |
1929 } | 1932 } |
1930 } // namespace blink | 1933 } // namespace blink |
OLD | NEW |