Title: [173544] trunk/Source/WebCore
Revision
173544
Author
[email protected]
Date
2014-09-11 15:18:58 -0700 (Thu, 11 Sep 2014)

Log Message

WebKit scrollbars flash in non-dominant spaces when entering Mission Control
https://bugs.webkit.org/show_bug.cgi?id=136761
-and corresponding-
rdar://problem/18195616

Reviewed by Tim Horton.

This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
Show match the logic in AppKit. We only want these notifications when the window 
has become both visible and active (or lost both, in the case of hide).

Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
only when both visibility and active-state have changed.
* page/FocusController.cpp:
(WebCore::FocusController::setViewState):
(WebCore::FocusController::setIsVisibleAndActiveInternal):
(WebCore::FocusController::setIsVisibleInternal): Deleted.
* page/FocusController.h:

FocusController::setViewState() is the only place that needs to call 
ScrollableArea::contentAreaDidHide/Show, so remove these callers.
* page/FrameView.cpp:
(WebCore::FrameView::didMoveOnscreen): Deleted.
(WebCore::FrameView::willMoveOffscreen): Deleted.
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::setIsVisibleInternal):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173543 => 173544)


--- trunk/Source/WebCore/ChangeLog	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/ChangeLog	2014-09-11 22:18:58 UTC (rev 173544)
@@ -1,3 +1,33 @@
+2014-09-11  Beth Dakin  <[email protected]>
+
+        WebKit scrollbars flash in non-dominant spaces when entering Mission Control
+        https://bugs.webkit.org/show_bug.cgi?id=136761
+        -and corresponding-
+        rdar://problem/18195616
+
+        Reviewed by Tim Horton.
+
+        This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
+        Show match the logic in AppKit. We only want these notifications when the window 
+        has become both visible and active (or lost both, in the case of hide).
+
+        Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
+        only when both visibility and active-state have changed.
+        * page/FocusController.cpp:
+        (WebCore::FocusController::setViewState):
+        (WebCore::FocusController::setIsVisibleAndActiveInternal):
+        (WebCore::FocusController::setIsVisibleInternal): Deleted.
+        * page/FocusController.h:
+
+        FocusController::setViewState() is the only place that needs to call 
+        ScrollableArea::contentAreaDidHide/Show, so remove these callers.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::didMoveOnscreen): Deleted.
+        (WebCore::FrameView::willMoveOffscreen): Deleted.
+        * page/FrameView.h:
+        * page/Page.cpp:
+        (WebCore::Page::setIsVisibleInternal):
+
 2014-09-10  Michael Saboff  <[email protected]>
 
         Move JSScope out of JSFunction into separate JSCallee class

Modified: trunk/Source/WebCore/page/FocusController.cpp (173543 => 173544)


--- trunk/Source/WebCore/page/FocusController.cpp	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/page/FocusController.cpp	2014-09-11 22:18:58 UTC (rev 173544)
@@ -645,10 +645,11 @@
 
     if (changed & ViewState::IsFocused)
         setFocusedInternal(viewState & ViewState::IsFocused);
-    if (changed & ViewState::WindowIsActive)
+    if (changed & ViewState::WindowIsActive) {
         setActiveInternal(viewState & ViewState::WindowIsActive);
-    if (changed & ViewState::IsVisible)
-        setIsVisibleInternal(viewState & ViewState::IsVisible);
+        if (changed & ViewState::IsVisible)
+            setIsVisibleAndActiveInternal(viewState & ViewState::WindowIsActive);
+    }
 }
 
 void FocusController::setActive(bool active)
@@ -679,7 +680,7 @@
         scrollableArea->contentAreaDidHide();
 }
 
-void FocusController::setIsVisibleInternal(bool contentIsVisible)
+void FocusController::setIsVisibleAndActiveInternal(bool contentIsVisible)
 {
     FrameView* view = m_page.mainFrame().view();
     if (!view)

Modified: trunk/Source/WebCore/page/FocusController.h (173543 => 173544)


--- trunk/Source/WebCore/page/FocusController.h	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/page/FocusController.h	2014-09-11 22:18:58 UTC (rev 173544)
@@ -95,7 +95,7 @@
 private:
     void setActiveInternal(bool);
     void setFocusedInternal(bool);
-    void setIsVisibleInternal(bool);
+    void setIsVisibleAndActiveInternal(bool);
 
     bool advanceFocusDirectionally(FocusDirection, KeyboardEvent*);
     bool advanceFocusInDocumentOrder(FocusDirection, KeyboardEvent*, bool initialFocus);

Modified: trunk/Source/WebCore/page/FrameView.cpp (173543 => 173544)


--- trunk/Source/WebCore/page/FrameView.cpp	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/page/FrameView.cpp	2014-09-11 22:18:58 UTC (rev 173544)
@@ -1061,16 +1061,6 @@
     return !renderView || !renderView->compositor().has3DContent();
 }
 
-void FrameView::didMoveOnscreen()
-{
-    contentAreaDidShow();
-}
-
-void FrameView::willMoveOffscreen()
-{
-    contentAreaDidHide();
-}
-
 void FrameView::setIsInWindow(bool isInWindow)
 {
     if (RenderView* renderView = this->renderView())

Modified: trunk/Source/WebCore/page/FrameView.h (173543 => 173544)


--- trunk/Source/WebCore/page/FrameView.h	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/page/FrameView.h	2014-09-11 22:18:58 UTC (rev 173544)
@@ -177,8 +177,6 @@
     // a faithful representation of the content.
     WEBCORE_EXPORT bool isSoftwareRenderable() const;
 
-    void didMoveOnscreen();
-    void willMoveOffscreen();
     void setIsInWindow(bool);
 
     void resetScrollbars();

Modified: trunk/Source/WebCore/page/Page.cpp (173543 => 173544)


--- trunk/Source/WebCore/page/Page.cpp	2014-09-11 22:14:19 UTC (rev 173543)
+++ trunk/Source/WebCore/page/Page.cpp	2014-09-11 22:18:58 UTC (rev 173544)
@@ -1253,11 +1253,6 @@
     if (isVisible) {
         m_isPrerender = false;
 
-        for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
-            if (FrameView* frameView = frame->view())
-                frameView->didMoveOnscreen();
-        }
-
         resumeScriptedAnimations();
 
         if (FrameView* view = mainFrame().view())
@@ -1280,11 +1275,6 @@
         if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
             mainFrame().animation().suspendAnimations();
 
-        for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
-            if (FrameView* frameView = frame->view())
-                frameView->willMoveOffscreen();
-        }
-
         suspendScriptedAnimations();
 
         if (FrameView* view = mainFrame().view())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to