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

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
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFieldset.cpp
diff --git a/Source/core/rendering/RenderFieldset.cpp b/Source/core/rendering/RenderFieldset.cpp
index 928eb192be8a5adb3b1f07c6af901dfe20bf9d74..68d9ad2ca76c8d93b58493380e9c8ebae05d9110 100644
--- a/Source/core/rendering/RenderFieldset.cpp
+++ b/Source/core/rendering/RenderFieldset.cpp
@@ -27,6 +27,8 @@
#include "core/CSSPropertyNames.h"
#include "core/HTMLNames.h"
#include "core/html/HTMLLegendElement.h"
+#include "core/paint/BoxDecorationData.h"
+#include "core/paint/BoxPainter.h"
#include "core/rendering/PaintInfo.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
@@ -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);
+ BoxPainter(*this).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);
+ BoxPainter(*this).paintMaskImages(paintInfo, paintRect);
}
} // namespace blink
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698