Title: [187706] trunk/Source
Revision
187706
Author
[email protected]
Date
2015-07-31 20:41:07 -0700 (Fri, 31 Jul 2015)

Log Message

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.

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (187705 => 187706)


--- trunk/Source/WebCore/ChangeLog	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/ChangeLog	2015-08-01 03:41:07 UTC (rev 187706)
@@ -1,3 +1,65 @@
+2015-07-31  Chris Dumez  <[email protected]>
+
+        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  <[email protected]>
 
         Removed pointSize from _addMarkersToList

Modified: trunk/Source/WebCore/css/FontLoader.cpp (187705 => 187706)


--- trunk/Source/WebCore/css/FontLoader.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/css/FontLoader.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -122,7 +122,7 @@
     , m_document(document)
     , m_numLoadingFromCSS(0)
     , m_numLoadingFromJS(0)
-    , m_pendingEventsTimer(*this, &FontLoader::pendingEventsTimerFired)
+    , m_pendingEventsTimer(*this, &FontLoader::firePendingEvents)
 {
     suspendIfNeeded();
 }

Modified: trunk/Source/WebCore/css/FontLoader.h (187705 => 187706)


--- trunk/Source/WebCore/css/FontLoader.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/css/FontLoader.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -91,7 +91,6 @@
     const char* activeDOMObjectName() const override;
     bool canSuspendForPageCache() const override;
 
-    void pendingEventsTimerFired() { firePendingEvents(); }
     void scheduleEvent(PassRefPtr<Event>);
     void firePendingEvents();
     bool resolveFontStyle(const String&, FontCascade&);

Modified: trunk/Source/WebCore/dom/Document.cpp (187705 => 187706)


--- trunk/Source/WebCore/dom/Document.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/dom/Document.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -444,7 +444,7 @@
     , 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 @@
     , 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 @@
     return m_styleRecalcTimer.isActive() && m_pendingStyleRecalcShouldForce;
 }
 
-void Document::styleRecalcTimerFired()
-{
-    updateStyleIfNeeded();
-}
-
 void Document::recalcStyle(Style::Change change)
 {
     ASSERT(!view() || !view()->isPainting());
@@ -6533,11 +6528,6 @@
     m_cachedDOMCookies = String();
 }
 
-void Document::domCookieCacheExpiryTimerFired()
-{
-    invalidateDOMCookieCache();
-}
-
 void Document::didLoadResourceSynchronously(const ResourceRequest&)
 {
     // Synchronous resources loading can set cookies so we invalidate the cookies cache

Modified: trunk/Source/WebCore/dom/Document.h (187705 => 187706)


--- trunk/Source/WebCore/dom/Document.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/dom/Document.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -725,7 +725,6 @@
     void unscheduleStyleRecalc();
     bool hasPendingStyleRecalc() const;
     bool hasPendingForcedStyleRecalc() const;
-    void styleRecalcTimerFired();
     void optimizedStyleSheetUpdateTimerFired();
 
     void registerNodeListForInvalidation(LiveNodeList&);
@@ -1370,7 +1369,6 @@
     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;

Modified: trunk/Source/WebCore/html/MediaController.cpp (187705 => 187706)


--- trunk/Source/WebCore/html/MediaController.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/html/MediaController.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -55,7 +55,7 @@
     , 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 @@
     m_timeupdateTimer.startRepeating(maxTimeupdateEventFrequency);
 }
 
-void MediaController::timeupdateTimerFired()
-{
-    scheduleTimeupdateEvent();
-}
-
 void MediaController::scheduleTimeupdateEvent()
 {
     double now = monotonicallyIncreasingTime();

Modified: trunk/Source/WebCore/html/MediaController.h (187705 => 187706)


--- trunk/Source/WebCore/html/MediaController.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/html/MediaController.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -127,7 +127,6 @@
     void clearPositionTimerFired();
     bool hasEnded() const;
     void scheduleTimeupdateEvent();
-    void timeupdateTimerFired();
     void startTimeupdateTimer();
 
     // EventTarget

Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (187705 => 187706)


--- trunk/Source/WebCore/loader/cache/CachedResource.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -113,7 +113,7 @@
 
 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())

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (187705 => 187706)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -125,7 +125,7 @@
     : 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 @@
 // 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;

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (187705 => 187706)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -153,7 +153,6 @@
     bool shouldContinueAfterNotifyingLoadedFromMemoryCache(const CachedResourceRequest&, CachedResource*);
     bool checkInsecureContent(CachedResource::Type, const URL&) const;
 
-    void garbageCollectDocumentResourcesTimerFired();
     void performPostLoadActions();
 
     bool clientDefersImage(const URL&) const;

Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (187705 => 187706)


