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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi
red) | 489 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi
red) |
490 #ifndef NDEBUG | 490 #ifndef NDEBUG |
491 , m_didDispatchViewportPropertiesChanged(false) | 491 , m_didDispatchViewportPropertiesChanged(false) |
492 #endif | 492 #endif |
493 #if ENABLE(TEMPLATE_ELEMENT) | 493 #if ENABLE(TEMPLATE_ELEMENT) |
494 , m_templateDocumentHost(0) | 494 , m_templateDocumentHost(0) |
495 #endif | 495 #endif |
496 #if ENABLE(FONT_LOAD_EVENTS) | 496 #if ENABLE(FONT_LOAD_EVENTS) |
497 , m_fontloader(0) | 497 , m_fontloader(0) |
498 #endif | 498 #endif |
499 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT
imerFired) | |
500 { | 499 { |
501 m_printing = false; | 500 m_printing = false; |
502 m_paginatedForScreen = false; | 501 m_paginatedForScreen = false; |
503 | 502 |
504 m_ignoreAutofocus = false; | 503 m_ignoreAutofocus = false; |
505 | 504 |
506 m_frame = frame; | 505 m_frame = frame; |
507 if (m_frame) | 506 if (m_frame) |
508 provideContextFeaturesToDocumentFrom(this, m_frame->page()); | 507 provideContextFeaturesToDocumentFrom(this, m_frame->page()); |
509 | 508 |
(...skipping 5643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6153 | 6152 |
6154 #if ENABLE(FONT_LOAD_EVENTS) | 6153 #if ENABLE(FONT_LOAD_EVENTS) |
6155 PassRefPtr<FontLoader> Document::fontloader() | 6154 PassRefPtr<FontLoader> Document::fontloader() |
6156 { | 6155 { |
6157 if (!m_fontloader) | 6156 if (!m_fontloader) |
6158 m_fontloader = FontLoader::create(this); | 6157 m_fontloader = FontLoader::create(this); |
6159 return m_fontloader; | 6158 return m_fontloader; |
6160 } | 6159 } |
6161 #endif | 6160 #endif |
6162 | 6161 |
6163 void Document::didAssociateFormControl(Element* element) | |
6164 { | |
6165 if (!frame() || !frame()->page() || !frame()->page()->chrome()->client()->sh
ouldNotifyOnFormChanges()) | |
6166 return; | |
6167 m_associatedFormControls.add(element); | |
6168 if (!m_didAssociateFormControlsTimer.isActive()) | |
6169 m_didAssociateFormControlsTimer.startOneShot(0); | |
6170 } | |
6171 | |
6172 void Document::didAssociateFormControlsTimerFired(Timer<Document>* timer) | |
6173 { | |
6174 ASSERT_UNUSED(timer, timer == &m_didAssociateFormControlsTimer); | |
6175 if (!frame() || !frame()->page()) | |
6176 return; | |
6177 | |
6178 Vector<Element*> associatedFormControls; | |
6179 copyToVector(m_associatedFormControls, associatedFormControls); | |
6180 | |
6181 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); | |
6182 m_associatedFormControls.clear(); | |
6183 } | |
6184 | |
6185 } // namespace WebCore | 6162 } // namespace WebCore |
OLD | NEW |