Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 18180008: Fix SVG relayout problem that occurs when only the viewport height changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/svg/as-image/same-source-different-height-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView || width () != viewWidth() || height() != viewHeight()); 262 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView || width () != viewWidth() || height() != viewHeight());
263 if (relayoutChildren) { 263 if (relayoutChildren) {
264 setChildNeedsLayout(true, MarkOnlyThis); 264 setChildNeedsLayout(true, MarkOnlyThis);
265 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { 265 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) {
266 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight( )) 266 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight( ))
267 || child->style()->logicalHeight().isPercent() 267 || child->style()->logicalHeight().isPercent()
268 || child->style()->logicalMinHeight().isPercent() 268 || child->style()->logicalMinHeight().isPercent()
269 || child->style()->logicalMaxHeight().isPercent() 269 || child->style()->logicalMaxHeight().isPercent()
270 || child->style()->logicalHeight().isViewportPercentage() 270 || child->style()->logicalHeight().isViewportPercentage()
271 || child->style()->logicalMinHeight().isViewportPercentage() 271 || child->style()->logicalMinHeight().isViewportPercentage()
272 || child->style()->logicalMaxHeight().isViewportPercentage() ) 272 || child->style()->logicalMaxHeight().isViewportPercentage()
273 || child->isSVGRoot())
273 child->setChildNeedsLayout(true, MarkOnlyThis); 274 child->setChildNeedsLayout(true, MarkOnlyThis);
274 } 275 }
275 } 276 }
276 277
277 ASSERT(!m_layoutState); 278 ASSERT(!m_layoutState);
278 if (!needsLayout()) 279 if (!needsLayout())
279 return; 280 return;
280 281
281 LayoutState state; 282 LayoutState state;
282 bool isSeamlessAncestorInFlowThread = initializeLayoutState(state); 283 bool isSeamlessAncestorInFlowThread = initializeLayoutState(state);
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 #endif 1143 #endif
1143 1144
1144 if (layoutState) 1145 if (layoutState)
1145 layoutState->m_isPaginated = m_fragmenting; 1146 layoutState->m_isPaginated = m_fragmenting;
1146 1147
1147 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1148 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1148 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1149 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1149 } 1150 }
1150 1151
1151 } // namespace WebCore 1152 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/svg/as-image/same-source-different-height-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698