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

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

Issue 1328673003: Remove -webkit-line-box-contain implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix up a few more tests. Created 5 years, 3 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 23 matching lines...) Expand all
34 #include "core/css/CSSContentDistributionValue.h" 34 #include "core/css/CSSContentDistributionValue.h"
35 #include "core/css/CSSCounterValue.h" 35 #include "core/css/CSSCounterValue.h"
36 #include "core/css/CSSCrossfadeValue.h" 36 #include "core/css/CSSCrossfadeValue.h"
37 #include "core/css/CSSCursorImageValue.h" 37 #include "core/css/CSSCursorImageValue.h"
38 #include "core/css/CSSFontFaceSrcValue.h" 38 #include "core/css/CSSFontFaceSrcValue.h"
39 #include "core/css/CSSFontFeatureValue.h" 39 #include "core/css/CSSFontFeatureValue.h"
40 #include "core/css/CSSFunctionValue.h" 40 #include "core/css/CSSFunctionValue.h"
41 #include "core/css/CSSGridLineNamesValue.h" 41 #include "core/css/CSSGridLineNamesValue.h"
42 #include "core/css/CSSImageSetValue.h" 42 #include "core/css/CSSImageSetValue.h"
43 #include "core/css/CSSImageValue.h" 43 #include "core/css/CSSImageValue.h"
44 #include "core/css/CSSLineBoxContainValue.h"
45 #include "core/css/CSSPathValue.h" 44 #include "core/css/CSSPathValue.h"
46 #include "core/css/CSSPrimitiveValueMappings.h" 45 #include "core/css/CSSPrimitiveValueMappings.h"
47 #include "core/css/CSSProperty.h" 46 #include "core/css/CSSProperty.h"
48 #include "core/css/CSSPropertyMetadata.h" 47 #include "core/css/CSSPropertyMetadata.h"
49 #include "core/css/CSSQuadValue.h" 48 #include "core/css/CSSQuadValue.h"
50 #include "core/css/CSSReflectValue.h" 49 #include "core/css/CSSReflectValue.h"
51 #include "core/css/CSSSVGDocumentValue.h" 50 #include "core/css/CSSSVGDocumentValue.h"
52 #include "core/css/CSSShadowValue.h" 51 #include "core/css/CSSShadowValue.h"
53 #include "core/css/CSSTimingFunctionValue.h" 52 #include "core/css/CSSTimingFunctionValue.h"
54 #include "core/css/CSSUnicodeRangeValue.h" 53 #include "core/css/CSSUnicodeRangeValue.h"
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 case CSSPropertyWebkitTextEmphasisStyle: 1460 case CSSPropertyWebkitTextEmphasisStyle:
1462 parsedValue = parseTextEmphasisStyle(); 1461 parsedValue = parseTextEmphasisStyle();
1463 break; 1462 break;
1464 1463
1465 case CSSPropertyWebkitTextOrientation: 1464 case CSSPropertyWebkitTextOrientation:
1466 // FIXME: For now just support sideways, sideways-right, upright and ver tical-right. 1465 // FIXME: For now just support sideways, sideways-right, upright and ver tical-right.
1467 if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSVa lueVerticalRight || id == CSSValueUpright) 1466 if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSVa lueVerticalRight || id == CSSValueUpright)
1468 validPrimitive = true; 1467 validPrimitive = true;
1469 break; 1468 break;
1470 1469
1471 case CSSPropertyWebkitLineBoxContain:
1472 if (id == CSSValueNone)
1473 validPrimitive = true;
1474 else
1475 parsedValue = parseLineBoxContain();
1476 break;
1477 case CSSPropertyWebkitFontFeatureSettings: 1470 case CSSPropertyWebkitFontFeatureSettings:
1478 if (id == CSSValueNormal) 1471 if (id == CSSValueNormal)
1479 validPrimitive = true; 1472 validPrimitive = true;
1480 else 1473 else
1481 parsedValue = parseFontFeatureSettings(); 1474 parsedValue = parseFontFeatureSettings();
1482 break; 1475 break;
1483 1476
1484 case CSSPropertyFontVariantLigatures: 1477 case CSSPropertyFontVariantLigatures:
1485 if (id == CSSValueNormal) 1478 if (id == CSSValueNormal)
1486 validPrimitive = true; 1479 validPrimitive = true;
(...skipping 5750 matching lines...) Expand 10 before | Expand all | Expand 10 after
7237 } 7230 }
7238 return nullptr; 7231 return nullptr;
7239 } 7232 }
7240 7233
7241 if (!hasLengthOrPercentage) 7234 if (!hasLengthOrPercentage)
7242 return nullptr; 7235 return nullptr;
7243 7236
7244 return list.release(); 7237 return list.release();
7245 } 7238 }
7246 7239
7247 PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> CSSPropertyParser::parseLineBoxCo ntain()
7248 {
7249 LineBoxContain lineBoxContain = LineBoxContainNone;
7250
7251 for (CSSParserValue* value = m_valueList->current(); value; value = m_valueL ist->next()) {
7252 LineBoxContainFlags flag;
7253 if (value->id == CSSValueBlock) {
7254 flag = LineBoxContainBlock;
7255 } else if (value->id == CSSValueInline) {
7256 flag = LineBoxContainInline;
7257 } else if (value->id == CSSValueFont) {
7258 flag = LineBoxContainFont;
7259 } else if (value->id == CSSValueGlyphs) {
7260 flag = LineBoxContainGlyphs;
7261 } else if (value->id == CSSValueReplaced) {
7262 flag = LineBoxContainReplaced;
7263 } else if (value->id == CSSValueInlineBox) {
7264 flag = LineBoxContainInlineBox;
7265 } else {
7266 return nullptr;
7267 }
7268 if (lineBoxContain & flag)
7269 return nullptr;
7270 lineBoxContain |= flag;
7271 }
7272
7273 ASSERT(lineBoxContain);
7274 return CSSLineBoxContainValue::create(lineBoxContain);
7275 }
7276
7277 bool CSSPropertyParser::parseFontFeatureTag(CSSValueList* settings) 7240 bool CSSPropertyParser::parseFontFeatureTag(CSSValueList* settings)
7278 { 7241 {
7279 // Feature tag name consists of 4-letter characters. 7242 // Feature tag name consists of 4-letter characters.
7280 static const unsigned tagNameLength = 4; 7243 static const unsigned tagNameLength = 4;
7281 7244
7282 CSSParserValue* value = m_valueList->current(); 7245 CSSParserValue* value = m_valueList->current();
7283 // Feature tag name comes first 7246 // Feature tag name comes first
7284 if (value->unit() != CSSPrimitiveValue::UnitType::String) 7247 if (value->unit() != CSSPrimitiveValue::UnitType::String)
7285 return false; 7248 return false;
7286 if (value->string.length() != tagNameLength) 7249 if (value->string.length() != tagNameLength)
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
8094 } 8057 }
8095 } 8058 }
8096 8059
8097 if (!list->length()) 8060 if (!list->length())
8098 return nullptr; 8061 return nullptr;
8099 8062
8100 return list.release(); 8063 return list.release();
8101 } 8064 }
8102 8065
8103 } // namespace blink 8066 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.h ('k') | Source/core/css/resolver/StyleBuilderConverter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698