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

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

Issue 559733005: Move painting code from RenderBoxModelObject into BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. Created 6 years, 3 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/paint/BoxPainter.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineFlowBox.cpp
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp
index 2b7c1fd0f15ae785a398b3c43106ed11b87db8ea..089fa63c7f531adf22e35b29f0aa0821469410d8 100644
--- a/Source/core/rendering/InlineFlowBox.cpp
+++ b/Source/core/rendering/InlineFlowBox.cpp
@@ -22,6 +22,7 @@
#include "core/CSSPropertyNames.h"
#include "core/dom/Document.h"
+#include "core/paint/BoxPainter.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/InlineTextBox.h"
#include "core/rendering/RenderBlock.h"
@@ -1184,11 +1185,11 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c
StyleImage* img = fillLayer.image();
bool hasFillImage = img && img->canRender(renderer(), renderer().style()->effectiveZoom());
if ((!hasFillImage && !renderer().style()->hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent()) {
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
+ BoxPainter::paintFillLayerExtended(*boxModelObject(), paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
} else if (renderer().style()->boxDecorationBreak() == DCLONE) {
GraphicsContextStateSaver stateSaver(*paintInfo.context);
paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height()));
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
+ BoxPainter::paintFillLayerExtended(*boxModelObject(), paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
} else {
// We have a fill image that spans multiple lines.
// We need to adjust tx and ty by the width of all previous lines.
@@ -1218,7 +1219,7 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c
GraphicsContextStateSaver stateSaver(*paintInfo.context);
paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height()));
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op);
+ BoxPainter::paintFillLayerExtended(*boxModelObject(), paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op);
}
}
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698