From 48e4038ff45b7af74567b24a3b3b7308e4200bec Mon Sep 17 00:00:00 2001 From: "mitz@apple.com" Date: Thu, 8 Mar 2012 19:18:44 +0000 Subject: [PATCH] REGRESSION (r109964): Assertion failure (!isUndefined()) in Length::getIntValue() when a Dashboard region is specified without offsets https://bugs.webkit.org/show_bug.cgi?id=80614 Reviewed by Beth Dakin. Source/WebCore: Test: fast/css/dashboard-regions-undefined-length-assertion.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Reverted to setting zero lengths, rather than Undefined ones, in the RenderStyle when offsets are not given. LayoutTests: * fast/css/dashboard-regions-undefined-length-assertion-expected.txt: Added. * fast/css/dashboard-regions-undefined-length-assertion.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110180 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 10 ++++++++++ ...-regions-undefined-length-assertion-expected.txt | 1 + ...ashboard-regions-undefined-length-assertion.html | 6 ++++++ Source/WebCore/ChangeLog | 13 +++++++++++++ Source/WebCore/css/CSSStyleSelector.cpp | 10 ++++++++++ 5 files changed, 40 insertions(+) create mode 100644 LayoutTests/fast/css/dashboard-regions-undefined-length-assertion-expected.txt create mode 100644 LayoutTests/fast/css/dashboard-regions-undefined-length-assertion.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 41671edb281d..31d461404d1b 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2012-03-08 Dan Bernstein + + REGRESSION (r109964): Assertion failure (!isUndefined()) in Length::getIntValue() when a Dashboard region is specified without offsets + https://bugs.webkit.org/show_bug.cgi?id=80614 + + Reviewed by Beth Dakin. + + * fast/css/dashboard-regions-undefined-length-assertion-expected.txt: Added. + * fast/css/dashboard-regions-undefined-length-assertion.html: Added. + 2012-03-08 Stephen White [chromium] Unreviewed gardening. diff --git a/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion-expected.txt b/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion-expected.txt new file mode 100644 index 000000000000..9a151d8c87dd --- /dev/null +++ b/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion-expected.txt @@ -0,0 +1 @@ +The test passes if it does not cause an assertion failure. diff --git a/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion.html b/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion.html new file mode 100644 index 000000000000..aac5f3903343 --- /dev/null +++ b/LayoutTests/fast/css/dashboard-regions-undefined-length-assertion.html @@ -0,0 +1,6 @@ + +
+

The test passes if it does not cause an assertion failure.

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 576a1f9e6474..b0dde7dcfb31 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2012-03-08 Dan Bernstein + + REGRESSION (r109964): Assertion failure (!isUndefined()) in Length::getIntValue() when a Dashboard region is specified without offsets + https://bugs.webkit.org/show_bug.cgi?id=80614 + + Reviewed by Beth Dakin. + + Test: fast/css/dashboard-regions-undefined-length-assertion.html + + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::collectMatchingRulesForList): Reverted to setting zero lengths, + rather than Undefined ones, in the RenderStyle when offsets are not given. + 2012-03-08 Mikkel Kruse Johnsen WebKitGtk+ fails to build on win32 against GTK3 diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp index 0307b95d6bfc..59f615a6a957 100644 --- a/Source/WebCore/css/CSSStyleSelector.cpp +++ b/Source/WebCore/css/CSSStyleSelector.cpp @@ -3543,6 +3543,16 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Length right = convertToIntLength(region->right(), style(), m_rootElementStyle); Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle); Length left = convertToIntLength(region->left(), style(), m_rootElementStyle); + + if (top.isUndefined()) + top = Length(); + if (right.isUndefined()) + right = Length(); + if (bottom.isUndefined()) + bottom = Length(); + if (left.isUndefined()) + left = Length(); + if (region->m_isCircle) m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true); else if (region->m_isRectangle) -- 2.36.0