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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 return; | 894 return; |
895 | 895 |
896 RenderBox* contentBox = embeddedContentBox(); | 896 RenderBox* contentBox = embeddedContentBox(); |
897 if (!contentBox) | 897 if (!contentBox) |
898 return; | 898 return; |
899 | 899 |
900 RenderSVGRoot* svgRoot = toRenderSVGRoot(contentBox); | 900 RenderSVGRoot* svgRoot = toRenderSVGRoot(contentBox); |
901 if (!svgRoot->needsSizeNegotiationWithHostDocument()) | 901 if (!svgRoot->needsSizeNegotiationWithHostDocument()) |
902 return; | 902 return; |
903 | 903 |
| 904 RefPtr<FrameView> frameView = ownerRenderer->frame()->view(); |
| 905 |
904 ASSERT(!m_inLayoutParentView); | 906 ASSERT(!m_inLayoutParentView); |
905 TemporarilyChange<bool> resetInLayoutParentView(m_inLayoutParentView, true); | 907 TemporarilyChange<bool> resetInLayoutParentView(m_inLayoutParentView, true); |
906 | 908 |
907 // Clear needs-size-negotiation flag in RenderSVGRoot, so the next call to o
ur | 909 // Clear needs-size-negotiation flag in RenderSVGRoot, so the next call to o
ur |
908 // layout() method won't fire the size negotiation logic again. | 910 // layout() method won't fire the size negotiation logic again. |
909 svgRoot->scheduledSizeNegotiationWithHostDocument(); | 911 svgRoot->scheduledSizeNegotiationWithHostDocument(); |
910 ASSERT(!svgRoot->needsSizeNegotiationWithHostDocument()); | 912 ASSERT(!svgRoot->needsSizeNegotiationWithHostDocument()); |
911 | 913 |
912 // Mark the owner renderer as needing layout. | 914 // Mark the owner renderer as needing layout. |
913 ownerRenderer->setNeedsLayoutAndPrefWidthsRecalc(); | 915 ownerRenderer->setNeedsLayoutAndPrefWidthsRecalc(); |
914 | 916 |
915 // Immediately relayout the child widgets, which can now calculate the SVG d
ocuments | 917 // Immediately relayout the child widgets, which can now calculate the SVG d
ocuments |
916 // intrinsic size, negotiating with the parent object/embed/iframe. | 918 // intrinsic size, negotiating with the parent object/embed/iframe. |
917 RenderView* rootView = ownerRenderer->frame()->contentRenderer(); | 919 RenderView* rootView = ownerRenderer->frame()->contentRenderer(); |
918 ASSERT(rootView); | 920 ASSERT(rootView); |
919 rootView->updateWidgetPositions(); | 921 rootView->updateWidgetPositions(); |
920 | 922 |
921 // Synchronously enter layout, to layout the view containing the host object
/embed/iframe. | 923 // Synchronously enter layout, to layout the view containing the host object
/embed/iframe. |
922 FrameView* frameView = ownerRenderer->frame()->view(); | |
923 ASSERT(frameView); | 924 ASSERT(frameView); |
924 frameView->layout(); | 925 frameView->layout(); |
925 #endif | 926 #endif |
926 } | 927 } |
927 | 928 |
928 void FrameView::layout(bool allowSubtree) | 929 void FrameView::layout(bool allowSubtree) |
929 { | 930 { |
930 if (m_inLayout) | 931 if (m_inLayout) |
931 return; | 932 return; |
932 | 933 |
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3293 } | 3294 } |
3294 | 3295 |
3295 AXObjectCache* FrameView::axObjectCache() const | 3296 AXObjectCache* FrameView::axObjectCache() const |
3296 { | 3297 { |
3297 if (frame() && frame()->document() && frame()->document()->axObjectCacheExis
ts()) | 3298 if (frame() && frame()->document() && frame()->document()->axObjectCacheExis
ts()) |
3298 return frame()->document()->axObjectCache(); | 3299 return frame()->document()->axObjectCache(); |
3299 return 0; | 3300 return 0; |
3300 } | 3301 } |
3301 | 3302 |
3302 } // namespace WebCore | 3303 } // namespace WebCore |
OLD | NEW |