| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. | 2 * Copyright (C) 2007 Apple Inc. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2008 Collabora Ltd. | 4 * Copyright (C) 2008 Collabora Ltd. |
| 5 * Copyright (C) 2008, 2009 Google Inc. | 5 * Copyright (C) 2008, 2009 Google Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "config.h" | 24 #include "config.h" |
| 25 #include "core/rendering/RenderThemeChromiumSkia.h" | 25 #include "core/rendering/RenderThemeChromiumSkia.h" |
| 26 | 26 |
| 27 #include "UserAgentStyleSheets.h" | 27 #include "UserAgentStyleSheets.h" |
| 28 #include "core/platform/LayoutTestSupport.h" | 28 #include "core/platform/LayoutTestSupport.h" |
| 29 #include "core/platform/ScrollbarTheme.h" | 29 #include "core/platform/ScrollbarTheme.h" |
| 30 #include "core/platform/graphics/GraphicsContext.h" | 30 #include "core/platform/graphics/GraphicsContext.h" |
| 31 #include "core/platform/graphics/Image.h" | 31 #include "core/platform/graphics/Image.h" |
| 32 #include "core/rendering/PaintInfo.h" | 32 #include "core/rendering/PaintInfo.h" |
| 33 #include "core/rendering/RenderBox.h" | 33 #include "core/rendering/RenderBox.h" |
| 34 #include "core/rendering/RenderMediaControlsChromium.h" | 34 #include "core/rendering/RenderMediaControls.h" |
| 35 #include "core/rendering/RenderObject.h" | 35 #include "core/rendering/RenderObject.h" |
| 36 #include "core/rendering/RenderProgress.h" | 36 #include "core/rendering/RenderProgress.h" |
| 37 #include "core/rendering/RenderThemeChromiumFontProvider.h" | 37 #include "core/rendering/RenderThemeChromiumFontProvider.h" |
| 38 #include "wtf/CurrentTime.h" | 38 #include "wtf/CurrentTime.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 enum PaddingType { | 42 enum PaddingType { |
| 43 TopPadding, | 43 TopPadding, |
| 44 RightPadding, | 44 RightPadding, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 magnifierSize, magnifierSize); | 286 magnifierSize, magnifierSize); |
| 287 IntRect paintingRect = convertToPaintingRect(inputRenderBox, magnifierObject
, magnifierRect, r); | 287 IntRect paintingRect = convertToPaintingRect(inputRenderBox, magnifierObject
, magnifierRect, r); |
| 288 | 288 |
| 289 static Image* magnifierImage = Image::loadPlatformResource("searchMagnifier"
).leakRef(); | 289 static Image* magnifierImage = Image::loadPlatformResource("searchMagnifier"
).leakRef(); |
| 290 paintInfo.context->drawImage(magnifierImage, paintingRect); | 290 paintInfo.context->drawImage(magnifierImage, paintingRect); |
| 291 return false; | 291 return false; |
| 292 } | 292 } |
| 293 | 293 |
| 294 bool RenderThemeChromiumSkia::paintMediaSliderTrack(RenderObject* object, const
PaintInfo& paintInfo, const IntRect& rect) | 294 bool RenderThemeChromiumSkia::paintMediaSliderTrack(RenderObject* object, const
PaintInfo& paintInfo, const IntRect& rect) |
| 295 { | 295 { |
| 296 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSlider, obje
ct, paintInfo, rect); | 296 return RenderMediaControls::paintMediaControlsPart(MediaSlider, object, pain
tInfo, rect); |
| 297 } | 297 } |
| 298 | 298 |
| 299 bool RenderThemeChromiumSkia::paintMediaVolumeSliderTrack(RenderObject* object,
const PaintInfo& paintInfo, const IntRect& rect) | 299 bool RenderThemeChromiumSkia::paintMediaVolumeSliderTrack(RenderObject* object,
const PaintInfo& paintInfo, const IntRect& rect) |
| 300 { | 300 { |
| 301 return RenderMediaControlsChromium::paintMediaControlsPart(MediaVolumeSlider
, object, paintInfo, rect); | 301 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSlider, object
, paintInfo, rect); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void RenderThemeChromiumSkia::adjustSliderThumbSize(RenderStyle* style, Element*
) const | 304 void RenderThemeChromiumSkia::adjustSliderThumbSize(RenderStyle* style, Element*
) const |
| 305 { | 305 { |
| 306 RenderMediaControlsChromium::adjustMediaSliderThumbSize(style); | 306 RenderMediaControls::adjustMediaSliderThumbSize(style); |
| 307 } | 307 } |
| 308 | 308 |
| 309 bool RenderThemeChromiumSkia::paintMediaSliderThumb(RenderObject* object, const
PaintInfo& paintInfo, const IntRect& rect) | 309 bool RenderThemeChromiumSkia::paintMediaSliderThumb(RenderObject* object, const
PaintInfo& paintInfo, const IntRect& rect) |
| 310 { | 310 { |
| 311 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSliderThumb,
object, paintInfo, rect); | 311 return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, object,
paintInfo, rect); |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject*
o, const PaintInfo& paintInfo, const IntRect& r) | 314 bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject*
o, const PaintInfo& paintInfo, const IntRect& r) |
| 315 { | 315 { |
| 316 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, o, paintInfo, r); | 316 return RenderMediaControls::paintMediaControlsPart(MediaShowClosedCaptionsBu
tton, o, paintInfo, r); |
| 317 } | 317 } |
| 318 | 318 |
| 319 bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object,
const PaintInfo& paintInfo, const IntRect& rect) | 319 bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object,
const PaintInfo& paintInfo, const IntRect& rect) |
| 320 { | 320 { |
| 321 return RenderMediaControlsChromium::paintMediaControlsPart(MediaVolumeSlider
Thumb, object, paintInfo, rect); | 321 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderThumb, o
bject, paintInfo, rect); |
| 322 } | 322 } |
| 323 | 323 |
| 324 bool RenderThemeChromiumSkia::paintMediaPlayButton(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) | 324 bool RenderThemeChromiumSkia::paintMediaPlayButton(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) |
| 325 { | 325 { |
| 326 return RenderMediaControlsChromium::paintMediaControlsPart(MediaPlayButton,
object, paintInfo, rect); | 326 return RenderMediaControls::paintMediaControlsPart(MediaPlayButton, object,
paintInfo, rect); |
| 327 } | 327 } |
| 328 | 328 |
| 329 bool RenderThemeChromiumSkia::paintMediaMuteButton(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) | 329 bool RenderThemeChromiumSkia::paintMediaMuteButton(RenderObject* object, const P
aintInfo& paintInfo, const IntRect& rect) |
| 330 { | 330 { |
| 331 return RenderMediaControlsChromium::paintMediaControlsPart(MediaMuteButton,
object, paintInfo, rect); | 331 return RenderMediaControls::paintMediaControlsPart(MediaMuteButton, object,
paintInfo, rect); |
| 332 } | 332 } |
| 333 | 333 |
| 334 String RenderThemeChromiumSkia::formatMediaControlsTime(float time) const | 334 String RenderThemeChromiumSkia::formatMediaControlsTime(float time) const |
| 335 { | 335 { |
| 336 return RenderMediaControlsChromium::formatMediaControlsTime(time); | 336 return RenderMediaControls::formatMediaControlsTime(time); |
| 337 } | 337 } |
| 338 | 338 |
| 339 String RenderThemeChromiumSkia::formatMediaControlsCurrentTime(float currentTime
, float duration) const | 339 String RenderThemeChromiumSkia::formatMediaControlsCurrentTime(float currentTime
, float duration) const |
| 340 { | 340 { |
| 341 return RenderMediaControlsChromium::formatMediaControlsCurrentTime(currentTi
me, duration); | 341 return RenderMediaControls::formatMediaControlsCurrentTime(currentTime, dura
tion); |
| 342 } | 342 } |
| 343 | 343 |
| 344 bool RenderThemeChromiumSkia::paintMediaFullscreenButton(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) | 344 bool RenderThemeChromiumSkia::paintMediaFullscreenButton(RenderObject* object, c
onst PaintInfo& paintInfo, const IntRect& rect) |
| 345 { | 345 { |
| 346 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); | 346 return RenderMediaControls::paintMediaControlsPart(MediaEnterFullscreenButto
n, object, paintInfo, rect); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void RenderThemeChromiumSkia::adjustMenuListStyle(RenderStyle* style, WebCore::E
lement*) const | 349 void RenderThemeChromiumSkia::adjustMenuListStyle(RenderStyle* style, WebCore::E
lement*) const |
| 350 { | 350 { |
| 351 // Height is locked to auto on all browsers. | 351 // Height is locked to auto on all browsers. |
| 352 style->setLineHeight(RenderStyle::initialLineHeight()); | 352 style->setLineHeight(RenderStyle::initialLineHeight()); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void RenderThemeChromiumSkia::adjustMenuListButtonStyle(RenderStyle* style, Elem
ent* e) const | 355 void RenderThemeChromiumSkia::adjustMenuListButtonStyle(RenderStyle* style, Elem
ent* e) const |
| 356 { | 356 { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 477 } |
| 478 | 478 |
| 479 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope() | 479 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope() |
| 480 { | 480 { |
| 481 if (!m_needsFlipping) | 481 if (!m_needsFlipping) |
| 482 return; | 482 return; |
| 483 m_paintInfo.context->restore(); | 483 m_paintInfo.context->restore(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 } // namespace WebCore | 486 } // namespace WebCore |
| OLD | NEW |