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

Side by Side Diff: sky/engine/core/css/parser/BisonCSSParser-in.cpp

Issue 689853003: Remove CSS Grid Layout and grid media queries. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 21 matching lines...) Expand all
32 #include "core/css/CSSAspectRatioValue.h" 32 #include "core/css/CSSAspectRatioValue.h"
33 #include "core/css/CSSBasicShapes.h" 33 #include "core/css/CSSBasicShapes.h"
34 #include "core/css/CSSBorderImage.h" 34 #include "core/css/CSSBorderImage.h"
35 #include "core/css/CSSCanvasValue.h" 35 #include "core/css/CSSCanvasValue.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/CSSGradientValue.h" 41 #include "core/css/CSSGradientValue.h"
42 #include "core/css/CSSGridLineNamesValue.h"
43 #include "core/css/CSSGridTemplateAreasValue.h"
44 #include "core/css/CSSImageSetValue.h" 42 #include "core/css/CSSImageSetValue.h"
45 #include "core/css/CSSImageValue.h" 43 #include "core/css/CSSImageValue.h"
46 #include "core/css/CSSInheritedValue.h" 44 #include "core/css/CSSInheritedValue.h"
47 #include "core/css/CSSInitialValue.h" 45 #include "core/css/CSSInitialValue.h"
48 #include "core/css/CSSKeyframeRule.h" 46 #include "core/css/CSSKeyframeRule.h"
49 #include "core/css/CSSKeyframesRule.h" 47 #include "core/css/CSSKeyframesRule.h"
50 #include "core/css/CSSLineBoxContainValue.h" 48 #include "core/css/CSSLineBoxContainValue.h"
51 #include "core/css/CSSPrimitiveValue.h" 49 #include "core/css/CSSPrimitiveValue.h"
52 #include "core/css/CSSPropertySourceData.h" 50 #include "core/css/CSSPropertySourceData.h"
53 #include "core/css/CSSSelector.h" 51 #include "core/css/CSSSelector.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 case CSSPropertyCaptionSide: // top | bottom | left | right 369 case CSSPropertyCaptionSide: // top | bottom | left | right
372 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueTop || valueID == CSSValueBottom; 370 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueTop || valueID == CSSValueBottom;
373 case CSSPropertyClear: // none | left | right | both 371 case CSSPropertyClear: // none | left | right | both
374 return valueID == CSSValueNone || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueBoth; 372 return valueID == CSSValueNone || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueBoth;
375 case CSSPropertyDirection: // ltr | rtl 373 case CSSPropertyDirection: // ltr | rtl
376 return valueID == CSSValueLtr || valueID == CSSValueRtl; 374 return valueID == CSSValueLtr || valueID == CSSValueRtl;
377 case CSSPropertyDisplay: 375 case CSSPropertyDisplay:
378 // inline | block | list-item | inline-block | table | 376 // inline | block | list-item | inline-block | table |
379 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row | 377 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row |
380 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none 378 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none
381 // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inli ne-grid 379 // flex | inline-flex
382 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || v alueID == CSSValueWebkitFlex || valueID == CSSValueWebkitInlineFlex || valueID = = CSSValueNone 380 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || v alueID == CSSValueNone;
383 || (RuntimeEnabledFeatures::cssGridLayoutEnabled() && (valueID == CS SValueGrid || valueID == CSSValueInlineGrid));
384 case CSSPropertyEmptyCells: // show | hide 381 case CSSPropertyEmptyCells: // show | hide
385 return valueID == CSSValueShow || valueID == CSSValueHide; 382 return valueID == CSSValueShow || valueID == CSSValueHide;
386 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none) 383 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none)
387 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone || valueID == CSSValueCenter; 384 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone || valueID == CSSValueCenter;
388 case CSSPropertyFontStyle: // normal | italic | oblique 385 case CSSPropertyFontStyle: // normal | italic | oblique
389 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique; 386 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique;
390 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded 387 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded
391 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded); 388 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded);
392 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated 389 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated
393 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated); 390 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 default: 510 default:
514 ASSERT_NOT_REACHED(); 511 ASSERT_NOT_REACHED();
515 return false; 512 return false;
516 } 513 }
517 return false; 514 return false;
518 } 515 }
519 516
520 bool isKeywordPropertyID(CSSPropertyID propertyId) 517 bool isKeywordPropertyID(CSSPropertyID propertyId)
521 { 518 {
522 switch (propertyId) { 519 switch (propertyId) {
520 case CSSPropertyAlignItems:
521 case CSSPropertyAlignSelf:
523 case CSSPropertyAll: 522 case CSSPropertyAll:
524 case CSSPropertyMixBlendMode: 523 case CSSPropertyMixBlendMode:
525 case CSSPropertyIsolation: 524 case CSSPropertyIsolation:
526 case CSSPropertyBackgroundRepeatX: 525 case CSSPropertyBackgroundRepeatX:
527 case CSSPropertyBackgroundRepeatY: 526 case CSSPropertyBackgroundRepeatY:
528 case CSSPropertyBorderBottomStyle: 527 case CSSPropertyBorderBottomStyle:
529 case CSSPropertyBorderCollapse: 528 case CSSPropertyBorderCollapse:
530 case CSSPropertyBorderLeftStyle: 529 case CSSPropertyBorderLeftStyle:
531 case CSSPropertyBorderRightStyle: 530 case CSSPropertyBorderRightStyle:
532 case CSSPropertyBorderTopStyle: 531 case CSSPropertyBorderTopStyle:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 case CSSPropertyWebkitTextEmphasisPosition: 585 case CSSPropertyWebkitTextEmphasisPosition:
587 case CSSPropertyTransformStyle: 586 case CSSPropertyTransformStyle:
588 case CSSPropertyWebkitTransformStyle: 587 case CSSPropertyWebkitTransformStyle:
589 case CSSPropertyWebkitUserDrag: 588 case CSSPropertyWebkitUserDrag:
590 case CSSPropertyWebkitUserModify: 589 case CSSPropertyWebkitUserModify:
591 case CSSPropertyWebkitUserSelect: 590 case CSSPropertyWebkitUserSelect:
592 case CSSPropertyWhiteSpace: 591 case CSSPropertyWhiteSpace:
593 case CSSPropertyWordBreak: 592 case CSSPropertyWordBreak:
594 case CSSPropertyWordWrap: 593 case CSSPropertyWordWrap:
595 return true; 594 return true;
596 case CSSPropertyAlignItems:
597 case CSSPropertyAlignSelf:
598 return !RuntimeEnabledFeatures::cssGridLayoutEnabled();
599 default: 595 default:
600 return false; 596 return false;
601 } 597 }
602 } 598 }
603 599
604 static bool parseKeywordValue(MutableStylePropertySet* declaration, CSSPropertyI D propertyId, const String& string, bool important, const CSSParserContext& pars erContext) 600 static bool parseKeywordValue(MutableStylePropertySet* declaration, CSSPropertyI D propertyId, const String& string, bool important, const CSSParserContext& pars erContext)
605 { 601 {
606 ASSERT(!string.isEmpty()); 602 ASSERT(!string.isEmpty());
607 603
608 if (!isKeywordPropertyID(propertyId)) { 604 if (!isKeywordPropertyID(propertyId)) {
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 m_observer->endProperty(isImportantFound, isPropertyParsed, m_tokenizer. safeUserStringTokenOffset(), errorType); 1856 m_observer->endProperty(isImportantFound, isPropertyParsed, m_tokenizer. safeUserStringTokenOffset(), errorType);
1861 } 1857 }
1862 1858
1863 void BisonCSSParser::startEndUnknownRule() 1859 void BisonCSSParser::startEndUnknownRule()
1864 { 1860 {
1865 if (m_observer) 1861 if (m_observer)
1866 m_observer->startEndUnknownRule(); 1862 m_observer->startEndUnknownRule();
1867 } 1863 }
1868 1864
1869 } 1865 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/StylePropertySerializer.cpp ('k') | sky/engine/core/css/parser/CSSPropertyParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698