Unreviewed, rolling out r111497, r111506, r111508, and
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 13:36:18 +0000 (13:36 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 13:36:18 +0000 (13:36 +0000)
r111513.
http://trac.webkit.org/changeset/111497
http://trac.webkit.org/changeset/111506
http://trac.webkit.org/changeset/111508
http://trac.webkit.org/changeset/111513
https://bugs.webkit.org/show_bug.cgi?id=81774

It broke 2 tests on all platform (Requested by Ossy on

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-21

Source/WebCore:

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::HTMLKeygenElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::create):
(WebCore::HTMLOptionElement::attach):
(WebCore::HTMLOptionElement::detach):
(WebCore::HTMLOptionElement::formControlType):
(WebCore):
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::childrenChanged):
(WebCore::HTMLOptionElement::insertedIntoTree):
* html/HTMLOptionElement.h:
(HTMLOptionElement):
(WebCore::HTMLOptionElement::ownElementDisabled):
* html/HTMLTagNames.in:

LayoutTests:

* fast/forms/resources/select-live-pseudo-selectors.js:
(simulateClick):
* fast/forms/select-live-pseudo-selectors-expected.txt:
* platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png:
* platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png:
* platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png: Removed.
* platform/chromium-mac/fast/css/text-transform-select-expected.png:
* platform/chromium-mac/fast/css/text-transform-select-expected.txt: Removed.
* platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png: Removed.
* platform/chromium-win-xp/fast/forms/select-max-length-expected.txt: Removed.
* platform/chromium-win/fast/css/text-transform-select-expected.png:
* platform/chromium-win/fast/css/text-transform-select-expected.txt:
* platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png: Removed.
* platform/gtk/Skipped:
* platform/gtk/fast/css/text-transform-select-expected.txt:
* platform/mac/fast/css/text-transform-select-expected.png:
* platform/mac/fast/css/text-transform-select-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111532 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/resources/select-live-pseudo-selectors.js
LayoutTests/fast/forms/select-live-pseudo-selectors-expected.txt
LayoutTests/platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png
LayoutTests/platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png [deleted file]
LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png
LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt [deleted file]
LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt [deleted file]
LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png [deleted file]
LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.png
LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.txt [deleted file]
LayoutTests/platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png [deleted file]
LayoutTests/platform/chromium-win-xp/fast/forms/select-max-length-expected.txt [deleted file]
LayoutTests/platform/chromium-win/fast/css/text-transform-select-expected.png
LayoutTests/platform/chromium-win/fast/css/text-transform-select-expected.txt
LayoutTests/platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png [deleted file]
LayoutTests/platform/gtk/fast/css/text-transform-select-expected.txt
LayoutTests/platform/mac/fast/css/text-transform-select-expected.png
LayoutTests/platform/mac/fast/css/text-transform-select-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/html/HTMLKeygenElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLTagNames.in

