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

Side by Side Diff: Source/core/rendering/RenderSlider.cpp

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderSlider.h ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 26 matching lines...) Expand all
37 : RenderFlexibleBox(element) 37 : RenderFlexibleBox(element)
38 { 38 {
39 // We assume RenderSlider works only with <input type=range>. 39 // We assume RenderSlider works only with <input type=range>.
40 ASSERT(element->isRangeControl()); 40 ASSERT(element->isRangeControl());
41 } 41 }
42 42
43 RenderSlider::~RenderSlider() 43 RenderSlider::~RenderSlider()
44 { 44 {
45 } 45 }
46 46
47 int RenderSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirecti onMode, LinePositionMode linePositionMode) const 47 int RenderSlider::baselinePosition(FontBaseline, OwnOrFirstLineStyle, LineDirect ionMode, 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 height() + marginTop(); 51 return height() + marginTop();
52 } 52 }
53 53
54 void RenderSlider::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La youtUnit& maxLogicalWidth) const 54 void RenderSlider::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La youtUnit& maxLogicalWidth) const
55 { 55 {
56 maxLogicalWidth = defaultTrackLength * style()->effectiveZoom(); 56 maxLogicalWidth = defaultTrackLength * style()->effectiveZoom();
57 if (!style()->width().isPercent()) 57 if (!style()->width().isPercent())
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 RenderFlexibleBox::layout(); 102 RenderFlexibleBox::layout();
103 } 103 }
104 104
105 bool RenderSlider::inDragMode() const 105 bool RenderSlider::inDragMode() const
106 { 106 {
107 return sliderThumbElement()->active(); 107 return sliderThumbElement()->active();
108 } 108 }
109 109
110 } // namespace WebCore 110 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderSlider.h ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698