Bug 557087 (6/6) - Elements in the first legend should not be disabled if the fieldset is disabled but not it's fieldset parent. r+a=sicking

--HG--
extra : rebase_source : 226f0169d41f4f6b72549b522a818577ccc3e326
This commit is contained in:
Mounir Lamouri 2010-09-19 03:47:15 +02:00
parent 31c4dd8342
commit 09f96a9f25
150 changed files with 2069 additions and 82 deletions

View File

@ -112,6 +112,7 @@
#include "nsHtml5Module.h"
#include "nsITextControlElement.h"
#include "mozilla/dom/Element.h"
#include "nsHTMLFieldSetElement.h"
using namespace mozilla::dom;
@ -2954,19 +2955,28 @@ nsGenericHTMLFormElement::UpdateFormOwner(bool aBindToTree,
void
nsGenericHTMLFormElement::UpdateFieldSet()
{
for (nsIContent* parent = GetParent(); parent; parent = parent->GetParent()) {
nsIContent* parent = nsnull;
nsIContent* prev = nsnull;
for (parent = GetParent(); parent;
prev = parent, parent = parent->GetParent()) {
if (parent->IsHTML(nsGkAtoms::fieldset)) {
mFieldSet = static_cast<nsGenericHTMLFormElement*>(parent);
nsHTMLFieldSetElement* fieldset =
static_cast<nsHTMLFieldSetElement*>(parent);
if (!prev || fieldset->GetFirstLegend() != prev) {
mFieldSet = fieldset;
return;
}
}
}
// No fieldset found.
mFieldSet = nsnull;
}
void
nsGenericHTMLFormElement::OnFieldSetDisabledChanged(PRInt32 aStates)
nsGenericHTMLFormElement::FieldSetDisabledChanged(PRInt32 aStates)
{
aStates |= NS_EVENT_STATE_DISABLED | NS_EVENT_STATE_ENABLED;

View File

@ -864,7 +864,15 @@ public:
* @note Classes redefining this method should not call ContentStatesChanged
* but they should pass aStates instead.
*/
virtual void OnFieldSetDisabledChanged(PRInt32 aStates);
virtual void FieldSetDisabledChanged(PRInt32 aStates);
void FieldSetFirstLegendChanged() {
UpdateFieldSet();
// The disabled state may have change because the element might not be in
// the first legend anymore.
FieldSetDisabledChanged(0);
}
/**
* Returns if the control can be disabled.

View File

@ -110,7 +110,7 @@ public:
NS_IMETHOD SaveState();
PRBool RestoreState(nsPresState* aState);
virtual void OnFieldSetDisabledChanged(PRInt32 aStates);
virtual void FieldSetDisabledChanged(PRInt32 aStates);
PRInt32 IntrinsicState() const;
@ -738,11 +738,11 @@ nsHTMLButtonElement::UpdateBarredFromConstraintValidation()
}
void
nsHTMLButtonElement::OnFieldSetDisabledChanged(PRInt32 aStates)
nsHTMLButtonElement::FieldSetDisabledChanged(PRInt32 aStates)
{
UpdateBarredFromConstraintValidation();
aStates |= NS_EVENT_STATE_VALID | NS_EVENT_STATE_INVALID;
nsGenericHTMLFormElement::OnFieldSetDisabledChanged(aStates);
nsGenericHTMLFormElement::FieldSetDisabledChanged(aStates);
}

View File

@ -34,75 +34,23 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIDOMHTMLFieldSetElement.h"
#include "nsHTMLFieldSetElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMEventTarget.h"
#include "nsGenericHTMLElement.h"
#include "nsStyleConsts.h"
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsIConstraintValidation.h"
#include "nsEventDispatcher.h"
class nsHTMLFieldSetElement : public nsGenericHTMLFormElement,
public nsIDOMHTMLFieldSetElement,
public nsIConstraintValidation
{
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~nsHTMLFieldSetElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLFormElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLFieldSetElement
NS_DECL_NSIDOMHTMLFIELDSETELEMENT
// nsIContent
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
virtual nsresult AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString* aValue, PRBool aNotify);
// nsIFormControl
NS_IMETHOD_(PRUint32) GetType() const { return NS_FORM_FIELDSET; }
NS_IMETHOD Reset();
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLFieldSetElement,
nsGenericHTMLFormElement)
private:
// This function is used to generate the nsContentList (listed form elements).
static PRBool MatchListedElements(nsIContent* aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData);
// listed form controls elements.
nsRefPtr<nsContentList> mElements;
};
// construction, destruction
NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet)
nsHTMLFieldSetElement::nsHTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo)
, mElements(nsnull)
, mFirstLegend(nsnull)
{
// <fieldset> is always barred from constraint validation.
SetBarredFromConstraintValidation(PR_TRUE);
@ -174,7 +122,7 @@ nsHTMLFieldSetElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
PRUint32 length = mElements->Length(PR_TRUE);
for (PRUint32 i=0; i<length; ++i) {
static_cast<nsGenericHTMLFormElement*>(mElements->GetNodeAt(i))
->OnFieldSetDisabledChanged(0);
->FieldSetDisabledChanged(0);
}
}
@ -231,3 +179,83 @@ nsHTMLFieldSetElement::SubmitNamesValues(nsFormSubmission* aFormSubmission)
{
return NS_OK;
}
nsresult
nsHTMLFieldSetElement::InsertChildAt(nsIContent* aChild, PRUint32 aIndex,
PRBool aNotify)
{
bool firstLegendHasChanged = false;
if (aChild->IsHTML(nsGkAtoms::legend)) {
if (!mFirstLegend) {
mFirstLegend = aChild;
// We do not want to notify the first time mFirstElement is set.
} else {
// If mFirstLegend is before aIndex, we do not change it.
// Otherwise, mFirstLegend is now aChild.
if (aIndex <= IndexOf(mFirstLegend)) {
mFirstLegend = aChild;
firstLegendHasChanged = true;
}
}
}
nsresult rv = nsGenericHTMLFormElement::InsertChildAt(aChild, aIndex, aNotify);
NS_ENSURE_SUCCESS(rv, rv);
if (firstLegendHasChanged) {
NotifyElementsForFirstLegendChange();
}
return rv;
}
nsresult
nsHTMLFieldSetElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify,
PRBool aMutationEvent /* = PR_TRUE */)
{
bool firstLegendHasChanged = false;
if (GetChildAt(aIndex) == mFirstLegend) {
// If we are removing the first legend we have to found another one.
for (nsIContent* child = mFirstLegend; child;
child = child->GetNextSibling()) {
if (child->IsHTML(nsGkAtoms::legend)) {
mFirstLegend = child;
firstLegendHasChanged = true;
break;
}
}
}
nsresult rv = nsGenericHTMLFormElement::RemoveChildAt(aIndex, aNotify, aMutationEvent);
NS_ENSURE_SUCCESS(rv, rv);
if (firstLegendHasChanged) {
NotifyElementsForFirstLegendChange();
}
return rv;
}
void
nsHTMLFieldSetElement::NotifyElementsForFirstLegendChange()
{
/**
* NOTE: this could be optimized if only call when the fieldset is currently
* disabled.
* This should also make sure that mElements is set when we happen to be here.
* However, this method shouldn't be called very often in normal use cases.
*/
if (!mElements) {
mElements = new nsContentList(this, MatchListedElements, nsnull, nsnull,
PR_TRUE);
}
PRUint32 length = mElements->Length(PR_TRUE);
for (PRUint32 i=0; i<length; ++i) {
static_cast<nsGenericHTMLFormElement*>(mElements->GetNodeAt(i))
->FieldSetFirstLegendChanged();
}
}

View File

@ -0,0 +1,111 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsHTMLFieldSetElement_h___
#define nsHTMLFieldSetElement_h___
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLFieldSetElement.h"
#include "nsIConstraintValidation.h"
class nsHTMLFieldSetElement : public nsGenericHTMLFormElement,
public nsIDOMHTMLFieldSetElement,
public nsIConstraintValidation
{
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~nsHTMLFieldSetElement();
// nsISupports
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLFormElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLFieldSetElement
NS_DECL_NSIDOMHTMLFIELDSETELEMENT
// nsIContent
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
virtual nsresult AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString* aValue, PRBool aNotify);
virtual nsresult InsertChildAt(nsIContent* aChild, PRUint32 aIndex,
PRBool aNotify);
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify,
PRBool aMutationEvent = PR_TRUE);
// nsIFormControl
NS_IMETHOD_(PRUint32) GetType() const { return NS_FORM_FIELDSET; }
NS_IMETHOD Reset();
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
const nsIContent* GetFirstLegend() const { return mFirstLegend; }
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLFieldSetElement,
nsGenericHTMLFormElement)
private:
/**
* Notify all elements (in mElements) that the first legend of the fieldset
* has now changed.
*/
void NotifyElementsForFirstLegendChange();
// This function is used to generate the nsContentList (listed form elements).
static PRBool MatchListedElements(nsIContent* aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData);
// listed form controls elements.
nsRefPtr<nsContentList> mElements;
nsIContent* mFirstLegend;
};
#endif /* nsHTMLFieldSetElement_h___ */

