Text-anchor middle is not computed correctly for element scaled to 0

RESOLVED FIXED in mozilla12

Status

()

Core
SVG
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Marek Raida, Assigned: Robert Longson)

Tracking

({testcase})

Trunk
mozilla12
testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
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
(Reporter)

Comment 1

6 years ago
Created attachment 525158 [details]
Broken testcase with initial scale = 0
(Reporter)

Comment 2

6 years ago
Created attachment 525159 [details]
Case with workaround, initial scale = 0.0001
Confirmed against Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110412 Firefox/4.2a1pre ID:20110412030535
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Version: unspecified → Trunk
(Assignee)

Comment 4

5 years ago
Created attachment 590509 [details] [diff] [review]
patch
Assignee: nobody → longsonr
Attachment #590509 - Flags: review?(jwatt)
What is the SUPPRESS_INVALIDATION for? And why in the one case of setting updateGlyphMetrics but not the other?
(Assignee)

Comment 6

5 years ago
Created attachment 590778 [details] [diff] [review]
address review comments
Attachment #590509 - Attachment is obsolete: true
Attachment #590509 - Flags: review?(jwatt)
Attachment #590778 - Flags: review?(jwatt)
Comment on attachment 590778 [details] [diff] [review]
address review comments

Thanks.
Attachment #590778 - Flags: review?(jwatt) → review+
(Assignee)

Comment 8

5 years ago
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/f500e9a0253c
Flags: in-testsuite+
Target Milestone: --- → mozilla12
(Assignee)

Updated

5 years ago
OS: Windows 7 → All
Hardware: x86 → All
(Assignee)

Comment 9

5 years ago
That didn't go so well. Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/1efdc864bce2 to backout patch
(Assignee)

Comment 10

5 years ago
Need to look into 

411334-1.xml
621918-1.svg
621918-2.svg
(Assignee)

Comment 11

5 years ago
relanded https://hg.mozilla.org/integration/mozilla-inbound/rev/5313091609ad without the SUPPRESS_INVALIDATION part that seemed to upset things so much.
https://hg.mozilla.org/mozilla-central/rev/5313091609ad
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Blocks: 639564
You need to log in before you can comment on or make changes to this bug.