| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 #include "sky/engine/core/loader/FrameLoaderClient.h" | 120 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 121 #include "sky/engine/core/loader/ImageLoader.h" | 121 #include "sky/engine/core/loader/ImageLoader.h" |
| 122 #include "sky/engine/core/page/Chrome.h" | 122 #include "sky/engine/core/page/Chrome.h" |
| 123 #include "sky/engine/core/page/ChromeClient.h" | 123 #include "sky/engine/core/page/ChromeClient.h" |
| 124 #include "sky/engine/core/page/EventHandler.h" | 124 #include "sky/engine/core/page/EventHandler.h" |
| 125 #include "sky/engine/core/page/EventWithHitTestResults.h" | 125 #include "sky/engine/core/page/EventWithHitTestResults.h" |
| 126 #include "sky/engine/core/page/FocusController.h" | 126 #include "sky/engine/core/page/FocusController.h" |
| 127 #include "sky/engine/core/page/Page.h" | 127 #include "sky/engine/core/page/Page.h" |
| 128 #include "sky/engine/core/rendering/HitTestResult.h" | 128 #include "sky/engine/core/rendering/HitTestResult.h" |
| 129 #include "sky/engine/core/rendering/RenderView.h" | 129 #include "sky/engine/core/rendering/RenderView.h" |
| 130 #include "sky/engine/core/rendering/compositing/RenderLayerCompositor.h" | |
| 131 #include "sky/engine/platform/DateComponents.h" | 130 #include "sky/engine/platform/DateComponents.h" |
| 132 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 131 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 133 #include "sky/engine/platform/Language.h" | 132 #include "sky/engine/platform/Language.h" |
| 134 #include "sky/engine/platform/Logging.h" | 133 #include "sky/engine/platform/Logging.h" |
| 135 #include "sky/engine/platform/ScriptForbiddenScope.h" | 134 #include "sky/engine/platform/ScriptForbiddenScope.h" |
| 136 #include "sky/engine/platform/TraceEvent.h" | 135 #include "sky/engine/platform/TraceEvent.h" |
| 137 #include "sky/engine/platform/network/HTTPParsers.h" | 136 #include "sky/engine/platform/network/HTTPParsers.h" |
| 138 #include "sky/engine/platform/scroll/Scrollbar.h" | 137 #include "sky/engine/platform/scroll/Scrollbar.h" |
| 139 #include "sky/engine/platform/text/SegmentedString.h" | 138 #include "sky/engine/platform/text/SegmentedString.h" |
| 140 #include "sky/engine/platform/weborigin/SchemeRegistry.h" | 139 #include "sky/engine/platform/weborigin/SchemeRegistry.h" |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 m_styleEngine->clearResolver(); | 1251 m_styleEngine->clearResolver(); |
| 1253 } | 1252 } |
| 1254 | 1253 |
| 1255 void Document::attach(const AttachContext& context) | 1254 void Document::attach(const AttachContext& context) |
| 1256 { | 1255 { |
| 1257 ASSERT(m_lifecycle.state() == DocumentLifecycle::Inactive); | 1256 ASSERT(m_lifecycle.state() == DocumentLifecycle::Inactive); |
| 1258 | 1257 |
| 1259 m_renderView = new RenderView(this); | 1258 m_renderView = new RenderView(this); |
| 1260 setRenderer(m_renderView); | 1259 setRenderer(m_renderView); |
| 1261 | 1260 |
| 1262 m_renderView->setIsInWindow(true); | |
| 1263 m_renderView->setStyle(StyleResolver::styleForDocument(*this)); | 1261 m_renderView->setStyle(StyleResolver::styleForDocument(*this)); |
| 1264 m_renderView->compositor()->setNeedsCompositingUpdate(CompositingUpdateAfter
CompositingInputChange); | |
| 1265 | 1262 |
| 1266 ContainerNode::attach(context); | 1263 ContainerNode::attach(context); |
| 1267 | 1264 |
| 1268 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean); | 1265 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean); |
| 1269 } | 1266 } |
| 1270 | 1267 |
| 1271 void Document::detach(const AttachContext& context) | 1268 void Document::detach(const AttachContext& context) |
| 1272 { | 1269 { |
| 1273 ASSERT(isActive()); | 1270 ASSERT(isActive()); |
| 1274 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); | 1271 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); |
| 1275 | 1272 |
| 1276 if (page()) | 1273 if (page()) |
| 1277 page()->documentDetached(this); | 1274 page()->documentDetached(this); |
| 1278 | 1275 |
| 1279 stopActiveDOMObjects(); | 1276 stopActiveDOMObjects(); |
| 1280 | 1277 |
| 1281 // FIXME: consider using ActiveDOMObject. | 1278 // FIXME: consider using ActiveDOMObject. |
| 1282 if (m_scriptedAnimationController) | 1279 if (m_scriptedAnimationController) |
| 1283 m_scriptedAnimationController->clearDocumentPointer(); | 1280 m_scriptedAnimationController->clearDocumentPointer(); |
| 1284 m_scriptedAnimationController.clear(); | 1281 m_scriptedAnimationController.clear(); |
| 1285 | 1282 |
| 1286 // FIXME: This shouldn't be needed once LocalDOMWindow becomes ExecutionCont
ext. | 1283 // FIXME: This shouldn't be needed once LocalDOMWindow becomes ExecutionCont
ext. |
| 1287 if (m_domWindow) | 1284 if (m_domWindow) |
| 1288 m_domWindow->clearEventQueue(); | 1285 m_domWindow->clearEventQueue(); |
| 1289 | 1286 |
| 1290 if (m_renderView) | |
| 1291 m_renderView->setIsInWindow(false); | |
| 1292 | |
| 1293 m_hoverNode = nullptr; | 1287 m_hoverNode = nullptr; |
| 1294 m_focusedElement = nullptr; | 1288 m_focusedElement = nullptr; |
| 1295 m_activeHoverElement = nullptr; | 1289 m_activeHoverElement = nullptr; |
| 1296 | 1290 |
| 1297 m_renderView = 0; | 1291 m_renderView = 0; |
| 1298 ContainerNode::detach(context); | 1292 ContainerNode::detach(context); |
| 1299 | 1293 |
| 1300 m_styleEngine->didDetach(); | 1294 m_styleEngine->didDetach(); |
| 1301 | 1295 |
| 1302 // This is required, as our LocalFrame might delete itself as soon as it det
aches | 1296 // This is required, as our LocalFrame might delete itself as soon as it det
aches |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 | 1719 |
| 1726 m_styleEngine->resolverChanged(updateMode); | 1720 m_styleEngine->resolverChanged(updateMode); |
| 1727 | 1721 |
| 1728 if (didLayoutWithPendingStylesheets()) { | 1722 if (didLayoutWithPendingStylesheets()) { |
| 1729 // We need to manually repaint because we avoid doing all repaints in la
yout or style | 1723 // We need to manually repaint because we avoid doing all repaints in la
yout or style |
| 1730 // recalc while sheets are still loading to avoid FOUC. | 1724 // recalc while sheets are still loading to avoid FOUC. |
| 1731 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; | 1725 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; |
| 1732 | 1726 |
| 1733 ASSERT(renderView() || importsController()); | 1727 ASSERT(renderView() || importsController()); |
| 1734 if (renderView()) | 1728 if (renderView()) |
| 1735 renderView()->invalidatePaintForViewAndCompositedLayers(); | 1729 renderView()->setShouldDoFullPaintInvalidation(true); |
| 1736 } | 1730 } |
| 1737 } | 1731 } |
| 1738 | 1732 |
| 1739 void Document::styleResolverMayHaveChanged() | 1733 void Document::styleResolverMayHaveChanged() |
| 1740 { | 1734 { |
| 1741 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); | 1735 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); |
| 1742 } | 1736 } |
| 1743 | 1737 |
| 1744 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) | 1738 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) |
| 1745 { | 1739 { |
| (...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2804 using namespace blink; | 2798 using namespace blink; |
| 2805 void showLiveDocumentInstances() | 2799 void showLiveDocumentInstances() |
| 2806 { | 2800 { |
| 2807 WeakDocumentSet& set = liveDocumentSet(); | 2801 WeakDocumentSet& set = liveDocumentSet(); |
| 2808 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 2802 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 2809 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 2803 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 2810 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 2804 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 2811 } | 2805 } |
| 2812 } | 2806 } |
| 2813 #endif | 2807 #endif |
| OLD | NEW |