Closed
Bug 986730
Opened 10 years ago
Closed 10 years ago
Move all anonymous content into the XBL scope
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
Tracking | Status | |
---|---|---|
firefox31 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(6 files)
13.53 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
5.43 KB,
patch
|
johns
:
review+
|
Details | Diff | Splinter Review |
1.74 KB,
patch
|
asaf
:
review+
mrbkap
:
review+
|
Details | Diff | Splinter Review |
8.62 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
2.06 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
3.49 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Here's the result of the discussion I had with smaug: (1) rename NODE_IS_IN_ANONYMOUS_SUBTREE to NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE (2) introduce NODE_IS_IN_ANONYMOUS_SUBTREE, with the proper semantics (3) make ChromeOnlyAccess() return true for NODE_IS_IN_ANONYMOUS_SUBTREE (4) remove chromeOnlyContent machinery (including nsINode flags)
Assignee | ||
Comment 1•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #0) > (2) introduce NODE_IS_IN_ANONYMOUS_SUBTREE, with the proper semantics Looks like we can actually compute this dynamically, assuming it's not too slow.. > (3) make ChromeOnlyAccess() return true for NODE_IS_IN_ANONYMOUS_SUBTREE > (4) remove chromeOnlyContent machinery (including nsINode flags) This part is actually pretty complicated. Currently, ChromeOnlyAccess() returns true for NAC and chromeOnlyContent AC, but not regular AC. The chromeOnlyContent stuff was kind of tacked on, and a lot of the logic there is still really specific to NAC (retargeting events and whatnot). Flipping this on for all AC breaks the world in Chrome. So I'm going to see if I can scale back on this a bit.
Comment 2•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #1) > Looks like we can actually compute this dynamically, assuming it's not too > slow.. nsIContent::IsInAnonymousSubtree() works.
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2) > (In reply to Bobby Holley (:bholley) from comment #1) > > Looks like we can actually compute this dynamically, assuming it's not too > > slow.. > nsIContent::IsInAnonymousSubtree() works. Right. But to put it on nsINode we need to do an IsContent()/AsContent() check. I was assuming that would all be very fast, but I figured it was worth checking.
Assignee | ||
Comment 4•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=ddb970955f03
Assignee | ||
Comment 5•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=a2f215c24044
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8397810 -
Flags: review?(mrbkap)
Assignee | ||
Comment 7•10 years ago
|
||
jwatt indicated that he thinks we shouldn't support this use case, and thinks this is the right approach.
Attachment #8397811 -
Flags: review?(jschoenick)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8397812 -
Flags: review?(mano)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8397813 -
Flags: review?(bugs)
Assignee | ||
Updated•10 years ago
|
Attachment #8397812 -
Flags: review?(mrbkap)
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8397814 -
Flags: review?(bugs)
Assignee | ||
Comment 11•10 years ago
|
||
Attachment #8397815 -
Flags: review?(bugs)
Assignee | ||
Updated•10 years ago
|
No longer blocks: 981257
Summary: Move all anonymous content into the XBL scope, and remove chromeOnlyContent → Move all anonymous content into the XBL scope
Comment 12•10 years ago
|
||
Comment on attachment 8397811 [details] [diff] [review] Part 2 - Prevent a NAC-parented plugin from trying to touch its reflector. v1 Review of attachment 8397811 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/plugins/test/testplugin/nptest.cpp @@ +1032,5 @@ > NPObject* o = nullptr; > + > + // Set a property on NPNVPluginElementNPObject, unless the consumer explicitly > + // opted out of this behavior. This happens when the plugin element ends up in an > + // anonymous subtree, and the page script isn't allowed to touch the reflector. The explanation here makes it sound like this is something that occurs automatically. Could probably just remove the second sentence, since the test explains why it sets it
Attachment #8397811 -
Flags: review?(jschoenick) → review+
Updated•10 years ago
|
Attachment #8397810 -
Flags: review?(mrbkap) → review+
Updated•10 years ago
|
Attachment #8397812 -
Flags: review?(mrbkap) → review+
Updated•10 years ago
|
Attachment #8397813 -
Flags: review?(bugs) → review+
Comment 13•10 years ago
|
||
Comment on attachment 8397814 [details] [diff] [review] Part 5 - Add a dynamic accessor to determine whether a node is in an anonymous subtree. v1 > nsIContent* AsContent(); >+ const nsIContent* AsContent() const { { goes to its own line
Attachment #8397814 -
Flags: review?(bugs) → review+
Comment 14•10 years ago
|
||
Comment on attachment 8397815 [details] [diff] [review] Part 6 - Put all anonymous content into the XBL scope. v1 > mozilla::dom::ParentObject GetParentObjectInternal(nsINode* aNativeParent) const { > mozilla::dom::ParentObject p(aNativeParent); >- p.mUseXBLScope = ChromeOnlyAccess(); >+ p.mUseXBLScope = IsInAnonymousSubtree(); Hmm, does this affect chrome code too? Why would we want to use xblscope there for everything?
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #14) > Comment on attachment 8397815 [details] [diff] [review] > Part 6 - Put all anonymous content into the XBL scope. v1 > > > > mozilla::dom::ParentObject GetParentObjectInternal(nsINode* aNativeParent) const { > > mozilla::dom::ParentObject p(aNativeParent); > >- p.mUseXBLScope = ChromeOnlyAccess(); > >+ p.mUseXBLScope = IsInAnonymousSubtree(); > Hmm, does this affect chrome code too? > Why would we want to use xblscope there for everything? Because for chrome, GetXBLScope(global) === global.
Comment 16•10 years ago
|
||
Comment on attachment 8397815 [details] [diff] [review] Part 6 - Put all anonymous content into the XBL scope. v1 Ahaa, then this need a comment that mUseXBLScope is effectively nop-op in chrome.
Attachment #8397815 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 17•10 years ago
|
||
Mano, are you interested in looking at this? Blake's review alone might also be sufficient.
Flags: needinfo?(mano)
Assignee | ||
Comment 18•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=5aa27163c49d
Assignee | ||
Comment 19•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #18) > https://tbpl.mozilla.org/?tree=Try&rev=5aa27163c49d Green, modulo browserchromepocalypse. remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/74a617a50287 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/f8219dddacf7 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/48a316da2fb7 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0a5af9959de remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/73af60e34c5b remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c4773f208050 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/ec8a5ce1d620
Comment 20•10 years ago
|
||
Comment on attachment 8397812 [details] [diff] [review] Part 3 - Run the FeedWriter sandbox with an expanded principal. v1 Indeed. I figured a while ago all this mess could go away, not sure if I ever filed it though.
Attachment #8397812 -
Flags: review?(mano) → review+
Flags: needinfo?(mano)
Comment 21•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f8219dddacf7 https://hg.mozilla.org/mozilla-central/rev/48a316da2fb7 https://hg.mozilla.org/mozilla-central/rev/a0a5af9959de https://hg.mozilla.org/mozilla-central/rev/73af60e34c5b https://hg.mozilla.org/mozilla-central/rev/c4773f208050 https://hg.mozilla.org/mozilla-central/rev/ec8a5ce1d620
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 22•10 years ago
|
||
Marking as [qa-] but please let me know if this needs any QA attention before we release Firefox 31.
status-firefox31:
--- → fixed
Whiteboard: [qa-]
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•