| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
yle) | 107 void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
yle) |
| 108 { | 108 { |
| 109 RenderBoxModelObject::styleDidChange(diff, oldStyle); | 109 RenderBoxModelObject::styleDidChange(diff, oldStyle); |
| 110 | 110 |
| 111 if (!alwaysCreateLineBoxes()) { | 111 if (!alwaysCreateLineBoxes()) { |
| 112 RenderStyle* newStyle = style(); | 112 RenderStyle* newStyle = style(); |
| 113 bool alwaysCreateLineBoxesNew = hasSelfPaintingLayer() || hasBoxDecorati
onBackground() || newStyle->hasPadding() || newStyle->hasMargin() || newStyle->h
asOutline(); | 113 bool alwaysCreateLineBoxesNew = hasSelfPaintingLayer() || hasBoxDecorati
onBackground() || newStyle->hasPadding() || newStyle->hasMargin() || newStyle->h
asOutline(); |
| 114 if (oldStyle && alwaysCreateLineBoxesNew) { | 114 if (oldStyle && alwaysCreateLineBoxesNew) { |
| 115 dirtyLineBoxes(false); | 115 dirtyLineBoxes(false); |
| 116 setNeedsLayoutAndFullPaintInvalidation(); | 116 setNeedsLayout(); |
| 117 } | 117 } |
| 118 setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew); | 118 setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout) | 122 void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout) |
| 123 { | 123 { |
| 124 // Once we have been tainted once, just assume it will happen again. This wa
y effects like hover highlighting that change the | 124 // Once we have been tainted once, just assume it will happen again. This wa
y effects like hover highlighting that change the |
| 125 // background color will only cause a layout on the first rollover. | 125 // background color will only cause a layout on the first rollover. |
| 126 if (alwaysCreateLineBoxes()) | 126 if (alwaysCreateLineBoxes()) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 if (InlineBox* firstBox = firstLineBox()) | 172 if (InlineBox* firstBox = firstLineBox()) |
| 173 caretRect.moveBy(roundedLayoutPoint(firstBox->topLeft())); | 173 caretRect.moveBy(roundedLayoutPoint(firstBox->topLeft())); |
| 174 | 174 |
| 175 return caretRect; | 175 return caretRect; |
| 176 } | 176 } |
| 177 | 177 |
| 178 void RenderInline::addChild(RenderObject* newChild, RenderObject* beforeChild) | 178 void RenderInline::addChild(RenderObject* newChild, RenderObject* beforeChild) |
| 179 { | 179 { |
| 180 RenderBoxModelObject::addChild(newChild, beforeChild); | 180 RenderBoxModelObject::addChild(newChild, beforeChild); |
| 181 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 181 newChild->setNeedsLayoutAndPrefWidthsRecalc(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 184 void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| 185 { | 185 { |
| 186 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 186 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
| 187 m_lineBoxes.paint(this, paintInfo, paintOffset); | 187 m_lineBoxes.paint(this, paintInfo, paintOffset); |
| 188 } | 188 } |
| 189 | 189 |
| 190 template<typename GeneratorContext> | 190 template<typename GeneratorContext> |
| 191 void RenderInline::generateLineBoxRects(GeneratorContext& yield) const | 191 void RenderInline::generateLineBoxRects(GeneratorContext& yield) const |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 pixelSnappedBox.maxY(), | 1027 pixelSnappedBox.maxY(), |
| 1028 pixelSnappedBox.maxX() + outlineWidth, | 1028 pixelSnappedBox.maxX() + outlineWidth, |
| 1029 pixelSnappedBox.maxY() + outlineWidth, | 1029 pixelSnappedBox.maxY() + outlineWidth, |
| 1030 BSBottom, outlineColor, outlineStyle, | 1030 BSBottom, outlineColor, outlineStyle, |
| 1031 outlineWidth, | 1031 outlineWidth, |
| 1032 outlineWidth, | 1032 outlineWidth, |
| 1033 antialias); | 1033 antialias); |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 } // namespace blink | 1036 } // namespace blink |
| OLD | NEW |