summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:06:32 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:06:32 +0000
commitf3b308e596f55dc5e9f5a0d5c862c6b7ae7211fa (patch)
treeca79c47350bc4d8ee42e2101bfff69ce6a029eb6 /chrome/browser/resources
parent7ea7ec4f52496cd65e8917b522df445bc9fd63f5 (diff)
downloadchromium_src-f3b308e596f55dc5e9f5a0d5c862c6b7ae7211fa.zip
chromium_src-f3b308e596f55dc5e9f5a0d5c862c6b7ae7211fa.tar.gz
chromium_src-f3b308e596f55dc5e9f5a0d5c862c6b7ae7211fa.tar.bz2
This CL is a work around for the following 2 issues:
issue 7252 --[New Tab] page, the underline of linked text should be under all text http://crbug.com/7252 issue 7697 -- RTL: New Tab page - bad display of page titles with RTL text http://crbug.com/7697 The bug is caused by WebKit not rendering text-overflow:ellipsis correctly for mixed bidi text with rtl directionality. The workaround is to change text-overflow to 'clip' for text with 'rtl' directionality. (The workaround we thought by changing 'text-overflow' to 'clip' in the style, such as in 'html[dir='rtl'] .thumbnail-title', does not work well. 'text-overflow:clip' caused pure English text overlap with the right-aligned favicon in RTL New Tab page). Review URL: http://codereview.chromium.org/42636 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/new_tab.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html
index fab905a..1b966ca 100644
--- a/chrome/browser/resources/new_tab.html
+++ b/chrome/browser/resources/new_tab.html
@@ -561,6 +561,13 @@ function makeMostVisitedDOM(page, number) {
for more information.
*/
div_title.style.direction = page.direction;
+ /* The following if statement is a temporary workaround for
+ http://crbug.com/7252 and http://crbug.com/7697. It should be removed
+ before closing these bugs.
+ */
+ if (page.direction == 'rtl') {
+ div_title.style.textOverflow = 'clip';
+ }
if (page.title) {
div_title.appendChild(document.createTextNode(page.title));
} else {
@@ -700,6 +707,13 @@ function renderRecentlyBookmarked(entries) {
comment about setting div_title.style.direction above for details.
*/
link.style.direction = entry.direction;
+ /* The following if statement is a temporary workaround for
+ http://crbug.com/7252 and http://crbug.com/7697. It should be removed
+ before closing these bugs.
+ */
+ if (entry.direction == 'rtl') {
+ link.style.textOverflow = 'clip';
+ }
link.appendChild(document.createTextNode(entry.title));
container.appendChild(link);
}
@@ -794,6 +808,14 @@ function createRecentBookmark(tagName, data) {
about setting div_title.style.direction above for details.
*/
link.style.direction = data.direction;
+ /* The following if statement is a temporary workaround for
+ http://crbug.com/7252 and http://crbug.com/7697. It should be removed
+ before closing these bugs.
+ */
+ if (data.direction == 'rtl') {
+ link.style.textOverflow = 'clip';
+ }
+
link.appendChild(document.createTextNode(data.title));
return link;
}