RESOLVED FIXED 31469
[Gtk] Create a TextBreakIterator implementation based on GLib (without ICU)
https://bugs.webkit.org/show_bug.cgi?id=31469
Summary [Gtk] Create a TextBreakIterator implementation based on GLib (without ICU)
Dominik Röttsches (drott)
Reported 2009-11-13 05:51:15 PST
In order to complete bug 15914, there needs to be a TextBreakIterator implementation that only uses pango instead of ICU.
Attachments
TextBreakIterator implementation based on GLib and pango (12.72 KB, patch)
2009-11-30 01:00 PST, Dominik Röttsches (drott)
no flags
TextBreakIterator implementation based on GLib and pango (12.73 KB, patch)
2009-11-30 17:18 PST, Dominik Röttsches (drott)
no flags
patch (457 bytes, patch)
2010-02-14 08:35 PST, Alexander Butenko
eric: review-
Dominik Röttsches (drott)
Comment 1 2009-11-30 01:00:38 PST
Created attachment 44010 [details] TextBreakIterator implementation based on GLib and pango Removing compilation switches for hybrid version.
Adam Barth
Comment 2 2009-11-30 12:50:17 PST
Attachment 44010 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp:25: You should add a blank line after implementation file's own header. [build/include_order] [4] WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp:67: Missing space before ( in if( [whitespace/parens] [5] WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp:116: Missing space before ( in while( [whitespace/parens] [5] Done processing WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp Total errors found: 3
Dominik Röttsches (drott)
Comment 3 2009-11-30 17:18:45 PST
Created attachment 44048 [details] TextBreakIterator implementation based on GLib and pango Fixed style-bot issues.
WebKit Review Bot
Comment 4 2009-11-30 17:19:54 PST
style-queue ran check-webkit-style on attachment 44048 [details] without any errors.
Gustavo Noronha (kov)
Comment 5 2009-12-08 06:47:28 PST
Comment on attachment 44048 [details] TextBreakIterator implementation based on GLib and pango It looks good to me. Thanks.
WebKit Commit Bot
Comment 6 2009-12-08 06:58:59 PST
Comment on attachment 44048 [details] TextBreakIterator implementation based on GLib and pango Clearing flags on attachment: 44048 Committed r51848: <http://trac.webkit.org/changeset/51848>
WebKit Commit Bot
Comment 7 2009-12-08 06:59:04 PST
All reviewed patches have been landed. Closing bug.
Alexander Butenko
Comment 8 2010-02-14 07:49:37 PST
Reopening bug because this patch is leading webkit to freeze whyle typing text. Open text and type 'test test' there. Go to the end of line and press Ctrl-Left, Ctrl-Left. You will get a a hang. Issue is quite major Program received signal SIGINT, Interrupt. 0xb761ff74 in WebCore::textBreakPrevious(WebCore::TextBreakIterator*) () from /usr/lib/libwebkit-1.0.so.2 (gdb) bt #0 0xb761ff74 in WebCore::textBreakPrevious(WebCore::TextBreakIterator*) () from /usr/lib/libwebkit-1.0.so.2 #1 0xb7467f5b in WebCore::findNextWordFromIndex(unsigned short const*, int, int, bool) () from /usr/lib/libwebkit-1.0.so.2 #2 0xb729f474 in WebCore::previousWordPositionBoundary(unsigned short const*, unsigned int, unsigned int, WebCore::BoundarySearchContextAvailability, bool&) () from /usr/lib/libwebkit-1.0.so.2 #3 0xb72a21de in WebCore::previousBoundary(WebCore::VisiblePosition const&, unsigned int (*)(unsigned short const*, unsigned int, unsigned int, WebCore::BoundarySearchContextAvailability, bool&)) () from /usr/lib/libwebkit-1.0.so.2 #4 0xb72a2872 in WebCore::previousWordPosition(WebCore::VisiblePosition const&) () from /usr/lib/libwebkit-1.0.so.2 #5 0xb7273d54 in WebCore::SelectionController::modifyMovingBackward(WebCore::TextGranularity) () from /usr/lib/libwebkit-1.0.so.2 #6 0xb72747b2 in WebCore::SelectionController::modifyMovingLeft(WebCore::TextGranularity) () from /usr/lib/libwebkit-1.0.so.2 #7 0xb7278784 in WebCore::SelectionController::modify(WebCore::SelectionController::EAlteration, WebCore::SelectionController::EDirection, WebCore::TextGranularity, bool) () from /usr/lib/libwebkit-1.0.so.2 #8 0xb72785c8 in WebCore::SelectionController::modify(WebCore::SelectionController::EAlteration, WebCore::SelectionController::EDirection, WebCore::TextGranularity, bool) () from /usr/lib/libwebkit-1.0.so.2 #9 0xb724e4d5 in WebCore::executeMoveWordLeft(WebCore::Frame*, WebCore::Event*, WebCore::EditorCommandSource, WebCore::String const&) () from /usr/lib/libwebkit-1.0.so.2 #10 0xb724dd0e in WebCore::Editor::Command::execute(WebCore::String const&, WebCore::Event*) const () from /usr/lib/libwebkit-1.0.so.2 #11 0xb7251efa in WebCore::Editor::Command::execute(WebCore::Event*) const () from /usr/lib/libwebkit-1.0.so.2 #12 0xb762eee1 in WebKit::EditorClient::handleKeyboardEvent(WebCore::KeyboardEvent*) () from /usr/lib/libwebkit-1.0.so.2 #13 0xb72418e9 in WebCore::Editor::handleKeyboardEvent(WebCore::KeyboardEvent*) () from /usr/lib/libwebkit-1.0.so.2 #14 0xb73c7cbc in WebCore::EventHandler::defaultKeyboardEventHandler(WebCore::KeyboardEvent*) () from /usr/lib/libwebkit-1.0.so.2 #15 0xb71ee44d in WebCore::Node::defaultEventHandler(WebCore::Event*) () from /usr/lib/libwebkit-1.0.so.2 #16 0xb7309a24 in WebCore::HTMLTextAreaElement::defaultEventHandler(WebCore::Eve nt*) () from /usr/lib/libwebkit-1.0.so.2 #17 0xb71ee895 in WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr<WebCore::Event>) () from /usr/lib/libwebkit-1.0.so.2 #18 0xb71eec0b in WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) () from /usr/lib/libwebkit-1.0.so.2 #19 0xb71dd015 in WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&) () from /usr/lib/libwebkit-1.0.so.2 #20 0xb73c5879 in WebCore::EventHandler::keyEvent(WebCore::PlatformKeyboardEvent const&) () from /usr/lib/libwebkit-1.0.so.2 #21 0xb7654b6c in webkit_web_view_key_press_event(_GtkWidget*, _GdkEventKey*) () from /usr/lib/libwebkit-1.0.so.2 #22 0xb7d6b1a4 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #23 0x414cd5e9 in ?? () from /usr/lib/libgobject-2.0.so.0 #24 0x414cee88 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #25 0x414e309e in ?? () from /usr/lib/libgobject-2.0.so.0 #26 0x414e45b8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 ---Type <return> to continue, or q <return> to quit--- #27 0x414e4ba6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #28 0xb7e8747e in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #29 0xb7e9bf7a in gtk_window_propagate_key_event () from /usr/lib/libgtk-x11-2.0.so.0 #30 0x0807d321 in midori_browser_key_press_event (widget=0x8461080, event=0x845fe00) at ../midori/midori-browser.c:1784 #31 0xb7d6b1a4 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #32 0x414cd5e9 in ?? () from /usr/lib/libgobject-2.0.so.0 #33 0x414cef62 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #34 0x414e309e in ?? () from /usr/lib/libgobject-2.0.so.0 #35 0x414e45b8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #36 0x414e4ba6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #37 0xb7e8747e in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #38 0xb7d63a1b in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #39 0xb7d64bd9 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #40 0xb7bee53a in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #41 0x4123db38 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #42 0x412413d0 in ?? () from /lib/libglib-2.0.so.0 #43 0x4124183f in g_main_loop_run () from /lib/libglib-2.0.so.0 #44 0xb7d65149 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #45 0x08062521 in main (argc=135444520, argv=0x1) at ../midori/main.c:1953
Alexander Butenko
Comment 9 2010-02-14 08:32:02 PST
fix was partly explained in https://bugs.webkit.org/show_bug.cgi?id=15914#c58 comment from Kalle Vahlman Hovewer returning TextBreakDone instead of textBreakFirst was leading to a freeze on new lines. Attached patch fixing problem for me.
Alexander Butenko
Comment 10 2010-02-14 08:35:56 PST
Eric Seidel (no email)
Comment 11 2010-02-17 14:50:26 PST
Comment on attachment 48723 [details] patch Every change requires a ChangeLog entry. See http://webkit.org/coding/contributing.html
Note You need to log in before you can comment on or make changes to this bug.