Bug 77768

Summary: Fix bugs in two SVG manual tests: animateColor-from-by.svg and svg-link-hover-use.svg
Product: WebKit Reporter: Philip Rogers <pdr>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, krit, rwlbuis, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix animateColor-from-by.svg and svg-link-hover-use.svg
pdr: review-
Fix bug in svg-link-hover-use.svg none

Description Philip Rogers 2012-02-03 13:01:08 PST
Two small bugs:

1) svg-link-hover-use.svg uses xlink:href="rect" but it should use xlink:href="#rect" according to http://www.w3.org/TR/SVG/struct.html#UseElement.

2) animateColor-from-by.svg says that it animates from "red to purple" but it should say from "red to blue".
Comment 1 Philip Rogers 2012-02-03 13:06:12 PST
Created attachment 125392 [details]
Fix animateColor-from-by.svg and svg-link-hover-use.svg
Comment 2 Eric Seidel (no email) 2012-02-03 21:53:49 PST
Comment on attachment 125392 [details]
Fix animateColor-from-by.svg and svg-link-hover-use.svg

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

> ManualTests/svg-link-hover-use.svg:6
> +      <use xlink:href="#rect" onmouseover="alert('foo')" />

I think this is technically incorrect, but I think we handle this case regardless, no?

> ManualTests/animation/animateColor-from-by.svg:5
> -  <text x='10' y='120'>The rect should animate from red to purple over 3 seconds</text>
> +  <text x='10' y='120'>The rect should animate from red to blue over 3 seconds</text>

Why?  It starts at DD00DD and should got to DD00DD which seems purple to me...
Comment 3 Philip Rogers 2012-02-04 13:22:48 PST
(In reply to comment #2)
> (From update of attachment 125392 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=125392&action=review
> 
> > ManualTests/svg-link-hover-use.svg:6
> > +      <use xlink:href="#rect" onmouseover="alert('foo')" />
> 
> I think this is technically incorrect, but I think we handle this case regardless, no?

At one point we did allow it but recently the IRI handling was improved with https://bugs.webkit.org/show_bug.cgi?id=63283, causing this test to fail. The bug report discusses this case and it looks like the conclusion was that it's best if we err on the side of correctness. Firefox handles this similarly, causing the test to fail without the #.

> 
> > ManualTests/animation/animateColor-from-by.svg:5
> > -  <text x='10' y='120'>The rect should animate from red to purple over 3 seconds</text>
> > +  <text x='10' y='120'>The rect should animate from red to blue over 3 seconds</text>
> 
> Why?  It starts at DD00DD and should got to DD00DD which seems purple to me...

Great catch. https://bugs.webkit.org/show_bug.cgi?id=77812
Comment 4 Philip Rogers 2012-02-04 13:29:05 PST
Created attachment 125499 [details]
Fix bug in svg-link-hover-use.svg
Comment 5 Eric Seidel (no email) 2012-02-04 14:28:16 PST
Comment on attachment 125499 [details]
Fix bug in svg-link-hover-use.svg

OK.
Comment 6 WebKit Review Bot 2012-02-04 14:57:13 PST
Comment on attachment 125499 [details]
Fix bug in svg-link-hover-use.svg

Clearing flags on attachment: 125499

Committed r106747: <http://trac.webkit.org/changeset/106747>
Comment 7 WebKit Review Bot 2012-02-04 14:57:17 PST
All reviewed patches have been landed.  Closing bug.