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

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

Issue 217563003: Turn styleWillChange |newStyle| into a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 * This file is part of the render object implementation for KHTML. 2 * This file is part of the render object implementation for KHTML.
3 * 3 *
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) 5 * (C) 1999 Antti Koivisto (koivisto@kde.org)
6 * Copyright (C) 2003 Apple Computer, Inc. 6 * Copyright (C) 2003 Apple Computer, Inc.
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return child->logicalWidth() - child->borderAndPaddingLogicalWidth(); 175 return child->logicalWidth() - child->borderAndPaddingLogicalWidth();
176 } 176 }
177 177
178 static LayoutUnit contentHeightForChild(RenderBox* child) 178 static LayoutUnit contentHeightForChild(RenderBox* child)
179 { 179 {
180 if (child->hasOverrideHeight()) 180 if (child->hasOverrideHeight())
181 return child->overrideLogicalContentHeight(); 181 return child->overrideLogicalContentHeight();
182 return child->logicalHeight() - child->borderAndPaddingLogicalHeight(); 182 return child->logicalHeight() - child->borderAndPaddingLogicalHeight();
183 } 183 }
184 184
185 void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const Re nderStyle* newStyle) 185 void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const Re nderStyle& newStyle)
186 { 186 {
187 RenderStyle* oldStyle = style(); 187 RenderStyle* oldStyle = style();
188 if (oldStyle && !oldStyle->lineClamp().isNone() && newStyle->lineClamp().isN one()) 188 if (oldStyle && !oldStyle->lineClamp().isNone() && newStyle.lineClamp().isNo ne())
189 clearLineClamp(); 189 clearLineClamp();
190 190
191 RenderBlock::styleWillChange(diff, newStyle); 191 RenderBlock::styleWillChange(diff, newStyle);
192 } 192 }
193 193
194 void RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minL ogicalWidth, LayoutUnit& maxLogicalWidth) const 194 void RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minL ogicalWidth, LayoutUnit& maxLogicalWidth) const
195 { 195 {
196 if (hasMultipleLines() || isVertical()) { 196 if (hasMultipleLines() || isVertical()) {
197 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli ngBox()) { 197 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli ngBox()) {
198 if (childDoesNotAffectWidthOrFlexing(child)) 198 if (childDoesNotAffectWidthOrFlexing(child))
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 if (isPseudoElement()) 1076 if (isPseudoElement())
1077 return "RenderDeprecatedFlexibleBox (generated)"; 1077 return "RenderDeprecatedFlexibleBox (generated)";
1078 if (isAnonymous()) 1078 if (isAnonymous())
1079 return "RenderDeprecatedFlexibleBox (generated)"; 1079 return "RenderDeprecatedFlexibleBox (generated)";
1080 if (isRelPositioned()) 1080 if (isRelPositioned())
1081 return "RenderDeprecatedFlexibleBox (relative positioned)"; 1081 return "RenderDeprecatedFlexibleBox (relative positioned)";
1082 return "RenderDeprecatedFlexibleBox"; 1082 return "RenderDeprecatedFlexibleBox";
1083 } 1083 }
1084 1084
1085 } // namespace WebCore 1085 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698