Title: [193525] branches/safari-601-branch
Revision
193525
Author
matthew_han...@apple.com
Date
2015-12-05 11:54:21 -0800 (Sat, 05 Dec 2015)

Log Message

Merge r191151. rdar://problem/23772904

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,5 +1,37 @@
 2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r191151. rdar://problem/23772904
+
+    2015-10-15  David Hyatt  <hy...@apple.com>
+
+            Add support for the CSS 'unset' keyword.
+            https://bugs.webkit.org/show_bug.cgi?id=148614
+
+            Reviewed by Dean Jackson.
+
+            * TestExpectations:
+            Remove the 3 failing variables tests that used the unset keyword now that they pass.
+
+            * fast/css/unset-keyword-expected.html: Added.
+            * fast/css/unset-keyword.html: Added.
+            New test for both inherited and initial properties.
+
+            * fast/css/variables/test-suite/129-expected.html: Added.
+            * fast/css/variables/test-suite/129.html: Added.
+            * fast/css/variables/test-suite/130-expected.html: Added.
+            * fast/css/variables/test-suite/130.html: Added.
+            * fast/css/variables/test-suite/134-expected.html: Added.
+            * fast/css/variables/test-suite/134.html: Added.
+            * fast/css/variables/test-suite/failures/129-expected.html: Removed.
+            * fast/css/variables/test-suite/failures/129.html: Removed.
+            * fast/css/variables/test-suite/failures/130-expected.html: Removed.
+            * fast/css/variables/test-suite/failures/130.html: Removed.
+            * fast/css/variables/test-suite/failures/134-expected.html: Removed.
+            * fast/css/variables/test-suite/failures/134.html: Removed.
+            Move these tests into the passing directory.
+
+2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r190868. rdar://problem/23769584
 
     2015-10-12  Brent Fulgham  <bfulg...@apple.com>

