Missing amendments to r138927. Amend Changelog to remove item about Timer.h, which...
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 08:12:33 +0000 (08:12 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 08:12:33 +0000 (08:12 +0000)
* rendering/RenderSnapshottedPlugIn.cpp: Rename stopAndRestartDelayTimer() to resetDelayTimer().
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
(WebCore::RenderSnapshottedPlugIn::handleEvent):
(WebCore::RenderSnapshottedPlugIn::resetDelayTimer):
* rendering/RenderSnapshottedPlugIn.h:

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
Source/WebCore/rendering/RenderSnapshottedPlugIn.h

index 3ed5c1c..0ee3543 100644 (file)
@@ -1,3 +1,13 @@
+2013-01-07  Jon Lee  <jonlee@apple.com>
+
+        Missing amendments to r138927. Amend Changelog to remove item about Timer.h, which was not changed.
+
+        * rendering/RenderSnapshottedPlugIn.cpp: Rename stopAndRestartDelayTimer() to resetDelayTimer().
+        (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
+        (WebCore::RenderSnapshottedPlugIn::handleEvent):
+        (WebCore::RenderSnapshottedPlugIn::resetDelayTimer):
+        * rendering/RenderSnapshottedPlugIn.h:
+
 2013-01-06  Jon Lee  <jonlee@apple.com>
 
         Show label automatically for plug-ins of significant size
         Also, update some of the logging.
         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn): Update the logging.
 
-        * platform/Timer.h:
-        (WebCore::DeferrableOneShotTimer::setDelay): Added to allow changing the delay of the timer. It
-        does not change any currently set timer, but should change the delay for the next one.
-
         * rendering/RenderSnapshottedPlugIn.h: Rename the timer to m_showLabelDelayTimer since
         it can fire for two different reasons. Add some additional state variables, and an enum
         to explain why the label appeared.
index 84ff180..2b05070 100644 (file)
@@ -78,7 +78,7 @@ void RenderSnapshottedPlugIn::updateSnapshot(PassRefPtr<Image> image)
     m_snapshotResource->setCachedImage(new CachedImage(image.get()));
     repaint();
     if (m_shouldShowLabelAutomatically)
-        stopAndRestartDelayTimer(ShouldShowAutomatically);
+        resetDelayTimer(ShouldShowAutomatically);
 }
 
 void RenderSnapshottedPlugIn::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
@@ -237,7 +237,7 @@ void RenderSnapshottedPlugIn::handleEvent(Event* event)
         event->setDefaultHandled();
     } else if (event->type() == eventNames().mouseoverEvent) {
         if (!m_showedLabelOnce || m_showReason != ShouldShowAutomatically)
-            stopAndRestartDelayTimer(UserMousedOver);
+            resetDelayTimer(UserMousedOver);
         event->setDefaultHandled();
     } else if (event->type() == eventNames().mouseoutEvent) {
         if (m_showLabelDelayTimer.isActive())
@@ -248,7 +248,7 @@ void RenderSnapshottedPlugIn::handleEvent(Event* event)
                 repaintLabel();
             }
         } else if (m_shouldShowLabelAutomatically)
-            stopAndRestartDelayTimer(ShouldShowAutomatically);
+            resetDelayTimer(ShouldShowAutomatically);
         event->setDefaultHandled();
     }
 }
@@ -267,7 +267,7 @@ LayoutRect RenderSnapshottedPlugIn::tryToFitStartLabel(LabelSize size, const Lay
     return candidateRect;
 }
 
-void RenderSnapshottedPlugIn::stopAndRestartDelayTimer(ShowReason reason)
+void RenderSnapshottedPlugIn::resetDelayTimer(ShowReason reason)
 {
     m_showReason = reason;
     m_showLabelDelayTimer.startOneShot(reason == UserMousedOver ? showLabelAfterMouseOverDelay : showLabelAutomaticallyDelay);
index 839dc14..d9c2e94 100644 (file)
@@ -74,7 +74,7 @@ private:
         ShouldShowAutomatically
     };
 
-    void stopAndRestartDelayTimer(ShowReason);
+    void resetDelayTimer(ShowReason);
 
     OwnPtr<RenderImageResource> m_snapshotResource;
     bool m_shouldShowLabel;