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

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

Issue 2620263002: CSS: Scale support for none (Closed)
Patch Set: Created 3 years, 11 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 3580 matching lines...) Expand 10 before | Expand all | Expand 10 after
3591 style.rotate()->y(), CSSPrimitiveValue::UnitType::Number)); 3591 style.rotate()->y(), CSSPrimitiveValue::UnitType::Number));
3592 list->append(*CSSPrimitiveValue::create( 3592 list->append(*CSSPrimitiveValue::create(
3593 style.rotate()->z(), CSSPrimitiveValue::UnitType::Number)); 3593 style.rotate()->z(), CSSPrimitiveValue::UnitType::Number));
3594 } 3594 }
3595 list->append(*CSSPrimitiveValue::create( 3595 list->append(*CSSPrimitiveValue::create(
3596 style.rotate()->angle(), CSSPrimitiveValue::UnitType::Degrees)); 3596 style.rotate()->angle(), CSSPrimitiveValue::UnitType::Degrees));
3597 return list; 3597 return list;
3598 } 3598 }
3599 case CSSPropertyScale: { 3599 case CSSPropertyScale: {
3600 if (!style.scale()) 3600 if (!style.scale())
3601 return CSSPrimitiveValue::create(1, 3601 return CSSIdentifierValue::create(CSSValueNone);
3602 CSSPrimitiveValue::UnitType::Number);
3603 CSSValueList* list = CSSValueList::createSpaceSeparated(); 3602 CSSValueList* list = CSSValueList::createSpaceSeparated();
3604 list->append(*CSSPrimitiveValue::create( 3603 list->append(*CSSPrimitiveValue::create(
3605 style.scale()->x(), CSSPrimitiveValue::UnitType::Number)); 3604 style.scale()->x(), CSSPrimitiveValue::UnitType::Number));
3606 if (style.scale()->y() == 1 && style.scale()->z() == 1) 3605 if (style.scale()->y() == 1 && style.scale()->z() == 1)
3607 return list; 3606 return list;
3608 list->append(*CSSPrimitiveValue::create( 3607 list->append(*CSSPrimitiveValue::create(
3609 style.scale()->y(), CSSPrimitiveValue::UnitType::Number)); 3608 style.scale()->y(), CSSPrimitiveValue::UnitType::Number));
3610 if (style.scale()->z() != 1) 3609 if (style.scale()->z() != 1)
3611 list->append(*CSSPrimitiveValue::create( 3610 list->append(*CSSPrimitiveValue::create(
3612 style.scale()->z(), CSSPrimitiveValue::UnitType::Number)); 3611 style.scale()->z(), CSSPrimitiveValue::UnitType::Number));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 case CSSPropertyAll: 3650 case CSSPropertyAll:
3652 return nullptr; 3651 return nullptr;
3653 default: 3652 default:
3654 break; 3653 break;
3655 } 3654 }
3656 ASSERT_NOT_REACHED(); 3655 ASSERT_NOT_REACHED();
3657 return nullptr; 3656 return nullptr;
3658 } 3657 }
3659 3658
3660 } // namespace blink 3659 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698