SlideShare a Scribd company logo
1 of 27
Download to read offline
Fixing Gaps: Strengthening the
Chromium Platform for Content
Blocking
myid.shin@igalia.com
ltilve@igalia.com
Agenda
โ— About Igalia
โ— New features for Content Blocking
โ— The need for tabs.removeCSS and extending exension new API
โ— What is Shadow Root / Why we need to access โ€œclosed shadow rootโ€?
โ— Implement in Blink / Intent to Ship: blink-dev@
โ— For new extension API
โ— Implement in chrome / Proposal document / How to use
โ— Release schedule
โ— Future plans
About Igalia
โ— Open Source Consultancy with HQ in Galicia, Spain
โ—‹ 90 employees all around the world
โ—‹ Mainly specialized on Browsers and Web Engines:
โ—‹ Chromium, Firefox, WebKit and WPE
โ—‹ Compilers, JavaScript engines, Graphics, Multimedia, Accessibility
New features for Content Blocking
Add a chrome.tabs.removeCSS (https://crbug.com/608854)
Add a chrome.dom.openOrClosedShadowRoot (https://crbug.com/778816)
Apply content scripts to about: and data: urls (https://crbug.com/55084)
The need for tabs.removeCSS
โ— A way to hide blocked ads is by adding new CSS rules through existing
chrome.tabs.insertCSS
โ—‹ https://developer.chrome.com/extensions/tabs#method-insertCSS
โ— However, as content changes dynamically, it was necessary to have a
mechanism in Chromium to modify the visibility of elements that vary over
time.
โ— A removeCSS method as already available on other engines:
โ—‹ https://bugzilla.mozilla.org/show_bug.cgi?id=1247455
The need for tabs.removeCSS
โ— There was an open upstream issue for it (https://crbug.com/608854)
โ— An initial CL for it had been started by Manish Jethani but got discontinued
โ—‹ https://crrev.com/c/918606
โ— The bug was taken over and work completed by Antonio Gomes
โ—‹ Updated original CL to use the new APIs
โ—‹ Created new issue for โ€œExtension API Modification: chrome.tabs.removeCSSโ€
(https://crbug.com/1101473)
โ—‹ Added the necessary functional tests
โ—‹ Iterated the through the review process
โ—‹ Got it landed (https://crrev.com/c/2250506)
โ— Implementation adds security restriction that extensions can only remove their
own injected CSS.
The need for tabs.removeCSS
tabs.removeCSS new API
โ— The new API method definition is added to
chrome/common/extensions/api/tabs.json
"name": "removeCSS",
"type": "function",
"description" โ€œRemove CSS injected by $(ref:tabs.insertCSS).",
"parameters":
"tabId" : โ€œID of the tab from which to remove the CSS; defaults to active one.โ€
"details" : โ€œDetails of the CSS text to remove.โ€
"callback" : โ€œCalled when all the CSS has been removed.โ€
โ— And the new extension types objects into
extensions/common/api/extension_types.json
"id": "DeleteInjectionDetails",
"type": "object",
"description": "CSS to remove. Either the code or the file property, but not both",
"properties": {
"code" : โ€œCSS code to removeโ€,
"file" : โ€œCSS file to removeโ€,
"allFrames" : โ€œIf should be removed from all frames or just the top oneโ€,
"frameId": โ€œThe frame from where the CSS should be removedโ€
tabs.removeCSS new API
โ— Function
chrome/test/data/extensions/api_test/executescript/remove_css/*
async function removeCSSWithFileShouldSucceed() {
// When no frame ID is specified, the CSS is removed from the top frame.
await testRemoveCSS({file}, [originalColor, , , , , ]);
chrome.test.succeed();
},
async function removeCSSWithDifferentFileShouldDoNothing() {
// The CSS is not removed even though "/file.css" and "/other.css" are identical.
await testRemoveCSS({file: '/other.css' , allFrames: true});
chrome.test.succeed();
},
tabs.removeCSS new API
tabs.removeCSS new API
โ— API doc https://developer.chrome.com/extensions/tabs#method-removeCSS
Adding Shadow Root access API
What is Shadow Root
Encapsulation : a component to have its very own โ€œshadowโ€ DOM tree.
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
What is Shadow Root
mode options to attach a shadow root
let shadow1 = element1.attachShadow({mode: 'open'});
let shadow2 = element2.attachShadow({mode: 'closed'});
element1.shadowRoot === shadow1; // true
element2.shadowRoot === null; // true
Why we need to access โ€œclosed shadow rootโ€?
โ— Ads hidden behind closed shadow root
โ— Extensions APIs on the user's behalf
โ— Existing workaround using Extensions APIs
โ— NOT a security issue
โ— Firefox supports Element.openOrClosedShadowRoot
Implement in Blink
โ— Element.prototype.openOrClosedShadowRoot
โ— Specify API with Web IDL.
โ— But,
โ—‹ Do not expose it to general Web
โ—‹ Expose it to only isolated content script of Extensions
[Affects=Nothing, ExposedPerWorld=IsolatedWorld , NotEnumerable,
CheckSecurity=ReturnValue, Custom=Getter] readonly attribute
ShadowRoot? openOrClosedShadowRoot;
third_party/blink/renderer/core/dom/element.idl
Intent to Ship: blink-dev@
โ— The Chromium process to launch a new feature in Blink
โ—‹ https://www.chromium.org/blink/launching-features
โ— Two main concerns
โ—‹ Web namespace pollution
โ—‹ Web IDL lack for custom
โ—‹ https://groups.google.com/a/chromium.org/g/blink-dev/c/VEVXgm83UXk/m/iiIBCA
kXAgAJ
Element.prototype.openOrClosedShadowRoot
For new extension API
โ— Proposal :
https://chromium.googlesource.com/chromium/src/+/master/extensions/docs/
new_api_proposal.md
โ— Implementing :
https://www.chromium.org/developers/design-documents/extensions/propose
d-changes/creating-new-apis
Proposal document
(extension-api-reviews@chromium.org)
https://docs.google.com/document
/d/1Uj1Ff-3Kdbgb1JnCcZVj7EcWv
8jXj8wW2AlPfVfCUdI/edit?usp=sh
aring
Implement in chrome
โ— chrome.dom.openOrClosedShadowRoot
โ— Specify API with json
โ— C++ implementation
"namespace": "dom",
"functions": [{
"name": "openOrClosedShadowRoot",
"parameters": [{"name": "element", "type": "object"} ],
"returns": { "name": "shadowRoot", "type": "object" }
}]
chrome/common/extensions/api/dom.json
extensions/renderer/dom_hooks_delegate.{cc, h}
Implement in chrome
โ— chrome.dom.openOrClosedShadowRoot
โ— Specify API availability : content scripts & blessed contexts
โ— Unnecessary to specify permission, manifest entry and behavior availabilities
"dom": {
"channel": "dev",
"contexts": ["blessed_extension", "content_script"]
},
chrome/common/extensions/api/_api_features.json
How to use
let shadow1 = element1.attachShadow({mode: 'open'});
let shadow2 = element2.attachShadow({mode: 'closed'});
element1.shadowRoot === shadow1; // true
element2.shadowRoot === null; // true
chrome.dom.openOrClosedShadowRoot (element1) === shadow1; // true
chrome.dom.openOrClosedShadowRoot (element2) === shadow2; // true
Release schedule and future plans
Release schedule
โ— For chrome.tabs.removeCSS on M87
โ— For chrome.dom.openOrClosedShadowRoot on M87 / M88
Future plans and ongoing work
โ— Moving forward implementation of new CSS selectors to ease element hiding
โ—‹ Working on a prototype for :has() pseudo selector
https://github.com/w3c/csswg-drafts/issues/4903
โ—‹ Intent to proto type and ship of :dir() pseudo class
(https://chromium-review.googlesource.com/c/chromium/src/+/2460849)
โ—‹ Intent to ship complex :not()
(https://groups.google.com/a/chromium.org/g/blink-dev/c/0alTkXvDCL8/m/-ClOGv
OJBAAJ)
โ— Ongoing progress on increasing Chromium capabilities for content-blocking useful
features as more selectors, or incoming JS spec implementations.
Thanks

More Related Content

What's hot

WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
Igalia
ย 

What's hot (20)

Chromium Ozone
Chromium OzoneChromium Ozone
Chromium Ozone
ย 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
ย 
JS digest. February 2017
JS digest. February 2017JS digest. February 2017
JS digest. February 2017
ย 
WPE WebKit for Android
WPE WebKit for AndroidWPE WebKit for Android
WPE WebKit for Android
ย 
JS digest. January 2017
JS digest. January 2017JS digest. January 2017
JS digest. January 2017
ย 
Alternative approach to native Kotlin
Alternative approach to native KotlinAlternative approach to native Kotlin
Alternative approach to native Kotlin
ย 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
ย 
Compiling To Web Assembly
Compiling To Web AssemblyCompiling To Web Assembly
Compiling To Web Assembly
ย 
Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)
ย 
Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)
ย 
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
ย 
Dev/Stage/Prod Parity with Vagrant
Dev/Stage/Prod Parity with VagrantDev/Stage/Prod Parity with Vagrant
Dev/Stage/Prod Parity with Vagrant
ย 
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
ย 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web Kit
ย 
Multimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/futureMultimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/future
ย 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
ย 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)
ย 
Sep Nasiri "Upwork PHP Architecture"
Sep Nasiri "Upwork PHP Architecture"Sep Nasiri "Upwork PHP Architecture"
Sep Nasiri "Upwork PHP Architecture"
ย 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
ย 
Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)
Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)
Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)
ย 

Similar to Fixing Gaps. Strengthening the Chromium platform for content blocking

Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdf
KawimbaLofgrens
ย 

Similar to Fixing Gaps. Strengthening the Chromium platform for content blocking (20)

Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
ย 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
ย 
JS Fest 2019/Autumn. ะ’ะปะฐะด ะคะตะดะพัะพะฒ. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. ะ’ะปะฐะด ะคะตะดะพัะพะฒ. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. ะ’ะปะฐะด ะคะตะดะพัะพะฒ. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. ะ’ะปะฐะด ะคะตะดะพัะพะฒ. Technology agnostic microservices at SPA f...
ย 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
ย 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
ย 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
ย 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morePower your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
ย 
21 05-2018
21 05-201821 05-2018
21 05-2018
ย 
how to use openstack api
how to use openstack apihow to use openstack api
how to use openstack api
ย 
Office 365 Saturday (Sydney) - SharePoint framework โ€“ build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework โ€“ build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework โ€“ build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework โ€“ build integrated user e...
ย 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the future
ย 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
ย 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
ย 
Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdf
ย 
Mastering Grails 3 Plugins - GR8Conf EU 2016
Mastering Grails 3 Plugins - GR8Conf EU 2016Mastering Grails 3 Plugins - GR8Conf EU 2016
Mastering Grails 3 Plugins - GR8Conf EU 2016
ย 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016
ย 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
ย 
Chrome Extensions for Web Hackers
Chrome Extensions for Web HackersChrome Extensions for Web Hackers
Chrome Extensions for Web Hackers
ย 
Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016
ย 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
ย 

More from Igalia

Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
Igalia
ย 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
Igalia
ย 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
Igalia
ย 
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por IgaliaIntroducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
Igalia
ย 

More from Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
ย 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
ย 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
ย 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
ย 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
ย 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
ย 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
ย 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
ย 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
ย 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
ย 
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por IgaliaIntroducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
Introducciรณn a Mesa. Caso especรญfico dos dispositivos Raspberry Pi por Igalia
ย 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
ย 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
ย 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
ย 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
ย 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
ย 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
ย 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
ย 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
ย 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
ย 

Recently uploaded

Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
shivangimorya083
ย 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
Diya Sharma
ย 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service OnlineCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
anilsa9823
ย 
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
soniya singh
ย 
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
singhpriety023
ย 
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
SofiyaSharma5
ย 
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRLLucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
imonikaupta
ย 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
ย 

Recently uploaded (20)

Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
ย 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
ย 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
ย 
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
ย 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
ย 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 ๐Ÿซฆ Vanshika Verma More Our Se...
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
ย 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service OnlineCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Lucknow Lucknow best sexual service Online
ย 
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
Call Girls In Sukhdev Vihar Delhi ๐Ÿ’ฏCall Us ๐Ÿ”8264348440๐Ÿ”
ย 
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky โค๏ธ 7710465962 Independent Call Girls In C...
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
ย 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
ย 
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida โœ”๏ธโ˜†9289244007โœ”๏ธโ˜† Female E...
ย 
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRLLucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
Lucknow โคCALL GIRL 88759*99948 โคCALL GIRLS IN Lucknow ESCORT SERVICEโคCALL GIRL
ย 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ย 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
ย 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
ย 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
ย 

Fixing Gaps. Strengthening the Chromium platform for content blocking

  • 1. Fixing Gaps: Strengthening the Chromium Platform for Content Blocking myid.shin@igalia.com ltilve@igalia.com
  • 2. Agenda โ— About Igalia โ— New features for Content Blocking โ— The need for tabs.removeCSS and extending exension new API โ— What is Shadow Root / Why we need to access โ€œclosed shadow rootโ€? โ— Implement in Blink / Intent to Ship: blink-dev@ โ— For new extension API โ— Implement in chrome / Proposal document / How to use โ— Release schedule โ— Future plans
  • 3. About Igalia โ— Open Source Consultancy with HQ in Galicia, Spain โ—‹ 90 employees all around the world โ—‹ Mainly specialized on Browsers and Web Engines: โ—‹ Chromium, Firefox, WebKit and WPE โ—‹ Compilers, JavaScript engines, Graphics, Multimedia, Accessibility
  • 4.
  • 5. New features for Content Blocking Add a chrome.tabs.removeCSS (https://crbug.com/608854) Add a chrome.dom.openOrClosedShadowRoot (https://crbug.com/778816) Apply content scripts to about: and data: urls (https://crbug.com/55084)
  • 6. The need for tabs.removeCSS โ— A way to hide blocked ads is by adding new CSS rules through existing chrome.tabs.insertCSS โ—‹ https://developer.chrome.com/extensions/tabs#method-insertCSS โ— However, as content changes dynamically, it was necessary to have a mechanism in Chromium to modify the visibility of elements that vary over time. โ— A removeCSS method as already available on other engines: โ—‹ https://bugzilla.mozilla.org/show_bug.cgi?id=1247455
  • 7. The need for tabs.removeCSS โ— There was an open upstream issue for it (https://crbug.com/608854) โ— An initial CL for it had been started by Manish Jethani but got discontinued โ—‹ https://crrev.com/c/918606
  • 8. โ— The bug was taken over and work completed by Antonio Gomes โ—‹ Updated original CL to use the new APIs โ—‹ Created new issue for โ€œExtension API Modification: chrome.tabs.removeCSSโ€ (https://crbug.com/1101473) โ—‹ Added the necessary functional tests โ—‹ Iterated the through the review process โ—‹ Got it landed (https://crrev.com/c/2250506) โ— Implementation adds security restriction that extensions can only remove their own injected CSS. The need for tabs.removeCSS
  • 9. tabs.removeCSS new API โ— The new API method definition is added to chrome/common/extensions/api/tabs.json "name": "removeCSS", "type": "function", "description" โ€œRemove CSS injected by $(ref:tabs.insertCSS).", "parameters": "tabId" : โ€œID of the tab from which to remove the CSS; defaults to active one.โ€ "details" : โ€œDetails of the CSS text to remove.โ€ "callback" : โ€œCalled when all the CSS has been removed.โ€
  • 10. โ— And the new extension types objects into extensions/common/api/extension_types.json "id": "DeleteInjectionDetails", "type": "object", "description": "CSS to remove. Either the code or the file property, but not both", "properties": { "code" : โ€œCSS code to removeโ€, "file" : โ€œCSS file to removeโ€, "allFrames" : โ€œIf should be removed from all frames or just the top oneโ€, "frameId": โ€œThe frame from where the CSS should be removedโ€ tabs.removeCSS new API
  • 11. โ— Function chrome/test/data/extensions/api_test/executescript/remove_css/* async function removeCSSWithFileShouldSucceed() { // When no frame ID is specified, the CSS is removed from the top frame. await testRemoveCSS({file}, [originalColor, , , , , ]); chrome.test.succeed(); }, async function removeCSSWithDifferentFileShouldDoNothing() { // The CSS is not removed even though "/file.css" and "/other.css" are identical. await testRemoveCSS({file: '/other.css' , allFrames: true}); chrome.test.succeed(); }, tabs.removeCSS new API
  • 12. tabs.removeCSS new API โ— API doc https://developer.chrome.com/extensions/tabs#method-removeCSS
  • 13. Adding Shadow Root access API
  • 14. What is Shadow Root Encapsulation : a component to have its very own โ€œshadowโ€ DOM tree. https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
  • 15. What is Shadow Root mode options to attach a shadow root let shadow1 = element1.attachShadow({mode: 'open'}); let shadow2 = element2.attachShadow({mode: 'closed'}); element1.shadowRoot === shadow1; // true element2.shadowRoot === null; // true
  • 16. Why we need to access โ€œclosed shadow rootโ€? โ— Ads hidden behind closed shadow root โ— Extensions APIs on the user's behalf โ— Existing workaround using Extensions APIs โ— NOT a security issue โ— Firefox supports Element.openOrClosedShadowRoot
  • 17. Implement in Blink โ— Element.prototype.openOrClosedShadowRoot โ— Specify API with Web IDL. โ— But, โ—‹ Do not expose it to general Web โ—‹ Expose it to only isolated content script of Extensions [Affects=Nothing, ExposedPerWorld=IsolatedWorld , NotEnumerable, CheckSecurity=ReturnValue, Custom=Getter] readonly attribute ShadowRoot? openOrClosedShadowRoot; third_party/blink/renderer/core/dom/element.idl
  • 18. Intent to Ship: blink-dev@ โ— The Chromium process to launch a new feature in Blink โ—‹ https://www.chromium.org/blink/launching-features โ— Two main concerns โ—‹ Web namespace pollution โ—‹ Web IDL lack for custom โ—‹ https://groups.google.com/a/chromium.org/g/blink-dev/c/VEVXgm83UXk/m/iiIBCA kXAgAJ Element.prototype.openOrClosedShadowRoot
  • 19. For new extension API โ— Proposal : https://chromium.googlesource.com/chromium/src/+/master/extensions/docs/ new_api_proposal.md โ— Implementing : https://www.chromium.org/developers/design-documents/extensions/propose d-changes/creating-new-apis
  • 21. Implement in chrome โ— chrome.dom.openOrClosedShadowRoot โ— Specify API with json โ— C++ implementation "namespace": "dom", "functions": [{ "name": "openOrClosedShadowRoot", "parameters": [{"name": "element", "type": "object"} ], "returns": { "name": "shadowRoot", "type": "object" } }] chrome/common/extensions/api/dom.json extensions/renderer/dom_hooks_delegate.{cc, h}
  • 22. Implement in chrome โ— chrome.dom.openOrClosedShadowRoot โ— Specify API availability : content scripts & blessed contexts โ— Unnecessary to specify permission, manifest entry and behavior availabilities "dom": { "channel": "dev", "contexts": ["blessed_extension", "content_script"] }, chrome/common/extensions/api/_api_features.json
  • 23. How to use let shadow1 = element1.attachShadow({mode: 'open'}); let shadow2 = element2.attachShadow({mode: 'closed'}); element1.shadowRoot === shadow1; // true element2.shadowRoot === null; // true chrome.dom.openOrClosedShadowRoot (element1) === shadow1; // true chrome.dom.openOrClosedShadowRoot (element2) === shadow2; // true
  • 24. Release schedule and future plans
  • 25. Release schedule โ— For chrome.tabs.removeCSS on M87 โ— For chrome.dom.openOrClosedShadowRoot on M87 / M88
  • 26. Future plans and ongoing work โ— Moving forward implementation of new CSS selectors to ease element hiding โ—‹ Working on a prototype for :has() pseudo selector https://github.com/w3c/csswg-drafts/issues/4903 โ—‹ Intent to proto type and ship of :dir() pseudo class (https://chromium-review.googlesource.com/c/chromium/src/+/2460849) โ—‹ Intent to ship complex :not() (https://groups.google.com/a/chromium.org/g/blink-dev/c/0alTkXvDCL8/m/-ClOGv OJBAAJ) โ— Ongoing progress on increasing Chromium capabilities for content-blocking useful features as more selectors, or incoming JS spec implementations.