Title: [135564] trunk
Revision
135564
Author
[email protected]
Date
2012-11-23 00:06:32 -0800 (Fri, 23 Nov 2012)

Log Message

Expose DOM interface for CSS Device Adaptation
https://bugs.webkit.org/show_bug.cgi?id=95966

Patch by Thiago Marcos P. Santos <[email protected]> on 2012-11-23
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Added V8 and JSC bindings for CSS Device Adapation.

Test: css3/device-adapt/opera/cssom-001.xhtml

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::wrap):
* css/CSSRule.idl:
* css/WebKitCSSViewportRule.idl: Added.
* page/DOMWindow.idl:

LayoutTests:

Imported a test submitted by Opera that tests the exposed interface.

* css3/device-adapt/opera/cssom-001-expected.txt: Added.
* css3/device-adapt/opera/cssom-001.xhtml: Added.
* platform/efl/fast/js/global-constructors-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135563 => 135564)


--- trunk/LayoutTests/ChangeLog	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/LayoutTests/ChangeLog	2012-11-23 08:06:32 UTC (rev 135564)
@@ -1,3 +1,16 @@
+2012-11-23  Thiago Marcos P. Santos  <[email protected]>
+
+        Expose DOM interface for CSS Device Adaptation
+        https://bugs.webkit.org/show_bug.cgi?id=95966
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Imported a test submitted by Opera that tests the exposed interface. 
+
+        * css3/device-adapt/opera/cssom-001-expected.txt: Added.
+        * css3/device-adapt/opera/cssom-001.xhtml: Added.
+        * platform/efl/fast/js/global-constructors-expected.txt:
+
 2012-11-22  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r135549.

Added: trunk/LayoutTests/css3/device-adapt/opera/cssom-001-expected.txt (0 => 135564)


--- trunk/LayoutTests/css3/device-adapt/opera/cssom-001-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/cssom-001-expected.txt	2012-11-23 08:06:32 UTC (rev 135564)
@@ -0,0 +1,3 @@
+
+PASS CSS Test: @viewport CSSOM - CSSRule.WEBKIT_VIEWPORT_RULE 
+

Added: trunk/LayoutTests/css3/device-adapt/opera/cssom-001.xhtml (0 => 135564)


