haikuwebkit/LayoutTests/fast/events/page-visibility-transition-...

93 lines
2.2 KiB
HTML
Raw Permalink Normal View History

2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
<html>
<body onload='startTest()'>
Change fast/e* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120975. Rubber stamped by Filip Pizlo. * fast/encoding/char-decoding-mac.html: * fast/encoding/char-decoding.html: * fast/encoding/char-encoding-mac.html: * fast/encoding/char-encoding.html: * fast/encoding/idn-security.html: * fast/encoding/invalid-xml.html: * fast/encoding/resources/invalid-xml.js: (runNextTest): * fast/events/autoscroll-in-overflow-hidden-html.html: * fast/events/autoscroll-should-not-stop-on-keypress.html: * fast/events/blur-focus-window-should-blur-focus-element.html: * fast/events/bogus-dropEffect-effectAllowed.html: * fast/events/caller-access-from-event-listener.html: * fast/events/check-defocus-event-order-when-triggered-by-mouse-click.html: * fast/events/check-defocus-event-order-when-triggered-by-tab.html: * fast/events/click-focus-control.html: * fast/events/click-range-slider.html: * fast/events/clientXY-in-zoom-and-scroll.html: * fast/events/constructors/before-load-event-constructor.html: * fast/events/constructors/close-event-constructor.html: * fast/events/constructors/composition-event-constructor.html: * fast/events/constructors/custom-event-constructor.html: * fast/events/constructors/device-proximity-event-constructor.html: * fast/events/constructors/error-event-constructor.html: * fast/events/constructors/event-constructors.html: * fast/events/constructors/focus-event-constructor.html: * fast/events/constructors/hash-change-event-constructor.html: * fast/events/constructors/keyboard-event-constructor.html: * fast/events/constructors/media-key-event-constructor.html: * fast/events/constructors/media-stream-event-constructor.html: * fast/events/constructors/message-event-constructor.html: * fast/events/constructors/mouse-event-constructor.html: * fast/events/constructors/overflow-event-constructor.html: * fast/events/constructors/page-transition-event-constructor.html: * fast/events/constructors/pop-state-event-constructor.html: * fast/events/constructors/progress-event-constructor.html: * fast/events/constructors/speech-recognition-error-constructor.html: * fast/events/constructors/speech-recognition-event-constructor.html: * fast/events/constructors/storage-event-constructor.html: * fast/events/constructors/track-event-constructor.html: * fast/events/constructors/transition-event-constructor.html: * fast/events/constructors/ui-event-constructor.html: * fast/events/constructors/webgl-context-event-constructor.html: * fast/events/constructors/webkit-animation-event-constructor.html: * fast/events/constructors/webkit-transition-event-constructor.html: * fast/events/constructors/wheel-event-constructor.html: * fast/events/content-changed-during-drop.html: * fast/events/context-nodrag.html: * fast/events/continuous-platform-wheelevent-in-scrolling-div.html: * fast/events/create-document-crash-on-attach-event.html: * fast/events/dispatch-event-being-dispatched.html: * fast/events/dispatch-synthetic-mouseevent.html: * fast/events/dispatch-to-function-with-handle-event.html: * fast/events/drag-and-drop-autoscroll.html: * fast/events/drag-and-drop-dataTransfer-types-nocrash.html: * fast/events/drag-and-drop-fire-drag-dragover.html: * fast/events/drag-and-drop-set-drag-data-arguments.html: * fast/events/drag-and-drop.html: * fast/events/dropzone-001.html: * fast/events/dropzone-002.html: * fast/events/dropzone-003.html: * fast/events/dropzone-004.html: * fast/events/dropzone-005.html: * fast/events/event-attribute.html: * fast/events/event-creation.html: * fast/events/event-function-toString.html: * fast/events/event-input-contentEditable.html: * fast/events/event-listener-list-mutation.html: * fast/events/event-listener-map-rehash-crash.html: * fast/events/event-listener-moving-documents.html: * fast/events/event-listener-sharing.html: * fast/events/file-input-hidden-in-ondrop.html: * fast/events/fire-mousedown-while-pressing-mouse-button.html: * fast/events/fire-popstate-event.html: * fast/events/fire-scroll-event-element.html: * fast/events/fire-scroll-event.html: * fast/events/flags-unset-on-init-event.html: * fast/events/form-iframe-target-before-load-crash.html: * fast/events/form-iframe-target-before-load-crash2.html: * fast/events/form-onchange.html: * fast/events/iframe-onmousemove.html: * fast/events/imagemap-norender-crash.html: * fast/events/init-events.html: * fast/events/inputText-never-fired-on-keydown-cancel.html: * fast/events/invalid-001.html: * fast/events/invalid-002.html: * fast/events/invalid-003.html: * fast/events/invalid-004.html: * fast/events/invalid-005.html: * fast/events/keyboardevent-location-constants.html: * fast/events/keydown-leftright-keys.html: * fast/events/keydown-numpad-keys.html: * fast/events/message-port-multi.html: * fast/events/mosuedrag-on-canvas-should-not-start-selection.html: * fast/events/mouse-click-events.html: * fast/events/mouse-cursor-change.html: * fast/events/mouse-cursor-image-set.html: * fast/events/mouse-cursor-multiframecur.html: * fast/events/mouse-cursor-no-mousemove.html: * fast/events/mouse-cursor.html: * fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html: * fast/events/mouse-focus-imagemap.html: * fast/events/mouse-relative-position.html: * fast/events/mouseout-dead-node.html: * fast/events/mouseover-button.html: * fast/events/mutation-during-append-child.html: * fast/events/mutation-during-insert-before.html: * fast/events/mutation-during-replace-child-2.html: * fast/events/mutation-during-replace-child.html: * fast/events/no-scroll-on-input-text-selection.html: * fast/events/onblur-remove.html: * fast/events/onchange-range-slider.html: * fast/events/onchange-setvalue.html: * fast/events/onchange-text-form-field.html: * fast/events/onerror-img-after-gc.html: * fast/events/onunload-back-to-page-cache.html: * fast/events/page-scaled-mouse-click-iframe.html: * fast/events/page-scaled-mouse-click.html: * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test.html: * fast/events/pagehide-timeout.html: * fast/events/pagehide-xhr-open.html: * fast/events/platform-wheelevent-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html: * fast/events/platform-wheelevent-paging-x-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-scrolling-page.html: * fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html: * fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html: * fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html: * fast/events/platform-wheelevent-paging-y-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-y-in-scrolling-page.html: * fast/events/popup-allowed-from-gesture-initiated-event.html: * fast/events/popup-blocked-from-fake-button-click.html: * fast/events/popup-blocked-from-fake-focus.html: * fast/events/popup-blocked-from-fake-user-gesture.html: * fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html: * fast/events/popup-blocking-timers1.html: * fast/events/popup-blocking-timers2.html: * fast/events/popup-blocking-timers3.html: * fast/events/popup-blocking-timers4.html: * fast/events/popup-blocking-timers5.html: * fast/events/popup-blocking-timers6.html: * fast/events/related-target-focusevent.html: * fast/events/resources/record-events.js: * fast/events/scale-and-scroll-body.html: * fast/events/scale-and-scroll-iframe-body.html: * fast/events/scale-and-scroll-iframe-window.html: * fast/events/scale-and-scroll-window.html: * fast/events/script-tests/TEMPLATE.html: * fast/events/scroll-after-click-on-tab-index.html: * fast/events/scroll-event-during-modal-dialog.html: * fast/events/scroll-event-phase.html: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: * fast/events/select-element.html: * fast/events/suspend-timers.html: * fast/events/tab-focus-link-in-canvas.html: * fast/events/tab-imagemap.html: * fast/events/tab-is-focusable-assert.html: * fast/events/tab-test-not-visible-imagemap.html: * fast/events/touch/basic-multi-touch-events-limited.html: * fast/events/touch/basic-multi-touch-events.html: * fast/events/touch/basic-single-touch-events.html: * fast/events/touch/create-touch-event.html: * fast/events/touch/document-create-touch-list-crash.html: * fast/events/touch/document-create-touch-list.html: * fast/events/touch/document-create-touch.html: * fast/events/touch/emulate-touch-events.html: * fast/events/touch/emulated-touch-iframe.html: * fast/events/touch/frame-hover-update.html: * fast/events/touch/gesture/context-menu-on-long-press.html: * fast/events/touch/gesture/context-menu-on-long-tap.html: * fast/events/touch/gesture/context-menu-on-two-finger-tap.html: * fast/events/touch/gesture/gesture-click.html: * fast/events/touch/gesture/gesture-dblclick.html: * fast/events/touch/gesture/gesture-scroll.html: * fast/events/touch/gesture/gesture-scrollbar.html: * fast/events/touch/gesture/gesture-tap-active-state-iframe.html: * fast/events/touch/gesture/gesture-tap-active-state.html: * fast/events/touch/gesture/gesture-tap-hover-clear.html: * fast/events/touch/gesture/gesture-tap-on-hover-element.html: * fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html: * fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html: * fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html: * fast/events/touch/gesture/pad-gesture-cancel.html: * fast/events/touch/gesture/pad-gesture-fling.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html: * fast/events/touch/gesture/touch-gesture-noscroll-body.html: * fast/events/touch/gesture/touch-gesture-noscroll-div.html: * fast/events/touch/gesture/touch-gesture-noscroll-iframe.html: * fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div-scaled.html: * fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe.html: * fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-page.html: * fast/events/touch/gesture/touch-gesture-scroll-shy-target.html: * fast/events/touch/gesture/touch-gesture-scroll-sideways.html: * fast/events/touch/multi-touch-grouped-targets.html: * fast/events/touch/multi-touch-inside-iframes.html: * fast/events/touch/multi-touch-inside-nested-iframes.html: * fast/events/touch/page-scaled-touch-gesture-click.html: * fast/events/touch/script-tests/TEMPLATE.html: * fast/events/touch/send-oncancel-event.html: * fast/events/touch/tap-highlight-color.html: * fast/events/touch/touch-active-state.html: * fast/events/touch/touch-before-pressing-spin-button.html: * fast/events/touch/touch-coords-in-zoom-and-scroll.html: * fast/events/touch/touch-handler-count.html: * fast/events/touch/touch-input-element-change-documents.html: * fast/events/touch/touch-inside-iframe-scrolled.html: * fast/events/touch/touch-inside-iframe.html: * fast/events/touch/touch-scaled-scrolled.html: * fast/events/touch/touch-slider-no-js-touch-listener.html: * fast/events/touch/touch-slider.html: * fast/events/touch/touch-stale-node-crash.html: * fast/events/touch/touch-target-limited.html: * fast/events/touch/touch-target.html: * fast/events/wheelevent-basic.html: * fast/events/wheelevent-constructor.html: * fast/events/wheelevent-direction-inverted-from-device.html: * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html: * fast/events/wheelevent-in-scrolling-div.html: * fast/events/wheelevent-in-text-node.html: * fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html: * fast/events/wheelevent-mousewheel-interaction.html: * fast/events/zoom-dblclick.html: * fast/exclusions/css-exclusions-disabled.html: * fast/exclusions/css-exclusions-enabled.html: * fast/exclusions/parsing/parsing-wrap-flow.html: * fast/exclusions/parsing/parsing-wrap-through.html: Canonical link: https://commits.webkit.org/138871@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-07 23:07:25 +00:00
<script src="../../resources/js-test-pre.js"></script>
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
<script>
description("This test checks that Page Visibility state values are correct and the event changes are fired correctly.");
var jsTestIsAsync = true;
function makePageVisible() {
Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests https://bugs.webkit.org/show_bug.cgi?id=89438 Reviewed by Tony Chang. * fast/doctypes/005-case-preserving.html: * fast/doctypes/doctype-after-comment.html: * fast/doctypes/doctype-at-end.html: * fast/doctypes/doctype-in-element.html: * fast/doctypes/doctype-parsing.html: * fast/doctypes/html-doctype.html: * fast/doctypes/xhtml-with-xhtmlmp-doctype.xhtml: * fast/doctypes/xml-doctype.xhtml: * fast/dom/: * fast/dynamic/5872671.html: * fast/dynamic/ancestor-to-absolute.html: * fast/dynamic/checkbox-selection-crash.html: * fast/dynamic/containing-block-change.html: * fast/dynamic/crash-generated-counter.html: * fast/dynamic/crash-generated-image.html: * fast/dynamic/crash-generated-quote.html: * fast/dynamic/crash-generated-text.html: * fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: * fast/dynamic/float-remove-above-line-2.html: * fast/dynamic/float-remove-above-line.html: * fast/dynamic/hover-before-position-after-style-change.html: * fast/dynamic/hover-before-position-after-style-change2.html: * fast/dynamic/hover-style-recalc-crash.html: * fast/dynamic/hovered-detach.html: * fast/dynamic/inline-to-block-crash.html: * fast/dynamic/insertAdjacentElement.html: * fast/dynamic/insertAdjacentHTML-allowed-parents.html: * fast/dynamic/insertAdjacentHTML.html: * fast/dynamic/insertAdjacentText.html: * fast/dynamic/jQuery-animation-crash.html: * fast/dynamic/layer-hit-test-crash.html: * fast/dynamic/layer-no-longer-paginated.html: * fast/dynamic/outerHTML-no-element.html: * fast/dynamic/paused-event-dispatch.html: * fast/dynamic/position-absolute-to-fixed-crash.html: * fast/dynamic/position-change-layout.html: * fast/dynamic/recursive-layout.html: * fast/dynamic/style-access-late-stylesheet-load.html: * fast/dynamic/subtree-common-root.html: * fast/dynamic/subtree-table-cell-height.html: * fast/dynamic/subtree-unrooted.html: * fast/encoding/: * fast/events/: * platform/chromium/fast/events/drag-downloadURL.html: * platform/chromium/fast/events/intercept-postmessage.html: * platform/chromium/fast/events/rtl-scrollbar.html: * platform/gtk/fast/events/event-sender-metakey.html: * platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: * platform/mac/fast/dom/character-index-for-point.html: * platform/mac/fast/dom/objc-wrapper-identity.html: * platform/mac/fast/dom/wrapper-classes-objc.html: * platform/mac/fast/dom/wrapper-round-tripping.html: * platform/mac/fast/events/objc-event-api.html: * platform/mac/fast/events/objc-keyboard-event-creation.html: * platform/qt/fast/events/event-sender-keydown-frame.html: * platform/win/fast/events/alt-numpad.html: * platform/win/fast/events/alt-space-scroll.html: * platform/win/fast/events/double-dead-char.html: * platform/win/fast/events/keyLocation-numpad.html: * platform/win/fast/events/panScroll-correct-direction.html: * platform/win/fast/events/panScroll-event-fired.html: * platform/win/fast/events/panScroll-image-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: * platform/win/fast/events/panScroll-nested-divs.html: * platform/win/fast/events/panScroll-no-iframe-jump.html: * platform/win/fast/events/panScroll-preventDefault.html: * platform/win/fast/events/script-tests/context-click-events.js: Canonical link: https://commits.webkit.org/107394@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-20 03:28:42 +00:00
if (window.testRunner)
testRunner.setPageVisibility("visible");
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
}
function makePageHidden() {
Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests https://bugs.webkit.org/show_bug.cgi?id=89438 Reviewed by Tony Chang. * fast/doctypes/005-case-preserving.html: * fast/doctypes/doctype-after-comment.html: * fast/doctypes/doctype-at-end.html: * fast/doctypes/doctype-in-element.html: * fast/doctypes/doctype-parsing.html: * fast/doctypes/html-doctype.html: * fast/doctypes/xhtml-with-xhtmlmp-doctype.xhtml: * fast/doctypes/xml-doctype.xhtml: * fast/dom/: * fast/dynamic/5872671.html: * fast/dynamic/ancestor-to-absolute.html: * fast/dynamic/checkbox-selection-crash.html: * fast/dynamic/containing-block-change.html: * fast/dynamic/crash-generated-counter.html: * fast/dynamic/crash-generated-image.html: * fast/dynamic/crash-generated-quote.html: * fast/dynamic/crash-generated-text.html: * fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: * fast/dynamic/float-remove-above-line-2.html: * fast/dynamic/float-remove-above-line.html: * fast/dynamic/hover-before-position-after-style-change.html: * fast/dynamic/hover-before-position-after-style-change2.html: * fast/dynamic/hover-style-recalc-crash.html: * fast/dynamic/hovered-detach.html: * fast/dynamic/inline-to-block-crash.html: * fast/dynamic/insertAdjacentElement.html: * fast/dynamic/insertAdjacentHTML-allowed-parents.html: * fast/dynamic/insertAdjacentHTML.html: * fast/dynamic/insertAdjacentText.html: * fast/dynamic/jQuery-animation-crash.html: * fast/dynamic/layer-hit-test-crash.html: * fast/dynamic/layer-no-longer-paginated.html: * fast/dynamic/outerHTML-no-element.html: * fast/dynamic/paused-event-dispatch.html: * fast/dynamic/position-absolute-to-fixed-crash.html: * fast/dynamic/position-change-layout.html: * fast/dynamic/recursive-layout.html: * fast/dynamic/style-access-late-stylesheet-load.html: * fast/dynamic/subtree-common-root.html: * fast/dynamic/subtree-table-cell-height.html: * fast/dynamic/subtree-unrooted.html: * fast/encoding/: * fast/events/: * platform/chromium/fast/events/drag-downloadURL.html: * platform/chromium/fast/events/intercept-postmessage.html: * platform/chromium/fast/events/rtl-scrollbar.html: * platform/gtk/fast/events/event-sender-metakey.html: * platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: * platform/mac/fast/dom/character-index-for-point.html: * platform/mac/fast/dom/objc-wrapper-identity.html: * platform/mac/fast/dom/wrapper-classes-objc.html: * platform/mac/fast/dom/wrapper-round-tripping.html: * platform/mac/fast/events/objc-event-api.html: * platform/mac/fast/events/objc-keyboard-event-creation.html: * platform/qt/fast/events/event-sender-keydown-frame.html: * platform/win/fast/events/alt-numpad.html: * platform/win/fast/events/alt-space-scroll.html: * platform/win/fast/events/double-dead-char.html: * platform/win/fast/events/keyLocation-numpad.html: * platform/win/fast/events/panScroll-correct-direction.html: * platform/win/fast/events/panScroll-event-fired.html: * platform/win/fast/events/panScroll-image-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: * platform/win/fast/events/panScroll-nested-divs.html: * platform/win/fast/events/panScroll-no-iframe-jump.html: * platform/win/fast/events/panScroll-preventDefault.html: * platform/win/fast/events/script-tests/context-click-events.js: Canonical link: https://commits.webkit.org/107394@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-20 03:28:42 +00:00
if (window.testRunner)
testRunner.setPageVisibility("hidden");
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
}
Unprefix Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=102340 Source/WebCore: Reviewed by Tim Horton. Remove prefixes from the document properties, and the visibilitychanged event. Rename the "preview" state to "unloaded". The "unloaded" state is never reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769). Add some comments to places where we should update the visibility state when going in and out of the page cache, but cannot safely do so yet. Tested by existing Page Visibility tests. * dom/Document.cpp: (WebCore::Document::pageVisibilityState): (WebCore::Document::visibilityState): (WebCore::Document::hidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Page.cpp: (WebCore::Page::setVisibilityState): * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: Source/WebKit/efl: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state. * WebCoreSupport/AssertMatchingEnums.cpp: * ewk/ewk_view.h: Source/WebKit/mac: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * WebView/WebView.mm: * WebView/WebViewPrivate.h: Source/WebKit2: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * Shared/API/c/WKPageVisibilityTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Tools: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state, and adjust the tests to test for it. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setPageVisibility): * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation): (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender): (TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded): (TestWebKitAPI::didRunStep4InStateUnloaded): * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPageVisibility): LayoutTests: Reviewed by Tim Horton. Remove prefixes, adjust to state name changes. * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test-expected.txt: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test-expected.txt: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view-expected.txt: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test-expected.txt: * fast/events/page-visibility-transition-test.html: Canonical link: https://commits.webkit.org/135066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-25 23:56:01 +00:00
function makePageUnloaded() {
Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests https://bugs.webkit.org/show_bug.cgi?id=89438 Reviewed by Tony Chang. * fast/doctypes/005-case-preserving.html: * fast/doctypes/doctype-after-comment.html: * fast/doctypes/doctype-at-end.html: * fast/doctypes/doctype-in-element.html: * fast/doctypes/doctype-parsing.html: * fast/doctypes/html-doctype.html: * fast/doctypes/xhtml-with-xhtmlmp-doctype.xhtml: * fast/doctypes/xml-doctype.xhtml: * fast/dom/: * fast/dynamic/5872671.html: * fast/dynamic/ancestor-to-absolute.html: * fast/dynamic/checkbox-selection-crash.html: * fast/dynamic/containing-block-change.html: * fast/dynamic/crash-generated-counter.html: * fast/dynamic/crash-generated-image.html: * fast/dynamic/crash-generated-quote.html: * fast/dynamic/crash-generated-text.html: * fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: * fast/dynamic/float-remove-above-line-2.html: * fast/dynamic/float-remove-above-line.html: * fast/dynamic/hover-before-position-after-style-change.html: * fast/dynamic/hover-before-position-after-style-change2.html: * fast/dynamic/hover-style-recalc-crash.html: * fast/dynamic/hovered-detach.html: * fast/dynamic/inline-to-block-crash.html: * fast/dynamic/insertAdjacentElement.html: * fast/dynamic/insertAdjacentHTML-allowed-parents.html: * fast/dynamic/insertAdjacentHTML.html: * fast/dynamic/insertAdjacentText.html: * fast/dynamic/jQuery-animation-crash.html: * fast/dynamic/layer-hit-test-crash.html: * fast/dynamic/layer-no-longer-paginated.html: * fast/dynamic/outerHTML-no-element.html: * fast/dynamic/paused-event-dispatch.html: * fast/dynamic/position-absolute-to-fixed-crash.html: * fast/dynamic/position-change-layout.html: * fast/dynamic/recursive-layout.html: * fast/dynamic/style-access-late-stylesheet-load.html: * fast/dynamic/subtree-common-root.html: * fast/dynamic/subtree-table-cell-height.html: * fast/dynamic/subtree-unrooted.html: * fast/encoding/: * fast/events/: * platform/chromium/fast/events/drag-downloadURL.html: * platform/chromium/fast/events/intercept-postmessage.html: * platform/chromium/fast/events/rtl-scrollbar.html: * platform/gtk/fast/events/event-sender-metakey.html: * platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: * platform/mac/fast/dom/character-index-for-point.html: * platform/mac/fast/dom/objc-wrapper-identity.html: * platform/mac/fast/dom/wrapper-classes-objc.html: * platform/mac/fast/dom/wrapper-round-tripping.html: * platform/mac/fast/events/objc-event-api.html: * platform/mac/fast/events/objc-keyboard-event-creation.html: * platform/qt/fast/events/event-sender-keydown-frame.html: * platform/win/fast/events/alt-numpad.html: * platform/win/fast/events/alt-space-scroll.html: * platform/win/fast/events/double-dead-char.html: * platform/win/fast/events/keyLocation-numpad.html: * platform/win/fast/events/panScroll-correct-direction.html: * platform/win/fast/events/panScroll-event-fired.html: * platform/win/fast/events/panScroll-image-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: * platform/win/fast/events/panScroll-nested-divs.html: * platform/win/fast/events/panScroll-no-iframe-jump.html: * platform/win/fast/events/panScroll-preventDefault.html: * platform/win/fast/events/script-tests/context-click-events.js: Canonical link: https://commits.webkit.org/107394@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-20 03:28:42 +00:00
if (window.testRunner)
Unprefix Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=102340 Source/WebCore: Reviewed by Tim Horton. Remove prefixes from the document properties, and the visibilitychanged event. Rename the "preview" state to "unloaded". The "unloaded" state is never reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769). Add some comments to places where we should update the visibility state when going in and out of the page cache, but cannot safely do so yet. Tested by existing Page Visibility tests. * dom/Document.cpp: (WebCore::Document::pageVisibilityState): (WebCore::Document::visibilityState): (WebCore::Document::hidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Page.cpp: (WebCore::Page::setVisibilityState): * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: Source/WebKit/efl: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state. * WebCoreSupport/AssertMatchingEnums.cpp: * ewk/ewk_view.h: Source/WebKit/mac: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * WebView/WebView.mm: * WebView/WebViewPrivate.h: Source/WebKit2: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * Shared/API/c/WKPageVisibilityTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Tools: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state, and adjust the tests to test for it. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setPageVisibility): * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation): (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender): (TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded): (TestWebKitAPI::didRunStep4InStateUnloaded): * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPageVisibility): LayoutTests: Reviewed by Tim Horton. Remove prefixes, adjust to state name changes. * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test-expected.txt: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test-expected.txt: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view-expected.txt: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test-expected.txt: * fast/events/page-visibility-transition-test.html: Canonical link: https://commits.webkit.org/135066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-25 23:56:01 +00:00
testRunner.setPageVisibility("unloaded");
}
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
function checkIsPageVisible() {
Unprefix Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=102340 Source/WebCore: Reviewed by Tim Horton. Remove prefixes from the document properties, and the visibilitychanged event. Rename the "preview" state to "unloaded". The "unloaded" state is never reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769). Add some comments to places where we should update the visibility state when going in and out of the page cache, but cannot safely do so yet. Tested by existing Page Visibility tests. * dom/Document.cpp: (WebCore::Document::pageVisibilityState): (WebCore::Document::visibilityState): (WebCore::Document::hidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Page.cpp: (WebCore::Page::setVisibilityState): * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: Source/WebKit/efl: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state. * WebCoreSupport/AssertMatchingEnums.cpp: * ewk/ewk_view.h: Source/WebKit/mac: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * WebView/WebView.mm: * WebView/WebViewPrivate.h: Source/WebKit2: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * Shared/API/c/WKPageVisibilityTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Tools: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state, and adjust the tests to test for it. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setPageVisibility): * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation): (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender): (TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded): (TestWebKitAPI::didRunStep4InStateUnloaded): * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPageVisibility): LayoutTests: Reviewed by Tim Horton. Remove prefixes, adjust to state name changes. * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test-expected.txt: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test-expected.txt: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view-expected.txt: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test-expected.txt: * fast/events/page-visibility-transition-test.html: Canonical link: https://commits.webkit.org/135066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-25 23:56:01 +00:00
shouldBeEqualToString("document.visibilityState", "visible");
shouldBeFalse("document.hidden");
shouldBeFalse("internals.scriptedAnimationsAreSuspended");
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
}
function checkIsPageHidden() {
Unprefix Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=102340 Source/WebCore: Reviewed by Tim Horton. Remove prefixes from the document properties, and the visibilitychanged event. Rename the "preview" state to "unloaded". The "unloaded" state is never reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769). Add some comments to places where we should update the visibility state when going in and out of the page cache, but cannot safely do so yet. Tested by existing Page Visibility tests. * dom/Document.cpp: (WebCore::Document::pageVisibilityState): (WebCore::Document::visibilityState): (WebCore::Document::hidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Page.cpp: (WebCore::Page::setVisibilityState): * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: Source/WebKit/efl: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state. * WebCoreSupport/AssertMatchingEnums.cpp: * ewk/ewk_view.h: Source/WebKit/mac: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * WebView/WebView.mm: * WebView/WebViewPrivate.h: Source/WebKit2: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * Shared/API/c/WKPageVisibilityTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Tools: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state, and adjust the tests to test for it. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setPageVisibility): * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation): (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender): (TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded): (TestWebKitAPI::didRunStep4InStateUnloaded): * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPageVisibility): LayoutTests: Reviewed by Tim Horton. Remove prefixes, adjust to state name changes. * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test-expected.txt: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test-expected.txt: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view-expected.txt: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test-expected.txt: * fast/events/page-visibility-transition-test.html: Canonical link: https://commits.webkit.org/135066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-25 23:56:01 +00:00
shouldBeEqualToString("document.visibilityState", "hidden");
shouldBeTrue("document.hidden");
shouldBeTrue("internals.scriptedAnimationsAreSuspended");
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
}
// We will try to change the visibility states as:
// 0 - visible. (Initial - i.e. on load).
// 1 - hidden (should fire event).
// 2 - hidden (no event).
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. Canonical link: https://commits.webkit.org/144195@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-27 19:46:00 +00:00
// 3 - visible (should fire event).
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
var numVisibilityChanges = 0;
function startTest() {
document.addEventListener(
Unprefix Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=102340 Source/WebCore: Reviewed by Tim Horton. Remove prefixes from the document properties, and the visibilitychanged event. Rename the "preview" state to "unloaded". The "unloaded" state is never reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769). Add some comments to places where we should update the visibility state when going in and out of the page cache, but cannot safely do so yet. Tested by existing Page Visibility tests. * dom/Document.cpp: (WebCore::Document::pageVisibilityState): (WebCore::Document::visibilityState): (WebCore::Document::hidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Page.cpp: (WebCore::Page::setVisibilityState): * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: Source/WebKit/efl: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state. * WebCoreSupport/AssertMatchingEnums.cpp: * ewk/ewk_view.h: Source/WebKit/mac: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * WebView/WebView.mm: * WebView/WebViewPrivate.h: Source/WebKit2: Reviewed by Tim Horton. Renaming of the "preview" state to "unloaded". * Shared/API/c/WKPageVisibilityTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Tools: Reviewed by Tim Horton. Rename "preview" state to "unloaded" state, and adjust the tests to test for it. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setPageVisibility): * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation): (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender): (TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded): (TestWebKitAPI::didRunStep4InStateUnloaded): * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPageVisibility): LayoutTests: Reviewed by Tim Horton. Remove prefixes, adjust to state name changes. * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test-expected.txt: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test-expected.txt: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view-expected.txt: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test-expected.txt: * fast/events/page-visibility-transition-test.html: Canonical link: https://commits.webkit.org/135066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-25 23:56:01 +00:00
"visibilitychange", onVisibilityChange, false);
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
checkIsPageVisible();
numVisibilityChanges++;
makePageHidden();
}
function finishTest() {
Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests https://bugs.webkit.org/show_bug.cgi?id=89438 Reviewed by Tony Chang. * fast/doctypes/005-case-preserving.html: * fast/doctypes/doctype-after-comment.html: * fast/doctypes/doctype-at-end.html: * fast/doctypes/doctype-in-element.html: * fast/doctypes/doctype-parsing.html: * fast/doctypes/html-doctype.html: * fast/doctypes/xhtml-with-xhtmlmp-doctype.xhtml: * fast/doctypes/xml-doctype.xhtml: * fast/dom/: * fast/dynamic/5872671.html: * fast/dynamic/ancestor-to-absolute.html: * fast/dynamic/checkbox-selection-crash.html: * fast/dynamic/containing-block-change.html: * fast/dynamic/crash-generated-counter.html: * fast/dynamic/crash-generated-image.html: * fast/dynamic/crash-generated-quote.html: * fast/dynamic/crash-generated-text.html: * fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: * fast/dynamic/float-remove-above-line-2.html: * fast/dynamic/float-remove-above-line.html: * fast/dynamic/hover-before-position-after-style-change.html: * fast/dynamic/hover-before-position-after-style-change2.html: * fast/dynamic/hover-style-recalc-crash.html: * fast/dynamic/hovered-detach.html: * fast/dynamic/inline-to-block-crash.html: * fast/dynamic/insertAdjacentElement.html: * fast/dynamic/insertAdjacentHTML-allowed-parents.html: * fast/dynamic/insertAdjacentHTML.html: * fast/dynamic/insertAdjacentText.html: * fast/dynamic/jQuery-animation-crash.html: * fast/dynamic/layer-hit-test-crash.html: * fast/dynamic/layer-no-longer-paginated.html: * fast/dynamic/outerHTML-no-element.html: * fast/dynamic/paused-event-dispatch.html: * fast/dynamic/position-absolute-to-fixed-crash.html: * fast/dynamic/position-change-layout.html: * fast/dynamic/recursive-layout.html: * fast/dynamic/style-access-late-stylesheet-load.html: * fast/dynamic/subtree-common-root.html: * fast/dynamic/subtree-table-cell-height.html: * fast/dynamic/subtree-unrooted.html: * fast/encoding/: * fast/events/: * platform/chromium/fast/events/drag-downloadURL.html: * platform/chromium/fast/events/intercept-postmessage.html: * platform/chromium/fast/events/rtl-scrollbar.html: * platform/gtk/fast/events/event-sender-metakey.html: * platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: * platform/mac/fast/dom/character-index-for-point.html: * platform/mac/fast/dom/objc-wrapper-identity.html: * platform/mac/fast/dom/wrapper-classes-objc.html: * platform/mac/fast/dom/wrapper-round-tripping.html: * platform/mac/fast/events/objc-event-api.html: * platform/mac/fast/events/objc-keyboard-event-creation.html: * platform/qt/fast/events/event-sender-keydown-frame.html: * platform/win/fast/events/alt-numpad.html: * platform/win/fast/events/alt-space-scroll.html: * platform/win/fast/events/double-dead-char.html: * platform/win/fast/events/keyLocation-numpad.html: * platform/win/fast/events/panScroll-correct-direction.html: * platform/win/fast/events/panScroll-event-fired.html: * platform/win/fast/events/panScroll-image-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: * platform/win/fast/events/panScroll-nested-divs.html: * platform/win/fast/events/panScroll-no-iframe-jump.html: * platform/win/fast/events/panScroll-preventDefault.html: * platform/win/fast/events/script-tests/context-click-events.js: Canonical link: https://commits.webkit.org/107394@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-20 03:28:42 +00:00
if (window.testRunner) {
testRunner.resetPageVisibility();
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
}
finishJSTest();
}
function onVisibilityChange() {
shouldBeTrue("event.bubbles");
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
if (numVisibilityChanges == 1) {
checkIsPageHidden();
numVisibilityChanges++;
makePageHidden();
checkIsPageHidden();
numVisibilityChanges++;
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. Canonical link: https://commits.webkit.org/144195@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-27 19:46:00 +00:00
makePageVisible();
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
return;
} else if (numVisibilityChanges == 2) {
testFailed("Invalid event fired on same state change.");
finishTest();
return;
} else if (numVisibilityChanges == 3) {
checkIsPageVisible();
numVisibilityChanges++;
finishTest();
return;
} else {
testFailed("Too many visibility transitions");
finishTest();
return;
}
}
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
</script>
Change fast/e* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120975. Rubber stamped by Filip Pizlo. * fast/encoding/char-decoding-mac.html: * fast/encoding/char-decoding.html: * fast/encoding/char-encoding-mac.html: * fast/encoding/char-encoding.html: * fast/encoding/idn-security.html: * fast/encoding/invalid-xml.html: * fast/encoding/resources/invalid-xml.js: (runNextTest): * fast/events/autoscroll-in-overflow-hidden-html.html: * fast/events/autoscroll-should-not-stop-on-keypress.html: * fast/events/blur-focus-window-should-blur-focus-element.html: * fast/events/bogus-dropEffect-effectAllowed.html: * fast/events/caller-access-from-event-listener.html: * fast/events/check-defocus-event-order-when-triggered-by-mouse-click.html: * fast/events/check-defocus-event-order-when-triggered-by-tab.html: * fast/events/click-focus-control.html: * fast/events/click-range-slider.html: * fast/events/clientXY-in-zoom-and-scroll.html: * fast/events/constructors/before-load-event-constructor.html: * fast/events/constructors/close-event-constructor.html: * fast/events/constructors/composition-event-constructor.html: * fast/events/constructors/custom-event-constructor.html: * fast/events/constructors/device-proximity-event-constructor.html: * fast/events/constructors/error-event-constructor.html: * fast/events/constructors/event-constructors.html: * fast/events/constructors/focus-event-constructor.html: * fast/events/constructors/hash-change-event-constructor.html: * fast/events/constructors/keyboard-event-constructor.html: * fast/events/constructors/media-key-event-constructor.html: * fast/events/constructors/media-stream-event-constructor.html: * fast/events/constructors/message-event-constructor.html: * fast/events/constructors/mouse-event-constructor.html: * fast/events/constructors/overflow-event-constructor.html: * fast/events/constructors/page-transition-event-constructor.html: * fast/events/constructors/pop-state-event-constructor.html: * fast/events/constructors/progress-event-constructor.html: * fast/events/constructors/speech-recognition-error-constructor.html: * fast/events/constructors/speech-recognition-event-constructor.html: * fast/events/constructors/storage-event-constructor.html: * fast/events/constructors/track-event-constructor.html: * fast/events/constructors/transition-event-constructor.html: * fast/events/constructors/ui-event-constructor.html: * fast/events/constructors/webgl-context-event-constructor.html: * fast/events/constructors/webkit-animation-event-constructor.html: * fast/events/constructors/webkit-transition-event-constructor.html: * fast/events/constructors/wheel-event-constructor.html: * fast/events/content-changed-during-drop.html: * fast/events/context-nodrag.html: * fast/events/continuous-platform-wheelevent-in-scrolling-div.html: * fast/events/create-document-crash-on-attach-event.html: * fast/events/dispatch-event-being-dispatched.html: * fast/events/dispatch-synthetic-mouseevent.html: * fast/events/dispatch-to-function-with-handle-event.html: * fast/events/drag-and-drop-autoscroll.html: * fast/events/drag-and-drop-dataTransfer-types-nocrash.html: * fast/events/drag-and-drop-fire-drag-dragover.html: * fast/events/drag-and-drop-set-drag-data-arguments.html: * fast/events/drag-and-drop.html: * fast/events/dropzone-001.html: * fast/events/dropzone-002.html: * fast/events/dropzone-003.html: * fast/events/dropzone-004.html: * fast/events/dropzone-005.html: * fast/events/event-attribute.html: * fast/events/event-creation.html: * fast/events/event-function-toString.html: * fast/events/event-input-contentEditable.html: * fast/events/event-listener-list-mutation.html: * fast/events/event-listener-map-rehash-crash.html: * fast/events/event-listener-moving-documents.html: * fast/events/event-listener-sharing.html: * fast/events/file-input-hidden-in-ondrop.html: * fast/events/fire-mousedown-while-pressing-mouse-button.html: * fast/events/fire-popstate-event.html: * fast/events/fire-scroll-event-element.html: * fast/events/fire-scroll-event.html: * fast/events/flags-unset-on-init-event.html: * fast/events/form-iframe-target-before-load-crash.html: * fast/events/form-iframe-target-before-load-crash2.html: * fast/events/form-onchange.html: * fast/events/iframe-onmousemove.html: * fast/events/imagemap-norender-crash.html: * fast/events/init-events.html: * fast/events/inputText-never-fired-on-keydown-cancel.html: * fast/events/invalid-001.html: * fast/events/invalid-002.html: * fast/events/invalid-003.html: * fast/events/invalid-004.html: * fast/events/invalid-005.html: * fast/events/keyboardevent-location-constants.html: * fast/events/keydown-leftright-keys.html: * fast/events/keydown-numpad-keys.html: * fast/events/message-port-multi.html: * fast/events/mosuedrag-on-canvas-should-not-start-selection.html: * fast/events/mouse-click-events.html: * fast/events/mouse-cursor-change.html: * fast/events/mouse-cursor-image-set.html: * fast/events/mouse-cursor-multiframecur.html: * fast/events/mouse-cursor-no-mousemove.html: * fast/events/mouse-cursor.html: * fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html: * fast/events/mouse-focus-imagemap.html: * fast/events/mouse-relative-position.html: * fast/events/mouseout-dead-node.html: * fast/events/mouseover-button.html: * fast/events/mutation-during-append-child.html: * fast/events/mutation-during-insert-before.html: * fast/events/mutation-during-replace-child-2.html: * fast/events/mutation-during-replace-child.html: * fast/events/no-scroll-on-input-text-selection.html: * fast/events/onblur-remove.html: * fast/events/onchange-range-slider.html: * fast/events/onchange-setvalue.html: * fast/events/onchange-text-form-field.html: * fast/events/onerror-img-after-gc.html: * fast/events/onunload-back-to-page-cache.html: * fast/events/page-scaled-mouse-click-iframe.html: * fast/events/page-scaled-mouse-click.html: * fast/events/page-visibility-iframe-delete-test.html: * fast/events/page-visibility-iframe-move-test.html: * fast/events/page-visibility-iframe-propagation-test.html: * fast/events/page-visibility-null-view.html: * fast/events/page-visibility-transition-test.html: * fast/events/pagehide-timeout.html: * fast/events/pagehide-xhr-open.html: * fast/events/platform-wheelevent-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html: * fast/events/platform-wheelevent-paging-x-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-x-in-scrolling-page.html: * fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html: * fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html: * fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html: * fast/events/platform-wheelevent-paging-y-in-scrolling-div.html: * fast/events/platform-wheelevent-paging-y-in-scrolling-page.html: * fast/events/popup-allowed-from-gesture-initiated-event.html: * fast/events/popup-blocked-from-fake-button-click.html: * fast/events/popup-blocked-from-fake-focus.html: * fast/events/popup-blocked-from-fake-user-gesture.html: * fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html: * fast/events/popup-blocking-timers1.html: * fast/events/popup-blocking-timers2.html: * fast/events/popup-blocking-timers3.html: * fast/events/popup-blocking-timers4.html: * fast/events/popup-blocking-timers5.html: * fast/events/popup-blocking-timers6.html: * fast/events/related-target-focusevent.html: * fast/events/resources/record-events.js: * fast/events/scale-and-scroll-body.html: * fast/events/scale-and-scroll-iframe-body.html: * fast/events/scale-and-scroll-iframe-window.html: * fast/events/scale-and-scroll-window.html: * fast/events/script-tests/TEMPLATE.html: * fast/events/scroll-after-click-on-tab-index.html: * fast/events/scroll-event-during-modal-dialog.html: * fast/events/scroll-event-phase.html: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: * fast/events/select-element.html: * fast/events/suspend-timers.html: * fast/events/tab-focus-link-in-canvas.html: * fast/events/tab-imagemap.html: * fast/events/tab-is-focusable-assert.html: * fast/events/tab-test-not-visible-imagemap.html: * fast/events/touch/basic-multi-touch-events-limited.html: * fast/events/touch/basic-multi-touch-events.html: * fast/events/touch/basic-single-touch-events.html: * fast/events/touch/create-touch-event.html: * fast/events/touch/document-create-touch-list-crash.html: * fast/events/touch/document-create-touch-list.html: * fast/events/touch/document-create-touch.html: * fast/events/touch/emulate-touch-events.html: * fast/events/touch/emulated-touch-iframe.html: * fast/events/touch/frame-hover-update.html: * fast/events/touch/gesture/context-menu-on-long-press.html: * fast/events/touch/gesture/context-menu-on-long-tap.html: * fast/events/touch/gesture/context-menu-on-two-finger-tap.html: * fast/events/touch/gesture/gesture-click.html: * fast/events/touch/gesture/gesture-dblclick.html: * fast/events/touch/gesture/gesture-scroll.html: * fast/events/touch/gesture/gesture-scrollbar.html: * fast/events/touch/gesture/gesture-tap-active-state-iframe.html: * fast/events/touch/gesture/gesture-tap-active-state.html: * fast/events/touch/gesture/gesture-tap-hover-clear.html: * fast/events/touch/gesture/gesture-tap-on-hover-element.html: * fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html: * fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html: * fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html: * fast/events/touch/gesture/pad-gesture-cancel.html: * fast/events/touch/gesture/pad-gesture-fling.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html: * fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html: * fast/events/touch/gesture/touch-gesture-noscroll-body.html: * fast/events/touch/gesture/touch-gesture-noscroll-div.html: * fast/events/touch/gesture/touch-gesture-noscroll-iframe.html: * fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div-scaled.html: * fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-div.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-iframe.html: * fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html: * fast/events/touch/gesture/touch-gesture-scroll-page.html: * fast/events/touch/gesture/touch-gesture-scroll-shy-target.html: * fast/events/touch/gesture/touch-gesture-scroll-sideways.html: * fast/events/touch/multi-touch-grouped-targets.html: * fast/events/touch/multi-touch-inside-iframes.html: * fast/events/touch/multi-touch-inside-nested-iframes.html: * fast/events/touch/page-scaled-touch-gesture-click.html: * fast/events/touch/script-tests/TEMPLATE.html: * fast/events/touch/send-oncancel-event.html: * fast/events/touch/tap-highlight-color.html: * fast/events/touch/touch-active-state.html: * fast/events/touch/touch-before-pressing-spin-button.html: * fast/events/touch/touch-coords-in-zoom-and-scroll.html: * fast/events/touch/touch-handler-count.html: * fast/events/touch/touch-input-element-change-documents.html: * fast/events/touch/touch-inside-iframe-scrolled.html: * fast/events/touch/touch-inside-iframe.html: * fast/events/touch/touch-scaled-scrolled.html: * fast/events/touch/touch-slider-no-js-touch-listener.html: * fast/events/touch/touch-slider.html: * fast/events/touch/touch-stale-node-crash.html: * fast/events/touch/touch-target-limited.html: * fast/events/touch/touch-target.html: * fast/events/wheelevent-basic.html: * fast/events/wheelevent-constructor.html: * fast/events/wheelevent-direction-inverted-from-device.html: * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html: * fast/events/wheelevent-in-scrolling-div.html: * fast/events/wheelevent-in-text-node.html: * fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html: * fast/events/wheelevent-mousewheel-interaction.html: * fast/events/zoom-dblclick.html: * fast/exclusions/css-exclusions-disabled.html: * fast/exclusions/css-exclusions-enabled.html: * fast/exclusions/parsing/parsing-wrap-flow.html: * fast/exclusions/parsing/parsing-wrap-through.html: Canonical link: https://commits.webkit.org/138871@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-07 23:07:25 +00:00
<script src="../../resources/js-test-post.js"></script>
2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * fast/events/page-visibility-iframe-delete-test-expected.txt: Added. * fast/events/page-visibility-iframe-delete-test.html: Added. * fast/events/page-visibility-iframe-move-test-expected.txt: Added. * fast/events/page-visibility-iframe-move-test.html: Added. * fast/events/page-visibility-iframe-propagation-test-expected.txt: Added. * fast/events/page-visibility-iframe-propagation-test.html: Added. * fast/events/page-visibility-transition-test-expected.txt: Added. * fast/events/page-visibility-transition-test.html: Added. * fast/events/resources/page-visibility-iframe-delete-test-frame.html: Added. * fast/events/resources/page-visibility-iframe-move-new-page.html: Added. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 Tests: fast/events/page-visibility-iframe-delete-test.html fast/events/page-visibility-iframe-move-test.html fast/events/page-visibility-iframe-propagation-test.html fast/events/page-visibility-transition-test.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::visibilityState): (WebCore::Document::webkitVisibilityState): (WebCore::Document::webkitIsVisible): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: * page/Frame.cpp: (WebCore::Frame::dispatchVisibilityStateChangeEvent): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setVisibilityState): (WebCore::Page::visibilityState): * page/Page.h: * page/PageVisibilityState.cpp: Added. (WebCore::GetPageVisibilityStateString): * page/PageVisibilityState.h: Added. 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * WebKit.gyp: * public/WebPageVisibilityState.h: Added. * public/WebView.h: (WebKit::WebView::setVisibilityState): * public/WebViewClient.h: (WebKit::WebViewClient::visibilityState): * src/AssertMatchingEnums.cpp: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::setVisibilityState): * src/WebViewImpl.h: 2011-05-09 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Implement Page Visibility API. https://bugs.webkit.org/show_bug.cgi?id=54181 * DumpRenderTree/LayoutTestController.cpp: (setPageVisibilityCallback): (resetPageVisibilityCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController::setPageVisibility): (LayoutTestController::resetPageVisibility): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::resetPageVisibility): (LayoutTestController::setPageVisibility): * DumpRenderTree/chromium/LayoutTestController.h: Canonical link: https://commits.webkit.org/75720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-09 11:00:47 +00:00
</body>
</html>