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

Unified Diff: Source/core/rendering/InlineFlowBox.h

Issue 184023003: Make InlineBox::renderer() and related subclass methods return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No reference reassignment. 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
« no previous file with comments | « Source/core/rendering/InlineBox.cpp ('k') | Source/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineFlowBox.h
diff --git a/Source/core/rendering/InlineFlowBox.h b/Source/core/rendering/InlineFlowBox.h
index e5478fe7800ce3354563f97a249b96a129cabf09..1ccd4c8322579523ce18f56d59202ad881f775e7 100644
--- a/Source/core/rendering/InlineFlowBox.h
+++ b/Source/core/rendering/InlineFlowBox.h
@@ -40,7 +40,7 @@ typedef HashMap<const InlineTextBox*, pair<Vector<const SimpleFontData*>, GlyphO
class InlineFlowBox : public InlineBox {
public:
- InlineFlowBox(RenderObject* obj)
+ InlineFlowBox(RenderObject& obj)
: InlineBox(obj)
, m_firstChild(0)
, m_lastChild(0)
@@ -61,7 +61,7 @@ public:
// an invisible marker exists. The side effect of having an invisible marker is that the quirks mode behavior of shrinking lines with no
// text children must not apply. This change also means that gaps will exist between image bullet list items. Even when the list bullet
// is an image, the line is still considered to be immune from the quirk.
- m_hasTextChildren = obj->style()->display() == LIST_ITEM;
+ m_hasTextChildren = obj.style()->display() == LIST_ITEM;
m_hasTextDescendants = m_hasTextChildren;
}
@@ -140,13 +140,13 @@ public:
{
if (!includeLogicalLeftEdge())
return 0;
- return isHorizontal() ? renderer()->style(isFirstLineStyle())->borderLeftWidth() : renderer()->style(isFirstLineStyle())->borderTopWidth();
+ return isHorizontal() ? renderer().style(isFirstLineStyle())->borderLeftWidth() : renderer().style(isFirstLineStyle())->borderTopWidth();
}
int borderLogicalRight() const
{
if (!includeLogicalRightEdge())
return 0;
- return isHorizontal() ? renderer()->style(isFirstLineStyle())->borderRightWidth() : renderer()->style(isFirstLineStyle())->borderBottomWidth();
+ return isHorizontal() ? renderer().style(isFirstLineStyle())->borderRightWidth() : renderer().style(isFirstLineStyle())->borderBottomWidth();
}
int paddingLogicalLeft() const
{
@@ -244,7 +244,7 @@ public:
LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
LayoutRect result = layoutOverflowRect(lineTop, lineBottom);
- if (!renderer()->isHorizontalWritingMode())
+ if (!renderer().isHorizontalWritingMode())
result = result.transposedRect();
return result;
}
@@ -270,7 +270,7 @@ public:
LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
LayoutRect result = visualOverflowRect(lineTop, lineBottom);
- if (!renderer()->isHorizontalWritingMode())
+ if (!renderer().isHorizontalWritingMode())
result = result.transposedRect();
return result;
}
« no previous file with comments | « Source/core/rendering/InlineBox.cpp ('k') | Source/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698