| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 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 Publicw | 5 * modify it under the terms of the GNU Library General Publicw |
| 6 * version 2 of the License, or (at your option) any later version. | 6 * version 2 of the License, or (at your option) any later version. |
| 7 * | 7 * |
| 8 * This library is distributed in the hope that it will be useful, | 8 * This library is distributed in the hope that it will be useful, |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 LayoutSlider::~LayoutSlider() | 43 LayoutSlider::~LayoutSlider() |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 int LayoutSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirecti
onMode, LinePositionMode linePositionMode) const | 47 int LayoutSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirecti
onMode, LinePositionMode linePositionMode) const |
| 48 { | 48 { |
| 49 ASSERT(linePositionMode == PositionOnContainingLine); | 49 ASSERT(linePositionMode == PositionOnContainingLine); |
| 50 // FIXME: Patch this function for writing-mode. | 50 // FIXME: Patch this function for writing-mode. |
| 51 return size().height() + marginTop(); | 51 return (size().height() + marginTop()).toInt(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void LayoutSlider::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La
youtUnit& maxLogicalWidth) const | 54 void LayoutSlider::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La
youtUnit& maxLogicalWidth) const |
| 55 { | 55 { |
| 56 maxLogicalWidth = LayoutUnit(defaultTrackLength * style()->effectiveZoom()); | 56 maxLogicalWidth = LayoutUnit(defaultTrackLength * style()->effectiveZoom()); |
| 57 if (!style()->width().hasPercent()) | 57 if (!style()->width().hasPercent()) |
| 58 minLogicalWidth = maxLogicalWidth; | 58 minLogicalWidth = maxLogicalWidth; |
| 59 } | 59 } |
| 60 | 60 |
| 61 inline SliderThumbElement* LayoutSlider::sliderThumbElement() const | 61 inline SliderThumbElement* LayoutSlider::sliderThumbElement() const |
| (...skipping 11 matching lines...) Expand all Loading... |
| 73 | 73 |
| 74 LayoutFlexibleBox::layout(); | 74 LayoutFlexibleBox::layout(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool LayoutSlider::inDragMode() const | 77 bool LayoutSlider::inDragMode() const |
| 78 { | 78 { |
| 79 return sliderThumbElement()->active(); | 79 return sliderThumbElement()->active(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| OLD | NEW |