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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(const PaintInfo& paintInfo, const IntRect
& borderRect) |
80 { | 80 { |
81 if (!paintInfo.rect.intersects(borderRect)) | 81 if (!paintInfo.rect().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.context; |
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(const PaintInfo& paintInfo, const IntRect& b
orderRect) |
99 { | 99 { |
100 if (!paintInfo.rect.intersects(borderRect)) | 100 if (!paintInfo.rect().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.context; |
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. |
(...skipping 555 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 |