| 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 20 matching lines...) Expand all Loading... |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #include "core/html/canvas/CanvasRenderingContext2D.h" | 34 #include "core/html/canvas/CanvasRenderingContext2D.h" |
| 35 | 35 |
| 36 #include "bindings/core/v8/ExceptionMessages.h" | 36 #include "bindings/core/v8/ExceptionMessages.h" |
| 37 #include "bindings/core/v8/ExceptionState.h" | 37 #include "bindings/core/v8/ExceptionState.h" |
| 38 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 38 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 39 #include "core/CSSPropertyNames.h" | 39 #include "core/CSSPropertyNames.h" |
| 40 #include "core/css/CSSFontSelector.h" | 40 #include "core/css/CSSFontSelector.h" |
| 41 #include "core/css/parser/BisonCSSParser.h" | |
| 42 #include "core/css/StylePropertySet.h" | 41 #include "core/css/StylePropertySet.h" |
| 42 #include "core/css/parser/CSSParser.h" |
| 43 #include "core/css/resolver/StyleResolver.h" | 43 #include "core/css/resolver/StyleResolver.h" |
| 44 #include "core/dom/ExceptionCode.h" | 44 #include "core/dom/ExceptionCode.h" |
| 45 #include "core/dom/StyleEngine.h" | 45 #include "core/dom/StyleEngine.h" |
| 46 #include "core/events/Event.h" | 46 #include "core/events/Event.h" |
| 47 #include "core/fetch/ImageResource.h" | 47 #include "core/fetch/ImageResource.h" |
| 48 #include "core/frame/ImageBitmap.h" | 48 #include "core/frame/ImageBitmap.h" |
| 49 #include "core/html/HTMLCanvasElement.h" | 49 #include "core/html/HTMLCanvasElement.h" |
| 50 #include "core/html/HTMLImageElement.h" | 50 #include "core/html/HTMLImageElement.h" |
| 51 #include "core/html/HTMLMediaElement.h" | 51 #include "core/html/HTMLMediaElement.h" |
| 52 #include "core/html/HTMLVideoElement.h" | 52 #include "core/html/HTMLVideoElement.h" |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 // The style resolution required for rendering text is not available in fram
e-less documents. | 1922 // The style resolution required for rendering text is not available in fram
e-less documents. |
| 1923 if (!canvas()->document().frame()) | 1923 if (!canvas()->document().frame()) |
| 1924 return; | 1924 return; |
| 1925 | 1925 |
| 1926 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); | 1926 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); |
| 1927 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFont
s.end() ? i->value : nullptr; | 1927 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFont
s.end() ? i->value : nullptr; |
| 1928 | 1928 |
| 1929 if (!parsedStyle) { | 1929 if (!parsedStyle) { |
| 1930 parsedStyle = MutableStylePropertySet::create(); | 1930 parsedStyle = MutableStylePropertySet::create(); |
| 1931 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; | 1931 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; |
| 1932 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont,
true, mode, 0); | 1932 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont, true,
mode, 0); |
| 1933 m_fetchedFonts.add(newFont, parsedStyle); | 1933 m_fetchedFonts.add(newFont, parsedStyle); |
| 1934 } | 1934 } |
| 1935 if (parsedStyle->isEmpty()) | 1935 if (parsedStyle->isEmpty()) |
| 1936 return; | 1936 return; |
| 1937 | 1937 |
| 1938 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); | 1938 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); |
| 1939 | 1939 |
| 1940 // According to http://lists.w3.org/Archives/Public/public-html/2009Jul/0947
.html, | 1940 // According to http://lists.w3.org/Archives/Public/public-html/2009Jul/0947
.html, |
| 1941 // the "inherit" and "initial" values must be ignored. | 1941 // the "inherit" and "initial" values must be ignored. |
| 1942 if (fontValue == "inherit" || fontValue == "initial") | 1942 if (fontValue == "inherit" || fontValue == "initial") |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 | 2502 |
| 2503 unsigned CanvasRenderingContext2D::hitRegionsCount() const | 2503 unsigned CanvasRenderingContext2D::hitRegionsCount() const |
| 2504 { | 2504 { |
| 2505 if (m_hitRegionManager) | 2505 if (m_hitRegionManager) |
| 2506 return m_hitRegionManager->getHitRegionsCount(); | 2506 return m_hitRegionManager->getHitRegionsCount(); |
| 2507 | 2507 |
| 2508 return 0; | 2508 return 0; |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 } // namespace blink | 2511 } // namespace blink |
| OLD | NEW |