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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2797973002: Removing duplicate functions and symbol names in core/css (Closed)
Patch Set: Removed unnecessary include 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 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "core/css/CSSPrimitiveValueMappings.h" 50 #include "core/css/CSSPrimitiveValueMappings.h"
51 #include "core/css/CSSQuadValue.h" 51 #include "core/css/CSSQuadValue.h"
52 #include "core/css/CSSReflectValue.h" 52 #include "core/css/CSSReflectValue.h"
53 #include "core/css/CSSShadowValue.h" 53 #include "core/css/CSSShadowValue.h"
54 #include "core/css/CSSStringValue.h" 54 #include "core/css/CSSStringValue.h"
55 #include "core/css/CSSTimingFunctionValue.h" 55 #include "core/css/CSSTimingFunctionValue.h"
56 #include "core/css/CSSURIValue.h" 56 #include "core/css/CSSURIValue.h"
57 #include "core/css/CSSValueList.h" 57 #include "core/css/CSSValueList.h"
58 #include "core/css/CSSValuePair.h" 58 #include "core/css/CSSValuePair.h"
59 #include "core/css/PropertyRegistry.h" 59 #include "core/css/PropertyRegistry.h"
60 #include "core/css/zoomAdjustedPixelValue.h"
60 #include "core/layout/LayoutBlock.h" 61 #include "core/layout/LayoutBlock.h"
61 #include "core/layout/LayoutBox.h" 62 #include "core/layout/LayoutBox.h"
62 #include "core/layout/LayoutGrid.h" 63 #include "core/layout/LayoutGrid.h"
63 #include "core/layout/LayoutObject.h" 64 #include "core/layout/LayoutObject.h"
64 #include "core/style/ComputedStyle.h" 65 #include "core/style/ComputedStyle.h"
65 #include "core/style/ContentData.h" 66 #include "core/style/ContentData.h"
66 #include "core/style/CursorData.h" 67 #include "core/style/CursorData.h"
67 #include "core/style/QuotesData.h" 68 #include "core/style/QuotesData.h"
68 #include "core/style/ShadowList.h" 69 #include "core/style/ShadowList.h"
69 #include "core/style/StyleInheritedVariables.h" 70 #include "core/style/StyleInheritedVariables.h"
70 #include "core/style/StyleNonInheritedVariables.h" 71 #include "core/style/StyleNonInheritedVariables.h"
71 #include "platform/LengthFunctions.h" 72 #include "platform/LengthFunctions.h"
72 73
73 namespace blink { 74 namespace blink {
74 75
75 inline static bool isFlexOrGrid(const ComputedStyle* style) { 76 inline static bool isFlexOrGrid(const ComputedStyle* style) {
76 return style && style->isDisplayFlexibleOrGridBox(); 77 return style && style->isDisplayFlexibleOrGridBox();
77 } 78 }
78 79
79 inline static CSSPrimitiveValue* zoomAdjustedPixelValue(
80 double value,
81 const ComputedStyle& style) {
82 return CSSPrimitiveValue::create(adjustFloatForAbsoluteZoom(value, style),
83 CSSPrimitiveValue::UnitType::Pixels);
84 }
85
86 inline static CSSValue* zoomAdjustedPixelValueOrAuto( 80 inline static CSSValue* zoomAdjustedPixelValueOrAuto(
87 const Length& length, 81 const Length& length,
88 const ComputedStyle& style) { 82 const ComputedStyle& style) {
89 if (length.isAuto()) 83 if (length.isAuto())
90 return CSSIdentifierValue::create(CSSValueAuto); 84 return CSSIdentifierValue::create(CSSValueAuto);
91 return zoomAdjustedPixelValue(length.value(), style); 85 return zoomAdjustedPixelValue(length.value(), style);
92 } 86 }
93 87
94 static CSSValue* zoomAdjustedPixelValueForLength(const Length& length, 88 static CSSValue* zoomAdjustedPixelValueForLength(const Length& length,
95 const ComputedStyle& style) { 89 const ComputedStyle& style) {
(...skipping 3596 matching lines...) Expand 10 before | Expand all | Expand 10 after
3692 case CSSPropertyAll: 3686 case CSSPropertyAll:
3693 return nullptr; 3687 return nullptr;
3694 default: 3688 default:
3695 break; 3689 break;
3696 } 3690 }
3697 NOTREACHED(); 3691 NOTREACHED();
3698 return nullptr; 3692 return nullptr;
3699 } 3693 }
3700 3694
3701 } // namespace blink 3695 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698