View File

@ -4378,12 +4378,12 @@ nsHTMLInputElement::OnValueChanged(PRBool aNotify)
}
void
nsHTMLInputElement::OnFieldSetDisabledChanged(PRInt32 aStates)
nsHTMLInputElement::FieldSetDisabledChanged(PRInt32 aStates)
{
UpdateValueMissingValidityState();
UpdateBarredFromConstraintValidation();
aStates |= NS_EVENT_STATE_VALID | NS_EVENT_STATE_INVALID;
nsGenericHTMLFormElement::OnFieldSetDisabledChanged(aStates);
nsGenericHTMLFormElement::FieldSetDisabledChanged(aStates);
}

View File

@ -159,7 +159,7 @@ public:
virtual PRBool RestoreState(nsPresState* aState);
virtual PRBool AllowDrop();
virtual void OnFieldSetDisabledChanged(PRInt32 aStates);
virtual void FieldSetDisabledChanged(PRInt32 aStates);
// nsIContent
virtual PRBool IsHTMLFocusable(PRBool aWithMouse, PRBool *aIsFocusable, PRInt32 *aTabIndex);

View File

@ -2108,11 +2108,11 @@ nsHTMLSelectElement::UpdateBarredFromConstraintValidation()
}
void
nsHTMLSelectElement::OnFieldSetDisabledChanged(PRInt32 aStates)
nsHTMLSelectElement::FieldSetDisabledChanged(PRInt32 aStates)
{
UpdateBarredFromConstraintValidation();
aStates |= NS_EVENT_STATE_VALID | NS_EVENT_STATE_INVALID;
nsGenericHTMLFormElement::OnFieldSetDisabledChanged(aStates);
nsGenericHTMLFormElement::FieldSetDisabledChanged(aStates);
}

