Drop dummy Timer callbacks
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Aug 2015 03:41:07 +0000 (03:41 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Aug 2015 03:41:07 +0000 (03:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147516

Reviewed by Alexey Proskuryakov.

Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
do nothing else beside calling a particular method. In such case, we
can use the called method as Timer callback instead.

Source/WebCore:

* css/FontLoader.cpp:
(WebCore::FontLoader::FontLoader):
* css/FontLoader.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::styleRecalcTimerFired): Deleted.
(WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
* dom/Document.h:
* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::timeupdateTimerFired): Deleted.
* html/MediaController.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
* loader/cache/CachedResourceLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache):
(WebCore::MemoryCache::pruneTimerFired): Deleted.
* loader/cache/MemoryCache.h:
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::connectTimerFired): Deleted.
* page/EventSource.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
(WebCore::FrameView::postLayoutTimerFired): Deleted.
* page/FrameView.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::FontCache):
(WebCore::FontCache::purgeTimerFired): Deleted.
* platform/graphics/FontCache.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::timerFired): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.

Source/WebKit/mac:

* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::WebNetscapePluginStream):
(WebNetscapePluginStream::deliverDataTimerFired): Deleted.

Source/WebKit2:

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/FontLoader.cpp
Source/WebCore/css/FontLoader.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/MediaController.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/loader/cache/MemoryCache.h
Source/WebCore/page/EventSource.cpp
Source/WebCore/page/EventSource.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h
Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
Source/WebCore/platform/graphics/FontCache.cpp
Source/WebCore/platform/graphics/FontCache.h
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/WebNetscapePluginStream.h
Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm

