[Sub pixel layout] RTL cells with padding wraps
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 00:14:57 +0000 (00:14 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 00:14:57 +0000 (00:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=106843

Source/WebCore:

Reviewed by Levi Weintraub.

At certain zoom levels table cells with padding wraps for rtl
content.

Test: fast/sub-pixel/table-rtl-padding.html

* rendering/RenderTable.h: Override paddingStart/End to return
integer values for padding as we do elsewhere in the table code.

LayoutTests:

Reviewed by Levi Weintraub.

Add test for rtl tables with padding.

* fast/sub-pixel/input-caret-on-subpixel-bound-expected.html:
* fast/sub-pixel/table-rtl-padding-expected.html: Added.
* fast/sub-pixel/table-rtl-padding.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/sub-pixel/input-caret-on-subpixel-bound-expected.html
LayoutTests/fast/sub-pixel/table-rtl-padding-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/table-rtl-padding.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTable.h

index 1b20d8d..63a6e14 100644 (file)
@@ -1,3 +1,16 @@
+2013-01-15  Emil A Eklund  <eae@chromium.org>
+
+        [Sub pixel layout] RTL cells with padding wraps
+        https://bugs.webkit.org/show_bug.cgi?id=106843
+
+        Reviewed by Levi Weintraub.
+        
+        Add test for rtl tables with padding.
+
+        * fast/sub-pixel/input-caret-on-subpixel-bound-expected.html:
+        * fast/sub-pixel/table-rtl-padding-expected.html: Added.
+        * fast/sub-pixel/table-rtl-padding.html: Added.
+
 2013-01-15  Dominic Mazzoni  <dmazzoni@google.com>
 
         Use-after-free in AXObjectCache::notificationPostTimerFired
index 97c1083..93a2148 100644 (file)
@@ -10,7 +10,7 @@
           padding: 2px 3px 3px 2px;
       }
       input {
-          padding: 6px 5px 5px 6px;
+          padding: 6px 6px 5px 5px;
       }
     </style>
   </head>
diff --git a/LayoutTests/fast/sub-pixel/table-rtl-padding-expected.html b/LayoutTests/fast/sub-pixel/table-rtl-padding-expected.html
new file mode 100644 (file)
index 0000000..9b071de
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+       <style>
+           td { white-space: nowrap; }
+       </style>
+    </head>
+    <body style="zoom: 1.1;">
+       <table style="padding-right: 3px">
+               <tbody>
+                       <tr>
+                           <td>עדי רם                                                                 </td>
+                           <td>(11:05 , 11.01.13 )</td>
+                       </tr>
+               </tbody>
+               Table content should not wrap.
+       </table>
+    </body>
+</html>
diff --git a/LayoutTests/fast/sub-pixel/table-rtl-padding.html b/LayoutTests/fast/sub-pixel/table-rtl-padding.html
new file mode 100644 (file)
index 0000000..1f7d39e
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+    </head>
+    <body style="zoom: 1.1;">
+       <table style="padding-right: 3px">
+               <tbody>
+                       <tr>
+                           <td>עדי רם                                                                 </td>
+                           <td>(11:05 , 11.01.13 )</td>
+                       </tr>
+               </tbody>
+               Table content should not wrap.
+       </table>
+    </body>
+</html>
index bdb7a05..8327dc3 100644 (file)
@@ -1,3 +1,18 @@
+2013-01-15  Emil A Eklund  <eae@chromium.org>
+
+        [Sub pixel layout] RTL cells with padding wraps
+        https://bugs.webkit.org/show_bug.cgi?id=106843
+
+        Reviewed by Levi Weintraub.
+        
+        At certain zoom levels table cells with padding wraps for rtl
+        content.
+
+        Test: fast/sub-pixel/table-rtl-padding.html
+
+        * rendering/RenderTable.h: Override paddingStart/End to return
+        integer values for padding as we do elsewhere in the table code.
+
 2013-01-15  Dominic Mazzoni  <dmazzoni@google.com>
 
         Use-after-free in AXObjectCache::notificationPostTimerFired
index 55a4509..50232ab 100644 (file)
@@ -194,6 +194,10 @@ public:
         return 0;
     }
 
+    // Override paddingStart/End to return pixel values to match behavor of RenderTableCell.
+    virtual LayoutUnit paddingEnd() const OVERRIDE { return static_cast<int>(RenderBlock::paddingEnd()); }
+    virtual LayoutUnit paddingStart() const OVERRIDE { return static_cast<int>(RenderBlock::paddingStart()); }
+
     LayoutUnit bordersPaddingAndSpacingInRowDirection() const
     {
         // 'border-spacing' only applies to separate borders (see 17.6.1 The separated borders model).