| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return sliderStyle.appearance() == SliderVerticalPart; | 62 return sliderStyle.appearance() == SliderVerticalPart; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void LayoutSliderContainer::computeLogicalHeight(LayoutUnit logicalHeight, Layou
tUnit logicalTop, LogicalExtentComputedValues& computedValues) const | 65 void LayoutSliderContainer::computeLogicalHeight(LayoutUnit logicalHeight, Layou
tUnit logicalTop, LogicalExtentComputedValues& computedValues) const |
| 66 { | 66 { |
| 67 HTMLInputElement* input = toHTMLInputElement(node()->shadowHost()); | 67 HTMLInputElement* input = toHTMLInputElement(node()->shadowHost()); |
| 68 bool isVertical = hasVerticalAppearance(input); | 68 bool isVertical = hasVerticalAppearance(input); |
| 69 | 69 |
| 70 if (input->layoutObject()->isSlider() && !isVertical && input->list()) { | 70 if (input->layoutObject()->isSlider() && !isVertical && input->list()) { |
| 71 int offsetFromCenter = LayoutTheme::theme().sliderTickOffsetFromTrackCen
ter(); | 71 int offsetFromCenter = LayoutTheme::theme().sliderTickOffsetFromTrackCen
ter(); |
| 72 LayoutUnit trackHeight = 0; | 72 LayoutUnit trackHeight; |
| 73 if (offsetFromCenter < 0) { | 73 if (offsetFromCenter < 0) { |
| 74 trackHeight = -2 * offsetFromCenter; | 74 trackHeight = -2 * offsetFromCenter; |
| 75 } else { | 75 } else { |
| 76 int tickLength = LayoutTheme::theme().sliderTickSize().height(); | 76 int tickLength = LayoutTheme::theme().sliderTickSize().height(); |
| 77 trackHeight = 2 * (offsetFromCenter + tickLength); | 77 trackHeight = 2 * (offsetFromCenter + tickLength); |
| 78 } | 78 } |
| 79 float zoomFactor = style()->effectiveZoom(); | 79 float zoomFactor = style()->effectiveZoom(); |
| 80 if (zoomFactor != 1.0) | 80 if (zoomFactor != 1.0) |
| 81 trackHeight *= zoomFactor; | 81 trackHeight *= zoomFactor; |
| 82 | 82 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 thumbLocation.setX(thumbLocation.x() - offset); | 139 thumbLocation.setX(thumbLocation.x() - offset); |
| 140 thumb->setLocation(thumbLocation); | 140 thumb->setLocation(thumbLocation); |
| 141 | 141 |
| 142 // We need one-off invalidation code here because painting of the timeline e
lement does not go through style. | 142 // We need one-off invalidation code here because painting of the timeline e
lement does not go through style. |
| 143 // Instead it has a custom implementation in C++ code. | 143 // Instead it has a custom implementation in C++ code. |
| 144 // Therefore the style system cannot understand when it needs to be paint in
validated. | 144 // Therefore the style system cannot understand when it needs to be paint in
validated. |
| 145 setShouldDoFullPaintInvalidation(); | 145 setShouldDoFullPaintInvalidation(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace blink | 148 } // namespace blink |
| OLD | NEW |