| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 bounds.setY(r.y() + r.height() / 2 - zoomedTrackWidth / 2); | 1364 bounds.setY(r.y() + r.height() / 2 - zoomedTrackWidth / 2); |
| 1365 } else if (o->style()->appearance() == SliderVerticalPart) { | 1365 } else if (o->style()->appearance() == SliderVerticalPart) { |
| 1366 bounds.setWidth(zoomedTrackWidth); | 1366 bounds.setWidth(zoomedTrackWidth); |
| 1367 bounds.setX(r.x() + r.width() / 2 - zoomedTrackWidth / 2); | 1367 bounds.setX(r.x() + r.width() / 2 - zoomedTrackWidth / 2); |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 LocalCurrentGraphicsContext localContext(paintInfo.context); | 1370 LocalCurrentGraphicsContext localContext(paintInfo.context); |
| 1371 CGContextRef context = localContext.cgContext(); | 1371 CGContextRef context = localContext.cgContext(); |
| 1372 CGColorSpaceRef cspace = deviceRGBColorSpaceRef(); | 1372 CGColorSpaceRef cspace = deviceRGBColorSpaceRef(); |
| 1373 | 1373 |
| 1374 #if ENABLE(DATALIST_ELEMENT) | |
| 1375 paintSliderTicks(o, paintInfo, r); | 1374 paintSliderTicks(o, paintInfo, r); |
| 1376 #endif | |
| 1377 | 1375 |
| 1378 GraphicsContextStateSaver stateSaver(*paintInfo.context); | 1376 GraphicsContextStateSaver stateSaver(*paintInfo.context); |
| 1379 CGContextClipToRect(context, bounds); | 1377 CGContextClipToRect(context, bounds); |
| 1380 | 1378 |
| 1381 struct CGFunctionCallbacks mainCallbacks = { 0, TrackGradientInterpolate, NU
LL }; | 1379 struct CGFunctionCallbacks mainCallbacks = { 0, TrackGradientInterpolate, NU
LL }; |
| 1382 RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NUL
L, 4, NULL, &mainCallbacks)); | 1380 RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NUL
L, 4, NULL, &mainCallbacks)); |
| 1383 RetainPtr<CGShadingRef> mainShading; | 1381 RetainPtr<CGShadingRef> mainShading; |
| 1384 if (o->style()->appearance() == SliderVerticalPart) | 1382 if (o->style()->appearance() == SliderVerticalPart) |
| 1385 mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),
bounds.maxY()), CGPointMake(bounds.maxX(), bounds.maxY()), mainFunction.get(),
false, false)); | 1383 mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),
bounds.maxY()), CGPointMake(bounds.maxX(), bounds.maxY()), mainFunction.get(),
false, false)); |
| 1386 else | 1384 else |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel)); | 1707 paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel)); |
| 1710 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y()); | 1708 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y()); |
| 1711 } | 1709 } |
| 1712 | 1710 |
| 1713 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:documentViewFor
(o)]; | 1711 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:documentViewFor
(o)]; |
| 1714 [[search searchButtonCell] setControlView:nil]; | 1712 [[search searchButtonCell] setControlView:nil]; |
| 1715 | 1713 |
| 1716 return false; | 1714 return false; |
| 1717 } | 1715 } |
| 1718 | 1716 |
| 1719 #if ENABLE(DATALIST_ELEMENT) | |
| 1720 IntSize RenderThemeChromiumMac::sliderTickSize() const | 1717 IntSize RenderThemeChromiumMac::sliderTickSize() const |
| 1721 { | 1718 { |
| 1722 return IntSize(1, 3); | 1719 return IntSize(1, 3); |
| 1723 } | 1720 } |
| 1724 | 1721 |
| 1725 int RenderThemeChromiumMac::sliderTickOffsetFromTrackCenter() const | 1722 int RenderThemeChromiumMac::sliderTickOffsetFromTrackCenter() const |
| 1726 { | 1723 { |
| 1727 return -9; | 1724 return -9; |
| 1728 } | 1725 } |
| 1729 #endif | |
| 1730 | 1726 |
| 1731 const int sliderThumbWidth = 15; | 1727 const int sliderThumbWidth = 15; |
| 1732 const int sliderThumbHeight = 15; | 1728 const int sliderThumbHeight = 15; |
| 1733 | 1729 |
| 1734 void RenderThemeChromiumMac::adjustSliderThumbSize(RenderStyle* style, Element*)
const | 1730 void RenderThemeChromiumMac::adjustSliderThumbSize(RenderStyle* style, Element*)
const |
| 1735 { | 1731 { |
| 1736 float zoomLevel = style->effectiveZoom(); | 1732 float zoomLevel = style->effectiveZoom(); |
| 1737 if (style->appearance() == SliderThumbHorizontalPart || style->appearance()
== SliderThumbVerticalPart) { | 1733 if (style->appearance() == SliderThumbHorizontalPart || style->appearance()
== SliderThumbVerticalPart) { |
| 1738 style->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), F
ixed)); | 1734 style->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), F
ixed)); |
| 1739 style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel),
Fixed)); | 1735 style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel),
Fixed)); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 // FIXME: Chromium may wish to style its default media controls differently
in fullscreen. | 1917 // FIXME: Chromium may wish to style its default media controls differently
in fullscreen. |
| 1922 return String(); | 1918 return String(); |
| 1923 } | 1919 } |
| 1924 | 1920 |
| 1925 String RenderThemeChromiumMac::extraDefaultStyleSheet() | 1921 String RenderThemeChromiumMac::extraDefaultStyleSheet() |
| 1926 { | 1922 { |
| 1927 return RenderTheme::extraDefaultStyleSheet() + | 1923 return RenderTheme::extraDefaultStyleSheet() + |
| 1928 String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgen
tStyleSheet)); | 1924 String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgen
tStyleSheet)); |
| 1929 } | 1925 } |
| 1930 | 1926 |
| 1931 #if ENABLE(DATALIST_ELEMENT) | |
| 1932 LayoutUnit RenderThemeChromiumMac::sliderTickSnappingThreshold() const | 1927 LayoutUnit RenderThemeChromiumMac::sliderTickSnappingThreshold() const |
| 1933 { | 1928 { |
| 1934 return RenderThemeChromiumCommon::sliderTickSnappingThreshold(); | 1929 return RenderThemeChromiumCommon::sliderTickSnappingThreshold(); |
| 1935 } | 1930 } |
| 1936 #endif | |
| 1937 | 1931 |
| 1938 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER) | 1932 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER) |
| 1939 bool RenderThemeChromiumMac::supportsCalendarPicker(const AtomicString& type) co
nst | 1933 bool RenderThemeChromiumMac::supportsCalendarPicker(const AtomicString& type) co
nst |
| 1940 { | 1934 { |
| 1941 return RenderThemeChromiumCommon::supportsCalendarPicker(type); | 1935 return RenderThemeChromiumCommon::supportsCalendarPicker(type); |
| 1942 } | 1936 } |
| 1943 #endif | 1937 #endif |
| 1944 | 1938 |
| 1945 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* objec
t, const PaintInfo& paintInfo, const IntRect& rect) | 1939 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* objec
t, const PaintInfo& paintInfo, const IntRect& rect) |
| 1946 { | 1940 { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1976 { | 1970 { |
| 1977 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); | 1971 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); |
| 1978 } | 1972 } |
| 1979 | 1973 |
| 1980 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) | 1974 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) |
| 1981 { | 1975 { |
| 1982 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, object, paintInfo, rect); | 1976 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, object, paintInfo, rect); |
| 1983 } | 1977 } |
| 1984 | 1978 |
| 1985 } // namespace WebCore | 1979 } // namespace WebCore |
| OLD | NEW |