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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 return serializedFont.toString(); | 1862 return serializedFont.toString(); |
1863 } | 1863 } |
1864 | 1864 |
1865 void CanvasRenderingContext2D::setFont(const String& newFont) | 1865 void CanvasRenderingContext2D::setFont(const String& newFont) |
1866 { | 1866 { |
1867 // The style resolution required for rendering text is not available in fram
e-less documents. | 1867 // The style resolution required for rendering text is not available in fram
e-less documents. |
1868 if (!canvas()->document().frame()) | 1868 if (!canvas()->document().frame()) |
1869 return; | 1869 return; |
1870 | 1870 |
1871 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); | 1871 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); |
1872 RefPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFonts.end() ? i-
>value : nullptr; | 1872 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFont
s.end() ? i->value : nullptr; |
1873 | 1873 |
1874 if (!parsedStyle) { | 1874 if (!parsedStyle) { |
1875 parsedStyle = MutableStylePropertySet::create(); | 1875 parsedStyle = MutableStylePropertySet::create(); |
1876 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; | 1876 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; |
1877 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont,
true, mode, 0); | 1877 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont,
true, mode, 0); |
1878 m_fetchedFonts.add(newFont, parsedStyle); | 1878 m_fetchedFonts.add(newFont, parsedStyle); |
1879 } | 1879 } |
1880 if (parsedStyle->isEmpty()) | 1880 if (parsedStyle->isEmpty()) |
1881 return; | 1881 return; |
1882 | 1882 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2297 const int focusRingWidth = 5; | 2297 const int focusRingWidth = 5; |
2298 const int focusRingOutline = 0; | 2298 const int focusRingOutline = 0; |
2299 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2299 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
2300 | 2300 |
2301 c->restore(); | 2301 c->restore(); |
2302 | 2302 |
2303 didDraw(dirtyRect); | 2303 didDraw(dirtyRect); |
2304 } | 2304 } |
2305 | 2305 |
2306 } // namespace WebCore | 2306 } // namespace WebCore |
OLD | NEW |