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

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

Issue 17155007: [CSS3] Parsing the property, text-justify. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parsingTextJustify
Patch Set: Created 7 years, 6 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 if (valueID == CSSValueBefore || valueID == CSSValueAfter) 860 if (valueID == CSSValueBefore || valueID == CSSValueAfter)
861 return true; 861 return true;
862 break; 862 break;
863 863
864 #if ENABLE(CSS3_TEXT) 864 #if ENABLE(CSS3_TEXT)
865 case CSSPropertyWebkitTextAlignLast: 865 case CSSPropertyWebkitTextAlignLast:
866 // auto | start | end | left | right | center | justify 866 // auto | start | end | left | right | center | justify
867 if ((valueID >= CSSValueLeft && valueID <= CSSValueJustify) || valueID = = CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueAuto) 867 if ((valueID >= CSSValueLeft && valueID <= CSSValueJustify) || valueID = = CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueAuto)
868 return true; 868 return true;
869 break; 869 break;
870 case CSSPropertyWebkitTextJustify:
871 // auto | none | inter-word | distribute
872 if (valueID == CSSValueInterWord || valueID == CSSValueDistribute || val ueID == CSSValueAuto || valueID == CSSValueNone)
873 return true;
874 break;
870 #endif // CSS3_TEXT 875 #endif // CSS3_TEXT
871 case CSSPropertyWebkitTextCombine: 876 case CSSPropertyWebkitTextCombine:
872 if (valueID == CSSValueNone || valueID == CSSValueHorizontal) 877 if (valueID == CSSValueNone || valueID == CSSValueHorizontal)
873 return true; 878 return true;
874 break; 879 break;
875 case CSSPropertyWebkitTextEmphasisPosition: 880 case CSSPropertyWebkitTextEmphasisPosition:
876 if (valueID == CSSValueOver || valueID == CSSValueUnder) 881 if (valueID == CSSValueOver || valueID == CSSValueUnder)
877 return true; 882 return true;
878 break; 883 break;
879 case CSSPropertyWebkitTextSecurity: 884 case CSSPropertyWebkitTextSecurity:
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 case CSSPropertyWebkitNbspMode: 1016 case CSSPropertyWebkitNbspMode:
1012 case CSSPropertyWebkitPrintColorAdjust: 1017 case CSSPropertyWebkitPrintColorAdjust:
1013 case CSSPropertyWebkitRegionBreakAfter: 1018 case CSSPropertyWebkitRegionBreakAfter:
1014 case CSSPropertyWebkitRegionBreakBefore: 1019 case CSSPropertyWebkitRegionBreakBefore:
1015 case CSSPropertyWebkitRegionBreakInside: 1020 case CSSPropertyWebkitRegionBreakInside:
1016 case CSSPropertyWebkitRegionFragment: 1021 case CSSPropertyWebkitRegionFragment:
1017 case CSSPropertyWebkitRtlOrdering: 1022 case CSSPropertyWebkitRtlOrdering:
1018 case CSSPropertyWebkitRubyPosition: 1023 case CSSPropertyWebkitRubyPosition:
1019 #if ENABLE(CSS3_TEXT) 1024 #if ENABLE(CSS3_TEXT)
1020 case CSSPropertyWebkitTextAlignLast: 1025 case CSSPropertyWebkitTextAlignLast:
1026 case CSSPropertyWebkitTextJustify:
1021 #endif // CSS3_TEXT 1027 #endif // CSS3_TEXT
1022 case CSSPropertyWebkitTextCombine: 1028 case CSSPropertyWebkitTextCombine:
1023 case CSSPropertyWebkitTextEmphasisPosition: 1029 case CSSPropertyWebkitTextEmphasisPosition:
1024 case CSSPropertyWebkitTextSecurity: 1030 case CSSPropertyWebkitTextSecurity:
1025 case CSSPropertyWebkitTransformStyle: 1031 case CSSPropertyWebkitTransformStyle:
1026 case CSSPropertyWebkitUserDrag: 1032 case CSSPropertyWebkitUserDrag:
1027 case CSSPropertyWebkitUserModify: 1033 case CSSPropertyWebkitUserModify:
1028 case CSSPropertyWebkitUserSelect: 1034 case CSSPropertyWebkitUserSelect:
1029 case CSSPropertyWebkitWrapFlow: 1035 case CSSPropertyWebkitWrapFlow:
1030 case CSSPropertyWebkitWrapThrough: 1036 case CSSPropertyWebkitWrapThrough:
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 case CSSPropertyWebkitNbspMode: 2828 case CSSPropertyWebkitNbspMode:
2823 case CSSPropertyWebkitPrintColorAdjust: 2829 case CSSPropertyWebkitPrintColorAdjust:
2824 case CSSPropertyWebkitRegionBreakAfter: 2830 case CSSPropertyWebkitRegionBreakAfter:
2825 case CSSPropertyWebkitRegionBreakBefore: 2831 case CSSPropertyWebkitRegionBreakBefore:
2826 case CSSPropertyWebkitRegionBreakInside: 2832 case CSSPropertyWebkitRegionBreakInside:
2827 case CSSPropertyWebkitRegionFragment: 2833 case CSSPropertyWebkitRegionFragment:
2828 case CSSPropertyWebkitRtlOrdering: 2834 case CSSPropertyWebkitRtlOrdering:
2829 case CSSPropertyWebkitRubyPosition: 2835 case CSSPropertyWebkitRubyPosition:
2830 #if ENABLE(CSS3_TEXT) 2836 #if ENABLE(CSS3_TEXT)
2831 case CSSPropertyWebkitTextAlignLast: 2837 case CSSPropertyWebkitTextAlignLast:
2838 case CSSPropertyWebkitTextJustify:
2832 #endif // CSS3_TEXT 2839 #endif // CSS3_TEXT
2833 case CSSPropertyWebkitTextCombine: 2840 case CSSPropertyWebkitTextCombine:
2834 case CSSPropertyWebkitTextEmphasisPosition: 2841 case CSSPropertyWebkitTextEmphasisPosition:
2835 case CSSPropertyWebkitTextSecurity: 2842 case CSSPropertyWebkitTextSecurity:
2836 case CSSPropertyWebkitTransformStyle: 2843 case CSSPropertyWebkitTransformStyle:
2837 case CSSPropertyWebkitUserDrag: 2844 case CSSPropertyWebkitUserDrag:
2838 case CSSPropertyWebkitUserModify: 2845 case CSSPropertyWebkitUserModify:
2839 case CSSPropertyWebkitUserSelect: 2846 case CSSPropertyWebkitUserSelect:
2840 case CSSPropertyWebkitWrapFlow: 2847 case CSSPropertyWebkitWrapFlow:
2841 case CSSPropertyWebkitWrapThrough: 2848 case CSSPropertyWebkitWrapThrough:
(...skipping 8972 matching lines...) Expand 10 before | Expand all | Expand 10 after
11814 { 11821 {
11815 // The tokenizer checks for the construct of an+b. 11822 // The tokenizer checks for the construct of an+b.
11816 // However, since the {ident} rule precedes the {nth} rule, some of those 11823 // However, since the {ident} rule precedes the {nth} rule, some of those
11817 // tokens are identified as string literal. Furthermore we need to accept 11824 // tokens are identified as string literal. Furthermore we need to accept
11818 // "odd" and "even" which does not match to an+b. 11825 // "odd" and "even" which does not match to an+b.
11819 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11826 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11820 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11827 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11821 } 11828 }
11822 11829
11823 } 11830 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698