--- trunk/LayoutTests/css3/device-adapt/opera/cssom-001.xhtml	                        (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/cssom-001.xhtml	2012-11-23 08:06:32 UTC (rev 135564)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: @viewport CSSOM - CSSRule.WEBKIT_VIEWPORT_RULE</title>
+  <link rel="author" title="Rune Lillesveen" href=""
+  <link rel="help" href=""
+  <meta name="flags" content="visual scroll dom" />
+  <meta name="assert" content="CSSRule.WEBKIT_VIEWPORT_RULE has the value 15, and the stylesheet contains a CSSViewportRule with type value 15."/>
+  <script src="" type="text/_javascript_" />
+  <script src="" type="text/_javascript_" />
+  <style type="text/css"><![CDATA[
+   body { margin: 0; }
+   html, body, #test { width: 100%; height: 100%; }
+   #log { padding: 1em; display: none; }
+   /* Reset viewport values to initial values to ignore UA stylesheet. */
+   @-webkit-viewport {
+    width: auto;
+    height: auto;
+    zoom: auto;
+    min-zoom: auto;
+    max-zoom: auto;
+    user-zoom: zoom;
+    orientation: auto;
+    resolution: auto;
+   }
+  ]]></style>
+  <style type="text/css"><![CDATA[
+   /* CSS for the test below. */
+   @-webkit-viewport { width: auto 1200px; min-height: 700px; max-zoom: 100% }
+   /* Set root element font-size to something different from the initial
+      font-size to make sure 'rem' and 'em' for @viewport is based on the
+      initial font-size, not the root element font-size. */
+   html { font-size: 2rem; }
+   body { font-size: 0.5rem; }
+  ]]></style>
+  <script type="text/_javascript_"><![CDATA[
+   var test = async_test("CSS Test: @viewport CSSOM - CSSRule.WEBKIT_VIEWPORT_RULE");
+   window._onload_ = function(){
+
+    var testStyleSheet = document.styleSheets.item(1);
+
+    /* Disable the stylesheet that contains the @viewport to test. */
+    testStyleSheet.disabled = true;
+
+    /* Initialize an object to store viewport values to be used by the test
+       asserts. */
+    var viewport = new Object();
+
+    /* An element with the same size as the initial containing block. */
+    var testElm = document.getElementById("test");
+
+    /* Retrieve the initial viewport values before applying the @viewport to
+       test. */
+    viewport.initialWidth = testElm.offsetWidth;
+    viewport.initialHeight = testElm.offsetHeight;
+    viewport.fontSize = parseInt(getComputedStyle(testElm, "").fontSize);
+
+    /* Enable the stylesheet that contains the @viewport to test. */
+    testStyleSheet.disabled = false;
+
+    /* Retrieve the actual viewport values for the test. */
+    viewport.actualWidth = testElm.offsetWidth;
+    viewport.actualHeight = testElm.offsetHeight;
+    viewport.zoom = viewport.initialWidth / window.innerWidth;
+
+    /* Check viewport values. */
+    test.step(function(){
+        assert_equals(CSSRule.WEBKIT_VIEWPORT_RULE, 15); assert_equals(testStyleSheet.cssRules.item(0).type, 15);
+    });
+
+    /* Finished. Show the results. */
+    test.done();
+    testStyleSheet.disabled = true;
+    document.getElementById("log").style.display = "block";
+   }
+  ]]></script>
+ </head>
+ <body>
+  <div id="test">
+   <div id="log"></div>
+  </div>
+ </body>
+</html>

Modified: trunk/LayoutTests/platform/efl/fast/js/global-constructors-expected.txt (135563 => 135564)


--- trunk/LayoutTests/platform/efl/fast/js/global-constructors-expected.txt	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/LayoutTests/platform/efl/fast/js/global-constructors-expected.txt	2012-11-23 08:06:32 UTC (rev 135564)
@@ -332,6 +332,7 @@
 PASS WebKitCSSMatrix.toString() is '[object WebKitCSSMatrixConstructor]'
 PASS WebKitCSSRegionRule.toString() is '[object WebKitCSSRegionRuleConstructor]'
 PASS WebKitCSSTransformValue.toString() is '[object WebKitCSSTransformValueConstructor]'
+PASS WebKitCSSViewportRule.toString() is '[object WebKitCSSViewportRuleConstructor]'
 FAIL WebKitIntent.toString() should be [object WebKitIntentConstructor]. Was [object IntentConstructor].
 FAIL WebKitMutationObserver.toString() should be [object WebKitMutationObserverConstructor]. Was [object MutationObserverConstructor].
 PASS WebKitPoint.toString() is '[object WebKitPointConstructor]'

Modified: trunk/Source/WebCore/CMakeLists.txt (135563 => 135564)


--- trunk/Source/WebCore/CMakeLists.txt	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-11-23 08:06:32 UTC (rev 135564)
@@ -334,6 +334,7 @@
     css/WebKitCSSMatrix.idl
     css/WebKitCSSRegionRule.idl
     css/WebKitCSSTransformValue.idl
+    css/WebKitCSSViewportRule.idl
 
     dom/Attr.idl
     dom/BeforeLoadEvent.idl

Modified: trunk/Source/WebCore/ChangeLog (135563 => 135564)


--- trunk/Source/WebCore/ChangeLog	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/ChangeLog	2012-11-23 08:06:32 UTC (rev 135564)
@@ -1,3 +1,30 @@
+2012-11-23  Thiago Marcos P. Santos  <[email protected]>
+
+        Expose DOM interface for CSS Device Adaptation
+        https://bugs.webkit.org/show_bug.cgi?id=95966
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added V8 and JSC bindings for CSS Device Adapation.
+
+        Test: css3/device-adapt/opera/cssom-001.xhtml
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSCSSRuleCustom.cpp:
+        (WebCore::toJS):
+        * bindings/objc/DOMCSS.mm:
+        (kitClass):
+        * bindings/v8/custom/V8CSSRuleCustom.cpp:
+        (WebCore::wrap):
+        * css/CSSRule.idl:
+        * css/WebKitCSSViewportRule.idl: Added.
+        * page/DOMWindow.idl:
+
 2012-11-22  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r135549.

Modified: trunk/Source/WebCore/DerivedSources.make (135563 => 135564)


--- trunk/Source/WebCore/DerivedSources.make	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/DerivedSources.make	2012-11-23 08:06:32 UTC (rev 135564)
@@ -196,6 +196,7 @@
     $(WebCore)/css/WebKitCSSMatrix.idl \
     $(WebCore)/css/WebKitCSSRegionRule.idl \
     $(WebCore)/css/WebKitCSSTransformValue.idl \
+    $(WebCore)/css/WebKitCSSViewportRule.idl \
     $(WebCore)/dom/Attr.idl \
     $(WebCore)/dom/BeforeLoadEvent.idl \
     $(WebCore)/dom/CDATASection.idl \

Modified: trunk/Source/WebCore/DerivedSources.pri (135563 => 135564)


--- trunk/Source/WebCore/DerivedSources.pri	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/DerivedSources.pri	2012-11-23 08:06:32 UTC (rev 135564)
@@ -213,6 +213,7 @@
     $$PWD/css/WebKitCSSMatrix.idl \
     $$PWD/css/WebKitCSSRegionRule.idl \
     $$PWD/css/WebKitCSSTransformValue.idl \
+    $$PWD/css/WebKitCSSViewportRule.idl \
     $$PWD/dom/Attr.idl \
     $$PWD/dom/BeforeLoadEvent.idl \
     $$PWD/dom/CharacterData.idl \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (135563 => 135564)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-11-23 08:06:32 UTC (rev 135564)
@@ -809,6 +809,8 @@
 	DerivedSources/WebCore/JSWebKitCSSRegionRule.h \
 	DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp \
 	DerivedSources/WebCore/JSWebKitCSSTransformValue.h \
+	DerivedSources/WebCore/JSWebKitCSSViewportRule.cpp \
+	DerivedSources/WebCore/JSWebKitCSSViewportRule.h \
 	DerivedSources/WebCore/JSWebKitNamedFlow.cpp \
 	DerivedSources/WebCore/JSWebKitNamedFlow.h \
 	DerivedSources/WebCore/JSWebKitPoint.cpp \
@@ -1336,6 +1338,7 @@
 	$(WebCore)/css/WebKitCSSMatrix.idl \
 	$(WebCore)/css/WebKitCSSRegionRule.idl \
 	$(WebCore)/css/WebKitCSSTransformValue.idl \
+	$(WebCore)/css/WebKitCSSViewportRule.idl \
 	$(WebCore)/dom/Attr.idl \
 	$(WebCore)/dom/BeforeLoadEvent.idl \
 	$(WebCore)/dom/CDATASection.idl \

Modified: trunk/Source/WebCore/WebCore.gypi (135563 => 135564)


--- trunk/Source/WebCore/WebCore.gypi	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/WebCore.gypi	2012-11-23 08:06:32 UTC (rev 135564)
@@ -973,6 +973,7 @@
             'css/WebKitCSSMatrix.idl',
             'css/WebKitCSSRegionRule.idl',
             'css/WebKitCSSTransformValue.idl',
+            'css/WebKitCSSViewportRule.idl',
             'dom/Attr.idl',
             'dom/BeforeLoadEvent.idl',
             'dom/CDATASection.idl',
@@ -7301,6 +7302,9 @@
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSTransformValue.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSTransformValue.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSTransformValueInternal.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSViewportRule.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSViewportRule.mm',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitCSSViewportRuleInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWheelEvent.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWheelEventInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMXPathExpression.mm',
@@ -8351,6 +8355,8 @@
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSRegionRule.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSTransformValue.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSViewportRule.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSViewportRule.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitNamedFlow.cpp',

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (135563 => 135564)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-11-23 08:06:32 UTC (rev 135564)
@@ -1040,6 +1040,11 @@
 		3AC648B2129E146500C3EB25 /* EditingBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AC648B1129E146500C3EB25 /* EditingBoundary.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		3C244FEAA375AC633F88BE6F /* RenderLayerModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C244FE4A375AC633F88BE6F /* RenderLayerModelObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		3C244FEBA375AC633F88BE6F /* RenderLayerModelObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C244FE5A375AC633F88BE6F /* RenderLayerModelObject.cpp */; };
