Move AuthorStyleDisabled/HintCharset/HintCharsetSource to WindowContext or BrowsingContext
Categories
(Core :: Layout, defect)
Tracking
()
Fission Milestone | M7 |
People
(Reporter: kmag, Assigned: heycam)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The functions which set these flags currently try to propagate them to descendants using nsDocumentViewer::CallChildren, which only handle in-process children. We want to handle out-of-process children too, which means we need to use store them on WindowContext or BrowsingContext instead, and propagate them using something like BrowsingContext::PreOrderWalk
.
Reporter | ||
Comment 1•4 years ago
|
||
Note that this involves adding DidSet*
hooks to BrowsingContext
or WindowContext
for each of these flags to update the layout state of the child process they live in when the flags change.
Updated•4 years ago
|
Comment 2•4 years ago
•
|
||
We'll need AuthorStyleDisabled mainly for devtools.
Assignee | ||
Comment 3•4 years ago
|
||
Is AuthorStyleDisabled also used for the View > Page Style > No Page Style menu?
Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #3)
Is AuthorStyleDisabled also used for the View > Page Style > No Page Style menu?
It is, but looks like PageStyleChild.jsm handles this in all frames.
Assignee | ||
Comment 5•4 years ago
|
||
Henri, do you know if the lack of support for OOP iframes in nsDocumentViewer::SetHintCharset
and SetHintCharacterSetSource
is a problem? Can you suggest a way to construct a document that would end up using the wrong encoding in a child iframe if these aren't fixed?
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bfa83880712 Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Comment 9•4 years ago
|
||
Backed out changeset 1bfa83880712 (bug 1662839) for browser_disable_author_style_oop.js failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/be95f3d07de37271de47f5cab75698547c141cd0
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316552574&repo=autoland&lineNumber=2032
[task 2020-09-24T02:26:42.905Z] 02:26:42 INFO - TEST-START | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js
[task 2020-09-24T02:26:43.343Z] 02:26:43 INFO - TEST-INFO | started process screencapture
[task 2020-09-24T02:26:43.526Z] 02:26:43 INFO - TEST-INFO | screencapture: exit 0
[task 2020-09-24T02:26:43.526Z] 02:26:43 INFO - Buffered messages logged at 02:26:42
[task 2020-09-24T02:26:43.526Z] 02:26:43 INFO - Entering test bound test_disable_style
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.com/browser/browser/base/content/test/pageStyle/page_style.html" line: 0}]
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - Buffered messages logged at 02:26:43
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - Console message: [JavaScript Error: "Unknown Collection "main/partitioning-exempt-urls"" {file: "resource://services-settings/RemoteSettingsClient.jsm" line: 160}]
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - UnknownCollectionError@resource://services-settings/RemoteSettingsClient.jsm:160:5
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - sync@resource://services-settings/RemoteSettingsClient.jsm:470:13
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO -
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - TEST-PASS | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | parent color before disabling style -
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - TEST-PASS | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | first child color before disabling style -
[task 2020-09-24T02:26:43.527Z] 02:26:43 INFO - TEST-PASS | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | parent color after disabling style -
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - TEST-PASS | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | first child color after disabling style -
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - Buffered messages finished
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | second child color after disabling style - Got "rgb(0, 0, 255)", expected "rgb(0, 0, 0)"
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - Stack trace:
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - chrome://mochikit/content/browser-test.js:test_is:1332
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - chrome://mochitests/content/browser/browser/base/content/test/pageStyle/browser_disable_author_style_oop.js:test_disable_style:58
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - Leaving test bound test_disable_style
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - GECKO(1622) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - GECKO(1622) | MEMORY STAT | vsize 6778MB | residentFast 274MB | heapAllocated 116MB
[task 2020-09-24T02:26:43.528Z] 02:26:43 INFO - TEST-OK | browser/base/content/test/pageStyle/browser_disable_author_style_oop.js | took 520ms
Comment 10•4 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #5)
Henri, do you know if the lack of support for OOP iframes in
nsDocumentViewer::SetHintCharset
andSetHintCharacterSetSource
is a problem? Can you suggest a way to construct a document that would end up using the wrong encoding in a child iframe if these aren't fixed?
It shouldn't be a problem, because the encoding is not supposed to inherit across sites anyway.
Comment 11•4 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ae706cfee33 Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Comment 12•4 years ago
|
||
bugherder |
Assignee | ||
Comment 13•3 years ago
|
||
Per comment 10, we shouldn't need to do anything for SetHintCharHint
and SetHintCharacterSetSource
, so this bug should be done.
Assignee | ||
Updated•3 years ago
|
Description
•