Changeset 88294 in webkit
- Timestamp:
- Jun 7, 2011 5:26:11 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88286 r88294 1 2011-06-07 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] RenderThemeQt::adjustSliderThumbSize() should not refer to the parent style. 6 https://bugs.webkit.org/show_bug.cgi?id=62207 7 8 * css/mediaControlsQt.css: Add comments. 9 (audio::-webkit-media-controls-timeline): 10 (video::-webkit-media-controls-timeline): 11 (audio::-webkit-media-controls-volume-slider): 12 (video::-webkit-media-controls-volume-slider): 13 * platform/qt/RenderThemeQt.cpp: Use fixed values to avoid referring to o->parent(). 14 (WebCore::RenderThemeQt::adjustSliderThumbSize): 15 1 16 2011-06-07 Sailesh Agrawal <sail@chromium.org> 2 17 -
trunk/Source/WebCore/css/mediaControlsQt.css
r83973 r88294 150 150 151 151 audio::-webkit-media-controls-timeline { 152 height: 12px; 152 height: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */ 153 153 padding: 6px 8px; 154 154 margin: 5px 3px; … … 156 156 157 157 video::-webkit-media-controls-timeline { 158 height: 12px; 158 height: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */ 159 159 padding: 6px 8px; 160 160 margin: 5px 3px; … … 180 180 position: absolute; 181 181 182 width: 12px; 182 width: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */ 183 183 padding: 6px; 184 184 height: 88px; … … 191 191 position: absolute; 192 192 193 width: 12px; 193 width: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */ 194 194 padding: 6px; 195 195 height: 88px; -
trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp
r88029 r88294 1466 1466 void RenderThemeQt::adjustSliderThumbSize(RenderObject* o) const 1467 1467 { 1468 // timelineThumbHeight should match the height property of -webkit-media-controls-timeline in mediaControlsQt.css. 1469 const int timelineThumbHeight = 12; 1470 const int timelineThumbWidth = timelineThumbHeight / 3; 1471 // volumeThumbWidth should match the width property of -webkit-media-controls-volume-slider in mediaControlsQt.css. 1472 const int volumeThumbWidth = 12; 1473 const int volumeThumbHeight = volumeThumbWidth / 3; 1468 1474 ControlPart part = o->style()->appearance(); 1469 1475 1470 1476 if (part == MediaSliderThumbPart) { 1471 RenderStyle* parentStyle = o->parent()->style(); 1472 Q_ASSERT(parentStyle); 1473 1474 int parentHeight = parentStyle->height().value(); 1475 o->style()->setWidth(Length(parentHeight / 3, Fixed)); 1476 o->style()->setHeight(Length(parentHeight, Fixed)); 1477 o->style()->setWidth(Length(timelineThumbWidth, Fixed)); 1478 o->style()->setHeight(Length(timelineThumbHeight, Fixed)); 1477 1479 } else if (part == MediaVolumeSliderThumbPart) { 1478 RenderStyle* parentStyle = o->parent()->style(); 1479 Q_ASSERT(parentStyle); 1480 1481 int parentWidth = parentStyle->width().value(); 1482 o->style()->setHeight(Length(parentWidth / 3, Fixed)); 1483 o->style()->setWidth(Length(parentWidth, Fixed)); 1480 o->style()->setHeight(Length(volumeThumbHeight, Fixed)); 1481 o->style()->setWidth(Length(volumeThumbWidth, Fixed)); 1484 1482 } else if (part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart) { 1485 1483 QStyleOptionSlider option;
Note: See TracChangeset
for help on using the changeset viewer.