Bug 98950 - Bad copy constructor in StyleRareNonInheritedData
Summary: Bad copy constructor in StyleRareNonInheritedData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rik Cabanier
URL:
Keywords:
Depends on:
Blocks: 98450
  Show dependency treegraph
 
Reported: 2012-10-10 13:14 PDT by Rik Cabanier
Modified: 2012-10-11 23:25 PDT (History)
7 users (show)

See Also:


Attachments
first try (1.32 KB, patch)
2012-10-10 13:21 PDT, Rik Cabanier
rniwa: review-
rniwa: commit-queue-
Details | Formatted Diff | Diff
Added a test (6.01 KB, patch)
2012-10-11 14:50 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
Fixed identation (6.02 KB, patch)
2012-10-11 14:52 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
Simplified test (5.24 KB, patch)
2012-10-11 15:13 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
cleaned up output (5.14 KB, patch)
2012-10-11 15:32 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
Cleaned up output (5.12 KB, patch)
2012-10-11 16:09 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
more testfile cleanup (5.11 KB, patch)
2012-10-11 16:30 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
More testfile cleanup (5.20 KB, patch)
2012-10-11 16:40 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
strange failure. Try again for EWS output (5.20 KB, text/plain)
2012-10-11 20:20 PDT, Rik Cabanier
no flags Details
Updated SVG transitions test (5.81 KB, patch)
2012-10-11 20:42 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff
Patch for landing (5.92 KB, patch)
2012-10-11 21:40 PDT, Rik Cabanier
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rik Cabanier 2012-10-10 13:14:43 PDT
The blend mode is not correctly inherited which causes problems when you try to query it later.
Comment 1 Rik Cabanier 2012-10-10 13:21:39 PDT
Created attachment 168060 [details]
first try
Comment 2 Zoltan Horvath 2012-10-10 13:35:11 PDT
Comment on attachment 168060 [details]
first try

Yeap, good catch, it's a typo copy/paste from the other constructor.
I would give r+ to it!
Comment 3 Ryosuke Niwa 2012-10-10 13:40:11 PDT
Comment on attachment 168060 [details]
first try

View in context: https://bugs.webkit.org/attachment.cgi?id=168060&action=review

> Source/WebCore/ChangeLog:10
> +        No new tests: no change in functionality.

There should certainly be a behavior change! You should be able to verify the fix via getComputedStyle.
Comment 4 Eric Seidel (no email) 2012-10-10 13:57:00 PDT
Comment on attachment 168060 [details]
first try

Yes, please test this.
Comment 5 Ryosuke Niwa 2012-10-10 14:14:34 PDT
Comment on attachment 168060 [details]
first try

