Closed
Bug 811391
Opened 12 years ago
Closed 12 years ago
fix interaction of viewport units (vh/vw/vmin/vmax) with @page styles
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: dbaron, Assigned: seth)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [qa-])
Attachments
(2 files, 2 obsolete files)
3.35 KB,
patch
|
dbaron
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
1.74 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
This is followup to bug 115199 comment 121 and comments that follow it.
I posted http://lists.w3.org/Archives/Public/www-style/2012Nov/0161.html about the interaction of these units with @page.
We probably need to get his sorted out before we ship viewport units.
Assignee | ||
Comment 1•12 years ago
|
||
Taking a look now.
Assignee | ||
Comment 2•12 years ago
|
||
David and I discussed this IRL and decided that the appropriate choice here is to ignore @page declarations that involve viewport units. Proposed patch will be incoming shortly.
Assignee | ||
Comment 3•12 years ago
|
||
Proposed patch.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → seth
Assignee | ||
Comment 4•12 years ago
|
||
Tests.
Assignee | ||
Comment 5•12 years ago
|
||
Try run here: https://tbpl.mozilla.org/?tree=Try&rev=a0a14b08430f
Updated•12 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 6•12 years ago
|
||
Fixed a minor bug. Everything looks good. Ready for review.
Attachment #700119 -
Flags: review?(dbaron)
Assignee | ||
Updated•12 years ago
|
Attachment #699466 -
Attachment is obsolete: true
Assignee | ||
Comment 7•12 years ago
|
||
Also fixed a bug in the tests. Ready for review.
Attachment #700120 -
Flags: review?(dbaron)
Assignee | ||
Updated•12 years ago
|
Attachment #699467 -
Attachment is obsolete: true
Assignee | ||
Comment 8•12 years ago
|
||
Try job here: https://tbpl.mozilla.org/?tree=Try&rev=9c24a16c2760
Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 700119 [details] [diff] [review]
(Part 1) Ignore @page declarations involving viewport units.
r=dbaron
In theory I'd rather this be written using an RAII class (which is both safer under future mutation of the code, and exception-safe if we ever decide to allow C++ exceptions), except I never managed to land https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/321c7aa169d8/auto-toggle . Perhaps I ought to land it at some point...
Attachment #700119 -
Flags: review?(dbaron) → review+
Reporter | ||
Comment 10•12 years ago
|
||
Comment on attachment 700120 [details] [diff] [review]
(Part 2) Tests.
r=dbaron
Attachment #700120 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 11•12 years ago
|
||
> In theory I'd rather this be written using an RAII class
Totally. I saw a mention of AutoToggle in the comments somewhere and thought that would be perfect, but I couldn't find it. (It not having landed explains that!) Let me know if you get that in and I'll be happy to revisit this code and RAII-ify it.
Comment 13•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0a00bf2ba8e
https://hg.mozilla.org/integration/mozilla-inbound/rev/c20904b75bcc
Flags: in-testsuite+
Keywords: checkin-needed
Comment 14•12 years ago
|
||
Backed out because of build bustage:
http://hg.mozilla.org/integration/mozilla-inbound/rev/b0ebc1fe57e9
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=de0d5d8572d0
Comment 15•12 years ago
|
||
This was unlucky enough to land *immediately* after I pushed a cset to make build warnings fatal in /layout/style (in bug 829168). So despite the green Try runs, the one build warning (from an out-of-order init list) that this introduced in /layout/style made it burn when it landed on m-i. :)
I'll re-land w/ the init list reordered so that this won't cause that build warning (/error).
Comment 16•12 years ago
|
||
Re-landed, w/ constructor init list reordered in the first cset to fix the build warning:
https://hg.mozilla.org/integration/mozilla-inbound/rev/057e4f6d513f
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec36f0d72b88
Comment 17•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/057e4f6d513f
https://hg.mozilla.org/mozilla-central/rev/ec36f0d72b88
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Assignee | ||
Comment 18•12 years ago
|
||
Comment on attachment 700119 [details] [diff] [review]
(Part 1) Ignore @page declarations involving viewport units.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): 503720,115199
User impact if declined: Incorrect rendering behavior if @page and viewport units are combined. We want to avoid releasing this behavior into the wild so web developers don't begin to rely on it.
Testing completed (on m-c, etc.): No problems on m-c.
Risk to taking this patch (and alternatives if risky): Low risk. It involves two new features which happened to land in the same release and can potentially interact in a problematic way. This fixes their interaction and should not affect any existing features.
String or UUID changes made by this patch: None.
Attachment #700119 -
Flags: approval-mozilla-beta?
Attachment #700119 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
status-firefox18:
--- → unaffected
status-firefox19:
--- → affected
status-firefox20:
--- → affected
tracking-firefox19:
--- → +
tracking-firefox20:
--- → +
Comment 19•12 years ago
|
||
Comment on attachment 700119 [details] [diff] [review]
(Part 1) Ignore @page declarations involving viewport units.
Low risk fix in support of new features. Approving for Aurora/Beta.
Attachment #700119 -
Flags: approval-mozilla-beta?
Attachment #700119 -
Flags: approval-mozilla-beta+
Attachment #700119 -
Flags: approval-mozilla-aurora?
Attachment #700119 -
Flags: approval-mozilla-aurora+
Comment 20•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/15220b4f357d
https://hg.mozilla.org/releases/mozilla-beta/rev/2cf4c078ae00
status-firefox21:
--- → fixed
Comment 21•12 years ago
|
||
(Also, this is in my queue to land on Aurora once it reopens)
Comment 22•12 years ago
|
||
Comment 23•12 years ago
|
||
Marking as [qa-] since there is an automated test that verifies the fix. Please remove the tag and add "verifyme" keyword if you need any manual verification/testing from QA.
Whiteboard: [qa-]
Comment 24•11 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/CSS/length
and
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/21
A question regarding the specification of this behavior:
1. CSS Values & Units Module Level 3 explicitly defer the definition of the behavior between viewport-percentage lengths to CSS Paged Media Level 3.
2. The editor's draft of CSS Pages Media has not yet been updated with the new behavior.
Am I correct?
Keywords: dev-doc-needed → dev-doc-complete
Comment 25•11 years ago
|
||
Oups, small error. This feature is in Firefox 19.
I removed the mention in https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/21
I didn't add it in https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/19 as there is the mention of the newly implemented support of the behavior.
(The CSS <length> page has the specific info)
Comment 26•11 years ago
|
||
Actually, this is still an open issue in the spec: https://www.w3.org/Style/CSS/Tracker/issues/315
Because recent drafts also say that @page should inherit from the root element, there are all kinds of way to introduce circular dependencies.
:root { font-size: 1vw }
@page { width: 50em; /* font-size: inherit */ }
Any way I can think of to resolve this breaks one use case or another. I discussed this at length on www-style (unfortunately not all of which is linked form the CSS Tracker issue.) Ping me to dig up the archive links if needed.
You need to log in
before you can comment on or make changes to this bug.
Description
•