+		3F2B33EB165AF15600E3987C /* DOMWebKitCSSViewportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F2B33E6165AF15500E3987C /* DOMWebKitCSSViewportRule.h */; };
+		3F2B33EC165AF15600E3987C /* DOMWebKitCSSViewportRule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3F2B33E7165AF15500E3987C /* DOMWebKitCSSViewportRule.mm */; };
+		3F2B33ED165AF15600E3987C /* DOMWebKitCSSViewportRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F2B33E8165AF15500E3987C /* DOMWebKitCSSViewportRuleInternal.h */; };
+		3F2B33EE165AF15600E3987C /* JSWebKitCSSViewportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F2B33E9165AF15500E3987C /* JSWebKitCSSViewportRule.cpp */; };
+		3F2B33EF165AF15600E3987C /* JSWebKitCSSViewportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F2B33EA165AF15500E3987C /* JSWebKitCSSViewportRule.h */; };
 		3FFFF9A8159D9A550020BBD5 /* WebKitCSSViewportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */; };
 		3FFFF9A9159D9A550020BBD5 /* WebKitCSSViewportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */; };
 		3FFFF9AD159D9B060020BBD5 /* ViewportStyleResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FFFF9AB159D9B060020BBD5 /* ViewportStyleResolver.cpp */; };
