OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. |
5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 10 matching lines...) Expand all Loading... |
21 * | 21 * |
22 */ | 22 */ |
23 | 23 |
24 #include "config.h" | 24 #include "config.h" |
25 #include "core/rendering/RenderWidget.h" | 25 #include "core/rendering/RenderWidget.h" |
26 | 26 |
27 #include "core/accessibility/AXObjectCache.h" | 27 #include "core/accessibility/AXObjectCache.h" |
28 #include "core/frame/LocalFrame.h" | 28 #include "core/frame/LocalFrame.h" |
29 #include "core/html/HTMLFrameOwnerElement.h" | 29 #include "core/html/HTMLFrameOwnerElement.h" |
30 #include "core/html/HTMLPlugInElement.h" | 30 #include "core/html/HTMLPlugInElement.h" |
| 31 #include "core/paint/BoxPainter.h" |
31 #include "core/rendering/GraphicsContextAnnotator.h" | 32 #include "core/rendering/GraphicsContextAnnotator.h" |
32 #include "core/rendering/HitTestResult.h" | 33 #include "core/rendering/HitTestResult.h" |
33 #include "core/rendering/RenderLayer.h" | 34 #include "core/rendering/RenderLayer.h" |
34 #include "core/rendering/RenderView.h" | 35 #include "core/rendering/RenderView.h" |
35 #include "core/rendering/compositing/CompositedLayerMapping.h" | 36 #include "core/rendering/compositing/CompositedLayerMapping.h" |
36 #include "core/rendering/compositing/RenderLayerCompositor.h" | 37 #include "core/rendering/compositing/RenderLayerCompositor.h" |
37 #include "wtf/HashMap.h" | 38 #include "wtf/HashMap.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 if (style()->hasBorderRadius()) { | 219 if (style()->hasBorderRadius()) { |
219 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); | 220 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); |
220 | 221 |
221 if (borderRect.isEmpty()) | 222 if (borderRect.isEmpty()) |
222 return; | 223 return; |
223 | 224 |
224 // Push a clip if we have a border radius, since we want to round the fo
reground content that gets painted. | 225 // Push a clip if we have a border radius, since we want to round the fo
reground content that gets painted. |
225 paintInfo.context->save(); | 226 paintInfo.context->save(); |
226 RoundedRect roundedInnerRect = style()->getRoundedInnerBorderFor(borderR
ect, | 227 RoundedRect roundedInnerRect = style()->getRoundedInnerBorderFor(borderR
ect, |
227 paddingTop() + borderTop(), paddingBottom() + borderBottom(), paddin
gLeft() + borderLeft(), paddingRight() + borderRight(), true, true); | 228 paddingTop() + borderTop(), paddingBottom() + borderBottom(), paddin
gLeft() + borderLeft(), paddingRight() + borderRight(), true, true); |
228 clipRoundedInnerRect(paintInfo.context, borderRect, roundedInnerRect); | 229 BoxPainter::clipRoundedInnerRect(paintInfo.context, borderRect, roundedI
nnerRect); |
229 } | 230 } |
230 | 231 |
231 Widget* widget = this->widget(); | 232 Widget* widget = this->widget(); |
232 if (widget) | 233 if (widget) |
233 paintContents(paintInfo, paintOffset); | 234 paintContents(paintInfo, paintOffset); |
234 | 235 |
235 if (style()->hasBorderRadius()) | 236 if (style()->hasBorderRadius()) |
236 paintInfo.context->restore(); | 237 paintInfo.context->restore(); |
237 | 238 |
238 // Paint a partially transparent wash over selected widgets. | 239 // Paint a partially transparent wash over selected widgets. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 CursorDirective RenderWidget::getCursor(const LayoutPoint& point, Cursor& cursor
) const | 316 CursorDirective RenderWidget::getCursor(const LayoutPoint& point, Cursor& cursor
) const |
316 { | 317 { |
317 if (widget() && widget()->isPluginView()) { | 318 if (widget() && widget()->isPluginView()) { |
318 // A plug-in is responsible for setting the cursor when the pointer is o
ver it. | 319 // A plug-in is responsible for setting the cursor when the pointer is o
ver it. |
319 return DoNotSetCursor; | 320 return DoNotSetCursor; |
320 } | 321 } |
321 return RenderReplaced::getCursor(point, cursor); | 322 return RenderReplaced::getCursor(point, cursor); |
322 } | 323 } |
323 | 324 |
324 } // namespace blink | 325 } // namespace blink |
OLD | NEW |