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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 return false; | 1524 return false; |
1525 return true; | 1525 return true; |
1526 } | 1526 } |
1527 | 1527 |
1528 void Document::scheduleLayoutTreeUpdate() | 1528 void Document::scheduleLayoutTreeUpdate() |
1529 { | 1529 { |
1530 ASSERT(!hasPendingStyleRecalc()); | 1530 ASSERT(!hasPendingStyleRecalc()); |
1531 ASSERT(shouldScheduleLayoutTreeUpdate()); | 1531 ASSERT(shouldScheduleLayoutTreeUpdate()); |
1532 ASSERT(needsLayoutTreeUpdate()); | 1532 ASSERT(needsLayoutTreeUpdate()); |
1533 | 1533 |
1534 page()->animator().scheduleVisualUpdate(); | 1534 if (!view() || !view()->shouldThrottleRenderingPipeline()) |
| 1535 page()->animator().scheduleVisualUpdate(); |
1535 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending); | 1536 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending); |
1536 | 1537 |
1537 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu
leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty
lesEvent::data(frame())); | 1538 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu
leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty
lesEvent::data(frame())); |
1538 InspectorInstrumentation::didScheduleStyleRecalculation(this); | 1539 InspectorInstrumentation::didScheduleStyleRecalculation(this); |
1539 | 1540 |
1540 ++m_styleVersion; | 1541 ++m_styleVersion; |
1541 } | 1542 } |
1542 | 1543 |
1543 bool Document::hasPendingForcedStyleRecalc() const | 1544 bool Document::hasPendingForcedStyleRecalc() const |
1544 { | 1545 { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", "elementCoun
t", m_styleRecalcElementCounter); | 1782 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", "elementCoun
t", m_styleRecalcElementCounter); |
1782 InspectorInstrumentation::didRecalculateStyle(cookie, m_styleRecalcElementCo
unter); | 1783 InspectorInstrumentation::didRecalculateStyle(cookie, m_styleRecalcElementCo
unter); |
1783 | 1784 |
1784 #if ENABLE(ASSERT) | 1785 #if ENABLE(ASSERT) |
1785 assertLayoutTreeUpdated(*this); | 1786 assertLayoutTreeUpdated(*this); |
1786 #endif | 1787 #endif |
1787 } | 1788 } |
1788 | 1789 |
1789 void Document::updateStyle(StyleRecalcChange change) | 1790 void Document::updateStyle(StyleRecalcChange change) |
1790 { | 1791 { |
| 1792 if (view() && view()->shouldThrottleStyleLayoutAndCompositingUpdates()) |
| 1793 return; |
| 1794 |
1791 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); | 1795 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); |
1792 unsigned initialResolverAccessCount = styleEngine().resolverAccessCount(); | 1796 unsigned initialResolverAccessCount = styleEngine().resolverAccessCount(); |
1793 | 1797 |
1794 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; | 1798 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; |
1795 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc); | 1799 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc); |
1796 | 1800 |
1797 NthIndexCache nthIndexCache(*this); | 1801 NthIndexCache nthIndexCache(*this); |
1798 | 1802 |
1799 if (styleChangeType() >= SubtreeStyleChange) | 1803 if (styleChangeType() >= SubtreeStyleChange) |
1800 change = Force; | 1804 change = Force; |
(...skipping 3971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 #ifndef NDEBUG | 5776 #ifndef NDEBUG |
5773 using namespace blink; | 5777 using namespace blink; |
5774 void showLiveDocumentInstances() | 5778 void showLiveDocumentInstances() |
5775 { | 5779 { |
5776 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5780 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5777 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5781 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5778 for (Document* document : set) | 5782 for (Document* document : set) |
5779 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5783 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5780 } | 5784 } |
5781 #endif | 5785 #endif |
OLD | NEW |