| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 4 * reserved. | 4 * reserved. |
| 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. 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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 | 2218 |
| 2219 void ComputedStyle::setOffsetPath(PassRefPtr<StylePath> path) { | 2219 void ComputedStyle::setOffsetPath(PassRefPtr<StylePath> path) { |
| 2220 m_rareNonInheritedData.access()->m_transform.access()->m_motion.m_path = path; | 2220 m_rareNonInheritedData.access()->m_transform.access()->m_motion.m_path = path; |
| 2221 } | 2221 } |
| 2222 | 2222 |
| 2223 int ComputedStyle::outlineOutsetExtent() const { | 2223 int ComputedStyle::outlineOutsetExtent() const { |
| 2224 if (!hasOutline()) | 2224 if (!hasOutline()) |
| 2225 return 0; | 2225 return 0; |
| 2226 if (outlineStyleIsAuto()) { | 2226 if (outlineStyleIsAuto()) { |
| 2227 return GraphicsContext::focusRingOutsetExtent( | 2227 return GraphicsContext::focusRingOutsetExtent( |
| 2228 outlineOffset(), getOutlineStrokeWidthForFocusRing()); | 2228 outlineOffset(), std::ceil(getOutlineStrokeWidthForFocusRing())); |
| 2229 } | 2229 } |
| 2230 return std::max(0, saturatedAddition(outlineWidth(), outlineOffset())); | 2230 return std::max(0, saturatedAddition(outlineWidth(), outlineOffset())); |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 float ComputedStyle::getOutlineStrokeWidthForFocusRing() const { | 2233 float ComputedStyle::getOutlineStrokeWidthForFocusRing() const { |
| 2234 #if OS(MACOSX) | 2234 #if OS(MACOSX) |
| 2235 return outlineWidth(); | 2235 return outlineWidth(); |
| 2236 #else | 2236 #else |
| 2237 // Draw an outline with thickness in proportion to the zoom level, but never | 2237 // Draw an outline with thickness in proportion to the zoom level, but never |
| 2238 // less than 1 pixel so that it remains visible. | 2238 // less than 1 pixel so that it remains visible. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2400 if (value < 0) | 2400 if (value < 0) |
| 2401 fvalue -= 0.5f; | 2401 fvalue -= 0.5f; |
| 2402 else | 2402 else |
| 2403 fvalue += 0.5f; | 2403 fvalue += 0.5f; |
| 2404 } | 2404 } |
| 2405 | 2405 |
| 2406 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2406 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 } // namespace blink | 2409 } // namespace blink |
| OLD | NEW |