Changeset 207679 in webkit
- Timestamp:
- Oct 21, 2016 10:03:10 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r207677 r207679 1 2016-10-21 Dave Hyatt <hyatt@apple.com> 2 3 [CSS Parser] Add support for -webkit-line-box-contain 4 https://bugs.webkit.org/show_bug.cgi?id=163794 5 6 Reviewed by Zalan Bujtas. 7 8 * css/parser/CSSPropertyParser.cpp: 9 (WebCore::consumeLineBoxContain): 10 (WebCore::CSSPropertyParser::parseSingleValue): 11 1 12 2016-10-21 Dave Hyatt <hyatt@apple.com> 2 13 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r207636 r207679 45 45 #include "CSSInheritedValue.h" 46 46 #include "CSSInitialValue.h" 47 #include "CSSLineBoxContainValue.h" 47 48 #include "CSSParserFastPaths.h" 48 49 #include "CSSParserIdioms.h" … … 3045 3046 } 3046 3047 #endif 3048 3049 static RefPtr<CSSValue> consumeLineBoxContain(CSSParserTokenRange& range) 3050 { 3051 if (range.peek().id() == CSSValueNone) 3052 return consumeIdent(range); 3053 3054 LineBoxContain lineBoxContain = LineBoxContainNone; 3055 3056 while (range.peek().type() == IdentToken) { 3057 auto id = range.peek().id(); 3058 if (id == CSSValueBlock) { 3059 if (lineBoxContain & LineBoxContainBlock) 3060 return nullptr; 3061 lineBoxContain |= LineBoxContainBlock; 3062 } else if (id == CSSValueInline) { 3063 if (lineBoxContain & LineBoxContainInline) 3064 return nullptr; 3065 lineBoxContain |= LineBoxContainInline; 3066 } else if (id == CSSValueFont) { 3067 if (lineBoxContain & LineBoxContainFont) 3068 return nullptr; 3069 lineBoxContain |= LineBoxContainFont; 3070 } else if (id == CSSValueGlyphs) { 3071 if (lineBoxContain & LineBoxContainGlyphs) 3072 return nullptr; 3073 lineBoxContain |= LineBoxContainGlyphs; 3074 } else if (id == CSSValueReplaced) { 3075 if (lineBoxContain & LineBoxContainReplaced) 3076 return nullptr; 3077 lineBoxContain |= LineBoxContainReplaced; 3078 } else if (id == CSSValueInlineBox) { 3079 if (lineBoxContain & LineBoxContainInlineBox) 3080 return nullptr; 3081 lineBoxContain |= LineBoxContainInlineBox; 3082 } else if (id == CSSValueInitialLetter) { 3083 if (lineBoxContain & LineBoxContainInitialLetter) 3084 return nullptr; 3085 lineBoxContain |= LineBoxContainInitialLetter; 3086 } else 3087 return nullptr; 3088 range.consumeIncludingWhitespace(); 3089 } 3090 3091 if (!lineBoxContain) 3092 return nullptr; 3093 3094 return CSSLineBoxContainValue::create(lineBoxContain); 3095 } 3047 3096 3048 3097 RefPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSSPropertyID currentShorthand) … … 3360 3409 case CSSPropertyWebkitBoxReflect: 3361 3410 return consumeReflect(m_range, m_context); 3411 case CSSPropertyWebkitLineBoxContain: 3412 return consumeLineBoxContain(m_range); 3362 3413 #if ENABLE(CSS_IMAGE_ORIENTATION) 3363 3414 case CSSPropertyImageOrientation:
Note: See TracChangeset
for help on using the changeset viewer.