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

Issue 2351363002: Make CSSStyleImageValue a member of CanvasImageSource. (Closed)

Created:
4 years, 3 months ago by Gleb Lanbin
Modified:
4 years, 2 months ago
CC:
chromium-reviews, dshwang, blink-reviews-style_chromium.org, ajuma+watch-canvas_chromium.org, blink-reviews-css, blink-reviews-html_chromium.org, Justin Novosad, haraken, dglazkov+blink, Rik, apavlov+blink_chromium.org, darktears, blink-reviews, blink-reviews-bindings_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CSSStyleImageValue a member of CanvasImageSource. This will make it possible to call BaseRenderingContext2D.drawImage with CSSOM Style Image object as an argument. BUG=567358 TEST=third_party/WebKit/LayoutTests/csspaint/paint2d-image.html Committed: https://crrev.com/a9f3e18e97d2726023ab6e8016935fc8617a489e Cr-Commit-Position: refs/heads/master@{#422010}

Patch Set 1 #

Total comments: 10

Patch Set 2 : added additional nullptr checks to getSourceImageForCanvas, changed toImageSourceInternal to includ… #

Total comments: 3

Patch Set 3 : throw a TypeError exception if cssPaintAPIEnabled != true #

Patch Set 4 : Override isAccelerated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -41 lines) Patch
M third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.image.string-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.image.undefined-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/csspaint/paint2d-image.html View 1 chunk +8 lines, -17 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-image-expected.html View 1 chunk +12 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/csspaint/resources/html5.png View Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour-expected.txt View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt View 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/generated.gni View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.h View 1 2 3 3 chunks +26 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp View 1 2 3 3 chunks +38 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 45 (25 generated)
Gleb Lanbin
4 years, 3 months ago (2016-09-20 22:13:58 UTC) #5
ikilpatrick
approach looks good. +junov. https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp File third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp (right): https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp#newcode56 third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp:56: PassRefPtr<Image> CSSStyleImageValue::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint, SnapshotReason, ...
4 years, 2 months ago (2016-09-27 18:06:00 UTC) #9
Gleb Lanbin
https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp File third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp (right): https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp#newcode56 third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp:56: PassRefPtr<Image> CSSStyleImageValue::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint, SnapshotReason, On 2016/09/27 18:06:00, ikilpatrick ...
4 years, 2 months ago (2016-09-27 19:37:18 UTC) #10
Justin Novosad
Overall approach is good IMHO https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp File third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp (right): https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp#newcode61 third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp:61: return m_imageValue->cachedImage()->cachedImage()->getImage()->imageForDefaultFrame(); Confident you ...
4 years, 2 months ago (2016-09-28 15:41:59 UTC) #11
Gleb Lanbin
https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp File third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp (right): https://codereview.chromium.org/2351363002/diff/20001/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp#newcode61 third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp:61: return m_imageValue->cachedImage()->cachedImage()->getImage()->imageForDefaultFrame(); On 2016/09/28 15:41:58, Justin Novosad wrote: > ...
4 years, 2 months ago (2016-09-28 16:58:23 UTC) #12
Justin Novosad
lgtm for modules/canvas2d https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp (right): https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp#newcode873 third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp:873: return RuntimeEnabledFeatures::cssPaintAPIEnabled() ? value.getAsCSSImageValue() : nullptr; ...
4 years, 2 months ago (2016-09-28 17:12:33 UTC) #13
Gleb Lanbin
Dirk, can I ask for a rubber stamp LGTM to change third_party/WebKit/Source/bindings/modules/v8/generated.gni ?
4 years, 2 months ago (2016-09-28 17:15:47 UTC) #15
Justin Novosad
https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp (right): https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp#newcode873 third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp:873: return RuntimeEnabledFeatures::cssPaintAPIEnabled() ? value.getAsCSSImageValue() : nullptr; Wait a second... ...
4 years, 2 months ago (2016-09-28 17:17:35 UTC) #18
Dirk Pranke
lgtm.
4 years, 2 months ago (2016-09-28 17:35:46 UTC) #20
Gleb Lanbin
PTAL https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp (right): https://codereview.chromium.org/2351363002/diff/40001/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp#newcode873 third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp:873: return RuntimeEnabledFeatures::cssPaintAPIEnabled() ? value.getAsCSSImageValue() : nullptr; On 2016/09/28 ...
4 years, 2 months ago (2016-09-28 17:47:00 UTC) #21
ikilpatrick
lgtm
4 years, 2 months ago (2016-09-28 18:05:14 UTC) #22
Gleb Lanbin
+ meade@ Eddy, could you review and LGTM changes in third_party/WebKit/Source/core/css/cssom/*
4 years, 2 months ago (2016-09-28 18:10:28 UTC) #24
meade_UTC10
\o/ lgtm!
4 years, 2 months ago (2016-09-29 04:41:50 UTC) #25
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/2351363002/60001
4 years, 2 months ago (2016-09-29 04:51:15 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/232435) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 2 months ago (2016-09-29 05:03:25 UTC) #30
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/2351363002/80001
4 years, 2 months ago (2016-09-29 22:50:34 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/151057)
4 years, 2 months ago (2016-09-30 00:56:15 UTC) #39
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/2351363002/80001
4 years, 2 months ago (2016-09-30 00:57:52 UTC) #41
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 2 months ago (2016-09-30 01:54:13 UTC) #43
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 01:57:54 UTC) #45
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a9f3e18e97d2726023ab6e8016935fc8617a489e
Cr-Commit-Position: refs/heads/master@{#422010}

Powered by Google App Engine
This is Rietveld 408576698