| OLD | NEW | 
|---|
| 1 /** | 1 /** | 
| 2  * This file is part of the theme implementation for form controls in WebCore. | 2  * This file is part of the theme implementation for form controls in WebCore. | 
| 3  * | 3  * | 
| 4  * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4  * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 
| 5  * | 5  * | 
| 6  * This library is free software; you can redistribute it and/or | 6  * This library is free software; you can redistribute it and/or | 
| 7  * modify it under the terms of the GNU Library General Public | 7  * modify it under the terms of the GNU Library General Public | 
| 8  * License as published by the Free Software Foundation; either | 8  * License as published by the Free Software Foundation; either | 
| 9  * version 2 of the License, or (at your option) any later version. | 9  * version 2 of the License, or (at your option) any later version. | 
| 10  * | 10  * | 
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 816 | 816 | 
| 817     double min = input->minimum(); | 817     double min = input->minimum(); | 
| 818     double max = input->maximum(); | 818     double max = input->maximum(); | 
| 819     ControlPart part = o->style()->appearance(); | 819     ControlPart part = o->style()->appearance(); | 
| 820     // We don't support ticks on alternate sliders like MediaVolumeSliders. | 820     // We don't support ticks on alternate sliders like MediaVolumeSliders. | 
| 821     if (part !=  SliderHorizontalPart && part != SliderVerticalPart) | 821     if (part !=  SliderHorizontalPart && part != SliderVerticalPart) | 
| 822         return; | 822         return; | 
| 823     bool isHorizontal = part ==  SliderHorizontalPart; | 823     bool isHorizontal = part ==  SliderHorizontalPart; | 
| 824 | 824 | 
| 825     IntSize thumbSize; | 825     IntSize thumbSize; | 
| 826     LayoutObject* thumbRenderer = input->closedShadowRoot()->getElementById(Shad
      owElementNames::sliderThumb())->renderer(); | 826     LayoutObject* thumbRenderer = input->closedShadowRoot()->getElementById(Shad
      owElementNames::sliderThumb())->layoutObject(); | 
| 827     if (thumbRenderer) { | 827     if (thumbRenderer) { | 
| 828         const LayoutStyle& thumbStyle = thumbRenderer->styleRef(); | 828         const LayoutStyle& thumbStyle = thumbRenderer->styleRef(); | 
| 829         int thumbWidth = thumbStyle.width().intValue(); | 829         int thumbWidth = thumbStyle.width().intValue(); | 
| 830         int thumbHeight = thumbStyle.height().intValue(); | 830         int thumbHeight = thumbStyle.height().intValue(); | 
| 831         thumbSize.setWidth(isHorizontal ? thumbWidth : thumbHeight); | 831         thumbSize.setWidth(isHorizontal ? thumbWidth : thumbHeight); | 
| 832         thumbSize.setHeight(isHorizontal ? thumbHeight : thumbWidth); | 832         thumbSize.setHeight(isHorizontal ? thumbHeight : thumbWidth); | 
| 833     } | 833     } | 
| 834 | 834 | 
| 835     IntSize tickSize = sliderTickSize(); | 835     IntSize tickSize = sliderTickSize(); | 
| 836     float zoomFactor = o->style()->effectiveZoom(); | 836     float zoomFactor = o->style()->effectiveZoom(); | 
| 837     FloatRect tickRect; | 837     FloatRect tickRect; | 
| 838     int tickRegionSideMargin = 0; | 838     int tickRegionSideMargin = 0; | 
| 839     int tickRegionWidth = 0; | 839     int tickRegionWidth = 0; | 
| 840     IntRect trackBounds; | 840     IntRect trackBounds; | 
| 841     LayoutObject* trackRenderer = input->closedShadowRoot()->getElementById(Shad
      owElementNames::sliderTrack())->renderer(); | 841     LayoutObject* trackRenderer = input->closedShadowRoot()->getElementById(Shad
      owElementNames::sliderTrack())->layoutObject(); | 
| 842     // We can ignoring transforms because transform is handled by the graphics c
      ontext. | 842     // We can ignoring transforms because transform is handled by the graphics c
      ontext. | 
| 843     if (trackRenderer) | 843     if (trackRenderer) | 
| 844         trackBounds = trackRenderer->absoluteBoundingBoxRectIgnoringTransforms()
      ; | 844         trackBounds = trackRenderer->absoluteBoundingBoxRectIgnoringTransforms()
      ; | 
| 845     IntRect sliderBounds = o->absoluteBoundingBoxRectIgnoringTransforms(); | 845     IntRect sliderBounds = o->absoluteBoundingBoxRectIgnoringTransforms(); | 
| 846 | 846 | 
| 847     // Make position relative to the transformed ancestor element. | 847     // Make position relative to the transformed ancestor element. | 
| 848     trackBounds.setX(trackBounds.x() - sliderBounds.x() + rect.x()); | 848     trackBounds.setX(trackBounds.x() - sliderBounds.x() + rect.x()); | 
| 849     trackBounds.setY(trackBounds.y() - sliderBounds.y() + rect.y()); | 849     trackBounds.setY(trackBounds.y() - sliderBounds.y() + rect.y()); | 
| 850 | 850 | 
| 851     if (isHorizontal) { | 851     if (isHorizontal) { | 
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1244 | 1244 | 
| 1245     // padding - not honored by WinIE, needs to be removed. | 1245     // padding - not honored by WinIE, needs to be removed. | 
| 1246     style.resetPadding(); | 1246     style.resetPadding(); | 
| 1247 | 1247 | 
| 1248     // border - honored by WinIE, but looks terrible (just paints in the control
       box and turns off the Windows XP theme) | 1248     // border - honored by WinIE, but looks terrible (just paints in the control
       box and turns off the Windows XP theme) | 
| 1249     // for now, we will not honor it. | 1249     // for now, we will not honor it. | 
| 1250     style.resetBorder(); | 1250     style.resetBorder(); | 
| 1251 } | 1251 } | 
| 1252 | 1252 | 
| 1253 } // namespace blink | 1253 } // namespace blink | 
| OLD | NEW | 
|---|