r- due to the lack of tests.
Comment 6 Rik Cabanier 2012-10-10 14:30:21 PDT
(In reply to comment #3)
> (From update of attachment 168060 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168060&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        No new tests: no change in functionality.
> 
> There should certainly be a behavior change! You should be able to verify the fix via getComputedStyle.

I tried to write a test with GetComputedStyle, but it was working fine in the old version.
I'm unsure how I can test this fix
Comment 7 Ryosuke Niwa 2012-10-10 15:15:23 PDT
(In reply to comment #6)
> I tried to write a test with GetComputedStyle, but it was working fine in the old version.
> I'm unsure how I can test this fix

You need to make WebKit use this copy constructor.
Comment 8 Rik Cabanier 2012-10-11 14:50:46 PDT
Created attachment 168281 [details]
Added a test
Comment 9 Rik Cabanier 2012-10-11 14:52:41 PDT
Created attachment 168282 [details]
Fixed identation
Comment 10 Ryosuke Niwa 2012-10-11 14:59:54 PDT
Comment on attachment 168282 [details]
Fixed identation

View in context: https://bugs.webkit.org/attachment.cgi?id=168282&action=review

> LayoutTests/transitions/blendmode-transitions-expected.txt:3
> +CONSOLE MESSAGE: line 240: Failed to pause '-webkit-blend-mode' transition on element 'box'
> +BOX
> +PASS - "-webkit-blend-mode" property for "box" element at 0.5s saw something close to: difference

What kind of output do we get without your fix?
Comment 11 Rik Cabanier 2012-10-11 15:00:39 PDT
(In reply to comment #10)
> (From update of attachment 168282 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168282&action=review
> 
> > LayoutTests/transitions/blendmode-transitions-expected.txt:3
> > +CONSOLE MESSAGE: line 240: Failed to pause '-webkit-blend-mode' transition on element 'box'
> > +BOX
> > +PASS - "-webkit-blend-mode" property for "box" element at 0.5s saw something close to: difference
> 
> What kind of output do we get without your fix?

you get the default value: 'normal'
Comment 12 Alexandru Chiculita 2012-10-11 15:03:39 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=168282&action=review

Looks good! I think the test could be simplified.

> LayoutTests/platform/chromium/TestExpectations:110
> +# Fails because chromium doesn't have blendmode

I think it is better to just say that Blend Mode is not enabled on Chromium yet :)

> LayoutTests/transitions/blendmode-transitions.html:17
> +      -webkit-transition-duration: 1s;
> +      -webkit-transition-timing-function: linear;
> +      -webkit-transition-property: -webkit-box-shadow, text-shadow;
> +	  -webkit-blend-mode: difference;

Why not just have a simple test to check the computed style before and after the change? This looks like it could be a simple JS test instead. Anyway, using a transition seems a little too much :)

> LayoutTests/transitions/blendmode-transitions.html:33
> +      -webkit-box-shadow: 0 -20px 10px red, 0 20px 10px blue;
> +      text-shadow: 0 -20px 10px red, 0 20px 10px blue;

Do you really need the shadows?

> LayoutTests/transitions/resources/transition-test-helpers.js:166
> +                case CSSPrimitiveValue.CSS_IDENT:

I think you are still not testing this one. You should pass in an arbitrary string and see what happens and have it as a bad parsing test (also a JS only test could handle this).
Comment 13 Rik Cabanier 2012-10-11 15:08:36 PDT
(In reply to comment #12)
> View in context: https://bugs.webkit.org/attachment.cgi?id=168282&action=review
> 
> Looks good! I think the test could be simplified.
> 
> > LayoutTests/platform/chromium/TestExpectations:110
> > +# Fails because chromium doesn't have blendmode
> 
> I think it is better to just say that Blend Mode is not enabled on Chromium yet :)

OK
Will do

> 
> > LayoutTests/transitions/blendmode-transitions.html:17
> > +      -webkit-transition-duration: 1s;
> > +      -webkit-transition-timing-function: linear;
> > +      -webkit-transition-property: -webkit-box-shadow, text-shadow;
> > +	  -webkit-blend-mode: difference;
> 
> Why not just have a simple test to check the computed style before and after the change? This looks like it could be a simple JS test instead. Anyway, using a transition seems a little too much :)

The value is only wrong DURING the transition  :-)
So, I have to check midway through.

> 
> > LayoutTests/transitions/blendmode-transitions.html:33
> > +      -webkit-box-shadow: 0 -20px 10px red, 0 20px 10px blue;
> > +      text-shadow: 0 -20px 10px red, 0 20px 10px blue;
> 
> Do you really need the shadows?

I need something to transition. Does it matter if it's a shadow?

> 
> > LayoutTests/transitions/resources/transition-test-helpers.js:166
> > +                case CSSPrimitiveValue.CSS_IDENT:
> 
> I think you are still not testing this one. You should pass in an arbitrary string and see what happens and have it as a bad parsing test (also a JS only test could handle this).

The result of getcomputedstyle is an CSS_IDENT.
I will get a JS error without it.
Comment 14 Ryosuke Niwa 2012-10-11 15:10:13 PDT
Yeah, it'll be nice if we can simplify the test.
Comment 15 Rik Cabanier 2012-10-11 15:13:57 PDT
Created attachment 168284 [details]
Simplified test
Comment 16 Rik Cabanier 2012-10-11 15:32:20 PDT
Created attachment 168289 [details]
cleaned up output
Comment 17 Rik Cabanier 2012-10-11 16:09:47 PDT
Created attachment 168306 [details]
Cleaned up output
Comment 18 Kenneth Rohde Christiansen 2012-10-11 16:28:16 PDT
Comment on attachment 168306 [details]
Cleaned up output 

View in context: https://bugs.webkit.org/attachment.cgi?id=168306&action=review

> LayoutTests/transitions/blendmode-transitions.html:44
> +
> +  <div id="box" class="box">BOX</div>
> +
> +

Why double newlines?
Comment 19 Rik Cabanier 2012-10-11 16:29:57 PDT
(In reply to comment #18)
> (From update of attachment 168306 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168306&action=review
> 
> > LayoutTests/transitions/blendmode-transitions.html:44
> > +
> > +  <div id="box" class="box">BOX</div>
> > +
> > +
> 
> Why double newlines?

no reason.
I will clean up
Comment 20 Rik Cabanier 2012-10-11 16:30:32 PDT
Created attachment 168311 [details]
more testfile cleanup
Comment 21 Rik Cabanier 2012-10-11 16:40:36 PDT
Created attachment 168314 [details]
More testfile cleanup
Comment 22 Ryosuke Niwa 2012-10-11 16:42:37 PDT
Comment on attachment 168314 [details]
More testfile cleanup

View in context: https://bugs.webkit.org/attachment.cgi?id=168314&action=review

> LayoutTests/transitions/blendmode-transitions.html:1
> +<!DOCTYPE>

It should be <!DOCTYPE html>
Comment 23 Eric Seidel (no email) 2012-10-11 16:44:24 PDT
Comment on attachment 168314 [details]
More testfile cleanup

The test is larger than needed, still, but LGTM.
Comment 24 Rik Cabanier 2012-10-11 16:48:56 PDT
(In reply to comment #22)
> (From update of attachment 168314 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168314&action=review
> 
> > LayoutTests/transitions/blendmode-transitions.html:1
> > +<!DOCTYPE>
> 
> It should be <!DOCTYPE html>

There are other tests that have the incorrect doctype.
If you file a bug, I will fix it.
Comment 25 WebKit Review Bot 2012-10-11 18:31:30 PDT
Comment on attachment 168314 [details]
More testfile cleanup

Rejecting attachment 168314 [details] from commit-queue.

New failing tests:
transitions/svg-transitions.html
Full output: http://queues.webkit.org/results/14252760
Comment 26 WebKit Review Bot 2012-10-11 19:16:15 PDT
Comment on attachment 168314 [details]
More testfile cleanup

Attachment 168314 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14254747

New failing tests:
transitions/svg-transitions.html
Comment 27 Rik Cabanier 2012-10-11 20:20:09 PDT
Created attachment 168343 [details]
strange failure. Try again for EWS output
Comment 28 Build Bot 2012-10-11 20:32:12 PDT
Comment on attachment 168314 [details]
More testfile cleanup

Attachment 168314 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14255802

New failing tests:
transitions/blendmode-transitions.html
transitions/svg-transitions.html
Comment 29 Rik Cabanier 2012-10-11 20:42:42 PDT
Created attachment 168347 [details]
Updated SVG transitions test
Comment 30 Build Bot 2012-10-11 21:26:15 PDT
Comment on attachment 168347 [details]
Updated SVG transitions test

Attachment 168347 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14262385

New failing tests:
transitions/blendmode-transitions.html
Comment 31 Rik Cabanier 2012-10-11 21:40:00 PDT
Created attachment 168355 [details]
Patch for landing
Comment 32 WebKit Review Bot 2012-10-11 23:25:13 PDT
Comment on attachment 168355 [details]
Patch for landing

Clearing flags on attachment: 168355

Committed r131146: <http://trac.webkit.org/changeset/131146>
Comment 33 WebKit Review Bot 2012-10-11 23:25:19 PDT
All reviewed patches have been landed.  Closing bug.