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

Side by Side Diff: Source/core/rendering/style/ShapeValue.h

Issue 244693003: [CSS Shapes] Add parsing support for gradients (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Increase threshold Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 static PassRefPtr<ShapeValue> createImageValue(PassRefPtr<StyleImage> image) 60 static PassRefPtr<ShapeValue> createImageValue(PassRefPtr<StyleImage> image)
61 { 61 {
62 return adoptRef(new ShapeValue(image)); 62 return adoptRef(new ShapeValue(image));
63 } 63 }
64 64
65 ShapeValueType type() const { return m_type; } 65 ShapeValueType type() const { return m_type; }
66 BasicShape* shape() const { return m_shape.get(); } 66 BasicShape* shape() const { return m_shape.get(); }
67 67
68 StyleImage* image() const { return m_image.get(); } 68 StyleImage* image() const { return m_image.get(); }
69 bool isImageValid() const { return image() && image()->cachedImage() && imag e()->cachedImage()->hasImage(); } 69 bool isImageValid() const
70 {
71 if (!image())
72 return false;
73 if (image()->isImageResource() || image()->isImageResourceSet())
74 return image()->cachedImage() && image()->cachedImage()->hasImage();
75 return image()->isGeneratedImage();
76 }
70 void setImage(PassRefPtr<StyleImage> image) 77 void setImage(PassRefPtr<StyleImage> image)
71 { 78 {
72 ASSERT(type() == Image); 79 ASSERT(type() == Image);
73 if (m_image != image) 80 if (m_image != image)
74 m_image = image; 81 m_image = image;
75 } 82 }
76 CSSBoxType cssBox() const { return m_cssBox; } 83 CSSBoxType cssBox() const { return m_cssBox; }
77 84
78 bool operator==(const ShapeValue& other) const; 85 bool operator==(const ShapeValue& other) const;
79 86
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return image() == other.image(); 129 return image() == other.image();
123 } 130 }
124 131
125 ASSERT_NOT_REACHED(); 132 ASSERT_NOT_REACHED();
126 return false; 133 return false;
127 } 134 }
128 135
129 } 136 }
130 137
131 #endif 138 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698