Closed Bug 295483 Opened 19 years ago Closed 4 years ago

Implement nsTextFrame chain for line layout

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

We need to nsTextFrame chain for bug 164700, bug bug 156369, bug 289130 and bug
288439. Because these bug needs the first character of next frame or last
character of previous frame.

Currently, we have mNextInFlow. But it cannot solve to the follwing case.

A<span style="position: absolute; top: 500px;">B</span>C

In this case, the mNextInFlow is null. But, for rendering, we need to get C in A.
Isn't there already some code in nsTextFrame to find the next frame? (Which
might not be a text frame --- it could be any inline frame.)
Roc:

Really?
Can we get the next (any) frame from nsTextFrame?

I think that we can get the next frame only after all text frame's reflow.
Therefore, I think that I will create the chain at nsBlockFrame::PlaceLine, like
TrimTrailingWhiteSpace.
GetNextSibling is not related the line layout. 
e.g., the end of line frame's GetNextSibling returns not null.
nsLineLayout::FindNextText()

we use that for, e.g., <a>x&nbsp;</a><b>y</b>. In this case, "x y" has to be
measured as a single non-breakable unit to see if it fits. (It has sufficently
matured and is robust enough to deal with all sorts of nesting.)

As this kind of information is needed at reflow, it is okay to assume that a
linelayout object will be there. Then, at paint, it is assumed that whatever has
been flagged at reflow can be recovered (like trimming spaces or ignoring parts
of the text).
No longer blocks: 288439

This was filed for old design, so that I close this bug.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.