View File

@ -277,7 +277,7 @@ public:
NS_IMETHOD SaveState();
virtual PRBool RestoreState(nsPresState* aState);
virtual void OnFieldSetDisabledChanged(PRInt32 aStates);
virtual void FieldSetDisabledChanged(PRInt32 aStates);
PRInt32 IntrinsicState() const;

View File

@ -131,7 +131,7 @@ public:
NS_IMETHOD SaveState();
virtual PRBool RestoreState(nsPresState* aState);
virtual void OnFieldSetDisabledChanged(PRInt32 aStates);
virtual void FieldSetDisabledChanged(PRInt32 aStates);
virtual PRInt32 IntrinsicState() const;
@ -1390,12 +1390,12 @@ nsHTMLTextAreaElement::OnValueChanged(PRBool aNotify)
}
void
nsHTMLTextAreaElement::OnFieldSetDisabledChanged(PRInt32 aStates)
nsHTMLTextAreaElement::FieldSetDisabledChanged(PRInt32 aStates)
{
UpdateValueMissingValidityState();
UpdateBarredFromConstraintValidation();
aStates |= NS_EVENT_STATE_VALID | NS_EVENT_STATE_INVALID;
nsGenericHTMLFormElement::OnFieldSetDisabledChanged(aStates);
nsGenericHTMLFormElement::FieldSetDisabledChanged(aStates);
}