@@ -8217,6 +8222,12 @@
 		3AC648B1129E146500C3EB25 /* EditingBoundary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBoundary.h; sourceTree = "<group>"; };
 		3C244FE4A375AC633F88BE6F /* RenderLayerModelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerModelObject.h; sourceTree = "<group>"; };
 		3C244FE5A375AC633F88BE6F /* RenderLayerModelObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerModelObject.cpp; sourceTree = "<group>"; };
+		3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitCSSViewportRule.idl; sourceTree = "<group>"; };
+		3F2B33E6165AF15500E3987C /* DOMWebKitCSSViewportRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSViewportRule.h; sourceTree = "<group>"; };
+		3F2B33E7165AF15500E3987C /* DOMWebKitCSSViewportRule.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitCSSViewportRule.mm; sourceTree = "<group>"; };
+		3F2B33E8165AF15500E3987C /* DOMWebKitCSSViewportRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSViewportRuleInternal.h; sourceTree = "<group>"; };
+		3F2B33E9165AF15500E3987C /* JSWebKitCSSViewportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSViewportRule.cpp; sourceTree = "<group>"; };
+		3F2B33EA165AF15500E3987C /* JSWebKitCSSViewportRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitCSSViewportRule.h; sourceTree = "<group>"; };
 		3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSViewportRule.cpp; sourceTree = "<group>"; };
 		3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSViewportRule.h; sourceTree = "<group>"; };
 		3FFFF9AB159D9B060020BBD5 /* ViewportStyleResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewportStyleResolver.cpp; sourceTree = "<group>"; };
@@ -16250,6 +16261,9 @@
 				31611E5E0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.h */,
 				31611E5F0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.mm */,
 				31611E600E1C4E1400F6A579 /* DOMWebKitCSSTransformValueInternal.h */,
+				3F2B33E6165AF15500E3987C /* DOMWebKitCSSViewportRule.h */,
+				3F2B33E7165AF15500E3987C /* DOMWebKitCSSViewportRule.mm */,
+				3F2B33E8165AF15500E3987C /* DOMWebKitCSSViewportRuleInternal.h */,
 			);
 			name = CSS;
 			sourceTree = "<group>";
