Skip to content

Commit

Permalink
[CSSRegions]-webkit-flow-into initial value should be none instead of…
Browse files Browse the repository at this point in the history
… auto

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

Reviewed by Simon Fraser.

Source/WebCore:

No new tests, modified expectations for existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFlowThread):
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/regions/css-regions-disabled-expected.txt:
* fast/regions/script-tests/css-regions-disabled.js:
* fast/regions/script-tests/webkit-flow-parsing.js:
* fast/regions/webkit-flow-parsing-expected.txt:
* platform/chromium-mac-snowleopard/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-mac-snowleopard/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:


Canonical link: https://commits.webkit.org/96782@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mihneaOMV committed Feb 27, 2012
1 parent c409446 commit b2b8ec6
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 41 deletions.
23 changes: 23 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,26 @@
2012-02-27 Mihnea Ovidenie <mihnea@adobe.com>

[CSSRegions]-webkit-flow-into initial value should be none instead of auto
https://bugs.webkit.org/show_bug.cgi?id=79670

Reviewed by Simon Fraser.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/regions/css-regions-disabled-expected.txt:
* fast/regions/script-tests/css-regions-disabled.js:
* fast/regions/script-tests/webkit-flow-parsing.js:
* fast/regions/webkit-flow-parsing-expected.txt:
* platform/chromium-mac-snowleopard/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-mac-snowleopard/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

2012-02-27 Ojan Vafai <ojan@chromium.org>

implement display: -webkit-inline-flexbox
Expand Down
Expand Up @@ -211,7 +211,7 @@ zoom: 1;
-webkit-user-modify: read-only;
-webkit-user-select: text;
-webkit-writing-mode: horizontal-tb;
-webkit-flow-into: auto;
-webkit-flow-into: none;
-webkit-flow-from: none;
-webkit-region-overflow: auto;
-webkit-region-break-after: auto;
Expand Down
Expand Up @@ -210,7 +210,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-user-modify: read-only
-webkit-user-select: text
-webkit-writing-mode: horizontal-tb
-webkit-flow-into: auto
-webkit-flow-into: none
-webkit-flow-from: none
-webkit-region-overflow: auto
-webkit-region-break-after: auto
Expand Down
6 changes: 3 additions & 3 deletions LayoutTests/fast/regions/css-regions-disabled-expected.txt
Expand Up @@ -3,10 +3,10 @@ Test that parsing of css regions related properties is disabled by default.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS testWebKitFlowInto("-webkit-flow-into: auto") is ""
PASS testWebKitFlowInto("-webkit-flow-into: none") is ""
PASS testWebKitFlowInto("-webkit-flow-into: first-flow") is ""
PASS testComputedStyleWebKitFlowInto("auto") is "auto"
PASS testComputedStyleWebKitFlowInto("first-flow") is "auto"
PASS testComputedStyleWebKitFlowInto("none") is "none"
PASS testComputedStyleWebKitFlowInto("first-flow") is "none"
PASS testWebKitFlowFrom("-webkit-flow-from: first-flow") is ""
PASS testWebKitFlowFrom("-webkit-flow-from: none") is ""
PASS testComputedStyleWebKitFlowFrom("first-flow") is "none"
Expand Down
6 changes: 3 additions & 3 deletions LayoutTests/fast/regions/script-tests/css-regions-disabled.js
Expand Up @@ -48,10 +48,10 @@ function testComputedStyleWebKitRegionOverflow(value) {
return computedValue;
}

shouldBeEqualToString('testWebKitFlowInto("-webkit-flow-into: auto")', "");
shouldBeEqualToString('testWebKitFlowInto("-webkit-flow-into: none")', "");
shouldBeEqualToString('testWebKitFlowInto("-webkit-flow-into: first-flow")', "");
shouldBeEqualToString('testComputedStyleWebKitFlowInto("auto")', "auto");
shouldBeEqualToString('testComputedStyleWebKitFlowInto("first-flow")', "auto");
shouldBeEqualToString('testComputedStyleWebKitFlowInto("none")', "none");
shouldBeEqualToString('testComputedStyleWebKitFlowInto("first-flow")', "none");

shouldBeEqualToString('testWebKitFlowFrom("-webkit-flow-from: first-flow")', "");
shouldBeEqualToString('testWebKitFlowFrom("-webkit-flow-from: none")', "");
Expand Down
16 changes: 8 additions & 8 deletions LayoutTests/fast/regions/script-tests/webkit-flow-parsing.js
Expand Up @@ -32,7 +32,7 @@ function testNotInherited(parentValue, childValue) {
return childWebKitFlowComputedValue;
}

shouldBeEqualToString('test("-webkit-flow-into: auto")', "auto");
shouldBeEqualToString('test("-webkit-flow-into: none")', "none");
shouldBeEqualToString('test("-webkit-flow-into: first-flow")', "first-flow");
shouldBeEqualToString('test("-webkit-flow-into: \'first flow\'")', "");
shouldBeEqualToString('test("-webkit-flow-into: ;")', "");
Expand All @@ -41,13 +41,13 @@ shouldBeEqualToString('test("-webkit-flow-into: 1.2")', "");
shouldBeEqualToString('test("-webkit-flow-into: -1")', "");
shouldBeEqualToString('test("-webkit-flow-into: 12px")', "");

