Closed
Bug 820657
Opened 12 years ago
Closed 12 years ago
Implement the NamedGetter functionality on HTMLDocument
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: bzbarsky, Assigned: peterv)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(5 files, 4 obsolete files)
895 bytes,
text/html
|
Details | |
3.42 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
4.28 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
5.48 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
4.08 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Comment 1•12 years ago
|
||
only store the things we care about in ResolveName so we don't have to
do all the complicated filtering by tag name and whatnot: just do a
hashtable lookup and move on...
Attachment #691181 -
Flags: review?(peterv)
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Comment 3•12 years ago
|
||
Reporter | ||
Comment 4•12 years ago
|
||
There's another testcase at https://bug-104623-attachments.webkit.org/attachment.cgi?id=178683 that can be used to test correctness and can get timing added to measure perf...
Reporter | ||
Comment 5•12 years ago
|
||
Attachment #691919 -
Attachment is obsolete: true
Reporter | ||
Comment 6•12 years ago
|
||
Note that we'll need to make the proxy handler for this stuff deal with the [Unforgeable] location. Right now this patch fails codegen even with bug 821438 fixed. :(
Reporter | ||
Updated•12 years ago
|
Summary: Implement the NameGetter functionality on HTMLDocument and turn on WebIDL bindings for it → Implement the NamedGetter functionality on HTMLDocument and turn on WebIDL bindings for it
Reporter | ||
Comment 7•12 years ago
|
||
We'll also need the proxy handler to expose names when called via an Xray but pretend to not be [OverrideBuiltins] in that case... Might not be too bad because Xrays skip the expando get anyway, so it'll just be a matter of checking up the proto chain like we do for most handlers, but only in the Xray case.
Assignee | ||
Comment 8•12 years ago
|
||
I already have that part working.
Updated•12 years ago
|
Assignee: nobody → peterv
Assignee | ||
Comment 9•12 years ago
|
||
We also need to reimplement .all.
Reporter | ||
Comment 10•12 years ago
|
||
Hmm. Just because the way it's hooked up right now is messed up? That seems like a side-project that we need to do anyway; we need a separate bug, yes?
Reporter | ||
Comment 12•12 years ago
|
||
Peter, what's our plan for nsIPluginDocument and nsIImageDocument? I guess we could just introduce extra interfaces to hold the relevant methods...
Assignee | ||
Comment 13•12 years ago
|
||
Assignee | ||
Comment 14•12 years ago
|
||
Updated to trunk. r=me.
Attachment #691181 -
Attachment is obsolete: true
Attachment #691181 -
Flags: review?(peterv)
Attachment #729529 -
Flags: review+
Assignee | ||
Comment 15•12 years ago
|
||
Attachment #729531 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 16•12 years ago
|
||
This mostly just moves and reindents code.
Attachment #726127 -
Attachment is obsolete: true
Attachment #729533 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 17•12 years ago
|
||
Doing this in the NamedGetter for now. We can design a better solution in the future.
Attachment #729535 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Summary: Implement the NamedGetter functionality on HTMLDocument and turn on WebIDL bindings for it → Implement the NamedGetter functionality on HTMLDocument
Assignee | ||
Comment 18•12 years ago
|
||
Comment on attachment 691184 [details] [diff] [review]
part 2. Turn on WebIDL bindings for HTMLDocument.
Moving this to a separate bug.
Attachment #691184 -
Attachment is obsolete: true
Comment 19•12 years ago
|
||
Comment on attachment 729531 [details] [diff] [review]
Implement GetSupportedNames on HTMLDocument
Review of attachment 729531 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/html/content/src/nsGenericHTMLElement.h
@@ +717,5 @@
>
> static bool TouchEventsEnabled(JSContext* /* unused */, JSObject* /* unused */);
>
> + static inline bool
> + ExposeIdAsHTMLDocumentProperty(Element* aElement)
This sounds as if it would actively go and expose something. Maybe ShouldExpose...?
::: content/html/document/src/nsHTMLDocument.cpp
@@ +2395,4 @@
> void
> nsHTMLDocument::GetSupportedNames(nsTArray<nsString>& aNames)
> {
> // Nothing, for now. We should fix that.
We fixed it!
Reporter | ||
Comment 20•12 years ago
|
||
Comment on attachment 729531 [details] [diff] [review]
Implement GetSupportedNames on HTMLDocument
r=me
Attachment #729531 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 21•12 years ago
|
||
Comment on attachment 729533 [details] [diff] [review]
Refactor code to support document.all
r=me, I guess
Attachment #729533 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 22•12 years ago
|
||
Comment on attachment 729535 [details] [diff] [review]
Hook up document.all in the HTMLDocument NamedGetter
This is icky, but ok for now.
Something here needs to enter the compartment of the wrapper on cx, right? Either the NamedGetter or nsHTMLDocumentSH::TryResolveAll.
r=me with that.
Attachment #729535 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 23•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8960293f0fb3
https://hg.mozilla.org/integration/mozilla-inbound/rev/a2e02690e9bd
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d97c190fe24
https://hg.mozilla.org/integration/mozilla-inbound/rev/85bcef2ac1fd
I removed the getter from the WebIDL file for now, we need unforgeable support for proxies first.
Comment 24•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8960293f0fb3
https://hg.mozilla.org/mozilla-central/rev/a2e02690e9bd
https://hg.mozilla.org/mozilla-central/rev/1d97c190fe24
https://hg.mozilla.org/mozilla-central/rev/85bcef2ac1fd
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Updated•8 years ago
|
Keywords: dev-doc-needed
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•