Title: [138543] trunk
- Revision
- 138543
- Author
- [email protected]
- Date
- 2012-12-28 10:32:08 -0800 (Fri, 28 Dec 2012)
Log Message
REGRESSION (r138196): Regions with text-overflow: ellipsis; are being ellipsized unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=105600
Source/WebCore:
Reviewed by Darin Adler.
Pixel-snap lineBoxEdge before comparing with the block edge as
the lineBox edge isn't guaranteed to be snapped to device pixels
on all platforms.
Test: fast/sub-pixel/ellipsis-table.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):
LayoutTests:
Reviewed by Darin Adler.
Add test for text-overflow: ellipsis inside a table.
* fast/sub-pixel/ellipsis-table-expected.html: Added.
* fast/sub-pixel/ellipsis-table.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (138542 => 138543)
--- trunk/LayoutTests/ChangeLog 2012-12-28 17:45:18 UTC (rev 138542)
+++ trunk/LayoutTests/ChangeLog 2012-12-28 18:32:08 UTC (rev 138543)
@@ -1,3 +1,15 @@
+2012-12-27 Emil A Eklund <[email protected]>
+
+ REGRESSION (r138196): Regions with text-overflow: ellipsis; are being ellipsized unnecessarily
+ https://bugs.webkit.org/show_bug.cgi?id=105600
+
+ Reviewed by Darin Adler.
+
+ Add test for text-overflow: ellipsis inside a table.
+
+ * fast/sub-pixel/ellipsis-table-expected.html: Added.
+ * fast/sub-pixel/ellipsis-table.html: Added.
+
2012-12-28 Fady Samuel <[email protected]>
Unreviewed rebaseline
Added: trunk/LayoutTests/fast/sub-pixel/ellipsis-table-expected.html (0 => 138543)
--- trunk/LayoutTests/fast/sub-pixel/ellipsis-table-expected.html (rev 0)
+++ trunk/LayoutTests/fast/sub-pixel/ellipsis-table-expected.html 2012-12-28 18:32:08 UTC (rev 138543)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ td > a {
+ max-width: 125px;
+ display: inline-block;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .rtl td {
+ direction: rtl;
+ }
+ </style>
+ </head>
+ <body>
+ <table cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr><td><a href=""
+ <tr><td><a href=""
+ </tbody>
+ </table>
+ <table class="rtl" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr><td><a href="" לשמאל</a></td></tr>
+ <tr><td><a href="" إلى اليسار</a></td></tr>
+ </tbody>
+ </table>
+ <p>
+ None of the lines above should be truncated.
+ </p>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/sub-pixel/ellipsis-table.html (0 => 138543)
--- trunk/LayoutTests/fast/sub-pixel/ellipsis-table.html (rev 0)
+++ trunk/LayoutTests/fast/sub-pixel/ellipsis-table.html 2012-12-28 18:32:08 UTC (rev 138543)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ td > a {
+ max-width: 125px;
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .rtl td {
+ direction: rtl;
+ }
+ </style>
+ </head>
+ <body>
+ <table cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr><td><a href=""
+ <tr><td><a href=""
+ </tbody>
+ </table>
+ <table class="rtl" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr><td><a href="" לשמאל</a></td></tr>
+ <tr><td><a href="" إلى اليسار</a></td></tr>
+ </tbody>
+ </table>
+ <p>
+ None of the lines above should be truncated.
+ </p>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (138542 => 138543)
--- trunk/Source/WebCore/ChangeLog 2012-12-28 17:45:18 UTC (rev 138542)
+++ trunk/Source/WebCore/ChangeLog 2012-12-28 18:32:08 UTC (rev 138543)
@@ -1,3 +1,19 @@
+2012-12-27 Emil A Eklund <[email protected]>
+
+ REGRESSION (r138196): Regions with text-overflow: ellipsis; are being ellipsized unnecessarily
+ https://bugs.webkit.org/show_bug.cgi?id=105600
+
+ Reviewed by Darin Adler.
+
+ Pixel-snap lineBoxEdge before comparing with the block edge as
+ the lineBox edge isn't guaranteed to be snapped to device pixels
+ on all platforms.
+
+ Test: fast/sub-pixel/ellipsis-table.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::checkLinesForTextOverflow):
+
2012-12-28 Brandon Jones <[email protected]>
[chromium] DrawingBuffer initialization loop breaks if completely out of memory
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (138542 => 138543)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2012-12-28 17:45:18 UTC (rev 138542)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2012-12-28 18:32:08 UTC (rev 138543)
@@ -3203,7 +3203,7 @@
// https://bugs.webkit.org/show_bug.cgi?id=105461
int blockRightEdge = snapSizeToPixel(logicalRightOffsetForLine(curr->lineTop(), firstLine), curr->x());
int blockLeftEdge = pixelSnappedLogicalLeftOffsetForLine(curr->lineTop(), firstLine);
- LayoutUnit lineBoxEdge = ltr ? curr->x() + curr->logicalWidth() : curr->x();
+ int lineBoxEdge = ltr ? snapSizeToPixel(curr->x() + curr->logicalWidth(), curr->x()) : snapSizeToPixel(curr->x(), 0);
if ((ltr && lineBoxEdge > blockRightEdge) || (!ltr && lineBoxEdge < blockLeftEdge)) {
// This line spills out of our box in the appropriate direction. Now we need to see if the line
// can be truncated. In order for truncation to be possible, the line must have sufficient space to
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes