Title: [91047] trunk
- Revision
- 91047
- Author
- [email protected]
- Date
- 2011-07-14 21:31:28 -0700 (Thu, 14 Jul 2011)
Log Message
REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus
https://bugs.webkit.org/show_bug.cgi?id=64537
Reviewed by Darin Adler.
Source/WebCore:
We stopped to call updateCheckedRadioButtons() for checkboxes
since r90809, but we need to call RenderTheme::stateChanged(),
which was in updateCheckedRadioButtons(), for checkboxes.
Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html
fast/forms/checkbox-appearance-change-by-checked.html
* html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call
from updateCheckedRadioButtons() to setChecked().
(WebCore::HTMLInputElement::updateCheckedRadioButtons):
(WebCore::HTMLInputElement::setChecked):
LayoutTests:
* fast/forms/checkbox-appearance-change-by-checked-expected.html: Added.
* fast/forms/checkbox-appearance-change-by-checked.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (91046 => 91047)
--- trunk/LayoutTests/ChangeLog 2011-07-15 03:50:21 UTC (rev 91046)
+++ trunk/LayoutTests/ChangeLog 2011-07-15 04:31:28 UTC (rev 91047)
@@ -1,5 +1,15 @@
2011-07-14 Kent Tamura <[email protected]>
+ REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus
+ https://bugs.webkit.org/show_bug.cgi?id=64537
+
+ Reviewed by Darin Adler.
+
+ * fast/forms/checkbox-appearance-change-by-checked-expected.html: Added.
+ * fast/forms/checkbox-appearance-change-by-checked.html: Added.
+
+2011-07-14 Kent Tamura <[email protected]>
+
[Chromium] Updat test expectations for r90971.
* platform/chromium-linux/fast/forms/input-placeholder-text-indent-expected.png:
Added: trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked-expected.html (0 => 91047)
--- trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked-expected.html 2011-07-15 04:31:28 UTC (rev 91047)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+
+<input type=checkbox checked>
+
Added: trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked.html (0 => 91047)
--- trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked.html (rev 0)
+++ trunk/LayoutTests/fast/forms/checkbox-appearance-change-by-checked.html 2011-07-15 04:31:28 UTC (rev 91047)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+
+<input type=checkbox>
+
+<script>
+var checkbox = document.getElementsByTagName('input')[0];
+checkbox.offsetTop;
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+setTimeout(function() {
+ checkbox.checked = true;
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}, 0);
+</script>
Modified: trunk/Source/WebCore/ChangeLog (91046 => 91047)
--- trunk/Source/WebCore/ChangeLog 2011-07-15 03:50:21 UTC (rev 91046)
+++ trunk/Source/WebCore/ChangeLog 2011-07-15 04:31:28 UTC (rev 91047)
@@ -1,3 +1,22 @@
+2011-07-14 Kent Tamura <[email protected]>
+
+ REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus
+ https://bugs.webkit.org/show_bug.cgi?id=64537
+
+ Reviewed by Darin Adler.
+
+ We stopped to call updateCheckedRadioButtons() for checkboxes
+ since r90809, but we need to call RenderTheme::stateChanged(),
+ which was in updateCheckedRadioButtons(), for checkboxes.
+
+ Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html
+ fast/forms/checkbox-appearance-change-by-checked.html
+
+ * html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call
+ from updateCheckedRadioButtons() to setChecked().
+ (WebCore::HTMLInputElement::updateCheckedRadioButtons):
+ (WebCore::HTMLInputElement::setChecked):
+
2011-07-14 Adam Barth <[email protected]>
The beforeload event allows tracking URI changes in a frame
Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (91046 => 91047)
--- trunk/Source/WebCore/html/HTMLInputElement.cpp 2011-07-15 03:50:21 UTC (rev 91046)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2011-07-15 04:31:28 UTC (rev 91047)
@@ -209,9 +209,6 @@
control->setNeedsValidityCheck();
}
}
-
- if (renderer() && renderer()->style()->hasAppearance())
- renderer()->theme()->stateChanged(renderer(), CheckedState);
}
bool HTMLInputElement::lastChangeWasUserEdit() const
@@ -932,8 +929,10 @@
m_reflectsCheckedAttribute = false;
m_isChecked = nowChecked;
setNeedsStyleRecalc();
- if (isRadioButton())
+ if (isRadioButton())
updateCheckedRadioButtons();
+ if (renderer() && renderer()->style()->hasAppearance())
+ renderer()->theme()->stateChanged(renderer(), CheckedState);
setNeedsValidityCheck();
// Ideally we'd do this from the render tree (matching
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes