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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 void LayoutSliderContainer::layout() { | 99 void LayoutSliderContainer::layout() { |
100 HTMLInputElement* input = toHTMLInputElement(node()->ownerShadowHost()); | 100 HTMLInputElement* input = toHTMLInputElement(node()->ownerShadowHost()); |
101 bool isVertical = hasVerticalAppearance(input); | 101 bool isVertical = hasVerticalAppearance(input); |
102 mutableStyleRef().setFlexDirection(isVertical ? FlowColumn : FlowRow); | 102 mutableStyleRef().setFlexDirection(isVertical ? FlowColumn : FlowRow); |
103 TextDirection oldTextDirection = style()->direction(); | 103 TextDirection oldTextDirection = style()->direction(); |
104 if (isVertical) { | 104 if (isVertical) { |
105 // FIXME: Work around rounding issues in RTL vertical sliders. We want them | 105 // FIXME: Work around rounding issues in RTL vertical sliders. We want them |
106 // to render identically to LTR vertical sliders. We can remove this work | 106 // to render identically to LTR vertical sliders. We can remove this work |
107 // around when subpixel rendering is enabled on all ports. | 107 // around when subpixel rendering is enabled on all ports. |
108 mutableStyleRef().setDirection(TextDirection::Ltr); | 108 mutableStyleRef().setDirection(TextDirection::kLtr); |
109 } | 109 } |
110 | 110 |
111 Element* thumbElement = input->userAgentShadowRoot()->getElementById( | 111 Element* thumbElement = input->userAgentShadowRoot()->getElementById( |
112 ShadowElementNames::sliderThumb()); | 112 ShadowElementNames::sliderThumb()); |
113 Element* trackElement = input->userAgentShadowRoot()->getElementById( | 113 Element* trackElement = input->userAgentShadowRoot()->getElementById( |
114 ShadowElementNames::sliderTrack()); | 114 ShadowElementNames::sliderTrack()); |
115 LayoutBox* thumb = thumbElement ? thumbElement->layoutBox() : 0; | 115 LayoutBox* thumb = thumbElement ? thumbElement->layoutBox() : 0; |
116 LayoutBox* track = trackElement ? trackElement->layoutBox() : 0; | 116 LayoutBox* track = trackElement ? trackElement->layoutBox() : 0; |
117 | 117 |
118 SubtreeLayoutScope layoutScope(*this); | 118 SubtreeLayoutScope layoutScope(*this); |
(...skipping 30 matching lines...) Expand all Loading... |
149 | 149 |
150 // We need one-off invalidation code here because painting of the timeline | 150 // We need one-off invalidation code here because painting of the timeline |
151 // element does not go through style. | 151 // element does not go through style. |
152 // Instead it has a custom implementation in C++ code. | 152 // Instead it has a custom implementation in C++ code. |
153 // Therefore the style system cannot understand when it needs to be paint | 153 // Therefore the style system cannot understand when it needs to be paint |
154 // invalidated. | 154 // invalidated. |
155 setShouldDoFullPaintInvalidation(); | 155 setShouldDoFullPaintInvalidation(); |
156 } | 156 } |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
OLD | NEW |