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

Unified Diff: trunk/Source/core/rendering/RenderBlock.cpp

Issue 948053002: Revert 190605 "Make RenderObject::style() return a const object" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/Source/core/page/TouchAdjustment.cpp ('k') | trunk/Source/core/rendering/RenderCombineText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/rendering/RenderBlock.cpp
===================================================================
--- trunk/Source/core/rendering/RenderBlock.cpp (revision 190671)
+++ trunk/Source/core/rendering/RenderBlock.cpp (working copy)
@@ -276,7 +276,7 @@
void RenderBlock::styleWillChange(StyleDifference diff, const LayoutStyle& newStyle)
{
- const LayoutStyle* oldStyle = style();
+ LayoutStyle* oldStyle = style();
setReplaced(newStyle.isDisplayInlineType());
@@ -336,7 +336,7 @@
for (RenderBlock* currCont = blockElementContinuation(); currCont; currCont = currCont->blockElementContinuation()) {
LayoutBoxModelObject* nextCont = currCont->continuation();
currCont->setContinuation(0);
- currCont->setStyle(mutableStyle());
+ currCont->setStyle(style());
currCont->setContinuation(nextCont);
}
}
@@ -588,7 +588,7 @@
else {
LayoutObject* cloneRenderer = toElement(node())->createRenderer(styleRef());
cloneBlock = toRenderBlock(cloneRenderer);
- cloneBlock->setStyle(mutableStyle());
+ cloneBlock->setStyle(style());
// This takes care of setting the right value of childrenInline in case
// generated content is added to cloneBlock and 'this' does not have
@@ -3051,14 +3051,14 @@
continue;
}
- const LayoutStyle& childStyle = child->styleRef();
+ RefPtr<LayoutStyle> childStyle = child->style();
if (child->isFloating() || (child->isBox() && toRenderBox(child)->avoidsFloats())) {
LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth;
- if (childStyle.clear() & CLEFT) {
+ if (childStyle->clear() & CLEFT) {
maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
floatLeftWidth = 0;
}
- if (childStyle.clear() & CRIGHT) {
+ if (childStyle->clear() & CRIGHT) {
maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
floatRightWidth = 0;
}
@@ -3067,8 +3067,8 @@
// A margin basically has three types: fixed, percentage, and auto (variable).
// Auto and percentage margins simply become 0 when computing min/max width.
// Fixed margins can be added in as is.
- Length startMarginLength = childStyle.marginStartUsing(&styleToUse);
- Length endMarginLength = childStyle.marginEndUsing(&styleToUse);
+ Length startMarginLength = childStyle->marginStartUsing(&styleToUse);
+ Length endMarginLength = childStyle->marginEndUsing(&styleToUse);
LayoutUnit margin = 0;
LayoutUnit marginStart = 0;
LayoutUnit marginEnd = 0;
@@ -3117,7 +3117,7 @@
}
if (child->isFloating()) {
- if (childStyle.floating() == LeftFloat)
+ if (childStyle->floating() == LeftFloat)
floatLeftWidth += w;
else
floatRightWidth += w;
« no previous file with comments | « trunk/Source/core/page/TouchAdjustment.cpp ('k') | trunk/Source/core/rendering/RenderCombineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698