Modified: branches/safari-601-branch/LayoutTests/TestExpectations (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/TestExpectations	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/TestExpectations	2015-12-05 19:54:21 UTC (rev 193525)
@@ -572,9 +572,6 @@
 webkit.org/b/150183 fast/css/variables/test-suite/failures/111.html [ ImageOnlyFailure ]
 webkit.org/b/150183 fast/css/variables/test-suite/failures/115.html [ ImageOnlyFailure ]
 webkit.org/b/150183 fast/css/variables/test-suite/failures/126.html [ ImageOnlyFailure ]
-webkit.org/b/150183 fast/css/variables/test-suite/failures/129.html [ ImageOnlyFailure ]
-webkit.org/b/150183 fast/css/variables/test-suite/failures/130.html [ ImageOnlyFailure ]
-webkit.org/b/150183 fast/css/variables/test-suite/failures/134.html [ ImageOnlyFailure ]
 webkit.org/b/150183 fast/css/variables/test-suite/failures/152.html [ ImageOnlyFailure ]
 webkit.org/b/150183 fast/css/variables/test-suite/failures/159.html [ ImageOnlyFailure ]
 webkit.org/b/150183 fast/css/variables/test-suite/failures/161.html [ ImageOnlyFailure ]

Added: branches/safari-601-branch/LayoutTests/fast/css/unset-keyword-expected.html (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/unset-keyword-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/unset-keyword-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,10 @@
+<head>
+<style>
+body { color: green; background-color:#ccc; }
+p { border-left:5px solid black; border-right:5px solid black; }
+</style>
+</head>
+<body>
+This text should be green on a grey background and have only side borders.
+</body>
+</html>

Added: branches/safari-601-branch/LayoutTests/fast/css/unset-keyword.html (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/unset-keyword.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/unset-keyword.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,10 @@
+<head>
+<style>
+body { color: green; background-color:#ccc; }
+p { border:5px solid black; color: orange; color:unset; background-color:blue; background-color:unset; border-top:unset; border-bottom:unset; }
+</style>
+</head>
+<body>
+This text should be green on a grey background and have only side borders.
+</body>
+</html>

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129-expected.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129-expected.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Reftest Reference</title>
+<link href="" rel="author" title="Cameron McCormack">
+<style>
+p {
+  color: green;
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/129.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Test: Test declaring a variable whose value is "unset" where there is a variable to inherit from.</title>
+<link href="" rel="author" title="Cameron McCormack">
+<link href="" rel="help">
+<link href="" rel="match">
+<style>
+body {
+  --a: green;
+  color: crimson;
+}
+p {
+  color: red;
+}
+p {
+  color: orange;
+  --a: unset;
+  color: var(--a);
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130-expected.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130-expected.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Reftest Reference</title>
+<link href="" rel="author" title="Cameron McCormack">
+<style>
+p {
+  color: green;
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/130.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Test: Test declaring a variable whose value consists of a reference to a variable whose value is "unset".</title>
+<link href="" rel="author" title="Cameron McCormack">
+<link href="" rel="help">
+<link href="" rel="match">
+<style>
+body {
+  --b: green;
+  color: crimson;
+}
+p {
+  color: red;
+}
+p {
+  color: orange;
+  --a: var(--b);
+  --b: unset;
+  color: var(--a);
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134-expected.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134-expected.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Reftest Reference</title>
+<link href="" rel="author" title="Cameron McCormack">
+<style>
+p {
+  color: green;
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Copied: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134.html (from rev 193524, branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134.html) (0 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/134.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head><title>CSS Test: Test declaring a variable whose value is "unset" where there is no variable to inherit from.</title>
+<link href="" rel="author" title="Cameron McCormack">
+<link href="" rel="help">
+<link href="" rel="match">
+<style>
+p {
+  color: red;
+}
+p {
+  color: orange;
+  --a: unset;
+  color: var(--a,green);
+}
+</style>
+</head><body><p>This text must be green.</p>
+</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129-expected.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129-expected.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Reftest Reference</title>
-<link href="" rel="author" title="Cameron McCormack">
-<style>
-p {
-  color: green;
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/129.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Test: Test declaring a variable whose value is "unset" where there is a variable to inherit from.</title>
-<link href="" rel="author" title="Cameron McCormack">
-<link href="" rel="help">
-<link href="" rel="match">
-<style>
-body {
-  --a: green;
-  color: crimson;
-}
-p {
-  color: red;
-}
-p {
-  color: orange;
-  --a: unset;
-  color: var(--a);
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130-expected.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130-expected.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Reftest Reference</title>
-<link href="" rel="author" title="Cameron McCormack">
-<style>
-p {
-  color: green;
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/130.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Test: Test declaring a variable whose value consists of a reference to a variable whose value is "unset".</title>
-<link href="" rel="author" title="Cameron McCormack">
-<link href="" rel="help">
-<link href="" rel="match">
-<style>
-body {
-  --b: green;
-  color: crimson;
-}
-p {
-  color: red;
-}
-p {
-  color: orange;
-  --a: var(--b);
-  --b: unset;
-  color: var(--a);
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134-expected.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134-expected.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134-expected.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Reftest Reference</title>
-<link href="" rel="author" title="Cameron McCormack">
-<style>
-p {
-  color: green;
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Deleted: branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134.html (193524 => 193525)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134.html	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/test-suite/failures/134.html	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
---><html><head><title>CSS Test: Test declaring a variable whose value is "unset" where there is no variable to inherit from.</title>
-<link href="" rel="author" title="Cameron McCormack">
-<link href="" rel="help">
-<link href="" rel="match">
-<style>
-p {
-  color: red;
-}
-p {
-  color: orange;
-  --a: unset;
-  color: var(--a,green);
-}
-</style>
-</head><body><p>This text must be green.</p>
-</body></html>
\ No newline at end of file

Modified: branches/safari-601-branch/Source/WebCore/CMakeLists.txt (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/CMakeLists.txt	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/CMakeLists.txt	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1313,6 +1313,7 @@
     css/CSSToLengthConversionData.cpp
     css/CSSToStyleMap.cpp
     css/CSSUnicodeRangeValue.cpp
+    css/CSSUnsetValue.cpp
     css/CSSValue.cpp
     css/CSSValueList.cpp
     css/CSSValuePool.cpp

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1,5 +1,93 @@
 2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r191151. rdar://problem/23772904
+
+    2015-10-15  David Hyatt  <hy...@apple.com>
+
+            Add support for the CSS 'unset' keyword.
+            https://bugs.webkit.org/show_bug.cgi?id=148614
+
+            Reviewed by Dean Jackson.
+
+            Added new test in fast/css, and existing variables tests also use unset in several tests.
+
+            * WebCore.xcodeproj/project.pbxproj:
+            Add CSSUnsetValue.cpp to the project.
+
+            * bindings/objc/DOMCSS.mm:
+            (kitClass):
+            Make sure UNSET is handled in the switch.
+
+            * css/CSSParser.cpp:
+            (WebCore::parseKeywordValue):
+            (WebCore::CSSParser::parseValue):
+            (WebCore::CSSParser::parseCustomPropertyDeclaration):
+            Add cases to create a CSSUnsetValue properly.
+
+            * css/CSSToStyleMap.cpp:
+            (WebCore::CSSToStyleMap::styleImage):
+            (WebCore::CSSToStyleMap::mapFillAttachment):
+            (WebCore::CSSToStyleMap::mapFillClip):
+            (WebCore::CSSToStyleMap::mapFillComposite):
+            (WebCore::CSSToStyleMap::mapFillBlendMode):
+            (WebCore::CSSToStyleMap::mapFillOrigin):
+            (WebCore::CSSToStyleMap::mapFillImage):
+            (WebCore::CSSToStyleMap::mapFillRepeatX):
+            (WebCore::CSSToStyleMap::mapFillRepeatY):
+            (WebCore::convertToLengthSize):
+            (WebCore::CSSToStyleMap::mapFillSize):
+            (WebCore::CSSToStyleMap::mapFillXPosition):
+            (WebCore::CSSToStyleMap::mapFillYPosition):
+            (WebCore::CSSToStyleMap::mapFillMaskSourceType):
+            (WebCore::CSSToStyleMap::mapAnimationDelay):
+            (WebCore::CSSToStyleMap::mapAnimationDirection):
+            (WebCore::CSSToStyleMap::mapAnimationDuration):
+            (WebCore::CSSToStyleMap::mapAnimationFillMode):
+            (WebCore::CSSToStyleMap::mapAnimationIterationCount):
+            (WebCore::CSSToStyleMap::mapAnimationName):
+            (WebCore::CSSToStyleMap::mapAnimationPlayState):
+            (WebCore::CSSToStyleMap::mapAnimationProperty):
+            (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
+            (WebCore::CSSToStyleMap::mapAnimationTrigger):
+            The background and animation functions need to check for unset and be able to map it properly to initial. This is done
+            with a new treatAsInitial method on CSSValue that can take the property ID and check for both initial
+            or unset on a non-inherited property.
+
+            * css/CSSUnsetValue.cpp: Added.
+            (WebCore::CSSUnsetValue::customCSSText):
+            * css/CSSUnsetValue.h: Added.
+            (WebCore::CSSUnsetValue::create):
+            (WebCore::CSSUnsetValue::equals):
+            (WebCore::CSSUnsetValue::CSSUnsetValue):
+            This new value looks exactly like CSSInheritedValue and CSSInitialValue.
+
+            * css/CSSValue.cpp:
+            (WebCore::CSSValue::cssValueType):
+            (WebCore::CSSValue::cssText):
+            (WebCore::CSSValue::destroy):
+            (WebCore::CSSValue::isInvalidCustomPropertyValue):
+            (WebCore::CSSValue::treatAsInheritedValue):
+            (WebCore::CSSValue::treatAsInitialValue):
+            * css/CSSValue.h:
+            (WebCore::CSSValue::isUnsetValue):
+            Add isUnsetValue and the UnsetClass. Add support for treatAsInheritedValue and treatAsInitialValue to have
+            a way to query for initial/inherit or the matching unset type.
+
+            * css/CSSValueKeywords.in:
+            Add the unset keyword.
+
+            * css/CSSValuePool.cpp:
+            (WebCore::CSSValuePool::CSSValuePool):
+            * css/CSSValuePool.h:
+            (WebCore::CSSValuePool::createUnsetValue):
+            Have a singleton model for unset just like we do for inherit/initial.
+
+            * css/StyleResolver.cpp:
+            (WebCore::StyleResolver::applyProperty):
+            Handle unset correctly. It maps to inherit for inherited properties and initial for non-inherited ones.
+
+2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r188130. rdar://problem/23769732
 
     2015-08-07  Myles C. Maxfield  <mmaxfi...@apple.com>

Modified: branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-12-05 19:54:21 UTC (rev 193525)
@@ -2548,8 +2548,6 @@
 		7C48A6D1191C9D6500026674 /* WebKitNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C48A6CF191C9D6500026674 /* WebKitNamespace.h */; };
 		7C4902A218B825F8007D9298 /* DOMWheelEventInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85989DCA0ACC8BBD00A0BC51 /* DOMWheelEventInternal.h */; };
 		7C4C96DC1AD4483500365A50 /* JSReadableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A50 /* JSReadableStream.cpp */; };
-		7C4C96DC1AD4483500365A51 /* ReadableStreamBuiltins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A51 /* ReadableStreamBuiltins.cpp */; };
-		7C4C96DC1AD4483500365A52 /* CountQueuingStrategyBuiltins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A52 /* CountQueuingStrategyBuiltins.cpp */; };
 		7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A50 /* JSReadableStream.h */; };
 		7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */; };
 		7C4C96DF1AD4483500365A50 /* JSReadableStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */; };
@@ -5380,6 +5378,8 @@
 		BC772E16133162C2001EC9CE /* CSSLineBoxContainValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */; };
 		BC779E141BB215BB00CAA8BF /* CSSCustomPropertyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC779E131BB215BB00CAA8BF /* CSSCustomPropertyValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC779E171BB227CA00CAA8BF /* StyleCustomPropertyData.h in Headers */ = {isa = PBXBuildFile; fileRef = BC779E151BB226A200CAA8BF /* StyleCustomPropertyData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		BC7D8FEF1BD03B6400FFE540 /* CSSUnsetValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */; settings = {ASSET_TAGS = (); }; };
+		BC7D8FF01BD03B6400FFE540 /* CSSUnsetValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */; settings = {ASSET_TAGS = (); }; };
 		BC7F44A80B9E324E00A9D081 /* ImageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F44A70B9E324E00A9D081 /* ImageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC7FA6200D1F0CBD00DB22A9 /* LiveNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */; };
 		BC7FA6210D1F0CBD00DB22A9 /* LiveNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -9876,8 +9876,6 @@
 		7C48A6CF191C9D6500026674 /* WebKitNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNamespace.h; sourceTree = "<group>"; };
 		7C48A6D2191C9D8E00026674 /* WebKitNamespace.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebKitNamespace.idl; sourceTree = "<group>"; };
 		7C4C96D81AD4483500365A50 /* JSReadableStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStream.cpp; sourceTree = "<group>"; };
-		7C4C96D81AD4483500365A51 /* ReadableStreamBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamBuiltins.cpp; sourceTree = "<group>"; };
-		7C4C96D81AD4483500365A52 /* CountQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CountQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
 		7C4C96D91AD4483500365A50 /* JSReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStream.h; sourceTree = "<group>"; };
 		7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamReader.cpp; sourceTree = "<group>"; };
 		7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamReader.h; sourceTree = "<group>"; };
@@ -12948,6 +12946,8 @@
 		BC779E131BB215BB00CAA8BF /* CSSCustomPropertyValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSCustomPropertyValue.h; sourceTree = "<group>"; };
 		BC779E151BB226A200CAA8BF /* StyleCustomPropertyData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleCustomPropertyData.h; sourceTree = "<group>"; };
 		BC7B2AF80450824100A8000F /* Scrollbar.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Scrollbar.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSUnsetValue.cpp; sourceTree = "<group>"; };
+		BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSUnsetValue.h; sourceTree = "<group>"; };
 		BC7F44A70B9E324E00A9D081 /* ImageObserver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageObserver.h; sourceTree = "<group>"; };
 		BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LiveNodeList.cpp; sourceTree = "<group>"; };
 		BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveNodeList.h; sourceTree = "<group>"; };
@@ -22649,6 +22649,8 @@
 				371F53E70D2704F900ECE0D5 /* CSSUnicodeRangeValue.h */,
 				A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */,
 				85C56CAD0AA89FE000D95755 /* CSSUnknownRule.idl */,
+				BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */,
+				BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */,
 				AD03AAF81468453900A39B5B /* CSSValue.cpp */,
 				A80E6CC40A1989CA007FB8C5 /* CSSValue.h */,
 				14CF787109F587CA00EB3665 /* CSSValue.idl */,
@@ -26868,6 +26870,7 @@
 				B2A1F2AB0CEF0ABF00442F6A /* SVGFontElement.h in Headers */,
 				B2227A150D00BF220071B782 /* SVGFontFaceElement.h in Headers */,
 				B2227A180D00BF220071B782 /* SVGFontFaceFormatElement.h in Headers */,
+				BC7D8FF01BD03B6400FFE540 /* CSSUnsetValue.h in Headers */,
 				B2227A1B0D00BF220071B782 /* SVGFontFaceNameElement.h in Headers */,
 				B2227A1E0D00BF220071B782 /* SVGFontFaceSrcElement.h in Headers */,
 				B2227A210D00BF220071B782 /* SVGFontFaceUriElement.h in Headers */,
@@ -28847,6 +28850,7 @@
 				409EBDC516B7F3CA00CBA3FC /* JSCSSFontFaceLoadEvent.cpp in Sources */,
 				BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */,
 				BC46C1FE0C0DDC8F0020CFC3 /* JSCSSImportRule.cpp in Sources */,
+				BC7D8FEF1BD03B6400FFE540 /* CSSUnsetValue.cpp in Sources */,
 				316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */,
 				316FE0730E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp in Sources */,
 				BC46C2000C0DDC8F0020CFC3 /* JSCSSMediaRule.cpp in Sources */,

Modified: branches/safari-601-branch/Source/WebCore/bindings/objc/DOMCSS.mm (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/bindings/objc/DOMCSS.mm	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/bindings/objc/DOMCSS.mm	2015-12-05 19:54:21 UTC (rev 193525)
@@ -124,6 +124,7 @@
             return [DOMCSSValueList class];
         case WebCore::CSSValue::CSS_INHERIT:
         case WebCore::CSSValue::CSS_INITIAL:
+        case WebCore::CSSValue::CSS_UNSET:
             return [DOMCSSValue class];
         case WebCore::CSSValue::CSS_CUSTOM:
             return [DOMCSSValue class];

Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -62,6 +62,7 @@
 #include "CSSStyleSheet.h"
 #include "CSSTimingFunctionValue.h"
 #include "CSSUnicodeRangeValue.h"
+#include "CSSUnsetValue.h"
 #include "CSSValueKeywords.h"
 #include "CSSValueList.h"
 #include "CSSValuePool.h"
@@ -1210,6 +1211,8 @@
         value = cssValuePool().createInheritedValue();
     else if (valueID == CSSValueInitial)
         value = cssValuePool().createExplicitInitialValue();
+    else if (valueID == CSSValueUnset)
+        value = cssValuePool().createUnsetValue();
     else if (isValidKeywordPropertyAndValue(propertyId, valueID, parserContext, styleSheetContents))
         value = cssValuePool().createIdentifierValue(valueID);
     else
@@ -1945,6 +1948,11 @@
             return false;
         addExpandedPropertyForValue(propId, cssValuePool().createExplicitInitialValue(), important);
         return true;
+    } else if (id == CSSValueUnset) {
+        if (num != 1)
+            return false;
+        addExpandedPropertyForValue(propId, cssValuePool.createUnsetValue(), important);
+        return true;
     }
 
     if (isKeywordPropertyID(propId)) {
@@ -4159,6 +4167,8 @@
         value = cssValuePool().createInheritedValue();
     else if (id == CSSValueInitial)
         value = cssValuePool().createExplicitInitialValue();
+    else if (id == CSSValueUnset)
+        value = cssValuePool().createUnsetValue();
     else {
         RefPtr<CSSValueList> valueList = CSSValueList::createFromParserValueList(*m_valueList);
         if (m_valueList->containsVariables())

Modified: branches/safari-601-branch/Source/WebCore/css/CSSToStyleMap.cpp (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSToStyleMap.cpp	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSToStyleMap.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -71,9 +71,9 @@
     return m_resolver->styleImage(propertyId, value);
 }
 
-void CSSToStyleMap::mapFillAttachment(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillAttachment(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setAttachment(FillLayer::initialFillAttachment(layer.type()));
         return;
     }
@@ -96,9 +96,9 @@
     }
 }
 
-void CSSToStyleMap::mapFillClip(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillClip(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setClip(FillLayer::initialFillClip(layer.type()));
         return;
     }
@@ -109,9 +109,9 @@
     layer.setClip(downcast<CSSPrimitiveValue>(value));
 }
 
-void CSSToStyleMap::mapFillComposite(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillComposite(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setComposite(FillLayer::initialFillComposite(layer.type()));
         return;
     }
@@ -122,9 +122,9 @@
     layer.setComposite(downcast<CSSPrimitiveValue>(value));
 }
 
-void CSSToStyleMap::mapFillBlendMode(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillBlendMode(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setBlendMode(FillLayer::initialFillBlendMode(layer.type()));
         return;
     }
@@ -135,9 +135,9 @@
     layer.setBlendMode(downcast<CSSPrimitiveValue>(value));
 }
 
-void CSSToStyleMap::mapFillOrigin(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillOrigin(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setOrigin(FillLayer::initialFillOrigin(layer.type()));
         return;
     }
@@ -148,19 +148,19 @@
     layer.setOrigin(downcast<CSSPrimitiveValue>(value));
 }
 
-void CSSToStyleMap::mapFillImage(CSSPropertyID property, FillLayer& layer, CSSValue& value)
+void CSSToStyleMap::mapFillImage(CSSPropertyID propertyID, FillLayer& layer, CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setImage(FillLayer::initialFillImage(layer.type()));
         return;
     }
 
-    layer.setImage(styleImage(property, value));
+    layer.setImage(styleImage(propertyID, value));
 }
 
-void CSSToStyleMap::mapFillRepeatX(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillRepeatX(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setRepeatX(FillLayer::initialFillRepeatX(layer.type()));
         return;
     }
@@ -171,9 +171,9 @@
     layer.setRepeatX(downcast<CSSPrimitiveValue>(value));
 }
 
-void CSSToStyleMap::mapFillRepeatY(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillRepeatY(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setRepeatY(FillLayer::initialFillRepeatY(layer.type()));
         return;
     }
@@ -195,9 +195,9 @@
     return !size.width().isUndefined() && !size.height().isUndefined();
 }
 
-void CSSToStyleMap::mapFillSize(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillSize(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setSize(FillLayer::initialFillSize(layer.type()));
         return;
     }
@@ -225,7 +225,7 @@
 
 void CSSToStyleMap::mapFillXPosition(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setXPosition(FillLayer::initialFillXPosition(layer.type()));
         return;
     }
@@ -257,7 +257,7 @@
 
 void CSSToStyleMap::mapFillYPosition(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setYPosition(FillLayer::initialFillYPosition(layer.type()));
         return;
     }
@@ -287,10 +287,10 @@
         layer.setBackgroundYOrigin(*pair->first());
 }
 
-void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
     EMaskSourceType type = FillLayer::initialFillMaskSourceType(layer.type());
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(propertyID)) {
         layer.setMaskSourceType(type);
         return;
     }
@@ -316,7 +316,7 @@
 
 void CSSToStyleMap::mapAnimationDelay(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDelay)) {
         animation.setDelay(Animation::initialDelay());
         return;
     }
@@ -329,7 +329,7 @@
 
 void CSSToStyleMap::mapAnimationDirection(Animation& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDirection)) {
         layer.setDirection(Animation::initialDirection());
         return;
     }
@@ -357,7 +357,7 @@
 
 void CSSToStyleMap::mapAnimationDuration(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDuration)) {
         animation.setDuration(Animation::initialDuration());
         return;
     }
@@ -370,7 +370,7 @@
 
 void CSSToStyleMap::mapAnimationFillMode(Animation& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationFillMode)) {
         layer.setFillMode(Animation::initialFillMode());
         return;
     }
@@ -398,7 +398,7 @@
 
 void CSSToStyleMap::mapAnimationIterationCount(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationIterationCount)) {
         animation.setIterationCount(Animation::initialIterationCount());
         return;
     }
@@ -415,7 +415,7 @@
 
 void CSSToStyleMap::mapAnimationName(Animation& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationName)) {
         layer.setName(Animation::initialName());
         return;
     }
