An element that doesn't validate and an invalid element shouldn't share style
authoradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2010 20:06:46 +0000 (20:06 +0000)
committeradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2010 20:06:46 +0000 (20:06 +0000)
commitf5f6ce4a8f667cdc9c43bcf9a2f7463b3e729aa7
treef819339efe187e1a2f3a73ea2951a90c4d3d2232
parent7643ac4a750f4dec1bef6df1ae37cdf4d7683d28
An element that doesn't validate and an invalid element shouldn't share style
https://bugs.webkit.org/show_bug.cgi?id=34010

Reviewed by Dan Bernstein.

Test: fast/css/pseudo-invalid-novalidate-001.html

* css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement):
  Separate the check for willValidate from the check for isValidFormControlElement.
* html/HTMLFormControlElement.h: The validity method doesn't need to be virtual.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/css/pseudo-invalid-novalidate-001-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/pseudo-invalid-novalidate-001.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSStyleSelector.cpp
WebCore/html/HTMLFormControlElement.h