Open
Bug 68975
Opened 25 years ago
Updated 3 years ago
better text frame invalidation
Categories
(Core :: Layout, defect, P3)
Tracking
()
NEW
mozilla1.2alpha
People
(Reporter: buster, Unassigned)
Details
Attachments
(1 file)
this is a better patch than the one I checked in for how text frames should
invalidate themselves:
Index: html/base/src/nsTextFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/nsTextFrame.cpp,v
retrieving revision 1.283
diff -u -r1.283 nsTextFrame.cpp
--- nsTextFrame.cpp 2001/01/04 20:44:01 1.283
+++ nsTextFrame.cpp 2001/02/15 23:42:35
@@ -4379,16 +4379,16 @@
else {
mState &= ~TEXT_OPTIMIZE_RESIZE;
}
-
+
// If it's an incremental reflow command, then invalidate our existing
// bounds.
// XXX We need a finer granularity than this, but it isn't clear what
// has actually changed...
- if (eReflowReason_Incremental == aReflowState.reason ||
- eReflowReason_Dirty == aReflowState.reason) {
+ if (NS_UNCONSTRAINEDSIZE!=aReflowState.availableWidth) {
maxFrameWidth = PR_MAX(maxFrameWidth, mRect.width);
maxFrameHeight = PR_MAX(maxFrameHeight, mRect.height);
- Invalidate(aPresContext, nsRect(0,0,maxFrameWidth,maxFrameHeight));
+ nscoord invalidateWidth = PR_MAX(aReflowState.availableWidth, aMetrics.width);
+ Invalidate(aPresContext, nsRect(0,0,invalidateWidth,maxFrameHeight));
}
This patch invalidates less frequently when text is inside of tables, and it
invalidates less in some cases.
Comment 1•25 years ago
|
||
Buster has attached the patch already, so I'll review it, get it approved and
get it in asap.
Comment 3•25 years ago
|
||
Updated•24 years ago
|
Target Milestone: mozilla1.0 → mozilla1.2
Comment 5•23 years ago
|
||
roc, what do you think of this patch?
First, maxFrameWidth/Height are silly because they're always equal to
mRect.width/height coming in here.
I guess it looks okay. We might invalidate more when we're not reflowing
unconstrained, because we'll invalidate to the end of the line, but I guess in
most cases we'll invalidate that anyway due to next-in-flow text.
I wonder if we should move inline frame invalidation up to nsBlockFrame. In most
cases if anything's changed we need to invalidate the entire line anyway.
Updated•16 years ago
|
Assignee: attinasi → nobody
Status: ASSIGNED → NEW
QA Contact: chrispetersen → layout
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•