Title: [161228] trunk/Source
Revision
161228
Author
[email protected]
Date
2014-01-02 14:35:58 -0800 (Thu, 02 Jan 2014)

Log Message

Source/WebCore: [iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved()
(also crashes when scrolling certain sites)
https://bugs.webkit.org/show_bug.cgi?id=126401
<rdar://problem/15739334>

Patch by Daniel Bates <[email protected]> on 2014-01-02
Reviewed by Tim Horton.

* page/ios/EventHandlerIOS.mm:
(WebCore::currentEventSlot): Make the shared variable have static-storage duration.

Source/WebKit/mac: Remove WindowIsVisible
https://bugs.webkit.org/show_bug.cgi?id=126270

Reviewed by Tim Horton.

We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
The latter detects that the content is hidden in fewer cases than the former, and as such, the
former is always preferable.

This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
Plugin::windowVisibilityChanged.

* WebView/WebView.mm:
(-[WebView _windowWillOrderOnScreen:]):
(-[WebView _windowWillOrderOffScreen:]):
    - rename ContainingWindowIsVisible -> ContentIsVisible.

Source/WebKit2: Remove WindowIsVisible
https://bugs.webkit.org/show_bug.cgi?id=126270

Reviewed by Tim Horton.

We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
The latter detects that the content is hidden in fewer cases than the former, and as such, the
former is always preferable.

This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
Plugin::windowVisibilityChanged.

* Shared/ViewState.h:
    - remove WindowIsVisible.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
    - remove isWindowVisible.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidMiniaturize:]):
(-[WKView _windowDidDeminiaturize:]):
(-[WKView _windowDidOrderOffScreen:]):
(-[WKView _windowDidOrderOnScreen:]):
    - remove ViewState::WindowIsVisible.
* UIProcess/PageClient.h:
    - remove isWindowVisible.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateViewState):
    - remove handling of ViewState::WindowIsVisible.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setIsVisible):
(WebKit::PluginView::didInitializePlugin):
* WebProcess/Plugins/PluginView.h:
    - setWindowIsVisible -> setIsVisible.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewIsVisible):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::windowAndWebPageAreFocused):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isVisible):
    - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161227 => 161228)


--- trunk/Source/WebCore/ChangeLog	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebCore/ChangeLog	2014-01-02 22:35:58 UTC (rev 161228)
@@ -12,6 +12,27 @@
 
 2014-01-02  Gavin Barraclough  <[email protected]>
 
+        Remove WindowIsVisible
+        https://bugs.webkit.org/show_bug.cgi?id=126270
+
+        Reviewed by Tim Horton.
+
+        We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
+        The latter detects that the content is hidden in fewer cases than the former, and as such, the
+        former is always preferable.
+
+        This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
+        Plugin::windowVisibilityChanged.
+
+        * WebCore.exp.in:
+        * page/FocusController.cpp:
+        (WebCore::FocusController::FocusController):
+        (WebCore::FocusController::setContentIsVisible):
+        * page/FocusController.h:
+            - rename ContainingWindowIsVisible -> ContentIsVisible.
+
+2014-01-02  Gavin Barraclough  <[email protected]>
+
         Merge didMoveOnscreen / page visibility to isVisible
         https://bugs.webkit.org/show_bug.cgi?id=126268
 

Modified: trunk/Source/WebCore/WebCore.exp.in (161227 => 161228)


--- trunk/Source/WebCore/WebCore.exp.in	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-01-02 22:35:58 UTC (rev 161228)
@@ -482,7 +482,7 @@
 __ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE
 __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE
 __ZN7WebCore15FocusController17setFocusedElementEPNS_7ElementEN3WTF10PassRefPtrINS_5FrameEEENS_14FocusDirectionE
-__ZN7WebCore15FocusController28setContainingWindowIsVisibleEb
+__ZN7WebCore15FocusController19setContentIsVisibleEb
 __ZN7WebCore15FocusController9setActiveEb
 __ZN7WebCore15GraphicsContext10strokeRectERKNS_9FloatRectEf
 __ZN7WebCore15GraphicsContext11clearShadowEv

Modified: trunk/Source/WebCore/page/FocusController.cpp (161227 => 161228)


--- trunk/Source/WebCore/page/FocusController.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebCore/page/FocusController.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -163,7 +163,7 @@
     , m_isActive(false)
     , m_isFocused(false)
     , m_isChangingFocusedFrame(false)
