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

Issue 1147363009: Use replacedContentBox for LayoutHTMLCanvas when deciding PaintLayer's contentBox. (Closed)

Created:
5 years, 6 months ago by changseok
Modified:
5 years, 6 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Use replacedContentBox for LayoutHTMLCanvas when deciding PaintLayer's contentBox. If a canvas size goes over the minimunAccelerated2dCanvasSize we set in Settings.in, the canvas image is rendered in a paint layer. The problem is here the paint layer's geomery is incorrect since a wrong content bounding size is used for the canvas. LayoutHTMLCanvas is a kind of LayoutReplaced objects. Its geometry could be changed after replacing an original content with an actual one or updating styles like object-fit. Using LayoutBox::contentBox() for LayoutHTMLCanvas is such a carelessness. We can fix this by using replacedContentBox() rather than using just contentBox() for a canvas. BUG=467409 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197160

Patch Set 1 #

Total comments: 10

Patch Set 2 : Updated the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -3 lines) Patch
A LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer.html View 1 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html View 1 1 chunk +25 lines, -0 lines 0 comments Download
M Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp View 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
changseok
Please have a look
5 years, 6 months ago (2015-06-08 08:14:04 UTC) #2
chrishtr
5 years, 6 months ago (2015-06-09 18:41:53 UTC) #4
Justin Novosad
https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html File LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html (right): https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html#newcode22 LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html:22: ctx.beginPath(); Not necessary https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html#newcode27 LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html:27: ctx.fill(); not necessary https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer.html ...
5 years, 6 months ago (2015-06-09 19:20:44 UTC) #5
Justin Novosad
https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html File LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html (right): https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html#newcode8 LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html:8: object-fit: contain; Test would be more effective if the ...
5 years, 6 months ago (2015-06-09 19:24:10 UTC) #6
changseok
Thanks for your review. https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html File LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html (right): https://codereview.chromium.org/1147363009/diff/1/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html#newcode8 LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html:8: object-fit: contain; On 2015/06/09 19:24:10, ...
5 years, 6 months ago (2015-06-11 05:46:47 UTC) #7
changseok
Any other comment?
5 years, 6 months ago (2015-06-12 20:56:30 UTC) #8
Justin Novosad
On 2015/06/12 20:56:30, changseok wrote: > Any other comment? lgtm
5 years, 6 months ago (2015-06-15 13:56:24 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1147363009/20001
5 years, 6 months ago (2015-06-16 02:47:40 UTC) #11
commit-bot: I haz the power
5 years, 6 months ago (2015-06-16 07:06:59 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197160

Powered by Google App Engine
This is Rietveld 408576698