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

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

Issue 288303007: Unprefix CSS cursor values zoom-in and zoom-out (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: switch Created 6 years, 7 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 m_valueList->next(); 618 m_valueList->next();
619 } 619 }
620 break; 620 break;
621 621
622 case CSSPropertyCursor: { 622 case CSSPropertyCursor: {
623 // Grammar defined by CSS3 UI and modified by CSS4 images: 623 // Grammar defined by CSS3 UI and modified by CSS4 images:
624 // [ [<image> [<x> <y>]?,]* 624 // [ [<image> [<x> <y>]?,]*
625 // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize | 625 // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize |
626 // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize | 626 // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize |
627 // ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | tex t | wait | help | 627 // ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | tex t | wait | help |
628 // vertical-text | cell | context-menu | alias | copy | no-drop | not-al lowed | -webkit-zoom-in 628 // vertical-text | cell | context-menu | alias | copy | no-drop | not-al lowed | all-scroll |
629 // -webkit-zoom-out | all-scroll | -webkit-grab | -webkit-grabbing ] ] | inherit 629 // zoom-in | zoom-out | -webkit-grab | -webkit-grabbing | -webkit-zoom-i n | -webkit-zoom-out ] ] | inherit
630 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; 630 RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
631 while (value) { 631 while (value) {
632 RefPtrWillBeRawPtr<CSSValue> image = nullptr; 632 RefPtrWillBeRawPtr<CSSValue> image = nullptr;
633 if (value->unit == CSSPrimitiveValue::CSS_URI) { 633 if (value->unit == CSSPrimitiveValue::CSS_URI) {
634 String uri = value->string; 634 String uri = value->string;
635 if (!uri.isNull()) 635 if (!uri.isNull())
636 image = createCSSImageValueWithReferrer(uri, completeURL(uri )); 636 image = createCSSImageValueWithReferrer(uri, completeURL(uri ));
637 } else if (value->unit == CSSParserValue::Function && equalIgnoringC ase(value->function->name, "-webkit-image-set(")) { 637 } else if (value->unit == CSSParserValue::Function && equalIgnoringC ase(value->function->name, "-webkit-image-set(")) {
638 image = parseImageSet(m_valueList.get()); 638 image = parseImageSet(m_valueList.get());
639 if (!image) 639 if (!image)
(...skipping 25 matching lines...) Expand all
665 665
666 if (!value || !(value->unit == CSSParserValue::Operator && value->iV alue == ',')) 666 if (!value || !(value->unit == CSSParserValue::Operator && value->iV alue == ','))
667 return false; 667 return false;
668 value = m_valueList->next(); // comma 668 value = m_valueList->next(); // comma
669 } 669 }
670 if (list) { 670 if (list) {
671 if (!value) 671 if (!value)
672 return false; 672 return false;
673 if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibi lity :/ 673 if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibi lity :/
674 list->append(cssValuePool().createIdentifierValue(CSSValuePointe r)); 674 list->append(cssValuePool().createIdentifierValue(CSSValuePointe r));
675 else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGr abbing) || value->id == CSSValueCopy || value->id == CSSValueNone) 675 else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZo omOut) || value->id == CSSValueCopy || value->id == CSSValueNone)
676 list->append(cssValuePool().createIdentifierValue(value->id)); 676 list->append(cssValuePool().createIdentifierValue(value->id));
677 m_valueList->next(); 677 m_valueList->next();
678 parsedValue = list.release(); 678 parsedValue = list.release();
679 break; 679 break;
680 } else if (value) { 680 } else if (value) {
681 id = value->id; 681 id = value->id;
682 if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compati bility :/ 682 if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compati bility :/
683 id = CSSValuePointer; 683 id = CSSValuePointer;
684 validPrimitive = true; 684 validPrimitive = true;
685 } else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkit Grabbing) || value->id == CSSValueCopy || value->id == CSSValueNone) 685 } else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkit ZoomOut) || value->id == CSSValueCopy || value->id == CSSValueNone)
686 validPrimitive = true; 686 validPrimitive = true;
687 } else { 687 } else {
688 ASSERT_NOT_REACHED(); 688 ASSERT_NOT_REACHED();
689 return false; 689 return false;
690 } 690 }
691 break; 691 break;
692 } 692 }
693 693
694 case CSSPropertyBackgroundBlendMode: 694 case CSSPropertyBackgroundBlendMode:
695 case CSSPropertyBackgroundAttachment: 695 case CSSPropertyBackgroundAttachment:
(...skipping 7801 matching lines...) Expand 10 before | Expand all | Expand 10 after
8497 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8497 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8498 if (!seenStroke) 8498 if (!seenStroke)
8499 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8499 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8500 if (!seenMarkers) 8500 if (!seenMarkers)
8501 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8501 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8502 8502
8503 return parsedValues.release(); 8503 return parsedValues.release();
8504 } 8504 }
8505 8505
8506 } // namespace WebCore 8506 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698