Skip to content

WIP - Add an attribute to iframe to toggle mozcontentblocker - #15841

Closed
ferjm wants to merge 1 commit into
servo:masterfrom
ferjm:issue-11500-iframe-mozcontentblocker
Closed

ferjm wants to merge 1 commit into
servo:masterfrom
ferjm:issue-11500-iframe-mozcontentblocker

Conversation

@ferjm

@ferjm ferjm commented Mar 6, 2017 •

Copy link
Copy Markdown
Contributor

This change is Reviewable

@highfive

highfive commented Mar 6, 2017

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/constellation.rs
  • @fitzgen: components/script/dom/htmliframeelement.rs, components/script_traits/lib.rs, components/script_traits/lib.rs, components/script/dom/webidls/HTMLIFrameElement.webidl
  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script_traits/lib.rs, components/script_traits/lib.rs, components/script/dom/webidls/HTMLIFrameElement.webidl

@highfive

highfive commented Mar 6, 2017

Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 6, 2017
@ferjm ferjm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 6, 2017
@ferjm

ferjm commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

@nox I managed to expose the mozcontentblocker attribute on the iframe element, but I am not sure what needs to be done next. Could you give me some pointers about where is content blocking being handled now, please?

I saw that you implemented support for content blocking on #11413, but it seems that it was partially removed later on #14360, and I can't find how content blocking is currently done.

@ferjm ferjm added S-awaiting-answer Someone asked a question that requires an answer. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Mar 6, 2017
@ferjm ferjm assigned nox Mar 6, 2017
@fabricedesre

Copy link
Copy Markdown
Contributor

I'm not convinced that content blocking should be part of Servo itself. I'd rather do that in the embedder, which means that Servo needs hooks but not the blocker itself.

@nox

nox commented Mar 7, 2017

Copy link
Copy Markdown
Contributor

r? @Ms2ger who removed the old network stack and now I'm confused.

@highfive highfive assigned Ms2ger and unassigned nox Mar 7, 2017
@nox

nox commented Mar 7, 2017

Copy link
Copy Markdown
Contributor

FWIW our "embedder hook" story is really not up to the task for now, and if we go that way we should clear that up.

@ferjm

ferjm commented Mar 7, 2017

Copy link
Copy Markdown
Contributor Author

It seems that the content blocker needs to be rewritten in #14307 (or maybe with a different approach as suggested by @fabricedesre). And until this is done, it makes no sense to add the iframe attribute.

@ferjm ferjm closed this Mar 7, 2017
@ferjm
ferjm deleted the issue-11500-iframe-mozcontentblocker branch March 7, 2017 17:21
@metajack

Copy link
Copy Markdown
Collaborator

@fabricedesre Are you suggesting we put it in the embedding API and expose it in JS for browser.html?

@fabricedesre

Copy link
Copy Markdown
Contributor

Yes, the embedding API should offer facilities similar to https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIContentPolicy . In the case of b.html the Rust -> JS glue could choose to expose that.

WebExtensions offer the same kind of features through the https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest api. I suspect that we would want to build WebExtension support on top of the ContentPolicy mechanism, though.

Another related thing to consider is tracking protection. Gecko has an internal implementation of tracking protection that may be nice to replicate and turn on with the already existing private browsing mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-answer Someone asked a question that requires an answer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to enable content blocker for a specific top level browsing context

7 participants