Bug 41093 - fast/text/hyphenate-character.html is failing on the Leopard Commit Bot
Summary: fast/text/hyphenate-character.html is failing on the Leopard Commit Bot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-23 12:39 PDT by Eric Seidel (no email)
Modified: 2010-08-19 07:38 PDT (History)
4 users (show)

See Also:


Attachments
Specify the locale for hyphenation in the test (2.32 KB, patch)
2010-08-18 22:32 PDT, mitz
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-06-23 12:39:25 PDT
fast/text/hyphenate-character.html is failing on the Leopard Commit Bot

--- /tmp/layout-test-results/fast/text/hyphenate-character-expected.txt 2010-06-23 12:23:52.000000000 -0700
+++ /tmp/layout-test-results/fast/text/hyphenate-character-actual.txt   2010-06-23 12:23:52.000000000 -0700
@@ -17,18 +17,17 @@
           RenderText {#text} at (7,7) size 330x220
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,29) width 245: "at first was in managing her"
-            text run at (7,51) width 245: "flamingo: she succeeded in get"
-            text run at (7,73) width 208: "ting its body tucked away, "
-            text run at (215,73) width 37: "com"
-            text run at (7,95) width 245: "fortably enough, under her arm,"
-            text run at (7,117) width 226: "with its legs hanging down, "
-            text run at (233,117) width 104: "but generally,"
-            text run at (7,139) width 330: "just as she had got its neck nicely straight"
-            text run at (7,161) width 41: "ened "
-            text run at (48,161) width 289: "out, and was going to give the hedge"
-            text run at (7,183) width 204: "hog a blow with its head, it "
-            text run at (211,183) width 126: "would twist itself"
-            text run at (7,205) width 233: "round and look up in her face\x{2026}"
+            text run at (7,51) width 245: "flamingo: she succeeded in"
+            text run at (7,73) width 245: "getting its body tucked away,"
+            text run at (7,95) width 245: "comfortably enough, under her"
+            text run at (7,117) width 307: "arm, with its legs hanging down, "
+            text run at (314,117) width 23: "but"
+            text run at (7,139) width 330: "generally, just as she had got its neck nicely"
+            text run at (7,161) width 95: "straightened "
+            text run at (102,161) width 235: "out, and was going to give the"
+            text run at (7,183) width 285: "hedgehog a blow with its head, it "
+            text run at (292,183) width 45: "would"
+            text run at (7,205) width 314: "twist itself round and look up in her face\x{2026}"
       RenderBlock (floating) {DIV} at (356,0) size 344x284
         RenderBlock {P} at (0,16) size 344x18
           RenderText {#text} at (0,0) size 81x18
@@ -43,18 +42,17 @@
           RenderText {#text} at (7,7) size 330x220
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,29) width 245: "at first was in managing her"
-            text run at (7,51) width 245: "flamingo: she succeeded in get"
-            text run at (7,73) width 208: "ting its body tucked away, "
-            text run at (215,73) width 37: "com"
-            text run at (7,95) width 245: "fortably enough, under her arm,"
-            text run at (7,117) width 226: "with its legs hanging down, "
-            text run at (233,117) width 104: "but generally,"
-            text run at (7,139) width 330: "just as she had got its neck nicely straight"
-            text run at (7,161) width 41: "ened "
-            text run at (48,161) width 289: "out, and was going to give the hedge"
-            text run at (7,183) width 204: "hog a blow with its head, it "
-            text run at (211,183) width 126: "would twist itself"
-            text run at (7,205) width 233: "round and look up in her face\x{2026}"
+            text run at (7,51) width 245: "flamingo: she succeeded in"
+            text run at (7,73) width 245: "getting its body tucked away,"
+            text run at (7,95) width 245: "comfortably enough, under her"
+            text run at (7,117) width 307: "arm, with its legs hanging down, "
+            text run at (314,117) width 23: "but"
+            text run at (7,139) width 330: "generally, just as she had got its neck nicely"
+            text run at (7,161) width 95: "straightened "
+            text run at (102,161) width 235: "out, and was going to give the"
+            text run at (7,183) width 285: "hedgehog a blow with its head, it "
+            text run at (292,183) width 45: "would"
+            text run at (7,205) width 314: "twist itself round and look up in her face\x{2026}"
       RenderBlock (floating) {DIV} at (4,284) size 344x284
         RenderBlock {P} at (0,16) size 344x18
           RenderText {#text} at (0,0) size 47x18

.. and more.

I suspect that this depends on a special font?
Comment 1 Eric Seidel (no email) 2010-06-23 12:42:24 PDT
The bot is Leopard:
ProductVersion:	10.5.8
BuildVersion:	9L31a

It doesn't have Safari 5 on it yet, but I can add it if that would fix the issue.
Comment 2 Eric Seidel (no email) 2010-06-23 12:43:03 PDT
Anyway, we now know why the commit-queue hasn't committed anything in the last 48 hours. :)
Comment 3 mitz 2010-06-23 12:45:53 PDT
It appears that hyphenation is not taking place on Leopard.
Comment 4 Eric Seidel (no email) 2010-06-23 12:51:49 PDT
I would expect the other Leopard bots to be failing too though, no?
Comment 5 mitz 2010-06-23 12:57:40 PDT
(In reply to comment #4)
> I would expect the other Leopard bots to be failing too though, no?

If they’re not, then my next guess would be that the machine where it’s failing is configured differently. Specifically, hyphenation will not happen unless the topmost language in System Preferences > International (as I think it was called on Leopard) > Language is not English.
Comment 6 mitz 2010-06-23 12:58:28 PDT
From the command line, a way to get the language preference is

defaults read -g AppleLanguages

"en" should be the first element in the array for hyphenation to work.
Comment 7 Eric Seidel (no email) 2010-06-23 13:04:07 PDT
I don't see any hyphenate tests listed in either:
http://trac.webkit.org/browser/trunk/LayoutTests/platform/mac-leopard/Skipped
or
http://trac.webkit.org/browser/trunk/LayoutTests/platform/mac/Skipped

So I suspect the other leopard bots must be running them and passing them.


% read -g AppleLanguages
2010-06-23 13:01:08.222 defaults[87738:10b] 
The domain/default pair of (kCFPreferencesAnyApplication, AppleLanguages) does not exist

Looks like we already set AppleLanguages during DRT execution anyway:
http://trac.webkit.org/browser/trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm#L391


I'm happy to get you any other information you might need from the machine.
Comment 8 mitz 2010-06-23 13:45:26 PDT
(In reply to comment #7)
> Looks like we already set AppleLanguages during DRT execution anyway:
> http://trac.webkit.org/browser/trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm#L391

Then I have no idea why it’s failing. Are you able to run a GUI session on that machine?
Comment 9 Eric Seidel (no email) 2010-06-23 13:48:46 PDT
Yup.  I even have physical access to the machine if needed.  Normally I VNC or SSH to it though.
Comment 10 Eric Seidel (no email) 2010-06-23 13:59:29 PDT
I'm forcing the machine to do a clean build in case that helps.
Comment 11 Adam Barth 2010-06-23 14:03:15 PDT
I've seen similar failures on snow leopard with safari 5 installed
Comment 12 mitz 2010-06-23 14:03:41 PDT
> Yup.  I even have physical access to the machine if needed.  Normally I VNC or SSH to it though.

Thing I would try then are: see if hyphenation ever occurs in Safari using a nightly build and specifying  "-webkit-hyphens: auto"; see if hyphenation ever occurs in the system, using TextEdit and selecting Enable Hyphenation.
Comment 13 Eric Seidel (no email) 2010-06-23 14:04:00 PDT
FYI, the commit-queue is run inside a GUI session (otherwise DRT has kittens).
Comment 14 Eric Seidel (no email) 2010-06-23 14:09:06 PDT
On the Commit Bot, over VNC: I pasted "getting" about 1000 times in a TextEdit doc, and it hyphenated when I made the window small enough (I would have expected it to hyphenate at larger window sizes, but it didn't seem to).
Comment 15 mitz 2010-06-23 14:13:18 PDT
(In reply to comment #7)
> % read -g AppleLanguages
> 2010-06-23 13:01:08.222 defaults[87738:10b] 
> The domain/default pair of (kCFPreferencesAnyApplication, AppleLanguages) does not exist
> 
> Looks like we already set AppleLanguages during DRT execution anyway:
> http://trac.webkit.org/browser/trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm#L391

Looking more carefully at the WebKit code <http://trac.webkit.org/browser/trunk/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm#L39>, I can see that the default has to be set in the global domain, so what DumpRenderTree does is ineffective here. I bet

defaults write -g AppleLanguages -array en

will fix it.
Comment 16 Eric Seidel (no email) 2010-06-23 14:15:56 PDT
On both my local SL box, as well as on the commit bot, I tested the following example:

<body style="-webkit-hyphens: auto;">
getting getting getting getting (repeated 1000 or so times)

I used r61670.dmg">http://builds.nightly.webkit.org/files/trunk/mac/WebKit-SVN-r61670.dmg

On my local SL box, hyphenation worked.  On the Commit Bot it never hyphenated.  So it seems to be a problem specific to webkit, since TextEdit on the Commit Bot was able to hyphenate.
Comment 17 mitz 2010-06-23 14:17:46 PDT
Please try setting the default in the global domain.
Comment 18 Eric Seidel (no email) 2010-06-23 14:18:48 PDT
(Sorry my previous comment was composed before I read your global domain stuff.  Silly bugzilla.)

Yup!  "defaults write -g AppleLanguages -array en" fixed it on the Commit Bot.

Now I guess we just need to fix the DRT/WebKit code to play nice together.
Comment 19 Alexey Proskuryakov 2010-06-23 15:12:29 PDT
I don't think that forcing a particular language is a good thing to do in DRT long-term. It's good to test different code paths, even if only some developers can do that. We were getting a lot of good bug reports from different time zones, and I think that the same applies to languages.

Also long term, I don't see why English text shouldn't be hyphenated on my machine with primary Russian language.
Comment 20 mitz 2010-08-18 22:32:22 PDT
Created attachment 64808 [details]
Specify the locale for hyphenation in the test
Comment 21 mitz 2010-08-18 22:59:08 PDT
Fixed in <http://trac.webkit.org/projects/webkit/changeset/65652>.
Comment 22 Eric Seidel (no email) 2010-08-19 07:38:31 PDT
Thank you mitz!