mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 253889: DeCOMtaminate nsIPresShell - IsReflowLocked(). r=roc
--HG-- extra : rebase_source : 46adf0d5ad41602276c8bcded46e7dae0f399da9
This commit is contained in:
parent
a31830c001
commit
980fd2992c
@ -10739,9 +10739,7 @@ nsCSSFrameConstructor::ReframeContainingBlock(nsIFrame* aFrame)
|
||||
|
||||
// XXXbz how exactly would we get here while isReflowing anyway? Should this
|
||||
// whole test be ifdef DEBUG?
|
||||
PRBool isReflowing;
|
||||
mPresShell->IsReflowLocked(&isReflowing);
|
||||
if(isReflowing) {
|
||||
if (mPresShell->IsReflowLocked()) {
|
||||
// don't ReframeContainingBlock, this will result in a crash
|
||||
// if we remove a tree that's in reflow - see bug 121368 for testcase
|
||||
NS_ERROR("Atemptted to nsCSSFrameConstructor::ReframeContainingBlock during a Reflow!!!");
|
||||
|
@ -669,7 +669,7 @@ public:
|
||||
* Determine if reflow is currently locked
|
||||
* @param aIsReflowLocked returns PR_TRUE if reflow is locked, PR_FALSE otherwise
|
||||
*/
|
||||
NS_IMETHOD IsReflowLocked(PRBool* aIsLocked) = 0;
|
||||
virtual NS_HIDDEN_(PRBool) IsReflowLocked() const = 0;
|
||||
|
||||
/**
|
||||
* Called to find out if painting is suppressed for this presshell. If it is suppressd,
|
||||
|
@ -1846,9 +1846,7 @@ nsPresContext::GetUserFontSetInternal()
|
||||
#ifdef DEBUG
|
||||
{
|
||||
PRBool inReflow;
|
||||
NS_ASSERTION(!userFontSetGottenBefore ||
|
||||
(NS_SUCCEEDED(mShell->IsReflowLocked(&inReflow)) &&
|
||||
!inReflow),
|
||||
NS_ASSERTION(!userFontSetGottenBefore || !mShell->IsReflowLocked(),
|
||||
"FlushUserFontSet should have been called first");
|
||||
}
|
||||
#endif
|
||||
|
@ -759,7 +759,7 @@ public:
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetEventTargetFrame();
|
||||
virtual NS_HIDDEN_(already_AddRefed<nsIContent>) GetEventTargetContent(nsEvent* aEvent);
|
||||
|
||||
NS_IMETHOD IsReflowLocked(PRBool* aIsLocked);
|
||||
virtual NS_HIDDEN_(PRBool) IsReflowLocked() const;
|
||||
|
||||
virtual nsresult ReconstructFrames(void);
|
||||
virtual void Freeze();
|
||||
@ -4697,11 +4697,10 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::IsReflowLocked(PRBool* aIsReflowLocked)
|
||||
PRBool
|
||||
PresShell::IsReflowLocked() const
|
||||
{
|
||||
*aIsReflowLocked = mIsReflowing;
|
||||
return NS_OK;
|
||||
return mIsReflowing;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -400,9 +400,7 @@ nsSVGForeignObjectFrame::NotifySVGChanged(PRUint32 aFlags)
|
||||
// PresShell and prevent it from reflowing us properly in future. Besides
|
||||
// that, nsSVGOuterSVGFrame::DidReflow will take care of reflowing us
|
||||
// synchronously, so there's no need.
|
||||
PRBool reflowing;
|
||||
PresContext()->PresShell()->IsReflowLocked(&reflowing);
|
||||
if (!reflowing) {
|
||||
if (!PresContext()->PresShell()->IsReflowLocked()) {
|
||||
UpdateGraphic(); // update mRect before requesting reflow
|
||||
RequestReflow(nsIPresShell::eResize);
|
||||
}
|
||||
|
@ -370,9 +370,7 @@ void
|
||||
nsTreeBodyFrame::EnsureView()
|
||||
{
|
||||
if (!mView) {
|
||||
PRBool isInReflow;
|
||||
PresContext()->PresShell()->IsReflowLocked(&isInReflow);
|
||||
if (isInReflow) {
|
||||
if (PresContext()->PresShell()->IsReflowLocked()) {
|
||||
if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = PR_TRUE;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
@ -532,9 +530,7 @@ nsTreeBodyFrame::SetView(nsITreeView * aView)
|
||||
NS_ENSURE_STATE(weakFrame.IsAlive());
|
||||
mView->GetRowCount(&mRowCount);
|
||||
|
||||
PRBool isInReflow;
|
||||
PresContext()->PresShell()->IsReflowLocked(&isInReflow);
|
||||
if (!isInReflow) {
|
||||
if (!PresContext()->PresShell()->IsReflowLocked()) {
|
||||
// The scrollbar will need to be updated.
|
||||
FullScrollbarsUpdate(PR_FALSE);
|
||||
} else if (!mReflowCallbackPosted) {
|
||||
|
Loading…
Reference in New Issue
Block a user