|
|
Created:
5 years, 8 months ago by b.siddharth Modified:
5 years, 7 months ago CC:
blink-reviews, ed+blinkwatch_opera.com, shans, rjwright, Mike Lawther (Google), blink-reviews-animation_chromium.org, rwlbuis, kouhei+svg_chromium.org, dstockwell, Timothy Loh, krit, f(malita), darktears, gyuyoung2, Stephen Chennney, Steve Block, pdr+svgwatchlist_chromium.org, Eric Willigers Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Target Ref:
refs/heads/master Project:
blink Visibility:
Public. |
DescriptionFix SVG animations for preserveAspectRatio attribute
hasAttribute return false when the attribute is not set
and value still animates
BUG=235256
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194647
Patch Set 1 #
Total comments: 1
Patch Set 2 : Incorporated review comments #
Total comments: 1
Patch Set 3 : Modified the test case for visual difference. #
Messages
Total messages: 26 (4 generated)
b.siddharth@samsung.com changed reviewers: + eae@chromium.org
Please have a look on this CL
eae@chromium.org changed reviewers: + pdr@chromium.org
pdr would be a better reviewer for this
On 2015/04/22 13:09:11, eae wrote: > pdr would be a better reviewer for this Please have a look, Thanks.
b.siddharth@samsung.com changed reviewers: + fs@opera.com
Please check & review, Thanks
Please check & review, Thanks
The very similar test for viewBox got marked as flaky after landing, so please try and make sure that doesn't happen here. My suspicion would be that it's the start of the animation that races with the application of the fragment viewspec. https://codereview.chromium.org/1098273002/diff/1/Source/core/svg/SVGViewSpec.h File Source/core/svg/SVGViewSpec.h (right): https://codereview.chromium.org/1098273002/diff/1/Source/core/svg/SVGViewSpec... Source/core/svg/SVGViewSpec.h:83: if (inheritFromElement->preserveAspectRatio()->currentValue()->align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN && inheritFromElement->preserveAspectRatio()->currentValue()->meetOrSlice() != SVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN) { I believe what you want here is inheritFromElement->preserveAspectRatio()->isSpecified().
On 2015/04/23 at 08:30:32, fs wrote: > The very similar test for viewBox got marked as flaky after landing, so please try and make sure that doesn't happen here. My suspicion would be that it's the start of the animation that races with the application of the fragment viewspec. b.siddharth, Just FYI, you can test this by running the test like so: pdr@yourcomputer:chromium/src/third_party/WebKit$ ./Tools/Scripts/run-webkit-tests [test name] --iterations=100 The test should pass 100% of the time.
Incorporated review comments. Please have a look, Thanks.
Code change looks ok. https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... File LayoutTests/svg/animations/viewspec-checkaspectparams.html (right): https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... LayoutTests/svg/animations/viewspec-checkaspectparams.html:7: <object width="30" height="30" data="resources/viewspec-checkaspectparams.svg#svgView(viewBox(0,0,30,30);preserveAspectRatio(none))"></object> Won't this be the same even you remove the animation in the file?
On 2015/04/24 12:51:21, fs wrote: > Code change looks ok. > > https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... > File LayoutTests/svg/animations/viewspec-checkaspectparams.html (right): > > https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... > LayoutTests/svg/animations/viewspec-checkaspectparams.html:7: <object width="30" > height="30" > data="resources/viewspec-checkaspectparams.svg#svgView(viewBox(0,0,30,30);preserveAspectRatio(none))"></object> > Won't this be the same even you remove the animation in the file? No its not the same case, as when hasAttribute() is used without animation, it return false value. and isSpecified() return true in this case.
On 2015/04/27 12:10:54, b.siddharth wrote: > On 2015/04/24 12:51:21, fs wrote: > > Code change looks ok. > > > > > https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... > > File LayoutTests/svg/animations/viewspec-checkaspectparams.html (right): > > > > > https://codereview.chromium.org/1098273002/diff/20001/LayoutTests/svg/animati... > > LayoutTests/svg/animations/viewspec-checkaspectparams.html:7: <object > width="30" > > height="30" > > > data="resources/viewspec-checkaspectparams.svg#svgView(viewBox(0,0,30,30);preserveAspectRatio(none))"></object> > > Won't this be the same even you remove the animation in the file? > > No its not the same case, as when hasAttribute() is used without animation, it > return false value. > and isSpecified() return true in this case. I meant the visual result. In the standalone file, preserveAspectRatio does not apply (no 'viewBox'), and regardless the value is overridden with 'none' (and a 'viewBox'). There's also that the size is the same, and the viewBox will have no actual effect (1:1 mapping).
Modified the testcase for visual result. Please have a look.
lgtm
lgtm lgtm
On 2015/04/28 15:05:34, fs wrote: > lgtm > > lgtm Darn, now I exceeded my daily quota...
The CQ bit was checked by b.siddharth@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1098273002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=194647
Message was sent while issue was closed.
Tried to open the test file in content_shell (ToT). The test and the ref show differently. The test shows a 256x256 green box at the bottom-left corner in a 500x500 space of the 'object' element, while the ref shows a 500x500 green box filling the 500x500 space of the 'object' element. Is this expected? https://codereview.chromium.org/1126313004/ changes the timing of pixel dump (may delay one loop), and now the test's pixel dump mismatches ref's. I'm wondering if this means the test is broken, or we just need to update the ref.
Message was sent while issue was closed.
On 2015/05/07 23:18:56, Xianzhu wrote: > Tried to open the test file in content_shell (ToT). The test and the ref show > differently. The test shows a 256x256 green box at the bottom-left corner in a > 500x500 space of the 'object' element, while the ref shows a 500x500 green box > filling the 500x500 space of the 'object' element. Is this expected? It's indeed borked... =/ (how did it make it through CQ? Must have been an interesting flake...) It should never be 'bottom-left' though (only 'centered' or 'top-left', where the latter is the expected). > https://codereview.chromium.org/1126313004/ changes the timing of pixel dump > (may delay one loop), and now the test's pixel dump mismatches ref's. I'm > wondering if this means the test is broken, or we just need to update the ref. I'll rewrite the ref to be more obviously correct.
Message was sent while issue was closed.
On 2015/05/08 08:25:21, fs wrote: > On 2015/05/07 23:18:56, Xianzhu wrote: > > Tried to open the test file in content_shell (ToT). The test and the ref show > > differently. The test shows a 256x256 green box at the bottom-left corner in a > > 500x500 space of the 'object' element, while the ref shows a 500x500 green > box > > filling the 500x500 space of the 'object' element. Is this expected? > > It's indeed borked... =/ (how did it make it through CQ? Must have been an > interesting flake...) > > It should never be 'bottom-left' though (only 'centered' or 'top-left', where > the latter is the expected). > > > https://codereview.chromium.org/1126313004/ changes the timing of pixel dump > > (may delay one loop), and now the test's pixel dump mismatches ref's. I'm > > wondering if this means the test is broken, or we just need to update the ref. > > I'll rewrite the ref to be more obviously correct. https://codereview.chromium.org/1131233002/
Message was sent while issue was closed.
On 2015/05/08 08:32:05, fs wrote: > On 2015/05/08 08:25:21, fs wrote: > > On 2015/05/07 23:18:56, Xianzhu wrote: > > > Tried to open the test file in content_shell (ToT). The test and the ref > show > > > differently. The test shows a 256x256 green box at the bottom-left corner in > a > > > 500x500 space of the 'object' element, while the ref shows a 500x500 green > > box > > > filling the 500x500 space of the 'object' element. Is this expected? > > > > It's indeed borked... =/ (how did it make it through CQ? Must have been an > > interesting flake...) > > > > It should never be 'bottom-left' though (only 'centered' or 'top-left', where > > the latter is the expected). > > > > > https://codereview.chromium.org/1126313004/ changes the timing of pixel dump > > > (may delay one loop), and now the test's pixel dump mismatches ref's. I'm > > > wondering if this means the test is broken, or we just need to update the > ref. > > > > I'll rewrite the ref to be more obviously correct. > > https://codereview.chromium.org/1131233002/
Message was sent while issue was closed.
On 2015/05/08 12:08:27, b.siddharth wrote: > On 2015/05/08 08:32:05, fs wrote: > > On 2015/05/08 08:25:21, fs wrote: > > > On 2015/05/07 23:18:56, Xianzhu wrote: > > > > Tried to open the test file in content_shell (ToT). The test and the ref > > show > > > > differently. The test shows a 256x256 green box at the bottom-left corner > in > > a > > > > 500x500 space of the 'object' element, while the ref shows a 500x500 > green > > > box > > > > filling the 500x500 space of the 'object' element. Is this expected? > > > > > > It's indeed borked... =/ (how did it make it through CQ? Must have been an > > > interesting flake...) > > > > > > It should never be 'bottom-left' though (only 'centered' or 'top-left', > where > > > the latter is the expected). > > > > > > > https://codereview.chromium.org/1126313004/ changes the timing of pixel > dump > > > > (may delay one loop), and now the test's pixel dump mismatches ref's. I'm > > > > wondering if this means the test is broken, or we just need to update the > > ref. > > > > > > I'll rewrite the ref to be more obviously correct. > > > > https://codereview.chromium.org/1131233002/ Hello @fs: Thanks for fixing the test case. |