Backed out changeset bd3edebd5f20 (bug 1377447) for failing its own test 1377447-1.html on Windows 7 and OS X. r=backout

This commit is contained in:
Sebastian Hengst 2017-07-04 18:18:30 +02:00
Родитель d39018ac62
Коммит 6df5db8045
10 изменённых файлов: 8 добавлений и 25 удалений

Просмотреть файл

@ -27,13 +27,12 @@ enum class FlushType : uint8_t {
notifications. */
Style = 3, /* As above, plus flush style reresolution */
Frames = Style,
EnsurePresShellInitAndFrames = 4, /* As above, plus ensure the pres shell is alive */
InterruptibleLayout = 5, /* As above, plus flush reflow,
InterruptibleLayout = 4, /* As above, plus flush reflow,
but allow it to be interrupted (so
an incomplete layout may result) */
Layout = 6, /* As above, but layout must run to
Layout = 5, /* As above, but layout must run to
completion */
Display = 7, /* As above, plus flush painting */
Display = 6, /* As above, plus flush painting */
Count
};

Просмотреть файл

@ -1567,10 +1567,9 @@ nsFocusManager::CheckIfFocusable(nsIContent* aContent, uint32_t aFlags)
return nullptr;
}
// Make sure that our frames are up to date while ensuring the presshell is
// also initialized in case we come from an autofocus event.
// Make sure that our frames are up to date
mEventHandlingNeedsFlush = false;
doc->FlushPendingNotifications(FlushType::EnsurePresShellInitAndFrames);
doc->FlushPendingNotifications(FlushType::Frames);
nsIPresShell *shell = doc->GetShell();
if (!shell)

Просмотреть файл

@ -1068,7 +1068,7 @@ HTMLContentSink::FlushPendingNotifications(FlushType aType)
FlushTags();
}
}
if (aType >= FlushType::EnsurePresShellInitAndFrames) {
if (aType >= FlushType::InterruptibleLayout) {
// Make sure that layout has started so that the reflow flush
// will actually happen.
StartLayout(true);

Просмотреть файл

@ -1465,7 +1465,7 @@ nsXMLContentSink::FlushPendingNotifications(FlushType aType)
FlushText(false);
}
}
if (aType >= FlushType::EnsurePresShellInitAndFrames) {
if (aType >= FlushType::InterruptibleLayout) {
// Make sure that layout has started so that the reflow flush
// will actually happen.
MaybeStartLayout(true);

Просмотреть файл

@ -4090,9 +4090,6 @@ PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush)
"",
"Content",
"ContentAndNotify",
// As far as the profiler is concerned, EnsurePresShellInitAndFrames and
// Frames are the same
"Style",
"Style",
"InterruptibleLayout",
"Layout",

Просмотреть файл

@ -1,3 +0,0 @@
<!DOCTYPE html>
<html>
<input type="text" autofocus="">

Просмотреть файл

@ -1,4 +0,0 @@
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="nothing">
<input type="text" autofocus="">

Просмотреть файл

@ -1,3 +0,0 @@
<!DOCTYPE html>
<html>
<input type="text">

Просмотреть файл

@ -2032,5 +2032,3 @@ fails-if(!stylo||styloVsGecko) == 1365162-1.html 1365162-1-ref.html
== 1375674.html 1375674-ref.html
== 1372041.html 1372041-ref.html
== 1376092.html 1376092-ref.html
== 1377447-1.html 1377447-1-ref.html
!= 1377447-1.html 1377447-2.html

Просмотреть файл

@ -216,7 +216,7 @@ nsHtml5TreeOpExecutor::SetParser(nsParserBase* aParser)
void
nsHtml5TreeOpExecutor::FlushPendingNotifications(FlushType aType)
{
if (aType >= FlushType::EnsurePresShellInitAndFrames) {
if (aType >= FlushType::InterruptibleLayout) {
// Bug 577508 / 253951
nsContentSink::StartLayout(true);
}