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

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

Issue 2842933003: CSS Motion Path: delete implementation of offset-rotation property (Closed)
Patch Set: remove offsetRotation from webexposed Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/css/parser/CSSPropertyParser.h" 5 #include "core/css/parser/CSSPropertyParser.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/StylePropertyShorthand.h" 8 #include "core/StylePropertyShorthand.h"
9 #include "core/css/CSSBasicShapeValues.h" 9 #include "core/css/CSSBasicShapeValues.h"
10 #include "core/css/CSSBorderImage.h" 10 #include "core/css/CSSBorderImage.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 angle = ConsumeAngle(range); 743 angle = ConsumeAngle(range);
744 744
745 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 745 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
746 if (keyword) 746 if (keyword)
747 list->Append(*keyword); 747 list->Append(*keyword);
748 if (angle) 748 if (angle)
749 list->Append(*angle); 749 list->Append(*angle);
750 return list; 750 return list;
751 } 751 }
752 752
753 // offset: <offset-path> <offset-distance> <offset-rotation> 753 // offset: <offset-path> <offset-distance> <offset-rotate>
754 bool CSSPropertyParser::ConsumeOffsetShorthand(bool important) { 754 bool CSSPropertyParser::ConsumeOffsetShorthand(bool important) {
755 const CSSValue* offset_path = 755 const CSSValue* offset_path =
756 CSSPropertyOffsetPathUtils::ConsumeOffsetPath(range_, context_); 756 CSSPropertyOffsetPathUtils::ConsumeOffsetPath(range_, context_);
757 const CSSValue* offset_distance = 757 const CSSValue* offset_distance =
758 ConsumeLengthOrPercent(range_, context_->Mode(), kValueRangeAll); 758 ConsumeLengthOrPercent(range_, context_->Mode(), kValueRangeAll);
759 const CSSValue* offset_rotation = ConsumeOffsetRotate(range_); 759 const CSSValue* offset_rotate = ConsumeOffsetRotate(range_);
760 if (!offset_path || !offset_distance || !offset_rotation || !range_.AtEnd()) 760 if (!offset_path || !offset_distance || !offset_rotate || !range_.AtEnd())
761 return false; 761 return false;
762 762
763 AddProperty(CSSPropertyOffsetPath, CSSPropertyOffset, *offset_path, 763 AddProperty(CSSPropertyOffsetPath, CSSPropertyOffset, *offset_path,
764 important); 764 important);
765 AddProperty(CSSPropertyOffsetDistance, CSSPropertyOffset, *offset_distance, 765 AddProperty(CSSPropertyOffsetDistance, CSSPropertyOffset, *offset_distance,
766 important); 766 important);
767 AddProperty(CSSPropertyOffsetRotation, CSSPropertyOffset, *offset_rotation, 767 AddProperty(CSSPropertyOffsetRotate, CSSPropertyOffset, *offset_rotate,
768 important); 768 important);
769 769
770 return true; 770 return true;
771 } 771 }
772 772
773 static CSSValue* ConsumeBorderWidth(CSSParserTokenRange& range, 773 static CSSValue* ConsumeBorderWidth(CSSParserTokenRange& range,
774 CSSParserMode css_parser_mode, 774 CSSParserMode css_parser_mode,
775 UnitlessQuirk unitless) { 775 UnitlessQuirk unitless) {
776 return ConsumeLineWidth(range, css_parser_mode, unitless); 776 return ConsumeLineWidth(range, css_parser_mode, unitless);
777 } 777 }
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 case CSSPropertyWebkitTextDecorationsInEffect: 1750 case CSSPropertyWebkitTextDecorationsInEffect:
1751 case CSSPropertyTextDecorationLine: 1751 case CSSPropertyTextDecorationLine:
1752 return ConsumeTextDecorationLine(range_); 1752 return ConsumeTextDecorationLine(range_);
1753 case CSSPropertyD: 1753 case CSSPropertyD:
1754 return CSSPropertyOffsetPathUtils::ConsumePathOrNone(range_); 1754 return CSSPropertyOffsetPathUtils::ConsumePathOrNone(range_);
1755 case CSSPropertyOffsetPath: 1755 case CSSPropertyOffsetPath:
1756 return CSSPropertyOffsetPathUtils::ConsumeOffsetPath(range_, context_); 1756 return CSSPropertyOffsetPathUtils::ConsumeOffsetPath(range_, context_);
1757 case CSSPropertyOffsetDistance: 1757 case CSSPropertyOffsetDistance:
1758 return ConsumeLengthOrPercent(range_, context_->Mode(), kValueRangeAll); 1758 return ConsumeLengthOrPercent(range_, context_->Mode(), kValueRangeAll);
1759 case CSSPropertyOffsetRotate: 1759 case CSSPropertyOffsetRotate:
1760 case CSSPropertyOffsetRotation:
1761 return ConsumeOffsetRotate(range_); 1760 return ConsumeOffsetRotate(range_);
1762 case CSSPropertyWebkitTransformOriginX: 1761 case CSSPropertyWebkitTransformOriginX:
1763 case CSSPropertyWebkitPerspectiveOriginX: 1762 case CSSPropertyWebkitPerspectiveOriginX:
1764 return CSSPropertyPositionUtils::ConsumePositionLonghand<CSSValueLeft, 1763 return CSSPropertyPositionUtils::ConsumePositionLonghand<CSSValueLeft,
1765 CSSValueRight>( 1764 CSSValueRight>(
1766 range_, context_->Mode()); 1765 range_, context_->Mode());
1767 case CSSPropertyWebkitTransformOriginY: 1766 case CSSPropertyWebkitTransformOriginY:
1768 case CSSPropertyWebkitPerspectiveOriginY: 1767 case CSSPropertyWebkitPerspectiveOriginY:
1769 return CSSPropertyPositionUtils::ConsumePositionLonghand<CSSValueTop, 1768 return CSSPropertyPositionUtils::ConsumePositionLonghand<CSSValueTop,
1770 CSSValueBottom>( 1769 CSSValueBottom>(
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
3430 case CSSPropertyPlaceItems: 3429 case CSSPropertyPlaceItems:
3431 return ConsumePlaceItemsShorthand(important); 3430 return ConsumePlaceItemsShorthand(important);
3432 case CSSPropertyPlaceSelf: 3431 case CSSPropertyPlaceSelf:
3433 return ConsumePlaceSelfShorthand(important); 3432 return ConsumePlaceSelfShorthand(important);
3434 default: 3433 default:
3435 return false; 3434 return false;
3436 } 3435 }
3437 } 3436 }
3438 3437
3439 } // namespace blink 3438 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698