Bug 43524 - Add DOM Node wrapper class for injected bundle
Summary: Add DOM Node wrapper class for injected bundle
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-08-04 16:57 PDT by Sam Weinig
Modified: 2010-08-05 13:47 PDT (History)
1 user (show)

See Also:


Attachments
Patch (24.07 KB, patch)
2010-08-05 11:26 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-08-04 16:57:31 PDT
Add DOM Node handle class for injected bundle. This class should not expose any DOM APIs, but just be a handle that can be used to get a js wrapper for the node in a specific world.  A follow up patch will add the js wrapper world and js wrapper creation logic.
Comment 1 Sam Weinig 2010-08-04 23:49:09 PDT
<rdar://problem/8275641>
Comment 2 Sam Weinig 2010-08-05 11:26:43 PDT
Created attachment 63610 [details]
Patch
Comment 3 WebKit Review Bot 2010-08-05 11:28:48 PDT
Attachment 63610 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:28:  Alphabetical sorting problem.  [build/include_order] [4]
WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:31:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:51:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:52:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:53:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:54:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:58:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:59:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:60:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 11 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Anders Carlsson 2010-08-05 11:57:25 PDT
Comment on attachment 63610 [details]
Patch

> Index: WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
> ===================================================================
> --- WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp	(revision 0)
> +++ WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp	(revision 0)

> +
> +static DOMHandleCache& domHandleCache()
> +{
> +    static DOMHandleCache cache;

This should use DEFINE_STATIC_LOCAL to avoid an exit time destructor.

> +PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::get(Node* node)

I prefer the name getOrCreate here.
Comment 5 Sam Weinig 2010-08-05 13:47:11 PDT
Landed in http://trac.webkit.org/changeset/64778.