incorrect default size of <iframe> in vertical writing mode

RESOLVED FIXED in Firefox 43

Status

()

RESOLVED FIXED
3 years ago
2 months ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

unspecified
mozilla43
Points:
---

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
In horizontal writing mode, the default size of an <iframe> in the absence of any constraints or explicit sizing properties is 300px x 150px, according to the CSS 2.1 sizing rules.[1,2]

In vertical writing modes, we reinterpret these rules so that "width" becomes inline-size, and "height" becomes block-size, so the <iframe> ends up at 150px wide x 300px high. I suspect this is wrong, although it's not clear to me from the Writing Modes spec[3] which way it should be handled. I've posted to www-style[4] hoping for clarification.

Assuming there's agreement that the <iframe> default size should remain physical (which I think makes sense *unless* we were to also propagate the vertical writing mode to its contents), we'll need to fix our implementation to respect this.

The reftest reference files writing-mode/abspos/1183431-orthogonal-modes-5-ref.html and writing-mode/abspos/1183431-orthogonal-modes-6-ref.html will then need to be updated, as they are currently designed to work with our existing behavior where writing-mode *does* affect the default sizing of <iframe>.


[1] http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width
[2] http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-height
[3] https://drafts.csswg.org/css-writing-modes-3/#abstract-layout
[4] https://lists.w3.org/Archives/Public/www-style/2015Aug/0049.html
(Assignee)

Comment 2

3 years ago
Created attachment 8644958 [details] [diff] [review]
Make the intrinsic size of <iframe> remain physical 300x150, regardless of writing mode

Based on the exchange on www-style, I think we should go ahead and do this to align our behavior to the other browsers, and assume the spec will be clarified accordingly.
Attachment #8644958 - Flags: review?(dholbert)
(Assignee)

Updated

3 years ago
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8644958 [details] [diff] [review]
Make the intrinsic size of <iframe> remain physical 300x150, regardless of writing mode

Review of attachment 8644958 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks!
Attachment #8644958 - Flags: review?(dholbert) → review+
(This behavior -- sticking to physical 300x150 -- is consistent with other replaced elements, right?)
(Assignee)

Comment 5

3 years ago
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/96d67fd3c056d89346bb5760e902a67dbe700b98
changeset:  96d67fd3c056d89346bb5760e902a67dbe700b98
user:       Jonathan Kew <jkew@mozilla.com>
date:       Wed Aug 12 11:02:02 2015 +0100
description:
Bug 1191855 - Make the intrinsic size of <iframe> remain physical 300x150, regardless of writing mode. r=dholbert
(Assignee)

Comment 6

3 years ago
(In reply to Daniel Holbert [:dholbert] from comment #4)
> (This behavior -- sticking to physical 300x150 -- is consistent with other
> replaced elements, right?)

Yes; e.g. <video> keeps its landscape-aspect intrinsic size unchanged even in vertical mode.
https://hg.mozilla.org/mozilla-central/rev/96d67fd3c056
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43

Updated

2 months ago
Product: Core → Core Graveyard
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.