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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #import "core/platform/graphics/StringTruncator.h" | 45 #import "core/platform/graphics/StringTruncator.h" |
46 #import "core/platform/graphics/cg/GraphicsContextCG.h" | 46 #import "core/platform/graphics/cg/GraphicsContextCG.h" |
47 #import "core/platform/graphics/mac/ColorMac.h" | 47 #import "core/platform/graphics/mac/ColorMac.h" |
48 #import "core/platform/mac/LocalCurrentGraphicsContext.h" | 48 #import "core/platform/mac/LocalCurrentGraphicsContext.h" |
49 #import "core/platform/mac/ThemeMac.h" | 49 #import "core/platform/mac/ThemeMac.h" |
50 #import "core/platform/mac/WebCoreNSCellExtras.h" | 50 #import "core/platform/mac/WebCoreNSCellExtras.h" |
51 #import "core/platform/text/PlatformLocale.h" | 51 #import "core/platform/text/PlatformLocale.h" |
52 #import "core/rendering/PaintInfo.h" | 52 #import "core/rendering/PaintInfo.h" |
53 #import "core/rendering/RenderLayer.h" | 53 #import "core/rendering/RenderLayer.h" |
54 #import "core/rendering/RenderMedia.h" | 54 #import "core/rendering/RenderMedia.h" |
55 #import "core/rendering/RenderMediaControlsChromium.h" | 55 #import "core/rendering/RenderMediaControls.h" |
56 #import "core/rendering/RenderMeter.h" | 56 #import "core/rendering/RenderMeter.h" |
57 #import "core/rendering/RenderProgress.h" | 57 #import "core/rendering/RenderProgress.h" |
58 #import "core/rendering/RenderSlider.h" | 58 #import "core/rendering/RenderSlider.h" |
59 #import "core/rendering/RenderView.h" | 59 #import "core/rendering/RenderView.h" |
60 | 60 |
61 #import <AvailabilityMacros.h> | 61 #import <AvailabilityMacros.h> |
62 #import <Carbon/Carbon.h> | 62 #import <Carbon/Carbon.h> |
63 #import <Cocoa/Cocoa.h> | 63 #import <Cocoa/Cocoa.h> |
64 #import <math.h> | 64 #import <math.h> |
65 #import <wtf/RetainPtr.h> | 65 #import <wtf/RetainPtr.h> |
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1939 [cell setControlTint:tint]; | 1939 [cell setControlTint:tint]; |
1940 } | 1940 } |
1941 | 1941 |
1942 bool RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused() const | 1942 bool RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused() const |
1943 { | 1943 { |
1944 return true; | 1944 return true; |
1945 } | 1945 } |
1946 | 1946 |
1947 void RenderThemeChromiumMac::adjustMediaSliderThumbSize(RenderStyle* style) cons
t | 1947 void RenderThemeChromiumMac::adjustMediaSliderThumbSize(RenderStyle* style) cons
t |
1948 { | 1948 { |
1949 RenderMediaControlsChromium::adjustMediaSliderThumbSize(style); | 1949 RenderMediaControls::adjustMediaSliderThumbSize(style); |
1950 } | 1950 } |
1951 | 1951 |
1952 bool RenderThemeChromiumMac::paintMediaPlayButton(RenderObject* object, const Pa
intInfo& paintInfo, const IntRect& rect) | 1952 bool RenderThemeChromiumMac::paintMediaPlayButton(RenderObject* object, const Pa
intInfo& paintInfo, const IntRect& rect) |
1953 { | 1953 { |
1954 return RenderMediaControlsChromium::paintMediaControlsPart(MediaPlayButton,
object, paintInfo, rect); | 1954 return RenderMediaControls::paintMediaControlsPart(MediaPlayButton, object,
paintInfo, rect); |
1955 } | 1955 } |
1956 | 1956 |
1957 bool RenderThemeChromiumMac::paintMediaMuteButton(RenderObject* object, const Pa
intInfo& paintInfo, const IntRect& rect) | 1957 bool RenderThemeChromiumMac::paintMediaMuteButton(RenderObject* object, const Pa
intInfo& paintInfo, const IntRect& rect) |
1958 { | 1958 { |
1959 return RenderMediaControlsChromium::paintMediaControlsPart(MediaMuteButton,
object, paintInfo, rect); | 1959 return RenderMediaControls::paintMediaControlsPart(MediaMuteButton, object,
paintInfo, rect); |
1960 } | 1960 } |
1961 | 1961 |
1962 bool RenderThemeChromiumMac::paintMediaSliderTrack(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) | 1962 bool RenderThemeChromiumMac::paintMediaSliderTrack(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) |
1963 { | 1963 { |
1964 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSlider, obje
ct, paintInfo, rect); | 1964 return RenderMediaControls::paintMediaControlsPart(MediaSlider, object, pain
tInfo, rect); |
1965 } | 1965 } |
1966 | 1966 |
1967 String RenderThemeChromiumMac::extraFullScreenStyleSheet() | 1967 String RenderThemeChromiumMac::extraFullScreenStyleSheet() |
1968 { | 1968 { |
1969 // FIXME: Chromium may wish to style its default media controls differently
in fullscreen. | 1969 // FIXME: Chromium may wish to style its default media controls differently
in fullscreen. |
1970 return String(); | 1970 return String(); |
1971 } | 1971 } |
1972 | 1972 |
1973 String RenderThemeChromiumMac::extraDefaultStyleSheet() | 1973 String RenderThemeChromiumMac::extraDefaultStyleSheet() |
1974 { | 1974 { |
1975 return RenderTheme::extraDefaultStyleSheet() + | 1975 return RenderTheme::extraDefaultStyleSheet() + |
1976 String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgen
tStyleSheet)); | 1976 String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgen
tStyleSheet)); |
1977 } | 1977 } |
1978 | 1978 |
1979 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* objec
t, const PaintInfo& paintInfo, const IntRect& rect) | 1979 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* objec
t, const PaintInfo& paintInfo, const IntRect& rect) |
1980 { | 1980 { |
1981 return true; | 1981 return true; |
1982 } | 1982 } |
1983 | 1983 |
1984 bool RenderThemeChromiumMac::paintMediaVolumeSliderTrack(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) | 1984 bool RenderThemeChromiumMac::paintMediaVolumeSliderTrack(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) |
1985 { | 1985 { |
1986 return RenderMediaControlsChromium::paintMediaControlsPart(MediaVolumeSlider
, object, paintInfo, rect); | 1986 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSlider, object
, paintInfo, rect); |
1987 } | 1987 } |
1988 | 1988 |
1989 bool RenderThemeChromiumMac::paintMediaVolumeSliderThumb(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) | 1989 bool RenderThemeChromiumMac::paintMediaVolumeSliderThumb(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) |
1990 { | 1990 { |
1991 return RenderMediaControlsChromium::paintMediaControlsPart(MediaVolumeSlider
Thumb, object, paintInfo, rect); | 1991 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderThumb, o
bject, paintInfo, rect); |
1992 } | 1992 } |
1993 | 1993 |
1994 bool RenderThemeChromiumMac::paintMediaSliderThumb(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) | 1994 bool RenderThemeChromiumMac::paintMediaSliderThumb(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) |
1995 { | 1995 { |
1996 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSliderThumb,
object, paintInfo, rect); | 1996 return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, object,
paintInfo, rect); |
1997 } | 1997 } |
1998 | 1998 |
1999 String RenderThemeChromiumMac::formatMediaControlsTime(float time) const | 1999 String RenderThemeChromiumMac::formatMediaControlsTime(float time) const |
2000 { | 2000 { |
2001 return RenderMediaControlsChromium::formatMediaControlsTime(time); | 2001 return RenderMediaControls::formatMediaControlsTime(time); |
2002 } | 2002 } |
2003 | 2003 |
2004 String RenderThemeChromiumMac::formatMediaControlsCurrentTime(float currentTime,
float duration) const | 2004 String RenderThemeChromiumMac::formatMediaControlsCurrentTime(float currentTime,
float duration) const |
2005 { | 2005 { |
2006 return RenderMediaControlsChromium::formatMediaControlsCurrentTime(currentTi
me, duration); | 2006 return RenderMediaControls::formatMediaControlsCurrentTime(currentTime, dura
tion); |
2007 } | 2007 } |
2008 | 2008 |
2009 bool RenderThemeChromiumMac::paintMediaFullscreenButton(RenderObject* object, co
nst PaintInfo& paintInfo, const IntRect& rect) | 2009 bool RenderThemeChromiumMac::paintMediaFullscreenButton(RenderObject* object, co
nst PaintInfo& paintInfo, const IntRect& rect) |
2010 { | 2010 { |
2011 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); | 2011 return RenderMediaControls::paintMediaControlsPart(MediaEnterFullscreenButto
n, object, paintInfo, rect); |
2012 } | 2012 } |
2013 | 2013 |
2014 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) | 2014 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) |
2015 { | 2015 { |
2016 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, object, paintInfo, rect); | 2016 return RenderMediaControls::paintMediaControlsPart(MediaShowClosedCaptionsBu
tton, object, paintInfo, rect); |
2017 } | 2017 } |
2018 | 2018 |
2019 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 2019 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
2020 { | 2020 { |
2021 ControlPart part = style->appearance(); | 2021 ControlPart part = style->appearance(); |
2022 if (part == CheckboxPart || part == RadioPart) | 2022 if (part == CheckboxPart || part == RadioPart) |
2023 return style->effectiveZoom() != 1; | 2023 return style->effectiveZoom() != 1; |
2024 return false; | 2024 return false; |
2025 } | 2025 } |
2026 | 2026 |
2027 } // namespace WebCore | 2027 } // namespace WebCore |
OLD | NEW |