@@ -19061,6 +19075,8 @@
 				8ACC24CE148E24B200EFCC0D /* JSWebKitCSSRegionRule.h */,
 				31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */,
 				31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */,
+				3F2B33E9165AF15500E3987C /* JSWebKitCSSViewportRule.cpp */,
+				3F2B33EA165AF15500E3987C /* JSWebKitCSSViewportRule.h */,
 			);
 			name = CSS;
 			sourceTree = "<group>";
@@ -21504,6 +21520,7 @@
 				31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
 				3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */,
 				3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */,
+				3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */,
 			);
 			path = css;
 			sourceTree = "<group>";
@@ -25778,6 +25795,9 @@
 				50D32858163B313F0016111E /* ValidatedCustomFilterOperation.h in Headers */,
 				3FFFF9AE159D9B060020BBD5 /* ViewportStyleResolver.h in Headers */,
 				3FFFF9A9159D9A550020BBD5 /* WebKitCSSViewportRule.h in Headers */,
+				3F2B33EB165AF15600E3987C /* DOMWebKitCSSViewportRule.h in Headers */,
+				3F2B33ED165AF15600E3987C /* DOMWebKitCSSViewportRuleInternal.h in Headers */,
+				3F2B33EF165AF15600E3987C /* JSWebKitCSSViewportRule.h in Headers */,
 				93C38BFF164473C700091EB2 /* ScrollingStateFixedNode.h in Headers */,
 				93C38C03164473DD00091EB2 /* ScrollingTreeFixedNode.h in Headers */,
 				E1424C8A164B3B4E00F32D40 /* PlatformCookieJar.h in Headers */,
@@ -28874,6 +28894,8 @@
 				1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */,
 				50D32857163B313F0016111E /* ValidatedCustomFilterOperation.cpp in Sources */,
 				3FFFF9A8159D9A550020BBD5 /* WebKitCSSViewportRule.cpp in Sources */,
