LayoutTests:

        - Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7675
        When new text fields change from visibility:hidden to visibility:visible, value doesn't display

        * fast/forms/input-appearance-visibility-expected.checksum: Added.
        * fast/forms/input-appearance-visibility-expected.png: Added.
        * fast/forms/input-appearance-visibility-expected.txt: Added.
        * fast/forms/input-appearance-visibility.html: Added.

WebCore:

        Reviewed by Hyatt.

        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7675
        When new text fields change from visibility:hidden to visibility:visible, value doesn't display

        Test: fast/forms/input-appearance-visibility.html

        * rendering/RenderTextField.cpp: (WebCore::RenderTextField::setStyle):
        Sets the style directly on the children of the inner div.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e0974f4..669878b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,6 +1,16 @@
 2006-03-09  Adele Peterson  <adele@apple.com>
 
-        - Tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=6814
+        - Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7675
+        When new text fields change from visibility:hidden to visibility:visible, value doesn't display
+
+        * fast/forms/input-appearance-visibility-expected.checksum: Added.
+        * fast/forms/input-appearance-visibility-expected.png: Added.
+        * fast/forms/input-appearance-visibility-expected.txt: Added.
+        * fast/forms/input-appearance-visibility.html: Added.
+
+2006-03-09  Adele Peterson  <adele@apple.com>
+
+        - Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6814
         Implement selection methods for RenderTextField
 
         * fast/forms/input-appearance-selection-expected.checksum: Added.
diff --git a/LayoutTests/fast/forms/input-appearance-visibility-expected.checksum b/LayoutTests/fast/forms/input-appearance-visibility-expected.checksum
new file mode 100644
index 0000000..6448905
--- /dev/null
+++ b/LayoutTests/fast/forms/input-appearance-visibility-expected.checksum
@@ -0,0 +1 @@
+b7fff23d0e58be5137518ff3596f9659
\ No newline at end of file
diff --git a/LayoutTests/fast/forms/input-appearance-visibility-expected.png b/LayoutTests/fast/forms/input-appearance-visibility-expected.png
new file mode 100644
index 0000000..23f9a06
--- /dev/null
+++ b/LayoutTests/fast/forms/input-appearance-visibility-expected.png
Binary files differ
diff --git a/LayoutTests/fast/forms/input-appearance-visibility-expected.txt b/LayoutTests/fast/forms/input-appearance-visibility-expected.txt
new file mode 100644
index 0000000..9698cc6d
--- /dev/null
+++ b/LayoutTests/fast/forms/input-appearance-visibility-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {TEXT} at (0,0) size 480x18
+          text run at (0,0) width 480: "This tests that the value becomes visible when the text field becomes visible."
+      RenderBlock {P} at (0,34) size 784x23
+        RenderTextField {INPUT} at (2,2) size 186x19
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,73) size 784x0
+      RenderBlock {P} at (0,73) size 784x0
+layer at (13,47) size 180x13
+  RenderBlock {DIV} at (3,3) size 180x13
+    RenderText {TEXT} at (0,0) size 63x13
+      text run at (0,0) width 63: "Test Passed"
diff --git a/LayoutTests/fast/forms/input-appearance-visibility.html b/LayoutTests/fast/forms/input-appearance-visibility.html
new file mode 100644
index 0000000..b800e69
--- /dev/null
+++ b/LayoutTests/fast/forms/input-appearance-visibility.html
@@ -0,0 +1,9 @@
+<html>
+<body onload="document.getElementById('t1').style.visibility ='visible'">
+This tests that the value becomes visible when the text field becomes visible.
+<p>
+<input type="text" id="t1" style="-khtml-appearance:textfield; visibility:hidden" value="Test Passed"></input>
+<div id="result"></div>
+</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index de7f5fa..fb4cc2a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2006-03-09  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Hyatt.
+
+        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7675
+        When new text fields change from visibility:hidden to visibility:visible, value doesn't display
+
+        Test: fast/forms/input-appearance-visibility.html
+
+        * rendering/RenderTextField.cpp: (WebCore::RenderTextField::setStyle):
+        Sets the style directly on the children of the inner div.
+
 2006-03-09  David Hyatt <hyatt@apple.com>
 
         Make basic text rendering work on Win32.
diff --git a/WebCore/rendering/RenderTextField.cpp b/WebCore/rendering/RenderTextField.cpp
index d499b6a..3beb014 100644
--- a/WebCore/rendering/RenderTextField.cpp
+++ b/WebCore/rendering/RenderTextField.cpp
@@ -57,6 +57,9 @@
         RenderBlock* divRenderer = static_cast<RenderBlock*>(m_div->renderer());
         RenderStyle* divStyle = createDivStyle(style);
         divRenderer->setStyle(divStyle);
+        for (NodeImpl *n = m_div->firstChild(); n; n = n->traverseNextNode(m_div.get()))
+            if (n->renderer())
+                n->renderer()->setStyle(divStyle);
     }
     setReplaced(isInline());
 }