Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: Source/core/rendering/RenderFrameSet.cpp

Issue 19697011: Change rendering code to use RenderObject::resolveColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() ? style()->visite dDependentColor(CSSPropertyBorderLeftColor) : 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() ? style()->visite dDependentColor(CSSPropertyBorderLeftColor) : 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)
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFileUploadControl.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698