Bug 135926

Summary: [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
Product: WebKit Reporter: Rebecca Hauck <rhauck>
Component: Tools / TestsAssignee: Bem Jones-Bey <bjonesbe>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, bjonesbe, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Rebecca Hauck 2014-08-13 19:18:51 PDT
The following test imported from the W3C CSS Shapes test suite has some failures in it with some calc() computed values:

LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001.html

If it turns out that the test needs to be updated, it should be done in the W3C test repo then re-imported.
Comment 1 Bem Jones-Bey 2014-08-19 09:45:41 PDT
Note that this test crashes in a Debug build on an ASSERT:

SHOULD NEVER BE REACHED
/Users/bjonesbe/Code/webkit/svn/Source/WebCore/css/CSSPrimitiveValueMappings.h(123) : float WebCore::CSSPrimitiveValue::operator float() const
1   0x1041f51f0 WTFCrash
2   0x105a420fe WebCore::CSSPrimitiveValue::operator float<float>() const
3   0x105a41fd7 WebCore::ApplyPropertyDefault<float, &(WebCore::RenderStyle::shapeImageThreshold() const), float, &(WebCore::RenderStyle::setShapeImageThreshold(float)), float, &(WebCore::RenderStyle::initialShapeImageThreshold())>::applyValue(WebCore::CSSPropertyID, WebCore::StyleResolver*, WebCore::CSSValue*)
4   0x10710c38b WebCore::PropertyHandler::applyValue(WebCore::CSSPropertyID, WebCore::StyleResolver*, WebCore::CSSValue*) const
5   0x1070fcb59 WebCore::StyleResolver::applyProperty(WebCore::CSSPropertyID, WebCore::CSSValue*)
6   0x107109f37 WebCore::StyleResolver::CascadedProperties::Property::apply(WebCore::StyleResolver&)
7   0x1070fc68a WebCore::StyleResolver::applyCascadedProperties(WebCore::StyleResolver::CascadedProperties&, int, int)
8   0x1070fad97 WebCore::StyleResolver::applyMatchedProperties(WebCore::StyleResolver::MatchResult const&, WebCore::Element const*, WebCore::StyleResolver::ShouldUseMatchedPropertiesCache)
9   0x1070f89f3 WebCore::StyleResolver::styleForElement(WebCore::Element*, WebCore::RenderStyle*, WebCore::StyleSharingBehavior, WebCore::RuleMatchingBehavior, WebCore::RenderRegion*)
10  0x10712a313 WebCore::Style::styleForElement(WebCore::Element&, WebCore::RenderStyle&)
11  0x107129470 WebCore::Style::createRendererIfNeeded(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WTF::PassRefPtr<WebCore::RenderStyle>)
12  0x10712902d WebCore::Style::attachRenderTree(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WTF::PassRefPtr<WebCore::RenderStyle>)
13  0x107129a3b WebCore::Style::attachChildren(WebCore::ContainerNode&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&)
14  0x1071290ff WebCore::Style::attachRenderTree(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WTF::PassRefPtr<WebCore::RenderStyle>)
15  0x1071283d2 WebCore::Style::resolveLocal(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WebCore::Style::Change)
16  0x107125ccc WebCore::Style::resolveTree(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WebCore::Style::Change)
17  0x107125f21 WebCore::Style::resolveTree(WebCore::Element&, WebCore::RenderStyle&, WebCore::Style::RenderTreePosition&, WebCore::Style::Change)
18  0x107125b68 WebCore::Style::resolveTree(WebCore::Document&, WebCore::Style::Change)
19  0x105aba536 WebCore::Document::recalcStyle(WebCore::Style::Change)
20  0x105ab6acf WebCore::Document::updateStyleIfNeeded()
21  0x105acb484 WebCore::Document::updateStyleIfNeededForNode(WebCore::Node const&)
22  0x105866f52 WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const
23  0x105866e92 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const
24  0x105866906 WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const
25  0x10587b6cd WebCore::CSSComputedStyleDeclaration::getPropertyValue(WTF::String const&)
26  0x106393b97 WebCore::jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(JSC::ExecState*)
27  0x23c4d7a01034
28  0x103fe3ad8 llint_entry
29  0x103fe3cc5 llint_entry
30  0x103fe3cc5 llint_entry
31  0x23c4d7a01a9a

This is happening in CSSPrimitiveValueMappings.h:123. It looks like the root of the problem is that it's not expecting to have a calc() argument here.
Comment 2 Bem Jones-Bey 2014-08-19 10:25:00 PDT
*** Bug 136075 has been marked as a duplicate of this bug. ***
Comment 3 Bem Jones-Bey 2014-08-19 11:51:18 PDT
Created attachment 236819 [details]
Patch
Comment 4 WebKit Commit Bot 2014-08-19 13:41:23 PDT
Comment on attachment 236819 [details]
Patch

Clearing flags on attachment: 236819

Committed r172757: <http://trac.webkit.org/changeset/172757>
Comment 5 WebKit Commit Bot 2014-08-19 13:41:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Benjamin Poulain 2014-08-19 22:56:05 PDT
Thanks!