diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
| commit | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch) | |
| tree | b318cf594dc1da2fa48224005945c9157f35bb41 /Source/WebCore/rendering/RenderBox.cpp | |
| parent | 6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff) | |
| download | qtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz | |
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/WebCore/rendering/RenderBox.cpp')
| -rw-r--r-- | Source/WebCore/rendering/RenderBox.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 40adf387e..506105636 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -858,23 +858,12 @@ void RenderBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo) { - const FillLayer* bgLayer = style()->backgroundLayers(); - Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor); - RenderObject* bodyObject = 0; - if (!hasBackground() && node() && node()->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(); - bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0; - if (bodyObject) { - bgLayer = bodyObject->style()->backgroundLayers(); - bgColor = bodyObject->style()->visitedDependentColor(CSSPropertyBackgroundColor); - } - } + RenderObject* rootBackgroundRenderer = rendererForRootBackground(); + + const FillLayer* bgLayer = rootBackgroundRenderer->style()->backgroundLayers(); + Color bgColor = rootBackgroundRenderer->style()->visitedDependentColor(CSSPropertyBackgroundColor); - paintFillLayers(paintInfo, bgColor, bgLayer, view()->backgroundRect(this), BackgroundBleedNone, CompositeSourceOver, bodyObject); + paintFillLayers(paintInfo, bgColor, bgLayer, view()->backgroundRect(this), BackgroundBleedNone, CompositeSourceOver, rootBackgroundRenderer); } BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsContext* context) const @@ -1804,7 +1793,7 @@ bool RenderBox::sizesToIntrinsicLogicalWidth(LogicalWidthType widthType) const // Flexible box items should shrink wrap, so we lay them out at their intrinsic widths. // In the case of columns that have a stretch alignment, we go ahead and layout at the // stretched size to avoid an extra layout when applying alignment. - if (parent()->isFlexibleBox() && (!parent()->style()->isColumnFlexDirection() || style()->flexAlign() != AlignStretch)) + if (parent()->isFlexibleBox() && (!parent()->style()->isColumnFlexDirection() || style()->flexItemAlign() != AlignStretch)) return true; // Flexible horizontal boxes lay out children at their intrinsic widths. Also vertical boxes |