-    , m_containingWindowIsVisible(false)
+    , m_contentIsVisible(false)
 {
 }
 
@@ -663,18 +663,18 @@
         scrollableArea->contentAreaDidHide();
 }
 
-void FocusController::setContainingWindowIsVisible(bool containingWindowIsVisible)
+void FocusController::setContentIsVisible(bool contentIsVisible)
 {
-    if (m_containingWindowIsVisible == containingWindowIsVisible)
+    if (m_contentIsVisible == contentIsVisible)
         return;
 
-    m_containingWindowIsVisible = containingWindowIsVisible;
+    m_contentIsVisible = contentIsVisible;
 
     FrameView* view = m_page.mainFrame().view();
     if (!view)
         return;
 
-    contentAreaDidShowOrHide(view, containingWindowIsVisible);
+    contentAreaDidShowOrHide(view, contentIsVisible);
 
     for (Frame* frame = &m_page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
         FrameView* frameView = frame->view();
@@ -689,7 +689,7 @@
             ScrollableArea* scrollableArea = *it;
             ASSERT(scrollableArea->scrollbarsCanBeActive() || m_page.shouldSuppressScrollbarAnimations());
 
-            contentAreaDidShowOrHide(scrollableArea, containingWindowIsVisible);
+            contentAreaDidShowOrHide(scrollableArea, contentIsVisible);
         }
     }
 }

Modified: trunk/Source/WebCore/page/FocusController.h (161227 => 161228)


--- trunk/Source/WebCore/page/FocusController.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebCore/page/FocusController.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -79,8 +79,7 @@
     void setFocused(bool);
     bool isFocused() const { return m_isFocused; }
 
-    void setContainingWindowIsVisible(bool);
-    bool containingWindowIsVisible() const { return m_containingWindowIsVisible; }
+    void setContentIsVisible(bool);
 
     // These methods are used in WebCore/bindings/objc/DOM.mm.
     Element* nextFocusableElement(FocusNavigationScope, Node* start, KeyboardEvent*);
@@ -115,7 +114,7 @@
     bool m_isActive;
     bool m_isFocused;
     bool m_isChangingFocusedFrame;
-    bool m_containingWindowIsVisible;
+    bool m_contentIsVisible;
 
 };
 

Modified: trunk/Source/WebKit/mac/ChangeLog (161227 => 161228)


--- trunk/Source/WebKit/mac/ChangeLog	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-01-02 22:35:58 UTC (rev 161228)
@@ -1,5 +1,24 @@
 2014-01-02  Gavin Barraclough  <[email protected]>
 
+        Remove WindowIsVisible
+        https://bugs.webkit.org/show_bug.cgi?id=126270
+
+        Reviewed by Tim Horton.
+
+        We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
+        The latter detects that the content is hidden in fewer cases than the former, and as such, the
+        former is always preferable.
+
+        This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
+        Plugin::windowVisibilityChanged.
+
+        * WebView/WebView.mm:
+        (-[WebView _windowWillOrderOnScreen:]):
+        (-[WebView _windowWillOrderOffScreen:]):
+            - rename ContainingWindowIsVisible -> ContentIsVisible.
+
+2014-01-02  Gavin Barraclough  <[email protected]>
+
         Merge didMoveOnscreen / page visibility to isVisible
         https://bugs.webkit.org/show_bug.cgi?id=126268
 

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (161227 => 161228)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2014-01-02 22:35:58 UTC (rev 161228)
@@ -5337,7 +5337,7 @@
 
     if (_private && _private->page) {
         _private->page->resumeScriptedAnimations();
-        _private->page->focusController().setContainingWindowIsVisible(true);
+        _private->page->focusController().setContentIsVisible(true);
     }
 }
 
@@ -5350,7 +5350,7 @@
 {
     if (_private && _private->page) {
         _private->page->suspendScriptedAnimations();
-        _private->page->focusController().setContainingWindowIsVisible(false);
+        _private->page->focusController().setContentIsVisible(false);
     }
 }
 

Modified: trunk/Source/WebKit2/ChangeLog (161227 => 161228)


--- trunk/Source/WebKit2/ChangeLog	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-02 22:35:58 UTC (rev 161228)
@@ -1,5 +1,50 @@
 2014-01-02  Gavin Barraclough  <[email protected]>
 
