Opened on 12/07/2016 at 05:57:08 AM

Closed on 09/22/2017 at 06:46:51 PM

#4713 closed change (duplicate)

Switch from Shadow DOM v0 to Shadow DOM v1

Reported by: hayato Assignee:
Priority: P2 Milestone:
Module: Platform Keywords: externaldependency
Cc: kzar, sebastian, mapx, arthur, hfiguiere, kochi Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Background

It looks that AdBlock Plus is using Shadow DOM v0 APIs, createShadowRoot(), which is going to be deprecated.

https://github.com/adblockplus/adblockpluschrome/blob/918892096eb249c49c73e32fd73b111fc5217c28/include.preload.js#L506

What to change

Google Chrome is going to deprecate old Shadow DOM v0 APIs.

I really appreciate if AdBlock Plus could switch to use new Shadow DOM v1 APIs, attachShadow(), instead of old V0 APIs.

For more context, please see the following thread in blink-dev:

"Intent to Deprecate: Shadow DOM v0": https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/txIN7qDRFpU/iFTNP8adAgAJ

Attachments (0)

Change History (12)

comment:1 Changed on 12/07/2016 at 09:27:36 AM by mapx

  • Cc kzar sebastian mapx added

comment:2 Changed on 12/07/2016 at 12:41:27 PM by kzar

Thanks for taking the time to reach out to us.

We are aware of this and of course would like to avoid using deprecated APIs, however it sounds like the new API is not suitable for our use:

Quoting Thomas:

I know but unfortunately, we won't be able to use Shadow DOM v1 since it doesn't allow
complex CSS selectors anymore for selecting and styling elements in the light DOM. That
means that we need to abandon the Shadow DOM approach for element hiding as soon as v0
is being removed from browsers.

Worse still with Chromium issue #632009 our options are even more limited. If there was an extension API like chrome.tabs.insertCSS which allowed us to inject styles which the webpage could not overwrite our use of the Shadow DOM APIs wouldn't be required at all.

Any chance you could push #632009 for us? We would be more than happy to remove our use of the old Shadow DOM APIs if that got fixed.

comment:3 Changed on 12/07/2016 at 01:02:43 PM by kzar

  • Keywords externaldependency added
  • Priority changed from Unknown to P2
  • Ready set

(See also issues #4171 and #242.)

comment:4 Changed on 12/07/2016 at 02:00:32 PM by hayato

Thank you for explaining the situation. I am glad to hear that you are aware of this.

It sounds Chromium issue #632009 is a blocking issue for the removal.
Let me reply there.

comment:5 Changed on 12/19/2016 at 10:04:28 AM by arthur

  • Cc arthur added

comment:6 Changed on 03/01/2017 at 04:28:57 AM by kzar

  • Component changed from Unknown to Platform

comment:7 Changed on 07/20/2017 at 08:04:53 PM by hfiguiere

  • Cc hfiguiere added

comment:8 follow-ups: Changed on 08/31/2017 at 07:46:09 AM by kochi

Hi, is there any updates on this matter?

It looks like something is happening for Chromium issue #632009, does it unblock migrating to using Shadow DOM V1 API or at not using Shadow DOM at all?
(IIUC as adblock plus works for non-Chrome browsers, Shadow DOM is not a mandatory technology, but it is depending on some style feature of Shadow DOM v0.)

comment:9 Changed on 08/31/2017 at 07:50:09 AM by mapx

  • Cc kochi added

comment:10 in reply to: ↑ 8 Changed on 08/31/2017 at 09:35:10 AM by kzar

Replying to kochi:

Hi, is there any updates on this matter?

It looks like something is happening for Chromium issue #632009, does it unblock migrating to using Shadow DOM V1 API or at not using Shadow DOM at all?
(IIUC as adblock plus works for non-Chrome browsers, Shadow DOM is not a mandatory technology, but it is depending on some style feature of Shadow DOM v0.)

I'm happy to see some more progress there, but until chrome.tabs.insertCSS() uses user stylesheets this issue is blocked.

comment:11 in reply to: ↑ 8 Changed on 08/31/2017 at 03:39:55 PM by sebastian

Replying to kochi:

does it unblock migrating to using Shadow DOM V1 API or at not using Shadow DOM at all?

Shadow DOM v1 is useless for what we are doing, mostly due to the restrictions of selectors to match nodes across insertion points. So we don't plan migrating to Shadow DOM v1, but to use chrome.tabs.insertCSS() instead of a content script that creates a shadow root with a stylesheet, once user stylesheets are supported by chrome.tabs.insertCSS().

comment:12 Changed on 09/22/2017 at 06:46:51 PM by sebastian

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as duplicate of #242 (I CC'd hayoti and kochi there, since that issue is private).

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.