|
|
Chromium Code Reviews|
Created:
6 years, 10 months ago by f(malita) Modified:
6 years, 10 months ago CC:
blink-reviews Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionRevert of Remove the layout timer (https://codereview.chromium.org/145663012/)
Reason for revert:
Broke browser_tests:DeclarativeContentApiTest.Overview & content_browsertests:SiteIsolationPolicyBrowserTest.CrossSiteDocumentBlockingForDifferentTargets.
Original issue's description:
> Remove the layout timer
>
> As discussed on blink-dev, we want to remove the layout timer
> in order to better synchronize work with the compositor.
> Prior to this CL, we'd trigger layout at arbitrary times,
> which meant we could end up doing layout multiple times per
> frame unnecessarily.
>
> BUG=340357
>
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166415
TBR=ojan@chromium.org,eseidel@chromium.org,abarth@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=340357
Patch Set 1 #
Created: 6 years, 10 months ago
(Patch set is too large to download)
Messages
Total messages: 23 (0 generated)
Created Revert of Remove the layout timer
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/154273002/1
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for Source/core/frame/FrameView.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/core/frame/FrameView.cpp
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 220.
Hunk #3 FAILED at 909.
Hunk #4 succeeded at 1796 with fuzz 1 (offset 35 lines).
Hunk #5 FAILED at 1783.
Hunk #6 FAILED at 1840.
Hunk #7 FAILED at 1870.
6 out of 7 hunks FAILED -- saving rejects to file
Source/core/frame/FrameView.cpp.rej
Patch: Source/core/frame/FrameView.cpp
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index
dc91f7916145ab9b990ce43a4089d7675ffb75bf..bdf389b57a826b00a117b84a4c13cc2e586dbe12
100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -136,7 +136,7 @@
: m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
- , m_hasPendingLayout(false)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutSubtreeRoot(0)
, m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
@@ -220,7 +220,7 @@
m_cannotBlitToWindow = false;
m_isOverlapped = false;
m_contentIsOpaque = false;
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_layoutSubtreeRoot = 0;
m_delayedLayout = false;
m_doFullRepaint = true;
@@ -909,7 +909,7 @@
// Every scroll that happens during layout is programmatic.
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll,
true);
- m_hasPendingLayout = false;
+ m_layoutTimer.stop();
m_delayedLayout = false;
// we shouldn't enter layout() while painting
@@ -1761,6 +1761,11 @@
autoSizeIfEnabled();
}
+void FrameView::layoutTimerFired(Timer<FrameView>*)
+{
+ layout();
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);
@@ -1778,14 +1783,13 @@
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
int delay = m_frame->document()->minimumLayoutDelay();
- if (m_hasPendingLayout && m_delayedLayout && !delay)
+ if (m_layoutTimer.isActive() && m_delayedLayout && !delay)
unscheduleRelayout();
- if (m_hasPendingLayout)
+ if (m_layoutTimer.isActive())
return;
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject*
descendant)
@@ -1835,14 +1839,13 @@
ASSERT(!m_layoutSubtreeRoot->container() ||
!m_layoutSubtreeRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(m_frame.get());
m_delayedLayout = delay != 0;
- m_hasPendingLayout = true;
- scheduleAnimation();
+ m_layoutTimer.startOneShot(delay * 0.001);
}
}
bool FrameView::layoutPending() const
{
- return m_hasPendingLayout;
+ return m_layoutTimer.isActive();
}
bool FrameView::needsLayout() const
@@ -1865,10 +1868,10 @@
void FrameView::unscheduleRelayout()
{
- if (!m_hasPendingLayout)
- return;
-
- m_hasPendingLayout = false;
+ if (!m_layoutTimer.isActive())
+ return;
+
+ m_layoutTimer.stop();
m_delayedLayout = false;
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
