Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp

Issue 2949453002: Make EFlexDirection an enum class. (Closed)
Patch Set: Fix Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // FIXME: The trackHeight should have been added before updateLogicalHeight 92 // FIXME: The trackHeight should have been added before updateLogicalHeight
93 // was called to avoid this hack. 93 // was called to avoid this hack.
94 SetIntrinsicContentLogicalHeight(logical_height); 94 SetIntrinsicContentLogicalHeight(logical_height);
95 95
96 LayoutBox::ComputeLogicalHeight(logical_height, logical_top, computed_values); 96 LayoutBox::ComputeLogicalHeight(logical_height, logical_top, computed_values);
97 } 97 }
98 98
99 void LayoutSliderContainer::UpdateLayout() { 99 void LayoutSliderContainer::UpdateLayout() {
100 HTMLInputElement* input = toHTMLInputElement(GetNode()->OwnerShadowHost()); 100 HTMLInputElement* input = toHTMLInputElement(GetNode()->OwnerShadowHost());
101 bool is_vertical = HasVerticalAppearance(input); 101 bool is_vertical = HasVerticalAppearance(input);
102 MutableStyleRef().SetFlexDirection(is_vertical ? kFlowColumn : kFlowRow); 102 MutableStyleRef().SetFlexDirection(is_vertical ? EFlexDirection::kColumn
103 : EFlexDirection::kRow);
103 TextDirection old_text_direction = Style()->Direction(); 104 TextDirection old_text_direction = Style()->Direction();
104 if (is_vertical) { 105 if (is_vertical) {
105 // FIXME: Work around rounding issues in RTL vertical sliders. We want them 106 // 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 107 // to render identically to LTR vertical sliders. We can remove this work
107 // around when subpixel rendering is enabled on all ports. 108 // around when subpixel rendering is enabled on all ports.
108 MutableStyleRef().SetDirection(TextDirection::kLtr); 109 MutableStyleRef().SetDirection(TextDirection::kLtr);
109 } 110 }
110 111
111 Element* thumb_element = input->UserAgentShadowRoot()->getElementById( 112 Element* thumb_element = input->UserAgentShadowRoot()->getElementById(
112 ShadowElementNames::SliderThumb()); 113 ShadowElementNames::SliderThumb());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 // We need one-off invalidation code here because painting of the timeline 152 // We need one-off invalidation code here because painting of the timeline
152 // element does not go through style. 153 // element does not go through style.
153 // Instead it has a custom implementation in C++ code. 154 // Instead it has a custom implementation in C++ code.
154 // Therefore the style system cannot understand when it needs to be paint 155 // Therefore the style system cannot understand when it needs to be paint
155 // invalidated. 156 // invalidated.
156 SetShouldDoFullPaintInvalidation(); 157 SetShouldDoFullPaintInvalidation();
157 } 158 }
158 159
159 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698