LayoutTests:
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2007 19:02:36 +0000 (19:02 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2007 19:02:36 +0000 (19:02 +0000)
        Reviewed by Maciej.

        - test for http://bugs.webkit.org/show_bug.cgi?id=11974
        REGRESSION: Caret drawn over input when smaller than font size on initial focus
        <rdar://problem/4960258>

        * fast/forms/textfield-overflow-expected.checksum: Added.
        * fast/forms/textfield-overflow-expected.png: Added.
        * fast/forms/textfield-overflow-expected.txt: Added.
        * fast/forms/textfield-overflow.html: Added.

WebCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11974
        REGRESSION: Caret drawn over input when smaller than font size on initial focus
        <rdar://problem/4960258>

        Set controlClip for non-search text controls.

        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::hasControlClip):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19626 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/forms/textfield-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/fast/forms/textfield-overflow-expected.png [new file with mode: 0644]
LayoutTests/fast/forms/textfield-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/textfield-overflow.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderTextControl.h

index c2f392d6c748532db576da8eca3fa8f9d1630acc..b6c0c617de89fb932eade09b0ee88216a56736b8 100644 (file)
@@ -1,3 +1,16 @@
+2007-02-14  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Maciej.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=11974
+        REGRESSION: Caret drawn over input when smaller than font size on initial focus
+        <rdar://problem/4960258>
+
+        * fast/forms/textfield-overflow-expected.checksum: Added.
+        * fast/forms/textfield-overflow-expected.png: Added.
+        * fast/forms/textfield-overflow-expected.txt: Added.
+        * fast/forms/textfield-overflow.html: Added.
+
 2007-02-14  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Beth Dakin.
diff --git a/LayoutTests/fast/forms/textfield-overflow-expected.checksum b/LayoutTests/fast/forms/textfield-overflow-expected.checksum
new file mode 100644 (file)
index 0000000..f837b6e
--- /dev/null
@@ -0,0 +1 @@
+2c287c9274fe207a8c5f4441b3ac1c46
\ No newline at end of file
diff --git a/LayoutTests/fast/forms/textfield-overflow-expected.png b/LayoutTests/fast/forms/textfield-overflow-expected.png
new file mode 100644 (file)
index 0000000..0272131
Binary files /dev/null and b/LayoutTests/fast/forms/textfield-overflow-expected.png differ
diff --git a/LayoutTests/fast/forms/textfield-overflow-expected.txt b/LayoutTests/fast/forms/textfield-overflow-expected.txt
new file mode 100644 (file)
index 0000000..258b933
--- /dev/null
@@ -0,0 +1,11 @@
+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,0) size 148x10 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+layer at (13,11) size 142x4
+  RenderBlock {DIV} at (3,3) size 142x4
+caret: position 0 of child 0 {DIV} of child 1 {INPUT} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/fast/forms/textfield-overflow.html b/LayoutTests/fast/forms/textfield-overflow.html
new file mode 100644 (file)
index 0000000..a847f22
--- /dev/null
@@ -0,0 +1,6 @@
+<html>
+<body>
+<input id='a' type="text" style="height: 10px">
+<script>
+document.getElementById('a').focus();
+</script>
index 2a6b1c4e4ba33371dc80c78d5c73146773415599..d08b91ad6900144f804f41fa9b0bb41fb135bd71 100644 (file)
@@ -1,3 +1,16 @@
+2007-02-14  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Maciej.
+        
+        - fix http://bugs.webkit.org/show_bug.cgi?id=11974
+        REGRESSION: Caret drawn over input when smaller than font size on initial focus
+        <rdar://problem/4960258>
+        
+        Set controlClip for non-search text controls.
+
+        * rendering/RenderTextControl.h:
+        (WebCore::RenderTextControl::hasControlClip):
+
 2007-02-14  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Hyatt.
index 459ddf75091ae7d4dd4d394d697bae07a3010271..9972a1ca3a7c6a58925e597a5aa1b2060b52b44f 100644 (file)
@@ -51,6 +51,7 @@ public:
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     virtual void layout();
     virtual bool avoidsFloats() const { return true; }
+    virtual bool hasControlClip() const { return !m_innerBlock; }
 
     virtual bool isEdited() const { return m_dirty; }
     virtual void setEdited(bool isEdited) { m_dirty = isEdited; }