@@ -432,7 +432,7 @@
 
 void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationPlayState)) {
         layer.setPlayState(Animation::initialPlayState());
         return;
     }
@@ -446,7 +446,7 @@
 
 void CSSToStyleMap::mapAnimationProperty(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimation)) {
         animation.setAnimationMode(Animation::AnimateAll);
         animation.setProperty(CSSPropertyInvalid);
         return;
@@ -470,7 +470,7 @@
 
 void CSSToStyleMap::mapAnimationTimingFunction(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationTimingFunction)) {
         animation.setTimingFunction(Animation::initialTimingFunction());
         return;
     }
@@ -516,7 +516,7 @@
 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
 void CSSToStyleMap::mapAnimationTrigger(Animation& animation, const CSSValue& value)
 {
-    if (value.isInitialValue()) {
+    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationTrigger)) {
         animation.setTrigger(Animation::initialTrigger());
         return;
     }

Added: branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.cpp (0 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.cpp	                        (rev 0)
+++ branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CSSUnsetValue.h"
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+String CSSUnsetValue::customCSSText() const
+{
+    return ASCIILiteral("unset");
+}
+
+} // namespace WebCore

Added: branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.h (0 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.h	                        (rev 0)
+++ branches/safari-601-branch/Source/WebCore/css/CSSUnsetValue.h	2015-12-05 19:54:21 UTC (rev 193525)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CSSUnsetValue_h
+#define CSSUnsetValue_h
+
+#include "CSSValue.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class CSSUnsetValue : public CSSValue {
+public:
+    static Ref<CSSUnsetValue> create()
+    {
+        return adoptRef(*new CSSUnsetValue);
+    }
+
+    String customCSSText() const;
+
+    bool equals(const CSSUnsetValue&) const { return true; }
+
+private:
+    CSSUnsetValue()
+        : CSSValue(UnsetClass)
+    {
+    }
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSUnsetValue, isUnsetValue())
+
+#endif // CSSUnsetValue_h