+        Remove WindowIsVisible
+        https://bugs.webkit.org/show_bug.cgi?id=126270
+
+        Reviewed by Tim Horton.
+
+        We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
+        The latter detects that the content is hidden in fewer cases than the former, and as such, the
+        former is always preferable.
+
+        This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
+        Plugin::windowVisibilityChanged.
+
+        * Shared/ViewState.h:
+            - remove WindowIsVisible.
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+            - remove isWindowVisible.
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView viewDidMoveToWindow]):
+        (-[WKView _windowDidMiniaturize:]):
+        (-[WKView _windowDidDeminiaturize:]):
+        (-[WKView _windowDidOrderOffScreen:]):
+        (-[WKView _windowDidOrderOnScreen:]):
+            - remove ViewState::WindowIsVisible.
+        * UIProcess/PageClient.h:
+            - remove isWindowVisible.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::updateViewState):
+            - remove handling of ViewState::WindowIsVisible.
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::setIsVisible):
+        (WebKit::PluginView::didInitializePlugin):
+        * WebProcess/Plugins/PluginView.h:
+            - setWindowIsVisible -> setIsVisible.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::setViewIsVisible):
+        (WebKit::WebPage::setViewState):
+        (WebKit::WebPage::windowAndWebPageAreFocused):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::isVisible):
+            - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).
+
+2014-01-02  Gavin Barraclough  <[email protected]>
+
         Refactor ViewState handling for drawing area / plugins
         https://bugs.webkit.org/show_bug.cgi?id=126272
 

Modified: trunk/Source/WebKit2/Shared/ViewState.h (161227 => 161228)


--- trunk/Source/WebKit2/Shared/ViewState.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/Shared/ViewState.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -34,14 +34,13 @@
         IsFocused = 1 << 1,
         IsVisible = 1 << 2,
         IsInWindow = 1 << 3,
-        WindowIsVisible = 1 << 4,
-        IsLayerWindowServerHosted = 1 << 5
+        IsLayerWindowServerHosted = 1 << 4
     };
 
     typedef unsigned Flags;
 
     static const Flags NoFlags = 0;
-    static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | WindowIsVisible | IsLayerWindowServerHosted;
+    static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | IsLayerWindowServerHosted;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -279,11 +279,6 @@
     webkitWebViewBaseHandleDownloadRequest(WEBKIT_WEB_VIEW_BASE(m_viewWidget), download);
 }
 
-bool PageClientImpl::isWindowVisible()
-{
-    return webkitWebViewBaseIsWindowVisible(WEBKIT_WEB_VIEW_BASE(m_viewWidget));
-}
-
 void PageClientImpl::didCommitLoadForMainFrame()
 {
     webkitWebViewBaseResetClickCounter(WEBKIT_WEB_VIEW_BASE(m_viewWidget));

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -96,7 +96,6 @@
     virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&) OVERRIDE;
     virtual void updateTextInputState() OVERRIDE;
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) OVERRIDE;
-    virtual bool isWindowVisible() OVERRIDE;
 
 #if USE(ACCELERATED_COMPOSITING)
     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) OVERRIDE;

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -196,7 +196,7 @@
     bool isWindowVisible = visibilityEvent->state != GDK_VISIBILITY_FULLY_OBSCURED;
     if (priv->isWindowVisible != isWindowVisible) {
         priv->isWindowVisible = isWindowVisible;
-        priv->pageProxy->viewStateDidChange(ViewState::WindowIsVisible);
+        priv->pageProxy->viewStateDidChange(ViewState::IsVisible);
     }
 
     return FALSE;

Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -54,7 +54,6 @@
     virtual bool isViewWindowActive() OVERRIDE;
     virtual bool isViewFocused() OVERRIDE;
     virtual bool isViewVisible() OVERRIDE;
-    virtual bool isWindowVisible() OVERRIDE;
     virtual bool isViewInWindow() OVERRIDE;
     virtual void processDidCrash() OVERRIDE;
     virtual void didRelaunchProcess() OVERRIDE;

Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm	2014-01-02 22:35:58 UTC (rev 161228)
@@ -103,12 +103,6 @@
     return true;
 }
 
