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

Side by Side Diff: third_party/WebKit/Source/core/animation/CSSBorderImageLengthBoxInterpolationType.cpp

Issue 2794013002: Fewer reused duplicate symbol names in animation. (Closed)
Patch Set: Addressed review comments. Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/CSSBorderImageLengthBoxInterpolationType.h" 5 #include "core/animation/CSSBorderImageLengthBoxInterpolationType.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/animation/BorderImageLengthBoxPropertyFunctions.h" 8 #include "core/animation/BorderImageLengthBoxPropertyFunctions.h"
9 #include "core/animation/LengthInterpolationFunctions.h" 9 #include "core/animation/LengthInterpolationFunctions.h"
10 #include "core/animation/SideIndex.h"
10 #include "core/css/CSSIdentifierValue.h" 11 #include "core/css/CSSIdentifierValue.h"
11 #include "core/css/CSSQuadValue.h" 12 #include "core/css/CSSQuadValue.h"
12 #include "core/css/resolver/StyleResolverState.h" 13 #include "core/css/resolver/StyleResolverState.h"
13 #include "wtf/PtrUtil.h" 14 #include "wtf/PtrUtil.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 namespace { 18 namespace {
18 19
19 enum SideIndex : unsigned {
20 SideTop,
21 SideRight,
22 SideBottom,
23 SideLeft,
24 SideIndexCount,
25 };
26
27 enum class SideType { 20 enum class SideType {
28 Number, 21 Number,
29 Auto, 22 Auto,
30 Length, 23 Length,
31 }; 24 };
32 25
33 SideType getSideType(const BorderImageLength& side) { 26 SideType getSideType(const BorderImageLength& side) {
34 if (side.isNumber()) { 27 if (side.isNumber()) {
35 return SideType::Number; 28 return SideType::Number;
36 } 29 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 return Length(Auto); 388 return Length(Auto);
396 } 389 }
397 }; 390 };
398 BorderImageLengthBox box(convertSide(SideTop), convertSide(SideRight), 391 BorderImageLengthBox box(convertSide(SideTop), convertSide(SideRight),
399 convertSide(SideBottom), convertSide(SideLeft)); 392 convertSide(SideBottom), convertSide(SideLeft));
400 BorderImageLengthBoxPropertyFunctions::setBorderImageLengthBox( 393 BorderImageLengthBoxPropertyFunctions::setBorderImageLengthBox(
401 cssProperty(), *state.style(), box); 394 cssProperty(), *state.style(), box);
402 } 395 }
403 396
404 } // namespace blink 397 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698