Skip to content
Permalink
Browse files
Source/WebCore: Remove ENABLE_CSS_COMPOSITING guards around -webkit-b…
…ackground-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.

https://bugs.webkit.org/show_bug.cgi?id=117619

Patch by Horia Iosif Olaru <olaru@adobe.com> on 2013-06-27
Reviewed by Dean Jackson.

Test: css3/compositing/effect-background-blend-mode-tiled.html

* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):

LayoutTests: Add an extra test to check if tiled background images get blended as expected. This test passed before this change. The tests for this change are the existing background-blend-mode tests.

https://bugs.webkit.org/show_bug.cgi?id=117619

Patch by Horia Iosif Olaru <olaru@adobe.com> on 2013-06-27
Reviewed by Dean Jackson.

* css3/compositing/effect-background-blend-mode-tiled-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-tiled.html: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-tiled-expected.png: Added.

Canonical link: https://commits.webkit.org/136162@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
horiaolaru authored and webkit-commit-queue committed Jun 27, 2013
1 parent 4b77e2c commit 8a3e06a58e5c6168d50ee4dd9474cfc8c947ada4
Showing 12 changed files with 82 additions and 20 deletions.
@@ -1,3 +1,15 @@
2013-06-27 Horia Iosif Olaru <olaru@adobe.com>

Add an extra test to check if tiled background images get blended as expected. This test passed before this change. The tests for this change are the existing background-blend-mode tests.

https://bugs.webkit.org/show_bug.cgi?id=117619

Reviewed by Dean Jackson.

* css3/compositing/effect-background-blend-mode-tiled-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-tiled.html: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-tiled-expected.png: Added.

2013-06-26 Kihong Kwon <kihong.kwon@samsung.com>

Vibration cannot be canceled during pattern vibration.
@@ -0,0 +1,39 @@
<!DOCTYPE HTML>
<script>
if (window.testRunner)
window.testRunner.dumpAsText(true);
</script>
<style>

li
{
margin: 5px;
width: 130px;
height: 130px;
background: url("resources/ducky.png") 0 0 /50% 50%, linear-gradient(to right, #00ffff 0%, rgba(0,0,255,0) 24%, #ff0000 50%, #ffff00 75%, #00ff00 100%) 0 0 /100% 100%;
display: block;
float: left;
}
</style>
<!-- this file should contain a duck on top of a gradient with every type of blending -->
<body style="background-color: green">
<ul>
<li style="-webkit-background-blend-mode: normal, normal"></li>
<li style="-webkit-background-blend-mode: multiply, normal"></li>
<li style="-webkit-background-blend-mode: screen, normal"></li>
<li style="-webkit-background-blend-mode: overlay, normal; opacity:.9"></li>
<li style="-webkit-background-blend-mode: darken, normal"></li>
<li style="-webkit-background-blend-mode: lighten, normal"></li>
<li style="-webkit-background-blend-mode: color-dodge, normal"></li>
<li style="-webkit-background-blend-mode: color-burn, normal"></li>
<li style="-webkit-background-blend-mode: hard-light, normal"></li>
<li style="-webkit-background-blend-mode: soft-light, normal"></li>
<li style="-webkit-background-blend-mode: difference, normal"></li>
<li style="-webkit-background-blend-mode: exclusion, normal"></li>
<li style="-webkit-background-blend-mode: hue, normal;"></li>
<li style="-webkit-background-blend-mode: saturation, normal"></li>
<li style="-webkit-background-blend-mode: color, normal"></li>
<li style="-webkit-background-blend-mode: luminosity, normal"></li>
</ul>
</body>

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,3 +1,26 @@
2013-06-27 Horia Iosif Olaru <olaru@adobe.com>

Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.

https://bugs.webkit.org/show_bug.cgi?id=117619

Reviewed by Dean Jackson.

Test: css3/compositing/effect-background-blend-mode-tiled.html

* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):

2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>