-bool PageClientImpl::isWindowVisible()
-{
-    notImplemented();
-    return true;
-}
-
 bool PageClientImpl::isViewInWindow()
 {
     return [m_view window];

Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -64,7 +64,6 @@
     virtual bool isViewWindowActive();
     virtual bool isViewFocused();
     virtual bool isViewVisible();
-    virtual bool isWindowVisible();
     virtual bool isViewInWindow();
 #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
     virtual bool isLayerWindowServerHosted();

Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm	2014-01-02 22:35:58 UTC (rev 161228)
@@ -209,11 +209,6 @@
     return true;
 }
 
-bool PageClientImpl::isWindowVisible()
-{
-    return [[m_wkView window] isVisible];
-}
-
 bool PageClientImpl::isViewInWindow()
 {
     return [m_wkView window];

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-01-02 22:35:58 UTC (rev 161228)
@@ -1882,7 +1882,7 @@
         _data->_windowHasValidBackingStore = NO;
         [self doWindowDidChangeScreen];
 
-        ViewState::Flags viewStateChanges = ViewState::WindowIsVisible | ViewState::WindowIsActive | ViewState::IsVisible;
+        ViewState::Flags viewStateChanges = ViewState::WindowIsActive | ViewState::IsVisible;
         if ([self isDeferringViewInWindowChanges])
             _data->_viewInWindowChangeWasDeferred = YES;
         else
@@ -1900,7 +1900,7 @@
 
         [self _accessibilityRegisterUIProcessTokens];
     } else {
-        ViewState::Flags viewStateChanges = ViewState::WindowIsVisible | ViewState::WindowIsActive | ViewState::IsVisible;
+        ViewState::Flags viewStateChanges = ViewState::WindowIsActive | ViewState::IsVisible;
         if ([self isDeferringViewInWindowChanges])
             _data->_viewInWindowChangeWasDeferred = YES;
         else
@@ -1947,12 +1947,12 @@
 - (void)_windowDidMiniaturize:(NSNotification *)notification
 {
     _data->_windowHasValidBackingStore = NO;
-    _data->_page->viewStateDidChange(ViewState::WindowIsVisible);
+    _data->_page->viewStateDidChange(ViewState::IsVisible);
 }
 
 - (void)_windowDidDeminiaturize:(NSNotification *)notification
 {
-    _data->_page->viewStateDidChange(ViewState::WindowIsVisible);
+    _data->_page->viewStateDidChange(ViewState::IsVisible);
 }
 
 - (void)_windowDidMove:(NSNotification *)notification
@@ -1969,12 +1969,12 @@
 
 - (void)_windowDidOrderOffScreen:(NSNotification *)notification
 {
-    _data->_page->viewStateDidChange(ViewState::WindowIsVisible | ViewState::IsVisible | ViewState::WindowIsActive);
+    _data->_page->viewStateDidChange(ViewState::IsVisible | ViewState::WindowIsActive);
 }
 
 - (void)_windowDidOrderOnScreen:(NSNotification *)notification
 {
-    _data->_page->viewStateDidChange(ViewState::WindowIsVisible | ViewState::IsVisible | ViewState::WindowIsActive);
+    _data->_page->viewStateDidChange(ViewState::IsVisible | ViewState::WindowIsActive);
 }
 
 - (void)_windowDidChangeBackingProperties:(NSNotification *)notification

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -340,12 +340,6 @@
     return isVisible();
 }
 
-bool WebView::isWindowVisible()
-{
-    notImplemented();
-    return true;
-}
-
 bool WebView::isViewInWindow()
 {
     notImplemented();

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -140,7 +140,6 @@
     virtual bool isViewWindowActive() OVERRIDE;
     virtual bool isViewFocused() OVERRIDE;
     virtual bool isViewVisible() OVERRIDE;
-    virtual bool isWindowVisible() OVERRIDE;
     virtual bool isViewInWindow() OVERRIDE;
 
     virtual void processDidCrash() OVERRIDE;

Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/PageClient.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -105,9 +105,6 @@
     // Return whether the view is visible.
     virtual bool isViewVisible() = 0;
 
-    // Return whether the window is visible.
-    virtual bool isWindowVisible() = 0;
-
     // Return whether the view is in a window.
     virtual bool isViewInWindow() = 0;
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (161227 => 161228)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -921,8 +921,6 @@
 void WebPageProxy::updateViewState(ViewState::Flags flagsToUpdate)
 {
     m_viewState &= ~flagsToUpdate;
-    if (flagsToUpdate & ViewState::WindowIsVisible && m_pageClient.isWindowVisible())
-        m_viewState |= ViewState::WindowIsVisible;
     if (flagsToUpdate & ViewState::IsFocused && m_pageClient.isViewFocused())
         m_viewState |= ViewState::IsFocused;
     if (flagsToUpdate & ViewState::WindowIsActive && m_pageClient.isViewWindowActive())

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (161227 => 161228)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -501,8 +501,8 @@
         return;
     }
 
-    if (changed & ViewState::WindowIsVisible)
-        m_plugin->windowVisibilityChanged(m_webPage->windowIsVisible());
+    if (changed & ViewState::IsVisible)
+        m_plugin->windowVisibilityChanged(m_webPage->isVisible());
     if (changed & ViewState::WindowIsActive)
         m_plugin->windowFocusChanged(m_webPage->windowIsFocused());
 #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
@@ -624,7 +624,7 @@
             m_pluginElement->dispatchPendingMouseClick();
     }
 
