| 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 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 // script. Kill the whole layoutObject if someone managed to get into here in | 1865 // script. Kill the whole layoutObject if someone managed to get into here in |
| 1865 // states not allowing tree mutations. | 1866 // states not allowing tree mutations. |
| 1866 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); | 1867 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); |
| 1867 | 1868 |
| 1868 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", | 1869 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", |
| 1869 InspectorRecalculateStylesEvent::data(frame())); | 1870 InspectorRecalculateStylesEvent::data(frame())); |
| 1870 | 1871 |
| 1871 unsigned startElementCount = styleEngine().styleForElementCount(); | 1872 unsigned startElementCount = styleEngine().styleForElementCount(); |
| 1872 | 1873 |
| 1873 InspectorInstrumentation::willRecalculateStyle(this); | 1874 InspectorInstrumentation::willRecalculateStyle(this); |
| 1875 PerformanceMonitor::willRecalculateStyle(this); |
| 1874 | 1876 |
| 1875 DocumentAnimations::updateAnimationTimingIfNeeded(*this); | 1877 DocumentAnimations::updateAnimationTimingIfNeeded(*this); |
| 1876 evaluateMediaQueryListIfNeeded(); | 1878 evaluateMediaQueryListIfNeeded(); |
| 1877 updateUseShadowTreesIfNeeded(); | 1879 updateUseShadowTreesIfNeeded(); |
| 1878 updateDistribution(); | 1880 updateDistribution(); |
| 1879 updateStyleInvalidationIfNeeded(); | 1881 updateStyleInvalidationIfNeeded(); |
| 1880 | 1882 |
| 1881 // FIXME: We should update style on our ancestor chain before proceeding | 1883 // FIXME: We should update style on our ancestor chain before proceeding |
| 1882 // however doing so currently causes several tests to crash, as | 1884 // however doing so currently causes several tests to crash, as |
| 1883 // LocalFrame::setDocument calls Document::attach before setting the | 1885 // LocalFrame::setDocument calls Document::attach before setting the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1908 unsigned elementCount = | 1910 unsigned elementCount = |
| 1909 styleEngine().styleForElementCount() - startElementCount; | 1911 styleEngine().styleForElementCount() - startElementCount; |
| 1910 | 1912 |
| 1911 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", | 1913 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", |
| 1912 "elementCount", elementCount); | 1914 "elementCount", elementCount); |
| 1913 | 1915 |
| 1914 #if DCHECK_IS_ON() | 1916 #if DCHECK_IS_ON() |
| 1915 assertLayoutTreeUpdated(*this); | 1917 assertLayoutTreeUpdated(*this); |
| 1916 #endif | 1918 #endif |
| 1917 InspectorInstrumentation::didRecalculateStyle(this); | 1919 InspectorInstrumentation::didRecalculateStyle(this); |
| 1920 PerformanceMonitor::didRecalculateStyle(this); |
| 1918 } | 1921 } |
| 1919 | 1922 |
| 1920 void Document::updateStyle() { | 1923 void Document::updateStyle() { |
| 1921 DCHECK(!view()->shouldThrottleRendering()); | 1924 DCHECK(!view()->shouldThrottleRendering()); |
| 1922 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); | 1925 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); |
| 1923 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime"); | 1926 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime"); |
| 1924 | 1927 |
| 1925 unsigned initialElementCount = styleEngine().styleForElementCount(); | 1928 unsigned initialElementCount = styleEngine().styleForElementCount(); |
| 1926 | 1929 |
| 1927 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; | 1930 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; |
| (...skipping 4549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6477 } | 6480 } |
| 6478 | 6481 |
| 6479 void showLiveDocumentInstances() { | 6482 void showLiveDocumentInstances() { |
| 6480 WeakDocumentSet& set = liveDocumentSet(); | 6483 WeakDocumentSet& set = liveDocumentSet(); |
| 6481 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6484 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6482 for (Document* document : set) | 6485 for (Document* document : set) |
| 6483 fprintf(stderr, "- Document %p URL: %s\n", document, | 6486 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6484 document->url().getString().utf8().data()); | 6487 document->url().getString().utf8().data()); |
| 6485 } | 6488 } |
| 6486 #endif | 6489 #endif |
| OLD | NEW |