[Mac][DRT] Implement LayoutTestController::nodesFromRect
authorAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 11 Nov 2010 19:43:44 +0000 (16:43 -0300)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 11 Nov 2010 20:41:17 +0000 (17:41 -0300)
commitc49afb42cbd1bdbd07d9dd99ba822d059a56a43a
tree8978aac887f82b344f4e661dc12351b8054c1874
parent24c3199618fa3724ad0963c3e29decdaa14ae99f
[Mac][DRT] Implement LayoutTestController::nodesFromRect
https://bugs.webkit.org/show_bug.cgi?id=46580

Patch by Antonio Gomes <agomes@rim.comg> on 2010-09-26
Reviewed by Kenneth Christiansen.

WebCore:

Symbol files updated.

* WebCore.exp.in: Added symbols to Document::nodesFromRect and bits of JSDocument now
needed in WebKit/mac.
* WebCore.xcodeproj/project.pbxproj: Set both JSDocument.h and JSNodeList as private headers
now that they are referred in WebKit/mac.

WebKit/mac:

Implement nodesFromRect as a private method to access non-exposed Document
methods, similarly to computedStyleIncludingVisitedInfo.

* WebView/WebView.mm: Added JSDocument.h and JSNodeList.h to the include list.
These headers makes it possible to:
1) Get a Document off of a JSDocument;
2) Call toJS function, defined in JSNodeList.cpp|h so we can convert RefPtr<NodeList>
gotten from Document::nodesFromRect to JS bindings.
(-[WebView _nodesFromRect:forDocument:x:y:hPadding:vPadding:ignoreClipping:]):
* WebView/WebViewPrivate.h: Added nodesFromRect method to access methods of the
Document class not exposed to JavaScript. It works similarly to computedStyleIncludingVisitedInfo.

WebKitTools:

Implements LayoutTestController::nodesFromRect for Mac DRT, and
adding stubs for GTK+ and Windows.

* DumpRenderTree/LayoutTestController.cpp:
(nodesFromRectCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController::LayoutTestController::nodesFromRect):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::nodesFromRect):

LayoutTests:

Unskipping fast/dom/nodesFromRect-based.html on Mac, and changes it
so that it calls layoutTestController.nodesFromRect() instead of
document.nodesFromRect().

* fast/dom/resources/nodesFromRect.js:
(check):
* platform/mac/Skipped:

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

Conflicts:

LayoutTests/platform/mac/Skipped
WebCore/WebCore.exp.in
WebCore/WebCore.xcodeproj/project.pbxproj
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/resources/nodesFromRect.js
WebCore/ChangeLog
WebCore/WebCore.exp.in
WebCore/WebCore.xcodeproj/project.pbxproj
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewPrivate.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp