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

Unified Diff: Source/core/paint/BoxPainter.cpp

Issue 1102353008: Split ThemePainter out of LayoutTheme (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index 7bd468d09178da5635b168f94babe5c31c29772d..0a568e7201f9ab769daa78d0037ab71107cdd34b 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -24,6 +24,7 @@
#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/PaintInfo.h"
#include "core/paint/RoundedInnerRectClipper.h"
+#include "core/paint/ThemePainter.h"
#include "platform/LengthFunctions.h"
#include "platform/geometry/LayoutPoint.h"
#include "platform/geometry/LayoutRectOutsets.h"
@@ -113,7 +114,7 @@ void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo
// If we have a native theme appearance, paint that before painting our background.
// The theme will tell us whether or not we should also paint the CSS background.
IntRect snappedPaintRect(pixelSnappedIntRect(paintRect));
- bool themePainted = boxDecorationData.hasAppearance && !LayoutTheme::theme().paint(&m_layoutBox, paintInfo, snappedPaintRect);
+ bool themePainted = boxDecorationData.hasAppearance && !LayoutTheme::themePainter().paint(&m_layoutBox, paintInfo, snappedPaintRect);
if (!themePainted) {
if (boxDecorationData.bleedAvoidance == BackgroundBleedBackgroundOverBorder)
paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData.bleedAvoidance);
@@ -121,13 +122,13 @@ void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo
paintBackground(paintInfo, paintRect, boxDecorationData.backgroundColor, boxDecorationData.bleedAvoidance);
if (boxDecorationData.hasAppearance)
- LayoutTheme::theme().paintDecorations(&m_layoutBox, paintInfo, snappedPaintRect);
+ LayoutTheme::themePainter().paintDecorations(&m_layoutBox, paintInfo, snappedPaintRect);
}
paintBoxShadow(paintInfo, paintRect, style, Inset);
// The theme will tell us whether or not we should also paint the CSS border.
if (boxDecorationData.hasBorder && boxDecorationData.bleedAvoidance != BackgroundBleedBackgroundOverBorder
- && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::theme().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect)))
+ && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::themePainter().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect)))
&& !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorders()))
paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData.bleedAvoidance);

Powered by Google App Engine
This is Rietveld 408576698