-    m_plugin->windowVisibilityChanged(m_webPage->windowIsVisible());
+    m_plugin->windowVisibilityChanged(m_webPage->isVisible());
     m_plugin->windowFocusChanged(m_webPage->windowIsFocused());
 #endif
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (161227 => 161228)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-01-02 22:35:58 UTC (rev 161228)
@@ -235,7 +235,6 @@
     , m_artificialPluginInitializationDelayEnabled(false)
     , m_scrollingPerformanceLoggingEnabled(false)
     , m_mainFrameIsScrollable(true)
-    , m_windowIsVisible(false)
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
     , m_readyToFindPrimarySnapshottedPlugin(false)
     , m_didFindPrimarySnapshottedPlugin(false)
@@ -1916,6 +1915,8 @@
 
 void WebPage::setViewIsVisible(bool isVisible)
 {
+    corePage()->focusController().setContentIsVisible(isVisible);
+
     m_page->setIsVisible(m_viewState & ViewState::IsVisible, false);
 }
 
@@ -2069,8 +2070,6 @@
 
     // We want to make sure to update the active state while hidden, so if the view is hidden then update the active state
     // early (in case it becomes visible), and if the view was visible then update active state later (in case it hides).
-    if (changed & ViewState::WindowIsVisible)
-        setWindowIsVisible(viewState & ViewState::WindowIsVisible);
     if (changed & ViewState::IsFocused)
         setFocused(viewState & ViewState::IsFocused);
     if (changed & ViewState::WindowIsActive && !(m_viewState & ViewState::IsVisible))
@@ -3037,13 +3036,6 @@
     send(Messages::WebPageProxy::SetWindowFrame(windowFrame));
 }
 
-void WebPage::setWindowIsVisible(bool windowIsVisible)
-{
-    m_windowIsVisible = windowIsVisible;
-
-    corePage()->focusController().setContainingWindowIsVisible(windowIsVisible);
-}
-
 #if PLATFORM(MAC)
 void WebPage::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoordinates, const FloatRect& windowFrameInUnflippedScreenCoordinates, const FloatRect& viewFrameInWindowCoordinates, const FloatPoint& accessibilityViewCoordinates)
 {
@@ -3084,7 +3076,7 @@
 
 bool WebPage::windowAndWebPageAreFocused() const
 {
-    if (!m_windowIsVisible)
+    if (!isVisible())
         return false;
 
     return m_page->focusController().isFocused() && m_page->focusController().isActive();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (161227 => 161228)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-01-02 22:32:19 UTC (rev 161227)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-01-02 22:35:58 UTC (rev 161228)
@@ -346,7 +346,6 @@
     void addPluginView(PluginView*);
     void removePluginView(PluginView*);
 
-    bool windowIsVisible() const { return m_windowIsVisible; }
     bool isVisible() const { return m_viewState & ViewState::IsVisible; }
 
 #if PLATFORM(MAC)
@@ -729,7 +728,6 @@
     void setActive(bool);
     void setFocused(bool);
     void setViewIsVisible(bool);
-    void setWindowIsVisible(bool);
     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
     void setWindowResizerSize(const WebCore::IntSize&);
     void setIsInWindow(bool);
@@ -904,9 +902,6 @@
 
     bool m_mainFrameIsScrollable;
 
-    // Whether the containing window is visible or not.
-    bool m_windowIsVisible;
-
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
     bool m_readyToFindPrimarySnapshottedPlugin;
     bool m_didFindPrimarySnapshottedPlugin;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to