Last Comment Bug 667653 - Make NS_FRAME_SELECTED_CONTENT on text frames less sticky so we can take the fast text painting path more often
: Make NS_FRAME_SELECTED_CONTENT on text frames less sticky so we can take the ...
Status: RESOLVED FIXED
[inbound]
: perf
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Mats Palmgren (:mats)
:
Mentors:
Depends on: 666669
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-27 15:55 PDT by Mats Palmgren (:mats)
Modified: 2011-06-30 06:09 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (8.88 KB, patch)
2011-06-27 19:20 PDT, Mats Palmgren (:mats)
roc: review+
Details | Diff | Splinter Review
fix (8.63 KB, patch)
2011-06-29 10:13 PDT, Mats Palmgren (:mats)
roc: review+
Details | Diff | Splinter Review

Description Mats Palmgren (:mats) 2011-06-27 15:55:10 PDT
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.
Comment 1 Mats Palmgren (:mats) 2011-06-27 19:20:43 PDT
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)
Comment 2 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-06-27 20:02:34 PDT
Comment on attachment 542361 [details] [diff] [review]
fix

Review of attachment 542361 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 3 Mats Palmgren (:mats) 2011-06-29 10:13:30 PDT
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)
Comment 4 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-06-29 17:19:27 PDT
Comment on attachment 542856 [details] [diff] [review]
fix

Review of attachment 542856 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 6 Marco Bonardo [::mak] 2011-06-30 06:09:55 PDT
http://hg.mozilla.org/mozilla-central/rev/4a7289ad8218

Note You need to log in before you can comment on or make changes to this bug.