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

Side by Side Diff: Source/core/css/CSSParser-in.cpp

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oops, sorry! Forgot to update UseCounter.cpp Created 7 years, 4 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) 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 case CSSPropertyListStylePosition: // inside | outside | inherit 629 case CSSPropertyListStylePosition: // inside | outside | inherit
630 if (valueID == CSSValueInside || valueID == CSSValueOutside) 630 if (valueID == CSSValueInside || valueID == CSSValueOutside)
631 return true; 631 return true;
632 break; 632 break;
633 case CSSPropertyListStyleType: 633 case CSSPropertyListStyleType:
634 // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in 634 // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in
635 // for the list of supported list-style-types. 635 // for the list of supported list-style-types.
636 if ((valueID >= CSSValueDisc && valueID <= CSSValueKatakanaIroha) || val ueID == CSSValueNone) 636 if ((valueID >= CSSValueDisc && valueID <= CSSValueKatakanaIroha) || val ueID == CSSValueNone)
637 return true; 637 return true;
638 break; 638 break;
639 case CSSPropertyObjectFit:
640 if (RuntimeEnabledFeatures::objectFitPositionEnabled()) {
641 if (valueID == CSSValueFill || valueID == CSSValueContain || valueID == CSSValueCover || valueID == CSSValueNone || valueID == CSSValueScaleDown)
642 return true;
643 }
644 break;
639 case CSSPropertyOutlineStyle: // (<border-style> except hidden) | auto | inh erit 645 case CSSPropertyOutlineStyle: // (<border-style> except hidden) | auto | inh erit
640 if (valueID == CSSValueAuto || valueID == CSSValueNone || (valueID >= CS SValueInset && valueID <= CSSValueDouble)) 646 if (valueID == CSSValueAuto || valueID == CSSValueNone || (valueID >= CS SValueInset && valueID <= CSSValueDouble))
641 return true; 647 return true;
642 break; 648 break;
643 case CSSPropertyOverflowWrap: // normal | break-word 649 case CSSPropertyOverflowWrap: // normal | break-word
644 case CSSPropertyWordWrap: 650 case CSSPropertyWordWrap:
645 if (valueID == CSSValueNormal || valueID == CSSValueBreakWord) 651 if (valueID == CSSValueNormal || valueID == CSSValueBreakWord)
646 return true; 652 return true;
647 break; 653 break;
648 case CSSPropertyOverflowX: // visible | hidden | scroll | auto | overlay | i nherit 654 case CSSPropertyOverflowX: // visible | hidden | scroll | auto | overlay | i nherit
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 case CSSPropertyCaptionSide: 943 case CSSPropertyCaptionSide:
938 case CSSPropertyClear: 944 case CSSPropertyClear:
939 case CSSPropertyDirection: 945 case CSSPropertyDirection:
940 case CSSPropertyDisplay: 946 case CSSPropertyDisplay:
941 case CSSPropertyEmptyCells: 947 case CSSPropertyEmptyCells:
942 case CSSPropertyFloat: 948 case CSSPropertyFloat:
943 case CSSPropertyFontStyle: 949 case CSSPropertyFontStyle:
944 case CSSPropertyImageRendering: 950 case CSSPropertyImageRendering:
945 case CSSPropertyListStylePosition: 951 case CSSPropertyListStylePosition:
946 case CSSPropertyListStyleType: 952 case CSSPropertyListStyleType:
953 case CSSPropertyObjectFit:
947 case CSSPropertyOutlineStyle: 954 case CSSPropertyOutlineStyle:
948 case CSSPropertyOverflowWrap: 955 case CSSPropertyOverflowWrap:
949 case CSSPropertyOverflowX: 956 case CSSPropertyOverflowX:
950 case CSSPropertyOverflowY: 957 case CSSPropertyOverflowY:
951 case CSSPropertyPageBreakAfter: 958 case CSSPropertyPageBreakAfter:
952 case CSSPropertyPageBreakBefore: 959 case CSSPropertyPageBreakBefore:
953 case CSSPropertyPageBreakInside: 960 case CSSPropertyPageBreakInside:
954 case CSSPropertyPointerEvents: 961 case CSSPropertyPointerEvents:
955 case CSSPropertyPosition: 962 case CSSPropertyPosition:
956 case CSSPropertyResize: 963 case CSSPropertyResize:
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 case CSSPropertyCaptionSide: 2746 case CSSPropertyCaptionSide:
2740 case CSSPropertyClear: 2747 case CSSPropertyClear:
2741 case CSSPropertyDirection: 2748 case CSSPropertyDirection:
2742 case CSSPropertyDisplay: 2749 case CSSPropertyDisplay:
2743 case CSSPropertyEmptyCells: 2750 case CSSPropertyEmptyCells:
2744 case CSSPropertyFloat: 2751 case CSSPropertyFloat:
2745 case CSSPropertyFontStyle: 2752 case CSSPropertyFontStyle:
2746 case CSSPropertyImageRendering: 2753 case CSSPropertyImageRendering:
2747 case CSSPropertyListStylePosition: 2754 case CSSPropertyListStylePosition:
2748 case CSSPropertyListStyleType: 2755 case CSSPropertyListStyleType:
2756 case CSSPropertyObjectFit:
2749 case CSSPropertyOutlineStyle: 2757 case CSSPropertyOutlineStyle:
2750 case CSSPropertyOverflowWrap: 2758 case CSSPropertyOverflowWrap:
2751 case CSSPropertyOverflowX: 2759 case CSSPropertyOverflowX:
2752 case CSSPropertyOverflowY: 2760 case CSSPropertyOverflowY:
2753 case CSSPropertyPageBreakAfter: 2761 case CSSPropertyPageBreakAfter:
2754 case CSSPropertyPageBreakBefore: 2762 case CSSPropertyPageBreakBefore:
2755 case CSSPropertyPageBreakInside: 2763 case CSSPropertyPageBreakInside:
2756 case CSSPropertyPointerEvents: 2764 case CSSPropertyPointerEvents:
2757 case CSSPropertyPosition: 2765 case CSSPropertyPosition:
2758 case CSSPropertyResize: 2766 case CSSPropertyResize:
(...skipping 9154 matching lines...) Expand 10 before | Expand all | Expand 10 after
11913 { 11921 {
11914 // The tokenizer checks for the construct of an+b. 11922 // The tokenizer checks for the construct of an+b.
11915 // However, since the {ident} rule precedes the {nth} rule, some of those 11923 // However, since the {ident} rule precedes the {nth} rule, some of those
11916 // tokens are identified as string literal. Furthermore we need to accept 11924 // tokens are identified as string literal. Furthermore we need to accept
11917 // "odd" and "even" which does not match to an+b. 11925 // "odd" and "even" which does not match to an+b.
11918 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11926 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11919 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11927 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11920 } 11928 }
11921 11929
11922 } 11930 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698