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 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 if (m_coords.size() >= 6) { | 153 if (m_coords.size() >= 6) { |
154 int numPoints = m_coords.size() / 2; | 154 int numPoints = m_coords.size() / 2; |
155 path.moveTo(FloatPoint(clampCoordinate(m_coords[0]), clampCoordinate
(m_coords[1]))); | 155 path.moveTo(FloatPoint(clampCoordinate(m_coords[0]), clampCoordinate
(m_coords[1]))); |
156 for (int i = 1; i < numPoints; ++i) | 156 for (int i = 1; i < numPoints; ++i) |
157 path.addLineTo(FloatPoint(clampCoordinate(m_coords[i * 2]), clam
pCoordinate(m_coords[i * 2 + 1]))); | 157 path.addLineTo(FloatPoint(clampCoordinate(m_coords[i * 2]), clam
pCoordinate(m_coords[i * 2 + 1]))); |
158 path.closeSubpath(); | 158 path.closeSubpath(); |
159 path.setWindRule(RULE_EVENODD); | 159 path.setWindRule(RULE_EVENODD); |
160 } | 160 } |
161 break; | 161 break; |
162 case Circle: | 162 case Circle: |
163 if (m_coords.size() >= 3) { | 163 if (m_coords.size() >= 3 && m_coords[2].value() > 0) { |
164 float r = clampCoordinate(m_coords[2]); | 164 float r = clampCoordinate(m_coords[2]); |
165 path.addEllipse(FloatRect(clampCoordinate(m_coords[0]) - r, clampCoo
rdinate(m_coords[1]) - r, 2 * r, 2 * r)); | 165 path.addEllipse(FloatRect(clampCoordinate(m_coords[0]) - r, clampCoo
rdinate(m_coords[1]) - r, 2 * r, 2 * r)); |
166 } | 166 } |
167 break; | 167 break; |
168 case Rect: | 168 case Rect: |
169 if (m_coords.size() >= 4) { | 169 if (m_coords.size() >= 4) { |
170 float x0 = clampCoordinate(m_coords[0]); | 170 float x0 = clampCoordinate(m_coords[0]); |
171 float y0 = clampCoordinate(m_coords[1]); | 171 float y0 = clampCoordinate(m_coords[1]); |
172 float x1 = clampCoordinate(m_coords[2]); | 172 float x1 = clampCoordinate(m_coords[2]); |
173 float y1 = clampCoordinate(m_coords[3]); | 173 float y1 = clampCoordinate(m_coords[3]); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void HTMLAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionBe
havior) | 231 void HTMLAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionBe
havior) |
232 { | 232 { |
233 if (!isFocusable()) | 233 if (!isFocusable()) |
234 return; | 234 return; |
235 | 235 |
236 if (HTMLImageElement* imageElement = this->imageElement()) | 236 if (HTMLImageElement* imageElement = this->imageElement()) |
237 imageElement->updateFocusAppearance(selectionBehavior); | 237 imageElement->updateFocusAppearance(selectionBehavior); |
238 } | 238 } |
239 | 239 |
240 } // namespace blink | 240 } // namespace blink |
OLD | NEW |