OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 | 1785 |
1786 LocalCurrentGraphicsContext localContext(paintInfo.context); | 1786 LocalCurrentGraphicsContext localContext(paintInfo.context); |
1787 wkDrawMediaUIPart(MediaSeekForwardButton, mediaControllerTheme(), localConte
xt.cgContext(), r, getMediaUIPartStateFlags(node)); | 1787 wkDrawMediaUIPart(MediaSeekForwardButton, mediaControllerTheme(), localConte
xt.cgContext(), r, getMediaUIPartStateFlags(node)); |
1788 return false; | 1788 return false; |
1789 } | 1789 } |
1790 | 1790 |
1791 bool RenderThemeMac::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
ntInfo, const IntRect& r) | 1791 bool RenderThemeMac::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
ntInfo, const IntRect& r) |
1792 { | 1792 { |
1793 Node* node = o->node(); | 1793 Node* node = o->node(); |
1794 Node* mediaNode = node ? node->shadowAncestorNode() : 0; | 1794 Node* mediaNode = node ? node->shadowAncestorNode() : 0; |
1795 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagNam
e(audioTag))) | 1795 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi
aNode)->isMediaElement()) |
1796 return false; | 1796 return false; |
1797 | 1797 |
1798 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode); | 1798 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode); |
1799 if (!mediaElement) | 1799 if (!mediaElement) |
1800 return false; | 1800 return false; |
1801 | 1801 |
1802 RefPtr<TimeRanges> timeRanges = mediaElement->buffered(); | 1802 RefPtr<TimeRanges> timeRanges = mediaElement->buffered(); |
1803 ExceptionCode ignoredException; | 1803 ExceptionCode ignoredException; |
1804 float timeLoaded = timeRanges->length() ? timeRanges->end(0, ignoredExceptio
n) : 0; | 1804 float timeLoaded = timeRanges->length() ? timeRanges->end(0, ignoredExceptio
n) : 0; |
1805 float currentTime = mediaElement->currentTime(); | 1805 float currentTime = mediaElement->currentTime(); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 strToTruncate = fileButtonNoFileSelectedLabel(); | 2065 strToTruncate = fileButtonNoFileSelectedLabel(); |
2066 else if (filenames.size() == 1) | 2066 else if (filenames.size() == 1) |
2067 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(filen
ames[0])]; | 2067 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(filen
ames[0])]; |
2068 else | 2068 else |
2069 return StringTruncator::rightTruncate(multipleFileUploadText(filenames.s
ize()), width, font, StringTruncator::EnableRoundingHacks); | 2069 return StringTruncator::rightTruncate(multipleFileUploadText(filenames.s
ize()), width, font, StringTruncator::EnableRoundingHacks); |
2070 | 2070 |
2071 return StringTruncator::centerTruncate(strToTruncate, width, font, StringTru
ncator::EnableRoundingHacks); | 2071 return StringTruncator::centerTruncate(strToTruncate, width, font, StringTru
ncator::EnableRoundingHacks); |
2072 } | 2072 } |
2073 | 2073 |
2074 } // namespace WebCore | 2074 } // namespace WebCore |
OLD | NEW |