Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
https://bugs.webkit.org/show_bug.cgi?id=141972
Reviewed by Simon Fraser.
Image geometry's phase represents distance.
No change in functionality.
* WebCore.order:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsTilePhase):
(WebCore::GraphicsLayer::contentsTilePhase):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
(WebCore::TextureMapperLayer::setContentsTilePhase):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::BackgroundImageGeometry::setNoRepeatX):
(WebCore::BackgroundImageGeometry::setNoRepeatY):
(WebCore::BackgroundImageGeometry::useFixedAttachment):
(WebCore::BackgroundImageGeometry::relativePhase):
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::phase):
(WebCore::BackgroundImageGeometry::setPhase):
(WebCore::BackgroundImageGeometry::setPhaseX):
(WebCore::BackgroundImageGeometry::setPhaseY):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@180580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderBoxModelObject.h b/Source/WebCore/rendering/RenderBoxModelObject.h
index 24c0802..87b8847 100644
--- a/Source/WebCore/rendering/RenderBoxModelObject.h
+++ b/Source/WebCore/rendering/RenderBoxModelObject.h
@@ -78,20 +78,19 @@
void setDestRect(const LayoutRect& destRect) { m_destRect = destRect; }
// Returns the phase relative to the destination rectangle.
- LayoutPoint relativePhase() const;
+ LayoutSize relativePhase() const;
- LayoutPoint phase() const { return m_phase; }
- void setPhase(const LayoutPoint& phase) { m_phase = phase; }
-
+ LayoutSize phase() const { return m_phase; }
+ void setPhase(const LayoutSize& phase) { m_phase = phase; }
+ void setPhaseX(LayoutUnit deltaX) { m_phase.setWidth(deltaX); }
+ void setPhaseY(LayoutUnit deltaY) { m_phase.setHeight(deltaY); }
+
LayoutSize tileSize() const { return m_tileSize; }
void setTileSize(const LayoutSize& tileSize) { m_tileSize = tileSize; }
LayoutSize spaceSize() const { return m_space; }
void setSpaceSize(const LayoutSize& space) { m_space = space; }
- void setPhaseX(LayoutUnit x) { m_phase.setX(x); }
- void setPhaseY(LayoutUnit y) { m_phase.setY(y); }
-
void setNoRepeatX(LayoutUnit xOffset);
void setNoRepeatY(LayoutUnit yOffset);
@@ -105,7 +104,7 @@
private:
LayoutRect m_destRect;
LayoutPoint m_destOrigin;
- LayoutPoint m_phase;
+ LayoutSize m_phase;
LayoutSize m_tileSize;
LayoutSize m_space;
bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies that we can't always cheaply compute destRect.
@@ -236,7 +235,7 @@
bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !isTableCell() && isRenderBlock() && !isRenderSVGBlock(); }
- void getGeometryForBackgroundImage(const RenderLayerModelObject* paintContainer, FloatRect& destRect, FloatPoint& phase, FloatSize& tileSize) const;
+ void getGeometryForBackgroundImage(const RenderLayerModelObject* paintContainer, FloatRect& destRect, FloatSize& phase, FloatSize& tileSize) const;
void contentChanged(ContentChangeType);
bool hasAcceleratedCompositing() const;