[Webkit-unassigned] [Bug 23754] the view port is filled with the background color of the body element partly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 5 23:27:55 PST 2009


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





------- Comment #2 from weihong.zeng at hotmail.com  2009-02-05 23:27 PDT -------
I am using chrome, there's this bug at random.
If start.css is loaded after the creating of the body element, it happened.

void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
    const FillLayer* bgLayer = style()->backgroundLayers();
    Color bgColor = style()->backgroundColor();
    if (!style()->hasBackground() && element() &&
element()->hasTagName(HTMLNames::htmlTag)) {
        // Locate the <body> element using the DOM.  This is easier than trying
        // to crawl around a render tree with potential :before/:after content
and
        // anonymous blocks created by inline <body> tags etc.  We can locate
the <body>
        // render object very easily via the DOM.
        HTMLElement* body = document()->body();
        RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ?
body->renderer() : 0;
        if (bodyObject) {
            bgLayer = bodyObject->style()->backgroundLayers();
            bgColor = bodyObject->style()->backgroundColor(); // background
color of the body
        }
    }

    int w = width();
    int h = height();

    int rw;
    int rh;
    if (view()->frameView()) {
        rw = view()->frameView()->contentsWidth();
        rh = view()->frameView()->contentsHeight();
    } else {
        rw = view()->width();
        rh = view()->height();
    }

    // CSS2 14.2:
    // The background of the box generated by the root element covers the
entire canvas including
    // its margins.
    int bx = tx - marginLeft();
    int by = ty - marginTop();
    int bw = max(w + marginLeft() + marginRight() + borderLeft() +
borderRight(), rw);
    int bh = max(h + marginTop() + marginBottom() + borderTop() +
borderBottom(), rh);

    int my = max(by, paintInfo.rect.y());

    // paintInfo.rect.height() isn't the bh
    paintFillLayers(paintInfo, bgColor, bgLayer, my, paintInfo.rect.height(),
bx, by, bw, bh);

    if (style()->hasBorder() && style()->display() != INLINE)
        paintBorder(paintInfo.context, tx, ty, w, h, style());
}


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



More information about the webkit-unassigned mailing list