[Webkit-unassigned] [Bug 179682] Incorrect bounds inside <mover>/<munder> when a stretchy operator is present

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 30 07:25:57 PST 2017


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

--- Comment #32 from Minsheng Liu <lambda at liu.ms> ---
Created attachment 327975

  --> https://bugs.webkit.org/attachment.cgi?id=327975&action=review

your algorithm’s result

So I just re-interpret the pointer. There should be some other safer way to do it.

void RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren()
{
    ASSERT(isValid());
    ASSERT(needsLayout());

    LayoutUnit stretchWidth = 0;
    Vector<RenderBox*, 3> embellishedOperators;
    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
        if (auto renderOperator = toHorizontalStretchyOperator(child)) {
            embellishedOperators.append(child);
            renderOperator->resetStretchSize();
            auto* operatorBox = (RenderBox*)renderOperator;
            operatorBox->setNeedsLayout();
            operatorBox->layout();
            stretchWidth = std::max(stretchWidth, operatorBox->logicalWidth());
        } else {
            child->layoutIfNeeded();
            stretchWidth = std::max(stretchWidth, child->logicalWidth());
        }
    }

    for (auto& child : embellishedOperators) {
        auto renderOperator = toHorizontalStretchyOperator(child);
        ASSERT(renderOperator);
        renderOperator->stretchTo(stretchWidth);
        renderOperator->setStretchWidthLocked(true);
        child->setNeedsLayout();
        child->layout();
        renderOperator->setStretchWidthLocked(false);
    }
}

In any case, why this should fail about complicated case is not hard to see. You cannot get around the variable stretchWidth issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171130/8185cf76/attachment.html>


More information about the webkit-unassigned mailing list