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

Issue 2103563002: Fix rounding of phase for background image (Closed)

Created:
4 years, 5 months ago by Stephen Chennney
Modified:
4 years, 5 months ago
Reviewers:
pdr., f(malita)
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix rounding of phase for background image In the BackgroundImageGeometry::calculate methods we were previously computing the full image tiling phase value and then rounding to int at the end. But frequently the phase is computed as the negative of a background-position value, which is itself frequently negative. The result of negating a value then rounding is not the same as rounding then negating, and this difference matters when trying to, for instance, match the end of a linear gradient with a solid background color. This patch changes phase rounding to round before negating. The test case is fixed, and no other test results change. R=pdr@chromium.org,fmalita@chromium.org BUG=622294 Committed: https://crrev.com/689f41251eab6e3812c09296a14cb1edc6db3b0e Cr-Commit-Position: refs/heads/master@{#403458}

Patch Set 1 #

Patch Set 2 : Round the dest rect appropriately. #

Total comments: 2

Patch Set 3 : Remove expectation #

Total comments: 12

Patch Set 4 : Cleanup fmod/fmodf and setPhase #

Patch Set 5 : Add todo #

Patch Set 6 : Re-add expectation. #

Messages

Total messages: 42 (13 generated)
Stephen Chennney
Thankfully, this was an easy one to fix.
4 years, 5 months ago (2016-06-27 20:36:50 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/1
4 years, 5 months ago (2016-06-27 20:36:53 UTC) #3
f(malita)
On 2016/06/27 20:36:50, Stephen Chennney wrote: > The result of negating a value then rounding ...
4 years, 5 months ago (2016-06-27 21:10:41 UTC) #4
pdr.
I spent a couple days last week fighting with pixel snapping so I'd like to ...
4 years, 5 months ago (2016-06-27 21:46:07 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/250967)
4 years, 5 months ago (2016-06-27 22:07:40 UTC) #7
f(malita)
On 2016/06/27 21:10:41, f(malita) wrote: > On 2016/06/27 20:36:50, Stephen Chennney wrote: > > The ...
4 years, 5 months ago (2016-06-27 22:10:56 UTC) #8
Stephen Chennney
On 2016/06/27 22:10:56, f(malita) wrote: > On 2016/06/27 21:10:41, f(malita) wrote: > > On 2016/06/27 ...
4 years, 5 months ago (2016-06-28 13:11:34 UTC) #9
Stephen Chennney
On 2016/06/27 21:46:07, pdr. wrote: > I spent a couple days last week fighting with ...
4 years, 5 months ago (2016-06-28 13:15:11 UTC) #10
f(malita)
On 2016/06/28 13:11:34, Stephen Chennney wrote: > On 2016/06/27 22:10:56, f(malita) wrote: > > On ...
4 years, 5 months ago (2016-06-28 16:46:30 UTC) #11
f(malita)
On 2016/06/28 13:15:11, Stephen Chennney wrote: > On 2016/06/27 21:46:07, pdr. wrote: > > I ...
4 years, 5 months ago (2016-06-28 17:17:11 UTC) #12
Stephen Chennney
On 2016/06/28 17:17:11, f(malita) wrote: > On 2016/06/28 13:15:11, Stephen Chennney wrote: > > On ...
4 years, 5 months ago (2016-06-28 20:32:45 UTC) #13
Stephen Chennney
This resolves the bug. I verified that the original bug report for the background-with-sub-pixel-offset-positioning.html test ...
4 years, 5 months ago (2016-06-29 20:26:23 UTC) #14
Stephen Chennney
On 2016/06/29 20:26:23, Stephen Chennney wrote: > This resolves the bug. > > I verified ...
4 years, 5 months ago (2016-06-29 20:27:51 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/20001
4 years, 5 months ago (2016-06-29 20:28:22 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/209762)
4 years, 5 months ago (2016-06-29 20:37:38 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/40001
4 years, 5 months ago (2016-06-29 20:59:53 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-29 22:35:22 UTC) #23
pdr.
https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp File third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp (right): https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp#newcode251 third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp:251: m_phase = LayoutPoint(roundedIntPoint(m_phase)); Can m_phase be refactored to be ...
4 years, 5 months ago (2016-06-30 06:01:02 UTC) #24
f(malita)
https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp File third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp (right): https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp#newcode165 third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp:165: m_phase.setX(LayoutUnit(-std::min(roundedOffset, 0))); Nit: use setDestRect()/setPhaseX() for consistency? https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp#newcode174 third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp:174: ...
4 years, 5 months ago (2016-06-30 15:03:05 UTC) #25
Stephen Chennney
See inline comments. I'll be looking at fixing the bad ietestcenter result next (likely https://bugs.chromium.org/p/chromium/issues/detail?id=449600) ...
4 years, 5 months ago (2016-06-30 18:50:56 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/60001
4 years, 5 months ago (2016-06-30 18:54:27 UTC) #28
f(malita)
LGTM https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp File third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp (right): https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp#newcode236 third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp:236: setPhaseX(actualWidth ? LayoutUnit(round(actualWidth - fmodf((computedXPosition + extraOffset), actualWidth))) ...
4 years, 5 months ago (2016-06-30 19:01:54 UTC) #29
pdr.
LGTM https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp File third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp (right): https://codereview.chromium.org/2103563002/diff/40001/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp#newcode251 third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp:251: m_phase = LayoutPoint(roundedIntPoint(m_phase)); On 2016/06/30 at 18:50:55, Stephen ...
4 years, 5 months ago (2016-06-30 20:14:36 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/253433)
4 years, 5 months ago (2016-06-30 20:31:13 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/80001
4 years, 5 months ago (2016-07-01 13:14:24 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2103563002/100001
4 years, 5 months ago (2016-07-01 14:14:05 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 5 months ago (2016-07-01 15:34:31 UTC) #39
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-01 15:34:41 UTC) #40
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 15:36:10 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/689f41251eab6e3812c09296a14cb1edc6db3b0e
Cr-Commit-Position: refs/heads/master@{#403458}

Powered by Google App Engine
This is Rietveld 408576698