Modified: branches/safari-601-branch/Source/WebCore/css/CSSValue.cpp (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSValue.cpp	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValue.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -50,10 +50,12 @@
 #include "CSSLineBoxContainValue.h"
 #include "CSSNamedImageValue.h"
 #include "CSSPrimitiveValue.h"
+#include "CSSProperty.h"
 #include "CSSReflectValue.h"
 #include "CSSShadowValue.h"
 #include "CSSTimingFunctionValue.h"
 #include "CSSUnicodeRangeValue.h"
+#include "CSSUnsetValue.h"
 #include "CSSValueList.h"
 #include "CSSVariableDependentValue.h"
 #include "CSSVariableValue.h"
@@ -110,6 +112,8 @@
         return CSS_VALUE_LIST;
     if (isInitialValue())
         return CSS_INITIAL;
+    if (isUnsetValue())
+        return CSS_UNSET;
     return CSS_CUSTOM;
 }
 
@@ -297,6 +301,8 @@
         return downcast<CSSInheritedValue>(*this).customCSSText();
     case InitialClass:
         return downcast<CSSInitialValue>(*this).customCSSText();
+    case UnsetClass:
+        return downcast<CSSUnsetValue>(*this).customCSSText();
 #if ENABLE(CSS_GRID_LAYOUT)
     case GridLineNamesClass:
         return downcast<CSSGridLineNamesValue>(*this).customCSSText();
