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

Unified Diff: Source/core/rendering/style/FillLayer.cpp

Issue 35303002: Unstick background position origins (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-upload in an attempt to avoid 'old chunk mismatch' Created 7 years, 2 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/style/FillLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/FillLayer.cpp
diff --git a/Source/core/rendering/style/FillLayer.cpp b/Source/core/rendering/style/FillLayer.cpp
index ca66f47152b18b3b4cd90f34ed351cd4931244f0..c04a64cd53682cb62f5d769e71cf9c1164a78071 100644
--- a/Source/core/rendering/style/FillLayer.cpp
+++ b/Source/core/rendering/style/FillLayer.cpp
@@ -63,7 +63,8 @@ FillLayer::FillLayer(EFillLayerType type)
, m_repeatYSet(false)
, m_xPosSet(false)
, m_yPosSet(false)
- , m_backgroundOriginSet(false)
+ , m_backgroundXOriginSet(false)
+ , m_backgroundYOriginSet(false)
, m_backgroundXOrigin(LeftEdge)
, m_backgroundYOrigin(TopEdge)
, m_compositeSet(type == MaskFillLayer)
@@ -96,7 +97,8 @@ FillLayer::FillLayer(const FillLayer& o)
, m_repeatYSet(o.m_repeatYSet)
, m_xPosSet(o.m_xPosSet)
, m_yPosSet(o.m_yPosSet)
- , m_backgroundOriginSet(o.m_backgroundOriginSet)
+ , m_backgroundXOriginSet(o.m_backgroundXOriginSet)
+ , m_backgroundYOriginSet(o.m_backgroundYOriginSet)
, m_backgroundXOrigin(o.m_backgroundXOrigin)
, m_backgroundYOrigin(o.m_backgroundYOrigin)
, m_compositeSet(o.m_compositeSet)
@@ -123,7 +125,8 @@ FillLayer& FillLayer::operator=(const FillLayer& o)
m_yPosition = o.m_yPosition;
m_backgroundXOrigin = o.m_backgroundXOrigin;
m_backgroundYOrigin = o.m_backgroundYOrigin;
- m_backgroundOriginSet = o.m_backgroundOriginSet;
+ m_backgroundXOriginSet = o.m_backgroundXOriginSet;
+ m_backgroundYOriginSet = o.m_backgroundYOriginSet;
m_sizeLength = o.m_sizeLength;
m_attachment = o.m_attachment;
m_clip = o.m_clip;
@@ -173,10 +176,10 @@ void FillLayer::fillUnsetProperties()
// We need to fill in the remaining values with the pattern specified.
for (FillLayer* pattern = this; curr; curr = curr->next()) {
curr->m_xPosition = pattern->m_xPosition;
- if (pattern->isBackgroundOriginSet()) {
+ if (pattern->isBackgroundXOriginSet())
curr->m_backgroundXOrigin = pattern->m_backgroundXOrigin;
+ if (pattern->isBackgroundYOriginSet())
curr->m_backgroundYOrigin = pattern->m_backgroundYOrigin;
- }
pattern = pattern->next();
if (pattern == curr || !pattern)
pattern = this;
@@ -188,10 +191,10 @@ void FillLayer::fillUnsetProperties()
// We need to fill in the remaining values with the pattern specified.
for (FillLayer* pattern = this; curr; curr = curr->next()) {
curr->m_yPosition = pattern->m_yPosition;
- if (pattern->isBackgroundOriginSet()) {
+ if (pattern->isBackgroundXOriginSet())
curr->m_backgroundXOrigin = pattern->m_backgroundXOrigin;
+ if (pattern->isBackgroundYOriginSet())
curr->m_backgroundYOrigin = pattern->m_backgroundYOrigin;
- }
pattern = pattern->next();
if (pattern == curr || !pattern)
pattern = this;
« no previous file with comments | « Source/core/rendering/style/FillLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698