Changeset 148088 in webkit
- Timestamp:
- Apr 10, 2013 3:48:30 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r148025 r148088 1 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 3 [GTK] Add support for Page Visibility 4 https://bugs.webkit.org/show_bug.cgi?id=97324 5 6 Reviewed by Sam Weinig. 7 8 Page Visibility has been enabled for GTK port. 9 New GTK unittest has been added. 10 11 * Source/autotools/SetupWebKitFeatures.m4: 12 1 13 2013-04-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 14 -
trunk/LayoutTests/ChangeLog
r148085 r148088 1 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 3 [GTK] Add support for Page Visibility 4 https://bugs.webkit.org/show_bug.cgi?id=97324 5 6 Reviewed by Sam Weinig. 7 8 * platform/gtk/TestExpectations: 9 1 10 2013-04-10 Zoltan Arvai <zarvai@inf.u-szeged.hu> 2 11 -
trunk/LayoutTests/platform/gtk/TestExpectations
r148059 r148088 242 242 webkit.org/b/98942 fast/workers/worker-storagequota-query-usage.html [ Failure ] 243 243 webkit.org/b/98942 fast/workers/shared-worker-storagequota-query-usage.html [ Failure ] 244 245 # This platform does not support the Page Visibility API.246 webkit.org/b/97324 fast/events/page-visibility-iframe-delete-test.html [ Skip ]247 webkit.org/b/97324 fast/events/page-visibility-iframe-move-test.html [ Skip ]248 webkit.org/b/97324 fast/events/page-visibility-iframe-propagation-test.html [ Skip ]249 webkit.org/b/97324 fast/events/page-visibility-null-view.html [ Skip ]250 webkit.org/b/97324 fast/events/page-visibility-transition-test.html [ Skip ]251 244 252 245 # GTK doesn't support smart replace. -
trunk/Source/WebKit/gtk/ChangeLog
r147924 r148088 1 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 3 [GTK] Add support for Page Visibility 4 https://bugs.webkit.org/show_bug.cgi?id=97324 5 6 Reviewed by Sam Weinig. 7 8 Implemented access to page visibility API for GTK test runner. 9 10 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: 11 (DumpRenderTreeSupportGtk::setPageVisibility): 12 * WebCoreSupport/DumpRenderTreeSupportGtk.h: 13 1 14 2013-04-08 Carlos Garcia Campos <cgarcia@igalia.com> 2 15 -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r145849 r148088 740 740 s_authenticationCallback = authenticationCallback; 741 741 } 742 743 void DumpRenderTreeSupportGtk::setPageVisibility(WebKitWebView* webView, WebCore::PageVisibilityState visibilityState, bool isInitialState) 744 { 745 #if ENABLE(PAGE_VISIBILITY_API) 746 Page* page = core(webView); 747 if (!page) 748 return; 749 750 page->setVisibilityState(visibilityState, isInitialState); 751 #endif 752 } -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
r145849 r148088 22 22 23 23 #include "JSStringRef.h" 24 #include "PageVisibilityState.h" 24 25 #include <atk/atk.h> 25 26 #include <glib.h> … … 139 140 static void setAuthenticationCallback(AuthenticationCallback); 140 141 static AuthenticationCallback s_authenticationCallback; 142 static void setPageVisibility(WebKitWebView*, WebCore::PageVisibilityState, bool); 141 143 142 144 private: -
trunk/Source/WebKit2/ChangeLog
r148083 r148088 1 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 3 [GTK] Add support for Page Visibility 4 https://bugs.webkit.org/show_bug.cgi?id=97324 5 6 Reviewed by Sam Weinig. 7 8 Added new unittest to test page visibility using GTK Widget visibility API. 9 10 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: 11 (testWebViewPageVisibility): 12 (beforeAll): 13 * UIProcess/API/gtk/tests/WebViewTest.cpp: 14 (WebViewTest::showInWindow): 15 * UIProcess/API/gtk/tests/WebViewTest.h: 16 1 17 2013-04-10 Zan Dobersek <zdobersek@igalia.com> 2 18 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp
r144969 r148088 1086 1086 } 1087 1087 1088 // To test page visibility API. Currently only 'visible' and 'hidden' states are implemented fully in WebCore. 1089 // See also http://www.w3.org/TR/2011/WD-page-visibility-20110602/ and https://developers.google.com/chrome/whitepapers/pagevisibility 1090 static void testWebViewPageVisibility(WebViewTest* test, gconstpointer) 1091 { 1092 test->loadHtml("<html><title></title>" 1093 "<body><p>Test Web Page Visibility</p>" 1094 "<script>" 1095 "document.addEventListener(\"webkitvisibilitychange\", onVisibilityChange, false);" 1096 "function onVisibilityChange() {" 1097 " document.title = document.webkitVisibilityState;" 1098 "}" 1099 "</script>" 1100 "</body></html>", 1101 0); 1102 1103 // Wait untill the page is loaded. Initial visibility should be 'hidden'. 1104 test->waitUntilLoadFinished(); 1105 1106 GOwnPtr<GError> error; 1107 WebKitJavascriptResult* javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr()); 1108 g_assert(javascriptResult); 1109 g_assert(!error.get()); 1110 GOwnPtr<char> valueString(WebViewTest::javascriptResultToCString(javascriptResult)); 1111 g_assert_cmpstr(valueString.get(), ==, "hidden"); 1112 1113 javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr()); 1114 g_assert(javascriptResult); 1115 g_assert(!error.get()); 1116 g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult)); 1117 1118 // Show the page. The visibility should be updated to 'visible'. 1119 test->showInWindow(); 1120 test->waitUntilTitleChanged(); 1121 1122 javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr()); 1123 g_assert(javascriptResult); 1124 g_assert(!error.get()); 1125 valueString.set(WebViewTest::javascriptResultToCString(javascriptResult)); 1126 g_assert_cmpstr(valueString.get(), ==, "visible"); 1127 1128 javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr()); 1129 g_assert(javascriptResult); 1130 g_assert(!error.get()); 1131 g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult)); 1132 1133 // Hide the page. The visibility should be updated to 'hidden'. 1134 gtk_widget_hide(GTK_WIDGET(test->m_webView)); 1135 test->waitUntilTitleChanged(); 1136 1137 javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr()); 1138 g_assert(javascriptResult); 1139 g_assert(!error.get()); 1140 valueString.set(WebViewTest::javascriptResultToCString(javascriptResult)); 1141 g_assert_cmpstr(valueString.get(), ==, "hidden"); 1142 1143 javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr()); 1144 g_assert(javascriptResult); 1145 g_assert(!error.get()); 1146 g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult)); 1147 } 1148 1088 1149 void beforeAll() 1089 1150 { … … 1106 1167 SaveWebViewTest::add("WebKitWebView", "save", testWebViewSave); 1107 1168 WebViewTest::add("WebKitWebView", "view-mode", testWebViewMode); 1169 WebViewTest::add("WebKitWebView", "page-visibility", testWebViewPageVisibility); 1108 1170 } 1109 1171 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp
r130755 r148088 176 176 } 177 177 178 void WebViewTest::showInWindow(GtkWindowType windowType) 179 { 180 g_assert(!m_parentWindow); 181 m_parentWindow = gtk_window_new(windowType); 182 gtk_container_add(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView)); 183 gtk_widget_show(GTK_WIDGET(m_webView)); 184 gtk_widget_show(m_parentWindow); 185 } 186 178 187 void WebViewTest::showInWindowAndWaitUntilMapped(GtkWindowType windowType) 179 188 { -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h
r130755 r148088 47 47 void waitUntilTitleChangedTo(const char* expectedTitle); 48 48 void waitUntilTitleChanged(); 49 void showInWindow(GtkWindowType = GTK_WINDOW_POPUP); 49 50 void showInWindowAndWaitUntilMapped(GtkWindowType = GTK_WINDOW_POPUP); 50 51 void resizeView(int width, int height); -
trunk/Source/autotools/SetupWebKitFeatures.m4
r147967 r148088 152 152 ENABLE_NOTIFICATIONS=0 \ 153 153 ENABLE_ORIENTATION_EVENTS=0 \ 154 ENABLE_PAGE_VISIBILITY_API= 0\154 ENABLE_PAGE_VISIBILITY_API=1 \ 155 155 ENABLE_PERFORMANCE_TIMELINE=0 \ 156 156 ENABLE_PROGRESS_ELEMENT=1 \ -
trunk/Tools/ChangeLog
r148086 r148088 1 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 3 [GTK] Add support for Page Visibility 4 https://bugs.webkit.org/show_bug.cgi?id=97324 5 6 Reviewed by Sam Weinig. 7 8 Implemented test runner API for page visibility layout tests. 9 10 * DumpRenderTree/gtk/TestRunnerGtk.cpp: 11 (TestRunner::resetPageVisibility): 12 (TestRunner::setPageVisibility): 13 * Scripts/webkitperl/FeatureList.pm: 14 1 15 2013-04-10 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 16 -
trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
r145940 r148088 908 908 void TestRunner::resetPageVisibility() 909 909 { 910 WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame); 911 DumpRenderTreeSupportGtk::setPageVisibility(webView, WebCore::PageVisibilityStateVisible, true); 912 } 913 914 void TestRunner::setPageVisibility(const char* visibility) 915 { 916 WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame); 917 String visibilityString(visibility); 918 WebCore::PageVisibilityState visibilityState = WebCore::PageVisibilityStateVisible; 919 920 if (visibilityString == "visible") 921 visibilityState = WebCore::PageVisibilityStateVisible; 922 else if (visibilityString == "hidden") 923 visibilityState = WebCore::PageVisibilityStateHidden; 924 else 925 return; 926 927 DumpRenderTreeSupportGtk::setPageVisibility(webView, visibilityState, false); 928 } 929 930 void TestRunner::setAutomaticLinkDetectionEnabled(bool) 931 { 910 932 // FIXME: Implement this. 911 933 } 912 934 913 void TestRunner::set PageVisibility(const char*)935 void TestRunner::setStorageDatabaseIdleInterval(double) 914 936 { 915 937 // FIXME: Implement this. 916 938 } 917 939 918 void TestRunner::setAutomaticLinkDetectionEnabled(bool)919 {920 // FIXME: Implement this.921 }922 923 void TestRunner::setStorageDatabaseIdleInterval(double)924 {925 // FIXME: Implement this.926 }927 928 940 void TestRunner::closeIdleLocalStorageDatabases() 929 941 { -
trunk/Tools/Scripts/webkitperl/FeatureList.pm
r147998 r148088 380 380 381 381 { option => "page-visibility-api", desc => "Toggle Page Visibility API support", 382 define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl() ), value => \$pageVisibilityAPISupport },382 define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl() || isGtk()), value => \$pageVisibilityAPISupport }, 383 383 384 384 { option => "performance-timeline", desc => "Toggle Performance Timeline support",
Note: See TracChangeset
for help on using the changeset viewer.