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

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

Issue 129873004: RenderBlock::isSelfCollapsingBlock() should only be used when an object does not require layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update Created 6 years, 11 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 | Annotate | Revision Log
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "core/rendering/PaintInfo.h" 48 #include "core/rendering/PaintInfo.h"
49 #include "core/rendering/RenderCombineText.h" 49 #include "core/rendering/RenderCombineText.h"
50 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 50 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
51 #include "core/rendering/RenderFlexibleBox.h" 51 #include "core/rendering/RenderFlexibleBox.h"
52 #include "core/rendering/RenderInline.h" 52 #include "core/rendering/RenderInline.h"
53 #include "core/rendering/RenderLayer.h" 53 #include "core/rendering/RenderLayer.h"
54 #include "core/rendering/RenderMarquee.h" 54 #include "core/rendering/RenderMarquee.h"
55 #include "core/rendering/RenderNamedFlowThread.h" 55 #include "core/rendering/RenderNamedFlowThread.h"
56 #include "core/rendering/RenderRegion.h" 56 #include "core/rendering/RenderRegion.h"
57 #include "core/rendering/RenderTableCell.h" 57 #include "core/rendering/RenderTableCell.h"
58 #include "core/rendering/RenderTextControl.h"
58 #include "core/rendering/RenderTextFragment.h" 59 #include "core/rendering/RenderTextFragment.h"
59 #include "core/rendering/RenderTheme.h" 60 #include "core/rendering/RenderTheme.h"
60 #include "core/rendering/RenderView.h" 61 #include "core/rendering/RenderView.h"
61 #include "core/rendering/shapes/ShapeOutsideInfo.h" 62 #include "core/rendering/shapes/ShapeOutsideInfo.h"
62 #include "core/rendering/style/ContentData.h" 63 #include "core/rendering/style/ContentData.h"
63 #include "core/rendering/style/RenderStyle.h" 64 #include "core/rendering/style/RenderStyle.h"
64 #include "platform/geometry/FloatQuad.h" 65 #include "platform/geometry/FloatQuad.h"
65 #include "platform/geometry/TransformState.h" 66 #include "platform/geometry/TransformState.h"
66 #include "platform/graphics/GraphicsContextStateSaver.h" 67 #include "platform/graphics/GraphicsContextStateSaver.h"
67 #include "wtf/StdLibExtras.h" 68 #include "wtf/StdLibExtras.h"
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 break; 1141 break;
1141 } 1142 }
1142 setContinuation(0); 1143 setContinuation(0);
1143 destroy(); 1144 destroy();
1144 } 1145 }
1145 } 1146 }
1146 } 1147 }
1147 1148
1148 bool RenderBlock::isSelfCollapsingBlock() const 1149 bool RenderBlock::isSelfCollapsingBlock() const
1149 { 1150 {
1150 // FIXME: Add ASSERT(!selfNeedsLayout()) when clearFloatsIfNeeded() and skip LeadingWhitespace() no 1151 ASSERT(!needsLayout());
1151 // longer call here when the block requires layout.
1152 1152
1153 // We are not self-collapsing if we 1153 // We are not self-collapsing if we
1154 // (a) have a non-zero height according to layout (an optimization to avoid wasting time) 1154 // (a) have a non-zero height according to layout (an optimization to avoid wasting time)
1155 // (b) are a table, 1155 // (b) are a table,
1156 // (c) have border/padding, 1156 // (c) have border/padding,
1157 // (d) have a min-height 1157 // (d) have a min-height
1158 // (e) have specified that one of our margins can't collapse using a CSS ext ension 1158 // (e) have specified that one of our margins can't collapse using a CSS ext ension
1159 if (logicalHeight() > 0 1159 if (logicalHeight() > 0
1160 || isTable() || borderAndPaddingLogicalHeight() 1160 || isTable() || borderAndPaddingLogicalHeight()
1161 || style()->logicalMinHeight().isPositive() 1161 || style()->logicalMinHeight().isPositive()
(...skipping 4508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5670 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5671 { 5671 {
5672 showRenderObject(); 5672 showRenderObject();
5673 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5673 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5674 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5674 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5675 } 5675 }
5676 5676
5677 #endif 5677 #endif
5678 5678
5679 } // namespace WebCore 5679 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698