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

Issue 1819083004: Straighten out zoom and border-image (Closed)

Created:
4 years, 9 months ago by davve
Modified:
4 years, 9 months ago
Reviewers:
fs
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

Straighten out zoom and border-image The border-image-slice property determines how the image is sliced into the nine piece pattern. Since border-image-slice are not lengths, they are not automatically zoomed in computed style. Thus the zoom factor hasn't been applied to the image size either. For border-image the image size has no impact on the destination area anyway, so this part is fine. However, the default object size is in zoomed coordinates and unless the default object size is unzoomed, there will be a mix of zoomed and unzoomed coordinates when calculating the final image size for image sizes that depend on the default object size, e.g. SVG with no intrinsic size. For this reason, unzoom the default object size before using it to compute the image size. Since the zoom passed to StyleImage::image() should represent the zoom applied to the image size, it follows from this that the zoom should be one. BUG=596075, 561519 Committed: https://crrev.com/5375a43082553e259159d42ef83f727ed9fe5463 Cr-Commit-Position: refs/heads/master@{#382842}

Patch Set 1 #

Patch Set 2 : Rebase on top of pointer-to-ref change #

Patch Set 3 : Fix up test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/svg/css/border-image-zoomed.html View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/css/border-image-zoomed-expected.html View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp View 1 1 chunk +4 lines, -2 lines 2 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (8 generated)
davve
PTAL
4 years, 9 months ago (2016-03-22 13:52:53 UTC) #3
fs
lgtm https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp File third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp (right): https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp#newcode60 third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp:60: RefPtr<Image> image = styleImage->image(m_layoutObject, imageSize, 1); Maybe add ...
4 years, 9 months ago (2016-03-22 14:07:23 UTC) #4
davve
https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp File third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp (right): https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp#newcode60 third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp:60: RefPtr<Image> image = styleImage->image(m_layoutObject, imageSize, 1); On 2016/03/22 14:07:23, ...
4 years, 9 months ago (2016-03-22 14:29:00 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1819083004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1819083004/40001
4 years, 9 months ago (2016-03-22 14:31:55 UTC) #7
fs
On 2016/03/22 at 14:29:00, davve wrote: > https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp > File third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp (right): > > https://codereview.chromium.org/1819083004/diff/40001/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp#newcode60 ...
4 years, 9 months ago (2016-03-22 14:45:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1819083004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1819083004/40001
4 years, 9 months ago (2016-03-23 12:25:26 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-23 13:26:55 UTC) #14
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 13:28:25 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/5375a43082553e259159d42ef83f727ed9fe5463
Cr-Commit-Position: refs/heads/master@{#382842}

Powered by Google App Engine
This is Rietveld 408576698