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

Side by Side Diff: Source/WebCore/rendering/RenderMultiColumnBlock.cpp

Issue 13679002: Add StyleChangeState to get rid of a bunch of static state in the render tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 RenderMultiColumnBlock::RenderMultiColumnBlock(Element* element) 37 RenderMultiColumnBlock::RenderMultiColumnBlock(Element* element)
38 : RenderBlock(element) 38 : RenderBlock(element)
39 , m_flowThread(0) 39 , m_flowThread(0)
40 , m_columnCount(1) 40 , m_columnCount(1)
41 , m_columnWidth(0) 41 , m_columnWidth(0)
42 , m_columnHeight(0) 42 , m_columnHeight(0)
43 , m_requiresBalancing(false) 43 , m_requiresBalancing(false)
44 { 44 {
45 } 45 }
46 46
47 void RenderMultiColumnBlock::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle) 47 void RenderMultiColumnBlock::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle, const StyleChangeState& state)
48 { 48 {
49 RenderBlock::styleDidChange(diff, oldStyle); 49 RenderBlock::styleDidChange(diff, oldStyle, state);
50 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) 50 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x())
51 child->setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), BL OCK)); 51 child->setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), BL OCK));
52 } 52 }
53 53
54 void RenderMultiColumnBlock::computeColumnCountAndWidth() 54 void RenderMultiColumnBlock::computeColumnCountAndWidth()
55 { 55 {
56 // Calculate our column width and column count. 56 // Calculate our column width and column count.
57 // FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibli ng4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744 57 // FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibli ng4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
58 m_columnCount = 1; 58 m_columnCount = 1;
59 m_columnWidth = contentLogicalWidth(); 59 m_columnWidth = contentLogicalWidth();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (isPseudoElement()) 163 if (isPseudoElement())
164 return "RenderMultiColumnBlock (generated)"; 164 return "RenderMultiColumnBlock (generated)";
165 if (isAnonymous()) 165 if (isAnonymous())
166 return "RenderMultiColumnBlock (generated)"; 166 return "RenderMultiColumnBlock (generated)";
167 if (isRelPositioned()) 167 if (isRelPositioned())
168 return "RenderMultiColumnBlock (relative positioned)"; 168 return "RenderMultiColumnBlock (relative positioned)";
169 return "RenderMultiColumnBlock"; 169 return "RenderMultiColumnBlock";
170 } 170 }
171 171
172 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698