OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 totalObjects = 0; | 770 totalObjects = 0; |
771 isSubtree = isSubtreeLayout(); | 771 isSubtree = isSubtreeLayout(); |
772 if (isSubtree) | 772 if (isSubtree) |
773 m_layoutSubtreeRootList.countObjectsNeedingLayout(needsLayoutObjects, to
talObjects); | 773 m_layoutSubtreeRootList.countObjectsNeedingLayout(needsLayoutObjects, to
talObjects); |
774 else | 774 else |
775 LayoutSubtreeRootList::countObjectsNeedingLayoutInRoot(layoutView(), nee
dsLayoutObjects, totalObjects); | 775 LayoutSubtreeRootList::countObjectsNeedingLayoutInRoot(layoutView(), nee
dsLayoutObjects, totalObjects); |
776 } | 776 } |
777 | 777 |
778 inline void FrameView::forceLayoutParentViewIfNeeded() | 778 inline void FrameView::forceLayoutParentViewIfNeeded() |
779 { | 779 { |
780 LayoutPart* ownerLayoutObject = m_frame->ownerLayoutObject(); | 780 LayoutPartItem ownerLayoutItem = m_frame->ownerLayoutItem(); |
781 if (!ownerLayoutObject || !ownerLayoutObject->frame()) | 781 if (ownerLayoutItem.isNull() || !ownerLayoutItem.frame()) |
782 return; | 782 return; |
783 | 783 |
784 LayoutReplaced* contentBox = embeddedReplacedContent(); | 784 LayoutReplaced* contentBox = embeddedReplacedContent(); |
785 if (!contentBox) | 785 if (!contentBox) |
786 return; | 786 return; |
787 | 787 |
788 LayoutSVGRoot* svgRoot = toLayoutSVGRoot(contentBox); | 788 LayoutSVGRoot* svgRoot = toLayoutSVGRoot(contentBox); |
789 if (svgRoot->everHadLayout() && !svgRoot->needsLayout()) | 789 if (svgRoot->everHadLayout() && !svgRoot->needsLayout()) |
790 return; | 790 return; |
791 | 791 |
792 // If the embedded SVG document appears the first time, the ownerLayoutObjec
t has already finished | 792 // If the embedded SVG document appears the first time, the ownerLayoutObjec
t has already finished |
793 // layout without knowing about the existence of the embedded SVG document,
because LayoutReplaced | 793 // layout without knowing about the existence of the embedded SVG document,
because LayoutReplaced |
794 // embeddedReplacedContent() returns 0, as long as the embedded document isn
't loaded yet. Before | 794 // embeddedReplacedContent() returns 0, as long as the embedded document isn
't loaded yet. Before |
795 // bothering to lay out the SVG document, mark the ownerLayoutObject needing
layout and ask its | 795 // bothering to lay out the SVG document, mark the ownerLayoutObject needing
layout and ask its |
796 // FrameView for a layout. After that the LayoutEmbeddedObject (ownerLayoutO
bject) carries the | 796 // FrameView for a layout. After that the LayoutEmbeddedObject (ownerLayoutO
bject) carries the |
797 // correct size, which LayoutSVGRoot::computeReplacedLogicalWidth/Height rel
y on, when laying | 797 // correct size, which LayoutSVGRoot::computeReplacedLogicalWidth/Height rel
y on, when laying |
798 // out for the first time, or when the LayoutSVGRoot size has changed dynami
cally (eg. via <script>). | 798 // out for the first time, or when the LayoutSVGRoot size has changed dynami
cally (eg. via <script>). |
799 FrameView* frameView = ownerLayoutObject->frame()->view(); | 799 FrameView* frameView = ownerLayoutItem.frame()->view(); |
800 | 800 |
801 // Mark the owner layoutObject as needing layout. | 801 // Mark the owner layoutObject as needing layout. |
802 ownerLayoutObject->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation
(LayoutInvalidationReason::Unknown); | 802 ownerLayoutItem.setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(La
youtInvalidationReason::Unknown); |
803 | 803 |
804 // Synchronously enter layout, to layout the view containing the host object
/embed/iframe. | 804 // Synchronously enter layout, to layout the view containing the host object
/embed/iframe. |
805 ASSERT(frameView); | 805 ASSERT(frameView); |
806 frameView->layout(); | 806 frameView->layout(); |
807 } | 807 } |
808 | 808 |
809 void FrameView::performPreLayoutTasks() | 809 void FrameView::performPreLayoutTasks() |
810 { | 810 { |
811 TRACE_EVENT0("blink,benchmark", "FrameView::performPreLayoutTasks"); | 811 TRACE_EVENT0("blink,benchmark", "FrameView::performPreLayoutTasks"); |
812 lifecycle().advanceTo(DocumentLifecycle::InPreLayout); | 812 lifecycle().advanceTo(DocumentLifecycle::InPreLayout); |
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4420 } | 4420 } |
4421 | 4421 |
4422 bool FrameView::canThrottleRendering() const | 4422 bool FrameView::canThrottleRendering() const |
4423 { | 4423 { |
4424 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4424 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4425 return false; | 4425 return false; |
4426 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4426 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
4427 } | 4427 } |
4428 | 4428 |
4429 } // namespace blink | 4429 } // namespace blink |
OLD | NEW |