Display EWS status on bot watcher's dashboard
https://bugs.webkit.org/show_bug.cgi?id=126224

Silence spurious exceptions, no visible behavior change.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js:
(EWSQueue.prototype.update): Removed code that was only needed for an experimental
feature that wasn't landed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge PageVisibilityState & ViewState::IsVisible in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=126214

Reviewed by Alexey Proskuryakov.

WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility
state, and the view state. Remove visibility state from the WebKit2 layer. The visibility
state also tracks the prerender state - so split this out and handle it separately (a change
we should make in WebCore, too).

Source/WebCore: 

WebCore - changes the API tests exposed a bug, a view should only ever come out of the
prerender state when it becomes visible - redundant notifications that the view is still
hidden should be ignored.

* page/Page.cpp:
(WebCore::Page::setVisibilityState):
    - ignore visibility state change to hidden, if the current state is prerender.

Source/WebKit2: 

Removing the redundancy also removes the ability from the API to set a fake visibility state
(IsVisible tracks the actual visibility of the view). Through private API
(WKPageSetVisibilityState) a client could previously request the view be reported as hidden or
visible, but this didn't really work - the override was not enforced and the API may reset the
state at an arbitrary point. The mechanism is only used by testing code, which instead should
actually update the view visibility (this tests more of the actual visibility mechanisms used
by the browser). The one aspect of the API relied on by existing clients is the ability to
initialize a hidden view as prerender - continue to support this specific functionality via
WKPageSetVisibilityState, to maintain backwards compatibility.

- WebKit2 - remove internal state that tracks page visibility separately from the view state
visibility. For backwards compatibility continue to support the WKPageSetVisibilityState API,
but only to initialize the state to prerender.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetVisibilityState):
    - only support initializing the visibility state to prerender.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - remove m_visibilityState
(WebKit::WebPageProxy::initializeWebPage):
    - no need to send initial visibility state (this is sent as a part of the creation parameters).
(WebKit::WebPageProxy::viewStateDidChange):
    - no need to send visibility state change (this is sent as a part of view state).
(WebKit::WebPageProxy::setVisibilityStatePrerender):
    - setVisibilityState -> setVisibilityStatePrerender.
* UIProcess/WebPageProxy.h:
    - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
    - added call to updateVisibilityState.
(WebKit::WebPage::setViewIsVisible):
    - added call to updateVisibilityState.
(WebKit::WebPage::updateVisibilityState):
    - previously setVisibilityState, updates the page visibility state according to the view state.
(WebKit::WebPage::setVisibilityStatePrerender):
    - set visibility state to prerender.
* WebProcess/WebPage/WebPage.h:
    - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.messages.in:
    - SetVisibilityState -> SetVisibilityStatePrerender.

Tools: 

Tools - WebKit2 no longer (poorly) supports a fake visibility state, so to test the page
visibility mechanisms we should actually be changing characteristics of the view that will
be detected by WebKit2 as a visibility change. This affects three things:
    1) On setVisibilityState WebKitTestRunner must actually change visibility of the view.
    2) The 'PageVisibilityState' test in the API tests is useless (as evidenced by the fact
       that page visibility has been broken in WebKit2 for a couple of months, and didn't
       catch this fact). Removed in favour of:
    3) 'PageVisibilityStateWithWindowChanges' - this is the good stuff. This actually tests
       the visibility mechanism. Beef this test up by adding coverage for: a) the prerender
    state, b) document.hidden, and c) too many state change notifications (it already looks
    for too few).

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: Removed.
    - Removed PageVisibilityState - this test was ineffective, API no longer supports this
      test, and behaviour is covered by PageVisibilityStateWithWindowChanges.
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(-[PageVisibilityStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(runJavaScriptAlert):
    - Add checking for too many calls to the alert.
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::setPrerender):
    - Added methods to set visibility to prerender.
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
    - Added checking of 'document.hidden'.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setVisibilityState):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::setHidden):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::setHidden):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::setHidden):
    - Add setHidden method; call this from setVisibilityState.

LayoutTests: 

LayoutTests - remove test for notification on visibility state change to preerender. This test
was covering something nonsensical, and not supported by the spec - the page should never see
a visibility change to prerender, this should only be an initial state. WebKit2 API now only
allows the client to change the state to prerender without sending a notification, and there
is no sense in continuing to support the current test case, since the behaviour is neither
allowed by API nor available in web content.

The prerender state is now properly covered by API tests.

* fast/events/page-visibility-transition-test-expected.txt:
* fast/events/page-visibility-transition-test.html:
    - remove test for notification on visibility state change to preerender.



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