| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 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 27 matching lines...) Expand all Loading... |
| 38 typedef Vector<bool> BoolVector; | 38 typedef Vector<bool> BoolVector; |
| 39 | 39 |
| 40 static void setCSSPropertiesEnabled(CSSPropertyID* properties, size_t length, bo
ol featureFlag) | 40 static void setCSSPropertiesEnabled(CSSPropertyID* properties, size_t length, bo
ol featureFlag) |
| 41 { | 41 { |
| 42 for (size_t i = 0; i < length; i++) | 42 for (size_t i = 0; i < length; i++) |
| 43 RuntimeCSSEnabled::setCSSPropertyEnabled(properties[i], featureFlag); | 43 RuntimeCSSEnabled::setCSSPropertyEnabled(properties[i], featureFlag); |
| 44 } | 44 } |
| 45 | 45 |
| 46 static void setPropertySwitchesFromRuntimeFeatures(BoolVector& properties) | 46 static void setPropertySwitchesFromRuntimeFeatures(BoolVector& properties) |
| 47 { | 47 { |
| 48 #if ENABLE(CSS_REGIONS) | |
| 49 CSSPropertyID regionProperites[] = { | 48 CSSPropertyID regionProperites[] = { |
| 50 CSSPropertyWebkitFlowInto, | 49 CSSPropertyWebkitFlowInto, |
| 51 CSSPropertyWebkitFlowFrom, | 50 CSSPropertyWebkitFlowFrom, |
| 52 CSSPropertyWebkitRegionOverflow, | 51 CSSPropertyWebkitRegionOverflow, |
| 53 CSSPropertyWebkitRegionBreakAfter, | 52 CSSPropertyWebkitRegionBreakAfter, |
| 54 CSSPropertyWebkitRegionBreakBefore, | 53 CSSPropertyWebkitRegionBreakBefore, |
| 55 CSSPropertyWebkitRegionBreakInside | 54 CSSPropertyWebkitRegionBreakInside |
| 56 }; | 55 }; |
| 57 setCSSPropertiesEnabled(regionProperites, WTF_ARRAY_LENGTH(regionProperites)
, RuntimeEnabledFeatures::cssRegionsEnabled()); | 56 setCSSPropertiesEnabled(regionProperites, WTF_ARRAY_LENGTH(regionProperites)
, RuntimeEnabledFeatures::cssRegionsEnabled()); |
| 58 #endif | |
| 59 #if ENABLE(CSS_EXCLUSIONS) | 57 #if ENABLE(CSS_EXCLUSIONS) |
| 60 CSSPropertyID exclusionProperties[] = { | 58 CSSPropertyID exclusionProperties[] = { |
| 61 CSSPropertyWebkitWrap, | 59 CSSPropertyWebkitWrap, |
| 62 CSSPropertyWebkitWrapFlow, | 60 CSSPropertyWebkitWrapFlow, |
| 63 CSSPropertyWebkitShapeMargin, | 61 CSSPropertyWebkitShapeMargin, |
| 64 CSSPropertyWebkitShapePadding, | 62 CSSPropertyWebkitShapePadding, |
| 65 CSSPropertyWebkitWrapThrough, | 63 CSSPropertyWebkitWrapThrough, |
| 66 CSSPropertyWebkitShapeInside, | 64 CSSPropertyWebkitShapeInside, |
| 67 CSSPropertyWebkitShapeOutside, | 65 CSSPropertyWebkitShapeOutside, |
| 68 }; | 66 }; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID
* properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) | 103 void RuntimeCSSEnabled::filterEnabledCSSPropertiesIntoVector(const CSSPropertyID
* properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) |
| 106 { | 104 { |
| 107 for (unsigned i = 0; i < propertyCount; i++) { | 105 for (unsigned i = 0; i < propertyCount; i++) { |
| 108 CSSPropertyID property = properties[i]; | 106 CSSPropertyID property = properties[i]; |
| 109 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) | 107 if (RuntimeCSSEnabled::isCSSPropertyEnabled(property)) |
| 110 outVector.append(property); | 108 outVector.append(property); |
| 111 } | 109 } |
| 112 } | 110 } |
| 113 | 111 |
| 114 } // namespace WebCore | 112 } // namespace WebCore |
| OLD | NEW |