Closed Bug 667653 Opened 13 years ago Closed 13 years ago

Make NS_FRAME_SELECTED_CONTENT on text frames less sticky so we can take the fast text painting path more often

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: perf, Whiteboard: [inbound])

Attachments

(1 file, 1 obsolete file)

Once the frame bit NS_FRAME_SELECTED_CONTENT is set, it's rarely unset
even after the selection has changed to not affect the text frame.
This makes us take the slower paint-with-selection path.
Assignee: nobody → matspal
Attached patch fix (obsolete) — Splinter Review
Add an early return in PaintTextWithSelectionColors when !allTypes
as I believe that means there is no selection for this frame.
Also, remove the NS_FRAME_SELECTED_CONTENT bit in a couple of places
where we know from the SelectionDetails that there is no selection,
to take the fast path until something is selected again.

(this patch applies on top of bug 666669)
Attachment #542361 - Flags: review?(roc)
Comment on attachment 542361 [details] [diff] [review]
fix

Review of attachment 542361 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #542361 - Flags: review?(roc) → review+
Attached patch fixSplinter Review
Updated for the latest patch in bug 666669.  The relevant interdiff is:

< +    if (aStartDelta == 0 && aLengthDelta == 0) {
---
> +    if (aContentLength == aProvider.GetOriginalLength()) {

(to test if the selection analysis was done for all text of the frame)
Attachment #542361 - Attachment is obsolete: true
Attachment #542856 - Flags: review?(roc)
Comment on attachment 542856 [details] [diff] [review]
fix

Review of attachment 542856 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #542856 - Flags: review?(roc) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/4a7289ad8218
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
http://hg.mozilla.org/mozilla-central/rev/4a7289ad8218
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: