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

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

Issue 182413005: Return refererence from InlineBox::root() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: re-upload because previous patch didn't upload correctly. 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/EllipsisBox.cpp
diff --git a/Source/core/rendering/EllipsisBox.cpp b/Source/core/rendering/EllipsisBox.cpp
index 23cb7fba55ff46d303a89d91402c7837072f87df..f7ecf8ec433bd15e9d737ac342880c96e3eb5e77 100644
--- a/Source/core/rendering/EllipsisBox.cpp
+++ b/Source/core/rendering/EllipsisBox.cpp
@@ -130,7 +130,7 @@ IntRect EllipsisBox::selectionRect()
{
RenderStyle* style = renderer().style(isFirstLineStyle());
const Font& font = style->font();
- return enclosingIntRect(font.selectionRectForText(RenderBlockFlow::constructTextRun(&renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop() + root()->selectionTopAdjustedForPrecedingBlock()), root()->selectionHeightAdjustedForPrecedingBlock()));
+ return enclosingIntRect(font.selectionRectForText(RenderBlockFlow::constructTextRun(&renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop() + root().selectionTopAdjustedForPrecedingBlock()), root().selectionHeightAdjustedForPrecedingBlock()));
}
void EllipsisBox::paintSelection(GraphicsContext* context, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font)
@@ -146,9 +146,9 @@ void EllipsisBox::paintSelection(GraphicsContext* context, const FloatPoint& box
c = Color(0xff - c.red(), 0xff - c.green(), 0xff - c.blue());
GraphicsContextStateSaver stateSaver(*context);
- LayoutUnit selectionBottom = root()->selectionBottom();
- LayoutUnit top = root()->selectionTop();
- LayoutUnit h = root()->selectionHeight();
+ LayoutUnit selectionBottom = root().selectionBottom();
+ LayoutUnit top = root().selectionTop();
+ LayoutUnit h = root().selectionHeight();
const int deltaY = roundToInt(renderer().style()->isFlippedLinesWritingMode() ? selectionBottom - logicalBottom() : logicalTop() - top);
const FloatPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
FloatRect clipRect(localOrigin, FloatSize(m_logicalWidth, h));

Powered by Google App Engine
This is Rietveld 408576698