+				3F2B33EC165AF15600E3987C /* DOMWebKitCSSViewportRule.mm in Sources */,
+				3F2B33EE165AF15600E3987C /* JSWebKitCSSViewportRule.cpp in Sources */,
 				4FFC022B1643B710004E1638 /* NodeRareData.cpp in Sources */,
 				4FFC022D1643B726004E1638 /* ElementRareData.cpp in Sources */,
 				93C38BFE164473C700091EB2 /* ScrollingStateFixedNode.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp (135563 => 135564)


--- trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp	2012-11-23 08:06:32 UTC (rev 135564)
@@ -42,9 +42,11 @@
 #include "JSWebKitCSSKeyframeRule.h"
 #include "JSWebKitCSSKeyframesRule.h"
 #include "JSWebKitCSSRegionRule.h"
+#include "JSWebKitCSSViewportRule.h"
 #include "WebKitCSSKeyframeRule.h"
 #include "WebKitCSSKeyframesRule.h"
 #include "WebKitCSSRegionRule.h"
+#include "WebKitCSSViewportRule.h"
 
 using namespace JSC;
 
@@ -94,6 +96,11 @@
         case CSSRule::WEBKIT_KEYFRAMES_RULE:
             wrapper = CREATE_DOM_WRAPPER(exec, globalObject, WebKitCSSKeyframesRule, rule);
             break;
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+        case CSSRule::WEBKIT_VIEWPORT_RULE:
+            wrapper = CREATE_DOM_WRAPPER(exec, globalObject, WebKitCSSViewportRule, rule);
+            break;
+#endif
 #if ENABLE(CSS_REGIONS)
         case CSSRule::WEBKIT_REGION_RULE:
             wrapper = CREATE_DOM_WRAPPER(exec, globalObject, WebKitCSSRegionRule, rule);

Modified: trunk/Source/WebCore/bindings/objc/DOMCSS.mm (135563 => 135564)


--- trunk/Source/WebCore/bindings/objc/DOMCSS.mm	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/bindings/objc/DOMCSS.mm	2012-11-23 08:06:32 UTC (rev 135564)
@@ -57,6 +57,10 @@
 #import "DOMWebKitCSSRegionRule.h"
 #endif
 
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+#import "DOMWebKitCSSViewportRule.h"
+#endif
+
 #if ENABLE(SVG_DOM_OBJC_BINDINGS)
 #import "DOMSVGPaint.h"
 #endif
@@ -95,6 +99,10 @@
             return [DOMWebKitCSSKeyframesRule class];
         case DOM_WEBKIT_KEYFRAME_RULE:
             return [DOMWebKitCSSKeyframeRule class];
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+        case DOM_WEBKIT_VIEWPORT_RULE:
+            return [DOMWebKitCSSViewportRule class];
+#endif
 #if ENABLE(CSS_REGIONS)
         case DOM_WEBKIT_REGION_RULE:
             return [DOMWebKitCSSRegionRule class];

Modified: trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp (135563 => 135564)


--- trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp	2012-11-23 08:06:32 UTC (rev 135564)
@@ -41,6 +41,10 @@
 #include "V8WebKitCSSKeyframesRule.h"
 #include "V8WebKitCSSRegionRule.h"
 
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+#include "V8WebKitCSSViewportRule.h"
+#endif
+
 namespace WebCore {
 
 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
@@ -68,6 +72,10 @@
         return wrap(static_cast<WebKitCSSKeyframeRule*>(impl), creationContext, isolate);
     case CSSRule::WEBKIT_KEYFRAMES_RULE:
         return wrap(static_cast<WebKitCSSKeyframesRule*>(impl), creationContext, isolate);
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+    case CSSRule::WEBKIT_VIEWPORT_RULE:
+        return wrap(static_cast<WebKitCSSViewportRule*>(impl), creationContext, isolate);
+#endif
     case CSSRule::WEBKIT_REGION_RULE:
         return wrap(static_cast<WebKitCSSRegionRule*>(impl), creationContext, isolate);
     }

Modified: trunk/Source/WebCore/css/CSSRule.idl (135563 => 135564)


--- trunk/Source/WebCore/css/CSSRule.idl	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/css/CSSRule.idl	2012-11-23 08:06:32 UTC (rev 135564)
@@ -37,6 +37,9 @@
     const unsigned short PAGE_RULE = 6;
     const unsigned short WEBKIT_KEYFRAMES_RULE = 7;
     const unsigned short WEBKIT_KEYFRAME_RULE = 8;
+#if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION
+    const unsigned short WEBKIT_VIEWPORT_RULE = 15;
+#endif
 #if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
     const unsigned short WEBKIT_REGION_RULE = 16;
 #endif

Added: trunk/Source/WebCore/css/WebKitCSSViewportRule.idl (0 => 135564)


--- trunk/Source/WebCore/css/WebKitCSSViewportRule.idl	                        (rev 0)
+++ trunk/Source/WebCore/css/WebKitCSSViewportRule.idl	2012-11-23 08:06:32 UTC (rev 135564)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. 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 THE COPYRIGHT HOLDER “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 THE COPYRIGHT HOLDER 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.
+ */
+
+[
+    Conditional=CSS_DEVICE_ADAPTATION,
+] interface WebKitCSSViewportRule : CSSRule {
+    readonly attribute CSSStyleDeclaration style;
+};

Modified: trunk/Source/WebCore/page/DOMWindow.idl (135563 => 135564)


--- trunk/Source/WebCore/page/DOMWindow.idl	2012-11-23 07:54:34 UTC (rev 135563)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2012-11-23 08:06:32 UTC (rev 135564)
@@ -345,6 +345,10 @@
     attribute WebKitCSSFilterValueConstructor WebKitCSSFilterValue;
 #endif
 
+#if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION
+    attribute WebKitCSSViewportRuleConstructor WebKitCSSViewportRule;
+#endif
+
     attribute CSSRuleConstructor CSSRule;
     attribute CSSCharsetRuleConstructor CSSCharsetRule;
     attribute CSSFontFaceRuleConstructor CSSFontFaceRule;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to