[Webkit-unassigned] [Bug 16704] New: input with type="hidden" matches :enabled/:disabled (Acid3 bug)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 1 22:17:31 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=16704
Summary: input with type="hidden" matches :enabled/:disabled
(Acid3 bug)
Product: WebKit
Version: 525+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Keywords: NeedsReduction
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: eric at webkit.org
input with type="hidden" matches :enabled/:disabled (Acid3 bug)
function () {
// test 42: :enabled, :disabled, :checked, etc
selectorTest(function (doc, add, expect) {
var input = doc.createElement('input');
input.type = 'checkbox';
doc.body.appendChild(input);
var neither = 0;
var both = add(":checked:enabled");
var checked = add(":checked");
var enabled = add(":enabled");
expect(doc.body, neither, "control failure");
expect(input, enabled, "input element didn't match :enabled");
input.click();
expect(input, both, "input element didn't match :checked");
input.disabled = true;
expect(input, checked, "failure 3");
input.checked = false;
expect(input, neither, "failure 4");
expect(doc.body, neither, "failure 5");
});
selectorTest(function (doc, add, expect) {
var input1 = doc.createElement('input');
input1.type = 'radio';
input1.name = 'radio';
doc.body.appendChild(input1);
var input2 = doc.createElement('input');
input2.type = 'radio';
input2.name = 'radio';
doc.body.appendChild(input2);
var checked = add(":checked");
expect(input1, 0, "failure 6");
expect(input2, 0, "failure 7");
input2.checked = true;
expect(input1, 0, "failure 6");
expect(input2, checked, "failure 7");
input1.checked = true;
expect(input1, checked, "failure 8");
expect(input2, 0, "failure 9");
input2.setAttribute("checked", "checked"); // sets defaultChecked,
doesn't change actual state
expect(input1, checked, "failure 9");
expect(input2, 0, "failure 10");
});
selectorTest(function (doc, add, expect) {
var input = doc.createElement('input');
input.type = 'button';
doc.body.appendChild(input);
var neither = 0;
var enabled = add(":enabled");
var disabled = add(":disabled");
add(":enabled:disabled");
expect(input, enabled, "failure 11");
input.disabled = true;
expect(input, disabled, "failure 12");
input.removeAttribute("disabled");
expect(input, enabled, "failure 13");
input.setAttribute("type", "hidden");
expect(input, neither, "an input with type=hidden is matching one of
:enabled or :disabled");
});
return 3;
},
We'll need to make a nicer stand-alone test case.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list