Last Comment Bug 649114 - Text-anchor middle is not computed correctly for element scaled to 0
: Text-anchor middle is not computed correctly for element scaled to 0
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Robert Longson
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: 639564
  Show dependency treegraph
 
Reported: 2011-04-11 13:50 PDT by Marek Raida
Modified: 2012-02-06 15:49 PST (History)
4 users (show)
longsonr: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Broken testcase with initial scale = 0 (576 bytes, image/svg+xml)
2011-04-11 13:50 PDT, Marek Raida
no flags Details
Case with workaround, initial scale = 0.0001 (592 bytes, image/svg+xml)
2011-04-11 13:51 PDT, Marek Raida
no flags Details
patch (6.25 KB, patch)
2012-01-21 13:13 PST, Robert Longson
no flags Details | Diff | Splinter Review
address review comments (6.35 KB, patch)
2012-01-23 10:39 PST, Robert Longson
jwatt: review+
Details | Diff | Splinter Review

Description Marek Raida 2011-04-11 13:50:14 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.2a1pre) Gecko/20110411 Firefox/4.2a1pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.2a1pre) Gecko/20110411 Firefox/4.2a1pre

If text element, centered, is scaled to 0 and then scaled in, it behaves like text-anchor start and not middle. Having it initially scaled to very small, but non zero size - like 0.0001, helps, and it behaves properly then.

Reproducible: Always

Steps to Reproduce:
1. Open file from attachment

Actual Results:  
Text is after 1s zoomed in, right aligned to line in the middle (behaves like start anchor)

Expected Results:  
Text should be after 1s zoomed in, centered against line in the middle

All other browsers compute text position properly, even when initially scaled to zero
Comment 1 Marek Raida 2011-04-11 13:50:56 PDT
Created attachment 525158 [details]
Broken testcase with initial scale = 0
Comment 2 Marek Raida 2011-04-11 13:51:32 PDT
Created attachment 525159 [details]
Case with workaround, initial scale = 0.0001
Comment 3 (mostly gone) XtC4UaLL [:xtc4uall] 2011-04-12 13:35:08 PDT
Confirmed against Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110412 Firefox/4.2a1pre ID:20110412030535
Comment 4 Robert Longson 2012-01-21 13:13:59 PST
Created attachment 590509 [details] [diff] [review]
patch
Comment 5 Jonathan Watt [:jwatt] 2012-01-23 02:39:57 PST
What is the SUPPRESS_INVALIDATION for? And why in the one case of setting updateGlyphMetrics but not the other?
Comment 6 Robert Longson 2012-01-23 10:39:39 PST
Created attachment 590778 [details] [diff] [review]
address review comments
Comment 7 Jonathan Watt [:jwatt] 2012-01-23 10:45:12 PST
Comment on attachment 590778 [details] [diff] [review]
address review comments

Thanks.
Comment 9 Robert Longson 2012-01-23 12:41:11 PST
That didn't go so well. Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/1efdc864bce2 to backout patch
Comment 10 Robert Longson 2012-01-23 12:45:27 PST
Need to look into 

411334-1.xml
621918-1.svg
621918-2.svg
Comment 11 Robert Longson 2012-01-28 05:59:22 PST
relanded https://hg.mozilla.org/integration/mozilla-inbound/rev/5313091609ad without the SUPPRESS_INVALIDATION part that seemed to upset things so much.
Comment 12 Joe Drew (not getting mail) 2012-01-28 18:52:31 PST
https://hg.mozilla.org/mozilla-central/rev/5313091609ad

Note You need to log in before you can comment on or make changes to this bug.