Bug 46580

Summary: [Mac][DRT] Implement LayoutTestController::nodesFromRect
Product: WebKit Reporter: Antonio Gomes <tonikitoo>
Component: Tools / TestsAssignee: Antonio Gomes <tonikitoo>
Status: RESOLVED FIXED    
Severity: Normal CC: ademar, eric, kenneth, manyoso, sam, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 44089, 46336    
Attachments:
Description Flags
patch v1
none
patch v2 (committed r68356, r=kenneth) none

Antonio Gomes
Reported 2010-09-26 12:16:47 PDT
document.nodesFromRect is not standard and should not be exposed to JS/Web content. Bug 46492 removed it from Document.idl and had to skip fast/dom/nodesFromRect-basic.html. Each DRT has to implement LayoutTestController::nodesFromRect in order to test this.
Attachments
patch v1 (20.59 KB, patch)
2010-09-26 15:04 PDT, Antonio Gomes
no flags
patch v2 (committed r68356, r=kenneth) (21.14 KB, patch)
2010-09-26 16:23 PDT, Antonio Gomes
no flags
Antonio Gomes
Comment 1 2010-09-26 13:40:00 PDT
Patch coming ...
Antonio Gomes
Comment 2 2010-09-26 15:04:51 PDT
Created attachment 68861 [details] patch v1 Patch implements LayoutTestController::nodesFromRect for Mac, and add stubs for Gtk, Win and Wx DRTs. A few symbols had to be added to WebCore.exp.in, and JSNodeList.h and JSDocument had to be set as Private headers. Patch also changes fast/dom/nodesFromRect-basic.html accordingly, and unskips it.
WebKit Review Bot
Comment 3 2010-09-26 15:06:19 PDT
Attachment 68861 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit/mac/WebView/WebViewPrivate.h:633: Extra space before ( in function call [whitespace/parens] [4] WebKitTools/DumpRenderTree/LayoutTestController.h:63: Place brace on its own line for function definitions. [whitespace/braces] [4] WebKitTools/DumpRenderTree/LayoutTestController.cpp:521: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:522: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:523: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:524: Use 0 instead of NULL. [readability/null] [5] Total errors found: 6 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antonio Gomes
Comment 4 2010-09-26 15:08:49 PDT
Fixed locally. > WebKit/mac/WebView/WebViewPrivate.h:633: Extra space before ( in function call [whitespace/parens] [4] > WebKitTools/DumpRenderTree/LayoutTestController.h:63: Place brace on its own line for function definitions. [whitespace/braces] [4] > WebKitTools/DumpRenderTree/LayoutTestController.cpp:521: Use 0 instead of NULL. [readability/null] [5] > WebKitTools/DumpRenderTree/LayoutTestController.cpp:522: Use 0 instead of NULL. [readability/null] [5] > WebKitTools/DumpRenderTree/LayoutTestController.cpp:523: Use 0 instead of NULL. [readability/null] [5] > WebKitTools/DumpRenderTree/LayoutTestController.cpp:524: Use 0 instead of NULL. [readability/null] [5] > Total errors found: 6 in 15 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Seidel (no email)
Comment 5 2010-09-26 15:14:40 PDT
Antonio Gomes
Comment 6 2010-09-26 16:23:03 PDT
Created attachment 68865 [details] patch v2 (committed r68356, r=kenneth) Same as patch v1 (attachment 68861 [details]), but not it builds and works. See comment #2 for summary.
WebKit Review Bot
Comment 7 2010-09-26 16:26:24 PDT
Attachment 68865 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit/mac/WebView/WebViewPrivate.h:633: Extra space before ( in function call [whitespace/parens] [4] WebKitTools/DumpRenderTree/LayoutTestController.cpp:521: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:522: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:523: Use 0 instead of NULL. [readability/null] [5] WebKitTools/DumpRenderTree/LayoutTestController.cpp:524: Use 0 instead of NULL. [readability/null] [5] Total errors found: 5 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kenneth Rohde Christiansen
Comment 8 2010-09-26 16:32:32 PDT
Comment on attachment 68865 [details] patch v2 (committed r68356, r=kenneth) View in context: https://bugs.webkit.org/attachment.cgi?id=68865&action=review > WebKitTools/ChangeLog:11 > + adding stubs for Gtk and Windows. I believe it is called GTK+ > WebKitTools/DumpRenderTree/LayoutTestController.cpp:521 > + int x = JSValueToNumber(context, arguments[1], NULL); Thought this is a C API call, we are calling it from C++, so I think we should use 0 instead of NULL. > WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:142 > + // FIXME: Implement this. Better to add a notImplemented() call, I think.
Antonio Gomes
Comment 9 2010-09-26 16:38:42 PDT
> > WebKitTools/ChangeLog:11 > > + adding stubs for Gtk and Windows. > > I believe it is called GTK+ Ok, can fix before landing. > > WebKitTools/DumpRenderTree/LayoutTestController.cpp:521 > > + int x = JSValueToNumber(context, arguments[1], NULL); > Thought this is a C API call, we are calling it from C++, so I think we should use 0 instead of NULL. I saw that other callers of JSValueToXXX are using NULL, so I kept that for consistency, but I might change w/out a problem. > > WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:142 > > + // FIXME: Implement this. > Better to add a notImplemented() call, I think. Again, I could had added a call for it, but no other methods are doing so, so I did not add for consistency. All can be fixed before landed. I want to land this before getting back to bug 46336, so we do not keep a feature/method untested.
Kenneth Rohde Christiansen
Comment 10 2010-09-26 16:47:12 PDT
> I saw that other callers of JSValueToXXX are using NULL, so I kept that for consistency, but I might change w/out a problem. Ok, then NULL (for C functions) it is for consistency. > > > > WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:142 > > > + // FIXME: Implement this. > > Better to add a notImplemented() call, I think. > > Again, I could had added a call for it, but no other methods are doing so, so I did not add for consistency. OK then!
Kenneth Rohde Christiansen
Comment 11 2010-09-26 16:50:23 PDT
Comment on attachment 68865 [details] patch v2 (committed r68356, r=kenneth) View in context: https://bugs.webkit.org/attachment.cgi?id=68865&action=review I'm not a master on the mac javascript stuff, but it seems quite sensible. > WebKitTools/DumpRenderTree/LayoutTestController.cpp:527 > + // Has mac implementation Misses dot at the end. But what do you mean with this?
Antonio Gomes
Comment 12 2010-09-26 17:26:05 PDT
Comment on attachment 68865 [details] patch v2 (committed r68356, r=kenneth) Clearing flags on attachment: 68865. Committed r68356: <http://trac.webkit.org/changeset/68356>
Antonio Gomes
Comment 13 2010-09-26 17:27:05 PDT
(In reply to comment #11) > (From update of attachment 68865 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68865&action=review > > I'm not a master on the mac javascript stuff, but it seems quite sensible. > > > WebKitTools/DumpRenderTree/LayoutTestController.cpp:527 > > + // Has mac implementation > > Misses dot at the end. But what do you mean with this? Again consistency. This file it full of it. But "." added :)
Ademar Reis
Comment 14 2010-11-12 12:28:15 PST
Revision r68356 cherry-picked into qtwebkit-2.1 with commit c49afb4 <http://gitorious.org/webkit/qtwebkit/commit/c49afb4>
Note You need to log in before you can comment on or make changes to this bug.