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

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

Issue 764233002: Ensure layout on replaced elements in anonymous wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/replaced/replaced-element-with-percentage-height-anonymous-block-parent-expected.txt ('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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 { 1536 {
1537 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() 1537 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
1538 || style()->specifiesColumns() || isRenderFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() 1538 || style()->specifiesColumns() || isRenderFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot()
1539 || isDocumentElement() || style()->columnSpan() || isGridItem(); 1539 || isDocumentElement() || style()->columnSpan() || isGridItem();
1540 } 1540 }
1541 1541
1542 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R enderBox& child) 1542 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R enderBox& child)
1543 { 1543 {
1544 // FIXME: Technically percentage height objects only need a relayout if thei r percentage isn't going to be turned into 1544 // FIXME: Technically percentage height objects only need a relayout if thei r percentage isn't going to be turned into
1545 // an auto value. Add a method to determine this, so that we can avoid the r elayout. 1545 // an auto value. Add a method to determine this, so that we can avoid the r elayout.
1546 if (relayoutChildren || (child.hasRelativeLogicalHeight() && !isRenderView() )) 1546 bool hasRelativeLogicalHeight = child.hasRelativeLogicalHeight() || (child.i sAnonymous() && this->hasRelativeLogicalHeight());
1547 if (relayoutChildren || (hasRelativeLogicalHeight && !isRenderView()))
1547 child.setChildNeedsLayout(MarkOnlyThis); 1548 child.setChildNeedsLayout(MarkOnlyThis);
1548 1549
1549 // If relayoutChildren is set and the child has percentage padding or an emb edded content box, we also need to invalidate the childs pref widths. 1550 // If relayoutChildren is set and the child has percentage padding or an emb edded content box, we also need to invalidate the childs pref widths.
1550 if (relayoutChildren && child.needsPreferredWidthsRecalculation()) 1551 if (relayoutChildren && child.needsPreferredWidthsRecalculation())
1551 child.setPreferredLogicalWidthsDirty(MarkOnlyThis); 1552 child.setPreferredLogicalWidthsDirty(MarkOnlyThis);
1552 } 1553 }
1553 1554
1554 void RenderBlock::simplifiedNormalFlowLayout() 1555 void RenderBlock::simplifiedNormalFlowLayout()
1555 { 1556 {
1556 if (childrenInline()) { 1557 if (childrenInline()) {
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 3918 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
3918 { 3919 {
3919 showRenderObject(); 3920 showRenderObject();
3920 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3921 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3921 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3922 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3922 } 3923 }
3923 3924
3924 #endif 3925 #endif
3925 3926
3926 } // namespace blink 3927 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/replaced/replaced-element-with-percentage-height-anonymous-block-parent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698