Bug 23754

Summary: the view port is filled with the background color of the body element partly.
Product: WebKit Reporter: wesleyZeng <weihong.zeng>
Component: Layout and RenderingAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED INVALID    
Severity: Normal CC: ap, darin, playmobil, simon.fraser, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://gocn.maxthon.com/m2/start2/

wesleyZeng
Reported 2009-02-05 00:54:38 PST
the view port is filled with the background color of the body element partly. Just the rectangle of the body element is filled. http://gocn.maxthon.com/m2/start2/
Attachments
Alexey Proskuryakov
Comment 1 2009-02-05 11:45:13 PST
This page is rendered by Safari and Firefox in the same way as far as I can tell - what exactly is the problem? You have set the component to Reindeer - maybe you are not using Safari?
wesleyZeng
Comment 2 2009-02-05 23:27:55 PST
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()); }
Simon Fraser (smfr)
Comment 3 2010-03-04 15:38:30 PST
Test URL has gone away, and I don't understand why you pasted a bunch of code in the above comment.
Jeremy Moskovich
Comment 4 2010-11-03 10:28:01 PDT
Closing since the link is broken and there have been no updates in 7 months, please reopen if you have an updated URL.
Note You need to log in before you can comment on or make changes to this bug.