Title: [131710] trunk
- Revision
- 131710
- Author
- tk...@chromium.org
- Date
- 2012-10-18 00:36:56 -0700 (Thu, 18 Oct 2012)
Log Message
Set min-width property instead of width property for date/time fields
https://bugs.webkit.org/show_bug.cgi?id=99673
Reviewed by Hajime Morita.
Source/WebCore:
A field can have a text wider than pre-computed width because of
:first-letter property. So, we should set min-width, not width.
Tests: Covered by fast/forms/*-multiple-fields/*-multipe-fields-appearance-style.html
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
Set min-width instead of width.
* html/shadow/DateTimeSymbolicFieldElement.cpp:
(WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
LayoutTests:
Update affected test results. Non-Mac chromium ports already have lines
for them in TestExpectations.
* platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png:
* platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png:
* platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (131709 => 131710)
--- trunk/LayoutTests/ChangeLog 2012-10-18 07:08:58 UTC (rev 131709)
+++ trunk/LayoutTests/ChangeLog 2012-10-18 07:36:56 UTC (rev 131710)
@@ -1,3 +1,17 @@
+2012-10-18 Kent Tamura <tk...@chromium.org>
+
+ Set min-width property instead of width property for date/time fields
+ https://bugs.webkit.org/show_bug.cgi?id=99673
+
+ Reviewed by Hajime Morita.
+
+ Update affected test results. Non-Mac chromium ports already have lines
+ for them in TestExpectations.
+
+ * platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png:
+ * platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png:
+ * platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png:
+
2012-10-18 MORITA Hajime <morr...@google.com>
Assertion failure at TreeScopeAdopter::moveNodeToNewDocument()
Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png
(Binary files differ)
Modified: trunk/Source/WebCore/ChangeLog (131709 => 131710)
--- trunk/Source/WebCore/ChangeLog 2012-10-18 07:08:58 UTC (rev 131709)
+++ trunk/Source/WebCore/ChangeLog 2012-10-18 07:36:56 UTC (rev 131710)
@@ -1,3 +1,21 @@
+2012-10-18 Kent Tamura <tk...@chromium.org>
+
+ Set min-width property instead of width property for date/time fields
+ https://bugs.webkit.org/show_bug.cgi?id=99673
+
+ Reviewed by Hajime Morita.
+
+ A field can have a text wider than pre-computed width because of
+ :first-letter property. So, we should set min-width, not width.
+
+ Tests: Covered by fast/forms/*-multiple-fields/*-multipe-fields-appearance-style.html
+
+ * html/shadow/DateTimeNumericFieldElement.cpp:
+ (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
+ Set min-width instead of width.
+ * html/shadow/DateTimeSymbolicFieldElement.cpp:
+ (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
+
2012-10-18 MORITA Hajime <morr...@google.com>
Assertion failure at TreeScopeAdopter::moveNodeToNewDocument()
Modified: trunk/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp (131709 => 131710)
--- trunk/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp 2012-10-18 07:08:58 UTC (rev 131709)
+++ trunk/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp 2012-10-18 07:36:56 UTC (rev 131710)
@@ -82,7 +82,7 @@
float maxiumWidth = style->font().width(m_placeholder);
maxiumWidth = std::max(maxiumWidth, style->font().width(formatValue(maximum())));
maxiumWidth = std::max(maxiumWidth, style->font().width(value()));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
Modified: trunk/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp (131709 => 131710)
--- trunk/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp 2012-10-18 07:08:58 UTC (rev 131709)
+++ trunk/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp 2012-10-18 07:36:56 UTC (rev 131710)
@@ -68,7 +68,7 @@
float maxiumWidth = style->font().width(visibleEmptyValue());
for (unsigned index = 0; index < m_symbols.size(); ++index)
maxiumWidth = std::max(maxiumWidth, style->font().width(m_symbols[index]));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes