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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | « Source/core/css/SVGCSSParser.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 RefPtrWillBeRawPtr<CSSValue> value; 563 RefPtrWillBeRawPtr<CSSValue> value;
564 if (values[j]) { 564 if (values[j]) {
565 if (values[j]->isBaseValueList()) 565 if (values[j]->isBaseValueList())
566 value = toCSSValueList(values[j].get())->item(i); 566 value = toCSSValueList(values[j].get())->item(i);
567 else { 567 else {
568 value = values[j]; 568 value = values[j];
569 569
570 // Color only belongs in the last layer. 570 // Color only belongs in the last layer.
571 if (shorthand.properties()[j] == CSSPropertyBackgroundColor) { 571 if (shorthand.properties()[j] == CSSPropertyBackgroundColor) {
572 if (i != numLayers - 1) 572 if (i != numLayers - 1)
573 value = 0; 573 value = nullptr;
574 } else if (i) // Other singletons only belong in the first l ayer. 574 } else if (i) {
575 value = 0; 575 // Other singletons only belong in the first layer.
576 value = nullptr;
577 }
576 } 578 }
577 } 579 }
578 580
579 // We need to report background-repeat as it was written in the CSS. If the property is implicit, 581 // We need to report background-repeat as it was written in the CSS. If the property is implicit,
580 // then it was written with only one value. Here we figure out which value that was so we can 582 // then it was written with only one value. Here we figure out which value that was so we can
581 // report back correctly. 583 // report back correctly.
582 if ((shorthand.properties()[j] == CSSPropertyBackgroundRepeatX && m_ propertySet.isPropertyImplicit(shorthand.properties()[j])) 584 if ((shorthand.properties()[j] == CSSPropertyBackgroundRepeatX && m_ propertySet.isPropertyImplicit(shorthand.properties()[j]))
583 || (shorthand.properties()[j] == CSSPropertyWebkitMaskRepeatX && m_propertySet.isPropertyImplicit(shorthand.properties()[j]))) { 585 || (shorthand.properties()[j] == CSSPropertyWebkitMaskRepeatX && m_propertySet.isPropertyImplicit(shorthand.properties()[j]))) {
584 586
585 // BUG 49055: make sure the value was not reset in the layer che ck just above. 587 // BUG 49055: make sure the value was not reset in the layer che ck just above.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 if (!result.isEmpty()) 755 if (!result.isEmpty())
754 result.append(' '); 756 result.append(' ');
755 result.append(value); 757 result.append(value);
756 } 758 }
757 if (isInitialOrInherit(commonValue)) 759 if (isInitialOrInherit(commonValue))
758 return commonValue; 760 return commonValue;
759 return result.isEmpty() ? String() : result.toString(); 761 return result.isEmpty() ? String() : result.toString();
760 } 762 }
761 763
762 } 764 }
OLDNEW
« no previous file with comments | « Source/core/css/SVGCSSParser.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698