View File

@ -38,12 +38,30 @@ function clickShouldNotHappenHandler(aEvent)
function clickShouldNotHappenHandler2(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldNotHappenHandler3, false);
ok(false, "click event should be prevented! (test3)");
ok(false, "click event should be prevented! (test2)");
if (++gHandled >= elementsWithClick.length) {
test3();
}
}
function clickShouldNotHappenHandler5(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldNotHappenHandler5, false);
ok(false, "click event should be prevented! (test5)");
if (++gHandled >= elementsWithClick.length) {
test6();
}
}
function clickShouldNotHappenHandler7(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldNotHappenHandler7, false);
ok(false, "click event should be prevented! (test7)");
if (++gHandled >= elementsWithClick.length) {
test8();
}
}
function clickShouldHappenHandler(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler, false);
@ -66,6 +84,54 @@ function clickShouldHappenHandler3(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler3, false);
ok(true, "click event has been correctly received (test3)");
if (++gHandled >= (elementsWithClick.length +
elementsPreventingClick.length)) {
test4();
}
}
function clickShouldHappenHandler4(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler4, false);
ok(true, "click event has been correctly received (test4)");
if (++gHandled >= (elementsWithClick.length +
elementsPreventingClick.length)) {
test5();
}
}
function clickShouldHappenHandler5(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler5, false);
ok(true, "click event has been correctly received (test5)");
if (++gHandled >= elementsWithClick.length) {
test6();
}
}
function clickShouldHappenHandler6(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler6, false);
ok(true, "click event has been correctly received (test6)");
if (++gHandled >= (elementsWithClick.length +
elementsPreventingClick.length)) {
test7();
}
}
function clickShouldHappenHandler7(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler7, false);
ok(true, "click event has been correctly received (test5)");
if (++gHandled >= elementsWithClick.length) {
test8();
}
}
function clickShouldHappenHandler8(aEvent)
{
aEvent.target.removeEventListener("click", clickShouldHappenHandler8, false);
ok(true, "click event has been correctly received (test8)");
if (++gHandled >= (elementsWithClick.length +
elementsPreventingClick.length)) {
SimpleTest.finish();
@ -74,11 +140,24 @@ function clickShouldHappenHandler3(aEvent)
var fieldset1 = document.createElement("fieldset");
var fieldset2 = document.createElement("fieldset");
var legendA = document.createElement("legend");
var legendB = document.createElement("legend");
var content = document.getElementById('content');
fieldset1.disabled = true;
content.appendChild(fieldset1);
fieldset1.appendChild(fieldset2);
function clean()
{
var count = fieldset2.children.length;
for (var i=0; i<count; ++i) {
if (fieldset2.children[i] != legendA &&
fieldset2.children[i] != legendB) {
fieldset2.removeChild(fieldset2.children[i]);
}
}
}
function test1()
{
gHandled = 0;
@ -94,7 +173,6 @@ function test1()
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
element.innerHTML = "foo";
fieldset2.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler, false);
sendMouseEvent({type:'click'}, element);
@ -118,7 +196,6 @@ function test2()
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
element.innerHTML = "foo";
fieldset2.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler2, false);
sendMouseEvent({type:'click'}, element);
@ -142,13 +219,139 @@ function test3()
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
element.innerHTML = "foo";
fieldset2.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler3, false);
sendMouseEvent({type:'click'}, element);
}
}
function test4()
{
gHandled = 0;
fieldset1.disabled = false;
fieldset2.disabled = true;
fieldset2.appendChild(legendA);
// All elements should accept the click.
for each(var name in elementsPreventingClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler4, false);
sendMouseEvent({type:'click'}, element);
}
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler4, false);
sendMouseEvent({type:'click'}, element);
}
}
function test5()
{
gHandled = 0;
fieldset2.insertBefore(legendB, legendA);
// Initialize children without click expected.
for each(var name in elementsPreventingClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldNotHappenHandler5, false);
sendMouseEvent({type:'click'}, element);
}
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler5, false);
sendMouseEvent({type:'click'}, element);
}
}
function test6()
{
gHandled = 0;
fieldset2.removeChild(legendB);
fieldset1.disabled = true;
fieldset2.disabled = false;
fieldset1.appendChild(legendA);
legendA.appendChild(fieldset2);
// All elements should accept the click.
for each(var name in elementsPreventingClick) {
var element = document.createElement(name);
fieldset2.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler6, false);
sendMouseEvent({type:'click'}, element);
}
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
fieldset2.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler6, false);
sendMouseEvent({type:'click'}, element);
}
}
function test7()
{
gHandled = 0;
fieldset1.disabled = true;
fieldset2.disabled = false;
fieldset1.appendChild(fieldset2);
fieldset2.appendChild(legendA);
// All elements should accept the click.
for each(var name in elementsPreventingClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldNotHappenHandler7, false);
sendMouseEvent({type:'click'}, element);
}
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
legendA.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler7, false);
sendMouseEvent({type:'click'}, element);
}
}
function test8()
{
gHandled = 0;
fieldset1.disabled = true;
fieldset2.disabled = true;
fieldset1.appendChild(legendA);
legendA.appendChild(fieldset2);
fieldset2.appendChild(legendB);
// All elements should accept the click.
for each(var name in elementsPreventingClick) {
var element = document.createElement(name);
legendB.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler8, false);
sendMouseEvent({type:'click'}, element);
}
// Initialize children with click expected.
for each(var name in elementsWithClick) {
var element = document.createElement(name);
legendB.appendChild(element);
element.addEventListener("click", clickShouldHappenHandler8, false);
sendMouseEvent({type:'click'}, element);
}
}
test1();
</script>

