Reviewed by Hyatt.
- layout test for http://bugs.webkit.org/show_bug.cgi?id=11923
REGRESSION: Placeholder text in password field shows as bullets
<rdar://problem/
4960257>
* fast/forms/password-placeholder-expected.checksum: Added.
* fast/forms/password-placeholder-expected.png: Added.
* fast/forms/password-placeholder-expected.txt: Added.
* fast/forms/password-placeholder.html: Added.
WebCore:
Reviewed by Hyatt.
- fix http://bugs.webkit.org/show_bug.cgi?id=11923
REGRESSION: Placeholder text in password field shows as bullets
<rdar://problem/
4960257>
Disable textSecurity when placeholder is visible.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::updatePlaceholder):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19620
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-02-14 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Hyatt.
+
+ - layout test for http://bugs.webkit.org/show_bug.cgi?id=11923
+ REGRESSION: Placeholder text in password field shows as bullets
+ <rdar://problem/4960257>
+
+ * fast/forms/password-placeholder-expected.checksum: Added.
+ * fast/forms/password-placeholder-expected.png: Added.
+ * fast/forms/password-placeholder-expected.txt: Added.
+ * fast/forms/password-placeholder.html: Added.
+
2007-02-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Mark Rowe.
--- /dev/null
+96559e5e202b3b9774ff1689ceaf726f
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTextControl {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderText {#text} at (0,0) size 0x0
+layer at (13,13) size 142x13
+ RenderBlock {DIV} at (3,3) size 142x13 [color=#808080]
+ RenderText {#text} at (1,0) size 36x13
+ text run at (1,0) width 36: "foobar"
--- /dev/null
+<input type="password" placeholder="foobar">
+2007-02-14 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Hyatt.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=11923
+ REGRESSION: Placeholder text in password field shows as bullets
+ <rdar://problem/4960257>
+
+ Disable textSecurity when placeholder is visible.
+
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::updatePlaceholder):
+
2007-02-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Mark Rowe.
void RenderTextControl::updatePlaceholder()
{
+ bool oldPlaceholderVisible = m_placeholderVisible;
+
String placeholder;
if (!m_multiLine) {
HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
color = disabledTextColor(style()->color(), style()->backgroundColor());
RenderObject* renderer = m_innerText->renderer();
- RenderStyle* style = renderer->style();
- if (style->color() != color) {
- style->setColor(color);
+ RenderStyle* innerStyle = renderer->style();
+ if (innerStyle->color() != color) {
+ innerStyle->setColor(color);
renderer->repaint();
}
+
+ // temporary disable textSecurity if placeholder is visible
+ if (style()->textSecurity() != TSNONE && oldPlaceholderVisible != m_placeholderVisible) {
+ RenderStyle* newInnerStyle = new (renderArena()) RenderStyle(*innerStyle);
+ newInnerStyle->setTextSecurity(m_placeholderVisible ? TSNONE : style()->textSecurity());
+ renderer->setStyle(newInnerStyle);
+ for (Node* n = m_innerText->firstChild(); n; n = n->traverseNextNode(m_innerText.get())) {
+ if (n->renderer())
+ n->renderer()->setStyle(newInnerStyle);
+ }
+ }
}
void RenderTextControl::createSubtreeIfNeeded()