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

RESOLVED FIXED in mozilla7

Status

()

Core
Layout: Block and Inline
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

({perf})

Trunk
mozilla7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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)

Updated

6 years ago
Assignee: nobody → matspal
(Assignee)

Comment 1

6 years ago
Created attachment 542361 [details] [diff] [review]
fix

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+
(Assignee)

Comment 3

6 years ago
Created attachment 542856 [details] [diff] [review]
fix

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+
(Assignee)

Comment 5

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.