OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
3 * | 3 * |
4 * Copyright (C) 2006, 2007 Apple Computer, Inc. | 4 * Copyright (C) 2006, 2007 Apple Computer, Inc. |
5 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 5 * Copyright (C) 2007-2009 Torch Mobile, 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 style->setColor(textColor); | 472 style->setColor(textColor); |
473 } | 473 } |
474 | 474 |
475 #if ENABLE(VIDEO) | 475 #if ENABLE(VIDEO) |
476 // Attempt to retrieve a HTMLMediaElement from a Node. Returns 0 if one cannot b
e found. | 476 // Attempt to retrieve a HTMLMediaElement from a Node. Returns 0 if one cannot b
e found. |
477 static HTMLMediaElement* mediaElementParent(Node* node) | 477 static HTMLMediaElement* mediaElementParent(Node* node) |
478 { | 478 { |
479 if (!node) | 479 if (!node) |
480 return 0; | 480 return 0; |
481 Node* mediaNode = node->shadowAncestorNode(); | 481 Node* mediaNode = node->shadowAncestorNode(); |
482 if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode
->hasTagName(HTMLNames::audioTag))) | 482 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi
aNode)->isMediaElement()) |
483 return 0; | 483 return 0; |
484 | 484 |
485 return static_cast<HTMLMediaElement*>(mediaNode); | 485 return static_cast<HTMLMediaElement*>(mediaNode); |
486 } | 486 } |
487 #endif | 487 #endif |
488 | 488 |
489 bool RenderThemeWinCE::paintSliderTrack(RenderObject* o, const PaintInfo& i, con
st IntRect& r) | 489 bool RenderThemeWinCE::paintSliderTrack(RenderObject* o, const PaintInfo& i, con
st IntRect& r) |
490 { | 490 { |
491 bool rc = RenderTheme::paintSliderTrack(o, i, r); | 491 bool rc = RenderTheme::paintSliderTrack(o, i, r); |
492 IntPoint left = IntPoint(r.x() + 2, (r.y() + r.maxY()) / 2); | 492 IntPoint left = IntPoint(r.x() + 2, (r.y() + r.maxY()) / 2); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 return paintSliderTrack(o, paintInfo, r); | 639 return paintSliderTrack(o, paintInfo, r); |
640 } | 640 } |
641 | 641 |
642 bool RenderThemeWinCE::paintMediaSliderThumb(RenderObject* o, const PaintInfo& p
aintInfo, const IntRect& r) | 642 bool RenderThemeWinCE::paintMediaSliderThumb(RenderObject* o, const PaintInfo& p
aintInfo, const IntRect& r) |
643 { | 643 { |
644 return paintSliderThumb(o, paintInfo, r); | 644 return paintSliderThumb(o, paintInfo, r); |
645 } | 645 } |
646 #endif | 646 #endif |
647 | 647 |
648 } // namespace WebCore | 648 } // namespace WebCore |
OLD | NEW |