| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 #include "core/frame/DOMTimer.h" | 140 #include "core/frame/DOMTimer.h" |
| 141 #include "core/frame/DOMVisualViewport.h" | 141 #include "core/frame/DOMVisualViewport.h" |
| 142 #include "core/frame/EventHandlerRegistry.h" | 142 #include "core/frame/EventHandlerRegistry.h" |
| 143 #include "core/frame/FrameConsole.h" | 143 #include "core/frame/FrameConsole.h" |
| 144 #include "core/frame/FrameHost.h" | 144 #include "core/frame/FrameHost.h" |
| 145 #include "core/frame/FrameView.h" | 145 #include "core/frame/FrameView.h" |
| 146 #include "core/frame/History.h" | 146 #include "core/frame/History.h" |
| 147 #include "core/frame/HostsUsingFeatures.h" | 147 #include "core/frame/HostsUsingFeatures.h" |
| 148 #include "core/frame/LocalDOMWindow.h" | 148 #include "core/frame/LocalDOMWindow.h" |
| 149 #include "core/frame/LocalFrame.h" | 149 #include "core/frame/LocalFrame.h" |
| 150 #include "core/frame/PerformanceMonitor.h" |
| 150 #include "core/frame/Settings.h" | 151 #include "core/frame/Settings.h" |
| 151 #include "core/frame/csp/ContentSecurityPolicy.h" | 152 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 152 #include "core/html/DocumentNameCollection.h" | 153 #include "core/html/DocumentNameCollection.h" |
| 153 #include "core/html/HTMLAllCollection.h" | 154 #include "core/html/HTMLAllCollection.h" |
| 154 #include "core/html/HTMLAnchorElement.h" | 155 #include "core/html/HTMLAnchorElement.h" |
| 155 #include "core/html/HTMLBaseElement.h" | 156 #include "core/html/HTMLBaseElement.h" |
| 156 #include "core/html/HTMLBodyElement.h" | 157 #include "core/html/HTMLBodyElement.h" |
| 157 #include "core/html/HTMLCanvasElement.h" | 158 #include "core/html/HTMLCanvasElement.h" |
| 158 #include "core/html/HTMLCollection.h" | 159 #include "core/html/HTMLCollection.h" |
| 159 #include "core/html/HTMLDialogElement.h" | 160 #include "core/html/HTMLDialogElement.h" |
| (...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 // script. Kill the whole layoutObject if someone managed to get into here in | 1864 // script. Kill the whole layoutObject if someone managed to get into here in |
| 1864 // states not allowing tree mutations. | 1865 // states not allowing tree mutations. |
| 1865 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); | 1866 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); |
| 1866 | 1867 |
| 1867 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", | 1868 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", |
| 1868 InspectorRecalculateStylesEvent::data(frame())); | 1869 InspectorRecalculateStylesEvent::data(frame())); |
| 1869 | 1870 |
| 1870 unsigned startElementCount = styleEngine().styleForElementCount(); | 1871 unsigned startElementCount = styleEngine().styleForElementCount(); |
| 1871 | 1872 |
| 1872 InspectorInstrumentation::willRecalculateStyle(this); | 1873 InspectorInstrumentation::willRecalculateStyle(this); |
| 1874 PerformanceMonitor::willRecalculateStyle(this); |
| 1873 | 1875 |
| 1874 DocumentAnimations::updateAnimationTimingIfNeeded(*this); | 1876 DocumentAnimations::updateAnimationTimingIfNeeded(*this); |
| 1875 evaluateMediaQueryListIfNeeded(); | 1877 evaluateMediaQueryListIfNeeded(); |
| 1876 updateUseShadowTreesIfNeeded(); | 1878 updateUseShadowTreesIfNeeded(); |
| 1877 updateDistribution(); | 1879 updateDistribution(); |
| 1878 updateStyleInvalidationIfNeeded(); | 1880 updateStyleInvalidationIfNeeded(); |
| 1879 | 1881 |
| 1880 // FIXME: We should update style on our ancestor chain before proceeding | 1882 // FIXME: We should update style on our ancestor chain before proceeding |
| 1881 // however doing so currently causes several tests to crash, as | 1883 // however doing so currently causes several tests to crash, as |
| 1882 // LocalFrame::setDocument calls Document::attach before setting the | 1884 // LocalFrame::setDocument calls Document::attach before setting the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1907 unsigned elementCount = | 1909 unsigned elementCount = |
| 1908 styleEngine().styleForElementCount() - startElementCount; | 1910 styleEngine().styleForElementCount() - startElementCount; |
| 1909 | 1911 |
| 1910 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", | 1912 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", |
| 1911 "elementCount", elementCount); | 1913 "elementCount", elementCount); |
| 1912 | 1914 |
| 1913 #if DCHECK_IS_ON() | 1915 #if DCHECK_IS_ON() |
| 1914 assertLayoutTreeUpdated(*this); | 1916 assertLayoutTreeUpdated(*this); |
| 1915 #endif | 1917 #endif |
| 1916 InspectorInstrumentation::didRecalculateStyle(this); | 1918 InspectorInstrumentation::didRecalculateStyle(this); |
| 1919 PerformanceMonitor::didRecalculateStyle(this); |
| 1917 } | 1920 } |
| 1918 | 1921 |
| 1919 void Document::updateStyle() { | 1922 void Document::updateStyle() { |
| 1920 DCHECK(!view()->shouldThrottleRendering()); | 1923 DCHECK(!view()->shouldThrottleRendering()); |
| 1921 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); | 1924 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); |
| 1922 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime"); | 1925 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime"); |
| 1923 | 1926 |
| 1924 unsigned initialElementCount = styleEngine().styleForElementCount(); | 1927 unsigned initialElementCount = styleEngine().styleForElementCount(); |
| 1925 | 1928 |
| 1926 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; | 1929 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; |
| (...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6475 } | 6478 } |
| 6476 | 6479 |
| 6477 void showLiveDocumentInstances() { | 6480 void showLiveDocumentInstances() { |
| 6478 WeakDocumentSet& set = liveDocumentSet(); | 6481 WeakDocumentSet& set = liveDocumentSet(); |
| 6479 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6482 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6480 for (Document* document : set) | 6483 for (Document* document : set) |
| 6481 fprintf(stderr, "- Document %p URL: %s\n", document, | 6484 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6482 document->url().getString().utf8().data()); | 6485 document->url().getString().utf8().data()); |
| 6483 } | 6486 } |
| 6484 #endif | 6487 #endif |
| OLD | NEW |