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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 | 777 |
778 RenderBox* contentBox = embeddedContentBox(); | 778 RenderBox* contentBox = embeddedContentBox(); |
779 if (!contentBox) | 779 if (!contentBox) |
780 return; | 780 return; |
781 | 781 |
782 RenderSVGRoot* svgRoot = toRenderSVGRoot(contentBox); | 782 RenderSVGRoot* svgRoot = toRenderSVGRoot(contentBox); |
783 if (svgRoot->everHadLayout() && !svgRoot->needsLayout()) | 783 if (svgRoot->everHadLayout() && !svgRoot->needsLayout()) |
784 return; | 784 return; |
785 | 785 |
786 // If the embedded SVG document appears the first time, the ownerRenderer ha
s already finished | 786 // If the embedded SVG document appears the first time, the ownerRenderer ha
s already finished |
787 // layout without knowing about the existence of the embedded SVG document,
because RenderReplaced | 787 // layout without knowing about the existence of the embedded SVG document,
because LayoutReplaced |
788 // embeddedContentBox() returns 0, as long as the embedded document isn't lo
aded yet. Before | 788 // embeddedContentBox() returns 0, as long as the embedded document isn't lo
aded yet. Before |
789 // bothering to lay out the SVG document, mark the ownerRenderer needing lay
out and ask its | 789 // bothering to lay out the SVG document, mark the ownerRenderer needing lay
out and ask its |
790 // FrameView for a layout. After that the RenderEmbeddedObject (ownerRendere
r) carries the | 790 // FrameView for a layout. After that the RenderEmbeddedObject (ownerRendere
r) carries the |
791 // correct size, which RenderSVGRoot::computeReplacedLogicalWidth/Height rel
y on, when laying | 791 // correct size, which RenderSVGRoot::computeReplacedLogicalWidth/Height rel
y on, when laying |
792 // out for the first time, or when the RenderSVGRoot size has changed dynami
cally (eg. via <script>). | 792 // out for the first time, or when the RenderSVGRoot size has changed dynami
cally (eg. via <script>). |
793 RefPtrWillBeRawPtr<FrameView> frameView = ownerRenderer->frame()->view(); | 793 RefPtrWillBeRawPtr<FrameView> frameView = ownerRenderer->frame()->view(); |
794 | 794 |
795 // Mark the owner renderer as needing layout. | 795 // Mark the owner renderer as needing layout. |
796 ownerRenderer->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 796 ownerRenderer->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
797 | 797 |
(...skipping 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4051 { | 4051 { |
4052 Settings* settings = frame().settings(); | 4052 Settings* settings = frame().settings(); |
4053 if (!settings || !settings->rootLayerScrolls()) | 4053 if (!settings || !settings->rootLayerScrolls()) |
4054 return this; | 4054 return this; |
4055 | 4055 |
4056 RenderView* renderView = this->renderView(); | 4056 RenderView* renderView = this->renderView(); |
4057 return renderView ? renderView->scrollableArea() : nullptr; | 4057 return renderView ? renderView->scrollableArea() : nullptr; |
4058 } | 4058 } |
4059 | 4059 |
4060 } // namespace blink | 4060 } // namespace blink |
OLD | NEW |