View File

@ -135,6 +135,8 @@ function checkElement(aElement, aDisabled)
var fieldset1 = document.createElement("fieldset");
var fieldset2 = document.createElement("fieldset");
var legendA = document.createElement("legend");
var legendB = document.createElement("legend");
var content = document.getElementById('content');
content.appendChild(fieldset1);
fieldset1.appendChild(fieldset2);
@ -147,6 +149,7 @@ for each(var data in elements) {
element.required = true;
}
fieldset1.disabled = false;
fieldset2.appendChild(element);
checkElement(element, fieldset2.disabled);
@ -168,9 +171,44 @@ for each(var data in elements) {
fieldset2.disabled = false;
checkElement(element, fieldset1.disabled);
/* legend tests */
// elements in the first legend of a disabled fieldset should not be disabled.
fieldset2.disabled = true;
fieldset1.disabled = false;
fieldset2.removeChild(element);
legendA.appendChild(element);
fieldset2.appendChild(legendA);
checkElement(element, false);
// elements in the second legend should be disabled
fieldset2.insertBefore(legendB, legendA);
checkElement(element, fieldset2.disabled);
fieldset2.removeChild(legendB);
// Elements in the first legend of a fieldset disabled by another fieldset
// should be disabled.
fieldset1.disabled = true;
checkElement(element, fieldset1.disabled);
// Elements inside a fieldset inside the first legend of a disabled fieldset
// should not be diasbled.
fieldset2.disabled = false;
fieldset1.appendChild(legendA);
legendA.appendChild(fieldset2);
fieldset2.appendChild(element);
checkElement(element, false);
// Elements inside the first legend of a disabled fieldset inside the first
// legend of a disabled fieldset should not be disabled.
fieldset2.disabled = false;
fieldset2.appendChild(legendB);
legendB.appendChild(element);
checkElement(element, false);
fieldset2.removeChild(legendB);
fieldset1.appendChild(fieldset2);
element.parentNode.removeChild(element);
}
</script>

