[Webkit-unassigned] [Bug 64059] REGRESSION (r88913): Preview in Safari’s snippet editor has a fixed height instead of filling the entire pane

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 7 01:48:41 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64059





--- Comment #3 from Nikolas Zimmermann <zimmermann at kde.org>  2011-07-07 01:48:41 PST ---
Dan, thanks for the report!

I've checked the testcase and know what part of my patch is responsible for the difference:

int RenderReplaced::computeReplacedLogicalHeight() const
{
    // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/visudet.html#propdef-height
    // If the height of the containing block is not specified explicitly (i.e., it depends on
    // content height), and this element is not absolutely positioned, the value computes to 'auto'.
    bool heightIsAuto = style()->logicalHeight().isAuto();
    if (!document()->inQuirksMode() && !isPositioned() && style()->logicalHeight().isPercent()) {
        if (RenderObject* containingBlock = this->containingBlock()) {
            while (containingBlock->isAnonymous())
                containingBlock = containingBlock->containingBlock();
            heightIsAuto = !containingBlock->style()->logicalHeight().isSpecified();
        }
    }

This piece of code is new, and closely related to the recently reported regression at bug 62769.
<!DOCTYPE html>
<div style="background-color: red; position: absolute; left: 10px; right: 10px; top: 10px; bottom: 10px;">
    <iframe style="border: none; background-color: green; width: 100%; height: 100%;"></iframe>
</div>

When the <iframe> height is determined in RenderReplaced::computeReplacedLogicalHeight, we're finding out that the <iframe> is not positioned and has a percentage height in your testcase.
Though as the containingBlock doesn't have an explicit height property set it will assume height is auto.

Thinking about this, I probably interpreted "If the height of the containing block is not specified explicitly" wrong, in the following braces it says "(i.e., it depends on content height)".

The outer <div> doesn't explicitely set height, though it's implicitely defined, and the outer <div> size does _not_ depend on the iframe size, so I've clearly introduced a bug there.
Just checking "containingBlock->style()->logicalHeight().isSpecified()" is not enough.

Dan, do you have a suggestion what's the best way to determine whether the size of the containingBlock is dependant on the content?


This is closely related to bug 62769.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list