[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

bulach at chromium.org bulach at chromium.org
Wed Dec 22 11:57:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d15ab6ba811e707ab4f3a3b98e210c7dd5c82c69
Author: bulach at chromium.org <bulach at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 12 09:41:14 2010 +0000

    2010-07-14  Marcus Bulach  <bulach at chromium.org>
    
            Reviewed by darin at apple.com.
    
            Removes DontCheckEnums from some IDLs and fixes the corresponding enums.
            https://bugs.webkit.org/show_bug.cgi?id=42278
    
            This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=42250: it fixes some IDL/.h and enables generating compile-time checks for enums.
    
            * fast/events/init-events-expected.txt:
            * fast/events/script-tests/init-events.js:
            (createEventHelper): splits event creation so that we can test without init.
            (testInitEvent): adds test for OverflowEvent creation.
    2010-07-14  Marcus Bulach  <bulach at chromium.org>
    
            Reviewed by darin at apple.com.
    
            Removes DontCheckEnums from some IDLs and fixes the corresponding enums.
            https://bugs.webkit.org/show_bug.cgi?id=42278
    
            This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=42250: it fixes some IDL/.h and enables generating compile-time checks for enums.
    
            Tests: idls should generate valid code.
    
            * dom/Node.h:
            (WebCore::Node::):
            * dom/Node.idl:
            * dom/OverflowEvent.h:
            (WebCore::OverflowEvent::):
            * dom/OverflowEvent.idl:
            * html/FileReader.cpp:
            (WebCore::FileReader::readyState):
            * html/FileReader.h:
            (WebCore::FileReader::):
            * html/FileReader.idl:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65226 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e354c2d..0d64c39 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-14  Marcus Bulach  <bulach at chromium.org>
+
+        Reviewed by darin at apple.com.
+
+        Removes DontCheckEnums from some IDLs and fixes the corresponding enums.
+        https://bugs.webkit.org/show_bug.cgi?id=42278
+
+        This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=42250: it fixes some IDL/.h and enables generating compile-time checks for enums.
+
+        * fast/events/init-events-expected.txt:
+        * fast/events/script-tests/init-events.js:
+        (createEventHelper): splits event creation so that we can test without init.
+        (testInitEvent): adds test for OverflowEvent creation.
+
 2010-08-12  Philippe Normand  <pnormand at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/LayoutTests/fast/events/init-events-expected.txt b/LayoutTests/fast/events/init-events-expected.txt
index 82e2ba9..59fa9e5 100644
--- a/LayoutTests/fast/events/init-events-expected.txt
+++ b/LayoutTests/fast/events/init-events-expected.txt
@@ -116,6 +116,7 @@ PASS testInitEvent('Overflow', '1001, false, false').horizontalOverflow is false
 PASS testInitEvent('Overflow', '1001, true, false').horizontalOverflow is true
 PASS testInitEvent('Overflow', '1001, false, false').verticalOverflow is false
 PASS testInitEvent('Overflow', '1001, false, true').verticalOverflow is true
+PASS createEventHelper('Overflow').orient is OverflowEvent.VERTICAL
 PASS testInitEvent('Progress', '"a", false, false, false, 1001, 1002').type is 'a'
 PASS testInitEvent('Progress', 'null, false, false, false, 1001, 1002').type is 'null'
 PASS testInitEvent('Progress', '"a", false, false, false, 1001, 1002').bubbles is false
diff --git a/LayoutTests/fast/events/overflow-events.html b/LayoutTests/fast/events/overflow-events.html
index acc480b..6a5952f 100644
--- a/LayoutTests/fast/events/overflow-events.html
+++ b/LayoutTests/fast/events/overflow-events.html
@@ -1,80 +1,79 @@
 <html>
 <head>
-	<script>
-		function overflowChanged(event) {
-		    var result = [event.orient, event.horizontalOverflow, event.verticalOverflow];
+  <script>
+    function overflowChanged(event) {
+        var result = [event.orient, event.horizontalOverflow, event.verticalOverflow];
 
-            if ('' + result == testResults[currentTest++])
-                numSuccessful ++;
-            
-            if (testResults.length == numSuccessful)
-                document.getElementById('result').innerHTML = "SUCCESS";
-		}
-		
-		function forceLayout() {
-			document.body.offsetTop;		    
-		}
-		
-		function runTest() {
-		    if (window.layoutTestController)
-		        layoutTestController.dumpAsText();
-		        
-		    testResults = [[1, true, false],
-		                   [1, false, false],
-		                   [0, false, true],
-		                   [0, false, false],
-		                   [2, true, true],
-		                   [2, false, false],
-		                   [0, false, true],
-		                   [2, true, false],		                
-		                   [2, false, true]];
-		                   
-		    currentTest = 0;
-		    numSuccessful = 0;
-		    
-			var c = document.getElementById('container');
-			c.addEventListener('overflowchanged', overflowChanged, false);
-			
-			forceLayout();
-			document.getElementById('child').style.width='200px';
+        if ('' + result == testResults[currentTest++])
+            numSuccessful ++;
+        if (testResults.length == numSuccessful)
+            document.getElementById('result').innerHTML = "SUCCESS";
+    }
 
-			forceLayout();
-			document.getElementById('child').style.width='50px';
-			forceLayout();
+    function forceLayout() {
+        document.body.offsetTop;
+    }
 
-			document.getElementById('child').style.height='200px';
-			forceLayout();
-			document.getElementById('child').style.height='50px';
-			forceLayout();
+    function runTest() {
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
 
-            forceLayout();
-			document.getElementById('child').style.width='200px';
-			document.getElementById('child').style.height='200px';
-			forceLayout();
+        testResults = [[OverflowEvent.HORIZONTAL, true, false],
+                       [OverflowEvent.HORIZONTAL, false, false],
+                       [OverflowEvent.VERTICAL, false, true],
+                       [OverflowEvent.VERTICAL, false, false],
+                       [OverflowEvent.BOTH, true, true],
+                       [OverflowEvent.BOTH, false, false],
+                       [OverflowEvent.VERTICAL, false, true],
+                       [OverflowEvent.BOTH, true, false],
+                       [OverflowEvent.BOTH, false, true]];
 
-			document.getElementById('child').style.width='50px';
-			document.getElementById('child').style.height='50px';
-			forceLayout();		
+        currentTest = 0;
+        numSuccessful = 0;
 
-			document.getElementById('child').style.height='200px';
-			forceLayout();		
+        var c = document.getElementById('container');
+        c.addEventListener('overflowchanged', overflowChanged, false);
 
-			document.getElementById('child').style.width='200px';
-			document.getElementById('child').style.height='50px';
-			forceLayout();		
+        forceLayout();
+        document.getElementById('child').style.width='200px';
 
-			document.getElementById('child').style.width='50px';
-			document.getElementById('child').style.height='200px';
-			forceLayout();		
+        forceLayout();
+        document.getElementById('child').style.width='50px';
+        forceLayout();
 
-		}
-	</script>
+        document.getElementById('child').style.height='200px';
+        forceLayout();
+        document.getElementById('child').style.height='50px';
+        forceLayout();
+
+        forceLayout();
+        document.getElementById('child').style.width='200px';
+        document.getElementById('child').style.height='200px';
+        forceLayout();
+
+        document.getElementById('child').style.width='50px';
+        document.getElementById('child').style.height='50px';
+        forceLayout();
+
+        document.getElementById('child').style.height='200px';
+        forceLayout();
+
+        document.getElementById('child').style.width='200px';
+        document.getElementById('child').style.height='50px';
+        forceLayout();
+
+        document.getElementById('child').style.width='50px';
+        document.getElementById('child').style.height='200px';
+        forceLayout();
+
+    }
+  </script>
 </head>
 <body onload="runTest()">
-	<div id="container" style="width:100; height:100px; border: solid red 2px; overflow: hidden">
-		<div id="child" style="margin-top: 30px; margin-left: 30px; width:50px; height:50px; border: solid blue 2px;"></div>
-	</div>
-	This tests that overflowchanged events are fired correctly. If the test is successful, the text "SUCCESS" should be shown below.
-	<div id="result">FAILURE</div>
+    <div id="container" style="width:100; height:100px; border: solid red 2px; overflow: hidden">
+        <div id="child" style="margin-top: 30px; margin-left: 30px; width:50px; height:50px; border: solid blue 2px;"></div>
+    </div>
+    This tests that overflowchanged events are fired correctly. If the test is successful, the text "SUCCESS" should be shown below.
+    <div id="result">FAILURE</div>
 </body>
 </html>
diff --git a/LayoutTests/fast/events/script-tests/init-events.js b/LayoutTests/fast/events/script-tests/init-events.js
index 0a32407..3382856 100644
--- a/LayoutTests/fast/events/script-tests/init-events.js
+++ b/LayoutTests/fast/events/script-tests/init-events.js
@@ -1,8 +1,14 @@
 description("This tests the init functions for all the event DOM classes that have them.");
 
-function testInitEvent(prefix, argumentString)
+function createEventHelper(prefix)
 {
     var event = document.createEvent(prefix + "Event");
+    return event;
+}
+
+function testInitEvent(prefix, argumentString)
+{
+    var event = createEventHelper(prefix);
     var initExpression = "event.init" + prefix + "Event(" + argumentString + ")";
     eval(initExpression);
     return event;
@@ -133,6 +139,7 @@ shouldBe("testInitEvent('Overflow', '1001, false, false').horizontalOverflow", "
 shouldBe("testInitEvent('Overflow', '1001, true, false').horizontalOverflow", "true");
 shouldBe("testInitEvent('Overflow', '1001, false, false').verticalOverflow", "false");
 shouldBe("testInitEvent('Overflow', '1001, false, true').verticalOverflow", "true");
+shouldBe("createEventHelper('Overflow').orient", "OverflowEvent.VERTICAL");
 
 shouldBe("testInitEvent('Progress', '\"a\", false, false, false, 1001, 1002').type", "'a'");
 shouldBe("testInitEvent('Progress', 'null, false, false, false, 1001, 1002').type", "'null'");
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0c13fa2..61fb74e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-14  Marcus Bulach  <bulach at chromium.org>
+
+        Reviewed by darin at apple.com.
+
+        Removes DontCheckEnums from some IDLs and fixes the corresponding enums.
+        https://bugs.webkit.org/show_bug.cgi?id=42278
+
+        This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=42250: it fixes some IDL/.h and enables generating compile-time checks for enums.
+
+        Tests: idls should generate valid code.
+
+        * dom/Node.h:
+        (WebCore::Node::):
+        * dom/Node.idl:
+        * dom/OverflowEvent.h:
+        (WebCore::OverflowEvent::):
+        * dom/OverflowEvent.idl:
+        * html/FileReader.cpp:
+        (WebCore::FileReader::readyState):
+        * html/FileReader.h:
+        (WebCore::FileReader::):
+        * html/FileReader.idl:
+
 2010-08-12  Alejandro G. Castro  <alex at igalia.com>
 
         Reviewed by David Levin.
diff --git a/WebCore/dom/Node.h b/WebCore/dom/Node.h
index b808ad7..3f3184d 100644
--- a/WebCore/dom/Node.h
+++ b/WebCore/dom/Node.h
@@ -86,14 +86,6 @@ enum StyleChangeType {
     SyntheticStyleChange = 3 << nodeStyleChangeShift
 };
 
-const unsigned short DOCUMENT_POSITION_EQUIVALENT = 0x00;
-const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
-const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
-const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
-const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
-const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
-const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
-
 // this class implements nodes, which can have a parent but no children:
 class Node : public EventTarget, public TreeShared<Node>, public ScriptWrappable {
     friend class Document;
@@ -113,7 +105,16 @@ public:
         NOTATION_NODE = 12,
         XPATH_NAMESPACE_NODE = 13
     };
-    
+    enum DocumentPosition {
+        DOCUMENT_POSITION_EQUIVALENT = 0x00,
+        DOCUMENT_POSITION_DISCONNECTED = 0x01,
+        DOCUMENT_POSITION_PRECEDING = 0x02,
+        DOCUMENT_POSITION_FOLLOWING = 0x04,
+        DOCUMENT_POSITION_CONTAINS = 0x08,
+        DOCUMENT_POSITION_CONTAINED_BY = 0x10,
+        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
+    };
+
     static bool isSupported(const String& feature, const String& version);
 
     static void startIgnoringLeaks();
diff --git a/WebCore/dom/Node.idl b/WebCore/dom/Node.idl
index e15b210..07046d1 100644
--- a/WebCore/dom/Node.idl
+++ b/WebCore/dom/Node.idl
@@ -28,8 +28,7 @@ module core {
         EventTarget,
         GenerateNativeConverter,
         InlineGetOwnPropertySlot,
-        Polymorphic,
-        DontCheckEnums
+        Polymorphic
     ] Node
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         : Object, EventTarget
diff --git a/WebCore/dom/OverflowEvent.h b/WebCore/dom/OverflowEvent.h
index 9fd0ea1..f1cd2f3 100644
--- a/WebCore/dom/OverflowEvent.h
+++ b/WebCore/dom/OverflowEvent.h
@@ -33,8 +33,8 @@ namespace WebCore {
     class OverflowEvent : public Event {
     public:
         enum orientType {
-            VERTICAL   = 0,
-            HORIZONTAL = 1,
+            HORIZONTAL = 0,
+            VERTICAL   = 1,
             BOTH       = 2
         };
 
diff --git a/WebCore/dom/OverflowEvent.idl b/WebCore/dom/OverflowEvent.idl
index 74cf56b..0c1fd50 100644
--- a/WebCore/dom/OverflowEvent.idl
+++ b/WebCore/dom/OverflowEvent.idl
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 module events {
-    // FIXME: Converge these consts and OverflowEvent::orientType values and remove DontCheckEnums attribute.
-    interface [DontCheckEnums] OverflowEvent : Event {
+    interface OverflowEvent : Event {
         const unsigned short HORIZONTAL = 0;
         const unsigned short VERTICAL   = 1;
         const unsigned short BOTH       = 2;
diff --git a/WebCore/html/FileReader.cpp b/WebCore/html/FileReader.cpp
index 88f218f..6e568ec 100644
--- a/WebCore/html/FileReader.cpp
+++ b/WebCore/html/FileReader.cpp
@@ -240,15 +240,15 @@ FileReader::ReadyState FileReader::readyState() const
     switch (m_state) {
     case None:
     case Starting:
-        return Empty;
+        return EMPTY;
     case Opening:
     case Reading:
-        return Loading;
+        return LOADING;
     case Completed:
-        return Done;
+        return DONE;
     }
     ASSERT_NOT_REACHED();
-    return Empty;
+    return EMPTY;
 }
 
 const ScriptString& FileReader::result()
diff --git a/WebCore/html/FileReader.h b/WebCore/html/FileReader.h
index a5339a9..7952468 100644
--- a/WebCore/html/FileReader.h
+++ b/WebCore/html/FileReader.h
@@ -63,9 +63,9 @@ public:
     virtual ~FileReader();
 
     enum ReadyState {
-        Empty = 0,
-        Loading = 1,
-        Done = 2
+        EMPTY = 0,
+        LOADING = 1,
+        DONE = 2
     };
 
     void readAsBinaryString(Blob*);
diff --git a/WebCore/html/FileReader.idl b/WebCore/html/FileReader.idl
index fb3b979..b36e9d3 100644
--- a/WebCore/html/FileReader.idl
+++ b/WebCore/html/FileReader.idl
@@ -34,8 +34,7 @@ module html {
         CanBeConstructed,
         CallWith=ScriptExecutionContext,
         EventTarget,
-        NoStaticTables,
-        DontCheckEnums
+        NoStaticTables
     ] FileReader {
         // ready states
         const unsigned short EMPTY = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list