Rename WorkerContext to WorkerGlobalScope
@@ -731,6 +731,7 @@ __ZN7WebCore21setGlobalIconDatabaseEPNS_16IconDatabaseBaseE
__ZN7WebCore21setPlatformStrategiesEPNS_18PlatformStrategiesE
__ZN7WebCore22HTMLPlugInImageElement24restartSnapshottedPlugInEv
__ZN7WebCore22HTMLPlugInImageElement29setIsPrimarySnapshottedPlugInEb
__ZN7WebCore22RuntimeEnabledFeatures23isCSSCompositingEnabledE
__ZN7WebCore22RuntimeEnabledFeatures22isCSSExclusionsEnabledE
__ZN7WebCore22RuntimeEnabledFeatures18isCSSShapesEnabledE
__ZN7WebCore22RuntimeEnabledFeatures40isLangAttributeAwareFormControlUIEnabledE
@@ -2753,10 +2754,6 @@ __ZN7WebCore18HTMLContentElement6createEPNS_8DocumentE
__ZN7WebCore22RuntimeEnabledFeatures19isCSSRegionsEnabledE
#endif

#if ENABLE(CSS_COMPOSITING)
__ZN7WebCore22RuntimeEnabledFeatures23isCSSCompositingEnabledE
#endif

#if ENABLE(IFRAME_SEAMLESS)
__ZN7WebCore22RuntimeEnabledFeatures25areSeamlessIFramesEnabledE
#endif
@@ -95,13 +95,8 @@ class RuntimeEnabledFeatures {
static bool cssRegionsEnabled() { return false; }
#endif

#if ENABLE(CSS_COMPOSITING)
static void setCSSCompositingEnabled(bool isEnabled) { isCSSCompositingEnabled = isEnabled; }
static bool cssCompositingEnabled() { return isCSSCompositingEnabled; }
#else
static void setCSSCompositingEnabled(bool) { }
static bool cssCompositingEnabled() { return false; }
#endif

#if ENABLE(FONT_LOAD_EVENTS)
static void setFontLoadEventsEnabled(bool isEnabled) { isFontLoadEventsEnabled = isEnabled; }
@@ -228,13 +228,13 @@ static const CSSPropertyID computedProperties[] = {
CSSPropertyWebkitAnimationTimingFunction,
CSSPropertyWebkitAppearance,
CSSPropertyWebkitBackfaceVisibility,
CSSPropertyWebkitBackgroundBlendMode,
CSSPropertyWebkitBackgroundClip,
CSSPropertyWebkitBackgroundComposite,
CSSPropertyWebkitBackgroundOrigin,
CSSPropertyWebkitBackgroundSize,
#if ENABLE(CSS_COMPOSITING)
CSSPropertyWebkitBlendMode,
CSSPropertyWebkitBackgroundBlendMode,
#endif
CSSPropertyWebkitBorderFit,
CSSPropertyWebkitBorderHorizontalSpacing,
@@ -2726,7 +2726,7 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyWebkitBlendMode:
return cssValuePool().createValue(style->blendMode());
#endif
case CSSPropertyWebkitBackgroundBlendMode: {
const FillLayer* layers = style->backgroundLayers();
if (!layers->next())
@@ -2738,7 +2738,6 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert

return list.release();
}
#endif
case CSSPropertyBackground:
return getBackgroundShorthandValue();
case CSSPropertyBorder: {
@@ -2098,6 +2098,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
#endif

case CSSPropertyBackgroundAttachment:
case CSSPropertyWebkitBackgroundBlendMode:
case CSSPropertyBackgroundClip:
case CSSPropertyWebkitBackgroundClip:
case CSSPropertyWebkitBackgroundComposite:
@@ -2123,9 +2124,6 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyWebkitMaskRepeat:
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyWebkitBackgroundBlendMode:
#endif
{
RefPtr<CSSValue> val1;
RefPtr<CSSValue> val2;
@@ -4379,7 +4377,6 @@ bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1,
m_valueList->next();
}
break;
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyWebkitBackgroundBlendMode:
if (cssCompositingEnabled() && (val->id == CSSValueNormal || val->id == CSSValueMultiply
|| val->id == CSSValueScreen || val->id == CSSValueOverlay || val->id == CSSValueDarken
@@ -4391,7 +4388,6 @@ bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1,
m_valueList->next();
}
break;
#endif
case CSSPropertyBackgroundRepeat:
case CSSPropertyWebkitMaskRepeat:
parseFillRepeat(currValue, currValue2);
@@ -516,6 +516,7 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
case CSSPropertyWebkitAnimationTimingFunction:
case CSSPropertyWebkitAppearance:
case CSSPropertyWebkitBackfaceVisibility:
case CSSPropertyWebkitBackgroundBlendMode:
case CSSPropertyWebkitBackgroundClip:
case CSSPropertyWebkitBackgroundComposite:
case CSSPropertyWebkitBackgroundOrigin:
@@ -571,7 +572,6 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
#endif
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyWebkitBlendMode:
case CSSPropertyWebkitBackgroundBlendMode:
#endif
case CSSPropertyWebkitAlignContent:
case CSSPropertyWebkitAlignItems:
@@ -221,6 +221,7 @@ z-index
-webkit-appearance
-webkit-aspect-ratio
-webkit-backface-visibility
-webkit-background-blend-mode
-webkit-background-clip
-webkit-background-composite
-webkit-background-origin
@@ -282,7 +283,6 @@ z-index
#endif
#if defined(ENABLE_CSS_COMPOSITING) && ENABLE_CSS_COMPOSITING
-webkit-blend-mode
-webkit-background-blend-mode
#endif
#if defined(ENABLE_CSS_FILTERS) && ENABLE_CSS_FILTERS
-webkit-filter
@@ -2217,13 +2217,13 @@ DeprecatedStyleBuilder::DeprecatedStyleBuilder()
setPropertyHandler(CSSPropertyWebkitAppearance, ApplyPropertyDefault<ControlPart, &RenderStyle::appearance, ControlPart, &RenderStyle::setAppearance, ControlPart, &RenderStyle::initialAppearance>::createHandler());
setPropertyHandler(CSSPropertyWebkitAspectRatio, ApplyPropertyAspectRatio::createHandler());
setPropertyHandler(CSSPropertyWebkitBackfaceVisibility, ApplyPropertyDefault<EBackfaceVisibility, &RenderStyle::backfaceVisibility, EBackfaceVisibility, &RenderStyle::setBackfaceVisibility, EBackfaceVisibility, &RenderStyle::initialBackfaceVisibility>::createHandler());
setPropertyHandler(CSSPropertyWebkitBackgroundBlendMode, ApplyPropertyFillLayer<BlendMode, CSSPropertyWebkitBackgroundBlendMode, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isBlendModeSet, &FillLayer::blendMode, &FillLayer::setBlendMode, &FillLayer::clearBlendMode, &FillLayer::initialFillBlendMode, &CSSToStyleMap::mapFillBlendMode>::createHandler());
setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip);
setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
#if ENABLE(CSS_COMPOSITING)
setPropertyHandler(CSSPropertyWebkitBlendMode, ApplyPropertyDefault<BlendMode, &RenderStyle::blendMode, BlendMode, &RenderStyle::setBlendMode, BlendMode, &RenderStyle::initialBlendMode>::createHandler());
setPropertyHandler(CSSPropertyWebkitBackgroundBlendMode, ApplyPropertyFillLayer<BlendMode, CSSPropertyWebkitBackgroundBlendMode, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isBlendModeSet, &FillLayer::blendMode, &FillLayer::setBlendMode, &FillLayer::clearBlendMode, &FillLayer::initialFillBlendMode, &CSSToStyleMap::mapFillBlendMode>::createHandler());
#endif
setPropertyHandler(CSSPropertyWebkitBorderFit, ApplyPropertyDefault<EBorderFit, &RenderStyle::borderFit, EBorderFit, &RenderStyle::setBorderFit, EBorderFit, &RenderStyle::initialBorderFit>::createHandler());
setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing>::createHandler());

0 comments on commit 8a3e06a

Please sign in to comment.