nsTextFrame::SetSelected() calls Invalidate() with empty rect.

VERIFIED FIXED in mozilla0.9.7

Status

()

Core
Selection
P3
normal
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: kinmoz, Assigned: kinmoz)

Tracking

Trunk
mozilla0.9.7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed on trunk, URL)

Attachments

(1 attachment)

655 bytes, patch
kinmoz
: review+
Marc Attinasi
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

16 years ago
In my debug builds, I'm seeing lots of warning messages in my console coming 
from nsFrame::Invalidate():

    NS_WARNING("empty damage rect: update caller to avoid fcn call overhead");

whenever I select text on pages like http://www.mozilla.org. These messages are 
really bogging down selection speed in debug builds.

The invalidate calls are from nsTextFrame::SetSelected(), and the text frames in 
question seem to be related to the HTML whitespace formatting nodes ... they 
don't actually render on screen, but they are in the frame tree with zero width 
and height, and get their SELECT bits set during selection manipulation.

I have a patch that modifies SetSelected() to check if the rect is empty before 
calling Invalidate().
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.7
(Assignee)

Comment 1

16 years ago
Created attachment 58738 [details] [diff] [review]
Patch Rev 1

Can I get an r= and sr= from mjudge and attinasi for Patch Rev 1?
(Assignee)

Updated

16 years ago
Whiteboard: FIX IN HAND, need r= and sr=
(Assignee)

Comment 2

16 years ago
Comment on attachment 58738 [details] [diff] [review]
Patch Rev 1

r=jfrancis@netscape.com
Attachment #58738 - Flags: review+

Comment 3

16 years ago
Comment on attachment 58738 [details] [diff] [review]
Patch Rev 1

sr=attinasi - alright! That warning really worked - sorry I didn't catcth that
case earlier.
Attachment #58738 - Flags: superreview+
(Assignee)

Updated

16 years ago
Whiteboard: FIX IN HAND, need r= and sr= → FIX IN HAND, ready for checkin
(Assignee)

Comment 4

16 years ago
Fix checked in on TRUNK:

    mozilla/layout/html/base/src/nsTextFrame.cpp  revision 1.339
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, ready for checkin → fixed on trunk

Comment 5

16 years ago
Verified fix checked into lxr.mozilla.org
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.