| 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 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 graphicsContext->drawConvexPolygon(4, quad, antialias); | 1112 graphicsContext->drawConvexPolygon(4, quad, antialias); |
| 1113 graphicsContext->setStrokeStyle(oldStrokeStyle); | 1113 graphicsContext->setStrokeStyle(oldStrokeStyle); |
| 1114 break; | 1114 break; |
| 1115 } | 1115 } |
| 1116 } | 1116 } |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paint
Offset, RenderStyle* style) | 1119 void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paint
Offset, RenderStyle* style) |
| 1120 { | 1120 { |
| 1121 Vector<IntRect> focusRingRects; | 1121 Vector<IntRect> focusRingRects; |
| 1122 addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer); | 1122 addFocusRingRects(focusRingRects, paintOffset, paintInfo.getPaintContainer()
); |
| 1123 if (style->outlineStyleIsAuto()) | 1123 if (style->outlineStyleIsAuto()) |
| 1124 paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(),
style->outlineOffset(), resolveColor(style, CSSPropertyOutlineColor)); | 1124 paintInfo.getContext()->drawFocusRing(focusRingRects, style->outlineWidt
h(), style->outlineOffset(), resolveColor(style, CSSPropertyOutlineColor)); |
| 1125 else | 1125 else |
| 1126 addPDFURLRect(paintInfo.context, unionRect(focusRingRects)); | 1126 addPDFURLRect(paintInfo.getContext(), unionRect(focusRingRects)); |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rec
t) | 1129 void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rec
t) |
| 1130 { | 1130 { |
| 1131 if (rect.isEmpty()) | 1131 if (rect.isEmpty()) |
| 1132 return; | 1132 return; |
| 1133 Node* n = node(); | 1133 Node* n = node(); |
| 1134 if (!n || !n->isLink() || !n->isElementNode()) | 1134 if (!n || !n->isLink() || !n->isElementNode()) |
| 1135 return; | 1135 return; |
| 1136 const AtomicString& href = toElement(n)->getAttribute(hrefAttr); | 1136 const AtomicString& href = toElement(n)->getAttribute(hrefAttr); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 IntRect outer = pixelSnappedIntRect(inner); | 1174 IntRect outer = pixelSnappedIntRect(inner); |
| 1175 outer.inflate(outlineWidth); | 1175 outer.inflate(outlineWidth); |
| 1176 | 1176 |
| 1177 // FIXME: This prevents outlines from painting inside the object. See bug 12
042 | 1177 // FIXME: This prevents outlines from painting inside the object. See bug 12
042 |
| 1178 if (outer.isEmpty()) | 1178 if (outer.isEmpty()) |
| 1179 return; | 1179 return; |
| 1180 | 1180 |
| 1181 EBorderStyle outlineStyle = styleToUse->outlineStyle(); | 1181 EBorderStyle outlineStyle = styleToUse->outlineStyle(); |
| 1182 Color outlineColor = resolveColor(styleToUse, CSSPropertyOutlineColor); | 1182 Color outlineColor = resolveColor(styleToUse, CSSPropertyOutlineColor); |
| 1183 | 1183 |
| 1184 GraphicsContext* graphicsContext = paintInfo.context; | 1184 GraphicsContext* graphicsContext = paintInfo.getContext(); |
| 1185 bool useTransparencyLayer = outlineColor.hasAlpha(); | 1185 bool useTransparencyLayer = outlineColor.hasAlpha(); |
| 1186 if (useTransparencyLayer) { | 1186 if (useTransparencyLayer) { |
| 1187 if (outlineStyle == SOLID) { | 1187 if (outlineStyle == SOLID) { |
| 1188 Path path; | 1188 Path path; |
| 1189 path.addRect(outer); | 1189 path.addRect(outer); |
| 1190 path.addRect(inner); | 1190 path.addRect(inner); |
| 1191 graphicsContext->setFillRule(RULE_EVENODD); | 1191 graphicsContext->setFillRule(RULE_EVENODD); |
| 1192 graphicsContext->setFillColor(outlineColor); | 1192 graphicsContext->setFillColor(outlineColor); |
| 1193 graphicsContext->fillPath(path); | 1193 graphicsContext->fillPath(path); |
| 1194 return; | 1194 return; |
| (...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3311 { | 3311 { |
| 3312 if (object1) { | 3312 if (object1) { |
| 3313 const WebCore::RenderObject* root = object1; | 3313 const WebCore::RenderObject* root = object1; |
| 3314 while (root->parent()) | 3314 while (root->parent()) |
| 3315 root = root->parent(); | 3315 root = root->parent(); |
| 3316 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3316 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3317 } | 3317 } |
| 3318 } | 3318 } |
| 3319 | 3319 |
| 3320 #endif | 3320 #endif |
| OLD | NEW |