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

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

Issue 755413002: No quirky colors for border-top/left/right/bottom shorthands. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing test for border shorthand Created 6 years 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/parsing-color-quirk.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, 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (!inQuirksMode()) { 599 if (!inQuirksMode()) {
600 parsedValue = parseColor(); 600 parsedValue = parseColor();
601 if (parsedValue) 601 if (parsedValue)
602 m_valueList->next(); 602 m_valueList->next();
603 break; 603 break;
604 } 604 }
605 605
606 bool acceptQuirkyColors = false; 606 bool acceptQuirkyColors = false;
607 switch (propId) { 607 switch (propId) {
608 case CSSPropertyBackgroundColor: 608 case CSSPropertyBackgroundColor:
609 if (!inShorthand())
610 acceptQuirkyColors = true;
611 break;
612 case CSSPropertyBorderBottomColor: 609 case CSSPropertyBorderBottomColor:
613 case CSSPropertyBorderLeftColor: 610 case CSSPropertyBorderLeftColor:
614 case CSSPropertyBorderRightColor: 611 case CSSPropertyBorderRightColor:
615 case CSSPropertyBorderTopColor: 612 case CSSPropertyBorderTopColor:
613 if (!inShorthand() || m_currentShorthand == CSSPropertyBorderCol or)
614 acceptQuirkyColors = true;
615 break;
616 case CSSPropertyColor: 616 case CSSPropertyColor:
617 acceptQuirkyColors = true; 617 acceptQuirkyColors = true;
618 break; 618 break;
619 default: 619 default:
620 break; 620 break;
621 } 621 }
622 parsedValue = parseColor(0, acceptQuirkyColors); 622 parsedValue = parseColor(0, acceptQuirkyColors);
623 if (parsedValue) 623 if (parsedValue)
624 m_valueList->next(); 624 m_valueList->next();
625 } 625 }
(...skipping 7835 matching lines...) Expand 10 before | Expand all | Expand 10 after
8461 return nullptr; 8461 return nullptr;
8462 a = args->next(); 8462 a = args->next();
8463 8463
8464 argNumber++; 8464 argNumber++;
8465 } 8465 }
8466 8466
8467 return transformValue.release(); 8467 return transformValue.release();
8468 } 8468 }
8469 8469
8470 } // namespace blink 8470 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/parsing-color-quirk.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698