View File

@ -21,7 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=557087
<input type='radio' id='c'>
<fieldset disabled>
<fieldset>
<input type='submit'>
<input type='submit' id='s'>
</fieldset>
</fieldset>
</form>
@ -33,7 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=557087
SimpleTest.waitForExplicitFinish();
var gExpectedSubmits = 3;
var gExpectedSubmits = 6;
var gSubmitReceived = 0;
var gEnd = false;
@ -74,6 +74,15 @@ SimpleTest.waitForFocus(function() {
gEnd = true;
doSubmit();
// Simple check that we can submit from inside a legend even if the fieldset
// is disabled.
var legend = document.createElement("legend");
fieldsets[0].appendChild(legend);
fieldsets[0].disabled = true;
legend.appendChild(document.getElementById('s'));
doSubmit();
});
</script>

View File

@ -35,6 +35,7 @@ var testResults = [
"data:text/html,?",
"data:text/html,?",
"data:text/html,?i=i&t=t&s=s",
"data:text/html,?i=i&t=t&s=s",
];
var gTestCount = 0;
@ -64,6 +65,19 @@ function runTest()
form.submit()
});
break;
case 3:
// Elements inside the first legend of a disabled fieldset are submittable.
fieldsets[0].disabled = true;
fieldsets[1].disabled = true;
var legend = document.createElement("legend");
fieldsets[0].appendChild(legend);
while (fieldsets[1].firstChild) {
legend.appendChild(fieldsets[1].firstChild);
}
SimpleTest.executeSoon(function() {
form.submit()
});
break;
default:
iframe.removeEventListener("load", arguments.callee, false);
SimpleTest.executeSoon(SimpleTest.finish);

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<button class="enabled"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<button class="disabled"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<button class="disabled"></button>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<button class="enabled"></button>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<button class="enabled"></button>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<button class="ref"></button>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -2,3 +2,8 @@
== button-fieldset-2.html button-fieldset-ref.html
== button-fieldset-3.html button-fieldset-ref.html
== button-fieldset-4.html button-fieldset-ref.html
== button-fieldset-legend-1.html button-fieldset-legend-ref-1.html
== button-fieldset-legend-2.html button-fieldset-legend-ref-2.html
== button-fieldset-legend-3.html button-fieldset-legend-ref-3.html
== button-fieldset-legend-4.html button-fieldset-legend-ref-4.html
== button-fieldset-legend-5.html button-fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<fieldset class="enabled"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<fieldset class="disabled"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<fieldset class="disabled"></fieldset>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<fieldset class="enabled"></fieldset>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled"></fieldset>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<fieldset class="ref"></fieldset>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -4,3 +4,8 @@
== fieldset-fieldset-2.html fieldset-fieldset-ref.html
== fieldset-fieldset-3.html fieldset-fieldset-ref.html
== fieldset-fieldset-4.html fieldset-fieldset-ref.html
== fieldset-legend-1.html fieldset-legend-ref-1.html
== fieldset-legend-2.html fieldset-legend-ref-2.html
== fieldset-legend-3.html fieldset-legend-ref-3.html
== fieldset-legend-4.html fieldset-legend-ref-4.html
== fieldset-legend-5.html fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<input class="enabled">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<input class="disabled">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<input class="disabled">
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<input class="enabled">
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<input class="enabled">
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<input class="ref">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<input class="ref">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<input class="ref">
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<input class="ref">
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<input class="ref">
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -2,3 +2,8 @@
== input-fieldset-2.html input-fieldset-ref.html
== input-fieldset-3.html input-fieldset-ref.html
== input-fieldset-4.html input-fieldset-ref.html
== input-fieldset-legend-1.html input-fieldset-legend-ref-1.html
== input-fieldset-legend-2.html input-fieldset-legend-ref-2.html
== input-fieldset-legend-3.html input-fieldset-legend-ref-3.html
== input-fieldset-legend-4.html input-fieldset-legend-ref-4.html
== input-fieldset-legend-5.html input-fieldset-legend-ref-5.html

