Title: [183859] trunk/Source/WebCore
Revision
183859
Author
timothy_hor...@apple.com
Date
2015-05-05 23:26:24 -0700 (Tue, 05 May 2015)

Log Message

REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
https://bugs.webkit.org/show_bug.cgi?id=144651
<rdar://problem/20755722>

Reviewed by Dan Bernstein.

* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::clearTextIndicator):
(WebCore::TextIndicatorWindow::setTextIndicator):
(WebCore::TextIndicatorWindow::closeWindow):
(WebCore::TextIndicatorWindow::startFadeOut):
We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
Keep it on the WebTextIndicatorView instead.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183858 => 183859)


--- trunk/Source/WebCore/ChangeLog	2015-05-06 06:23:24 UTC (rev 183858)
+++ trunk/Source/WebCore/ChangeLog	2015-05-06 06:26:24 UTC (rev 183859)
@@ -1,3 +1,20 @@
+2015-05-05  Timothy Horton  <timothy_hor...@apple.com>
+
+        REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
+        https://bugs.webkit.org/show_bug.cgi?id=144651
+        <rdar://problem/20755722>
+
+        Reviewed by Dan Bernstein.
+
+        * page/mac/TextIndicatorWindow.h:
+        * page/mac/TextIndicatorWindow.mm:
+        (WebCore::TextIndicatorWindow::clearTextIndicator):
+        (WebCore::TextIndicatorWindow::setTextIndicator):
+        (WebCore::TextIndicatorWindow::closeWindow):
+        (WebCore::TextIndicatorWindow::startFadeOut):
+        We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
+        Keep it on the WebTextIndicatorView instead.
+
 2015-05-05  Žan Doberšek  <zdober...@igalia.com>
 
         Add missing vtable override specifiers under Source/WebCore/html

Modified: trunk/Source/WebCore/page/mac/TextIndicatorWindow.h (183858 => 183859)


--- trunk/Source/WebCore/page/mac/TextIndicatorWindow.h	2015-05-06 06:23:24 UTC (rev 183858)
+++ trunk/Source/WebCore/page/mac/TextIndicatorWindow.h	2015-05-06 06:26:24 UTC (rev 183859)
@@ -62,8 +62,6 @@
     RetainPtr<WebTextIndicatorView> m_textIndicatorView;
 
     RunLoop::Timer<TextIndicatorWindow> m_temporaryTextIndicatorTimer;
-
-    bool m_fadingOut { false };
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm (183858 => 183859)


--- trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-05-06 06:23:24 UTC (rev 183858)
+++ trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-05-06 06:26:24 UTC (rev 183859)
@@ -82,6 +82,8 @@
 - (void)setAnimationProgress:(float)progress;
 - (BOOL)hasCompletedAnimation;
 
+@property (nonatomic, setter=setFadingOut:) BOOL isFadingOut;
+
 @end
 
 @implementation WebTextIndicatorView
@@ -369,7 +371,7 @@
 {
     RefPtr<TextIndicator> textIndicator = WTF::move(m_textIndicator);
 
-    if (m_fadingOut)
+    if ([m_textIndicatorView isFadingOut])
         return;
 
     if (textIndicator && textIndicator->wantsManualAnimation() && [m_textIndicatorView hasCompletedAnimation] && animation == TextIndicatorDismissalAnimation::FadeOut) {
@@ -385,10 +387,10 @@
     if (m_textIndicator == textIndicator.ptr())
         return;
 
+    closeWindow();
+
     m_textIndicator = textIndicator.ptr();
 
-    closeWindow();
-
     CGFloat horizontalMargin = dropShadowBlurRadius * 2 + horizontalBorder;
     CGFloat verticalMargin = dropShadowBlurRadius * 2 + verticalBorder;
     
@@ -426,7 +428,7 @@
     if (!m_textIndicatorWindow)
         return;
 
-    if (m_fadingOut)
+    if ([m_textIndicatorView isFadingOut])
         return;
 
     m_temporaryTextIndicatorTimer.stop();
@@ -438,7 +440,7 @@
 
 void TextIndicatorWindow::startFadeOut()
 {
-    m_fadingOut = true;
+    [m_textIndicatorView setFadingOut:YES];
     RetainPtr<NSWindow> indicatorWindow = m_textIndicatorWindow;
     [m_textIndicatorView hideWithCompletionHandler:[indicatorWindow] {
         [[indicatorWindow parentWindow] removeChildWindow:indicatorWindow.get()];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to