Whitespace node between two <input>s is ignored if the inputs start out as position:absolute

RESOLVED FIXED

Status

()

Core
Layout: Text
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

(Blocks: 1 bug, {regression, testcase})

Trunk
x86
Mac OS X
regression, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
The testcase and reference consist of:

<input class="a">
<input class="a">

In the testcase, they start out as position:absolute and become position:static, while in the reference they are always position:static.  Somehow this leads to a difference in rendering: in the testcase, the space between them is ignored.
(Reporter)

Comment 1

11 years ago
Created attachment 279842 [details]
testcase
(Reporter)

Comment 2

11 years ago
Created attachment 279843 [details]
reference
So the relevant text frame in the testcase is:

              Text(2)@0x88136b0[0,1,T]  next=0x881a888 {9240,1080,0,0} [content=0x881a2e0] sc=0x8813554 pst=:-moz-non-element<
                "\n"
              >

and in the reference is:

              Text(2)@0x8845dd0[0,1,T]  next=0x8846408 {9240,1080,240,0} [content=0x8717698] sc=0x8845c74 pst=:-moz-non-element<
                "\n"
              >

Note the width difference: 0 vs 240.  At a guess, we don't reflow this frame but need to because its collapsing behavior changed.  Or something.
This is a regression from bug 385344, which made textruns be able to go through placeholders.  But before that, the same effect could have been achieved by inserting the nodes instead of changing their style.

The real issue is a new-textframe regression: if a textrun spans two adjacent textframes and another frame is inserted between them, the textrun on the adjacent textframes needs to be invalidated.  I'll attach a testcase to that effect; there should be spaces on both sides of the <input> in that testcase.

The obvious way to fix this would be to hook into SetNext/PreviousSibling on textframes, but those are non-virtual...
Severity: minor → normal
Component: Layout: R & A Pos → Layout: Fonts and Text
Flags: blocking1.9?
Keywords: regression
QA Contact: layout.r-and-a-pos → layout.fonts-and-text
(Reporter)

Comment 10

11 years ago
Now that bug 385607 is fixed, both reftests in this bug pass.  Should they be checked in?
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Flags: blocking1.9? → in-testsuite?
Resolution: --- → FIXED
Sure, I'll do that right now.
checked in those tests. Thanks.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.