shouldBeEqualToString('testComputedStyle("auto")', "auto");
shouldBeEqualToString('testComputedStyle("")', "auto");
shouldBeEqualToString('testComputedStyle("\'first-flow\'")', "auto");
shouldBeEqualToString('testComputedStyle("none")', "none");
shouldBeEqualToString('testComputedStyle("")', "none");
shouldBeEqualToString('testComputedStyle("\'first-flow\'")', "none");
shouldBeEqualToString('testComputedStyle("first-flow")', "first-flow");
shouldBeEqualToString('testComputedStyle("12px")', "auto");
shouldBeEqualToString('testComputedStyle("12px")', "none");

shouldBeEqualToString('testNotInherited("auto", "auto")', "auto");
shouldBeEqualToString('testNotInherited("auto", "child-flow")', "child-flow");
shouldBeEqualToString('testNotInherited("parent-flow", "auto")', "auto");
shouldBeEqualToString('testNotInherited("none", "none")', "none");
shouldBeEqualToString('testNotInherited("none", "child-flow")', "child-flow");
shouldBeEqualToString('testNotInherited("parent-flow", "none")', "none");
shouldBeEqualToString('testNotInherited("parent-flow", "child-flow")', "child-flow");
16 changes: 8 additions & 8 deletions LayoutTests/fast/regions/webkit-flow-parsing-expected.txt
Expand Up @@ -3,22 +3,22 @@ Test parsing of the CSS webkit-flow-into property.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS test("-webkit-flow-into: auto") is "auto"
PASS test("-webkit-flow-into: none") is "none"
PASS test("-webkit-flow-into: first-flow") is "first-flow"
PASS test("-webkit-flow-into: 'first flow'") is ""
PASS test("-webkit-flow-into: ;") is ""
PASS test("-webkit-flow-into: 1") is ""
PASS test("-webkit-flow-into: 1.2") is ""
PASS test("-webkit-flow-into: -1") is ""
PASS test("-webkit-flow-into: 12px") is ""
PASS testComputedStyle("auto") is "auto"
PASS testComputedStyle("") is "auto"
PASS testComputedStyle("'first-flow'") is "auto"
PASS testComputedStyle("none") is "none"
PASS testComputedStyle("") is "none"
PASS testComputedStyle("'first-flow'") is "none"
PASS testComputedStyle("first-flow") is "first-flow"
PASS testComputedStyle("12px") is "auto"
PASS testNotInherited("auto", "auto") is "auto"
PASS testNotInherited("auto", "child-flow") is "child-flow"
PASS testNotInherited("parent-flow", "auto") is "auto"
PASS testComputedStyle("12px") is "none"
PASS testNotInherited("none", "none") is "none"
PASS testNotInherited("none", "child-flow") is "child-flow"
PASS testNotInherited("parent-flow", "none") is "none"
PASS testNotInherited("parent-flow", "child-flow") is "child-flow"
PASS successfullyParsed is true

