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 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 paintRect.setHeight(paintRect.height() - yOff); | 153 paintRect.setHeight(paintRect.height() - yOff); |
154 paintRect.setY(paintRect.y() + yOff); | 154 paintRect.setY(paintRect.y() + yOff); |
155 } else { | 155 } else { |
156 LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() -
borderLeft()) / 2; | 156 LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() -
borderLeft()) / 2; |
157 paintRect.setWidth(paintRect.width() - xOff); | 157 paintRect.setWidth(paintRect.width() - xOff); |
158 paintRect.setX(paintRect.x() + xOff); | 158 paintRect.setX(paintRect.x() + xOff); |
159 } | 159 } |
160 | 160 |
161 if (!boxShadowShouldBeAppliedToBackground(determineBackgroundBleedAvoidance(
paintInfo.context))) | 161 if (!boxShadowShouldBeAppliedToBackground(determineBackgroundBleedAvoidance(
paintInfo.context))) |
162 paintBoxShadow(paintInfo, paintRect, style(), Normal); | 162 paintBoxShadow(paintInfo, paintRect, style(), Normal); |
163 paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgro
undColor), style()->backgroundLayers(), paintRect); | 163 paintFillLayers(paintInfo, resolveColor(CSSPropertyBackgroundColor), style()
->backgroundLayers(), paintRect); |
164 paintBoxShadow(paintInfo, paintRect, style(), Inset); | 164 paintBoxShadow(paintInfo, paintRect, style(), Inset); |
165 | 165 |
166 if (!style()->hasBorder()) | 166 if (!style()->hasBorder()) |
167 return; | 167 return; |
168 | 168 |
169 // Create a clipping region around the legend and paint the border as normal | 169 // Create a clipping region around the legend and paint the border as normal |
170 GraphicsContext* graphicsContext = paintInfo.context; | 170 GraphicsContext* graphicsContext = paintInfo.context; |
171 GraphicsContextStateSaver stateSaver(*graphicsContext); | 171 GraphicsContextStateSaver stateSaver(*graphicsContext); |
172 | 172 |
173 // FIXME: We need to work with "rl" and "bt" block flow directions. In thos
e | 173 // FIXME: We need to work with "rl" and "bt" block flow directions. In thos
e |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } else { | 206 } else { |
207 LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() -
borderLeft()) / 2; | 207 LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() -
borderLeft()) / 2; |
208 paintRect.expand(-xOff, 0); | 208 paintRect.expand(-xOff, 0); |
209 paintRect.move(xOff, 0); | 209 paintRect.move(xOff, 0); |
210 } | 210 } |
211 | 211 |
212 paintMaskImages(paintInfo, paintRect); | 212 paintMaskImages(paintInfo, paintRect); |
213 } | 213 } |
214 | 214 |
215 } // namespace WebCore | 215 } // namespace WebCore |
OLD | NEW |