Closed
Bug 241833
Opened 21 years ago
Closed 21 years ago
Simplify how to detect a textframe inside a form control in nsLineLayout
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: rbs, Assigned: rbs)
Details
Attachments
(1 file, 1 obsolete file)
10.59 KB,
patch
|
rbs
:
review+
rbs
:
superreview+
|
Details | Diff | Splinter Review |
nsLineLayout has a block of code entitled:
// SEC: added this next block for bug 45152
...big loop here...
This code can be greatly simplify. I will attach a patch.
Text input control frames are the only frames with an independent selection
controller for their textarea/text <input>. The NS_FRAME_INDEPENDENT_SELECTION
bit is set in nsTextControlFrame::CreateAnonymousContent, and this gets
propagated to children in nsFrame::Init(). So testing this bit (together with
textFrame == frameType) provides a fast and reliable detection.
Attachment #147106 -
Flags: superreview?(dbaron)
Attachment #147106 -
Flags: review?(dbaron)
![]() |
||
Comment 3•21 years ago
|
||
So... parents are supposed to invalidate kids on size changes, right? It sounds
like nsLineLayout isn't doing that, based on comments in bug 45152?
When the size of a child changes, either the parent or the child is supposed to
invalidate the difference between the new area and the old area of the child.
It's embarrassing, but I actually can't remember whether it's the parent or child.
Hey, I thought you were off duty :-)
bug 45152 comment 24 gives a very good explanation. I actually think that fix
wasn't a hack. It was just implemented sub-optimally.
But IsIncrementalDamageConstrained doesn't exist anymore -- text frames are now
reflow roots -- so in the cases when they are reflowed from their parents, we
shouldn't ignore the invalidates, right?
I can't reproduce either bug 45152 or bug 50758 with this patch. I think this
is just leftover from the old solution that was removed in bug 135146.
Any chance somebody could test this on Windows?
Re: comment #6
Let me test out on Win2K. I indeed considered such a surgical removal in view of
the fact that text control are not reflow roots, but didn't have enough data to
make a case.
Assignee | ||
Comment 10•21 years ago
|
||
s/text control are not reflow roots/text controls are now reflow roots/
[ignore such typos...] ^
Assignee | ||
Comment 11•21 years ago
|
||
Comment on attachment 147659 [details] [diff] [review]
remove these ugly hacks
I tried this surgical patch on Win2K. As far as I could test, it didn't regress
the earlier bugs.
Attachment #147659 -
Flags: superreview+
Attachment #147659 -
Flags: review+
Attachment #147106 -
Attachment is obsolete: true
Attachment #147106 -
Flags: superreview?(dbaron)
Attachment #147106 -
Flags: review?(dbaron)
Fixed (by removal of overly-complicated code :-), 2004-05-04 16:56 -0700.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This seems to have been a measurable pageload time gain (~0.5%).
Assignee | ||
Comment 14•21 years ago
|
||
...meaning it is worthy of 1.7f.
You need to log in
before you can comment on or make changes to this bug.
Description
•