@@ -406,6 +412,9 @@
     case InitialClass:
         delete downcast<CSSInitialValue>(this);
         return;
+    case UnsetClass:
+        delete downcast<CSSUnsetValue>(this);
+        return;
 #if ENABLE(CSS_GRID_LAYOUT)
     case GridLineNamesClass:
         delete downcast<CSSGridLineNamesValue>(this);
@@ -515,4 +524,14 @@
     return isCustomPropertyValue() && downcast<CSSCustomPropertyValue>(*this).isInvalid();
 }
 
+bool CSSValue::treatAsInheritedValue(CSSPropertyID propertyID) const
+{
+    return classType() == InheritedClass || (classType() == UnsetClass && CSSProperty::isInheritedProperty(propertyID));
 }
+
+bool CSSValue::treatAsInitialValue(CSSPropertyID propertyID) const
+{
+    return classType() == InitialClass || (classType() == UnsetClass && !CSSProperty::isInheritedProperty(propertyID));
+}
+
+}

Modified: branches/safari-601-branch/Source/WebCore/css/CSSValue.h (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSValue.h	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValue.h	2015-12-05 19:54:21 UTC (rev 193525)
@@ -32,7 +32,8 @@
 
 class CachedResource;
 class StyleSheetContents;
-    
+enum CSSPropertyID : uint16_t;
+
 // FIXME: The current CSSValue and subclasses should be turned into internal types (StyleValue).
 // The few subtypes that are actually exposed in CSSOM can be seen in the cloneForCSSOM() function.
 // They should be handled by separate wrapper classes.
@@ -45,8 +46,8 @@
         CSS_PRIMITIVE_VALUE = 1,
         CSS_VALUE_LIST = 2,
         CSS_CUSTOM = 3,
-        CSS_INITIAL = 4
-
+        CSS_INITIAL = 4,
+        CSS_UNSET = 5
     };
 
     // Override RefCounted's deref() to ensure operator delete is called on