index 84ef9e5..7f7dfab 100644 (file)
@@ -1,3 +1,37 @@
+2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r111497, r111506, r111508, and
+        r111513.
+        http://trac.webkit.org/changeset/111497
+        http://trac.webkit.org/changeset/111506
+        http://trac.webkit.org/changeset/111508
+        http://trac.webkit.org/changeset/111513
+        https://bugs.webkit.org/show_bug.cgi?id=81774
+
+        It broke 2 tests on all platform (Requested by Ossy on
+        #webkit).
+
+        * fast/forms/resources/select-live-pseudo-selectors.js:
+        (simulateClick):
+        * fast/forms/select-live-pseudo-selectors-expected.txt:
+        * platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png:
+        * platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png: Removed.
+        * platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png:
+        * platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt: Removed.
+        * platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt: Removed.
+        * platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png: Removed.
+        * platform/chromium-mac/fast/css/text-transform-select-expected.png:
+        * platform/chromium-mac/fast/css/text-transform-select-expected.txt: Removed.
+        * platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png: Removed.
+        * platform/chromium-win-xp/fast/forms/select-max-length-expected.txt: Removed.
+        * platform/chromium-win/fast/css/text-transform-select-expected.png:
+        * platform/chromium-win/fast/css/text-transform-select-expected.txt:
+        * platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png: Removed.
+        * platform/gtk/Skipped:
+        * platform/gtk/fast/css/text-transform-select-expected.txt:
+        * platform/mac/fast/css/text-transform-select-expected.png:
+        * platform/mac/fast/css/text-transform-select-expected.txt:
+
 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: expose getEventListeners() to console command line API
index 35c3a5b..6380bc2 100644 (file)
@@ -6,18 +6,17 @@ document.body.appendChild(form);
 var nonForm = document.createElement('div');
 document.body.appendChild(nonForm);
 
-function mouseDownOnSelect(selId, index, modifier) {
-    var sl = document.getElementById(selId);
-    var itemHeight = Math.floor(sl.offsetHeight / sl.size);
-    var border = 1;
-    var y = border + index * itemHeight;
-
-    sl.focus();
-    if (window.eventSender) {
-        eventSender.mouseMoveTo(sl.offsetLeft + border, sl.offsetTop + y - window.pageYOffset);
-        eventSender.mouseDown(0, [modifier]);
-        eventSender.mouseUp(0, [modifier]);
+function simulateClick(element) {
+    var rect = element.getBoundingClientRect();
+    var x = rect.left + rect.width / 2;
+    var y = rect.top + rect.height / 2;
+
+    if (!window.eventSender) {
+        return;
     }
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
 }
 
 function makeInvalid() {
@@ -51,8 +50,6 @@ function removeOption(option, select) {
 }
 
 function backgroundOf(el) {
-    if (typeof(el) == 'string')
-        el = document.getElementById(el);
     return document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color');
 }
 
@@ -61,7 +58,6 @@ var invalidColor = 'rgb(255, 0, 0)';
 var normalColor = 'rgb(255, 255, 255)';
 var disabledColor = 'rgb(0, 0, 0)';
 var readOnlyColor = 'rgb(0, 255, 0)'
-var transparentColor = 'rgba(0, 0, 0, 0)';
 var validColor = 'rgb(0, 0, 255)';
 
 // --------------------------------
@@ -106,7 +102,7 @@ shouldBe(elBackground, 'invalidColor');
 // --------------------------------
 
 debug('Change the values of select elements without explicit initializing values by clicking:');
-form.innerHTML = '<select id="select-multiple" multiple required size="4">' +
+form.innerHTML = '<select id="select-multiple" multiple required>' +
 '  <option id="multiple-empty">empty</option>' +
 '  <option id="multiple-another">another</option>' +
 '</select>' +
@@ -114,12 +110,14 @@ form.innerHTML = '<select id="select-multiple" multiple required size="4">' +
 '  <option id="size4-empty">empty</option>' +
 '  <option id="size4-another">another</option>' +
 '</select>';
-mouseDownOnSelect('select-multiple', 0);
-mouseDownOnSelect('select-size4', 0);
-shouldBe('backgroundOf("select-multiple")', 'validColor');
-shouldBe('backgroundOf("multiple-empty")', 'transparentColor');
-shouldBe('backgroundOf("select-size4")', 'validColor');
-shouldBe('backgroundOf("size4-empty")', 'transparentColor');
+var selectMultiple = document.getElementById("multiple-empty");
+selectMultiple.focus();
+simulateClick(selectMultiple);
+var selectSize4 = document.getElementById("size4-empty");
+selectSize4.focus();
+simulateClick(selectSize4);
+shouldBe('backgroundOf(selectMultiple)', 'validColor');
+shouldBe('backgroundOf(selectSize4)', 'validColor');
 
 debug('Change the value with a placeholder label option:');
 el = makeInvalid();
index e226536..8197ac4 100644 (file)
@@ -15,10 +15,8 @@ Inside/outside of a form:
 PASS backgroundOf(el) is invalidColor
 PASS backgroundOf(el) is invalidColor
 Change the values of select elements without explicit initializing values by clicking:
-PASS backgroundOf("select-multiple") is validColor
-PASS backgroundOf("multiple-empty") is transparentColor
-PASS backgroundOf("select-size4") is validColor
-PASS backgroundOf("size4-empty") is transparentColor
+PASS backgroundOf(selectMultiple) is validColor
+PASS backgroundOf(selectSize4) is validColor
 Change the value with a placeholder label option:
 PASS backgroundOf(el) is validColor
 PASS backgroundOf(el) is invalidColor
index 03476b3..c9b8118 100644 (file)
Binary files a/LayoutTests/platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png and b/LayoutTests/platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png differ
diff --git a/LayoutTests/platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png b/LayoutTests/platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png
deleted file mode 100644 (file)
index a64f948..0000000
Binary files a/LayoutTests/platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png and /dev/null differ
index 7bd9962..4c122b1 100644 (file)
Binary files a/LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png and b/LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png differ
diff --git a/LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt b/LayoutTests/platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt
deleted file mode 100644 (file)
index 18fd344..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x400
-  RenderBlock {HTML} at (0,0) size 800x400
-    RenderBody {BODY} at (8,8) size 784x384
-      RenderBlock (anonymous) at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 652x18
-          text run at (0,0) width 652: "The text in the button, popup menu and list box should have the same case as in the accompanying text."
-      RenderBlock {DIV} at (0,18) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 71x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 71x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (75,40) size 4x18
-          text run at (75,40) width 4: " "
-        RenderListBox {SELECT} at (81,2) size 57x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (140,40) size 4x18
-          text run at (140,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 118x18
-          RenderText {#text} at (144,40) size 118x18
-            text run at (144,40) width 118: "HELLO WORLD"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,79) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 67x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 67x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (71,40) size 4x18
-          text run at (71,40) width 4: " "
-        RenderListBox {SELECT} at (77,2) size 53x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (132,40) size 4x18
-          text run at (132,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 103x18
-          RenderText {#text} at (136,40) size 103x18
-            text run at (136,40) width 103: "HeLLo WoRLd"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,140) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 61x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 61x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (65,40) size 4x18
-          text run at (65,40) width 4: " "
-        RenderListBox {SELECT} at (71,2) size 47x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (120,40) size 4x18
-          text run at (120,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 72x18
-          RenderText {#text} at (124,40) size 72x18
-            text run at (124,40) width 72: "hello world"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,201) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 55x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 55x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (59,40) size 4x18
-          text run at (59,40) width 4: " "
-        RenderListBox {SELECT} at (65,2) size 41x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (108,40) size 4x18
-          text run at (108,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 58x18
-          RenderText {#text} at (112,40) size 58x18
-            text run at (112,40) width 58: "SS SSSS"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,262) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 45x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 45x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (49,40) size 4x18
-          text run at (49,40) width 4: " "
-        RenderListBox {SELECT} at (55,2) size 31x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (88,40) size 4x18
-          text run at (88,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 28x18
-          RenderText {#text} at (92,40) size 28x18
-            text run at (92,40) width 28: "\x{DF} \x{DF}\x{DF}"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,323) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 45x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 45x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (49,40) size 4x18
-          text run at (49,40) width 4: " "
-        RenderListBox {SELECT} at (55,2) size 31x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (88,40) size 4x18
-          text run at (88,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 28x18
-          RenderText {#text} at (92,40) size 28x18
-            text run at (92,40) width 28: "\x{DF} \x{DF}\x{DF}"
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt b/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png b/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png
deleted file mode 100644 (file)
index 87f678e..0000000
Binary files a/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png and /dev/null differ
index 1039b31..0a77ca3 100644 (file)
Binary files a/LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.png and b/LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.png differ
diff --git a/LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.txt b/LayoutTests/platform/chromium-mac/fast/css/text-transform-select-expected.txt
deleted file mode 100644 (file)
index 68ed0b9..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x400
-  RenderBlock {HTML} at (0,0) size 800x400
-    RenderBody {BODY} at (8,8) size 784x384
-      RenderBlock (anonymous) at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 652x18
-          text run at (0,0) width 652: "The text in the button, popup menu and list box should have the same case as in the accompanying text."
-      RenderBlock {DIV} at (0,18) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 71x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 71x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (75,40) size 4x18
-          text run at (75,40) width 4: " "
-        RenderListBox {SELECT} at (81,2) size 54x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (137,40) size 4x18
-          text run at (137,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 118x18
-          RenderText {#text} at (141,40) size 118x18
-            text run at (141,40) width 118: "HELLO WORLD"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,79) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 67x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 67x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (71,40) size 4x18
-          text run at (71,40) width 4: " "
-        RenderListBox {SELECT} at (77,2) size 50x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (129,40) size 4x18
-          text run at (129,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 103x18
-          RenderText {#text} at (133,40) size 103x18
-            text run at (133,40) width 103: "HeLLo WoRLd"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,140) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 61x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 61x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
-        RenderText {#text} at (65,40) size 4x18
-          text run at (65,40) width 4: " "
-        RenderListBox {SELECT} at (71,2) size 44x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (117,40) size 4x18
-          text run at (117,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 72x18
-          RenderText {#text} at (121,40) size 72x18
-            text run at (121,40) width 72: "hello world"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,201) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 55x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 55x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (59,40) size 4x18
-          text run at (59,40) width 4: " "
-        RenderListBox {SELECT} at (65,2) size 38x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (105,40) size 4x18
-          text run at (105,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 58x18
-          RenderText {#text} at (109,40) size 58x18
-            text run at (109,40) width 58: "SS SSSS"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,262) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 45x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 45x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (49,40) size 4x18
-          text run at (49,40) width 4: " "
-        RenderListBox {SELECT} at (55,2) size 28x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (85,40) size 4x18
-          text run at (85,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 28x18
-          RenderText {#text} at (89,40) size 28x18
-            text run at (89,40) width 28: "\x{DF} \x{DF}\x{DF}"
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,323) size 784x61
-        RenderMenuList {SELECT} at (2,41) size 45x18 [bgcolor=#FFFFFF]
-          RenderBlock (anonymous) at (0,0) size 45x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
-        RenderText {#text} at (49,40) size 4x18
-          text run at (49,40) width 4: " "
-        RenderListBox {SELECT} at (55,2) size 28x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-        RenderText {#text} at (85,40) size 4x18
-          text run at (85,40) width 4: " "
-        RenderInline {SPAN} at (0,0) size 28x18
-          RenderText {#text} at (89,40) size 28x18
-            text run at (89,40) width 28: "\x{DF} \x{DF}\x{DF}"
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png b/LayoutTests/platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png
deleted file mode 100644 (file)
index 802401c..0000000
Binary files a/LayoutTests/platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium-win-xp/fast/forms/select-max-length-expected.txt b/LayoutTests/platform/chromium-win-xp/fast/forms/select-max-length-expected.txt
deleted file mode 100644 (file)
index 139597f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
index c886217..3fb3300 100644 (file)
Binary files a/LayoutTests/platform/chromium-win/fast/css/text-transform-select-expected.png and b/LayoutTests/platform/chromium-win/fast/css/text-transform-select-expected.png differ
index 42b3105..ad45177 100644 (file)
@@ -9,8 +9,8 @@ layer at (0,0) size 800x474
       RenderBlock {DIV} at (0,20) size 784x73
         RenderMenuList {SELECT} at (2,51) size 73x20 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 71x18
-            RenderText at (4,1) size 35x16
-              text run at (4,1) width 35: "heLLo"
+            RenderText at (4,1) size 42x16
+              text run at (4,1) width 42: "HELLO"
         RenderText {#text} at (77,51) size 4x19
           text run at (77,51) width 4: " "
         RenderListBox {SELECT} at (83,2) size 69x69 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -23,8 +23,8 @@ layer at (0,0) size 800x474
       RenderBlock {DIV} at (0,93) size 784x73
         RenderMenuList {SELECT} at (2,51) size 68x20 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 66x18
-            RenderText at (4,1) size 35x16
-              text run at (4,1) width 35: "heLLo"
+            RenderText at (4,1) size 37x16
+              text run at (4,1) width 37: "HeLLo"
         RenderText {#text} at (72,51) size 4x19
           text run at (72,51) width 4: " "
         RenderListBox {SELECT} at (78,2) size 64x69 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -37,8 +37,8 @@ layer at (0,0) size 800x474
       RenderBlock {DIV} at (0,166) size 784x73
         RenderMenuList {SELECT} at (2,51) size 55x20 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 53x18
-            RenderText at (4,1) size 35x16
-              text run at (4,1) width 35: "heLLo"
+            RenderText at (4,1) size 27x16
+              text run at (4,1) width 27: "hello"
         RenderText {#text} at (59,51) size 4x19
           text run at (59,51) width 4: " "
         RenderListBox {SELECT} at (65,2) size 51x69 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -51,8 +51,8 @@ layer at (0,0) size 800x474
       RenderBlock {DIV} at (0,239) size 784x73
         RenderMenuList {SELECT} at (2,51) size 61x20 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 59x18
-            RenderText at (4,1) size 9x16
-              text run at (4,1) width 9: "\x{DF}"
+            RenderText at (4,1) size 18x16
+              text run at (4,1) width 18: "SS"
         RenderText {#text} at (65,51) size 4x19
           text run at (65,51) width 4: " "
         RenderListBox {SELECT} at (71,2) size 57x69 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
diff --git a/LayoutTests/platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png b/LayoutTests/platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png
deleted file mode 100644 (file)
index 2891148..0000000
Binary files a/LayoutTests/platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png and /dev/null differ
index 543ff4f..dba9c90 100644 (file)
@@ -9,8 +9,8 @@ layer at (0,0) size 800x520
       RenderBlock {DIV} at (0,18) size 784x81
         RenderMenuList {SELECT} at (2,51) size 87x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 85x26
-            RenderText at (4,4) size 45x17
-              text run at (4,4) width 45: "heLLo"
+            RenderText at (4,4) size 53x17
+              text run at (4,4) width 53: "HELLO"
         RenderText {#text} at (91,56) size 4x17
           text run at (91,56) width 4: " "
         RenderListBox {SELECT} at (97,2) size 82x73 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -23,8 +23,8 @@ layer at (0,0) size 800x520
       RenderBlock {DIV} at (0,99) size 784x81
         RenderMenuList {SELECT} at (2,51) size 81x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 79x26
-            RenderText at (4,4) size 45x17
-              text run at (4,4) width 45: "heLLo"
+            RenderText at (4,4) size 48x17
+              text run at (4,4) width 48: "HeLLo"
         RenderText {#text} at (85,56) size 4x17
           text run at (85,56) width 4: " "
         RenderListBox {SELECT} at (91,2) size 76x73 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -37,8 +37,8 @@ layer at (0,0) size 800x520
       RenderBlock {DIV} at (0,180) size 784x81
         RenderMenuList {SELECT} at (2,51) size 66x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 64x26
-            RenderText at (4,4) size 45x17
-              text run at (4,4) width 45: "heLLo"
+            RenderText at (4,4) size 34x17
+              text run at (4,4) width 34: "hello"
         RenderText {#text} at (70,56) size 4x17
           text run at (70,56) width 4: " "
         RenderListBox {SELECT} at (76,2) size 61x73 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -51,8 +51,8 @@ layer at (0,0) size 800x520
       RenderBlock {DIV} at (0,261) size 784x81
         RenderMenuList {SELECT} at (2,51) size 70x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
           RenderBlock (anonymous) at (1,1) size 68x26
-            RenderText at (4,4) size 10x17
-              text run at (4,4) width 10: "\x{DF}"
+            RenderText at (4,4) size 22x17
+              text run at (4,4) width 22: "SS"
         RenderText {#text} at (74,56) size 4x17
           text run at (74,56) width 4: " "
         RenderListBox {SELECT} at (80,2) size 65x73 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
index d204f45..4ff4976 100644 (file)
Binary files a/LayoutTests/platform/mac/fast/css/text-transform-select-expected.png and b/LayoutTests/platform/mac/fast/css/text-transform-select-expected.png differ
index 18fd344..79d8e65 100644 (file)
@@ -9,8 +9,8 @@ layer at (0,0) size 800x400
       RenderBlock {DIV} at (0,18) size 784x61
         RenderMenuList {SELECT} at (2,41) size 71x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (0,0) size 71x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
+            RenderText at (8,2) size 35x13
+              text run at (8,2) width 35: "HELLO"
         RenderText {#text} at (75,40) size 4x18
           text run at (75,40) width 4: " "
         RenderListBox {SELECT} at (81,2) size 57x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -23,8 +23,8 @@ layer at (0,0) size 800x400
       RenderBlock {DIV} at (0,79) size 784x61
         RenderMenuList {SELECT} at (2,41) size 67x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (0,0) size 67x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
+            RenderText at (8,2) size 33x13
+              text run at (8,2) width 33: "HeLLo"
         RenderText {#text} at (71,40) size 4x18
           text run at (71,40) width 4: " "
         RenderListBox {SELECT} at (77,2) size 53x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -37,8 +37,8 @@ layer at (0,0) size 800x400
       RenderBlock {DIV} at (0,140) size 784x61
         RenderMenuList {SELECT} at (2,41) size 61x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (0,0) size 61x18
-            RenderText at (8,2) size 32x13
-              text run at (8,2) width 32: "heLLo"
+            RenderText at (8,2) size 27x13
+              text run at (8,2) width 27: "hello"
         RenderText {#text} at (65,40) size 4x18
           text run at (65,40) width 4: " "
         RenderListBox {SELECT} at (71,2) size 47x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
@@ -51,8 +51,8 @@ layer at (0,0) size 800x400
       RenderBlock {DIV} at (0,201) size 784x61
         RenderMenuList {SELECT} at (2,41) size 55x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (0,0) size 55x18
-            RenderText at (8,2) size 7x13
-              text run at (8,2) width 7: "\x{DF}"
+            RenderText at (8,2) size 12x13
+              text run at (8,2) width 12: "SS"
         RenderText {#text} at (59,40) size 4x18
           text run at (59,40) width 4: " "
         RenderListBox {SELECT} at (65,2) size 41x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
index e52760c..1dea072 100644 (file)
@@ -1,3 +1,37 @@
+2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r111497, r111506, r111508, and
+        r111513.
+        http://trac.webkit.org/changeset/111497
+        http://trac.webkit.org/changeset/111506
+        http://trac.webkit.org/changeset/111508
+        http://trac.webkit.org/changeset/111513
+        https://bugs.webkit.org/show_bug.cgi?id=81774
+
+        It broke 2 tests on all platform (Requested by Ossy on
+        #webkit).
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOneSelector):
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::HTMLKeygenElement):
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::HTMLOptionElement):
+        (WebCore::HTMLOptionElement::create):
+        (WebCore::HTMLOptionElement::attach):
+        (WebCore::HTMLOptionElement::detach):
+        (WebCore::HTMLOptionElement::formControlType):
+        (WebCore):
+        (WebCore::HTMLOptionElement::parseAttribute):
+        (WebCore::HTMLOptionElement::childrenChanged):
+        (WebCore::HTMLOptionElement::insertedIntoTree):
+        * html/HTMLOptionElement.h:
+        (HTMLOptionElement):
+        (WebCore::HTMLOptionElement::ownElementDisabled):
+        * html/HTMLTagNames.in:
+
 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: expose getEventListeners() to console command line API
index 7a2a54f..97178ea 100644 (file)
@@ -65,7 +65,6 @@
 #include "HTMLElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
-#include "HTMLOptionElement.h"
 #include "HTMLProgressElement.h"
 #include "HTMLStyleElement.h"
 #include "HTMLTextAreaElement.h"
@@ -1345,18 +1344,6 @@ bool CSSStyleSelector::canShareStyleWithElement(StyledElement* element) const
     }
 #endif
 
-    if (element->hasTagName(optionTag)) {
-        if (!m_element->hasTagName(optionTag))
-            return false;
-
-        HTMLOptionElement* thisOptionElement = static_cast<HTMLOptionElement*>(element);
-        HTMLOptionElement* otherOptionElement = static_cast<HTMLOptionElement*>(m_element);
-        if (thisOptionElement->isEnabledFormControl() != otherOptionElement->isEnabledFormControl())
-            return false;
-        if (thisOptionElement->selected() != otherOptionElement->selected())
-            return false;
-    }
-
     bool isControl = element->isFormControlElement();
 
     if (isControl != m_element->isFormControlElement())
index bf3ffd5..0864915 100644 (file)
@@ -1052,7 +1052,7 @@ bool SelectorChecker::checkOneSelector(const SelectorCheckingContext& context, P
         case CSSSelector::PseudoDefault:
             return element && element->isDefaultButtonForForm();
         case CSSSelector::PseudoDisabled:
-            if (element && (element->isFormControlElement() || element->hasTagName(optionTag)))
+            if (element && element->isFormControlElement())
                 return !element->isEnabledFormControl();
             break;
         case CSSSelector::PseudoReadOnly:
@@ -1079,7 +1079,7 @@ bool SelectorChecker::checkOneSelector(const SelectorCheckingContext& context, P
             return (element->willValidate() && !element->isValidFormControlElement()) || element->hasUnacceptableValue();
         case CSSSelector::PseudoChecked:
             {
-                if (!element)
+                if (!element || !element->isFormControlElement())
                     break;
                 // Even though WinIE allows checked and indeterminate to co-exist, the CSS selector spec says that
                 // you can't be both checked and indeterminate. We will behave like WinIE behind the scenes and just
index 3094c93..8053441 100644 (file)
@@ -81,7 +81,7 @@ inline HTMLKeygenElement::HTMLKeygenElement(const QualifiedName& tagName, Docume
     RefPtr<HTMLSelectElement> select = KeygenSelectElement::create(document);
     ExceptionCode ec = 0;
     for (size_t i = 0; i < keys.size(); ++i) {
-        RefPtr<HTMLOptionElement> option = HTMLOptionElement::create(document);
+        RefPtr<HTMLOptionElement> option = HTMLOptionElement::create(document, this->form());
         select->appendChild(option, ec);
         option->appendChild(Text::create(document, keys[i]), ec);
     }
index a9be7c0..1696e9b 100644 (file)
@@ -37,7 +37,6 @@
 #include "NodeRenderStyle.h"
 #include "NodeRenderingContext.h"
 #include "RenderMenuList.h"
-#include "RenderTheme.h"
 #include "ScriptElement.h"
 #include "Text.h"
 #include <wtf/StdLibExtras.h>
@@ -48,22 +47,21 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-HTMLOptionElement::HTMLOptionElement(const QualifiedName& tagName, Document* document)
-    : HTMLElement(tagName, document)
-    , m_disabled(false)
+HTMLOptionElement::HTMLOptionElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
+    : HTMLFormControlElement(tagName, document, form)
     , m_isSelected(false)
 {
     ASSERT(hasTagName(optionTag));
 }
 
-PassRefPtr<HTMLOptionElement> HTMLOptionElement::create(Document* document)
+PassRefPtr<HTMLOptionElement> HTMLOptionElement::create(Document* document, HTMLFormElement* form)
 {
-    return adoptRef(new HTMLOptionElement(optionTag, document));
+    return adoptRef(new HTMLOptionElement(optionTag, document, form));
 }
 
-PassRefPtr<HTMLOptionElement> HTMLOptionElement::create(const QualifiedName& tagName, Document* document)
+PassRefPtr<HTMLOptionElement> HTMLOptionElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
 {
-    return adoptRef(new HTMLOptionElement(tagName, document));
+    return adoptRef(new HTMLOptionElement(tagName, document, form));
 }
 
 PassRefPtr<HTMLOptionElement> HTMLOptionElement::createForJSConstructor(Document* document, const String& data, const String& value,
@@ -91,13 +89,13 @@ void HTMLOptionElement::attach()
 {
     if (parentNode()->renderStyle())
         setRenderStyle(styleForRenderer());
-    HTMLElement::attach();
+    HTMLFormControlElement::attach();
 }
 
 void HTMLOptionElement::detach()
 {
     m_style.clear();
-    HTMLElement::detach();
+    HTMLFormControlElement::detach();
 }
 
 bool HTMLOptionElement::supportsFocus() const
@@ -111,6 +109,12 @@ bool HTMLOptionElement::isFocusable() const
     return supportsFocus() && renderStyle() && renderStyle()->display() != NONE;
 }
 
+const AtomicString& HTMLOptionElement::formControlType() const
+{
+    DEFINE_STATIC_LOCAL(const AtomicString, option, ("option"));
+    return option;
+}
+
 String HTMLOptionElement::text() const
 {
     Document* document = this->document();
@@ -187,15 +191,7 @@ int HTMLOptionElement::index() const
 
 void HTMLOptionElement::parseAttribute(Attribute* attr)
 {
-    if (attr->name() == disabledAttr) {
-        bool oldDisabled = m_disabled;
-        m_disabled = !attr->isNull();
-        if (oldDisabled != m_disabled) {
-            setNeedsStyleRecalc();
-            if (renderer() && renderer()->style()->hasAppearance())
-                renderer()->theme()->stateChanged(renderer(), EnabledState);
-        }
-    } else if (attr->name() == selectedAttr) {
+    if (attr->name() == selectedAttr) {
         // FIXME: This doesn't match what the HTML specification says.
         // The specification implies that removing the selected attribute or
         // changing the value of a selected attribute that is already present
@@ -204,7 +200,7 @@ void HTMLOptionElement::parseAttribute(Attribute* attr)
         // case; we'd need to do the other work from the setSelected function.
         m_isSelected = !attr->isNull();
     } else
-        HTMLElement::parseAttribute(attr);
+        HTMLFormControlElement::parseAttribute(attr);
 }
 
 String HTMLOptionElement::value() const
@@ -251,7 +247,7 @@ void HTMLOptionElement::childrenChanged(bool changedByParser, Node* beforeChange
 {
     if (HTMLSelectElement* select = ownerSelectElement())
         select->optionElementChildrenChanged();
-    HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 }
 
 HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const
@@ -319,7 +315,7 @@ void HTMLOptionElement::insertedIntoTree(bool deep)
         select->scrollToSelection();
     }
 
-    HTMLElement::insertedIntoTree(deep);
+    HTMLFormControlElement::insertedIntoTree(deep);
 }
 
 String HTMLOptionElement::collectOptionInnerText() const
index 1433a82..2eedadf 100644 (file)
 #ifndef HTMLOptionElement_h
 #define HTMLOptionElement_h
 
-#include "HTMLElement.h"
+#include "HTMLFormControlElement.h"
 
 namespace WebCore {
 
 class HTMLSelectElement;
 
-class HTMLOptionElement : public HTMLElement {
+class HTMLOptionElement : public HTMLFormControlElement {
 public:
-    static PassRefPtr<HTMLOptionElement> create(Document*);
-    static PassRefPtr<HTMLOptionElement> create(const QualifiedName&, Document*);
+    static PassRefPtr<HTMLOptionElement> create(Document*, HTMLFormElement*);
+    static PassRefPtr<HTMLOptionElement> create(const QualifiedName&, Document*, HTMLFormElement*);
     static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document*, const String& data, const String& value,
        bool defaultSelected, bool selected, ExceptionCode&);
 
@@ -54,8 +54,7 @@ public:
     String label() const;
     void setLabel(const String&);
 
-    virtual bool isEnabledFormControl() const OVERRIDE { return !disabled(); }
-    bool ownElementDisabled() const { return m_disabled; }
+    bool ownElementDisabled() const { return HTMLFormControlElement::disabled(); }
 
     virtual bool disabled() const;
 
@@ -64,7 +63,7 @@ public:
     void setSelectedState(bool);
 
 private:
-    HTMLOptionElement(const QualifiedName&, Document*);
+    HTMLOptionElement(const QualifiedName&, Document*, HTMLFormElement* = 0);
 
     virtual bool supportsFocus() const;
     virtual bool isFocusable() const;
@@ -73,6 +72,8 @@ private:
     virtual void detach();
     virtual void setRenderStyle(PassRefPtr<RenderStyle>);
 
+    virtual const AtomicString& formControlType() const;
+
     virtual void parseAttribute(Attribute*) OVERRIDE;
 
     virtual void insertedIntoTree(bool);
@@ -86,7 +87,6 @@ private:
 
     String m_value;
     String m_label;
-    bool m_disabled;
     bool m_isSelected;
     RefPtr<RenderStyle> m_style;
 };
index 4997653..74e2408 100644 (file)
@@ -92,7 +92,7 @@ nolayer interfaceName=HTMLElement
 object constructorNeedsFormElement, constructorNeedsCreatedByParser
 ol interfaceName=HTMLOListElement
 optgroup interfaceName=HTMLOptGroupElement
-option
+option constructorNeedsFormElement
 output constructorNeedsFormElement
 shadow interfaceName=HTMLShadowElement, conditional=SHADOW_DOM, runtimeConditional=shadowDOM
 p interfaceName=HTMLParagraphElement