| 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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 if (!std::isfinite(x0)) | 1671 if (!std::isfinite(x0)) |
| 1672 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x0, "x0")); | 1672 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x0, "x0")); |
| 1673 else if (!std::isfinite(y0)) | 1673 else if (!std::isfinite(y0)) |
| 1674 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y0, "y0")); | 1674 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y0, "y0")); |
| 1675 else if (!std::isfinite(x1)) | 1675 else if (!std::isfinite(x1)) |
| 1676 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x1, "x1")); | 1676 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x1, "x1")); |
| 1677 else if (!std::isfinite(y1)) | 1677 else if (!std::isfinite(y1)) |
| 1678 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y1, "y1")); | 1678 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y1, "y1")); |
| 1679 | 1679 |
| 1680 if (exceptionState.hadException()) | 1680 if (exceptionState.hadException()) |
| 1681 return 0; | 1681 return nullptr; |
| 1682 | 1682 |
| 1683 RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0),
FloatPoint(x1, y1)); | 1683 RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0),
FloatPoint(x1, y1)); |
| 1684 return gradient.release(); | 1684 return gradient.release(); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createRadialGradient(float
x0, float y0, float r0, float x1, float y1, float r1, ExceptionState& exceptionS
tate) | 1687 PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createRadialGradient(float
x0, float y0, float r0, float x1, float y1, float r1, ExceptionState& exceptionS
tate) |
| 1688 { | 1688 { |
| 1689 if (!std::isfinite(x0)) | 1689 if (!std::isfinite(x0)) |
| 1690 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x0, "x0")); | 1690 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x0, "x0")); |
| 1691 else if (!std::isfinite(y0)) | 1691 else if (!std::isfinite(y0)) |
| 1692 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y0, "y0")); | 1692 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y0, "y0")); |
| 1693 else if (!std::isfinite(r0)) | 1693 else if (!std::isfinite(r0)) |
| 1694 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(r0, "r0")); | 1694 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(r0, "r0")); |
| 1695 else if (!std::isfinite(x1)) | 1695 else if (!std::isfinite(x1)) |
| 1696 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x1, "x1")); | 1696 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(x1, "x1")); |
| 1697 else if (!std::isfinite(y1)) | 1697 else if (!std::isfinite(y1)) |
| 1698 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y1, "y1")); | 1698 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(y1, "y1")); |
| 1699 else if (!std::isfinite(r1)) | 1699 else if (!std::isfinite(r1)) |
| 1700 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(r1, "r1")); | 1700 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(r1, "r1")); |
| 1701 else if (r0 < 0 || r1 < 0) | 1701 else if (r0 < 0 || r1 < 0) |
| 1702 exceptionState.throwDOMException(IndexSizeError, String::format("The %s
provided is less than 0.", r0 < 0 ? "r0" : "r1")); | 1702 exceptionState.throwDOMException(IndexSizeError, String::format("The %s
provided is less than 0.", r0 < 0 ? "r0" : "r1")); |
| 1703 | 1703 |
| 1704 if (exceptionState.hadException()) | 1704 if (exceptionState.hadException()) |
| 1705 return 0; | 1705 return nullptr; |
| 1706 | 1706 |
| 1707 RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0),
r0, FloatPoint(x1, y1), r1); | 1707 RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0),
r0, FloatPoint(x1, y1), r1); |
| 1708 return gradient.release(); | 1708 return gradient.release(); |
| 1709 } | 1709 } |
| 1710 | 1710 |
| 1711 PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLImageEleme
nt* image, | 1711 PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLImageEleme
nt* image, |
| 1712 const String& repetitionType, ExceptionState& exceptionState) | 1712 const String& repetitionType, ExceptionState& exceptionState) |
| 1713 { | 1713 { |
| 1714 if (!image) { | 1714 if (!image) { |
| 1715 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "HTMLImageElement")); | 1715 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "HTMLImageElement")); |
| 1716 return 0; | 1716 return nullptr; |
| 1717 } | 1717 } |
| 1718 bool repeatX, repeatY; | 1718 bool repeatX, repeatY; |
| 1719 CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, excepti
onState); | 1719 CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, excepti
onState); |
| 1720 if (exceptionState.hadException()) | 1720 if (exceptionState.hadException()) |
| 1721 return 0; | 1721 return nullptr; |
| 1722 | 1722 |
| 1723 if (!image->complete()) | 1723 if (!image->complete()) |
| 1724 return 0; | 1724 return nullptr; |
| 1725 | 1725 |
| 1726 ImageResource* cachedImage = image->cachedImage(); | 1726 ImageResource* cachedImage = image->cachedImage(); |
| 1727 Image* imageForRendering = cachedImage ? cachedImage->imageForRenderer(image
->renderer()) : 0; | 1727 Image* imageForRendering = cachedImage ? cachedImage->imageForRenderer(image
->renderer()) : 0; |
| 1728 if (!imageForRendering) | 1728 if (!imageForRendering) |
| 1729 return CanvasPattern::create(Image::nullImage(), repeatX, repeatY, true)
; | 1729 return CanvasPattern::create(Image::nullImage(), repeatX, repeatY, true)
; |
| 1730 | 1730 |
| 1731 // We need to synthesize a container size if a renderer is not available to
provide one. | 1731 // We need to synthesize a container size if a renderer is not available to
provide one. |
| 1732 if (!image->renderer() && imageForRendering->usesContainerSize()) | 1732 if (!image->renderer() && imageForRendering->usesContainerSize()) |
| 1733 imageForRendering->setContainerSize(imageForRendering->size()); | 1733 imageForRendering->setContainerSize(imageForRendering->size()); |
| 1734 | 1734 |
| 1735 bool originClean = cachedImage->isAccessAllowed(canvas()->securityOrigin()); | 1735 bool originClean = cachedImage->isAccessAllowed(canvas()->securityOrigin()); |
| 1736 return CanvasPattern::create(imageForRendering, repeatX, repeatY, originClea
n); | 1736 return CanvasPattern::create(imageForRendering, repeatX, repeatY, originClea
n); |
| 1737 } | 1737 } |
| 1738 | 1738 |
| 1739 PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLCanvasElem
ent* canvas, | 1739 PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLCanvasElem
ent* canvas, |
| 1740 const String& repetitionType, ExceptionState& exceptionState) | 1740 const String& repetitionType, ExceptionState& exceptionState) |
| 1741 { | 1741 { |
| 1742 if (!canvas) | 1742 if (!canvas) |
| 1743 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "HTMLCanvasElement")); | 1743 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "HTMLCanvasElement")); |
| 1744 else if (!canvas->width() || !canvas->height()) | 1744 else if (!canvas->width() || !canvas->height()) |
| 1745 exceptionState.throwDOMException(InvalidStateError, String::format("The
canvas %s is 0.", canvas->width() ? "height" : "width")); | 1745 exceptionState.throwDOMException(InvalidStateError, String::format("The
canvas %s is 0.", canvas->width() ? "height" : "width")); |
| 1746 | 1746 |
| 1747 if (exceptionState.hadException()) | 1747 if (exceptionState.hadException()) |
| 1748 return 0; | 1748 return nullptr; |
| 1749 | 1749 |
| 1750 bool repeatX, repeatY; | 1750 bool repeatX, repeatY; |
| 1751 CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, excepti
onState); | 1751 CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, excepti
onState); |
| 1752 if (exceptionState.hadException()) | 1752 if (exceptionState.hadException()) |
| 1753 return 0; | 1753 return nullptr; |
| 1754 return CanvasPattern::create(canvas->copiedImage(), repeatX, repeatY, canvas
->originClean()); | 1754 return CanvasPattern::create(canvas->copiedImage(), repeatX, repeatY, canvas
->originClean()); |
| 1755 } | 1755 } |
| 1756 | 1756 |
| 1757 bool CanvasRenderingContext2D::computeDirtyRect(const FloatRect& localRect, Floa
tRect* dirtyRect) | 1757 bool CanvasRenderingContext2D::computeDirtyRect(const FloatRect& localRect, Floa
tRect* dirtyRect) |
| 1758 { | 1758 { |
| 1759 FloatRect clipBounds; | 1759 FloatRect clipBounds; |
| 1760 if (!drawingContext()->getTransformedClipBounds(&clipBounds)) | 1760 if (!drawingContext()->getTransformedClipBounds(&clipBounds)) |
| 1761 return false; | 1761 return false; |
| 1762 return computeDirtyRect(localRect, clipBounds, dirtyRect); | 1762 return computeDirtyRect(localRect, clipBounds, dirtyRect); |
| 1763 } | 1763 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 { | 1806 { |
| 1807 return canvas()->drawingContext(); | 1807 return canvas()->drawingContext(); |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 static PassRefPtr<ImageData> createEmptyImageData(const IntSize& size) | 1810 static PassRefPtr<ImageData> createEmptyImageData(const IntSize& size) |
| 1811 { | 1811 { |
| 1812 Checked<int, RecordOverflow> dataSize = 4; | 1812 Checked<int, RecordOverflow> dataSize = 4; |
| 1813 dataSize *= size.width(); | 1813 dataSize *= size.width(); |
| 1814 dataSize *= size.height(); | 1814 dataSize *= size.height(); |
| 1815 if (dataSize.hasOverflowed()) | 1815 if (dataSize.hasOverflowed()) |
| 1816 return 0; | 1816 return nullptr; |
| 1817 | 1817 |
| 1818 RefPtr<ImageData> data = ImageData::create(size); | 1818 RefPtr<ImageData> data = ImageData::create(size); |
| 1819 data->data()->zeroFill(); | 1819 data->data()->zeroFill(); |
| 1820 return data.release(); | 1820 return data.release(); |
| 1821 } | 1821 } |
| 1822 | 1822 |
| 1823 PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(PassRefPtr<Image
Data> imageData, ExceptionState& exceptionState) const | 1823 PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(PassRefPtr<Image
Data> imageData, ExceptionState& exceptionState) const |
| 1824 { | 1824 { |
| 1825 if (!imageData) { | 1825 if (!imageData) { |
| 1826 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "ImageData")); | 1826 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "ImageData")); |
| 1827 return 0; | 1827 return nullptr; |
| 1828 } | 1828 } |
| 1829 | 1829 |
| 1830 return createEmptyImageData(imageData->size()); | 1830 return createEmptyImageData(imageData->size()); |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(float sw, float
sh, ExceptionState& exceptionState) const | 1833 PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(float sw, float
sh, ExceptionState& exceptionState) const |
| 1834 { | 1834 { |
| 1835 if (!sw || !sh) | 1835 if (!sw || !sh) |
| 1836 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s is 0.", sw ? "height" : "width")); | 1836 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s is 0.", sw ? "height" : "width")); |
| 1837 else if (!std::isfinite(sw)) | 1837 else if (!std::isfinite(sw)) |
| 1838 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sw, "source width")); | 1838 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sw, "source width")); |
| 1839 else if (!std::isfinite(sh)) | 1839 else if (!std::isfinite(sh)) |
| 1840 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sh, "source height")); | 1840 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sh, "source height")); |
| 1841 | 1841 |
| 1842 if (exceptionState.hadException()) | 1842 if (exceptionState.hadException()) |
| 1843 return 0; | 1843 return nullptr; |
| 1844 | 1844 |
| 1845 FloatSize logicalSize(fabs(sw), fabs(sh)); | 1845 FloatSize logicalSize(fabs(sw), fabs(sh)); |
| 1846 if (!logicalSize.isExpressibleAsIntSize()) | 1846 if (!logicalSize.isExpressibleAsIntSize()) |
| 1847 return 0; | 1847 return nullptr; |
| 1848 | 1848 |
| 1849 IntSize size = expandedIntSize(logicalSize); | 1849 IntSize size = expandedIntSize(logicalSize); |
| 1850 if (size.width() < 1) | 1850 if (size.width() < 1) |
| 1851 size.setWidth(1); | 1851 size.setWidth(1); |
| 1852 if (size.height() < 1) | 1852 if (size.height() < 1) |
| 1853 size.setHeight(1); | 1853 size.setHeight(1); |
| 1854 | 1854 |
| 1855 return createEmptyImageData(size); | 1855 return createEmptyImageData(size); |
| 1856 } | 1856 } |
| 1857 | 1857 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1869 else if (!std::isfinite(sx)) | 1869 else if (!std::isfinite(sx)) |
| 1870 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sx, "source X")); | 1870 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sx, "source X")); |
| 1871 else if (!std::isfinite(sy)) | 1871 else if (!std::isfinite(sy)) |
| 1872 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sy, "source Y")); | 1872 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sy, "source Y")); |
| 1873 else if (!std::isfinite(sw)) | 1873 else if (!std::isfinite(sw)) |
| 1874 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sw, "source width")); | 1874 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sw, "source width")); |
| 1875 else if (!std::isfinite(sh)) | 1875 else if (!std::isfinite(sh)) |
| 1876 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sh, "source height")); | 1876 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::n
otAFiniteNumber(sh, "source height")); |
| 1877 | 1877 |
| 1878 if (exceptionState.hadException()) | 1878 if (exceptionState.hadException()) |
| 1879 return 0; | 1879 return nullptr; |
| 1880 | 1880 |
| 1881 if (sw < 0) { | 1881 if (sw < 0) { |
| 1882 sx += sw; | 1882 sx += sw; |
| 1883 sw = -sw; | 1883 sw = -sw; |
| 1884 } | 1884 } |
| 1885 if (sh < 0) { | 1885 if (sh < 0) { |
| 1886 sy += sh; | 1886 sy += sh; |
| 1887 sh = -sh; | 1887 sh = -sh; |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 FloatRect logicalRect(sx, sy, sw, sh); | 1890 FloatRect logicalRect(sx, sy, sw, sh); |
| 1891 if (logicalRect.width() < 1) | 1891 if (logicalRect.width() < 1) |
| 1892 logicalRect.setWidth(1); | 1892 logicalRect.setWidth(1); |
| 1893 if (logicalRect.height() < 1) | 1893 if (logicalRect.height() < 1) |
| 1894 logicalRect.setHeight(1); | 1894 logicalRect.setHeight(1); |
| 1895 if (!logicalRect.isExpressibleAsIntRect()) | 1895 if (!logicalRect.isExpressibleAsIntRect()) |
| 1896 return 0; | 1896 return nullptr; |
| 1897 | 1897 |
| 1898 IntRect imageDataRect = enclosingIntRect(logicalRect); | 1898 IntRect imageDataRect = enclosingIntRect(logicalRect); |
| 1899 ImageBuffer* buffer = canvas()->buffer(); | 1899 ImageBuffer* buffer = canvas()->buffer(); |
| 1900 if (!buffer) | 1900 if (!buffer) |
| 1901 return createEmptyImageData(imageDataRect.size()); | 1901 return createEmptyImageData(imageDataRect.size()); |
| 1902 | 1902 |
| 1903 RefPtr<Uint8ClampedArray> byteArray = buffer->getUnmultipliedImageData(image
DataRect); | 1903 RefPtr<Uint8ClampedArray> byteArray = buffer->getUnmultipliedImageData(image
DataRect); |
| 1904 if (!byteArray) | 1904 if (!byteArray) |
| 1905 return 0; | 1905 return nullptr; |
| 1906 | 1906 |
| 1907 return ImageData::create(imageDataRect.size(), byteArray.release()); | 1907 return ImageData::create(imageDataRect.size(), byteArray.release()); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy,
ExceptionState& exceptionState) | 1910 void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy,
ExceptionState& exceptionState) |
| 1911 { | 1911 { |
| 1912 if (!data) { | 1912 if (!data) { |
| 1913 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "ImageData")); | 1913 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "ImageData")); |
| 1914 return; | 1914 return; |
| 1915 } | 1915 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 serializedFont.append(' '); | 2000 serializedFont.append(' '); |
| 2001 serializedFont.append(family); | 2001 serializedFont.append(family); |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 return serializedFont.toString(); | 2004 return serializedFont.toString(); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 void CanvasRenderingContext2D::setFont(const String& newFont) | 2007 void CanvasRenderingContext2D::setFont(const String& newFont) |
| 2008 { | 2008 { |
| 2009 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); | 2009 MutableStylePropertyMap::iterator i = m_fetchedFonts.find(newFont); |
| 2010 RefPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFonts.end() ? i-
>value : 0; | 2010 RefPtr<MutableStylePropertySet> parsedStyle = i != m_fetchedFonts.end() ? i-
>value : nullptr; |
| 2011 | 2011 |
| 2012 if (!parsedStyle) { | 2012 if (!parsedStyle) { |
| 2013 parsedStyle = MutableStylePropertySet::create(); | 2013 parsedStyle = MutableStylePropertySet::create(); |
| 2014 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; | 2014 CSSParserMode mode = m_usesCSSCompatibilityParseMode ? HTMLQuirksMode :
HTMLStandardMode; |
| 2015 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont,
true, mode, 0); | 2015 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont,
true, mode, 0); |
| 2016 m_fetchedFonts.add(newFont, parsedStyle); | 2016 m_fetchedFonts.add(newFont, parsedStyle); |
| 2017 } | 2017 } |
| 2018 if (parsedStyle->isEmpty()) | 2018 if (parsedStyle->isEmpty()) |
| 2019 return; | 2019 return; |
| 2020 | 2020 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2394 const int focusRingWidth = 5; | 2394 const int focusRingWidth = 5; |
| 2395 const int focusRingOutline = 0; | 2395 const int focusRingOutline = 0; |
| 2396 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2396 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
| 2397 | 2397 |
| 2398 c->restore(); | 2398 c->restore(); |
| 2399 | 2399 |
| 2400 didDraw(dirtyRect); | 2400 didDraw(dirtyRect); |
| 2401 } | 2401 } |
| 2402 | 2402 |
| 2403 } // namespace WebCore | 2403 } // namespace WebCore |
| OLD | NEW |