diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
commit | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch) | |
tree | 87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebCore/rendering/RenderObject.cpp | |
parent | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff) | |
download | qtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz |
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebCore/rendering/RenderObject.cpp')
-rwxr-xr-x | Source/WebCore/rendering/RenderObject.cpp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index cc80bae9b..13f62f431 100755 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -327,12 +327,6 @@ void RenderObject::removeChild(RenderObject* oldChild) if (!children) return; - // We do this here instead of in removeChildNode, since the only extremely low-level uses of remove/appendChildNode - // cannot affect the positioned object list, and the floating object list is irrelevant (since the list gets cleared on - // layout anyway). - if (oldChild->isFloatingOrPositioned()) - toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); - children->removeChildNode(this, oldChild); } @@ -1255,9 +1249,11 @@ RenderBoxModelObject* RenderObject::containerForRepaint() const #if USE(ACCELERATED_COMPOSITING) if (v->usesCompositing()) { - RenderLayer* compLayer = enclosingLayer()->enclosingCompositingLayerForRepaint(); - if (compLayer) - repaintContainer = compLayer->renderer(); + if (RenderLayer* parentLayer = enclosingLayer()) { + RenderLayer* compLayer = parentLayer->enclosingCompositingLayerForRepaint(); + if (compLayer) + repaintContainer = compLayer->renderer(); + } } #endif @@ -2569,38 +2565,40 @@ PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(PseudoId pseudo, Re return document()->styleResolver()->pseudoStyleForElement(pseudo, element, parentStyle); } -static Color decorationColor(RenderObject* renderer) +static Color decorationColor(RenderStyle* style) { Color result; - if (renderer->style()->textStrokeWidth() > 0) { + if (style->textStrokeWidth() > 0) { // Prefer stroke color if possible but not if it's fully transparent. - result = renderer->style()->visitedDependentColor(CSSPropertyWebkitTextStrokeColor); + result = style->visitedDependentColor(CSSPropertyWebkitTextStrokeColor); if (result.alpha()) return result; } - result = renderer->style()->visitedDependentColor(CSSPropertyWebkitTextFillColor); + result = style->visitedDependentColor(CSSPropertyWebkitTextFillColor); return result; } void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline, - Color& linethrough, bool quirksMode) + Color& linethrough, bool quirksMode, bool firstlineStyle) { RenderObject* curr = this; + RenderStyle* styleToUse = 0; do { - int currDecs = curr->style()->textDecoration(); + styleToUse = curr->style(firstlineStyle); + int currDecs = styleToUse->textDecoration(); if (currDecs) { if (currDecs & UNDERLINE) { decorations &= ~UNDERLINE; - underline = decorationColor(curr); + underline = decorationColor(styleToUse); } if (currDecs & OVERLINE) { decorations &= ~OVERLINE; - overline = decorationColor(curr); + overline = decorationColor(styleToUse); } if (currDecs & LINE_THROUGH) { decorations &= ~LINE_THROUGH; - linethrough = decorationColor(curr); + linethrough = decorationColor(styleToUse); } } if (curr->isFloating() || curr->isPositioned() || curr->isRubyText()) @@ -2613,12 +2611,13 @@ void RenderObject::getTextDecorationColors(int decorations, Color& underline, Co // If we bailed out, use the element we bailed out at (typically a <font> or <a> element). if (decorations && curr) { + styleToUse = curr->style(firstlineStyle); if (decorations & UNDERLINE) - underline = decorationColor(curr); + underline = decorationColor(styleToUse); if (decorations & OVERLINE) - overline = decorationColor(curr); + overline = decorationColor(styleToUse); if (decorations & LINE_THROUGH) - linethrough = decorationColor(curr); + linethrough = decorationColor(styleToUse); } } |