--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -69,7 +69,7 @@
     , m_deadDecodedDataDeletionInterval(defaultDecodedDataDeletionInterval)
     , m_liveSize(0)
     , m_deadSize(0)
-    , m_pruneTimer(*this, &MemoryCache::pruneTimerFired)
+    , m_pruneTimer(*this, &MemoryCache::prune)
 {
 }
 
@@ -759,11 +759,6 @@
     pruneLiveResources();
 }
 
-void MemoryCache::pruneTimerFired()
-{
-    prune();
-}
-
 void MemoryCache::pruneSoon()
 {
      if (m_pruneTimer.isActive())

Modified: trunk/Source/WebCore/loader/cache/MemoryCache.h (187705 => 187706)


--- trunk/Source/WebCore/loader/cache/MemoryCache.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -187,7 +187,6 @@
     unsigned liveCapacity() const;
     unsigned deadCapacity() const;
     bool needsPruning() const;
-    void pruneTimerFired();
 
     CachedResource* resourceForRequestImpl(const ResourceRequest&, CachedResourceMap&);
 

Modified: trunk/Source/WebCore/page/EventSource.cpp (187705 => 187706)


--- trunk/Source/WebCore/page/EventSource.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/EventSource.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -64,7 +64,7 @@
     , 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 @@
     dispatchEvent(Event::create(eventNames().errorEvent, false, false));
 }
 
-void EventSource::connectTimerFired()
-{
-    connect();
-}
-
 String EventSource::url() const
 {
     return m_url.string();

Modified: trunk/Source/WebCore/page/EventSource.h (187705 => 187706)


--- trunk/Source/WebCore/page/EventSource.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/EventSource.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -96,7 +96,6 @@
     void networkRequestEnded();
     void scheduleInitialConnect();
     void scheduleReconnect();
-    void connectTimerFired();
     void abortConnectionAttempt();
     void parseEventStream();
     void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength);

Modified: trunk/Source/WebCore/page/FrameView.cpp (187705 => 187706)


--- trunk/Source/WebCore/page/FrameView.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/FrameView.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -167,7 +167,7 @@
     , 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 @@
     , 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 @@
     return maximumOffset;
 }
 
-void FrameView::delayedScrollEventTimerFired()
-{
-    sendScrollEvent();
-}
-
 void FrameView::viewportContentsChanged()
 {
     if (!frame().view()) {
@@ -3164,11 +3159,6 @@
     adjustTiledBackingCoverage();
 }
 
-void FrameView::postLayoutTimerFired()
-{
-    performPostLayoutTasks();
-}
-
 void FrameView::autoSizeIfEnabled()
 {
     if (!m_shouldAutoSize)

Modified: trunk/Source/WebCore/page/FrameView.h (187705 => 187706)


--- trunk/Source/WebCore/page/FrameView.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/FrameView.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -245,7 +245,6 @@
     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 @@
 
     void restoreScrollbar();
 
-    void postLayoutTimerFired();
-
     WEBCORE_EXPORT bool wasScrolledByUser() const;
     WEBCORE_EXPORT void setWasScrolledByUser(bool);
 

Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h (187705 => 187706)


--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -53,7 +53,6 @@
 private:
     virtual void scheduleTreeStateCommit() override;
 
-    void scrollingStateTreeCommitterTimerFired();
     void commitTreeState();
 
     Timer m_scrollingStateTreeCommitterTimer;

Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm (187705 => 187706)


--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm	2015-08-01 03:41:07 UTC (rev 187706)
@@ -51,7 +51,7 @@
 
 ScrollingCoordinatorIOS::ScrollingCoordinatorIOS(Page* page)
     : AsyncScrollingCoordinator(page)
-    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired)
+    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorIOS::commitTreeState)
 {
     setScrollingTree(ScrollingTreeIOS::create(this));
 }
@@ -90,11 +90,6 @@
     m_scrollingStateTreeCommitterTimer.startOneShot(0);
 }
 
-void ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired()
-{
-    commitTreeState();
-}
-
 void ScrollingCoordinatorIOS::commitTreeState()
 {
     ASSERT(scrollingStateTree()->hasChangedProperties());

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h (187705 => 187706)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -53,7 +53,6 @@
 private:
     virtual void scheduleTreeStateCommit() override;
 
-    void scrollingStateTreeCommitterTimerFired();
     void commitTreeState();
     
     void updateTiledScrollingIndicator();

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (187705 => 187706)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm	2015-08-01 03:41:07 UTC (rev 187706)
@@ -53,7 +53,7 @@
 
 ScrollingCoordinatorMac::ScrollingCoordinatorMac(Page* page)
     : AsyncScrollingCoordinator(page)
-    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired)
+    , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorMac::commitTreeState)
 {
     setScrollingTree(ScrollingTreeMac::create(this));
 }
