Changeset 63866 in webkit
- Timestamp:
- Jul 21, 2010 5:46:26 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63865 r63866 1 2010-07-21 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 WebKitTestRunner needs to support dumping of scroll position 6 https://bugs.webkit.org/show_bug.cgi?id=42514 7 8 * platform/mac-wk2/Skipped: Removed now-passing tests from 9 skipped list and moved one miscategorized test. 10 1 11 2010-07-21 Justin Schuh <jschuh@chromium.org> 2 12 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r63850 r63866 58 58 # WebKitTestRunner does not block remote resources or complain about them 59 59 # <https://bugs.webkit.org/show_bug.cgi?id=42139> 60 canvas/philip/tests/security.pattern.canvas.timing.html61 canvas/philip/tests/security.pattern.create.html62 60 fast/loader/null-request-after-willSendRequest.html 63 61 … … 2093 2091 editing/selection/move-left-right.html 2094 2092 2095 # WebKitTestRunner needs to support dumping of scroll position2096 # <https://bugs.webkit.org/show_bug.cgi?id=42514>2097 compositing/geometry/fixed-in-composited.html2098 compositing/geometry/fixed-position.html2099 compositing/geometry/horizontal-scroll-composited.html2100 compositing/geometry/vertical-scroll-composited.html2101 compositing/geometry/video-fixed-scrolling.html2102 compositing/overflow/fixed-position-ancestor-clip.html2103 fast/dom/focus-contenteditable.html2104 fast/dynamic/anchor-lock.html2105 fast/events/reveal-link-when-focused.html2106 fast/layers/scroll-rect-to-visible.html2107 fast/overflow/clip-rects-fixed-ancestor.html2108 fast/overflow/position-fixed-transform-clipping.html2109 fast/overflow/scrollRevealButton.html2110 fast/repaint/fixed-child-move-after-scroll.html2111 fast/repaint/fixed-child-of-fixed-move-after-scroll.html2112 fast/repaint/fixed-child-of-transformed-move-after-scroll.html2113 fast/repaint/fixed.html2114 fast/repaint/fixed-move-after-scroll.html2115 fast/repaint/fixed-tranformed.html2116 fast/repaint/repaint-during-scroll.html2117 svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html2118 transforms/2d/transform-fixed-container.html2119 2120 2121 2093 # WebKitTestRunner needs to support needsDeletionUI mechanism to show deletion UI 2122 2094 # <https://bugs.webkit.org/show_bug.cgi?id=42535> … … 2127 2099 platform/mac/editing/deleting/deletionUI-minimum-size.html 2128 2100 platform/mac/editing/deleting/deletionUI-successful-deletion.html 2129 2130 2101 2131 2102 # WebKitTestRunner needs to support layoutTestController.setFrameFlatteningEnabled … … 2143 2114 fast/frames/flattening/iframe-flattening-simple.html 2144 2115 2145 2146 2116 # WebKitTestRunner needs to support layoutTestController.counterValueForElementById 2147 2117 # <https://bugs.webkit.org/show_bug.cgi?id=42537> … … 2156 2126 fast/css/counters/counter-reset-000.html 2157 2127 fast/css/counters/nesting.html 2158 2159 2128 2160 2129 # WebKitTestRunner needs to support layoutTestController.execCommand … … 2269 2238 svg/custom/svg-disallowed-in-dashboard-object.html 2270 2239 2271 2272 2240 # WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions 2273 2241 # <https://bugs.webkit.org/show_bug.cgi?id=42548> 2242 fast/overflow/scrollRevealButton.html 2274 2243 http/tests/navigation/anchor-frames.html 2275 2244 http/tests/navigation/anchor-subframeload.html … … 2292 2261 transitions/transition-hit-test-transform.html 2293 2262 transitions/transition-shorthand-delay.html 2294 2295 2296 2297 2263 2298 2264 # WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard -
trunk/WebKit2/ChangeLog
r63855 r63866 1 2010-07-21 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 WebKitTestRunner needs to support dumping of scroll position 6 https://bugs.webkit.org/show_bug.cgi?id=42514 7 8 Added WKBundleFrameGetJavaScriptContext function. 9 10 * WebKit2.xcodeproj: Added property svn:ignore. 11 12 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: 13 (WKBundleFrameGetJavaScriptContext): Added. 14 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto. 15 16 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 17 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: 18 (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame): 19 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: 20 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 21 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): 22 Use JSGlobalContextRef instead of JSContextRef and context instead of ct. 23 1 24 2010-07-21 Adam Roben <aroben@apple.com> 2 25 -
trunk/WebKit2/WebKit2.xcodeproj
-
Property
svn:ignore
set to
*.pbxuser
*.mode2v3
-
Property
svn:ignore
set to
-
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
r63063 r63866 29 29 #include "WKBundleAPICast.h" 30 30 #include "WebFrame.h" 31 #include <WebCore/PlatformString.h> 31 #include <JavaScriptCore/APICast.h> 32 #include <WebCore/Frame.h> 32 33 34 using namespace WebCore; 33 35 using namespace WebKit; 34 36 … … 64 66 return toWK(frameRef)->pauseAnimationOnElementWithId(toWK(name), toWK(elementID), time); 65 67 } 68 69 JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef) 70 { 71 // FIXME: Is there a way to get this and know that it's a JSGlobalContextRef? 72 // The const_cast here is a bit ugly. 73 return const_cast<JSGlobalContextRef>(toRef(toWK(frameRef)->coreFrame()->script()->globalObject(mainThreadNormalWorld())->globalExec())); 74 } -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
r63063 r63866 27 27 #define WKBundleFrame_h 28 28 29 #include <JavaScriptCore/JavaScript.h> 29 30 #include <WebKit2/WKBase.h> 30 31 #include <WebKit2/WKBundleBase.h> … … 39 40 40 41 WK_EXPORT bool WKBundleFrameIsMainFrame(WKBundleFrameRef frame); 42 43 WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frame); 41 44 42 45 WK_EXPORT WKURLRef WKBundleFrameGetURL(WKBundleFrameRef frame); -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
r63850 r63866 44 44 typedef void (*WKBundlePageDidFailLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); // FIXME: Add WKErrorRef. 45 45 typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo); 46 typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JS ContextRef ctx, JSObjectRef window, const void *clientInfo);46 typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo); 47 47 48 48 struct WKBundlePageLoaderClient { -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
r62590 r63866 89 89 } 90 90 91 void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, JS ContextRef ctx, JSObjectRef window)91 void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, JSGlobalContextRef context, JSObjectRef window) 92 92 { 93 93 if (m_client.didClearWindowObjectForFrame) 94 m_client.didClearWindowObjectForFrame(toRef(page), toRef(frame), c tx, window, m_client.clientInfo);94 m_client.didClearWindowObjectForFrame(toRef(page), toRef(frame), context, window, m_client.clientInfo); 95 95 } 96 96 -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
r62590 r63866 51 51 void didFailLoadWithErrorForFrame(WebPage*, WebFrame*); 52 52 void didReceiveTitleForFrame(WebPage*, const WebCore::String&, WebFrame*); 53 void didClearWindowObjectForFrame(WebPage*, WebFrame*, JS ContextRef, JSObjectRef);53 void didClearWindowObjectForFrame(WebPage*, WebFrame*, JSGlobalContextRef, JSObjectRef); 54 54 55 55 private: -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r63794 r63866 871 871 return; 872 872 873 JSContextRef context = toRef(m_frame->coreFrame()->script()->globalObject(world)->globalExec()); 873 // FIXME: Is there a way to get this and know that it's a JSGlobalContextRef? 874 // The const_cast here is a bit ugly. 875 JSGlobalContextRef context = const_cast<JSGlobalContextRef>(toRef(m_frame->coreFrame()->script()->globalObject(world)->globalExec())); 874 876 JSObjectRef windowObject = toRef(m_frame->coreFrame()->script()->globalObject(world)); 875 877 -
trunk/WebKitTools/ChangeLog
r63853 r63866 1 2010-07-21 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 WebKitTestRunner needs to support dumping of scroll position 6 https://bugs.webkit.org/show_bug.cgi?id=42514 7 8 * MiniBrowser/mac/WebBundle/WebBundleMain.m: 9 (_didClearWindowForFrame): Use JSGlobalContextRef instead of JSContextRef. 10 11 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 12 (WTR::InjectedBundlePage::_didClearWindowForFrame): Use JSGlobalContextRef 13 instead of JSContextRef. 14 (WTR::InjectedBundlePage::dump): Call dumpFrameScrollPosition when appropriate. 15 (WTR::numericWindowProperty): Added. Helper for dumpFrameScrollPosition. 16 (WTR::InjectedBundlePage::dumpFrameScrollPosition): Added. 17 (WTR::InjectedBundlePage::didClearWindowForFrame): Use JSGlobalContextRef 18 instead of JSContextRef. 19 20 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Removed names from 21 arguments that simply repeat the argument type. Added dumpFrameScrollPosition. 22 23 * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: 24 (WTR::LayoutTestController::shouldDumpDOMAsWebArchive): Added. Currently 25 returns false. 26 (WTR::LayoutTestController::shouldDumpSourceAsWebArchive): Added. Currently 27 returns false. 28 (WTR::LayoutTestController::shouldDumpFrameScrollPositions): Added. Matches 29 the logic in DumpRenderTree. 30 31 * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Updated for above changes. 32 33 * WebKitTestRunner/WebKitTestRunner.xcodeproj: Added property svn:ignore. 34 1 35 2010-07-21 Kevin Ollivier <kevino@theolliviers.com> 2 36 -
trunk/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m
r62595 r63866 66 66 } 67 67 68 void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JS ContextRef ctx, JSObjectRef window, const void *clientInfo)68 void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo) 69 69 { 70 70 CFURLRef cfURL = WKURLCopyCFURL(0, WKBundleFrameGetURL(WKBundlePageGetMainFrame(page))); -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r63850 r63866 122 122 } 123 123 124 void InjectedBundlePage::_didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JS ContextRef ctx, JSObjectRef window, const void *clientInfo)125 { 126 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, c tx, window);124 void InjectedBundlePage::_didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo) 125 { 126 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, context, window); 127 127 } 128 128 … … 159 159 InjectedBundle::shared().os() << utf8externalRepresentation->data(); 160 160 } 161 162 if (InjectedBundle::shared().layoutTestController()->shouldDumpFrameScrollPositions()) 163 dumpFrameScrollPosition(WKBundlePageGetMainFrame(m_page)); 164 161 165 InjectedBundle::shared().done(); 162 166 } 163 167 168 static double numericWindowProperty(WKBundleFrameRef frame, const char* propertyName) 169 { 170 JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame); 171 JSObjectRef window = JSContextGetGlobalObject(context); 172 JSValueRef exception = 0; 173 JSStringRef propertyNameString = JSStringCreateWithUTF8CString(propertyName); 174 JSValueRef value = JSObjectGetProperty(context, window, propertyNameString, &exception); 175 JSStringRelease(propertyNameString); 176 if (exception) 177 return 0; 178 return JSValueToNumber(context, value, &exception); 179 } 180 181 void InjectedBundlePage::dumpFrameScrollPosition(WKBundleFrameRef frame) 182 { 183 double x = numericWindowProperty(frame, "pageXOffset"); 184 double y = numericWindowProperty(frame, "pageYOffset"); 185 if (fabs(x) > 0.00000001 || fabs(y) > 0.00000001) 186 InjectedBundle::shared().os() << "scrolled to " << x << "," << y << "\n"; 187 } 188 164 189 void InjectedBundlePage::didFinishLoadForFrame(WKBundleFrameRef frame) 165 190 { … … 189 214 } 190 215 191 void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JS ContextRef ctx, JSObjectRef window)216 void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window) 192 217 { 193 218 JSValueRef exception = 0; 194 InjectedBundle::shared().layoutTestController()->makeWindowObject(c tx, window, &exception);219 InjectedBundle::shared().layoutTestController()->makeWindowObject(context, window, &exception); 195 220 } 196 221 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
r63850 r63866 43 43 private: 44 44 // Loader Client 45 static void _didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);46 static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);47 static void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);48 static void _didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);49 static void _didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);50 static void _didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);51 static void _didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo);52 static void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo);53 void didStartProvisionalLoadForFrame(WKBundleFrameRef frame);54 void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame);55 void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef frame);56 void didCommitLoadForFrame(WKBundleFrameRef frame);57 void didFinishLoadForFrame(WKBundleFrameRef frame);58 void didFailLoadWithErrorForFrame(WKBundleFrameRef frame);59 void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef frame);60 void didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window);45 static void _didStartProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 46 static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 47 static void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 48 static void _didCommitLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 49 static void _didFinishLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 50 static void _didFailLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo); 51 static void _didReceiveTitleForFrame(WKBundlePageRef, WKStringRef title, WKBundleFrameRef, const void* clientInfo); 52 static void _didClearWindowForFrame(WKBundlePageRef, WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window, const void* clientInfo); 53 void didStartProvisionalLoadForFrame(WKBundleFrameRef); 54 void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef); 55 void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef); 56 void didCommitLoadForFrame(WKBundleFrameRef); 57 void didFinishLoadForFrame(WKBundleFrameRef); 58 void didFailLoadWithErrorForFrame(WKBundleFrameRef); 59 void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef); 60 void didClearWindowForFrame(WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window); 61 61 62 62 // UI Client 63 static void _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void* clientInfo);64 static void _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void* clientInfo);65 static void _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);66 static void _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);67 static void _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);63 static void _willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo); 64 static void _willSetStatusbarText(WKBundlePageRef, WKStringRef statusbarText, const void* clientInfo); 65 static void _willRunJavaScriptAlert(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo); 66 static void _willRunJavaScriptConfirm(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo); 67 static void _willRunJavaScriptPrompt(WKBundlePageRef, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo); 68 68 void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber); 69 69 void willSetStatusbarText(WKStringRef statusbarText); … … 71 71 void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef); 72 72 void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef); 73 74 void dumpFrameScrollPosition(WKBundleFrameRef); 73 75 74 76 WKBundlePageRef m_page; -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
r63693 r63866 125 125 } 126 126 127 bool LayoutTestController::shouldDumpDOMAsWebArchive() const 128 { 129 return false; 130 } 131 132 bool LayoutTestController::shouldDumpSourceAsWebArchive() const 133 { 134 return false; 135 } 136 137 bool LayoutTestController::shouldDumpFrameScrollPositions() const 138 { 139 return !shouldDumpAsText() && !shouldDumpDOMAsWebArchive() && !shouldDumpSourceAsWebArchive(); 140 } 141 127 142 // Object Creation 128 143 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
r63693 r63866 45 45 void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception); 46 46 47 void dumpAsText() { m_dumpAsText = true; } 48 void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; } 49 47 50 bool shouldDumpAsText() const { return m_dumpAsText; } 48 void dumpAsText() { m_dumpAsText = true; } 49 51 bool shouldDumpDOMAsWebArchive() const; 52 bool shouldDumpFrameScrollPositions() const; 53 bool shouldDumpSourceAsWebArchive() const; 50 54 bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; } 51 void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }52 55 53 56 bool waitToDump() const { return m_waitToDump; } -
trunk/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj
-
Property
svn:ignore
set to
*.pbxuser
*.mode2v3
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.