View File

@ -2,3 +2,8 @@
== select-fieldset-2.html select-fieldset-ref-disabled.html
== select-fieldset-3.html select-fieldset-ref-disabled.html
== select-fieldset-4.html select-fieldset-ref.html
== select-fieldset-legend-1.html select-fieldset-legend-ref-1.html
== select-fieldset-legend-2.html select-fieldset-legend-ref-2.html
== select-fieldset-legend-3.html select-fieldset-legend-ref-3.html
== select-fieldset-legend-4.html select-fieldset-legend-ref-4.html
== select-fieldset-legend-5.html select-fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<select class="enabled"></select>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<select class="disabled"></select>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<select class="disabled"></select>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<select class="enabled"></select>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<select class="enabled"></select>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<select class="ref"></select>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<select disabled class="ref"></select>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<select disabled class="ref"></select>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<select class="ref"></select>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<select class="ref"></select>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -2,3 +2,8 @@
== textarea-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-3.html textarea-fieldset-ref.html
== textarea-fieldset-4.html textarea-fieldset-ref.html
== textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
== textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
== textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
== textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
== textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<textarea class="enabled"></textarea>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<textarea class="disabled"></textarea>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<textarea class="disabled"></textarea>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<textarea class="enabled"></textarea>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<textarea class="enabled"></textarea>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<textarea class="ref"></textarea>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<textarea class="ref"></textarea>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<textarea class="ref"></textarea>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<textarea class="ref"></textarea>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<textarea class="ref"></textarea>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<button class="enabled"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<button class="disabled"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<button class="disabled"></button>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<button class="enabled"></button>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<button class="enabled"></button>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<button class="ref"></button>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<button class="ref"></button>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -2,3 +2,8 @@
== button-fieldset-2.html button-fieldset-ref.html
== button-fieldset-3.html button-fieldset-ref.html
== button-fieldset-4.html button-fieldset-ref.html
== button-fieldset-legend-1.html button-fieldset-legend-ref-1.html
== button-fieldset-legend-2.html button-fieldset-legend-ref-2.html
== button-fieldset-legend-3.html button-fieldset-legend-ref-3.html
== button-fieldset-legend-4.html button-fieldset-legend-ref-4.html
== button-fieldset-legend-5.html button-fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<fieldset class="enabled"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<fieldset class="disabled"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<fieldset class="disabled"></fieldset>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<fieldset class="enabled"></fieldset>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled"></fieldset>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<fieldset class="ref"></fieldset>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<legend>
<fieldset class="ref"></fieldset>
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -4,3 +4,8 @@
== fieldset-fieldset-2.html fieldset-fieldset-ref.html
== fieldset-fieldset-3.html fieldset-fieldset-ref.html
== fieldset-fieldset-4.html fieldset-fieldset-ref.html
== fieldset-legend-1.html fieldset-legend-ref-1.html
== fieldset-legend-2.html fieldset-legend-ref-2.html
== fieldset-legend-3.html fieldset-legend-ref-3.html
== fieldset-legend-4.html fieldset-legend-ref-4.html
== fieldset-legend-5.html fieldset-legend-ref-5.html

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend id='i'>
<input class="enabled">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
</legend>
<legend>
<input class="disabled">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<fieldset class="disabled">
<legend>
<input class="disabled">
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="enabled">
<input class="enabled">
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="disabled" disabled>
<legend>
<fieldset class="disabled" disabled>
<legend>
<input class="enabled">
</legend>
</fieldset>
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<input class="ref">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
</legend>
<legend>
<input class="ref">
</legend>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<fieldset class="ref">
<legend>
<input class="ref">
</legend>
</fieldset>
</fieldset>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<fieldset class="ref">
<legend>
<fieldset class="ref">
<input class="ref">
</fieldset>
</legend>
</fieldset>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More