mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787148 - Force synchronous repainting when the document state changes. r=roc
This commit is contained in:
parent
ef9ad7e26c
commit
b5a6e210b0
@ -3994,6 +3994,9 @@ PresShell::DocumentStatesChanged(nsIDocument* aDocument,
|
||||
nsIFrame* root = mFrameConstructor->GetRootFrame();
|
||||
if (root) {
|
||||
root->InvalidateFrameSubtree();
|
||||
if (root->HasView()) {
|
||||
root->GetView()->SetForcedRepaint(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -306,6 +306,9 @@ public:
|
||||
* Returns true if the view has a widget associated with it.
|
||||
*/
|
||||
bool HasWidget() const { return mWindow != nullptr; }
|
||||
|
||||
void SetForcedRepaint(bool aForceRepaint) { mForcedRepaint = aForceRepaint; }
|
||||
bool ForcedRepaint() { return mForcedRepaint; }
|
||||
|
||||
/**
|
||||
* Make aWidget direct its events to this view.
|
||||
@ -363,6 +366,7 @@ protected:
|
||||
float mOpacity;
|
||||
uint32_t mVFlags;
|
||||
bool mWidgetIsTopLevel;
|
||||
bool mForcedRepaint;
|
||||
|
||||
virtual ~nsIView() {}
|
||||
|
||||
|
@ -175,16 +175,12 @@ public:
|
||||
nsPoint GetOffsetTo(const nsView* aOther, const int32_t aAPD) const;
|
||||
nsIWidget* GetNearestWidget(nsPoint* aOffset, const int32_t aAPD) const;
|
||||
|
||||
void SetForcedRepaint(bool aForceRepaint) { mForcedRepaint = aForceRepaint; }
|
||||
bool ForcedRepaint() { return mForcedRepaint; }
|
||||
|
||||
protected:
|
||||
// Do the actual work of ResetWidgetBounds, unconditionally. Don't
|
||||
// call this method if we have no widget.
|
||||
void DoResetWidgetBounds(bool aMoveOnly, bool aInvalidateChangedSize);
|
||||
|
||||
nsRegion* mDirtyRegion;
|
||||
bool mForcedRepaint;
|
||||
|
||||
private:
|
||||
void InitializeWindow(bool aEnableDragDrop, bool aResetVisibility);
|
||||
|
Loading…
Reference in New Issue
Block a user