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

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

Issue 1520833004: Move perspective property into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 case CSSPropertyWebkitBoxFlex: 524 case CSSPropertyWebkitBoxFlex:
525 validPrimitive = validUnit(value, FNumber); 525 validPrimitive = validUnit(value, FNumber);
526 break; 526 break;
527 case CSSPropertyWebkitBoxFlexGroup: 527 case CSSPropertyWebkitBoxFlexGroup:
528 validPrimitive = validUnit(value, FInteger | FNonNeg); 528 validPrimitive = validUnit(value, FInteger | FNonNeg);
529 break; 529 break;
530 case CSSPropertyOrder: 530 case CSSPropertyOrder:
531 validPrimitive = validUnit(value, FInteger); 531 validPrimitive = validUnit(value, FInteger);
532 break; 532 break;
533 533
534 case CSSPropertyPerspective:
535 if (id == CSSValueNone) {
536 validPrimitive = true;
537 } else if (validUnit(value, FLength) && (m_parsedCalculation || value->f Value > 0)) {
538 validPrimitive = true;
539 } else if (unresolvedProperty == CSSPropertyAliasWebkitPerspective && va lidUnit(value, FNumber) && value->fValue > 0) {
540 value->setUnit(CSSPrimitiveValue::UnitType::Pixels);
541 validPrimitive = true;
542 } else {
543 return false;
544 }
545 break;
546
547 case CSSPropertyJustifyContent: 534 case CSSPropertyJustifyContent:
548 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); 535 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
549 parsedValue = parseContentDistributionOverflowPosition(); 536 parsedValue = parseContentDistributionOverflowPosition();
550 break; 537 break;
551 case CSSPropertyJustifySelf: 538 case CSSPropertyJustifySelf:
552 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); 539 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
553 return parseItemPositionOverflowPosition(propId, important); 540 return parseItemPositionOverflowPosition(propId, important);
554 case CSSPropertyJustifyItems: 541 case CSSPropertyJustifyItems:
555 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); 542 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
556 543
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 case CSSPropertyR: 859 case CSSPropertyR:
873 case CSSPropertyRx: 860 case CSSPropertyRx:
874 case CSSPropertyRy: 861 case CSSPropertyRy:
875 case CSSPropertyScale: 862 case CSSPropertyScale:
876 case CSSPropertyTranslate: 863 case CSSPropertyTranslate:
877 case CSSPropertyCursor: 864 case CSSPropertyCursor:
878 case CSSPropertyTransformOrigin: 865 case CSSPropertyTransformOrigin:
879 case CSSPropertyContent: 866 case CSSPropertyContent:
880 case CSSPropertyListStyleImage: 867 case CSSPropertyListStyleImage:
881 case CSSPropertyListStyle: 868 case CSSPropertyListStyle:
869 case CSSPropertyPerspective:
882 validPrimitive = false; 870 validPrimitive = false;
883 break; 871 break;
884 872
885 case CSSPropertyScrollSnapPointsX: 873 case CSSPropertyScrollSnapPointsX:
886 case CSSPropertyScrollSnapPointsY: 874 case CSSPropertyScrollSnapPointsY:
887 parsedValue = parseScrollSnapPoints(); 875 parsedValue = parseScrollSnapPoints();
888 break; 876 break;
889 case CSSPropertyScrollSnapCoordinate: 877 case CSSPropertyScrollSnapCoordinate:
890 parsedValue = parseScrollSnapCoordinate(); 878 parsedValue = parseScrollSnapCoordinate();
891 break; 879 break;
(...skipping 3882 matching lines...) Expand 10 before | Expand all | Expand 10 after
4774 ASSERT(!m_parsedCalculation); 4762 ASSERT(!m_parsedCalculation);
4775 m_parsedCalculation = CSSCalcValue::create(args, range); 4763 m_parsedCalculation = CSSCalcValue::create(args, range);
4776 4764
4777 if (!m_parsedCalculation) 4765 if (!m_parsedCalculation)
4778 return false; 4766 return false;
4779 4767
4780 return true; 4768 return true;
4781 } 4769 }
4782 4770
4783 } // namespace blink 4771 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698