зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1488871) for failures on browser_windowopen.js. CLOSED TREE
Backed out changeset 078929426a6e (bug 1488871) Backed out changeset 39b3a22e2552 (bug 1488871)
This commit is contained in:
Родитель
0f1a2fb4bc
Коммит
affc6dfb7a
|
@ -47,17 +47,6 @@ if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
|
|||
);
|
||||
}
|
||||
|
||||
// We'll assume the changes we are seeing are due to this focus change if
|
||||
// there are at least 5 areas that changed near the top of the screen, or if
|
||||
// the toolbar background is involved on OSX, but will only ignore this once.
|
||||
function isLikelyFocusChange(rects) {
|
||||
if (rects.length > 5 && rects.every(r => r.y2 < 100))
|
||||
return true;
|
||||
if (Services.appinfo.OS == "Darwin" && rects.length == 2 && rects.every(r => r.y1 == 0 && r.h == 33))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* This test ensures that there are no unexpected
|
||||
* uninterruptible reflows or flickering areas when opening new windows.
|
||||
|
@ -82,7 +71,11 @@ add_task(async function() {
|
|||
filter(rects, frame, previousFrame) {
|
||||
// The first screenshot we get in OSX / Windows shows an unfocused browser
|
||||
// window for some reason. See bug 1445161.
|
||||
if (!alreadyFocused && isLikelyFocusChange(rects)) {
|
||||
//
|
||||
// We'll assume the changes we are seeing are due to this focus change if
|
||||
// there are at least 5 areas that changed near the top of the screen, but
|
||||
// will only ignore this once (hence the alreadyFocused variable).
|
||||
if (!alreadyFocused && rects.length > 5 && rects.every(r => r.y2 < 100)) {
|
||||
alreadyFocused = true;
|
||||
todo(false,
|
||||
"bug 1445161 - the window should be focused at first paint, " +
|
||||
|
|
|
@ -4526,12 +4526,6 @@ ScrollFrameHelper::FireScrollPortEvent()
|
|||
nsSize scrollportSize = mScrollPort.Size();
|
||||
nsSize childSize = GetScrolledRect().Size();
|
||||
|
||||
// TODO(emilio): why do we need the whole WillPaintObserver infrastructure and
|
||||
// can't use AddScriptRunner & co? I guess it made sense when we used
|
||||
// WillPaintObserver for scroll events too, or when this used to flush.
|
||||
//
|
||||
// Should we remove this?
|
||||
|
||||
bool newVerticalOverflow = childSize.height > scrollportSize.height;
|
||||
bool vertChanged = mVerticalOverflow != newVerticalOverflow;
|
||||
|
||||
|
@ -5093,6 +5087,10 @@ ScrollFrameHelper::PostScrollEvent()
|
|||
NS_IMETHODIMP
|
||||
ScrollFrameHelper::AsyncScrollPortEvent::Run()
|
||||
{
|
||||
if (mHelper) {
|
||||
mHelper->mOuter->PresContext()->Document()->
|
||||
FlushPendingNotifications(FlushType::InterruptibleLayout);
|
||||
}
|
||||
return mHelper ? mHelper->FireScrollPortEvent() : NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче