зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363361 - Add ability to dirty root frame from nsIDOMWindowUtils. r=dholbert
MozReview-Commit-ID: Jy6PICTkq4l --HG-- extra : rebase_source : 83894f2ae0ccaafa05bcaee010876a55be82fd7d
This commit is contained in:
Родитель
9114729ef9
Коммит
348be03af6
|
@ -4441,6 +4441,26 @@ nsDOMWindowUtils::GetDirectionFromText(const nsAString& aString, int32_t* aRetva
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::EnsureDirtyRootFrame()
|
||||
{
|
||||
nsIDocument* doc = GetDocument();
|
||||
nsIPresShell* presShell = doc ? doc->GetShell() : nullptr;
|
||||
|
||||
if (!presShell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsIFrame* frame = presShell->GetRootFrame();
|
||||
if (!frame) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
presShell->FrameNeedsReflow(frame, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetIsStyledByServo(bool* aStyledByServo)
|
||||
{
|
||||
|
|
|
@ -2023,6 +2023,14 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
*/
|
||||
long getDirectionFromText(in AString aString);
|
||||
|
||||
/**
|
||||
* Calls FrameNeedsReflow on that root frame so that a layout flush
|
||||
* will be necessary.
|
||||
*
|
||||
* This should only be used for testing.
|
||||
*/
|
||||
void ensureDirtyRootFrame();
|
||||
|
||||
/**
|
||||
* Whether the current document is styled by Servo's style engine.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче