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

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

Issue 9981010: Merge 113139 - Don't parse "show" and "hide" as valid values for display property. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/fast/css/display-no-show-hide-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 case CSSPropertyDisplay: 555 case CSSPropertyDisplay:
556 // inline | block | list-item | run-in | inline-block | table | 556 // inline | block | list-item | run-in | inline-block | table |
557 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row | 557 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row |
558 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none | inherit 558 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none | inherit
559 // -webkit-flexbox | -webkit-inline-flexbox | -webkit-grid | -webkit-inl ine-grid 559 // -webkit-flexbox | -webkit-inline-flexbox | -webkit-grid | -webkit-inl ine-grid
560 if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlexbox ) || valueID == CSSValueNone) 560 if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlexbox ) || valueID == CSSValueNone)
561 return true; 561 return true;
562 #if ENABLE(CSS_GRID_LAYOUT) 562 #if ENABLE(CSS_GRID_LAYOUT)
563 if (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid ) 563 if (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid )
564 return true; 564 return true;
565 #endif
565 break; 566 break;
566 #endif
567 case CSSPropertyEmptyCells: // show | hide | inherit 567 case CSSPropertyEmptyCells: // show | hide | inherit
568 if (valueID == CSSValueShow || valueID == CSSValueHide) 568 if (valueID == CSSValueShow || valueID == CSSValueHide)
569 return true; 569 return true;
570 break; 570 break;
571 case CSSPropertyFloat: // left | right | none | positioned | center (for bug gy CSS, maps to none) 571 case CSSPropertyFloat: // left | right | none | positioned | center (for bug gy CSS, maps to none)
572 if (valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CS SValueNone || valueID == CSSValueCenter || valueID == CSSValueWebkitPositioned) 572 if (valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CS SValueNone || valueID == CSSValueCenter || valueID == CSSValueWebkitPositioned)
573 return true; 573 return true;
574 break; 574 break;
575 case CSSPropertyFontStyle: // normal | italic | oblique | inherit 575 case CSSPropertyFontStyle: // normal | italic | oblique | inherit
576 if (valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique) 576 if (valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique)
(...skipping 9010 matching lines...) Expand 10 before | Expand all | Expand 10 after
9587 { 9587 {
9588 // The tokenizer checks for the construct of an+b. 9588 // The tokenizer checks for the construct of an+b.
9589 // However, since the {ident} rule precedes the {nth} rule, some of those 9589 // However, since the {ident} rule precedes the {nth} rule, some of those
9590 // tokens are identified as string literal. Furthermore we need to accept 9590 // tokens are identified as string literal. Furthermore we need to accept
9591 // "odd" and "even" which does not match to an+b. 9591 // "odd" and "even" which does not match to an+b.
9592 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 9592 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
9593 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 9593 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
9594 } 9594 }
9595 9595
9596 } 9596 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/display-no-show-hide-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698