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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 778723002: Refactor CSSGradientValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove m_colorIsDerivedFromElement 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 | « Source/core/css/resolver/ElementStyleResources.cpp ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 { 759 {
760 // list of string, uri, counter, attr, i 760 // list of string, uri, counter, attr, i
761 761
762 if (!value->isValueList()) 762 if (!value->isValueList())
763 return; 763 return;
764 764
765 bool didSet = false; 765 bool didSet = false;
766 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { 766 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
767 CSSValue* item = i.value(); 767 CSSValue* item = i.value();
768 if (item->isImageGeneratorValue()) { 768 if (item->isImageGeneratorValue()) {
769 if (item->isGradientValue()) 769 state.style()->setContent(StyleGeneratedImage::create(toCSSImageGene ratorValue(item)), didSet);
770 state.style()->setContent(StyleGeneratedImage::create(toCSSGradi entValue(item)->gradientWithStylesResolved(state.document().textLinkColors(), st ate.style()->color()).get()), didSet);
771 else
772 state.style()->setContent(StyleGeneratedImage::create(toCSSImage GeneratorValue(item)), didSet);
773 didSet = true; 770 didSet = true;
774 } else if (item->isImageSetValue()) { 771 } else if (item->isImageSetValue()) {
775 state.style()->setContent(state.elementStyleResources().setOrPending FromValue(CSSPropertyContent, toCSSImageSetValue(item)), didSet); 772 state.style()->setContent(state.elementStyleResources().setOrPending FromValue(CSSPropertyContent, toCSSImageSetValue(item)), didSet);
776 didSet = true; 773 didSet = true;
777 } 774 }
778 775
779 if (item->isImageValue()) { 776 if (item->isImageValue()) {
780 state.style()->setContent(state.elementStyleResources().cachedOrPend ingFromValue(state.document(), CSSPropertyContent, toCSSImageValue(item)), didSe t); 777 state.style()->setContent(state.elementStyleResources().cachedOrPend ingFromValue(state.document(), CSSPropertyContent, toCSSImageValue(item)), didSe t);
781 didSet = true; 778 didSet = true;
782 continue; 779 continue;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 return; 907 return;
911 case CSSValueSuper: 908 case CSSValueSuper:
912 svgStyle.setBaselineShift(BS_SUPER); 909 svgStyle.setBaselineShift(BS_SUPER);
913 return; 910 return;
914 default: 911 default:
915 ASSERT_NOT_REACHED(); 912 ASSERT_NOT_REACHED();
916 } 913 }
917 } 914 }
918 915
919 } // namespace blink 916 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/ElementStyleResources.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698