index 40783f9..a284bd0 100644 (file)
@@ -1,3 +1,65 @@
+2015-07-31  Chris Dumez  <cdumez@apple.com>
+
+        Drop dummy Timer callbacks
+        https://bugs.webkit.org/show_bug.cgi?id=147516
+
+        Reviewed by Alexey Proskuryakov.
+
+        Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
+        do nothing else beside calling a particular method. In such case, we
+        can use the called method as Timer callback instead.
+
+        * css/FontLoader.cpp:
+        (WebCore::FontLoader::FontLoader):
+        * css/FontLoader.h:
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::styleRecalcTimerFired): Deleted.
+        (WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
+        * dom/Document.h:
+        * html/MediaController.cpp:
+        (MediaController::MediaController):
+        (MediaController::timeupdateTimerFired): Deleted.
+        * html/MediaController.h:
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::CachedResource):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::CachedResourceLoader):
+        (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
+        * loader/cache/CachedResourceLoader.h:
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::MemoryCache):
+        (WebCore::MemoryCache::pruneTimerFired): Deleted.
+        * loader/cache/MemoryCache.h:
+        * page/EventSource.cpp:
+        (WebCore::EventSource::EventSource):
+        (WebCore::EventSource::connectTimerFired): Deleted.
+        * page/EventSource.h:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::FrameView):
+        (WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
+        (WebCore::FrameView::postLayoutTimerFired): Deleted.
+        * page/FrameView.h:
+        * page/scrolling/ios/ScrollingCoordinatorIOS.h:
+        * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
+        (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
+        (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
+        * page/scrolling/mac/ScrollingCoordinatorMac.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
+        (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
+        * platform/graphics/FontCache.cpp:
+        (WebCore::FontCache::FontCache):
+        (WebCore::FontCache::purgeTimerFired): Deleted.
+        * platform/graphics/FontCache.h:
+        * platform/graphics/ShadowBlur.cpp:
+        (WebCore::ScratchBuffer::ScratchBuffer):
+        (WebCore::ScratchBuffer::timerFired): Deleted.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.
+
 2015-07-31  Matthew Daiter  <mdaiter@apple.com>
 
         Removed pointSize from _addMarkersToList
index 82f0322..fd55a9e 100644 (file)
@@ -122,7 +122,7 @@ FontLoader::FontLoader(Document* document)
     , m_document(document)
     , m_numLoadingFromCSS(0)
     , m_numLoadingFromJS(0)
-    , m_pendingEventsTimer(*this, &FontLoader::pendingEventsTimerFired)
+    , m_pendingEventsTimer(*this, &FontLoader::firePendingEvents)
 {
     suspendIfNeeded();
 }
index 088c9e3..dfc501a 100644 (file)
@@ -91,7 +91,6 @@ private:
     const char* activeDOMObjectName() const override;
     bool canSuspendForPageCache() const override;
 
-    void pendingEventsTimerFired() { firePendingEvents(); }
     void scheduleEvent(PassRefPtr<Event>);
     void firePendingEvents();
     bool resolveFontStyle(const String&, FontCascade&);
index 9b0c220..e258eb1 100644 (file)
@@ -444,7 +444,7 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig
     , m_readyState(Complete)
     , m_bParsing(false)
     , m_optimizedStyleSheetUpdateTimer(*this, &Document::optimizedStyleSheetUpdateTimerFired)
-    , m_styleRecalcTimer(*this, &Document::styleRecalcTimerFired)
+    , m_styleRecalcTimer(*this, &Document::updateStyleIfNeeded)
     , m_pendingStyleRecalcShouldForce(false)
     , m_inStyleRecalc(false)
     , m_closeAfterStyleRecalc(false)
@@ -522,7 +522,7 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig
     , m_inputCursor(EmptyInputCursor::create())
 #endif
     , m_didAssociateFormControlsTimer(*this, &Document::didAssociateFormControlsTimerFired)
-    , m_cookieCacheExpiryTimer(*this, &Document::domCookieCacheExpiryTimerFired)
+    , m_cookieCacheExpiryTimer(*this, &Document::invalidateDOMCookieCache)
     , m_disabledFieldsetElementsCount(0)
     , m_hasInjectedPlugInsScript(false)
     , m_renderTreeBeingDestroyed(false)
@@ -1753,11 +1753,6 @@ bool Document::hasPendingForcedStyleRecalc() const
     return m_styleRecalcTimer.isActive() && m_pendingStyleRecalcShouldForce;
 }
 
-void Document::styleRecalcTimerFired()
-{
-    updateStyleIfNeeded();
-}
-
 void Document::recalcStyle(Style::Change change)
 {
     ASSERT(!view() || !view()->isPainting());
@@ -6533,11 +6528,6 @@ void Document::invalidateDOMCookieCache()
     m_cachedDOMCookies = String();
 }
 
-void Document::domCookieCacheExpiryTimerFired()
-{
-    invalidateDOMCookieCache();
-}
-
 void Document::didLoadResourceSynchronously(const ResourceRequest&)
 {
     // Synchronous resources loading can set cookies so we invalidate the cookies cache
index 1b3d384..e938a39 100644 (file)
@@ -725,7 +725,6 @@ public:
     void unscheduleStyleRecalc();
     bool hasPendingStyleRecalc() const;
     bool hasPendingForcedStyleRecalc() const;
-    void styleRecalcTimerFired();
     void optimizedStyleSheetUpdateTimerFired();
 
     void registerNodeListForInvalidation(LiveNodeList&);
@@ -1370,7 +1369,6 @@ private:
     void setCachedDOMCookies(const String&);
     bool isDOMCookieCacheValid() const { return m_cookieCacheExpiryTimer.isActive(); }
     void invalidateDOMCookieCache();
-    void domCookieCacheExpiryTimerFired();
     virtual void didLoadResourceSynchronously(const ResourceRequest&) override final;
 
     unsigned m_referencingNodeCount;
index 3472a08..ae52160 100644 (file)
@@ -55,7 +55,7 @@ MediaController::MediaController(ScriptExecutionContext& context)
     , m_closedCaptionsVisible(false)
     , m_clock(Clock::create())
     , m_scriptExecutionContext(context)
-    , m_timeupdateTimer(*this, &MediaController::timeupdateTimerFired)
+    , m_timeupdateTimer(*this, &MediaController::scheduleTimeupdateEvent)
     , m_previousTimeupdateTime(0)
 {
 }
@@ -672,11 +672,6 @@ void MediaController::startTimeupdateTimer()
     m_timeupdateTimer.startRepeating(maxTimeupdateEventFrequency);
 }
 
-void MediaController::timeupdateTimerFired()
-{
-    scheduleTimeupdateEvent();
-}
-
 void MediaController::scheduleTimeupdateEvent()
 {
     double now = monotonicallyIncreasingTime();
index d7db15a..ff072e5 100644 (file)
@@ -127,7 +127,6 @@ private:
     void clearPositionTimerFired();
     bool hasEnded() const;
     void scheduleTimeupdateEvent();
-    void timeupdateTimerFired();
     void startTimeupdateTimer();
 
     // EventTarget
index 5a4059b..0f1837d 100644 (file)
@@ -113,7 +113,7 @@ DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("Cac
 
 CachedResource::CachedResource(const ResourceRequest& request, Type type, SessionID sessionID)
     : m_resourceRequest(request)
-    , m_decodedDataDeletionTimer(*this, &CachedResource::decodedDataDeletionTimerFired, deadDecodedDataDeletionIntervalForResourceType(type))
+    , m_decodedDataDeletionTimer(*this, &CachedResource::destroyDecodedData, deadDecodedDataDeletionIntervalForResourceType(type))
     , m_sessionID(sessionID)
     , m_loadPriority(defaultPriorityForResourceType(type))
     , m_responseTimestamp(std::chrono::system_clock::now())
index 8fc9d73..14b9547 100644 (file)
@@ -125,7 +125,7 @@ CachedResourceLoader::CachedResourceLoader(DocumentLoader* documentLoader)
     : m_document(0)
     , m_documentLoader(documentLoader)
     , m_requestCount(0)
-    , m_garbageCollectDocumentResourcesTimer(*this, &CachedResourceLoader::garbageCollectDocumentResourcesTimerFired)
+    , m_garbageCollectDocumentResourcesTimer(*this, &CachedResourceLoader::garbageCollectDocumentResources)
     , m_autoLoadImages(true)
     , m_imagesEnabled(true)
     , m_allowStaleResources(false)
@@ -929,11 +929,6 @@ void CachedResourceLoader::loadDone(CachedResource* resource, bool shouldPerform
 // bookkeeping on CachedResources, so instead pseudo-GC them -- when the
 // reference count reaches 1, m_documentResources is the only reference, so
 // remove it from the map.
-void CachedResourceLoader::garbageCollectDocumentResourcesTimerFired()
-{
-    garbageCollectDocumentResources();
-}
-
 void CachedResourceLoader::garbageCollectDocumentResources()
 {
     typedef Vector<String, 10> StringVector;
index 43b9ba7..d83498f 100644 (file)
@@ -153,7 +153,6 @@ private:
     bool shouldContinueAfterNotifyingLoadedFromMemoryCache(const CachedResourceRequest&, CachedResource*);
     bool checkInsecureContent(CachedResource::Type, const URL&) const;
 
-    void garbageCollectDocumentResourcesTimerFired();
     void performPostLoadActions();
 
     bool clientDefersImage(const URL&) const;
index 7aa51f0..6fb9e73 100644 (file)
@@ -69,7 +69,7 @@ MemoryCache::MemoryCache()
     , m_deadDecodedDataDeletionInterval(defaultDecodedDataDeletionInterval)
     , m_liveSize(0)
     , m_deadSize(0)
-    , m_pruneTimer(*this, &MemoryCache::pruneTimerFired)
+    , m_pruneTimer(*this, &MemoryCache::prune)
 {
 }
 
@@ -759,11 +759,6 @@ void MemoryCache::prune()
     pruneLiveResources();
 }
 
-void MemoryCache::pruneTimerFired()
-{
-    prune();
-}
-
 void MemoryCache::pruneSoon()
 {
      if (m_pruneTimer.isActive())
index 4a00285..6d1aec7 100644 (file)
@@ -187,7 +187,6 @@ private:
     unsigned liveCapacity() const;
     unsigned deadCapacity() const;
     bool needsPruning() const;
-    void pruneTimerFired();
 
     CachedResource* resourceForRequestImpl(const ResourceRequest&, CachedResourceMap&);
 
index 17323b9..282ebab 100644 (file)
@@ -64,7 +64,7 @@ inline EventSource::EventSource(ScriptExecutionContext& context, const URL& url,
     , m_withCredentials(false)
     , m_state(CONNECTING)
     , m_decoder(TextResourceDecoder::create("text/plain", "UTF-8"))
-    , m_connectTimer(*this, &EventSource::connectTimerFired)
+    , m_connectTimer(*this, &EventSource::connect)
     , m_discardTrailingNewline(false)
     , m_requestInFlight(false)
     , m_reconnectDelay(defaultReconnectDelay)
@@ -169,11 +169,6 @@ void EventSource::scheduleReconnect()
     dispatchEvent(Event::create(eventNames().errorEvent, false, false));
 }
 
-void EventSource::connectTimerFired()
-{
-    connect();
-}
-
 String EventSource::url() const
 {
     return m_url.string();
index 7cdb136..e49d68e 100644 (file)
@@ -96,7 +96,6 @@ private:
     void networkRequestEnded();
     void scheduleInitialConnect();
     void scheduleReconnect();
-    void connectTimerFired();
     void abortConnectionAttempt();
     void parseEventStream();
     void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength);
index ccfbf22..fd676b6 100644 (file)
@@ -167,7 +167,7 @@ FrameView::FrameView(Frame& frame)
     , m_layoutRoot(nullptr)
     , m_layoutPhase(OutsideLayout)
     , m_inSynchronousPostLayout(false)
-    , m_postLayoutTasksTimer(*this, &FrameView::postLayoutTimerFired)
+    , m_postLayoutTasksTimer(*this, &FrameView::performPostLayoutTasks)
     , m_updateEmbeddedObjectsTimer(*this, &FrameView::updateEmbeddedObjectsTimerFired)
     , m_isTransparent(false)
     , m_baseBackgroundColor(Color::white)
@@ -177,7 +177,7 @@ FrameView::FrameView(Frame& frame)
     , m_wasScrolledByUser(false)
     , m_inProgrammaticScroll(false)
     , m_safeToPropagateScrollToParent(true)
-    , m_delayedScrollEventTimer(*this, &FrameView::delayedScrollEventTimerFired)
+    , m_delayedScrollEventTimer(*this, &FrameView::sendScrollEvent)
     , m_isTrackingRepaints(false)
     , m_shouldUpdateWhileOffscreen(true)
     , m_exposedRect(FloatRect::infiniteRect())
@@ -1823,11 +1823,6 @@ IntPoint FrameView::maximumScrollPosition() const
     return maximumOffset;
 }
 
-void FrameView::delayedScrollEventTimerFired()
-{
-    sendScrollEvent();
-}
-
 void FrameView::viewportContentsChanged()
 {
     if (!frame().view()) {
@@ -3164,11 +3159,6 @@ void FrameView::willEndLiveResize()
     adjustTiledBackingCoverage();
 }
 
-void FrameView::postLayoutTimerFired()
-{
-    performPostLayoutTasks();
-}
-
 void FrameView::autoSizeIfEnabled()
 {
     if (!m_shouldAutoSize)
index 94abf42..f52f9ea 100644 (file)
@@ -245,7 +245,6 @@ public:
     virtual bool isRubberBandInProgress() const override;
     WEBCORE_EXPORT virtual IntPoint minimumScrollPosition() const override;
     WEBCORE_EXPORT virtual IntPoint maximumScrollPosition() const override;
-    void delayedScrollEventTimerFired();
 
     void viewportContentsChanged();
     WEBCORE_EXPORT void resumeVisibleImageAnimationsIncludingSubframes();
@@ -316,8 +315,6 @@ public:
 
     void restoreScrollbar();
 
-    void postLayoutTimerFired();
-
     WEBCORE_EXPORT bool wasScrolledByUser() const;
     WEBCORE_EXPORT void setWasScrolledByUser(bool);
 
index 9167cfb..0f910b6 100644 (file)
@@ -53,7 +53,6 @@ public:
 private:
     virtual void scheduleTreeStateCommit() override;
 
-    void scrollingStateTreeCommitterTimerFired();
     void commitTreeState();
 
     Timer m_scrollingStateTreeCommitterTimer;
index b158218..8395f5f 100644 (file)
@@ -51,7 +51,7 @@ Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 
 ScrollingCoordinatorIOS::ScrollingCoordinatorIOS(Page* page)
     : AsyncScrollingCoordinator(page)
-    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired)
+    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorIOS::commitTreeState)
 {
     setScrollingTree(ScrollingTreeIOS::create(this));
 }
@@ -90,11 +90,6 @@ void ScrollingCoordinatorIOS::scheduleTreeStateCommit()
     m_scrollingStateTreeCommitterTimer.startOneShot(0);
 }
 
-void ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired()
-{
-    commitTreeState();
-}
-
 void ScrollingCoordinatorIOS::commitTreeState()
 {
     ASSERT(scrollingStateTree()->hasChangedProperties());
index 544185f..7476277 100644 (file)
@@ -53,7 +53,6 @@ public:
 private:
     virtual void scheduleTreeStateCommit() override;
 
-    void scrollingStateTreeCommitterTimerFired();
     void commitTreeState();
     
     void updateTiledScrollingIndicator();
index 2505e7b..7d813e2 100644 (file)
@@ -53,7 +53,7 @@ Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 
 ScrollingCoordinatorMac::ScrollingCoordinatorMac(Page* page)
     : AsyncScrollingCoordinator(page)
-    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired)
+    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorMac::commitTreeState)
 {
     setScrollingTree(ScrollingTreeMac::create(this));
 }
@@ -107,11 +107,6 @@ void ScrollingCoordinatorMac::scheduleTreeStateCommit()
     m_scrollingStateTreeCommitterTimer.startOneShot(0);
 }
 
-void ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired()
-{
-    commitTreeState();
-}
-
 void ScrollingCoordinatorMac::commitTreeState()
 {
     willCommitTree();
index 368c4b9..e8e02eb 100644 (file)
@@ -92,7 +92,7 @@ FontCache& FontCache::singleton()
 }
 
 FontCache::FontCache()
-    : m_purgeTimer(*this, &FontCache::purgeTimerFired)
+    : m_purgeTimer(*this, &FontCache::purgeInactiveFontDataIfNeeded)
 {
 }
 
@@ -395,11 +395,6 @@ Ref<Font> FontCache::fontForPlatformData(const FontPlatformData& platformData)
     return *addResult.iterator->value;
 }
 
-void FontCache::purgeTimerFired()
-{
-    purgeInactiveFontDataIfNeeded();
-}
-
 void FontCache::purgeInactiveFontDataIfNeeded()
 {
     bool underMemoryPressure = MemoryPressureHandler::singleton().isUnderMemoryPressure();
index 3a3d862..4acbe06 100644 (file)
@@ -164,8 +164,6 @@ private:
     FontCache();
     ~FontCache() = delete;
 
-    void purgeTimerFired();
-
     WEBCORE_EXPORT void purgeInactiveFontDataIfNeeded();
 
     // FIXME: This method should eventually be removed.
index 064800d..d70865a 100644 (file)
@@ -57,7 +57,7 @@ class ScratchBuffer {
     WTF_MAKE_FAST_ALLOCATED;
 public:
     ScratchBuffer()
-        : m_purgeTimer(*this, &ScratchBuffer::timerFired)
+        : m_purgeTimer(*this, &ScratchBuffer::clearScratchBuffer)
         , m_lastWasInset(false)
 #if !ASSERT_DISABLED
         , m_bufferInUse(false)
@@ -130,11 +130,6 @@ public:
     static ScratchBuffer& singleton();
 
 private:
-    void timerFired()
-    {
-        clearScratchBuffer();
-    }
-    
     void clearScratchBuffer()
     {
         m_imageBuffer = nullptr;
index 15c0ce3..a57534f 100644 (file)
@@ -181,7 +181,6 @@ private:
     void ensureLayer();
     void destroyLayer();
     bool shouldBePlaying() const;
-    void seekTimerFired();
 
     friend class MediaSourcePrivateAVFObjC;
 
index fd26b59..c805b3b 100644 (file)
@@ -136,7 +136,7 @@ MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC(Media
     : m_player(player)
     , m_weakPtrFactory(this)
     , m_synchronizer(adoptNS([allocAVSampleBufferRenderSynchronizerInstance() init]))
-    , m_seekTimer(*this, &MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired)
+    , m_seekTimer(*this, &MediaPlayerPrivateMediaSourceAVFObjC::seekInternal)
     , m_session(nullptr)
     , m_networkState(MediaPlayer::Empty)
     , m_readyState(MediaPlayer::HaveNothing)
@@ -421,11 +421,6 @@ void MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance(const MediaTime& ti
     m_seekTimer.startOneShot(0);
 }
 
-void MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired()
-{
-    seekInternal();
-}
-
 void MediaPlayerPrivateMediaSourceAVFObjC::seekInternal()
 {
     std::unique_ptr<PendingSeek> pendingSeek;
index ec3ca54..6b6dc1b 100644 (file)
@@ -1,3 +1,19 @@
+2015-07-31  Chris Dumez  <cdumez@apple.com>
+
+        Drop dummy Timer callbacks
+        https://bugs.webkit.org/show_bug.cgi?id=147516
+
+        Reviewed by Alexey Proskuryakov.
+
+        Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
+        do nothing else beside calling a particular method. In such case, we
+        can use the called method as Timer callback instead.
+
+        * Plugins/WebNetscapePluginStream.h:
+        * Plugins/WebNetscapePluginStream.mm:
+        (WebNetscapePluginStream::WebNetscapePluginStream):
+        (WebNetscapePluginStream::deliverDataTimerFired): Deleted.
+
 2015-07-31  Brady Eidson  <beidson@apple.com>
 
         REGRESSION (r174791): Returning a zombie NSImage from sharingService:transitionImageForShareItem:contentRect:
index 2eb9abf..d901aac 100644 (file)
@@ -123,7 +123,6 @@ private:
     RetainPtr<NSMutableURLRequest> m_request;
     NPPluginFuncs *m_pluginFuncs;
 
-    void deliverDataTimerFired();
     WebCore::Timer m_deliverDataTimer;
     
     WebNetscapePluginStream(WebCore::FrameLoader*);
index f87345f..d82647f 100644 (file)
@@ -135,7 +135,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(FrameLoader* frameLoader)
     , m_newStreamSuccessful(false)
     , m_frameLoader(frameLoader)
     , m_pluginFuncs(0)
-    , m_deliverDataTimer(*this, &WebNetscapePluginStream::deliverDataTimerFired)
+    , m_deliverDataTimer(*this, &WebNetscapePluginStream::deliverData)
 {
     memset(&m_stream, 0, sizeof(NPStream));
 }
@@ -155,7 +155,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug
     , m_frameLoader(0)
     , m_request(adoptNS([request mutableCopy]))
     , m_pluginFuncs(0)
-    , m_deliverDataTimer(*this, &WebNetscapePluginStream::deliverDataTimerFired)
+    , m_deliverDataTimer(*this, &WebNetscapePluginStream::deliverData)
 {
     memset(&m_stream, 0, sizeof(NPStream));
 
@@ -552,11 +552,6 @@ void WebNetscapePluginStream::deliverData()
     }
 }
 
-void WebNetscapePluginStream::deliverDataTimerFired()
-{
-    deliverData();
-}
-
 void WebNetscapePluginStream::deliverDataToFile(NSData *data)
 {
     if (m_fileDescriptor == -1 && !m_path) {
index 58f32d2..ec52a9d 100644 (file)
@@ -1,5 +1,21 @@
 2015-07-31  Chris Dumez  <cdumez@apple.com>
 
+        Drop dummy Timer callbacks
+        https://bugs.webkit.org/show_bug.cgi?id=147516
+
+        Reviewed by Alexey Proskuryakov.
+
+        Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
+        do nothing else beside calling a particular method. In such case, we
+        can use the called method as Timer callback instead.
+
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+        (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.
+
+2015-07-31  Chris Dumez  <cdumez@apple.com>
+
         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
         https://bugs.webkit.org/show_bug.cgi?id=143348
 
index b8b28f2..00abb15 100644 (file)
@@ -114,7 +114,6 @@ private:
     void updateScrolledExposedRect();
     void updateRootLayers();
 
-    void layerFlushTimerFired();
     void flushLayers();
 
     WebCore::TiledBacking* mainFrameTiledBacking() const;
index a2cef58..1cf5538 100644 (file)
@@ -60,7 +60,7 @@ RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage& webPage, const W
     , m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), *this))
     , m_exposedRect(FloatRect::infiniteRect())
     , m_scrolledExposedRect(FloatRect::infiniteRect())
-    , m_layerFlushTimer(*this, &RemoteLayerTreeDrawingArea::layerFlushTimerFired)
+    , m_layerFlushTimer(*this, &RemoteLayerTreeDrawingArea::flushLayers)
     , m_isFlushingSuspended(false)
     , m_hasDeferredFlush(false)
     , m_isThrottlingLayerFlushes(false)
@@ -332,11 +332,6 @@ bool RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling(WebCore::LayerFlushT
     return true;
 }
 
-void RemoteLayerTreeDrawingArea::layerFlushTimerFired()
-{
-    flushLayers();
-}
-
 void RemoteLayerTreeDrawingArea::flushLayers()
 {
     if (!m_rootLayer)