Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Issue 10451107: Merge 118721 - Form controls in <fieldset disabled> should not be validated. (Closed)

Created:
8 years, 6 months ago by tkent
Modified:
8 years, 6 months ago
Reviewers:
tkent
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Visibility:
Public.

Description

Merge 118721 - Form controls in <fieldset disabled> should not be validated. https://bugs.webkit.org/show_bug.cgi?id=87381 Reviewed by Hajime Morita. Source/WebCore: We need to use disabeld() instead of m_disabled to calculate willValidate property. Also, we need to update willValidate if necessary. Test: fast/forms/fieldset/validation-in-fieldset.html * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::disabledAttributeChanged): - Do not traverse this. - Calls ancestorDisabledStateWasChanged() instead of setNeedsStyleRecalc() because we'd like to do additional tasks. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged): Added. Just calls disabledAttributeChanged(). (WebCore::HTMLFormControlElement::parseAttribute): Do not call setNeedsWillValidateCheck() whenever an attribute is updated. It should be called only if disabled or readonly attribute is updated. (WebCore::HTMLFormControlElement::disabledAttributeChanged): Add setNeedsWillValidateCheck(). It was moved from parseAttribute(). (WebCore::HTMLFormControlElement::insertedInto): Invalidate ancestor information. (WebCore::HTMLFormControlElement::recalcWillValidate): Use disabled() instead of m_disabled. disabled() takes care of ancestor's disabled state. * html/HTMLFormControlElement.h: (HTMLFormControlElement): LayoutTests: * fast/forms/fieldset/validation-in-fieldset-expected.txt: Added. * fast/forms/fieldset/validation-in-fieldset.html: Added. TBR=tkent@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=119199

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
A + LayoutTests/fast/forms/fieldset/validation-in-fieldset.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/forms/fieldset/validation-in-fieldset-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/html/HTMLFieldSetElement.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/html/HTMLFormControlElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/HTMLFormControlElement.cpp View 5 chunks +9 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
tkent
8 years, 6 months ago (2012-06-01 08:28:56 UTC) #1
tkent
8 years, 6 months ago (2012-06-01 08:30:26 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698