| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static Color borderEndEdgeColor() | 69 static Color borderEndEdgeColor() |
| 70 { | 70 { |
| 71 return Color::black; | 71 return Color::black; |
| 72 } | 72 } |
| 73 | 73 |
| 74 static Color borderFillColor() | 74 static Color borderFillColor() |
| 75 { | 75 { |
| 76 return Color(208, 208, 208); | 76 return Color(208, 208, 208); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const IntRect
& borderRect) | 79 void RenderFrameSet::paintColumnBorder(PaintInfo& paintInfo, const IntRect& bord
erRect) |
| 80 { | 80 { |
| 81 if (!paintInfo.rect.intersects(borderRect)) | 81 if (!paintInfo.getRect().intersects(borderRect)) |
| 82 return; | 82 return; |
| 83 | 83 |
| 84 // FIXME: We should do something clever when borders from distinct framesets
meet at a join. | 84 // FIXME: We should do something clever when borders from distinct framesets
meet at a join. |
| 85 | 85 |
| 86 // Fill first. | 86 // Fill first. |
| 87 GraphicsContext* context = paintInfo.context; | 87 GraphicsContext* context = paintInfo.getContext(); |
| 88 context->fillRect(borderRect, frameSet()->hasBorderColor() ? resolveColor(CS
SPropertyBorderLeftColor) : borderFillColor()); | 88 context->fillRect(borderRect, frameSet()->hasBorderColor() ? resolveColor(CS
SPropertyBorderLeftColor) : borderFillColor()); |
| 89 | 89 |
| 90 // Now stroke the edges but only if we have enough room to paint both edges
with a little | 90 // Now stroke the edges but only if we have enough room to paint both edges
with a little |
| 91 // bit of the fill color showing through. | 91 // bit of the fill color showing through. |
| 92 if (borderRect.width() >= 3) { | 92 if (borderRect.width() >= 3) { |
| 93 context->fillRect(IntRect(borderRect.location(), IntSize(1, height())),
borderStartEdgeColor()); | 93 context->fillRect(IntRect(borderRect.location(), IntSize(1, height())),
borderStartEdgeColor()); |
| 94 context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()
), IntSize(1, height())), borderEndEdgeColor()); | 94 context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()
), IntSize(1, height())), borderEndEdgeColor()); |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const IntRect& b
orderRect) | 98 void RenderFrameSet::paintRowBorder(PaintInfo& paintInfo, const IntRect& borderR
ect) |
| 99 { | 99 { |
| 100 if (!paintInfo.rect.intersects(borderRect)) | 100 if (!paintInfo.getRect().intersects(borderRect)) |
| 101 return; | 101 return; |
| 102 | 102 |
| 103 // FIXME: We should do something clever when borders from distinct framesets
meet at a join. | 103 // FIXME: We should do something clever when borders from distinct framesets
meet at a join. |
| 104 | 104 |
| 105 // Fill first. | 105 // Fill first. |
| 106 GraphicsContext* context = paintInfo.context; | 106 GraphicsContext* context = paintInfo.getContext(); |
| 107 context->fillRect(borderRect, frameSet()->hasBorderColor() ? resolveColor(CS
SPropertyBorderLeftColor) : borderFillColor()); | 107 context->fillRect(borderRect, frameSet()->hasBorderColor() ? resolveColor(CS
SPropertyBorderLeftColor) : borderFillColor()); |
| 108 | 108 |
| 109 // Now stroke the edges but only if we have enough room to paint both edges
with a little | 109 // Now stroke the edges but only if we have enough room to paint both edges
with a little |
| 110 // bit of the fill color showing through. | 110 // bit of the fill color showing through. |
| 111 if (borderRect.height() >= 3) { | 111 if (borderRect.height() >= 3) { |
| 112 context->fillRect(IntRect(borderRect.location(), IntSize(width(), 1)), b
orderStartEdgeColor()); | 112 context->fillRect(IntRect(borderRect.location(), IntSize(width(), 1)), b
orderStartEdgeColor()); |
| 113 context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1
), IntSize(width(), 1)), borderEndEdgeColor()); | 113 context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1
), IntSize(width(), 1)), borderEndEdgeColor()); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 void RenderFrameSet::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 117 void RenderFrameSet::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| 118 { | 118 { |
| 119 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 119 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
| 120 | 120 |
| 121 if (paintInfo.phase != PaintPhaseForeground) | 121 if (paintInfo.getPhase() != PaintPhaseForeground) |
| 122 return; | 122 return; |
| 123 | 123 |
| 124 RenderObject* child = firstChild(); | 124 RenderObject* child = firstChild(); |
| 125 if (!child) | 125 if (!child) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 LayoutPoint adjustedPaintOffset = paintOffset + location(); | 128 LayoutPoint adjustedPaintOffset = paintOffset + location(); |
| 129 | 129 |
| 130 size_t rows = m_rows.m_sizes.size(); | 130 size_t rows = m_rows.m_sizes.size(); |
| 131 size_t cols = m_cols.m_sizes.size(); | 131 size_t cols = m_cols.m_sizes.size(); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 return SetCursor; | 666 return SetCursor; |
| 667 } | 667 } |
| 668 if (canResizeColumn(roundedPoint)) { | 668 if (canResizeColumn(roundedPoint)) { |
| 669 cursor = columnResizeCursor(); | 669 cursor = columnResizeCursor(); |
| 670 return SetCursor; | 670 return SetCursor; |
| 671 } | 671 } |
| 672 return RenderBox::getCursor(point, cursor); | 672 return RenderBox::getCursor(point, cursor); |
| 673 } | 673 } |
| 674 | 674 |
| 675 } // namespace WebCore | 675 } // namespace WebCore |
| OLD | NEW |