Bug 14639 - <use> with % lengths does not update on window resize
Summary: <use> with % lengths does not update on window resize
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
URL: http://www.peepo.co.uk
Keywords: HasReduction, Regression
: 24802 (view as bug list)
Depends on:
Blocks: 15124
  Show dependency treegraph
Reported: 2007-07-17 06:25 PDT by jay
Modified: 2010-01-21 15:23 PST (History)
3 users (show)

See Also:

clip-path example (910 bytes, image/svg+xml)
2007-09-08 09:01 PDT, jay
no flags Details
simpler test case (410 bytes, image/svg+xml)
2007-09-26 12:11 PDT, Eric Seidel (no email)
no flags Details
Another test (354 bytes, image/svg+xml)
2009-05-03 23:31 PDT, John Moe
no flags Details
Initial patch (92.52 KB, patch)
2010-01-21 14:54 PST, Nikolas Zimmermann
krit: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jay 2007-07-17 06:25:38 PDT
visit url                   note image fits screen
resize window       note image does not resize
the user has to reload the page
Comment 1 Nikolas Zimmermann 2007-07-23 03:58:52 PDT
Hi Jay!

Thanks for the report, bug confirmed with feature-branch.

Comment 2 jay 2007-09-08 09:01:13 PDT
Created attachment 16227 [details]
clip-path example
Comment 3 Eric Seidel (no email) 2007-09-26 12:10:34 PDT
I have a simpler test case which I'll attach (still not one suitable for DRT however).
Comment 4 Eric Seidel (no email) 2007-09-26 12:11:00 PDT
Created attachment 16400 [details]
simpler test case
Comment 5 Eric Seidel (no email) 2007-09-26 12:13:27 PDT
This is probably related to bug 14003 (since SVGUseElement uses a RenderSVGContainer)
Comment 6 Eric Seidel (no email) 2007-12-15 01:11:50 PST
This regressed before Safari 3 shipped.  It would be great to make this into a stand-alone test and run bisect-builds on it.
Comment 7 Eric Seidel (no email) 2007-12-15 01:43:46 PST
I think we have another similar bug in bugzilla.  I expect that the layout message is just not getting propagated all the way down.  The SVG rendering tree assumes that only if you are set as selfNeedsLayout() then, and only then did your bounds change and thus your kids need to be forced to layout.  In the window resize case, that's not always true (due to the way that resize is implemented in the HTML rendering tree).  I expect that's what is causing this.
Comment 8 jay 2008-04-27 02:07:50 PDT
This seems to have got very much worse?

there is now no resizing at all as the window size is changed.
today's nightlies
Comment 9 John Moe 2009-05-03 23:31:54 PDT
Created attachment 29985 [details]
Another test

I think this is the same bug, bug a maybe an easier test.  Start with a small browser window.  Resize it larger.  In Firefox, it will stay green.  In Safari, the new area is blue.
Comment 10 Nikolas Zimmermann 2010-01-12 16:55:25 PST
Erics old guess is right, I am working on a fix that should fix all (re-)layouting issues with percentual sized content, in SVG standalone as well as XHTML mixed documents.

The peepo testcase is still valid, and I've it fixed locally, expect a patch during the next day(s).
Comment 11 Jeff Schiller 2010-01-12 17:38:58 PST
Great to hear Nikolas!

Does this include Bug 17424?
Comment 12 Nikolas Zimmermann 2010-01-12 17:47:02 PST
(In reply to comment #11)
> Great to hear Nikolas!
> Does this include Bug 17424?

Yeah, just tested it, works just fine. Still need to create some new testcases, but in principle the root of the issue is finally fixed.
Comment 13 Nikolas Zimmermann 2010-01-19 19:20:37 PST
There is still a problem with the peepo website, <symbol> is not yet right. <use> on <use> and friends work great now, I'm aware of the issue and will fix it soon.
Comment 14 Nikolas Zimmermann 2010-01-21 14:54:00 PST
Created attachment 47150 [details]
Initial patch

Finally peepo.co.uk is fixed :-)
Comment 15 Nikolas Zimmermann 2010-01-21 14:54:16 PST
*** Bug 24802 has been marked as a duplicate of this bug. ***
Comment 16 Dirk Schulze 2010-01-21 15:17:57 PST
Comment on attachment 47150 [details]
Initial patch

Comment 17 Nikolas Zimmermann 2010-01-21 15:23:41 PST
Fixed in r53656.