| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 10 * | 10 * |
| (...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 FontCachePurgePreventer fontCachePurgePreventer; | 2153 FontCachePurgePreventer fontCachePurgePreventer; |
| 2154 RefPtr<TextMetrics> metrics = TextMetrics::create(); | 2154 RefPtr<TextMetrics> metrics = TextMetrics::create(); |
| 2155 metrics->setWidth(accessFont().width(TextRun(text))); | 2155 metrics->setWidth(accessFont().width(TextRun(text))); |
| 2156 return metrics.release(); | 2156 return metrics.release(); |
| 2157 } | 2157 } |
| 2158 | 2158 |
| 2159 static void replaceCharacterInString(String& text, WTF::CharacterMatchFunctionPt
r matchFunction, const String& replacement) | 2159 static void replaceCharacterInString(String& text, WTF::CharacterMatchFunctionPt
r matchFunction, const String& replacement) |
| 2160 { | 2160 { |
| 2161 const size_t replacementLength = replacement.length(); | 2161 const size_t replacementLength = replacement.length(); |
| 2162 size_t index = 0; | 2162 size_t index = 0; |
| 2163 while ((index = text.find(matchFunction, index)) != notFound) { | 2163 while ((index = text.find(matchFunction, index)) != kNotFound) { |
| 2164 text.replace(index, 1, replacement); | 2164 text.replace(index, 1, replacement); |
| 2165 index += replacementLength; | 2165 index += replacementLength; |
| 2166 } | 2166 } |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
at y, bool fill, float maxWidth, bool useMaxWidth) | 2169 void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
at y, bool fill, float maxWidth, bool useMaxWidth) |
| 2170 { | 2170 { |
| 2171 GraphicsContext* c = drawingContext(); | 2171 GraphicsContext* c = drawingContext(); |
| 2172 if (!c) | 2172 if (!c) |
| 2173 return; | 2173 return; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2414 const int focusRingWidth = 5; | 2414 const int focusRingWidth = 5; |
| 2415 const int focusRingOutline = 0; | 2415 const int focusRingOutline = 0; |
| 2416 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2416 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
| 2417 | 2417 |
| 2418 c->restore(); | 2418 c->restore(); |
| 2419 | 2419 |
| 2420 didDraw(dirtyRect); | 2420 didDraw(dirtyRect); |
| 2421 } | 2421 } |
| 2422 | 2422 |
| 2423 } // namespace WebCore | 2423 } // namespace WebCore |
| OLD | NEW |