static PropertyNamePrefix getCSSPropertyNamePrefix(const StringImpl& propertyName) { ASSERT(propertyName.length()); // First character of the prefix within the property name may be upper or lowercase. UChar firstChar = toASCIILower(propertyName[0]); switch (firstChar) { #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES) case 'a': if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "apple")) return PropertyNamePrefixApple; break; #endif case 'c': if (matchesCSSPropertyNamePrefix(propertyName, "css")) return PropertyNamePrefixCSS; break; #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES) case 'k': if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "khtml")) return PropertyNamePrefixKHTML; break; #endif case 'e': if (matchesCSSPropertyNamePrefix(propertyName, "epub")) return PropertyNamePrefixEpub; break; case 'p': if (matchesCSSPropertyNamePrefix(propertyName, "pos")) return PropertyNamePrefixPos; if (matchesCSSPropertyNamePrefix(propertyName, "pixel")) return PropertyNamePrefixPixel; break; case 'w': if (matchesCSSPropertyNamePrefix(propertyName, "webkit")) return PropertyNamePrefixWebKit; break; default: break; } return PropertyNamePrefixNone; }
static PropertyNamePrefix getCSSPropertyNamePrefix(const StringImpl& propertyName) { ASSERT(propertyName.length()); // First character of the prefix within the property name may be upper or lowercase. UChar firstChar = toASCIILower(propertyName[0]); switch (firstChar) { case 'a': if (matchesCSSPropertyNamePrefix(propertyName, "apple")) return PropertyNamePrefixApple; break; case 'c': if (matchesCSSPropertyNamePrefix(propertyName, "css")) return PropertyNamePrefixCSS; break; case 'k': if (matchesCSSPropertyNamePrefix(propertyName, "khtml")) return PropertyNamePrefixKHTML; break; case 'e': if (matchesCSSPropertyNamePrefix(propertyName, "epub")) return PropertyNamePrefixEpub; break; case 'p': if (matchesCSSPropertyNamePrefix(propertyName, "pos")) return PropertyNamePrefixPos; if (matchesCSSPropertyNamePrefix(propertyName, "pixel")) return PropertyNamePrefixPixel; break; case 'w': if (matchesCSSPropertyNamePrefix(propertyName, "webkit")) return PropertyNamePrefixWebKit; break; default: break; } return PropertyNamePrefixNone; }