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

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

Issue 13937017: Implement lazy block layout prototype behind a runtime flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 return true; 669 return true;
670 break; 670 break;
671 case CSSPropertyDirection: // ltr | rtl | inherit 671 case CSSPropertyDirection: // ltr | rtl | inherit
672 if (valueID == CSSValueLtr || valueID == CSSValueRtl) 672 if (valueID == CSSValueLtr || valueID == CSSValueRtl)
673 return true; 673 return true;
674 break; 674 break;
675 case CSSPropertyDisplay: 675 case CSSPropertyDisplay:
676 // inline | block | list-item | run-in | inline-block | table | 676 // inline | block | list-item | run-in | inline-block | table |
677 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row | 677 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row |
678 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none | inherit 678 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none | inherit
679 // -webkit-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-gr id 679 // -webkit-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-gr id | lazy-block
680 if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlex) | | valueID == CSSValueNone) 680 if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlex) | | valueID == CSSValueNone)
681 return true; 681 return true;
682 if (parserContext.isCSSGridLayoutEnabled && (valueID == CSSValueWebkitGr id || valueID == CSSValueWebkitInlineGrid)) 682 if (parserContext.isCSSGridLayoutEnabled && (valueID == CSSValueWebkitGr id || valueID == CSSValueWebkitInlineGrid))
683 return true; 683 return true;
684 if (valueID == CSSValueLazyBlock)
685 return RuntimeEnabledFeatures::lazyLayoutEnabled();
684 break; 686 break;
685 687
686 case CSSPropertyEmptyCells: // show | hide | inherit 688 case CSSPropertyEmptyCells: // show | hide | inherit
687 if (valueID == CSSValueShow || valueID == CSSValueHide) 689 if (valueID == CSSValueShow || valueID == CSSValueHide)
688 return true; 690 return true;
689 break; 691 break;
690 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none) 692 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none)
691 if (valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CS SValueNone || valueID == CSSValueCenter) 693 if (valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CS SValueNone || valueID == CSSValueCenter)
692 return true; 694 return true;
693 break; 695 break;
(...skipping 11027 matching lines...) Expand 10 before | Expand all | Expand 10 after
11721 { 11723 {
11722 // The tokenizer checks for the construct of an+b. 11724 // The tokenizer checks for the construct of an+b.
11723 // However, since the {ident} rule precedes the {nth} rule, some of those 11725 // However, since the {ident} rule precedes the {nth} rule, some of those
11724 // tokens are identified as string literal. Furthermore we need to accept 11726 // tokens are identified as string literal. Furthermore we need to accept
11725 // "odd" and "even" which does not match to an+b. 11727 // "odd" and "even" which does not match to an+b.
11726 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11728 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11727 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11729 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11728 } 11730 }
11729 11731
11730 } 11732 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698