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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/paint/BoxDecorationData.h ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxDecorationData.cpp
diff --git a/Source/core/paint/BoxDecorationData.cpp b/Source/core/paint/BoxDecorationData.cpp
index 1f0aa1651c251fb35ad1fe31328818f5b2e62a78..6d0b5c9a3308b6474cba198ec903acf83e5e5129 100644
--- a/Source/core/paint/BoxDecorationData.cpp
+++ b/Source/core/paint/BoxDecorationData.cpp
@@ -5,35 +5,35 @@
#include "config.h"
#include "core/paint/BoxDecorationData.h"
+#include "core/layout/LayoutBox.h"
#include "core/layout/style/BorderEdge.h"
#include "core/layout/style/LayoutStyle.h"
-#include "core/rendering/RenderBox.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/GraphicsContext.h"
namespace blink {
-BoxDecorationData::BoxDecorationData(const RenderBox& renderBox, GraphicsContext* context)
+BoxDecorationData::BoxDecorationData(const LayoutBox& layoutBox, GraphicsContext* context)
{
- backgroundColor = renderBox.style()->visitedDependentColor(CSSPropertyBackgroundColor);
- hasBackground = backgroundColor.alpha() || renderBox.style()->hasBackgroundImage();
- ASSERT(hasBackground == renderBox.style()->hasBackground());
- hasBorder = renderBox.style()->hasBorder();
- hasAppearance = renderBox.style()->hasAppearance();
+ backgroundColor = layoutBox.style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ hasBackground = backgroundColor.alpha() || layoutBox.style()->hasBackgroundImage();
+ ASSERT(hasBackground == layoutBox.style()->hasBackground());
+ hasBorder = layoutBox.style()->hasBorder();
+ hasAppearance = layoutBox.style()->hasAppearance();
- m_bleedAvoidance = determineBackgroundBleedAvoidance(renderBox, context);
+ m_bleedAvoidance = determineBackgroundBleedAvoidance(layoutBox, context);
}
-BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(const RenderBox& renderBox, GraphicsContext* context)
+BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(const LayoutBox& layoutBox, GraphicsContext* context)
{
- if (renderBox.isDocumentElement())
+ if (layoutBox.isDocumentElement())
return BackgroundBleedNone;
if (!hasBackground)
return BackgroundBleedNone;
- if (!hasBorder || !renderBox.style()->hasBorderRadius() || renderBox.canRenderBorderImage()) {
- if (renderBox.backgroundShouldAlwaysBeClipped())
+ if (!hasBorder || !layoutBox.style()->hasBorderRadius() || layoutBox.canRenderBorderImage()) {
+ if (layoutBox.backgroundShouldAlwaysBeClipped())
return BackgroundBleedClipBackground;
return BackgroundBleedNone;
}
@@ -64,9 +64,9 @@ BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(co
if (contextScaling.height() > 1)
contextScaling.setHeight(1);
- if (borderObscuresBackgroundEdge(*renderBox.style(), contextScaling))
+ if (borderObscuresBackgroundEdge(*layoutBox.style(), contextScaling))
return BackgroundBleedShrinkBackground;
- if (!hasAppearance && renderBox.style()->borderObscuresBackground() && renderBox.backgroundHasOpaqueTopLayer())
+ if (!hasAppearance && layoutBox.style()->borderObscuresBackground() && layoutBox.backgroundHasOpaqueTopLayer())
return BackgroundBleedBackgroundOverBorder;
return BackgroundBleedClipBackground;
« no previous file with comments | « Source/core/paint/BoxDecorationData.h ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698