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

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

Issue 15912003: Don't assert when serializing -mask property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « LayoutTests/fast/masking/mask-serializing-expected.txt ('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 * (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 // BUG 49055: make sure the value was not reset in the layer che ck just above. 589 // BUG 49055: make sure the value was not reset in the layer che ck just above.
590 if ((j < size - 1 && shorthand.properties()[j + 1] == CSSPropert yBackgroundRepeatY && value) 590 if ((j < size - 1 && shorthand.properties()[j + 1] == CSSPropert yBackgroundRepeatY && value)
591 || (j < size - 1 && shorthand.properties()[j + 1] == CSSProp ertyWebkitMaskRepeatY && value)) { 591 || (j < size - 1 && shorthand.properties()[j + 1] == CSSProp ertyWebkitMaskRepeatY && value)) {
592 RefPtr<CSSValue> yValue; 592 RefPtr<CSSValue> yValue;
593 RefPtr<CSSValue> nextValue = values[j + 1]; 593 RefPtr<CSSValue> nextValue = values[j + 1];
594 if (nextValue->isValueList()) 594 if (nextValue->isValueList())
595 yValue = toCSSValueList(nextValue.get())->itemWithoutBou ndsCheck(i); 595 yValue = toCSSValueList(nextValue.get())->itemWithoutBou ndsCheck(i);
596 else 596 else
597 yValue = nextValue; 597 yValue = nextValue;
598 598
599 // background-repeat-x(y) or mask-repeat-x(y) may be like th is : "initial, repeat". We can omit the implicit initial values
600 // before starting to compare their values.
601 if (value->isImplicitInitialValue() || yValue->isImplicitIni tialValue())
602 continue;
603
599 int xId = toCSSPrimitiveValue(value.get())->getIdent(); 604 int xId = toCSSPrimitiveValue(value.get())->getIdent();
600 int yId = toCSSPrimitiveValue(yValue.get())->getIdent(); 605 int yId = toCSSPrimitiveValue(yValue.get())->getIdent();
601 if (xId != yId) { 606 if (xId != yId) {
602 if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) { 607 if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
603 useRepeatXShorthand = true; 608 useRepeatXShorthand = true;
604 ++j; 609 ++j;
605 } else if (xId == CSSValueNoRepeat && yId == CSSValueRep eat) { 610 } else if (xId == CSSValueNoRepeat && yId == CSSValueRep eat) {
606 useRepeatYShorthand = true; 611 useRepeatYShorthand = true;
607 continue; 612 continue;
608 } 613 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (!result.isEmpty()) 752 if (!result.isEmpty())
748 result.append(' '); 753 result.append(' ');
749 result.append(value); 754 result.append(value);
750 } 755 }
751 if (isInitialOrInherit(commonValue)) 756 if (isInitialOrInherit(commonValue))
752 return commonValue; 757 return commonValue;
753 return result.isEmpty() ? String() : result.toString(); 758 return result.isEmpty() ? String() : result.toString();
754 } 759 }
755 760
756 } 761 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/masking/mask-serializing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698