Closed
Bug 478465
Opened 17 years ago
Closed 16 years ago
Display list code clobbers NS_FRAME_IN_REFLOW
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file, 1 obsolete file)
4.88 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
NS_FRAME_IN_REFLOW and NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO have the same value, with the latter having a comment about only being set during painting. But on the testcase Jesse attached in bug 67752 comment 57, I get asserts about NS_FRAME_IN_REFLOW not being set when it should be, and the reason for that is this stack:
#0 0x0227fedd in nsIFrame::RemoveStateBits (this=0xf692780, aBits=1) at nsIFrame.h:1046
#1 0x0229dd79 in UnmarkFrameForDisplay (aFrame=0x1505b94) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/base/nsDisplayList.cpp:137
#2 0x022a22f4 in nsDisplayListBuilder::LeavePresShell (this=0xbfff928c, aReferenceFrame=0xf692780, aDirtyRect=@0xbfff950c) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/base/nsDisplayList.cpp:202
#3 0x022c6637 in nsLayoutUtils::ComputeRepaintRegionForCopy (aRootFrame=0xf692780, aMovingFrame=0xf69eac0, aDelta=@0xbfff9598, aCopyRect=@0xbfff95e8, aRepaintRegion=0xbfff96ac) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/base/nsLayoutUtils.cpp:1271
#4 0x022db9f4 in PresShell::ComputeRepaintRegionForCopy (this=0x1512c00, aRootView=0x108b9c90, aMovingView=0x854f370, aDelta=@0xbfff9630, aCopyRect=@0xbfff95e8, aRepaintRegion=0xbfff96ac) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/base/nsPresShell.cpp:4966
#5 0x02805b17 in nsViewManager::CanScrollWithBitBlt (this=0x89ef1c0, aView=0x854f370, aDelta=@0xbfff96fc, aUpdateRegion=0xbfff96ac) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/view/src/nsViewManager.cpp:1690
#6 0x02801a1b in nsScrollPortView::Scroll (this=0x1088fe50, aScrolledView=0x854f370, aTwipsDelta=@0xbfff979c, aPixDelta=@0xbfff9794, aP2A=60) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/view/src/nsScrollPortView.cpp:528
#7 0x02802534 in nsScrollPortView::ScrollToImpl (this=0x1088fe50, aX=0, aY=1140) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/view/src/nsScrollPortView.cpp:668
#8 0x02802c36 in nsScrollPortView::ScrollTo (this=0x1088fe50, aDestinationX=0, aDestinationY=1140, aUpdateFlags=0) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/view/src/nsScrollPortView.cpp:255
#9 0x0234e9ea in nsGfxScrollFrameInner::ScrollToRestoredPosition (this=0x1505bd8) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/generic/nsGfxScrollFrame.cpp:1528
#10 0x0235572f in nsHTMLScrollFrame::Reflow (this=0x1505b94, aPresContext=0xf70e000, aDesiredSize=@0xbfff9bb4, aReflowState=@0xbfff9ae8, aStatus=@0xbfffa104) at /Users/bzbarsky/mozilla/css-frameconst/mozilla/layout/generic/nsGfxScrollFrame.cpp:828
This clobbers the NS_FRAME_IN_REFLOW bit on frames that are in fact currently in reflow...
Ouch.
I'm not sure what to do here. I think we might be able to scavenge the NS_FRAME_INDEPENDENT_SELECTION state bit, and reassign it to NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO.
Or we could just remove views and scavenge two state bits!
![]() |
Assignee | |
Comment 3•17 years ago
|
||
Is it possible to do the ScrolltoRestoredPosition off a reflow callback? Or not so much?
Alternately, can we just use a debug-only boolean member for NS_FRAME_IN_REFLOW? The only non-assertion use seems to be in MathML code, and if we can find a different solution for that...
(In reply to comment #3)
> Is it possible to do the ScrolltoRestoredPosition off a reflow callback? Or
> not so much?
Yeah, that should work.
> Alternately, can we just use a debug-only boolean member for
> NS_FRAME_IN_REFLOW? The only non-assertion use seems to be in MathML code, and
> if we can find a different solution for that...
A use in nsHTMLReflowState looks real. The MathML use could be switched to a MathML state bit.
![]() |
Assignee | |
Comment 5•17 years ago
|
||
The nsHTMLReflowState use is just an optimization, as far as I can tell. But yes, I agree that it's a real use; I missed that one.
If we can restore off a reflow callback then that's what we should probably do.
![]() |
Assignee | |
Comment 6•16 years ago
|
||
Not sure whether there's a sane place I could assert that we don't build display lists while reflowing....
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #384116 -
Flags: superreview?(roc)
Attachment #384116 -
Flags: review?(roc)
mUpdateScrollbarAttributes isn't used anywhere?
![]() |
Assignee | |
Comment 8•16 years ago
|
||
Er... It should be! Specifically, this line:
+ if (NS_SUBTREE_DIRTY(mOuter))
should be:
+ if (NS_SUBTREE_DIRTY(mOuter) || !mUpdateScrollbarAttributes)
and the setting of mUpdateScrollbarAttributes to false should move to after that check.
![]() |
Assignee | |
Comment 9•16 years ago
|
||
Attachment #384116 -
Attachment is obsolete: true
Attachment #384391 -
Flags: superreview?(roc)
Attachment #384391 -
Flags: review?(roc)
Attachment #384116 -
Flags: superreview?(roc)
Attachment #384116 -
Flags: review?(roc)
Attachment #384391 -
Flags: superreview?(roc)
Attachment #384391 -
Flags: superreview+
Attachment #384391 -
Flags: review?(roc)
Attachment #384391 -
Flags: review+
![]() |
Assignee | |
Comment 10•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
Updated•7 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•