Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29559650: Issue 5650 - Prevent attachShadowRoot to create closed shadow root. (Closed)

Created:
Sept. 29, 2017, 2:49 p.m. by hub
Modified:
Oct. 4, 2017, 2:10 p.m.
Base URL:
https://hg.adblockplus.org/adblockpluschrome/
Visibility:
Public.

Description

Issue 5650 - Prevent attachShadowRoot to create closed shadow root.

Patch Set 1 #

Patch Set 2 : reformat code #

Total comments: 3

Patch Set 3 : Capture the original attachShadow instead. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M inject.preload.js View 1 2 1 chunk +16 lines, -0 lines 1 comment Download

Messages

Total messages: 30
hub
Sept. 29, 2017, 2:49 p.m. (2017-09-29 14:49:49 UTC) #1
hub
I chose to actually prevent closed shadow root rather than holding onto them. It is ...
Sept. 29, 2017, 2:51 p.m. (2017-09-29 14:51:43 UTC) #2
lainverse
https://codereview.adblockplus.org/29559650/diff/29559653/inject.preload.js File inject.preload.js (right): https://codereview.adblockplus.org/29559650/diff/29559653/inject.preload.js#newcode146 inject.preload.js:146: Element.prototype._attachShadow = Element.prototype.attachShadow; You left unwrapped _attachShadow right in ...
Sept. 29, 2017, 3:57 p.m. (2017-09-29 15:57:35 UTC) #3
hub
I haven't addressed the second issue yet. https://codereview.adblockplus.org/29559650/diff/29559653/inject.preload.js File inject.preload.js (right): https://codereview.adblockplus.org/29559650/diff/29559653/inject.preload.js#newcode146 inject.preload.js:146: Element.prototype._attachShadow = ...
Sept. 29, 2017, 4:54 p.m. (2017-09-29 16:54:29 UTC) #4
Manish Jethani
Is this really the solution? If we change the behavior of attachShadow in this way, ...
Sept. 29, 2017, 5:30 p.m. (2017-09-29 17:30:40 UTC) #5
Manish Jethani
On 2017/09/29 17:30:40, Manish Jethani wrote: > Is this really the solution? > > If ...
Sept. 29, 2017, 5:38 p.m. (2017-09-29 17:38:19 UTC) #6
hub
This patch seems to trigger the non shadow root scenario with the test case I ...
Sept. 29, 2017, 8:01 p.m. (2017-09-29 20:01:08 UTC) #7
Sebastian Noack
As Manish already raised concerns about, breaking web APIs (for all websites) is definitely not ...
Sept. 29, 2017, 8:13 p.m. (2017-09-29 20:13:19 UTC) #8
hub
On 2017/09/29 20:13:19, Sebastian Noack wrote: > As Manish already raised concerns about, breaking web ...
Sept. 29, 2017, 8:23 p.m. (2017-09-29 20:23:47 UTC) #9
Manish Jethani
On 2017/09/29 20:23:47, hub wrote: > On 2017/09/29 20:13:19, Sebastian Noack wrote: > > [...] ...
Sept. 29, 2017, 9:57 p.m. (2017-09-29 21:57:03 UTC) #10
Manish Jethani
On 2017/09/29 17:30:40, Manish Jethani wrote: > If we change the behavior of attachShadow in ...
Sept. 29, 2017, 11:39 p.m. (2017-09-29 23:39:34 UTC) #11
Sebastian Noack
On 2017/09/29 23:39:34, Manish Jethani wrote: > On 2017/09/29 17:30:40, Manish Jethani wrote: > > ...
Sept. 30, 2017, 2:53 a.m. (2017-09-30 02:53:28 UTC) #12
lainverse
I've decided to fix issue 2 mentioned above and and implement shadowRoot getter if ("attachShadow" ...
Sept. 30, 2017, 2:06 p.m. (2017-09-30 14:06:08 UTC) #13
Sebastian Noack
I wonder whether we couldn't just attach the shadow root to the event, so that ...
Oct. 1, 2017, 4:49 a.m. (2017-10-01 04:49:43 UTC) #14
lainverse
https://codereview.adblockplus.org/29559650/diff/29559687/inject.preload.js File inject.preload.js (right): https://codereview.adblockplus.org/29559650/diff/29559687/inject.preload.js#newcode152 inject.preload.js:152: return _attachShadow.call(this, options); Arrow functions doesn't have their own ...
Oct. 2, 2017, 6:41 a.m. (2017-10-02 06:41:21 UTC) #15
Manish Jethani
On 2017/10/01 04:49:43, Sebastian Noack wrote: > I wonder whether we couldn't just attach the ...
Oct. 2, 2017, 7:28 a.m. (2017-10-02 07:28:48 UTC) #16
Sebastian Noack
On 2017/10/02 07:28:48, Manish Jethani wrote: > On 2017/10/01 04:49:43, Sebastian Noack wrote: > > ...
Oct. 3, 2017, 12:54 a.m. (2017-10-03 00:54:25 UTC) #17
Manish Jethani
On 2017/10/03 00:54:25, Sebastian Noack wrote: > On 2017/10/02 07:28:48, Manish Jethani wrote: > > ...
Oct. 3, 2017, 10:39 a.m. (2017-10-03 10:39:06 UTC) #18
lainverse
Technically there are more options. They are more complicated, though. 1. Keep list of roots ...
Oct. 3, 2017, 10:57 a.m. (2017-10-03 10:57:27 UTC) #19
Manish Jethani
On 2017/10/03 10:57:27, lainverse wrote: > [...] > 2. Pass all newly created shadow roots ...
Oct. 3, 2017, 11:20 a.m. (2017-10-03 11:20:15 UTC) #20
lainverse
Not sure how Tampermonkey/Greasemonkey works does this, but they both provide UnsafeWindow object to user ...
Oct. 3, 2017, 11:41 a.m. (2017-10-03 11:41:46 UTC) #21
lainverse
On 2017/10/03 11:41:46, lainverse wrote: > Not sure how Tampermonkey/Greasemonkey works does this, but they ...
Oct. 3, 2017, 2:32 p.m. (2017-10-03 14:32:43 UTC) #22
Sebastian Noack
That is interesting. It seems that Tampermonkey indeed found a way to access the window ...
Oct. 3, 2017, 6:07 p.m. (2017-10-03 18:07:38 UTC) #23
Manish Jethani
On 2017/10/03 18:07:38, Sebastian Noack wrote: > That is interesting. It seems that Tampermonkey indeed ...
Oct. 3, 2017, 6:15 p.m. (2017-10-03 18:15:20 UTC) #24
Sebastian Noack
On 2017/10/03 18:15:20, Manish Jethani wrote: > On 2017/10/03 18:07:38, Sebastian Noack wrote: > > ...
Oct. 3, 2017, 6:35 p.m. (2017-10-03 18:35:36 UTC) #25
Sebastian Noack
It seems that the Tampermonkey scripts never actually run in the context of the content ...
Oct. 3, 2017, 7:46 p.m. (2017-10-03 19:46:02 UTC) #26
Manish Jethani
On 2017/10/03 19:46:02, Sebastian Noack wrote: > [...] > > Still, just leaving the shadow ...
Oct. 3, 2017, 11:06 p.m. (2017-10-03 23:06:09 UTC) #27
Sebastian Noack
On 2017/10/03 23:06:09, Manish Jethani wrote: > Developer tools is a small user base, right? ...
Oct. 4, 2017, 12:11 a.m. (2017-10-04 00:11:49 UTC) #28
Manish Jethani
On 2017/10/04 00:11:49, Sebastian Noack wrote: > On 2017/10/03 23:06:09, Manish Jethani wrote: > > ...
Oct. 4, 2017, 4:23 a.m. (2017-10-04 04:23:15 UTC) #29
Sebastian Noack
Oct. 4, 2017, 5:08 a.m. (2017-10-04 05:08:46 UTC) #30
On 2017/10/04 04:23:15, Manish Jethani wrote:
> If we don't have any other ideas, we should close this review and file an
issue
> with Chromium to allow access to closed shadow roots from extensions.
Meanwhile
> it's back to the drawing board for #5650.

Yes, filing a Chromium bug with our suggestion (and potentially writing a patch)
should be the next step. Even if we missed something so far, this would still be
the best solution for us. In case we don't get that change into Chrome, and
don't come up with a better workaround, we can still reconsider your approach,
dependent on how critical we consider this issue.

Powered by Google App Engine
This is Rietveld