| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
| 3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
| 4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
| 5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 return; | 1163 return; |
| 1164 | 1164 |
| 1165 RenderTable* tableElt = table(); | 1165 RenderTable* tableElt = table(); |
| 1166 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC
hild()) | 1166 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC
hild()) |
| 1167 return; | 1167 return; |
| 1168 | 1168 |
| 1169 LayoutPoint adjustedPaintOffset = paintOffset; | 1169 LayoutPoint adjustedPaintOffset = paintOffset; |
| 1170 if (backgroundObject != this) | 1170 if (backgroundObject != this) |
| 1171 adjustedPaintOffset.moveBy(location()); | 1171 adjustedPaintOffset.moveBy(location()); |
| 1172 | 1172 |
| 1173 StyleColor c = backgroundObject->resolveStyleColor(CSSPropertyBackgroundColo
r); | 1173 Color c = backgroundObject->resolveColor(CSSPropertyBackgroundColor); |
| 1174 const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers(); | 1174 const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers(); |
| 1175 | 1175 |
| 1176 if (bgLayer->hasImage() || c.isValid()) { | 1176 if (bgLayer->hasImage() || c.isValid()) { |
| 1177 // We have to clip here because the background would paint | 1177 // We have to clip here because the background would paint |
| 1178 // on top of the borders otherwise. This only matters for cells and row
s. | 1178 // on top of the borders otherwise. This only matters for cells and row
s. |
| 1179 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t
his || backgroundObject == parent()) && tableElt->collapseBorders(); | 1179 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t
his || backgroundObject == parent()) && tableElt->collapseBorders(); |
| 1180 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip); | 1180 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip); |
| 1181 if (shouldClip) { | 1181 if (shouldClip) { |
| 1182 LayoutRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjusted
PaintOffset.y() + borderTop(), | 1182 LayoutRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjusted
PaintOffset.y() + borderTop(), |
| 1183 width() - borderLeft() - borderRight(), height() - borderTop() -
borderBottom()); | 1183 width() - borderLeft() - borderRight(), height() - borderTop() -
borderBottom()); |
| 1184 paintInfo.context->clip(clipRect); | 1184 paintInfo.context->clip(clipRect); |
| 1185 } | 1185 } |
| 1186 paintFillLayers(paintInfo, c.color(), bgLayer, LayoutRect(adjustedPaintO
ffset, pixelSnappedSize()), BackgroundBleedNone, CompositeSourceOver, background
Object); | 1186 paintFillLayers(paintInfo, c, bgLayer, LayoutRect(adjustedPaintOffset, p
ixelSnappedSize()), BackgroundBleedNone, CompositeSourceOver, backgroundObject); |
| 1187 } | 1187 } |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) | 1190 void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) |
| 1191 { | 1191 { |
| 1192 if (!paintInfo.shouldPaintWithinRoot(this)) | 1192 if (!paintInfo.shouldPaintWithinRoot(this)) |
| 1193 return; | 1193 return; |
| 1194 | 1194 |
| 1195 RenderTable* tableElt = table(); | 1195 RenderTable* tableElt = table(); |
| 1196 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC
hild()) | 1196 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC
hild()) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 | 1260 |
| 1261 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) | 1261 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) |
| 1262 { | 1262 { |
| 1263 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); | 1263 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); |
| 1264 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); | 1264 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); |
| 1265 newCell->setStyle(newStyle.release()); | 1265 newCell->setStyle(newStyle.release()); |
| 1266 return newCell; | 1266 return newCell; |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 } // namespace WebCore | 1269 } // namespace WebCore |
| OLD | NEW |