WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
42800
Upstream Android auto hyphenation implemenation to webkit
https://bugs.webkit.org/show_bug.cgi?id=42800
Summary
Upstream Android auto hyphenation implemenation to webkit
sw
Reported
2010-07-21 18:07:09 PDT
Upstream Android auto hyphenation implemenation to webkit
Attachments
Implment auto hyphenation interface for Android.
(4.69 KB, patch)
2010-07-22 11:54 PDT
,
sw
darin
: review+
Details
Formatted Diff
Diff
Implment auto hyphenation interface for Android.
(20.10 KB, patch)
2010-07-26 14:42 PDT
,
sw
no flags
Details
Formatted Diff
Diff
Implement auto hyphenation interface for Android.
(20.11 KB, patch)
2010-07-26 14:45 PDT
,
sw
darin
: review+
darin
: commit-queue-
Details
Formatted Diff
Diff
Implement auto hyphenation interface for Android.
(20.08 KB, patch)
2010-07-26 15:29 PDT
,
sw
darin
: review+
Details
Formatted Diff
Diff
Implement auto hyphenation interface for Android.
(20.08 KB, patch)
2010-07-26 15:34 PDT
,
sw
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
sw
Comment 1
2010-07-22 11:54:11 PDT
Created
attachment 62323
[details]
Implment auto hyphenation interface for Android.
Darin Adler
Comment 2
2010-07-22 12:51:03 PDT
Comment on
attachment 62323
[details]
Implment auto hyphenation interface for Android. There's a more elegant way to deal with the single hyphenation dictionary. static HyphenDict* dictionary = loadHyphenationDictionary(); Since you're only using it at one call site, you can use this there, and not have a "get" function. For one thing we don’t use "get" in our simple getter function names in WebKit. For another, there's no need for a separate boolean. If you did want a get function, it can be written like this. static HyphenDict* hyphenationDictionary() { static HyphenDict* staticDictionary = loadHyphenationDictionary(); return staticDictionary; } There's no reason for the boolean and to nest the entire function inside an if statement. It's also possibly more efficient to have the one time code out of line in a separate function. r=me, though, as is.
sw
Comment 3
2010-07-22 13:44:21 PDT
Thanks Darin for the review approval. Shall I ask you or Steveblock to land the patch?
Steve Block
Comment 4
2010-07-22 13:53:02 PDT
> Thanks Darin for the review approval. Shall I ask you or Steveblock to land the patch?
I'm happy to cq+ the patch for you. It would be great if you could address Darin's comments first though.
sw
Comment 5
2010-07-22 13:58:33 PDT
I think his comments is for nice-to-have. So I think I'll keep it as is now.
mitz
Comment 6
2010-07-22 16:52:16 PDT
Comment on
attachment 62323
[details]
Implment auto hyphenation interface for Android.
> +#include "NotImplemented.h"
Is this needed?
sw
Comment 7
2010-07-22 17:09:02 PDT
it's needed for the android logging logw/logd. thanks.
Steve Block
Comment 8
2010-07-26 02:23:12 PDT
Comment on
attachment 62323
[details]
Implment auto hyphenation interface for Android. (In reply to
comment #7
)
> it's needed for the android logging logw/logd. thanks.
I'm not sure that we should rely on NotImplemented.h to provide the logging macros for Android, especially as this is not present upstream. WebCore doesn't typically use debug logging like this, but if it's really required, you should probably include the necessary headers directly. WebCore/ChangeLog:9 + output may be different in Android. Are you suggesting that we need Android-specific expected results for the layout tests? Is it possible to submit those as part of this patch?
sw
Comment 9
2010-07-26 14:42:32 PDT
Created
attachment 62610
[details]
Implment auto hyphenation interface for Android. hi, Steve/Darin/Mitz, I address all your comments in the new patch. I created android platform specific results. Thanks,
sw
Comment 10
2010-07-26 14:45:34 PDT
Created
attachment 62611
[details]
Implement auto hyphenation interface for Android. fixed a style issue for the LayoutTests/ChangeLog in the latest patch.
WebKit Review Bot
Comment 11
2010-07-26 14:45:59 PDT
Attachment 62610
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 LayoutTests/ChangeLog:6: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 12
2010-07-26 15:25:23 PDT
Comment on
attachment 62611
[details]
Implement auto hyphenation interface for Android.
> + No new tests. (OOPS!)
You need to remove this, or we can't land it. The only OOPS is on the reviewer line, because the landing script edits that line. Any other OOPS will prevent the patch from landing. Patch otherwise seems fine. r=me, but you’ll need to submit a new patch if you want the commit-queue to work.
mitz
Comment 13
2010-07-26 15:26:27 PDT
Comment on
attachment 62611
[details]
Implement auto hyphenation interface for Android.
> + if (!hnj_hyphen_hyphenate(dict, word, length, hyphens)) > + for (size_t i = beforeIndex - 1; i > 0; --i) { > + if (hyphens[i] & 1) > + return i + 1; > + }
There should be braces around the multi-line if block.
sw
Comment 14
2010-07-26 15:29:14 PDT
Created
attachment 62621
[details]
Implement auto hyphenation interface for Android. Thanks Darin for review. Removed the test OOPS.
sw
Comment 15
2010-07-26 15:34:15 PDT
Created
attachment 62622
[details]
Implement auto hyphenation interface for Android. added braces per Mitz' review. Thanks Darin and Mitz for reviewing.
WebKit Commit Bot
Comment 16
2010-07-26 16:12:07 PDT
Comment on
attachment 62622
[details]
Implement auto hyphenation interface for Android. Clearing flags on attachment: 62622 Committed
r64087
: <
http://trac.webkit.org/changeset/64087
>
WebKit Commit Bot
Comment 17
2010-07-26 16:12:12 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug