Title: [145731] trunk/Source/WebKit2
- Revision
- 145731
- Author
- grao...@apple.com
- Date
- 2013-03-13 11:47:34 -0700 (Wed, 13 Mar 2013)
Log Message
Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation
https://bugs.webkit.org/show_bug.cgi?id=112271
Reviewed by Tim Horton.
Add a new stopFadeOutAnimation() on PageOverlay that we call when
WebInspectorClient::highlight() is called and a page overlay
is already available. This ensures that any fade-out animation
is cleared before proceeding with showing the page overlay
for the new highlight.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::stopFadeOutAnimation):
(WebKit):
* WebProcess/WebPage/PageOverlay.h:
(PageOverlay):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (145730 => 145731)
--- trunk/Source/WebKit2/ChangeLog 2013-03-13 18:42:08 UTC (rev 145730)
+++ trunk/Source/WebKit2/ChangeLog 2013-03-13 18:47:34 UTC (rev 145731)
@@ -1,3 +1,24 @@
+2013-03-13 Antoine Quint <grao...@apple.com>
+
+ Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation
+ https://bugs.webkit.org/show_bug.cgi?id=112271
+
+ Reviewed by Tim Horton.
+
+ Add a new stopFadeOutAnimation() on PageOverlay that we call when
+ WebInspectorClient::highlight() is called and a page overlay
+ is already available. This ensures that any fade-out animation
+ is cleared before proceeding with showing the page overlay
+ for the new highlight.
+
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ (WebKit::WebInspectorClient::highlight):
+ * WebProcess/WebPage/PageOverlay.cpp:
+ (WebKit::PageOverlay::stopFadeOutAnimation):
+ (WebKit):
+ * WebProcess/WebPage/PageOverlay.h:
+ (PageOverlay):
+
2013-03-13 Pavel Feldman <pfeld...@chromium.org>
Web Inspector: get rid of hiddenPanels filter
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (145730 => 145731)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp 2013-03-13 18:42:08 UTC (rev 145730)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp 2013-03-13 18:47:34 UTC (rev 145731)
@@ -73,8 +73,10 @@
RefPtr<PageOverlay> highlightOverlay = PageOverlay::create(this);
m_highlightOverlay = highlightOverlay.get();
m_page->installPageOverlay(highlightOverlay.release(), true);
- } else
+ } else {
+ m_highlightOverlay->stopFadeOutAnimation();
m_highlightOverlay->setNeedsDisplay();
+ }
}
void WebInspectorClient::hideHighlight()
Modified: trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp (145730 => 145731)
--- trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp 2013-03-13 18:42:08 UTC (rev 145730)
+++ trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp 2013-03-13 18:47:34 UTC (rev 145731)
@@ -145,6 +145,12 @@
startFadeAnimation();
}
+void PageOverlay::stopFadeOutAnimation()
+{
+ m_fractionFadedIn = 1.0;
+ m_fadeAnimationTimer.stop();
+}
+
void PageOverlay::startFadeAnimation()
{
m_fadeAnimationStartTime = currentTime();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h (145730 => 145731)
--- trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h 2013-03-13 18:42:08 UTC (rev 145730)
+++ trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h 2013-03-13 18:47:34 UTC (rev 145731)
@@ -68,6 +68,7 @@
void startFadeInAnimation();
void startFadeOutAnimation();
+ void stopFadeOutAnimation();
float fractionFadedIn() const { return m_fractionFadedIn; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes