<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162837] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162837">162837</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-01-27 07:11:08 -0800 (Mon, 27 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove repaint throttling
https://bugs.webkit.org/show_bug.cgi?id=127681
Reviewed by Sam Weinig.
Nowadays we throttle layer flushes. This code is unnecessary.
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::insertDictatedText):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkCompleted):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTextInputEvent):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::flushCompositingStateForThisFrame):
(WebCore::FrameView::layout):
(WebCore::FrameView::repaintContentRectangle):
(WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/FrameView.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingAlternativeTextControllercpp">trunk/Source/WebCore/editing/AlternativeTextController.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_settingscpp">trunk/Source/WebKit/efl/ewk/ewk_settings.cpp</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/ChangeLog        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-01-27 Antti Koivisto <antti@apple.com>
+
+ Remove repaint throttling
+ https://bugs.webkit.org/show_bug.cgi?id=127681
+
+ Reviewed by Sam Weinig.
+
+ Nowadays we throttle layer flushes. This code is unnecessary.
+
+ * WebCore.exp.in:
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ * dom/Element.cpp:
+ (WebCore::Element::classAttributeChanged):
+ * editing/AlternativeTextController.cpp:
+ (WebCore::AlternativeTextController::insertDictatedText):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkCompleted):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dispatchDragEvent):
+ (WebCore::EventHandler::dispatchMouseEvent):
+ (WebCore::EventHandler::keyEvent):
+ (WebCore::EventHandler::handleTextInputEvent):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ (WebCore::FrameView::reset):
+ (WebCore::FrameView::flushCompositingStateForThisFrame):
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::repaintContentRectangle):
+ (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
+ (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
+ * page/FrameView.h:
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setSelection):
+
</ins><span class="cx"> 2014-01-24 Eric Carlson <eric.carlson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge Chromium TextTrack cleanups
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -1276,7 +1276,6 @@
</span><span class="cx"> __ZN7WebCore9FrameView20removeScrollableAreaEPNS_14ScrollableAreaE
</span><span class="cx"> __ZN7WebCore9FrameView20resetTrackedRepaintsEv
</span><span class="cx"> __ZN7WebCore9FrameView20setCanHaveScrollbarsEb
</span><del>-__ZN7WebCore9FrameView21flushDeferredRepaintsEv
</del><span class="cx"> __ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
</span><span class="cx"> __ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
</span><span class="cx"> __ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_9FloatSizeES3_fNS_19AdjustViewSizeOrNotE
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -1739,8 +1739,6 @@
</span><span class="cx"> PostAttachCallbackDisabler disabler(*this);
</span><span class="cx"> WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
</span><span class="cx">
</span><del>- frameView.beginDeferredRepaints();
-
</del><span class="cx"> if (m_pendingStyleRecalcShouldForce)
</span><span class="cx"> change = Style::Force;
</span><span class="cx">
</span><span class="lines">@@ -1764,8 +1762,6 @@
</span><span class="cx"> // Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc.
</span><span class="cx"> if (m_styleResolver)
</span><span class="cx"> m_styleSheetCollection.resetCSSFeatureFlags();
</span><del>-
- frameView.endDeferredRepaints();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If we wanted to call implicitClose() during recalcStyle, do so now that we're finished.
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingAlternativeTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/AlternativeTextController.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/AlternativeTextController.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/editing/AlternativeTextController.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (FrameView* view = m_frame.view())
</span><del>- view->resetDeferredRepaintDelay();
</del><ins>+ view->disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx">
</span><span class="cx"> RefPtr<TextEvent> event = TextEvent::createForDictation(m_frame.document()->domWindow(), text, dictationAlternatives);
</span><span class="cx"> event->setUnderlyingEvent(triggeringEvent);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -798,9 +798,6 @@
</span><span class="cx"> Ref<Frame> protect(m_frame);
</span><span class="cx"> m_shouldCallCheckCompleted = false;
</span><span class="cx">
</span><del>- if (m_frame.view())
- m_frame.view()->handleLoadCompleted();
-
</del><span class="cx"> // Have we completed before?
</span><span class="cx"> if (m_isComplete)
</span><span class="cx"> return;
</span><span class="lines">@@ -845,9 +842,6 @@
</span><span class="cx"> completed();
</span><span class="cx"> if (m_frame.page())
</span><span class="cx"> checkLoadComplete();
</span><del>-
- if (m_frame.view())
- m_frame.view()->handleLoadCompleted();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameLoader::checkTimerFired(Timer<FrameLoader>&)
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -2016,7 +2016,7 @@
</span><span class="cx"> if (!view)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- view->resetDeferredRepaintDelay();
</del><ins>+ view->disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx"> RefPtr<MouseEvent> me = MouseEvent::create(eventType,
</span><span class="cx"> true, true, event.timestamp(), m_frame.document()->defaultView(),
</span><span class="cx"> 0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(),
</span><span class="lines">@@ -2388,7 +2388,7 @@
</span><span class="cx"> bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targetNode, bool /*cancelable*/, int clickCount, const PlatformMouseEvent& mouseEvent, bool setUnder)
</span><span class="cx"> {
</span><span class="cx"> if (FrameView* view = m_frame.view())
</span><del>- view->resetDeferredRepaintDelay();
</del><ins>+ view->disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx">
</span><span class="cx"> updateMouseEventTargetNode(targetNode, mouseEvent, setUnder);
</span><span class="cx">
</span><span class="lines">@@ -2914,7 +2914,7 @@
</span><span class="cx"> UserTypingGestureIndicator typingGestureIndicator(m_frame);
</span><span class="cx">
</span><span class="cx"> if (FrameView* view = m_frame.view())
</span><del>- view->resetDeferredRepaintDelay();
</del><ins>+ view->disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx">
</span><span class="cx"> // FIXME (bug 68185): this call should be made at another abstraction layer
</span><span class="cx"> m_frame.loader().resetMultipleFormSubmissionProtection();
</span><span class="lines">@@ -3336,7 +3336,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (FrameView* view = m_frame.view())
</span><del>- view->resetDeferredRepaintDelay();
</del><ins>+ view->disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx">
</span><span class="cx"> RefPtr<TextEvent> event = TextEvent::create(m_frame.document()->domWindow(), text, inputType);
</span><span class="cx"> event->setUnderlyingEvent(underlyingEvent);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -956,7 +956,6 @@
</span><span class="cx"> if (!m_view)
</span><span class="cx"> return;
</span><span class="cx"> m_view->updateLayoutAndStyleIfNeededRecursive();
</span><del>- m_view->flushDeferredRepaints();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Frame::tiledBackingStorePaint(GraphicsContext* context, const IntRect& rect)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -118,28 +118,6 @@
</span><span class="cx">
</span><span class="cx"> double FrameView::sCurrentPaintTimeStamp = 0.0;
</span><span class="cx">
</span><del>-
-// REPAINT_THROTTLING now chooses default values for throttling parameters.
-// Should be removed when applications start using runtime configuration.
-#if ENABLE(REPAINT_THROTTLING)
-// Normal delay
-double FrameView::s_normalDeferredRepaintDelay = 0.016;
-// Negative value would mean that first few repaints happen without a delay
-double FrameView::s_initialDeferredRepaintDelayDuringLoading = 0;
-// The delay grows on each repaint to this maximum value
-double FrameView::s_maxDeferredRepaintDelayDuringLoading = 2.5;
-// On each repaint the delay increses by this amount
-double FrameView::s_deferredRepaintDelayIncrementDuringLoading = 0.5;
-#else
-// FIXME: Repaint throttling could be good to have on all platform.
-// The balance between CPU use and repaint frequency will need some tuning for desktop.
-// More hooks may be needed to reset the delay on things like GIF and CSS animations.
-double FrameView::s_normalDeferredRepaintDelay = 0;
-double FrameView::s_initialDeferredRepaintDelayDuringLoading = 0;
-double FrameView::s_maxDeferredRepaintDelayDuringLoading = 0;
-double FrameView::s_deferredRepaintDelayIncrementDuringLoading = 0;
-#endif
-
</del><span class="cx"> // The maximum number of updateEmbeddedObjects iterations that should be done before returning.
</span><span class="cx"> static const unsigned maxUpdateEmbeddedObjectsIterations = 2;
</span><span class="cx">
</span><span class="lines">@@ -198,7 +176,6 @@
</span><span class="cx"> , m_wasScrolledByUser(false)
</span><span class="cx"> , m_inProgrammaticScroll(false)
</span><span class="cx"> , m_safeToPropagateScrollToParent(true)
</span><del>- , m_deferredRepaintTimer(this, &FrameView::deferredRepaintTimerFired)
</del><span class="cx"> , m_isTrackingRepaints(false)
</span><span class="cx"> , m_shouldUpdateWhileOffscreen(true)
</span><span class="cx"> , m_exposedRect(FloatRect::infiniteRect())
</span><span class="lines">@@ -285,11 +262,6 @@
</span><span class="cx"> m_safeToPropagateScrollToParent = true;
</span><span class="cx"> m_lastViewportSize = IntSize();
</span><span class="cx"> m_lastZoomFactor = 1.0f;
</span><del>- m_deferringRepaints = 0;
- m_repaintCount = 0;
- m_repaintRects.clear();
- m_deferredRepaintDelay = s_initialDeferredRepaintDelayDuringLoading;
- m_deferredRepaintTimer.stop();
</del><span class="cx"> m_isTrackingRepaints = false;
</span><span class="cx"> m_trackedRepaintRects.clear();
</span><span class="cx"> m_lastPaintTime = 0;
</span><span class="lines">@@ -902,10 +874,6 @@
</span><span class="cx"> if (needsLayout())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- // If we sync compositing layers and allow the repaint to be deferred, there is time for a
- // visible flash to occur. Instead, stop the deferred repaint timer and repaint immediately.
- flushDeferredRepaints();
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (TileCache* tileCache = this->tileCache())
</span><span class="cx"> tileCache->doPendingRepaints();
</span><span class="lines">@@ -1312,7 +1280,6 @@
</span><span class="cx"> ASSERT(m_layoutPhase == InPreLayout);
</span><span class="cx"> m_layoutPhase = InLayout;
</span><span class="cx">
</span><del>- beginDeferredRepaints();
</del><span class="cx"> forceLayoutParentViewIfNeeded();
</span><span class="cx">
</span><span class="cx"> ASSERT(m_layoutPhase == InLayout);
</span><span class="lines">@@ -1332,7 +1299,6 @@
</span><span class="cx"> if (document.textAutosizer()->processSubtree(root) && root->needsLayout())
</span><span class="cx"> root->layout();
</span><span class="cx"> #endif
</span><del>- endDeferredRepaints();
</del><span class="cx">
</span><span class="cx"> ASSERT(m_layoutPhase == InLayout);
</span><span class="cx">
</span><span class="lines">@@ -1356,14 +1322,11 @@
</span><span class="cx"> m_needsFullRepaint = neededFullRepaint;
</span><span class="cx">
</span><span class="cx"> // Now update the positions of all layers.
</span><del>- beginDeferredRepaints();
</del><span class="cx"> if (m_needsFullRepaint)
</span><span class="cx"> root->view().repaintRootContents();
</span><span class="cx">
</span><span class="cx"> layer->updateLayerPositionsAfterLayout(renderView()->layer(), updateLayerPositionFlags(layer, subtree, m_needsFullRepaint));
</span><span class="cx">
</span><del>- endDeferredRepaints();
-
</del><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx"> updateCompositingLayersAfterLayout();
</span><span class="cx"> #endif
</span><span class="lines">@@ -2159,32 +2122,6 @@
</span><span class="cx">
</span><span class="cx"> addTrackedRepaintRect(r);
</span><span class="cx">
</span><del>- double delay = m_deferringRepaints ? 0 : adjustedDeferredRepaintDelay();
- if ((m_deferringRepaints || m_deferredRepaintTimer.isActive() || delay) && !immediate) {
- IntRect paintRect = r;
- if (clipsRepaints() && !paintsEntireContents())
- paintRect.intersect(visibleContentRect(LegacyIOSDocumentVisibleRect));
- if (paintRect.isEmpty())
- return;
- if (m_repaintCount == cRepaintRectUnionThreshold) {
- IntRect unionedRect;
- for (unsigned i = 0; i < cRepaintRectUnionThreshold; ++i)
- unionedRect.unite(pixelSnappedIntRect(m_repaintRects[i]));
- m_repaintRects.clear();
- m_repaintRects.append(unionedRect);
- }
- if (m_repaintCount < cRepaintRectUnionThreshold)
- m_repaintRects.append(paintRect);
- else
- m_repaintRects[0].unite(paintRect);
- m_repaintCount++;
-
- if (!m_deferringRepaints)
- startDeferredRepaintTimer(delay);
-
- return;
- }
-
</del><span class="cx"> if (!shouldUpdate(immediate))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -2275,143 +2212,14 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::beginDeferredRepaints()
</del><ins>+void FrameView::disableLayerFlushThrottlingTemporarilyForInteraction()
</ins><span class="cx"> {
</span><del>- if (!frame().isMainFrame()) {
- frame().mainFrame().view()->beginDeferredRepaints();
- return;
- }
-
- m_deferringRepaints++;
-}
-
-void FrameView::endDeferredRepaints()
-{
- if (!frame().isMainFrame()) {
- frame().mainFrame().view()->endDeferredRepaints();
- return;
- }
-
- ASSERT(m_deferringRepaints > 0);
-
- if (--m_deferringRepaints)
- return;
-
- if (m_deferredRepaintTimer.isActive())
- return;
-
- if (double delay = adjustedDeferredRepaintDelay()) {
- startDeferredRepaintTimer(delay);
- return;
- }
-
- doDeferredRepaints();
-}
-
-void FrameView::startDeferredRepaintTimer(double delay)
-{
- if (m_deferredRepaintTimer.isActive())
- return;
-
- m_deferredRepaintTimer.startOneShot(delay);
-}
-
-void FrameView::handleLoadCompleted()
-{
- // Once loading has completed, allow autoSize one last opportunity to
- // reduce the size of the frame.
- autoSizeIfEnabled();
- if (shouldUseLoadTimeDeferredRepaintDelay())
- return;
- m_deferredRepaintDelay = s_normalDeferredRepaintDelay;
- flushDeferredRepaints();
-}
-
-void FrameView::flushDeferredRepaints()
-{
- if (!m_deferredRepaintTimer.isActive())
- return;
- m_deferredRepaintTimer.stop();
- doDeferredRepaints();
-}
-
-void FrameView::doDeferredRepaints()
-{
- ASSERT(!m_deferringRepaints);
- if (!shouldUpdate()) {
- m_repaintRects.clear();
- m_repaintCount = 0;
- return;
- }
- unsigned size = m_repaintRects.size();
- for (unsigned i = 0; i < size; i++) {
-#if USE(TILED_BACKING_STORE)
- if (frame().tiledBackingStore()) {
- frame().tiledBackingStore()->invalidate(pixelSnappedIntRect(m_repaintRects[i]));
- continue;
- }
-#endif
- ScrollView::repaintContentRectangle(pixelSnappedIntRect(m_repaintRects[i]), false);
- }
- m_repaintRects.clear();
- m_repaintCount = 0;
-
- updateDeferredRepaintDelayAfterRepaint();
-}
-
-bool FrameView::shouldUseLoadTimeDeferredRepaintDelay() const
-{
- // Don't defer after the initial load of the page has been completed.
- if (frame().tree().top().loader().isComplete())
- return false;
- Document* document = frame().document();
- if (!document)
- return false;
- if (document->parsing())
- return true;
- if (document->cachedResourceLoader()->requestCount())
- return true;
- return false;
-}
-
-void FrameView::updateDeferredRepaintDelayAfterRepaint()
-{
- if (!shouldUseLoadTimeDeferredRepaintDelay()) {
- m_deferredRepaintDelay = s_normalDeferredRepaintDelay;
- return;
- }
- double incrementedRepaintDelay = m_deferredRepaintDelay + s_deferredRepaintDelayIncrementDuringLoading;
- m_deferredRepaintDelay = std::min(incrementedRepaintDelay, s_maxDeferredRepaintDelayDuringLoading);
-}
-
-void FrameView::resetDeferredRepaintDelay()
-{
- m_deferredRepaintDelay = 0;
- if (m_deferredRepaintTimer.isActive()) {
- m_deferredRepaintTimer.stop();
- if (!m_deferringRepaints)
- doDeferredRepaints();
- }
</del><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx"> if (RenderView* view = renderView())
</span><span class="cx"> view->compositor().disableLayerFlushThrottlingTemporarilyForInteraction();
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-double FrameView::adjustedDeferredRepaintDelay() const
-{
- ASSERT(!m_deferringRepaints);
- if (!m_deferredRepaintDelay)
- return 0;
- double timeSinceLastPaint = monotonicallyIncreasingTime() - m_lastPaintTime;
- return std::max<double>(0, m_deferredRepaintDelay - timeSinceLastPaint);
-}
-
-void FrameView::deferredRepaintTimerFired(Timer<FrameView>&)
-{
- doDeferredRepaints();
-}
-
</del><span class="cx"> void FrameView::updateLayerFlushThrottlingInAllFrames()
</span><span class="cx"> {
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="lines">@@ -3822,10 +3630,6 @@
</span><span class="cx"> for (unsigned i = 0; i < childViews.size(); ++i)
</span><span class="cx"> childViews[i]->updateLayoutAndStyleIfNeededRecursive();
</span><span class="cx">
</span><del>- // updateLayoutAndStyleIfNeededRecursive is called when we need to make sure style and layout are up-to-date before
- // painting, so we need to flush out any deferred repaints too.
- flushDeferredRepaints();
-
</del><span class="cx"> // When frame flattening is on, child frame can mark parent frame dirty. In such case, child frame
</span><span class="cx"> // needs to call layout on parent frame recursively.
</span><span class="cx"> // This assert ensures that parent frames are clean, when child frames finished updating layout and style.
</span><span class="lines">@@ -4115,30 +3919,6 @@
</span><span class="cx"> return parentPoint;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// Normal delay
-void FrameView::setRepaintThrottlingDeferredRepaintDelay(double p)
-{
- s_normalDeferredRepaintDelay = p;
-}
-
-// Negative value would mean that first few repaints happen without a delay
-void FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(double p)
-{
- s_initialDeferredRepaintDelayDuringLoading = p;
-}
-
-// The delay grows on each repaint to this maximum value
-void FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(double p)
-{
- s_maxDeferredRepaintDelayDuringLoading = p;
-}
-
-// On each repaint the delay increases by this amount
-void FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(double p)
-{
- s_deferredRepaintDelayIncrementDuringLoading = p;
-}
-
</del><span class="cx"> void FrameView::setTracksRepaints(bool trackRepaints)
</span><span class="cx"> {
</span><span class="cx"> if (trackRepaints == m_isTrackingRepaints)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/page/FrameView.h        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -260,13 +260,7 @@
</span><span class="cx">
</span><span class="cx"> bool fixedElementsLayoutRelativeToFrame() const;
</span><span class="cx">
</span><del>- void beginDeferredRepaints();
- void endDeferredRepaints();
- void handleLoadCompleted();
- void flushDeferredRepaints();
- void startDeferredRepaintTimer(double delay);
- void resetDeferredRepaintDelay();
-
</del><ins>+ void disableLayerFlushThrottlingTemporarilyForInteraction();
</ins><span class="cx"> void updateLayerFlushThrottlingInAllFrames();
</span><span class="cx"> void adjustTiledBackingCoverage();
</span><span class="cx"> bool speculativeTilingEnabled() const { return m_speculativeTilingEnabled; }
</span><span class="lines">@@ -360,15 +354,6 @@
</span><span class="cx"> enum ScrollbarModesCalculationStrategy { RulesFromWebContentOnly, AnyRule };
</span><span class="cx"> void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);
</span><span class="cx">
</span><del>- // Normal delay
- static void setRepaintThrottlingDeferredRepaintDelay(double p);
- // Negative value would mean that first few repaints happen without a delay
- static void setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(double p);
- // The delay grows on each repaint to this maximum value
- static void setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(double p);
- // On each repaint the delay increses by this amount
- static void setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(double p);
-
</del><span class="cx"> virtual IntPoint lastKnownMousePosition() const override;
</span><span class="cx"> virtual bool isHandlingWheelEvent() const override;
</span><span class="cx"> bool shouldSetCursor() const;
</span><span class="lines">@@ -552,12 +537,6 @@
</span><span class="cx">
</span><span class="cx"> virtual void notifyPageThatContentAreaWillPaint() const override;
</span><span class="cx">
</span><del>- bool shouldUseLoadTimeDeferredRepaintDelay() const;
- void deferredRepaintTimerFired(Timer<FrameView>&);
- void doDeferredRepaints();
- void updateDeferredRepaintDelayAfterRepaint();
- double adjustedDeferredRepaintDelay() const;
-
</del><span class="cx"> void enableSpeculativeTilingIfNeeded();
</span><span class="cx"> void speculativeTilingEnableTimerFired(Timer<FrameView>&);
</span><span class="cx">
</span><span class="lines">@@ -637,11 +616,6 @@
</span><span class="cx"> bool m_inProgrammaticScroll;
</span><span class="cx"> bool m_safeToPropagateScrollToParent;
</span><span class="cx">
</span><del>- unsigned m_deferringRepaints;
- unsigned m_repaintCount;
- Vector<LayoutRect> m_repaintRects;
- Timer<FrameView> m_deferredRepaintTimer;
- double m_deferredRepaintDelay;
</del><span class="cx"> double m_lastPaintTime;
</span><span class="cx">
</span><span class="cx"> bool m_isTrackingRepaints; // Used for testing.
</span><span class="lines">@@ -698,11 +672,6 @@
</span><span class="cx">
</span><span class="cx"> LayoutMilestones m_milestonesPendingPaint;
</span><span class="cx">
</span><del>- static double s_normalDeferredRepaintDelay;
- static double s_initialDeferredRepaintDelayDuringLoading;
- static double s_maxDeferredRepaintDelayDuringLoading;
- static double s_deferredRepaintDelayIncrementDuringLoading;
-
</del><span class="cx"> static const unsigned visualCharacterThreshold = 200;
</span><span class="cx"> static const unsigned visualPixelThreshold = 32 * 32;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -929,8 +929,6 @@
</span><span class="cx"> if (blockRepaintMode == RepaintNothing)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- frameView().beginDeferredRepaints();
-
</del><span class="cx"> // Have any of the old selected objects changed compared to the new selection?
</span><span class="cx"> for (SelectedObjectMap::iterator i = oldSelectedObjects.begin(); i != oldObjectsEnd; ++i) {
</span><span class="cx"> RenderObject* obj = i->key;
</span><span class="lines">@@ -971,8 +969,6 @@
</span><span class="cx"> SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end();
</span><span class="cx"> for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlocksEnd; ++i)
</span><span class="cx"> i->value->repaint();
</span><del>-
- frameView().endDeferredRepaints();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderView::getSelection(RenderObject*& startRenderer, int& startOffset, RenderObject*& endRenderer, int& endOffset) const
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_settingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_settings.cpp (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_settings.cpp        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebKit/efl/ewk/ewk_settings.cpp        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -319,10 +319,11 @@
</span><span class="cx">
</span><span class="cx"> void ewk_settings_repaint_throttling_set(double deferredRepaintDelay, double initialDeferredRepaintDelayDuringLoading, double maxDeferredRepaintDelayDuringLoading, double deferredRepaintDelayIncrementDuringLoading)
</span><span class="cx"> {
</span><del>- WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay(deferredRepaintDelay);
- WebCore::FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(initialDeferredRepaintDelayDuringLoading);
- WebCore::FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(maxDeferredRepaintDelayDuringLoading);
- WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(deferredRepaintDelayIncrementDuringLoading);
</del><ins>+ // FIXME: EFL should switch to layer flush throttling.
+ UNUSED_PARAM(deferredRepaintDelay);
+ UNUSED_PARAM(initialDeferredRepaintDelayDuringLoading);
+ UNUSED_PARAM(maxDeferredRepaintDelayDuringLoading);
+ UNUSED_PARAM(deferredRepaintDelayIncrementDuringLoading);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (162836 => 162837)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-01-27 15:05:44 UTC (rev 162836)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-01-27 15:11:08 UTC (rev 162837)
</span><span class="lines">@@ -1420,13 +1420,6 @@
</span><span class="cx"> if (_private->dataSource && [self _isTopHTMLView])
</span><span class="cx"> [self _web_updateLayoutAndStyleIfNeededRecursive];
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
- if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
- coreView->flushDeferredRepaints();
- }
-#endif
-
</del><span class="cx"> [super viewWillDraw];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>