Where does default size of iframe come from?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where does default size of iframe come from?

Felix Miata-2
In global.css is iframe {width: 100px; height: 100px; min-width: 10px;
min-height: 10px;}, but using Domi I'm unable to find it applied. With CSS
disabled via view menu, the iframe on http://fm.no-ip.com/Auth/auth.html is
obviously neither 10px nor 100px tall or wide. Where is it getting its size from?

I ask because so many sites force needed content into an iframe so small that
it's inaccessible with site styles disabled, while with site styles enabled
other things cause it to be inaccessible as consequence of minimum font size
and/or zoom. There ought to be some way to force content to be
viewable/reachable/visible.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://fm.no-ip.com/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Where does default size of iframe come from?

Boris Zbarsky
On 11/16/10 7:51 AM, Felix Miata wrote:
> In global.css is iframe {width: 100px; height: 100px; min-width: 10px;
> min-height: 10px;}, but using Domi I'm unable to find it applied.

Are you looking at a <xul:iframe> in DOMi?  global.css declares the XUL
namespace as its default namespace.

> With CSS disabled via view menu, the iframe on http://fm.no-ip.com/Auth/auth.html is
> obviously neither 10px nor 100px tall or wide.

Well, sure.  It's not a <xul:iframe>.

> Where is it getting its size from?

443 nsSubDocumentFrame::GetIntrinsicWidth()
...
458   return nsPresContext::CSSPixelsToAppUnits(300);

and

462 nsSubDocumentFrame::GetIntrinsicHeight()
....
475   return nsPresContext::CSSPixelsToAppUnits(150);

The relevant part of the CSS spec is
http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width 
next-to-last paragraph and
http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-height third
paragraph from the end.

-Boris

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Where does default size of iframe come from?

Felix Miata-2
On 2010-11-16 09:25 (GMT-0500) Boris Zbarsky composed:

> On 11/16/10 7:51 AM, Felix Miata wrote:

>> In global.css is iframe {width: 100px; height: 100px; min-width: 10px;
>> min-height: 10px;}, but using Domi I'm unable to find it applied.

> Are you looking at a <xul:iframe> in DOMi?  global.css declares the XUL
> namespace as its default namespace.

I thought global.css applied to viewport content. :-(

>> With CSS disabled via view menu, the iframe on http://fm.no-ip.com/Auth/auth.html is
>> obviously neither 10px nor 100px tall or wide.

> Well, sure.  It's not a <xul:iframe>.

>> Where is it getting its size from?

> 443 nsSubDocumentFrame::GetIntrinsicWidth()
> ...
> 458   return nsPresContext::CSSPixelsToAppUnits(300);

> and

> 462 nsSubDocumentFrame::GetIntrinsicHeight()
> ....
> 475   return nsPresContext::CSSPixelsToAppUnits(150);

> The relevant part of the CSS spec is
> http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width 
> next-to-last paragraph and
> http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-height third
> paragraph from the end.

I get overwhelmed trying to wrap my head around the concept of replaced
elements, and so that section of spec to me is no help.

The real question is is there anything a user can do to force accessibility
upon iframes that are too tiny with styles turned off and otherwise useless
with styles turned on in conjuction with minimum font size and/or enough zoom
applied to force legibly sized text?
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://fm.no-ip.com/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Where does default size of iframe come from?

Boris Zbarsky
On 12/4/10 4:05 PM, Felix Miata wrote:
> I thought global.css applied to viewport content. :-(

Not by default, though content in the viewport could include it.  But
the namespace restriction would remain, of course.

> I get overwhelmed trying to wrap my head around the concept of replaced
> elements, and so that section of spec to me is no help.

The short story is that a replaced element with no intrinsic size and no
specified size is sized at 300px wide by 150px tall.

> The real question is is there anything a user can do to force accessibility
> upon iframes that are too tiny with styles turned off and otherwise useless
> with styles turned on in conjuction with minimum font size and/or enough zoom
> applied to force legibly sized text?

You could set min-height and min-width on iframes in your user
stylesheet, right?

-Boris



_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout