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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
478 , m_isViewSource(false) | 478 , m_isViewSource(false) |
479 , m_sawElementsInKnownNamespaces(false) | 479 , m_sawElementsInKnownNamespaces(false) |
480 , m_isSrcdocDocument(false) | 480 , m_isSrcdocDocument(false) |
481 , m_isMobileDocument(false) | 481 , m_isMobileDocument(false) |
482 , m_renderView(0) | 482 , m_renderView(0) |
483 , m_weakFactory(this) | 483 , m_weakFactory(this) |
484 , m_contextDocument(initializer.contextDocument()) | 484 , m_contextDocument(initializer.contextDocument()) |
485 , m_hasFullscreenElementStack(false) | 485 , m_hasFullscreenElementStack(false) |
486 , m_loadEventDelayCount(0) | 486 , m_loadEventDelayCount(0) |
487 , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired) | 487 , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired) |
488 , m_pluginLoadingTimer(this, &Document::pluginLoadingTimerFired) | |
488 , m_didSetReferrerPolicy(false) | 489 , m_didSetReferrerPolicy(false) |
489 , m_referrerPolicy(ReferrerPolicyDefault) | 490 , m_referrerPolicy(ReferrerPolicyDefault) |
490 , m_directionSetOnDocumentElement(false) | 491 , m_directionSetOnDocumentElement(false) |
491 , m_writingModeSetOnDocumentElement(false) | 492 , m_writingModeSetOnDocumentElement(false) |
492 , m_writeRecursionIsTooDeep(false) | 493 , m_writeRecursionIsTooDeep(false) |
493 , m_writeRecursionDepth(0) | 494 , m_writeRecursionDepth(0) |
494 , m_lastHandledUserGestureTimestamp(0) | 495 , m_lastHandledUserGestureTimestamp(0) |
495 , m_taskRunner(MainThreadTaskRunner::create(this)) | 496 , m_taskRunner(MainThreadTaskRunner::create(this)) |
496 , m_registrationContext(initializer.registrationContext(this)) | 497 , m_registrationContext(initializer.registrationContext(this)) |
497 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi red) | 498 , m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFi red) |
(...skipping 4413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4911 if (frame() && !m_loadEventDelayCount && !m_loadEventDelayTimer.isActive()) | 4912 if (frame() && !m_loadEventDelayCount && !m_loadEventDelayTimer.isActive()) |
4912 m_loadEventDelayTimer.startOneShot(0); | 4913 m_loadEventDelayTimer.startOneShot(0); |
4913 } | 4914 } |
4914 | 4915 |
4915 void Document::loadEventDelayTimerFired(Timer<Document>*) | 4916 void Document::loadEventDelayTimerFired(Timer<Document>*) |
4916 { | 4917 { |
4917 if (frame()) | 4918 if (frame()) |
4918 frame()->loader().checkCompleted(); | 4919 frame()->loader().checkCompleted(); |
4919 } | 4920 } |
4920 | 4921 |
4922 void Document::loadPluginsSoon() | |
4923 { | |
4924 // FIXME: Remove this timer once we don't need to compute layout to load plu gins. | |
4925 if (!m_pluginLoadingTimer.isActive()) | |
4926 m_pluginLoadingTimer.startOneShot(0); | |
4927 } | |
4928 | |
4929 void Document::pluginLoadingTimerFired(Timer<Document>*) | |
4930 { | |
4931 if (!frame()) | |
4932 return; | |
4933 if (FrameView* view = frame()->view()) { | |
4934 if (view->needsLayout()) | |
4935 view->layout(); | |
4936 } | |
4937 } | |
abarth-chromium
2014/02/04 23:26:38
Ojan, would you be willing to review this addition
| |
4938 | |
4921 ScriptedAnimationController& Document::ensureScriptedAnimationController() | 4939 ScriptedAnimationController& Document::ensureScriptedAnimationController() |
4922 { | 4940 { |
4923 if (!m_scriptedAnimationController) { | 4941 if (!m_scriptedAnimationController) { |
4924 m_scriptedAnimationController = ScriptedAnimationController::create(this ); | 4942 m_scriptedAnimationController = ScriptedAnimationController::create(this ); |
4925 // We need to make sure that we don't start up the animation controller on a background tab, for example. | 4943 // We need to make sure that we don't start up the animation controller on a background tab, for example. |
4926 if (!page()) | 4944 if (!page()) |
4927 m_scriptedAnimationController->suspend(); | 4945 m_scriptedAnimationController->suspend(); |
4928 } | 4946 } |
4929 return *m_scriptedAnimationController; | 4947 return *m_scriptedAnimationController; |
4930 } | 4948 } |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5427 void Document::defaultEventHandler(Event* event) | 5445 void Document::defaultEventHandler(Event* event) |
5428 { | 5446 { |
5429 if (frame() && frame()->remotePlatformLayer()) { | 5447 if (frame() && frame()->remotePlatformLayer()) { |
5430 frame()->chromeClient().forwardInputEvent(this, event); | 5448 frame()->chromeClient().forwardInputEvent(this, event); |
5431 return; | 5449 return; |
5432 } | 5450 } |
5433 Node::defaultEventHandler(event); | 5451 Node::defaultEventHandler(event); |
5434 } | 5452 } |
5435 | 5453 |
5436 } // namespace WebCore | 5454 } // namespace WebCore |
OLD | NEW |