@@ -107,11 +107,6 @@
     m_scrollingStateTreeCommitterTimer.startOneShot(0);
 }
 
-void ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired()
-{
-    commitTreeState();
-}
-
 void ScrollingCoordinatorMac::commitTreeState()
 {
     willCommitTree();

Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (187705 => 187706)


--- trunk/Source/WebCore/platform/graphics/FontCache.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -92,7 +92,7 @@
 }
 
 FontCache::FontCache()
-    : m_purgeTimer(*this, &FontCache::purgeTimerFired)
+    : m_purgeTimer(*this, &FontCache::purgeInactiveFontDataIfNeeded)
 {
 }
 
@@ -395,11 +395,6 @@
     return *addResult.iterator->value;
 }
 
-void FontCache::purgeTimerFired()
-{
-    purgeInactiveFontDataIfNeeded();
-}
-
 void FontCache::purgeInactiveFontDataIfNeeded()
 {
     bool underMemoryPressure = MemoryPressureHandler::singleton().isUnderMemoryPressure();

Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (187705 => 187706)


--- trunk/Source/WebCore/platform/graphics/FontCache.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -164,8 +164,6 @@
     FontCache();
     ~FontCache() = delete;
 
-    void purgeTimerFired();
-
     WEBCORE_EXPORT void purgeInactiveFontDataIfNeeded();
 
     // FIXME: This method should eventually be removed.

Modified: trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp (187705 => 187706)


--- trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp	2015-08-01 03:41:07 UTC (rev 187706)
@@ -57,7 +57,7 @@
     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 @@
     static ScratchBuffer& singleton();
 
 private:
-    void timerFired()
-    {
-        clearScratchBuffer();
-    }
-    
     void clearScratchBuffer()
     {
         m_imageBuffer = nullptr;

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h (187705 => 187706)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -181,7 +181,6 @@
     void ensureLayer();
     void destroyLayer();
     bool shouldBePlaying() const;
-    void seekTimerFired();
 
     friend class MediaSourcePrivateAVFObjC;
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (187705 => 187706)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2015-08-01 03:41:07 UTC (rev 187706)
@@ -136,7 +136,7 @@
     : 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 @@
     m_seekTimer.startOneShot(0);
 }
 
-void MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired()
-{
-    seekInternal();
-}
-
 void MediaPlayerPrivateMediaSourceAVFObjC::seekInternal()
 {
     std::unique_ptr<PendingSeek> pendingSeek;

Modified: trunk/Source/WebKit/mac/ChangeLog (187705 => 187706)


--- trunk/Source/WebKit/mac/ChangeLog	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-08-01 03:41:07 UTC (rev 187706)
@@ -1,3 +1,19 @@
+2015-07-31  Chris Dumez  <[email protected]>
+
+        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  <[email protected]>
 
         REGRESSION (r174791): Returning a zombie NSImage from sharingService:transitionImageForShareItem:contentRect:

Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h (187705 => 187706)


--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -123,7 +123,6 @@
     RetainPtr<NSMutableURLRequest> m_request;
     NPPluginFuncs *m_pluginFuncs;
 
-    void deliverDataTimerFired();
     WebCore::Timer m_deliverDataTimer;
     
     WebNetscapePluginStream(WebCore::FrameLoader*);

Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm (187705 => 187706)


--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm	2015-08-01 03:41:07 UTC (rev 187706)
@@ -135,7 +135,7 @@
     , 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 @@
     , 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::deliverDataTimerFired()
-{
-    deliverData();
-}
-
 void WebNetscapePluginStream::deliverDataToFile(NSData *data)
 {
     if (m_fileDescriptor == -1 && !m_path) {

Modified: trunk/Source/WebKit2/ChangeLog (187705 => 187706)


--- trunk/Source/WebKit2/ChangeLog	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-01 03:41:07 UTC (rev 187706)
@@ -1,5 +1,21 @@
 2015-07-31  Chris Dumez  <[email protected]>
 
+        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  <[email protected]>
+
         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
         https://bugs.webkit.org/show_bug.cgi?id=143348
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (187705 => 187706)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h	2015-08-01 03:41:07 UTC (rev 187706)
@@ -114,7 +114,6 @@
     void updateScrolledExposedRect();
     void updateRootLayers();
 
-    void layerFlushTimerFired();
     void flushLayers();
 
     WebCore::TiledBacking* mainFrameTiledBacking() const;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (187705 => 187706)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2015-08-01 03:03:02 UTC (rev 187705)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2015-08-01 03:41:07 UTC (rev 187706)
@@ -60,7 +60,7 @@
     , 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 @@
     return true;
 }
 
-void RemoteLayerTreeDrawingArea::layerFlushTimerFired()
-{
-    flushLayers();
-}
-
 void RemoteLayerTreeDrawingArea::flushLayers()
 {
     if (!m_rootLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to