Changeset 48438 in webkit
- Timestamp:
- Sep 16, 2009 2:46:24 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r48437 r48438 1 2009-09-16 Albert J. Wong <ajwong@chromium.org> 2 3 Reviewed by David Levin. 4 5 Reimplement default media UI for Mac Chromium to match the style 6 of the Windows and Linux versions. Also breaks the dependency 7 on the internal wk* functions that were previously used to 8 render the media controller widgets. 9 https://bugs.webkit.org/show_bug.cgi?id=29161 10 11 No media layout tests are currently enabled in Mac Chromium, so 12 nothing needs rebaselineing, etc. 13 14 * css/mediaControlsChromium.css: 15 * rendering/RenderThemeChromiumMac.h: 16 * rendering/RenderThemeChromiumMac.mm: 17 (WebCore::mediaElementParent): 18 (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet): 19 (WebCore::mediaSliderThumbImage): 20 (WebCore::mediaVolumeSliderThumbImage): 21 (WebCore::RenderThemeChromiumMac::paintSliderTrack): 22 (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): 23 (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal): 24 (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): 25 (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): 26 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): 27 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): 28 (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): 29 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): 30 (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): 31 * rendering/RenderThemeChromiumSkia.cpp: 32 (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): 33 1 34 2009-09-16 Yury Semikhatsky <yurys@chromium.org> 2 35 -
trunk/WebCore/css/mediaControlsChromium.css
r47756 r48438 148 148 149 149 border-color: rgba(255, 255, 255, 0.2); 150 border-style: solid; 150 151 border-width: 1px; 151 152 border-radius: 2px; -
trunk/WebCore/rendering/RenderThemeChromiumMac.h
r47108 r48438 45 45 static PassRefPtr<RenderTheme> create(); 46 46 47 #if ENABLE(VIDEO) 48 virtual String extraMediaControlsStyleSheet(); 49 #endif 50 47 51 // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline 48 52 // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of … … 134 138 virtual bool paintSearchFieldResultsButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 135 139 136 virtual bool paintMediaFullscreenButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);137 140 virtual bool paintMediaPlayButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 138 141 virtual bool paintMediaMuteButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 139 virtual bool paintMediaSeekBackButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);140 virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);141 142 virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 142 143 virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 144 virtual bool paintMediaVolumeSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 145 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 146 virtual bool paintMediaControlsBackground(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); 143 147 144 148 private: … … 215 219 216 220 RetainPtr<WebCoreRenderThemeNotificationObserver> m_notificationObserver; 221 bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*); 217 222 }; 218 223 -
trunk/WebCore/rendering/RenderThemeChromiumMac.mm
r48268 r48438 40 40 #import "FoundationExtras.h" 41 41 #import "FrameView.h" 42 #import "Gradient.h" 42 43 #import "GraphicsContext.h" 43 44 #import "HTMLInputElement.h" … … 52 53 #import "SharedBuffer.h" 53 54 #import "TimeRanges.h" 55 #import "UserAgentStyleSheets.h" 54 56 #import "WebCoreSystemInterface.h" 55 57 #import <wtf/RetainPtr.h> … … 112 114 }; 113 115 116 #if ENABLE(VIDEO) 117 // Attempt to retrieve a HTMLMediaElement from a Node. Returns 0 if one cannot be found. 118 static HTMLMediaElement* mediaElementParent(Node* node) 119 { 120 if (!node) 121 return 0; 122 Node* mediaNode = node->shadowAncestorNode(); 123 if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag))) 124 return 0; 125 126 return static_cast<HTMLMediaElement*>(mediaNode); 127 } 128 #endif 129 114 130 // In our Mac port, we don't define PLATFORM(MAC) and thus don't pick up the 115 131 // |operator NSRect()| on WebCore::IntRect and FloatRect. This substitues for … … 134 150 return adoptRef(new RenderThemeChromiumMac); 135 151 } 152 153 #if ENABLE(VIDEO) 154 String RenderThemeChromiumMac::extraMediaControlsStyleSheet() 155 { 156 return String(mediaControlsChromiumUserAgentStyleSheet, sizeof(mediaControlsChromiumUserAgentStyleSheet)); 157 } 158 #endif 136 159 137 160 PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page) … … 1456 1479 } 1457 1480 1458 static const int trackWidth = 5; 1459 static const int trackRadius = 2; 1460 1481 static Image* mediaSliderThumbImage() 1482 { 1483 static Image* mediaSliderThumb = Image::loadPlatformResource("mediaSliderThumb").releaseRef(); 1484 return mediaSliderThumb; 1485 } 1486 1487 static Image* mediaVolumeSliderThumbImage() 1488 { 1489 static Image* mediaVolumeSliderThumb = Image::loadPlatformResource("mediaVolumeSliderThumb").releaseRef(); 1490 return mediaVolumeSliderThumb; 1491 } 1492 1461 1493 void RenderThemeChromiumMac::adjustSliderTrackStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const 1462 1494 { … … 1466 1498 bool RenderThemeChromiumMac::paintSliderTrack(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1467 1499 { 1500 static const int trackWidth = 5; 1501 static const int trackRadius = 2; 1502 1468 1503 IntRect bounds = r; 1469 1504 float zoomLevel = o->style()->effectiveZoom(); … … 1573 1608 const int sliderThumbWidth = 15; 1574 1609 const int sliderThumbHeight = 15; 1575 const int mediaSliderThumbWidth = 13;1576 const int mediaSliderThumbHeight = 14;1577 1610 1578 1611 void RenderThemeChromiumMac::adjustSliderThumbSize(RenderObject* o) const … … 1582 1615 o->style()->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), Fixed)); 1583 1616 o->style()->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed)); 1584 } else if (o->style()->appearance() == MediaSliderThumbPart) { 1585 o->style()->setWidth(Length(mediaSliderThumbWidth, Fixed)); 1586 o->style()->setHeight(Length(mediaSliderThumbHeight, Fixed)); 1587 } 1617 } 1618 1619 #if ENABLE(VIDEO) 1620 Image* thumbImage = 0; 1621 if (o->style()->appearance() == MediaSliderThumbPart) 1622 thumbImage = mediaSliderThumbImage(); 1623 else if (o->style()->appearance() == MediaVolumeSliderThumbPart) 1624 thumbImage = mediaVolumeSliderThumbImage(); 1625 1626 if (thumbImage) { 1627 o->style()->setWidth(Length(thumbImage->width(), Fixed)); 1628 o->style()->setHeight(Length(thumbImage->height(), Fixed)); 1629 } 1630 #endif 1588 1631 } 1589 1632 … … 1827 1870 } 1828 1871 1872 bool RenderThemeChromiumMac::paintMediaButtonInternal(GraphicsContext* context, const IntRect& rect, Image* image) 1873 { 1874 // Create a destination rectangle for the image that is centered in the drawing rectangle, rounded left, and down. 1875 IntRect imageRect = image->rect(); 1876 imageRect.setY(rect.y() + (rect.height() - image->height() + 1) / 2); 1877 imageRect.setX(rect.x() + (rect.width() - image->width() + 1) / 2); 1878 1879 context->drawImage(image, imageRect); 1880 return true; 1881 } 1882 1883 bool RenderThemeChromiumMac::paintMediaPlayButton(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 1884 { 1829 1885 #if ENABLE(VIDEO) 1830 // FIXME: This enum is lifted from RenderThemeMac.mm We need to decide which theme to use for the default controls, or decide to avoid wkDrawMediaUIPart and render our own. 1831 typedef enum { 1832 MediaControllerThemeClassic = 1, 1833 MediaControllerThemeQT = 2 1834 } MediaControllerThemeStyle; 1835 1836 enum WKMediaControllerThemeState { 1837 MediaUIPartDisabledFlag = 1 << 0, 1838 MediaUIPartPressedFlag = 1 << 1, 1839 MediaUIPartDrawEndCapsFlag = 1 << 3, 1840 }; 1841 #endif 1842 1843 bool RenderThemeChromiumMac::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1844 { 1845 #if ENABLE(VIDEO) 1846 Node* node = o->node(); 1847 if (!node) 1848 return false; 1849 1850 LocalCurrentGraphicsContext localContext(paintInfo.context); 1851 wkDrawMediaUIPart(MediaFullscreenButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1852 node->active() ? MediaUIPartPressedFlag : 0); 1853 #endif 1854 return false; 1855 } 1856 1857 bool RenderThemeChromiumMac::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1858 { 1859 #if ENABLE(VIDEO) 1860 Node* node = o->node(); 1861 Node* mediaNode = node ? node->shadowAncestorNode() : 0; 1862 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag))) 1863 return false; 1864 1865 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode); 1886 HTMLMediaElement* mediaElement = mediaElementParent(object->node()); 1866 1887 if (!mediaElement) 1867 1888 return false; 1868 1869 LocalCurrentGraphicsContext localContext(paintInfo.context); 1870 wkDrawMediaUIPart(mediaElement->muted() ? MediaUnMuteButton : MediaMuteButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1871 node->active() ? MediaUIPartPressedFlag : 0); 1889 1890 static Image* mediaPlay = Image::loadPlatformResource("mediaPlay").releaseRef(); 1891 static Image* mediaPause = Image::loadPlatformResource("mediaPause").releaseRef(); 1892 static Image* mediaPlayDisabled = Image::loadPlatformResource("mediaPlayDisabled").releaseRef(); 1893 1894 if (mediaElement->networkState() == HTMLMediaElement::NETWORK_NO_SOURCE) 1895 return paintMediaButtonInternal(paintInfo.context, rect, mediaPlayDisabled); 1896 1897 return paintMediaButtonInternal(paintInfo.context, rect, mediaElement->paused() ? mediaPlay : mediaPause); 1898 #else 1899 UNUSED_PARAM(object); 1900 UNUSED_PARAM(paintInfo); 1901 UNUSED_PARAM(rect); 1902 return false; 1872 1903 #endif 1873 return false; 1874 } 1875 1876 bool RenderThemeChromiumMac::paintMediaPlayButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1904 } 1905 1906 bool RenderThemeChromiumMac::paintMediaMuteButton(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 1877 1907 { 1878 1908 #if ENABLE(VIDEO) 1879 Node* node = o->node(); 1880 Node* mediaNode = node ? node->shadowAncestorNode() : 0; 1881 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag))) 1882 return false; 1883 1884 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode); 1909 HTMLMediaElement* mediaElement = mediaElementParent(object->node()); 1885 1910 if (!mediaElement) 1886 1911 return false; 1887 1912 1888 LocalCurrentGraphicsContext localContext(paintInfo.context); 1889 wkDrawMediaUIPart(mediaElement->canPlay() ? MediaPlayButton : MediaPauseButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1890 node->active() ? MediaUIPartPressedFlag : 0); 1913 static Image* soundFull = Image::loadPlatformResource("mediaSoundFull").releaseRef(); 1914 static Image* soundNone = Image::loadPlatformResource("mediaSoundNone").releaseRef(); 1915 static Image* soundDisabled = Image::loadPlatformResource("mediaSoundDisabled").releaseRef(); 1916 1917 if (mediaElement->networkState() == HTMLMediaElement::NETWORK_NO_SOURCE || !mediaElement->hasAudio()) 1918 return paintMediaButtonInternal(paintInfo.context, rect, soundDisabled); 1919 1920 return paintMediaButtonInternal(paintInfo.context, rect, mediaElement->muted() ? soundNone : soundFull); 1921 #else 1922 UNUSED_PARAM(object); 1923 UNUSED_PARAM(paintInfo); 1924 UNUSED_PARAM(rect); 1925 return false; 1891 1926 #endif 1892 return false; 1893 } 1894 1895 bool RenderThemeChromiumMac::paintMediaSeekBackButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1927 } 1928 1929 bool RenderThemeChromiumMac::paintMediaSliderTrack(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 1896 1930 { 1897 1931 #if ENABLE(VIDEO) 1898 Node* node = o->node(); 1899 if (!node) 1900 return false; 1901 1902 LocalCurrentGraphicsContext localContext(paintInfo.context); 1903 wkDrawMediaUIPart(MediaSeekBackButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1904 node->active() ? MediaUIPartPressedFlag : 0); 1905 #endif 1906 return false; 1907 } 1908 1909 bool RenderThemeChromiumMac::paintMediaSeekForwardButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1910 { 1911 #if ENABLE(VIDEO) 1912 Node* node = o->node(); 1913 if (!node) 1914 return false; 1915 1916 LocalCurrentGraphicsContext localContext(paintInfo.context); 1917 wkDrawMediaUIPart(MediaSeekForwardButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1918 node->active() ? MediaUIPartPressedFlag : 0); 1919 #endif 1920 return false; 1921 } 1922 1923 bool RenderThemeChromiumMac::paintMediaSliderTrack(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 1924 { 1925 #if ENABLE(VIDEO) 1926 Node* node = o->node(); 1927 Node* mediaNode = node ? node->shadowAncestorNode() : 0; 1928 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag))) 1929 return false; 1930 1931 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode); 1932 HTMLMediaElement* mediaElement = mediaElementParent(object->node()); 1932 1933 if (!mediaElement) 1933 1934 return false; 1934 1935 1935 RefPtr<TimeRanges> timeRanges = mediaElement->buffered(); 1936 ExceptionCode ignoredException; 1937 float timeLoaded = timeRanges->length() ? timeRanges->end(0, ignoredException) : 0; 1938 float currentTime = mediaElement->currentTime(); 1939 float duration = mediaElement->duration(); 1940 if (isnan(duration)) 1941 duration = 0; 1942 1943 bool shouldDrawEndCaps = !toRenderMedia(mediaElement->renderer())->shouldShowTimeDisplayControls(); 1944 wkDrawMediaSliderTrack(MediaControllerThemeClassic, paintInfo.context->platformContext(), r, timeLoaded, currentTime, duration, shouldDrawEndCaps ? MediaUIPartDrawEndCapsFlag : 0); 1936 RenderStyle* style = object->style(); 1937 GraphicsContext* context = paintInfo.context; 1938 context->save(); 1939 1940 context->setShouldAntialias(true); 1941 1942 IntSize topLeftRadius = style->borderTopLeftRadius(); 1943 IntSize topRightRadius = style->borderTopRightRadius(); 1944 IntSize bottomLeftRadius = style->borderBottomLeftRadius(); 1945 IntSize bottomRightRadius = style->borderBottomRightRadius(); 1946 float borderWidth = style->borderLeftWidth(); 1947 1948 // Draw the border of the time bar. 1949 context->setStrokeColor(style->borderLeftColor()); 1950 context->setStrokeThickness(borderWidth); 1951 context->setFillColor(style->backgroundColor()); 1952 context->addPath(Path::createRoundedRectangle(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius)); 1953 context->drawPath(); 1954 1955 // Draw the buffered ranges. 1956 // FIXME: Draw multiple ranges if there are multiple buffered ranges. 1957 FloatRect bufferedRect = rect; 1958 bufferedRect.inflate(-1.0 - borderWidth); 1959 bufferedRect.setWidth(bufferedRect.width() * mediaElement->percentLoaded()); 1960 bufferedRect = context->roundToDevicePixels(bufferedRect); 1961 1962 // Don't bother drawing an empty area. 1963 if (bufferedRect.width() > 0 && bufferedRect.height() > 0) { 1964 FloatPoint sliderTopLeft = bufferedRect.location(); 1965 FloatPoint sliderTopRight = sliderTopLeft; 1966 p1.move(0.0f, bufferedRect.height()); 1967 1968 RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderTopRight); 1969 Color startColor = object->style()->color(); 1970 gradient->addColorStop(0.0, startColor); 1971 gradient->addColorStop(1.0, Color(startColor.red() / 2, startColor.green() / 2, startColor.blue() / 2, startColor.alpha())); 1972 1973 context->setFillGradient(gradient); 1974 context->addPath(Path::createRoundedRectangle(bufferedRect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius)); 1975 context->fillPath(); 1976 } 1977 1978 context->restore(); 1979 return true; 1980 #else 1981 UNUSED_PARAM(object); 1982 UNUSED_PARAM(paintInfo); 1983 UNUSED_PARAM(rect); 1984 return false; 1945 1985 #endif 1986 } 1987 1988 bool RenderThemeChromiumMac::paintMediaVolumeSliderTrack(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 1989 { 1990 #if ENABLE(VIDEO) 1991 HTMLMediaElement* mediaElement = mediaElementParent(object->node()); 1992 if (!mediaElement) 1993 return false; 1994 1995 GraphicsContext* context = paintInfo.context; 1996 Color originalColor = context->strokeColor(); 1997 if (originalColor != Color::white) 1998 context->setStrokeColor(Color::white); 1999 2000 int x = rect.x() + rect.width() / 2; 2001 context->drawLine(IntPoint(x, rect.y()), IntPoint(x, rect.y() + rect.height())); 2002 2003 if (originalColor != Color::white) 2004 context->setStrokeColor(originalColor); 2005 return true; 2006 #else 2007 UNUSED_PARAM(object); 2008 UNUSED_PARAM(paintInfo); 2009 UNUSED_PARAM(rect); 1946 2010 return false; 1947 } 1948 1949 bool RenderThemeChromiumMac::paintMediaSliderThumb(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) 2011 #endif 2012 } 2013 2014 bool RenderThemeChromiumMac::paintMediaSliderThumb(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 1950 2015 { 1951 2016 #if ENABLE(VIDEO) 1952 Node* node = o->node(); 1953 if (!node) 2017 if (!object->parent()->isSlider()) 1954 2018 return false; 1955 2019 1956 LocalCurrentGraphicsContext localContext(paintInfo.context); 1957 wkDrawMediaUIPart(MediaSliderThumb, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, 1958 node->active() ? MediaUIPartPressedFlag : 0); 2020 return paintMediaButtonInternal(paintInfo.context, rect, mediaSliderThumbImage()); 2021 #else 2022 UNUSED_PARAM(object); 2023 UNUSED_PARAM(paintInfo); 2024 UNUSED_PARAM(rect); 2025 return false; 1959 2026 #endif 2027 } 2028 2029 bool RenderThemeChromiumMac::paintMediaVolumeSliderThumb(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 2030 { 2031 #if ENABLE(VIDEO) 2032 if (!object->parent()->isSlider()) 2033 return false; 2034 2035 return paintMediaButtonInternal(paintInfo.context, rect, mediaVolumeSliderThumbImage()); 2036 #else 2037 UNUSED_PARAM(object); 2038 UNUSED_PARAM(paintInfo); 2039 UNUSED_PARAM(rect); 1960 2040 return false; 2041 #endif 2042 } 2043 2044 bool RenderThemeChromiumMac::paintMediaControlsBackground(RenderObject* object, const RenderObject::PaintInfo& paintInfo, const IntRect& rect) 2045 { 2046 #if ENABLE(VIDEO) 2047 HTMLMediaElement* mediaElement = mediaElementParent(object->node()); 2048 if (!mediaElement) 2049 return false; 2050 2051 if (!rect.isEmpty()) 2052 { 2053 GraphicsContext* context = paintInfo.context; 2054 Color originalColor = context->strokeColor(); 2055 2056 // Draws the left border, it is always 1px wide. 2057 context->setStrokeColor(object->style()->borderLeftColor()); 2058 context->drawLine(IntPoint(rect.x() + 1, rect.y()), 2059 IntPoint(rect.x() + 1, rect.y() + rect.height())); 2060 2061 2062 // Draws the right border, it is always 1px wide. 2063 context->setStrokeColor(object->style()->borderRightColor()); 2064 context->drawLine(IntPoint(rect.x() + rect.width() - 1, rect.y()), 2065 IntPoint(rect.x() + rect.width() - 1, rect.y() + rect.height())); 2066 2067 context->setStrokeColor(originalColor); 2068 } 2069 return true; 2070 #else 2071 UNUSED_PARAM(object); 2072 UNUSED_PARAM(paintInfo); 2073 UNUSED_PARAM(rect); 2074 return false; 2075 #endif 1961 2076 } 1962 2077 -
trunk/WebCore/rendering/RenderThemeChromiumSkia.cpp
r48267 r48438 641 641 thumbImage = mediaVolumeSliderThumbImage(); 642 642 643 ASSERT(thumbImage); 644 object->style()->setWidth(Length(thumbImage->width(), Fixed)); 645 object->style()->setHeight(Length(thumbImage->height(), Fixed)); 643 if (thumbImage) { 644 object->style()->setWidth(Length(thumbImage->width(), Fixed)); 645 object->style()->setHeight(Length(thumbImage->height(), Fixed)); 646 } 646 647 #else 647 648 UNUSED_PARAM(object);
Note: See TracChangeset
for help on using the changeset viewer.