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

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

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 if (nextValue->isValueList()) 589 if (nextValue->isValueList())
590 yValue = toCSSValueList(nextValue.get())->itemWithoutBou ndsCheck(i); 590 yValue = toCSSValueList(nextValue.get())->itemWithoutBou ndsCheck(i);
591 else 591 else
592 yValue = nextValue; 592 yValue = nextValue;
593 593
594 // background-repeat-x(y) or mask-repeat-x(y) may be like th is : "initial, repeat". We can omit the implicit initial values 594 // background-repeat-x(y) or mask-repeat-x(y) may be like th is : "initial, repeat". We can omit the implicit initial values
595 // before starting to compare their values. 595 // before starting to compare their values.
596 if (value->isImplicitInitialValue() || yValue->isImplicitIni tialValue()) 596 if (value->isImplicitInitialValue() || yValue->isImplicitIni tialValue())
597 continue; 597 continue;
598 598
599 int xId = toCSSPrimitiveValue(value.get())->getIdent(); 599 CSSValueID xId = toCSSPrimitiveValue(value.get())->getValueI D();
600 int yId = toCSSPrimitiveValue(yValue.get())->getIdent(); 600 CSSValueID yId = toCSSPrimitiveValue(yValue.get())->getValue ID();
601 if (xId != yId) { 601 if (xId != yId) {
602 if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) { 602 if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
603 useRepeatXShorthand = true; 603 useRepeatXShorthand = true;
604 ++j; 604 ++j;
605 } else if (xId == CSSValueNoRepeat && yId == CSSValueRep eat) { 605 } else if (xId == CSSValueNoRepeat && yId == CSSValueRep eat) {
606 useRepeatYShorthand = true; 606 useRepeatYShorthand = true;
607 continue; 607 continue;
608 } 608 }
609 } else { 609 } else {
610 useSingleWordShorthand = true; 610 useSingleWordShorthand = true;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (!result.isEmpty()) 747 if (!result.isEmpty())
748 result.append(' '); 748 result.append(' ');
749 result.append(value); 749 result.append(value);
750 } 750 }
751 if (isInitialOrInherit(commonValue)) 751 if (isInitialOrInherit(commonValue))
752 return commonValue; 752 return commonValue;
753 return result.isEmpty() ? String() : result.toString(); 753 return result.isEmpty() ? String() : result.toString();
754 } 754 }
755 755
756 } 756 }
OLDNEW
« no previous file with comments | « Source/core/css/SVGCSSStyleSelector.cpp ('k') | Source/core/css/resolver/FilterOperationResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698