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

Unified Diff: Source/core/rendering/RenderInline.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: 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/RenderDeprecatedFlexibleBox.cpp ('k') | Source/core/rendering/RenderListMarker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index cd27b16a6bec4547812c853224a8578c2e9fc888..c4a3360bffc533a61d83bb09db5fb584d90c65f2 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -559,7 +559,7 @@ void RenderInline::generateCulledLineBoxRects(GeneratorContext& yield, const Ren
RenderBox* currBox = toRenderBox(curr);
if (currBox->inlineBoxWrapper()) {
RootInlineBox* rootBox = currBox->inlineBoxWrapper()->root();
- int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
+ int logicalTop = rootBox->logicalTop() + (rootBox->renderer().style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
if (isHorizontal)
yield(FloatRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginWidth(), logicalHeight));
@@ -574,7 +574,7 @@ void RenderInline::generateCulledLineBoxRects(GeneratorContext& yield, const Ren
else {
for (InlineFlowBox* childLine = currInline->firstLineBox(); childLine; childLine = childLine->nextLineBox()) {
RootInlineBox* rootBox = childLine->root();
- int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
+ int logicalTop = rootBox->logicalTop() + (rootBox->renderer().style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
if (isHorizontal)
yield(FloatRect(childLine->x() - childLine->marginLogicalLeft(),
@@ -592,7 +592,7 @@ void RenderInline::generateCulledLineBoxRects(GeneratorContext& yield, const Ren
RenderText* currText = toRenderText(curr);
for (InlineTextBox* childText = currText->firstTextBox(); childText; childText = childText->nextTextBox()) {
RootInlineBox* rootBox = childText->root();
- int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
+ int logicalTop = rootBox->logicalTop() + (rootBox->renderer().style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
if (isHorizontal)
yield(FloatRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight));
@@ -1270,7 +1270,7 @@ void RenderInline::deleteLineBoxTree()
InlineFlowBox* RenderInline::createInlineFlowBox()
{
- return new InlineFlowBox(this);
+ return new InlineFlowBox(*this);
}
InlineFlowBox* RenderInline::createAndAppendInlineFlowBox()
« no previous file with comments | « Source/core/rendering/RenderDeprecatedFlexibleBox.cpp ('k') | Source/core/rendering/RenderListMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698