Bug 55606

Summary: Clean up WebCore tabsToLinks code a little
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch sullivan: review+

Alexey Proskuryakov
Reported 2011-03-02 13:07:17 PST
It's really difficult to follow this code. I'm going to make a baby step to its improvement here.
Attachments
proposed patch (12.16 KB, patch)
2011-03-02 13:16 PST, Alexey Proskuryakov
sullivan: review+
Alexey Proskuryakov
Comment 1 2011-03-02 13:16:45 PST
Created attachment 84453 [details] proposed patch
John Sullivan
Comment 2 2011-03-02 14:41:49 PST
Comment on attachment 84453 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=84453&action=review > Source/WebCore/ChangeLog:16 > + (WebCore::eventInvertsTabsToLinksClientCallResult): Merged implementations from plartform typo, "plartform"
Alexey Proskuryakov
Comment 3 2011-03-02 14:51:45 PST
Martin Robinson
Comment 4 2011-03-02 15:54:32 PST
This seems to have introduced many assertion failures on the GTK+ debug bots: warning: Can't read pathname for load map: Input/output error. Core was generated by `/home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/Programs/DumpR'. Program terminated with signal 11, Segmentation fault. #0 0x00007f8da4ef82b4 in WebCore::EventHandler::tabsToLinks (this=0xb76fb0, event=0x1246350) at ../../Source/WebCore/page/EventHandler.cpp:2750 2750 ASSERT(!event || event->keyIdentifier() == "U+0009"); Thread 2 (Thread 5599): #0 0x00007f8da08834d9 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007f8da1ea94c2 in g_cond_timed_wait_posix_impl (cond=0x1171d64, entered_mutex=0x189, abs_time=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./gthread/gthread-posix.c:242 #2 0x00007f8da19d4d31 in g_async_queue_pop_intern_unlocked (queue=0x117b900, try=0, end_time=0x7f8d98fabbf0) at /tmp/buildd/glib2.0-2.27.91/./glib/gasyncqueue.c:423 #3 0x00007f8da1a29021 in g_thread_pool_wait_for_new_task (data=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./glib/gthreadpool.c:274 #4 g_thread_pool_thread_proxy (data=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./glib/gthreadpool.c:308 #5 0x00007f8da1a27124 in g_thread_create_proxy (data=0x117b970) at /tmp/buildd/glib2.0-2.27.91/./glib/gthread.c:1897 #6 0x00007f8da087e8ba in start_thread () from /lib/libpthread.so.0 #7 0x00007f8da05e602d in clone () from /lib/libc.so.6 #8 0x0000000000000000 in ?? () Thread 1 (Thread 5597): #0 0x00007f8da4ef82b4 in WebCore::EventHandler::tabsToLinks (this=0xb76fb0, event=0x1246350) at ../../Source/WebCore/page/EventHandler.cpp:2750 #1 0x00007f8da4cc9fb2 in WebCore::HTMLAnchorElement::isKeyboardFocusable (this=0x12196a0, event=0x1246350) at ../../Source/WebCore/html/HTMLAnchorElement.cpp:105 #2 0x00007f8da4efd34f in WebCore::FocusController::findFocusCandidateInContainer (this=0xb27690, container=0x1197000, startingRect=..., direction=WebCore::FocusDirectionDown, event=0x1246350, closest=...) at ../../Source/WebCore/page/FocusController.cpp:491 #3 0x00007f8da4efd5e8 in WebCore::FocusController::advanceFocusDirectionallyInContainer (this=0xb27690, container=0x1197000, startingRect=..., direction=WebCore::FocusDirectionDown, event=0x1246350) at ../../Source/WebCore/page/FocusController.cpp:515 #4 0x00007f8da4efdbb9 in WebCore::FocusController::advanceFocusDirectionally (this=0xb27690, direction=WebCore::FocusDirectionDown, event=0x1246350) at ../../Source/WebCore/page/FocusController.cpp:602 #5 0x00007f8da4efbc77 in WebCore::FocusController::advanceFocus (this=0xb27690, direction=WebCore::FocusDirectionDown, event=0x1246350, initialFocus=false) at ../../Source/WebCore/page/FocusController.cpp:185 #6 0x00007f8da4ef84e3 in WebCore::EventHandler::defaultArrowEventHandler (this=0xb76fb0, focusDirection=WebCore::FocusDirectionDown, event=0x1246350) at ../../Source/WebCore/page/EventHandler.cpp:2813 #7 0x00007f8da4ef701b in WebCore::EventHandler::defaultKeyboardEventHandler (this=0xb76fb0, event=0x1246350) at ../../Source/WebCore/page/EventHandler.cpp:2468 #8 0x00007f8da4b9aeb2 in WebCore::Node::defaultEventHandler (this=0x1201fd0, event=0x1246350) at ../../Source/WebCore/dom/Node.cpp:3007 #9 0x00007f8da4cca6af in WebCore::HTMLAnchorElement::defaultEventHandler (this=0x1201fd0, event=0x1246350) at ../../Source/WebCore/html/HTMLAnchorElement.cpp:172 #10 0x00007f8da4b992c3 in WebCore::Node::dispatchGenericEvent (this=0x1201fd0, prpEvent=...) at ../../Source/WebCore/dom/Node.cpp:2714 #11 0x00007f8da4b98a0e in WebCore::Node::dispatchEvent (this=0x1201fd0, prpEvent=...) at ../../Source/WebCore/dom/Node.cpp:2612 #12 0x00007f8da4b7e009 in WebCore::EventTarget::dispatchEvent (this=0x1201fd0, event=..., ec=@0x7fff6c9d60dc) at ../../Source/WebCore/dom/EventTarget.cpp:297 #13 0x00007f8da4ef6907 in WebCore::EventHandler::keyEvent (this=0xb76fb0, initialKeyEvent=...) at ../../Source/WebCore/page/EventHandler.cpp:2401 #14 0x00007f8da486477f in webkit_web_view_key_press_event (widget=0xb62010, event=0xb1d580) at ../../Source/WebKit/gtk/webkit/webkitwebview.cpp:769 #15 0x00007f8da393cc18 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x00007f8da22be289 in g_closure_invoke (closure=0xafd2a0, return_value=0x7fff6c9d6410, n_param_values=2, param_values=0x117d750, invocation_hint=0x7fff6c9d63d0) at /tmp/buildd/glib2.0-2.27.91/./gobject/gclosure.c:767 #17 0x00007f8da22d6ff2 in signal_emit_unlocked_R (node=0xafd310, detail=<value optimized out>, instance=<value optimized out>, emission_return=<value optimized out>, instance_and_params=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3290 #18 0x00007f8da22d897c in g_signal_emit_valist (instance=0xb62010, signal_id=<value optimized out>, detail=0, var_args=0x7fff6c9d65c0) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:2993 #19 0x00007f8da22d9363 in g_signal_emit (instance=0x7fff6c9d50e0, signal_id=0, detail=2693217792) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3040 #20 0x00007f8da3a52f3f in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #21 0x00007f8da3a6341b in gtk_window_propagate_key_event () from /usr/lib/libgtk-x11-2.0.so.0 #22 0x00007f8da3a664ab in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #23 0x00007f8da393cc18 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x00007f8da22be33e in g_closure_invoke (closure=0xafd2a0, return_value=0x7fff6c9d68e0, n_param_values=2, param_values=0x117d6c0, invocation_hint=0x7fff6c9d68a0) at /tmp/buildd/glib2.0-2.27.91/./gobject/gclosure.c:767 #25 0x00007f8da22d6ff2 in signal_emit_unlocked_R (node=0xafd310, detail=<value optimized out>, instance=<value optimized out>, emission_return=<value optimized out>, instance_and_params=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3290 #26 0x00007f8da22d897c in g_signal_emit_valist (instance=0xaf6280, signal_id=<value optimized out>, detail=0, var_args=0x7fff6c9d6a90) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:2993 #27 0x00007f8da22d9363 in g_signal_emit (instance=0x7fff6c9d50e0, signal_id=0, detail=2693217792) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3040 #28 0x00007f8da3a52f3f in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #29 0x00007f8da39351d4 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #30 0x00007f8da39361bb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x0000000000422881 in dispatchEvent (event=0xb1d580) at ../../Tools/DumpRenderTree/gtk/EventSender.cpp:535 #32 0x0000000000423128 in keyDownCallback (context=0x7f8d533aa168, function=0x7f8d53384850, thisObject=0x7f8d53384620, argumentCount=1, arguments=0x7fff6c9d6d48, exception=0x7fff6c9d6de8) at ../../Tools/DumpRenderTree/gtk/EventSender.cpp:714 #33 0x00007f8da565ecc8 in JSC::JSCallbackFunction::call (exec=0x7f8d533aa168) at ../../Source/JavaScriptCore/API/JSCallbackFunction.cpp:67 #34 0x00007f8da5703959 in JSC::cti_op_call_NotJSFunction (args=0x7fff6c9d6f20) at ../../Source/JavaScriptCore/jit/JITStubs.cpp:2094 #35 0x00007f8da56fe88f in JSC::JITThunks::tryCacheGetByID (callFrame=0x7f8d533aa118, codeBlock=0x7fff6c9d6f20, returnAddress=..., baseValue=..., propertyName=..., slot=..., stubInfo=0xb989e0) at ../../Source/JavaScriptCore/jit/JITStubs.cpp:869 #36 0x00007f8da56d1983 in JSC::JITCode::execute (this=0x11fbd68, registerFile=0xb98948, callFrame=0x7f8d533aa048, globalData=0xb989e0) at ../../Source/JavaScriptCore/jit/JITCode.h:77 #37 0x00007f8da56cea65 in JSC::Interpreter::executeCall (this=0xb98930, callFrame=0x11a7ab8, function=0x7f8d53397350, callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...) at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:844 #38 0x00007f8da575b8c4 in JSC::call (exec=0x11a7ab8, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...) at ../../Source/JavaScriptCore/runtime/CallData.cpp:38 #39 0x00007f8da4954fd7 in WebCore::JSMainThreadExecState::call (exec=0x11a7ab8, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...) at ../../Source/WebCore/bindings/js/JSMainThreadExecState.h:48 #40 0x00007f8da498814d in WebCore::JSEventListener::handleEvent (this=0x11f4820, scriptExecutionContext=0x1197068, event=0x12162a0) at ../../Source/WebCore/bindings/js/JSEventListener.cpp:123 #41 0x00007f8da4b7e39d in WebCore::EventTarget::fireEventListeners (this=0xb9c8b0, event=0x12162a0, d=0xb9c980, entry=...) at ../../Source/WebCore/dom/EventTarget.cpp:354 #42 0x00007f8da4b7e22c in WebCore::EventTarget::fireEventListeners (this=0xb9c8b0, event=0x12162a0) at ../../Source/WebCore/dom/EventTarget.cpp:323 #43 0x00007f8da4ee2762 in WebCore::DOMWindow::dispatchEvent (this=0xb9c8b0, prpEvent=..., prpTarget=...) at ../../Source/WebCore/page/DOMWindow.cpp:1585 #44 0x00007f8da4ee2876 in WebCore::DOMWindow::dispatchTimedEvent (this=0xb9c8b0, event=..., target=0x1197000, startTime=0x1172968, endTime=0x1172970) at ../../Source/WebCore/page/DOMWindow.cpp:1597 #45 0x00007f8da4ee2422 in WebCore::DOMWindow::dispatchLoadEvent (this=0xb9c8b0) at ../../Source/WebCore/page/DOMWindow.cpp:1557 #46 0x00007f8da4b35dbe in WebCore::Document::dispatchWindowLoadEvent (this=0x1197000) at ../../Source/WebCore/dom/Document.cpp:3504 #47 0x00007f8da4b3079d in WebCore::Document::implicitClose (this=0x1197000) at ../../Source/WebCore/dom/Document.cpp:2090 #48 0x00007f8da4e5c9a5 in WebCore::FrameLoader::checkCallImplicitClose (this=0xb768a0) at ../../Source/WebCore/loader/FrameLoader.cpp:891 #49 0x00007f8da4e5c778 in WebCore::FrameLoader::checkCompleted (this=0xb768a0) at ../../Source/WebCore/loader/FrameLoader.cpp:839 #50 0x00007f8da4e5daeb in WebCore::FrameLoader::completed (this=0x120f850) at ../../Source/WebCore/loader/FrameLoader.cpp:1202 #51 0x00007f8da4e5c79b in WebCore::FrameLoader::checkCompleted (this=0x120f850) at ../../Source/WebCore/loader/FrameLoader.cpp:843 #52 0x00007f8da4e5c4e7 in WebCore::FrameLoader::finishedParsing (this=0x120f850) at ../../Source/WebCore/loader/FrameLoader.cpp:773 #53 0x00007f8da4b390b2 in WebCore::Document::finishedParsing (this=0x1204ca0) at ../../Source/WebCore/dom/Document.cpp:4270 #54 0x00007f8da4d699ac in WebCore::HTMLTreeBuilder::finished (this=0x11a5700) at ../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2804 #55 0x00007f8da4d404cc in WebCore::HTMLDocumentParser::end (this=0x1206100) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:354 #56 0x00007f8da4d405c9 in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd (this=0x1206100) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:363 #57 0x00007f8da4d3f8f9 in WebCore::HTMLDocumentParser::prepareToStopParsing (this=0x1206100) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:151 #58 0x00007f8da4d4060e in WebCore::HTMLDocumentParser::attemptToEnd (this=0x1206100) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:375 #59 0x00007f8da4d406c7 in WebCore::HTMLDocumentParser::finish (this=0x1206100) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:403 #60 0x00007f8da4b30eae in WebCore::Document::finishParsing (this=0x1204ca0) at ../../Source/WebCore/dom/Document.cpp:2257 #61 0x00007f8da4e56427 in WebCore::DocumentWriter::endIfNotLoadingMainResource (this=0x1218a20) at ../../Source/WebCore/loader/DocumentWriter.cpp:222 #62 0x00007f8da4e5637d in WebCore::DocumentWriter::end (this=0x1218a20) at ../../Source/WebCore/loader/DocumentWriter.cpp:207 #63 0x00007f8da4e4b495 in WebCore::DocumentLoader::finishedLoading (this=0x1218920) at ../../Source/WebCore/loader/DocumentLoader.cpp:284 #64 0x00007f8da4e62a37 in WebCore::FrameLoader::finishedLoading (this=0x120f850) at ../../Source/WebCore/loader/FrameLoader.cpp:2188 #65 0x00007f8da4e936d6 in WebCore::MainResourceLoader::didFinishLoading (this=0x12168f0, finishTime=0) at ../../Source/WebCore/loader/MainResourceLoader.cpp:465 #66 0x00007f8da4e9f89d in WebCore::ResourceLoader::didFinishLoading (this=0x12168f0, finishTime=0) at ../../Source/WebCore/loader/ResourceLoader.cpp:436 #67 0x00007f8da48047b0 in WebCore::readCallback (source=0x118f9e0, asyncResult=0x118f980, data=0x0) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:781 #68 0x00007f8da2556f65 in async_ready_callback_wrapper (source_object=0x118f9e0, res=0x118f980, user_data=0x0) at /tmp/buildd/glib2.0-2.27.91/./gio/ginputstream.c:470 #69 0x00007f8da25682bc in complete_in_idle_cb (data=0x118f980) at /tmp/buildd/glib2.0-2.27.91/./gio/gsimpleasyncresult.c:757 #70 0x00007f8da19fd362 in g_main_dispatch (context=0xaf82c0) at /tmp/buildd/glib2.0-2.27.91/./glib/gmain.c:2440 #71 g_main_context_dispatch (context=0xaf82c0) at /tmp/buildd/glib2.0-2.27.91/./glib/gmain.c:3013 #72 0x00007f8da1a01a28 in g_main_context_iterate (context=0xaf82c0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./glib/gmain.c:3091 #73 0x00007f8da1a01f35 in g_main_loop_run (loop=0x1172dc0) at /tmp/buildd/glib2.0-2.27.91/./glib/gmain.c:3299 #74 0x00007f8da3936657 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #75 0x000000000041e379 in runTest (testPathOrURL=...) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:679 #76 0x000000000041da0b in runTestingServerLoop () at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:489 #77 0x000000000041faf0 in main (argc=2, argv=0x7fff6c9d8958) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:1143
Alexey Proskuryakov
Comment 5 2011-03-02 16:19:25 PST
Build fix in <http://trac.webkit.org/changeset/80173>, spatial navigation assertion fix in <http://trac.webkit.org/changeset/80182>.
Note You need to log in before you can comment on or make changes to this bug.