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

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

Issue 2722313007: Remove some unnecessary using namespaces and add include guards (Closed)
Patch Set: Created 3 years, 9 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, 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
11 * Library General Public License for more details. 11 * Library General Public License for more details.
12 * 12 *
13 * You should have received a copy of the GNU Library General Public License 13 * You should have received a copy of the GNU Library General Public License
14 * along with this library; see the file COPYING.LIB. If not, write to 14 * along with this library; see the file COPYING.LIB. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA. 16 * Boston, MA 02110-1301, USA.
17 * 17 *
18 */ 18 */
19 19
20 #include "core/layout/LayoutSlider.h" 20 #include "core/layout/LayoutSlider.h"
21 21
22 #include "core/InputTypeNames.h" 22 #include "core/InputTypeNames.h"
23 #include "core/dom/shadow/ShadowRoot.h" 23 #include "core/dom/shadow/ShadowRoot.h"
24 #include "core/html/HTMLInputElement.h" 24 #include "core/html/HTMLInputElement.h"
25 #include "core/html/shadow/ShadowElementNames.h" 25 #include "core/html/shadow/ShadowElementNames.h"
26 #include "core/html/shadow/SliderThumbElement.h" 26 #include "core/html/shadow/SliderThumbElement.h"
27 #include "core/layout/LayoutSliderThumb.h" 27 #include "core/layout/LayoutSliderThumb.h"
28 #include "wtf/MathExtras.h" 28 #include "wtf/MathExtras.h"
29 29
30 using namespace ::std;
31
32 namespace blink { 30 namespace blink {
33 31
34 const int LayoutSlider::defaultTrackLength = 129; 32 const int LayoutSlider::defaultTrackLength = 129;
35 33
36 LayoutSlider::LayoutSlider(HTMLInputElement* element) 34 LayoutSlider::LayoutSlider(HTMLInputElement* element)
37 : LayoutFlexibleBox(element) { 35 : LayoutFlexibleBox(element) {
38 // We assume LayoutSlider works only with <input type=range>. 36 // We assume LayoutSlider works only with <input type=range>.
39 ASSERT(element->type() == InputTypeNames::range); 37 ASSERT(element->type() == InputTypeNames::range);
40 } 38 }
41 39
(...skipping 30 matching lines...) Expand all
72 toLayoutSliderThumb(thumbBox)->updateAppearance(styleRef()); 70 toLayoutSliderThumb(thumbBox)->updateAppearance(styleRef());
73 71
74 LayoutFlexibleBox::layout(); 72 LayoutFlexibleBox::layout();
75 } 73 }
76 74
77 bool LayoutSlider::inDragMode() const { 75 bool LayoutSlider::inDragMode() const {
78 return sliderThumbElement()->isActive(); 76 return sliderThumbElement()->isActive();
79 } 77 }
80 78
81 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698