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

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

Issue 550363004: Factor painting code out of RenderBox into a new class called BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix 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
Index: Source/core/rendering/RenderFieldset.cpp
diff --git a/Source/core/rendering/RenderFieldset.cpp b/Source/core/rendering/RenderFieldset.cpp
index 928eb192be8a5adb3b1f07c6af901dfe20bf9d74..956c95351ac20ef689d2341f55224b5215548bf3 100644
--- a/Source/core/rendering/RenderFieldset.cpp
+++ b/Source/core/rendering/RenderFieldset.cpp
@@ -27,6 +27,7 @@
#include "core/CSSPropertyNames.h"
#include "core/HTMLNames.h"
#include "core/html/HTMLLegendElement.h"
+#include "core/rendering/BoxDecorationData.h"
#include "core/rendering/PaintInfo.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
@@ -39,6 +40,7 @@ using namespace HTMLNames;
RenderFieldset::RenderFieldset(Element* element)
: RenderBlockFlow(element)
+ , m_boxPainter(BoxPainter(*this))
{
}
@@ -159,11 +161,11 @@ void RenderFieldset::paintBoxDecorationBackground(PaintInfo& paintInfo, const La
paintRect.setX(paintRect.x() + xOff);
}
- BoxDecorationData boxDecorationData(*style());
+ BoxDecorationData boxDecorationData(*style(), canRenderBorderImage(), backgroundHasOpaqueTopLayer(), paintInfo.context);
- if (!boxShadowShouldBeAppliedToBackground(determineBackgroundBleedAvoidance(paintInfo.context, boxDecorationData)))
+ if (boxDecorationData.bleedAvoidance == BackgroundBleedNone)
paintBoxShadow(paintInfo, paintRect, style(), Normal);
- paintFillLayers(paintInfo, boxDecorationData.backgroundColor, style()->backgroundLayers(), paintRect);
+ m_boxPainter.paintFillLayers(paintInfo, boxDecorationData.backgroundColor, style()->backgroundLayers(), paintRect);
paintBoxShadow(paintInfo, paintRect, style(), Inset);
if (!boxDecorationData.hasBorder)
@@ -212,7 +214,7 @@ void RenderFieldset::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOff
paintRect.move(xOff, 0);
}
- paintMaskImages(paintInfo, paintRect);
+ m_boxPainter.paintMaskImages(paintInfo, paintRect);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698