Copyright © 1995-2007 Opera Software AS. All rights reserved. This file is part of the Opera web browser. It may not be distributed under any circumstances.
Like the flexroot document in the same directory, this document aims for specifying how things should work. We try not to deal with implementation details or bugs in Opera more than necessary here.
o-content-size is a opera extension to with width and height properties. It is primarily aimed at iframes and the gist of it is to make the size iframes adapt the size to its embedded document.
The only information propagated from the parent document to the embedded document in the initial width, if set in the parent document. The default width is zero.
The width and height of the embedded document is propagated to the element that embeds the document.
The size of the initial containing block of an embedded document
is
When the layout of the embedded document has been completed, the parent document should adjust the size of the element that referenced the embedded document. It should use the overflow bounding box of the root element in the embedded document to determine the size. This means that floats, fixed and absolute positioned elements, and other overflowing children, are included.
The o-content-size property value only gives special behavior to object and iframe elements that link to document content (e.g. html or text files). For other content, like images, o-content-size behaves as the value 'auto'.
For embedded SVG documents, o-content-size is redundant since 'auto' for width and height is defined to take the SVG size into account when deciding the size.
It has been raised by Morten (mstensho@opera.com) that it would probably be logical to move the -o-content-size values out of the width and height properties. Instead, let them be values of a special property whose sole purpose is to let iframes take their default from their embedded document instead of defaulting to the standard 300x150 size.
There is also some discussion about security implications of adjusting the size of an iframe according to its content since information (the height) leaks from one document to the other.