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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySerializer.h

Issue 1988013003: Move generic shorthand serialization checks out of specific routines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shorthand1
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/StylePropertySerializer.h
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.h b/third_party/WebKit/Source/core/css/StylePropertySerializer.h
index e075dad4cfa47c85693bf09ecc3cbcfbe6343bb5..da6c49719313caf5e9c411e58a8183ef658f3a09 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.h
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.h
@@ -48,13 +48,20 @@ private:
String getShorthandValue(const StylePropertyShorthand&, String separator = " ") const;
String fontValue() const;
String fontVariantValue() const;
- void appendFontLonghandValueIfNotNormal(CSSPropertyID, StringBuilder& result, String& value) const;
+ void appendFontLonghandValueIfNotNormal(CSSPropertyID, StringBuilder& result) const;
String backgroundRepeatPropertyValue() const;
String getPropertyText(CSSPropertyID, const String& value, bool isImportant, bool isNotFirstDecl) const;
bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const;
bool shorthandHasOnlyInitialOrInheritedValue(const StylePropertyShorthand&) const;
void appendBackgroundPropertyAsText(StringBuilder& result, unsigned& numDecls) const;
+ // Valid if all we can serialize to just a css-wide keyword.
+ // Invalid if either some longhands are not set, the important flag not set
+ // consistently, or any css-wide keywords are used.
+ // Unknown otherwise.
+ enum GenericCheckResult { Valid, Invalid, Unknown };
+ GenericCheckResult genericShorthandChecks(const StylePropertyShorthand&, String& result) const;
alancutter (OOO until 2018) 2016/05/18 07:32:54 The word generic isn't very clear to me, I start t
Timothy Loh 2016/05/18 08:09:44 This checks more than css-wide keywords though. Th
+
// Only StylePropertySerializer uses the following two classes.
class PropertyValueForSerializer {
STACK_ALLOCATED();

Powered by Google App Engine
This is Rietveld 408576698