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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 11 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 1af8374d047557e901198679a2abcdb7d955cb8d..b61d7505fa02a218ae4dfde2293fa3439b07b049 100644
--- a/Source/core/rendering/EllipsisBox.cpp
+++ b/Source/core/rendering/EllipsisBox.cpp
@@ -59,7 +59,7 @@ InlineBox* EllipsisBox::markupBox() const
IntRect EllipsisBox::selectionRect()
{
- RenderStyle* style = renderer().style(isFirstLineStyle());
+ const RenderStyle* style = renderer().style(isFirstLineStyle());
const Font& font = style->font();
return enclosingIntRect(font.selectionRectForText(constructTextRun(&renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop() + root().selectionTopAdjustedForPrecedingBlock()), root().selectionHeightAdjustedForPrecedingBlock()));
}
@@ -72,7 +72,7 @@ bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
// Hit test the markup box.
if (InlineBox* markupBox = this->markupBox()) {
- RenderStyle* style = renderer().style(isFirstLineStyle());
+ const RenderStyle* style = renderer().style(isFirstLineStyle());
LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - markupBox->x();
LayoutUnit mty = adjustedLocation.y() + style->fontMetrics().ascent() - (markupBox->y() + markupBox->renderer().style(isFirstLineStyle())->fontMetrics().ascent());
if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom)) {

Powered by Google App Engine
This is Rietveld 408576698