Closed
Bug 413542
Opened 17 years ago
Closed 17 years ago
percentage margins on inline elements are ignored in bidi pages
Categories
(Core :: Layout: Text and Fonts, defect, P2)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
People
(Reporter: fassino, Assigned: smontagu)
Details
(Keywords: regression, testcase)
Attachments
(3 files, 1 obsolete file)
469 bytes,
text/html
|
Details | |
467 bytes,
text/html
|
Details | |
2.65 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008012104 Minefield/3.0b3pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008012104 Minefield/3.0b3pre The presence of certain characters in the source of an utf-8 html file (even if simply inside comments, or in scripts string variables) causes the disappearing of % margins on inline elements. The characters triggering the problem seem to be most Hebrew and Arabic ones (maybe the ones belonging to rtl languages?) Reproducible: Always
Reporter | ||
Comment 1•17 years ago
|
||
A wrapper contains two spans with 20% horizontal margins. An html comment contains the alef (א) character. As a result the margin between the two spans is not rendered. Removing the alef from the comment solves the problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 2•17 years ago
|
||
A somewhat similar problem occurs even in absence of any triggering character, if dir=rtl is declared on the wrapper. I've no idea if the two problems are really related.
There's a bunch of bidi-related stuff that we optimize away if there's nothing bidi-related in the document. Presumably either of those things trigger the "this document has bidi" flag, which is all that's needed to trigger the bug.
Assignee | ||
Comment 4•17 years ago
|
||
When there is a percentage margin, the calls to GetMargin() in nsBidiPresUtils::RepositionFrame() and RepositionInlineFrames() return an empty margin. Maybe we should be using GetUsedMargin() instead?
Assignee | ||
Comment 5•17 years ago
|
||
This is a regression since 1.8
Flags: blocking1.9?
Keywords: regression,
testcase
Assignee | ||
Comment 6•17 years ago
|
||
Assignee: nobody → smontagu
Status: NEW → ASSIGNED
Attachment #298694 -
Flags: superreview?(dbaron)
Attachment #298694 -
Flags: review?(dbaron)
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Updated•17 years ago
|
Component: Layout: Block and Inline → Layout: BiDi Hebrew & Arabic
OS: Windows XP → All
Hardware: PC → All
Summary: percentage margins on inline elements are ignored in presence of certain characters in the source → percentage margins on inline elements are ignored in bidi pages
Attachment #298694 -
Flags: superreview?(dbaron)
Attachment #298694 -
Flags: superreview+
Attachment #298694 -
Flags: review?(dbaron)
Attachment #298694 -
Flags: review+
Comment on attachment 298694 [details] [diff] [review] Patch r+sr=dbaron
(And I'd note that these are both called, from nsBlockFrame::PlaceLine (via the call to bidiUtils->ReorderFrames), which means this is guaranteed to be after the inlines have been reflowed, which is good (and required).)
Assignee | ||
Comment 9•17 years ago
|
||
Padding has the same bug, of course...
Assignee | ||
Comment 10•17 years ago
|
||
...and the same fix
Attachment #298694 -
Attachment is obsolete: true
Attachment #298922 -
Flags: superreview?(dbaron)
Attachment #298922 -
Flags: review?(dbaron)
Comment on attachment 298922 [details] [diff] [review] Patch including padding r+sr=dbaron
Attachment #298922 -
Flags: review?(dbaron) → review+
Attachment #298922 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 12•17 years ago
|
||
Checked in with the testcases as reftests
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: layout.block-and-inline → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•