@@ -92,6 +93,9 @@
     bool isImplicitInitialValue() const;
     bool isInheritedValue() const { return m_classType == InheritedClass; }
     bool isInitialValue() const { return m_classType == InitialClass; }
+    bool isUnsetValue() const { return m_classType == UnsetClass; }
+    bool treatAsInitialValue(CSSPropertyID) const;
+    bool treatAsInheritedValue(CSSPropertyID) const;
     bool isLinearGradientValue() const { return m_classType == LinearGradientClass; }
     bool isRadialGradientValue() const { return m_classType == RadialGradientClass; }
     bool isReflectValue() const { return m_classType == ReflectClass; }
@@ -164,6 +168,7 @@
 
         InheritedClass,
         InitialClass,
+        UnsetClass,
 
         ReflectClass,
         ShadowClass,

Modified: branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in	2015-12-05 19:54:21 UTC (rev 193525)
@@ -3,6 +3,8 @@
 //
 inherit
 initial
+unset
+
 //
 // CSS_PROP_OUTLINE_STYLE
 // CSS_PROP_BORDER_TOP_STYLE

Modified: branches/safari-601-branch/Source/WebCore/css/CSSValuePool.cpp (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSValuePool.cpp	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValuePool.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -44,6 +44,7 @@
     : m_inheritedValue(CSSInheritedValue::create())
     , m_implicitInitialValue(CSSInitialValue::createImplicit())
     , m_explicitInitialValue(CSSInitialValue::createExplicit())
+    , m_unsetValue(CSSUnsetValue::create())
     , m_colorTransparent(CSSPrimitiveValue::createColor(Color::transparent))
     , m_colorWhite(CSSPrimitiveValue::createColor(Color::white))
     , m_colorBlack(CSSPrimitiveValue::createColor(Color::black))

Modified: branches/safari-601-branch/Source/WebCore/css/CSSValuePool.h (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/CSSValuePool.h	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValuePool.h	2015-12-05 19:54:21 UTC (rev 193525)
@@ -31,6 +31,7 @@
 #include "CSSInitialValue.h"
 #include "CSSPrimitiveValue.h"
 #include "CSSPropertyNames.h"
+#include "CSSUnsetValue.h"
 #include "CSSValueKeywords.h"
 #include <utility>
 #include <wtf/HashMap.h>
@@ -52,6 +53,7 @@
     Ref<CSSInheritedValue> createInheritedValue() { return m_inheritedValue.copyRef(); }
     Ref<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue.copyRef(); }
     Ref<CSSInitialValue> createExplicitInitialValue() { return m_explicitInitialValue.copyRef(); }
+    Ref<CSSUnsetValue> createUnsetValue() { return m_unsetValue.copyRef(); }
     Ref<CSSPrimitiveValue> createIdentifierValue(CSSValueID identifier);
     Ref<CSSPrimitiveValue> createIdentifierValue(CSSPropertyID identifier);
     Ref<CSSPrimitiveValue> createColorValue(unsigned rgbValue);
@@ -69,6 +71,7 @@
     Ref<CSSInheritedValue> m_inheritedValue;
     Ref<CSSInitialValue> m_implicitInitialValue;
     Ref<CSSInitialValue> m_explicitInitialValue;
+    Ref<CSSUnsetValue> m_unsetValue;
 
     RefPtr<CSSPrimitiveValue> m_identifierValueCache[numCSSValueKeywords];
 

Modified: branches/safari-601-branch/Source/WebCore/css/StyleResolver.cpp (193524 => 193525)


--- branches/safari-601-branch/Source/WebCore/css/StyleResolver.cpp	2015-12-05 18:30:37 UTC (rev 193524)
+++ branches/safari-601-branch/Source/WebCore/css/StyleResolver.cpp	2015-12-05 19:54:21 UTC (rev 193525)
@@ -1932,7 +1932,14 @@
 
     bool isInherit = state.parentStyle() && valueToCheckForInheritInitial->isInheritedValue();
     bool isInitial = valueToCheckForInheritInitial->isInitialValue() || (!state.parentStyle() && valueToCheckForInheritInitial->isInheritedValue());
-
+    
+    if (valueToCheckForInheritInitial->isUnsetValue()) {
+        if (CSSProperty::isInheritedProperty(id))
+            isInherit = true;
+        else
+            isInitial = true;
+    }
+    
     ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
 
     if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to