Expand Down
Expand Up @@ -212,7 +212,7 @@ zoom: 1;
-webkit-user-modify: read-only;
-webkit-user-select: text;
-webkit-writing-mode: horizontal-tb;
-webkit-flow-into: auto;
-webkit-flow-into: none;
-webkit-flow-from: none;
-webkit-region-overflow: auto;
-webkit-region-break-after: auto;
Expand Down
Expand Up @@ -211,7 +211,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-user-modify: read-only
-webkit-user-select: text
-webkit-writing-mode: horizontal-tb
-webkit-flow-into: auto
-webkit-flow-into: none
-webkit-flow-from: none
-webkit-region-overflow: auto
-webkit-region-break-after: auto
Expand Down
Expand Up @@ -422,7 +422,7 @@ rect: style.getPropertyValue(-webkit-user-select) : text
rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-into) : auto
rect: style.getPropertyValue(-webkit-flow-into) : none
rect: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-from) : none
rect: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down Expand Up @@ -940,7 +940,7 @@ g: style.getPropertyValue(-webkit-user-select) : text
g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-into) : auto
g: style.getPropertyValue(-webkit-flow-into) : none
g: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-from) : none
g: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down
Expand Up @@ -212,7 +212,7 @@ zoom: 1;
-webkit-user-modify: read-only;
-webkit-user-select: text;
-webkit-writing-mode: horizontal-tb;
-webkit-flow-into: auto;
-webkit-flow-into: none;
-webkit-flow-from: none;
-webkit-region-overflow: auto;
-webkit-region-break-after: auto;
Expand Down
Expand Up @@ -211,7 +211,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-user-modify: read-only
-webkit-user-select: text
-webkit-writing-mode: horizontal-tb
-webkit-flow-into: auto
-webkit-flow-into: none
-webkit-flow-from: none
-webkit-region-overflow: auto
-webkit-region-break-after: auto
Expand Down
Expand Up @@ -422,7 +422,7 @@ rect: style.getPropertyValue(-webkit-user-select) : text
rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-into) : auto
rect: style.getPropertyValue(-webkit-flow-into) : none
rect: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-from) : none
rect: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down Expand Up @@ -940,7 +940,7 @@ g: style.getPropertyValue(-webkit-user-select) : text
g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-into) : auto
g: style.getPropertyValue(-webkit-flow-into) : none
g: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-from) : none
g: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down
Expand Up @@ -210,7 +210,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-user-modify: read-only
-webkit-user-select: text
-webkit-writing-mode: horizontal-tb
-webkit-flow-into: auto
-webkit-flow-into: none
-webkit-flow-from: none
-webkit-region-overflow: auto
-webkit-region-break-after: auto
Expand Down
Expand Up @@ -420,7 +420,7 @@ rect: style.getPropertyValue(-webkit-user-select) : text
rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-into) : auto
rect: style.getPropertyValue(-webkit-flow-into) : none
rect: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-from) : none
rect: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down Expand Up @@ -936,7 +936,7 @@ g: style.getPropertyValue(-webkit-user-select) : text
g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-into) : auto
g: style.getPropertyValue(-webkit-flow-into) : none
g: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-from) : none
g: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down
4 changes: 2 additions & 2 deletions LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Expand Up @@ -424,7 +424,7 @@ rect: style.getPropertyValue(-webkit-user-select) : text
rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-into) : auto
rect: style.getPropertyValue(-webkit-flow-into) : none
rect: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-flow-from) : none
rect: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down Expand Up @@ -944,7 +944,7 @@ g: style.getPropertyValue(-webkit-user-select) : text
g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-into) : auto
g: style.getPropertyValue(-webkit-flow-into) : none
g: style.getPropertyCSSValue(-webkit-flow-into) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-flow-from) : none
g: style.getPropertyCSSValue(-webkit-flow-from) : [object CSSPrimitiveValue]
Expand Down
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
2012-02-27 Mihnea Ovidenie <mihnea@adobe.com>

[CSSRegions]-webkit-flow-into initial value should be none instead of auto
https://bugs.webkit.org/show_bug.cgi?id=79670

Reviewed by Simon Fraser.

No new tests, modified expectations for existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFlowThread):
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):

2012-02-27 Ojan Vafai <ojan@chromium.org>

implement display: -webkit-inline-flexbox
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Expand Up @@ -2267,7 +2267,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return counterToCSSValue(style.get(), propertyID, cssValuePool);
case CSSPropertyWebkitFlowInto:
if (style->flowThread().isNull())
return cssValuePool->createIdentifierValue(CSSValueAuto);
return cssValuePool->createIdentifierValue(CSSValueNone);
return cssValuePool->createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
case CSSPropertyWebkitFlowFrom:
if (style->regionThread().isNull())
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/css/CSSParser.cpp
Expand Up @@ -7103,7 +7103,7 @@ bool CSSParser::parseFlowThread(int propId, bool important)
if (value->unit != CSSPrimitiveValue::CSS_IDENT)
return false;

if (value->id == CSSValueAuto) {
if (value->id == CSSValueNone) {
addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
return true;
}
Expand All @@ -7114,7 +7114,7 @@ bool CSSParser::parseFlowThread(int propId, bool important)
return false;
addProperty(propId, cssValuePool()->createValue(inputProperty, CSSPrimitiveValue::CSS_STRING), important);
} else
addProperty(propId, cssValuePool()->createIdentifierValue(CSSValueAuto), important);
addProperty(propId, cssValuePool()->createIdentifierValue(CSSValueNone), important);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/CSSStyleApplyProperty.cpp
Expand Up @@ -1941,7 +1941,7 @@ CSSStyleApplyProperty::CSSStyleApplyProperty()
setPropertyHandler(CSSPropertyWebkitColumnSpan, ApplyPropertyDefault<ColumnSpan, &RenderStyle::columnSpan, ColumnSpan, &RenderStyle::setColumnSpan, ColumnSpan, &RenderStyle::initialColumnSpan>::createHandler());
setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto<float, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth, ComputeLength>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlowFrom, ApplyPropertyString<MapNoneToNull, &RenderStyle::regionThread, &RenderStyle::setRegionThread, &RenderStyle::initialRegionThread>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlowInto, ApplyPropertyString<MapAutoToNull, &RenderStyle::flowThread, &RenderStyle::setFlowThread, &RenderStyle::initialFlowThread>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlowInto, ApplyPropertyString<MapNoneToNull, &RenderStyle::flowThread, &RenderStyle::setFlowThread, &RenderStyle::initialFlowThread>::createHandler());
setPropertyHandler(CSSPropertyWebkitHighlight, ApplyPropertyString<MapNoneToNull, &RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight>::createHandler());
setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString<MapAutoToNull, &RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString>::createHandler());
setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitAfter, &RenderStyle::setHyphenationLimitAfter, &RenderStyle::initialHyphenationLimitAfter>::createHandler());
Expand Down

0 comments on commit b2b8ec6

Please sign in to comment.