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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 71253002: Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 1 month 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "core/svg/SVGURIReference.h" 84 #include "core/svg/SVGURIReference.h"
85 #include "platform/fonts/FontDescription.h" 85 #include "platform/fonts/FontDescription.h"
86 #include "wtf/MathExtras.h" 86 #include "wtf/MathExtras.h"
87 #include "wtf/StdLibExtras.h" 87 #include "wtf/StdLibExtras.h"
88 #include "wtf/Vector.h" 88 #include "wtf/Vector.h"
89 89
90 namespace WebCore { 90 namespace WebCore {
91 91
92 static Length clipConvertToLength(StyleResolverState& state, CSSPrimitiveValue* value) 92 static Length clipConvertToLength(StyleResolverState& state, CSSPrimitiveValue* value)
93 { 93 {
94 return value->convertToLength<FixedIntegerConversion | PercentConversion | F ractionConversion | AutoConversion>(state.style(), state.rootElementStyle(), sta te.style()->effectiveZoom()); 94 return value->convertToLength<FixedIntegerConversion | PercentConversion | A utoConversion>(state.style(), state.rootElementStyle(), state.style()->effective Zoom());
95 } 95 }
96 96
97 void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolverState& stat e) 97 void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolverState& stat e)
98 { 98 {
99 state.style()->setClip(Length(), Length(), Length(), Length()); 99 state.style()->setClip(Length(), Length(), Length(), Length());
100 state.style()->setHasClip(false); 100 state.style()->setHasClip(false);
101 } 101 }
102 102
103 void StyleBuilderFunctions::applyInheritCSSPropertyClip(StyleResolverState& stat e) 103 void StyleBuilderFunctions::applyInheritCSSPropertyClip(StyleResolverState& stat e)
104 { 104 {
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 case CSSValueNormal: 685 case CSSValueNormal:
686 state.style()->setMarqueeIncrement(Length(6, Fixed)); // 6px. The Wi nIE default. 686 state.style()->setMarqueeIncrement(Length(6, Fixed)); // 6px. The Wi nIE default.
687 break; 687 break;
688 case CSSValueLarge: 688 case CSSValueLarge:
689 state.style()->setMarqueeIncrement(Length(36, Fixed)); // 36px. 689 state.style()->setMarqueeIncrement(Length(36, Fixed)); // 36px.
690 break; 690 break;
691 default: 691 default:
692 break; 692 break;
693 } 693 }
694 } else { 694 } else {
695 Length marqueeLength = primitiveValue ? primitiveValue->convertToLength< FixedIntegerConversion | PercentConversion | FractionConversion>(state.style(), state.rootElementStyle()) : Length(Undefined); 695 Length marqueeLength = primitiveValue ? primitiveValue->convertToLength< FixedIntegerConversion | PercentConversion>(state.style(), state.rootElementStyl e()) : Length(Undefined);
696 if (!marqueeLength.isUndefined()) 696 if (!marqueeLength.isUndefined())
697 state.style()->setMarqueeIncrement(marqueeLength); 697 state.style()->setMarqueeIncrement(marqueeLength);
698 } 698 }
699 } 699 }
700 700
701 void StyleBuilderFunctions::applyValueCSSPropertyInternalMarqueeSpeed(StyleResol verState& state, CSSValue* value) 701 void StyleBuilderFunctions::applyValueCSSPropertyInternalMarqueeSpeed(StyleResol verState& state, CSSValue* value)
702 { 702 {
703 if (!value->isPrimitiveValue()) 703 if (!value->isPrimitiveValue())
704 return; 704 return;
705 705
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 break; 2306 break;
2307 } 2307 }
2308 case CSSPropertyEnableBackground: 2308 case CSSPropertyEnableBackground:
2309 // Silently ignoring this property for now 2309 // Silently ignoring this property for now
2310 // http://bugs.webkit.org/show_bug.cgi?id=6022 2310 // http://bugs.webkit.org/show_bug.cgi?id=6022
2311 break; 2311 break;
2312 } 2312 }
2313 } 2313 }
2314 2314
2315 } // namespace WebCore 2315 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/FilterOperationResolver.cpp ('k') | Source/core/css/resolver/TransformBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698