[Webkit-unassigned] [Bug 160163] New: REGRESSION(r200931): Invalid cast in highestAncestorToWrapMarkup()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 25 06:18:17 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=160163

            Bug ID: 160163
           Summary: REGRESSION(r200931): Invalid cast in
                    highestAncestorToWrapMarkup()
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: Gtk, LayoutTestFailure
          Severity: Normal
          Priority: P2
         Component: HTML Editing
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org, cdumez at apple.com,
                    darin at apple.com

Since r200931 the result of enclosingNodeOfType() in highestAncestorToWrapMarkup() is downcasted to Element, but the result of enclosingNodeOfType() can be a Node that is not an Element, in this case is Text. The following tests are failing in GTK+ Debug bot because of this:

editing/execCommand/format-block-from-range-selection.html
editing/execCommand/indent-nested-lists-7.html
editing/execCommand/remove-format-elements.html
editing/execCommand/remove-format-orphaned-list-item.html

The cast is not needed at all since that node is passed to editingIgnoresContent() and selectionFromContentsOfNode() and both receive a Node not an Element.

STDERR: ASSERTION FAILED: !source || is<Target>(*source)
STDERR: ../../Source/WTF/wtf/TypeCasts.h(89) : typename WTF::match_constness<Source, Target>::type* WTF::downcast(Source*) [with Target = WebCore::Element; Source = WebCore::Node; typename WTF::match_constness<Source, Target>::type = WebCore::Element]
STDERR: 1   0x7fc28ad6692f /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x1e) [0x7fc28ad6692f]
STDERR: 2   0x7fc28ad66945 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(+0x2213945) [0x7fc28ad66945]
STDERR: 3   0x7fc291bf34af /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WTF::match_constness<WebCore::Node, WebCore::Element>::type* WTF::downcast<WebCore::Element, WebCore::Node>(WebCore::Node*)+0x4a) [0x7fc291bf34af]
STDERR: 4   0x7fc2921f6346 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x61e8346) [0x7fc2921f6346]
STDERR: 5   0x7fc2921f6ae4 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x61e8ae4) [0x7fc2921f6ae4]
STDERR: 6   0x7fc2921f76c7 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::createMarkup(WebCore::Range const&, WTF::Vector<WebCore::Node*, 0ul, WTF::CrashOnOverflow, 16ul>*, WebCore::EAnnotateForInterchange, bool, WebCore::EAbsoluteURLs)+0x5d) [0x7fc2921f76c7]
STDERR: 7   0x7fc291826994 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebEditorClient::updateGlobalSelection(WebCore::Frame*)+0x186) [0x7fc291826994]
STDERR: 8   0x7fc2916304f5 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebEditorClient::respondToChangedSelection(WebCore::Frame*)+0xd7) [0x7fc2916304f5]
STDERR: 9   0x7fc2921787fb /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::Editor::respondToChangedSelection(WebCore::VisibleSelection const&, unsigned int)+0x51) [0x7fc2921787fb]
STDERR: 10  0x7fc292189691 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance(WebCore::VisibleSelection const&, unsigned int, WebCore::FrameSelection::CursorAlignOnScroll, WebCore::TextGranularity)+0x41d) [0x7fc292189691]
STDERR: 11  0x7fc2921897c9 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::FrameSelection::setSelection(WebCore::VisibleSelection const&, unsigned int, WebCore::AXTextStateChangeIntent, WebCore::FrameSelection::CursorAlignOnScroll, WebCore::TextGranularity)+0x3f) [0x7fc2921897c9]
STDERR: 12  0x7fc292175e7b /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::Editor::changeSelectionAfterCommand(WebCore::VisibleSelection const&, unsigned int)+0x177) [0x7fc292175e7b]
STDERR: 13  0x7fc29216b0ac /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::Editor::appliedEditing(WTF::PassRefPtr<WebCore::CompositeEditCommand>)+0x11a) [0x7fc29216b0ac]
STDERR: 14  0x7fc29213a664 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::CompositeEditCommand::apply()+0x12a) [0x7fc29213a664]
STDERR: 15  0x7fc29213a3b1 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::applyCommand(WTF::PassRefPtr<WebCore::CompositeEditCommand>)+0x20) [0x7fc29213a3b1]
STDERR: 16  0x7fc29217f8c6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x61718c6) [0x7fc29217f8c6]
STDERR: 17  0x7fc292183e08 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const+0xa8) [0x7fc292183e08]
STDERR: 18  0x7fc291feb0a6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&)+0x56) [0x7fc291feb0a6]
STDERR: 19  0x7fc2932b0b87 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)+0x2e3) [0x7fc2932b0b87]
STDERR: 20  0x7fc239dfe028 [0x7fc239dfe028]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160725/ae5206c3/attachment-0001.html>


More information about the webkit-unassigned mailing list