Diff
Modified: branches/safari-600.7-branch/LayoutTests/ChangeLog (183176 => 183177)
--- branches/safari-600.7-branch/LayoutTests/ChangeLog 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/LayoutTests/ChangeLog 2015-04-23 07:47:07 UTC (rev 183177)
@@ -1,3 +1,7 @@
+2015-04-23 Babak Shafiei <[email protected]>
+
+ Roll out r181656. rdar://problem/20545362
+
2015-04-22 Matthew Hanson <[email protected]>
Merge r182835. rdar://problem/20645249
Modified: branches/safari-600.7-branch/Source/WebCore/ChangeLog (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/ChangeLog 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/ChangeLog 2015-04-23 07:47:07 UTC (rev 183177)
@@ -1,3 +1,7 @@
+2015-04-23 Babak Shafiei <[email protected]>
+
+ Roll out r181656. rdar://problem/20545362
+
2015-04-22 Matthew Hanson <[email protected]>
Merge r182835. rdar://problem/20645249
Modified: branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -226,11 +226,9 @@
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-Optional<RefPtr<DisplayRefreshMonitor>> ScriptedAnimationController::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
+PassRefPtr<DisplayRefreshMonitor> ScriptedAnimationController::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
{
- if (!m_document->page())
- return Optional<RefPtr<DisplayRefreshMonitor>>(nullptr);
- return Optional<RefPtr<DisplayRefreshMonitor>>(m_document->page()->chrome().client().createDisplayRefreshMonitor(displayID));
+ return m_document->page()->chrome().client().createDisplayRefreshMonitor(displayID);
}
#endif
Modified: branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/dom/ScriptedAnimationController.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -91,7 +91,7 @@
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
// Override for DisplayRefreshMonitorClient
virtual void displayRefreshFired(double timestamp) override;
- virtual Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const override;
+ virtual PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const override;
bool m_isUsingTimer;
bool m_isThrottled;
Modified: branches/safari-600.7-branch/Source/WebCore/page/ChromeClient.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/page/ChromeClient.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/page/ChromeClient.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -39,7 +39,6 @@
#include "WebCoreKeyboardUIMode.h"
#include <runtime/ConsoleTypes.h>
#include <wtf/Forward.h>
-#include <wtf/Optional.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
@@ -296,7 +295,7 @@
virtual GraphicsLayerFactory* graphicsLayerFactory() const { return nullptr; }
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- virtual Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const { return Nullopt; }
+ virtual PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const { return nullptr; }
#endif
// Pass 0 as the GraphicsLayer to detatch the root layer.
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -35,15 +35,13 @@
namespace WebCore {
-RefPtr<DisplayRefreshMonitor> DisplayRefreshMonitor::create(DisplayRefreshMonitorClient* client)
+PassRefPtr<DisplayRefreshMonitor> DisplayRefreshMonitor::create(DisplayRefreshMonitorClient* client)
{
PlatformDisplayID displayID = client->displayID();
- if (Optional<RefPtr<DisplayRefreshMonitor>> monitor = client->createDisplayRefreshMonitor(displayID))
- return monitor.value();
+ if (RefPtr<DisplayRefreshMonitor> monitor = client->createDisplayRefreshMonitor(displayID))
+ return monitor.release();
- // If ChromeClient returned Nullopt, we'll go ahead and make one of the default type.
-
#if PLATFORM(MAC)
return DisplayRefreshMonitorMac::create(displayID);
#endif
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -41,7 +41,7 @@
class DisplayRefreshMonitor : public RefCounted<DisplayRefreshMonitor> {
public:
- static RefPtr<DisplayRefreshMonitor> create(DisplayRefreshMonitorClient*);
+ static PassRefPtr<DisplayRefreshMonitor> create(DisplayRefreshMonitorClient*);
virtual ~DisplayRefreshMonitor();
// Return true if callback request was scheduled, false if it couldn't be
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorClient.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorClient.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorClient.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -29,7 +29,6 @@
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
#include "PlatformScreen.h"
-#include <wtf/Optional.h>
namespace WebCore {
@@ -44,10 +43,7 @@
// Always called on the main thread.
virtual void displayRefreshFired(double timestamp) = 0;
- // Returning nullopt indicates that WebCore should create whatever DisplayRefreshMonitor it deems
- // most appropriate for the current platform. Returning nullptr indicates that we should not try to
- // create a DisplayRefreshMonitor at all (and should instead fall back to using a timer).
- virtual Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const = 0;
+ virtual PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const = 0;
PlatformDisplayID displayID() const { return m_displayID; }
bool hasDisplayID() const { return m_displayIDIsSet; }
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -44,7 +44,7 @@
return manager.get();
}
-DisplayRefreshMonitor* DisplayRefreshMonitorManager::createMonitorForClient(DisplayRefreshMonitorClient* client)
+DisplayRefreshMonitor* DisplayRefreshMonitorManager::ensureMonitorForClient(DisplayRefreshMonitorClient* client)
{
PlatformDisplayID clientDisplayID = client->displayID();
for (const RefPtr<DisplayRefreshMonitor>& monitor : m_monitors) {
@@ -55,8 +55,6 @@
}
RefPtr<DisplayRefreshMonitor> monitor = DisplayRefreshMonitor::create(client);
- if (!monitor)
- return nullptr;
monitor->addClient(client);
DisplayRefreshMonitor* result = monitor.get();
m_monitors.append(monitor.release());
@@ -68,7 +66,7 @@
if (!client->hasDisplayID())
return;
- createMonitorForClient(client);
+ ensureMonitorForClient(client);
}
void DisplayRefreshMonitorManager::unregisterClient(DisplayRefreshMonitorClient* client)
@@ -94,9 +92,7 @@
if (!client->hasDisplayID())
return false;
- DisplayRefreshMonitor* monitor = createMonitorForClient(client);
- if (!monitor)
- return false;
+ DisplayRefreshMonitor* monitor = ensureMonitorForClient(client);
client->setIsScheduled(true);
return monitor->requestRefreshCallback();
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -54,7 +54,7 @@
DisplayRefreshMonitorManager() { }
virtual ~DisplayRefreshMonitorManager();
- DisplayRefreshMonitor* createMonitorForClient(DisplayRefreshMonitorClient*);
+ DisplayRefreshMonitor* ensureMonitorForClient(DisplayRefreshMonitorClient*);
Vector<RefPtr<DisplayRefreshMonitor>> m_monitors;
};
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -79,11 +79,9 @@
}
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-Optional<RefPtr<DisplayRefreshMonitor>> GraphicsLayerUpdater::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
+PassRefPtr<DisplayRefreshMonitor> GraphicsLayerUpdater::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
{
- if (!m_client)
- return Optional<RefPtr<DisplayRefreshMonitor>>(nullptr);
- return m_client->createDisplayRefreshMonitor(displayID);
+ return m_client ? m_client->createDisplayRefreshMonitor(displayID) : nullptr;
}
#endif
Modified: branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -38,7 +38,7 @@
virtual ~GraphicsLayerUpdaterClient() { }
virtual void flushLayersSoon(GraphicsLayerUpdater*) = 0;
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- virtual Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const = 0;
+ virtual PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const = 0;
#endif
};
@@ -55,7 +55,7 @@
void screenDidChange(PlatformDisplayID);
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- virtual Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const override;
+ virtual PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const override;
#endif
private:
Modified: branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -4034,14 +4034,14 @@
}
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-Optional<RefPtr<DisplayRefreshMonitor>> RenderLayerCompositor::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
+PassRefPtr<DisplayRefreshMonitor> RenderLayerCompositor::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
{
Frame& frame = m_renderView.frameView().frame();
Page* page = frame.page();
if (!page)
- return Optional<RefPtr<DisplayRefreshMonitor>>(nullptr);
+ return nullptr;
- return Optional<RefPtr<DisplayRefreshMonitor>>(page->chrome().client().createDisplayRefreshMonitor(displayID));
+ return page->chrome().client().createDisplayRefreshMonitor(displayID);
}
#endif
Modified: branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebCore/rendering/RenderLayerCompositor.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -390,7 +390,7 @@
ScrollingCoordinator* scrollingCoordinator() const;
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- Optional<RefPtr<DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const;
+ PassRefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const;
#endif
bool requiresCompositingForAnimation(RenderLayerModelObject&) const;
Modified: branches/safari-600.7-branch/Source/WebKit2/ChangeLog (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebKit2/ChangeLog 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebKit2/ChangeLog 2015-04-23 07:47:07 UTC (rev 183177)
@@ -1,3 +1,7 @@
+2015-04-23 Babak Shafiei <[email protected]>
+
+ Roll out r181656. rdar://problem/20545362
+
2015-04-22 Dana Burkart <[email protected]>
Merge r181580 for rdar://problem/20545393.
Modified: branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2015-04-23 07:47:07 UTC (rev 183177)
@@ -812,9 +812,9 @@
}
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-Optional<RefPtr<WebCore::DisplayRefreshMonitor>> WebChromeClient::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
+PassRefPtr<WebCore::DisplayRefreshMonitor> WebChromeClient::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
{
- return Optional<RefPtr<WebCore::DisplayRefreshMonitor>>(m_page->drawingArea()->createDisplayRefreshMonitor(displayID));
+ return m_page->drawingArea()->createDisplayRefreshMonitor(displayID);
}
#endif
Modified: branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (183176 => 183177)
--- branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2015-04-23 07:28:48 UTC (rev 183176)
+++ branches/safari-600.7-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2015-04-23 07:47:07 UTC (rev 183177)
@@ -217,7 +217,7 @@
virtual bool adjustLayerFlushThrottling(WebCore::LayerFlushThrottleState::Flags) override;
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- virtual Optional<RefPtr<WebCore::DisplayRefreshMonitor>> createDisplayRefreshMonitor(PlatformDisplayID) const override;
+ virtual PassRefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const override;
#endif
virtual CompositingTriggerFlags allowedCompositingTriggers() const