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

Unified Diff: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp

Issue 184023003: Make InlineBox::renderer() and related subclass methods return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
diff --git a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
index 71658a1b74afb1a6a52edc2b6d6d45dafb9a61dc..036238f21d463c90b986b8cd597a695dbb7be452 100644
--- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
+++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
@@ -944,7 +944,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
// Get ellipsis width, and if the last child is an anchor, it will go after the ellipsis, so add in a space and the anchor width too
LayoutUnit totalWidth;
InlineBox* anchorBox = lastLine->lastChild();
- if (anchorBox && anchorBox->renderer()->style()->isLink())
+ if (anchorBox && anchorBox->renderer().style()->isLink())
totalWidth = anchorBox->logicalWidth() + font.width(RenderBlockFlow::constructTextRun(this, font, ellipsisAndSpace, 2, style(), style()->direction()));
else {
anchorBox = 0;
@@ -952,8 +952,8 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
}
// See if this width can be accommodated on the last visible line
- RenderBlockFlow* destBlock = lastVisibleLine->block();
- RenderBlockFlow* srcBlock = lastLine->block();
+ RenderBlockFlow* destBlock = &lastVisibleLine->block();
Inactive 2014/02/28 02:28:19 RenderBlockFlow& destBlock = lastVisibleLine->bloc
ostap 2014/02/28 08:29:14 Done.
+ RenderBlockFlow* srcBlock = &lastLine->block();
Inactive 2014/02/28 02:28:19 Ditto
ostap 2014/02/28 08:29:14 Done.
// FIXME: Directions of src/destBlock could be different from our direction and from one another.
if (!srcBlock->style()->isLeftToRightDirection())

Powered by Google App Engine
This is Rietveld 408576698