Changeset 68356 in webkit
- Timestamp:
- Sep 26, 2010 5:23:21 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r68355 r68356 1 2010-09-26 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 DRT/Mac nodesFromRect support 6 7 [Mac][DRT] Implement LayoutTestController::nodesFromRect 8 https://bugs.webkit.org/show_bug.cgi?id=46580 9 10 Unskipping fast/dom/nodesFromRect-based.html on Mac, and changes it 11 so that it calls layoutTestController.nodesFromRect() instead of 12 document.nodesFromRect(). 13 14 * fast/dom/resources/nodesFromRect.js: 15 (check): 16 * platform/mac/Skipped: 17 1 18 2010-09-26 Adam Barth <abarth@webkit.org> 2 19 -
trunk/LayoutTests/fast/dom/resources/nodesFromRect.js
r64272 r68356 6 6 function check(x, y, hPadding, vPadding, list) 7 7 { 8 /* 9 NodeList nodesFromRect(in long x, 10 in long y, 11 in long hPadding, 12 in long vPadding, 13 in boolean ignoreClipping); 14 */ 15 var nodes = document.nodesFromRect(x, y, hPadding, vPadding, true /* ignoreClipping */); 8 if (!window.layoutTestController) 9 return; 10 11 var nodes = layoutTestController.nodesFromRect(document, x, y, hPadding, vPadding, true /* ignoreClipping */); 12 if (!nodes) 13 return; 16 14 17 15 if (nodes.length != list.length) { -
trunk/LayoutTests/platform/mac/Skipped
r68345 r68356 318 318 # FileSystem API is not supported. 319 319 fast/filesystem 320 321 # LayoutTestController::nodesFromRect is not supported.322 fast/dom/nodesFromRect-basic.html -
trunk/WebCore/ChangeLog
r68354 r68356 1 2010-09-26 Antonio Gomes <agomes@rim.comg> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 DRT/Mac nodesFromRect support 6 7 [Mac][DRT] Implement LayoutTestController::nodesFromRect 8 https://bugs.webkit.org/show_bug.cgi?id=46580 9 10 Symbol files updated. 11 12 * WebCore.exp.in: Added symbols to Document::nodesFromRect and bits of JSDocument now 13 needed in WebKit/mac. 14 * WebCore.xcodeproj/project.pbxproj: Set both JSDocument.h and JSNodeList as private headers 15 now that they are referred in WebKit/mac. 16 1 17 2010-09-26 Adam Barth <abarth@webkit.org> 2 18 -
trunk/WebCore/WebCore.exp.in
r68252 r68356 493 493 __ZN7WebCore26usesTestModeFocusRingColorEv 494 494 __ZN7WebCore27CSSComputedStyleDeclarationC1EN3WTF10PassRefPtrINS_4NodeEEEbRKNS1_6StringE 495 __ZNK7WebCore8Document13nodesFromRectEiijjb 495 496 __ZN7WebCore27DeviceOrientationClientMock14setOrientationEN3WTF10PassRefPtrINS_17DeviceOrientationEEE 496 497 __ZN7WebCore27DeviceOrientationClientMockC1Ev … … 582 583 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_19CSSStyleDeclarationE 583 584 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_5RangeE 585 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE 584 586 __ZN7WebCore5Cache11setDisabledEb 585 587 __ZN7WebCore5Cache13getStatisticsEv … … 688 690 __ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv 689 691 __ZN7WebCore8Document4headEv 692 __ZN7WebCore10JSDocument6s_infoE 690 693 __ZN7WebCore8FormData6createEPKvm 691 694 __ZN7WebCore8FormDataD1Ev -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r68292 r68356 1328 1328 659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */ = {isa = PBXBuildFile; fileRef = 659A7D120B6DB4D9001155B3 /* SubstituteData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1329 1329 659DDC8209E198BA001BF3C6 /* JSDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 659DDC8009E198BA001BF3C6 /* JSDocument.cpp */; }; 1330 659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 659DDC8109E198BA001BF3C6 /* JSDocument.h */; };1330 659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 659DDC8109E198BA001BF3C6 /* JSDocument.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1331 1331 65A21468097A329100B9050A /* Page.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21467097A329100B9050A /* Page.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1332 1332 65A21484097A3F5300B9050A /* FrameTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65A21482097A3F5300B9050A /* FrameTree.cpp */; }; … … 4964 4964 BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2BD0C17B69E005C90A2 /* JSNamedNodeMap.h */; }; 4965 4965 BCD9C2C20C17B69E005C90A2 /* JSNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */; }; 4966 BCD9C2C30C17B69E005C90A2 /* JSNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */; };4966 BCD9C2C30C17B69E005C90A2 /* JSNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4967 4967 BCDD454E1236C95C009A7985 /* ColumnInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDD454D1236C95C009A7985 /* ColumnInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4968 4968 BCDF317B11F8D683003C5BF8 /* UserTypingGestureIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDF317911F8D683003C5BF8 /* UserTypingGestureIndicator.cpp */; }; -
trunk/WebKit/mac/ChangeLog
r68280 r68356 1 2010-09-26 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 DRT/Mac nodesFromRect support 6 7 [Mac][DRT] Implement LayoutTestController::nodesFromRect 8 https://bugs.webkit.org/show_bug.cgi?id=46580 9 10 Implement nodesFromRect as a private method to access non-exposed Document 11 methods, similarly to computedStyleIncludingVisitedInfo. 12 13 * WebView/WebView.mm: Added JSDocument.h and JSNodeList.h to the include list. 14 These headers makes it possible to: 15 1) Get a Document off of a JSDocument; 16 2) Call toJS function, defined in JSNodeList.cpp|h so we can convert RefPtr<NodeList> 17 gotten from Document::nodesFromRect to JS bindings. 18 (-[WebView _nodesFromRect:forDocument:x:y:hPadding:vPadding:ignoreClipping:]): 19 * WebView/WebViewPrivate.h: Added nodesFromRect method to access methods of the 20 Document class not exposed to JavaScript. It works similarly to computedStyleIncludingVisitedInfo. 21 1 22 2010-09-24 Jia Pu <jpu@apple.com> 2 23 -
trunk/WebKit/mac/WebView/WebView.mm
r68280 r68356 134 134 #import <WebCore/IconDatabase.h> 135 135 #import <WebCore/JSCSSStyleDeclaration.h> 136 #import <WebCore/JSDocument.h> 136 137 #import <WebCore/JSElement.h> 138 #import <WebCore/JSNodeList.h> 137 139 #import <WebCore/Logging.h> 138 140 #import <WebCore/MIMETypeRegistry.h> 141 #import <WebCore/NodeList.h> 139 142 #import <WebCore/Page.h> 140 143 #import <WebCore/PageCache.h> … … 6053 6056 @end 6054 6057 6058 @implementation WebView (WebViewPrivateNodesFromRect) 6059 6060 - (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y hPadding:(unsigned)hPadding vPadding:(unsigned)vPadding ignoreClipping:(BOOL)ignoreClipping 6061 { 6062 JSLock lock(SilenceAssertionsOnly); 6063 ExecState* exec = toJS(context); 6064 if (!value) 6065 return JSValueMakeUndefined(context); 6066 JSValue jsValue = toJS(exec, value); 6067 if (!jsValue.inherits(&JSDocument::s_info)) 6068 return JSValueMakeUndefined(context); 6069 JSDocument* jsDocument = static_cast<JSDocument*>(asObject(jsValue)); 6070 Document* document = jsDocument->impl(); 6071 RefPtr<NodeList> nodes = document->nodesFromRect(x, y, hPadding, vPadding, ignoreClipping); 6072 return toRef(exec, toJS(exec, jsDocument->globalObject(), nodes.get())); 6073 } 6074 6075 @end 6076 6055 6077 #ifdef BUILDING_ON_LEOPARD 6056 6078 -
trunk/WebKit/mac/WebView/WebViewPrivate.h
r66685 r68356 631 631 @end 632 632 633 @interface WebView (WebViewPrivateNodesFromRect) 634 - (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y hPadding:(unsigned)hPadding vPadding:(unsigned)vPadding ignoreClipping:(BOOL)ignoreClipping; 635 @end 636 633 637 @interface NSObject (WebFrameLoadDelegatePrivate) 634 638 - (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame; -
trunk/WebKitTools/ChangeLog
r68329 r68356 1 2010-09-26 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 DRT/Mac nodesFromRect support 6 7 [Mac][DRT] Implement LayoutTestController::nodesFromRect 8 https://bugs.webkit.org/show_bug.cgi?id=46580 9 10 Implements LayoutTestController::nodesFromRect for Mac DRT, and 11 adding stubs for GTK+ and Windows. 12 13 * DumpRenderTree/LayoutTestController.cpp: 14 (nodesFromRectCallback): 15 (LayoutTestController::staticFunctions): 16 * DumpRenderTree/LayoutTestController.h: 17 (LayoutTestController::LayoutTestController::nodesFromRect): 18 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 19 (LayoutTestController::nodesFromRect): 20 1 21 2010-09-25 Nicolas Weber <thakis@chromium.org> 2 22 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r65666 r68356 514 514 } 515 515 516 static JSValueRef nodesFromRectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 517 { 518 if (argumentCount != 6) 519 return JSValueMakeUndefined(context); 520 521 int x = JSValueToNumber(context, arguments[1], NULL); 522 int y = JSValueToNumber(context, arguments[2], NULL); 523 int hPadding = static_cast<unsigned>(JSValueToNumber(context, arguments[3], NULL)); 524 int vPadding = static_cast<unsigned>(JSValueToNumber(context, arguments[4], NULL)); 525 bool ignoreClipping = JSValueToBoolean(context, arguments[5]); 526 527 // Has mac implementation. 528 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 529 return controller->nodesFromRect(context, arguments[0], x, y, hPadding, vPadding, ignoreClipping); 530 } 531 516 532 static JSValueRef layerTreeAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 517 533 { … … 1844 1860 { "closeWebInspector", closeWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1845 1861 { "computedStyleIncludingVisitedInfo", computedStyleIncludingVisitedInfoCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1862 { "nodesFromRect", nodesFromRectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1846 1863 { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1847 1864 { "disableImageLoading", disableImageLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r65666 r68356 61 61 void keepWebHistory(); 62 62 JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef); 63 JSValueRef nodesFromRect(JSContextRef, JSValueRef, int x, int y, unsigned hPadding, unsigned vPadding, bool ignoreClipping); 63 64 void notifyDone(); 64 65 int numberOfPages(float pageWidthInPixels, float pageHeightInPixels); -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r68211 r68356 138 138 } 139 139 140 JSValueRef LayoutTestController::nodesFromRect(JSContextRef context, JSValueRef value, int , int, unsigned, unsigned, bool) 141 { 142 // FIXME: Implement this. 143 return JSValueMakeUndefined(context); 144 } 145 140 146 JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const 141 147 { -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r66685 r68356 199 199 } 200 200 201 JSValueRef LayoutTestController::nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned hPadding, unsigned vPadding, bool ignoreClipping) 202 { 203 return [[mainFrame webView] _nodesFromRect:context forDocument:value x:x y:y hPadding:hPadding vPadding:vPadding ignoreClipping:ignoreClipping]; 204 } 205 201 206 JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const 202 207 { -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r65666 r68356 180 180 } 181 181 182 JSValueRef LayoutTestController::nodesFromRect(JSContextRef context, JSValueRef value, int , int, unsigned, unsigned, bool) 183 { 184 // FIXME: Implement this. 185 return JSValueMakeUndefined(context); 186 } 187 182 188 JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const 183 189 { -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r65666 r68356 487 487 } 488 488 489 JSValueRef LayoutTestController::nodesFromRect(JSContextRef context, JSValueRef value, int , int, unsigned, unsigned, bool) 490 { 491 // FIXME: Implement this. 492 return 0; 493 } 494 489 495 void LayoutTestController::authenticateSession(JSStringRef, JSStringRef, JSStringRef) 490 496 {
Note: See TracChangeset
for help on using the changeset viewer.