Bug 196342 - Debug assert in DOMSelection::containsNode when node belongs to a different tree
Summary: Debug assert in DOMSelection::containsNode when node belongs to a different tree
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-27 23:47 PDT by Ryosuke Niwa
Modified: 2019-03-28 14:25 PDT (History)
6 users (show)

See Also:


Attachments
Fixes the bug (4.32 KB, patch)
2019-03-28 00:12 PDT, Ryosuke Niwa
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-03-27 23:47:47 PDT
DOMSelection::containsNode has a bogus debug assertion that Range::compareBoundaryPoints(parentNode, nodeIndex, &selectedRange->startContainer(), selectedRange->startOffset()) would never return an exception. That is not true when startRange and parentNode belong to two different trees.
Comment 1 Ryosuke Niwa 2019-03-28 00:12:02 PDT
Created attachment 366156 [details]
Fixes the bug
Comment 2 Ryosuke Niwa 2019-03-28 14:23:51 PDT
Committed r243621: <https://trac.webkit.org/changeset/243621>
Comment 3 Radar WebKit Bug Importer 2019-03-28 14:24:22 PDT
<rdar://problem/49395651>
Comment 4 Ryosuke Niwa 2019-03-28 14:25:14 PDT
<rdar://problem/48566596>