Bug 183710 - Correct debug assertion in Range::borderAndTextRects
Summary: Correct debug assertion in Range::borderAndTextRects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-16 15:30 PDT by Brent Fulgham
Modified: 2018-03-19 09:14 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.62 KB, patch)
2018-03-16 17:01 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2018-03-16 15:30:50 PDT
A debug assertion will fire if Range::borderAndTextRects is asked to evaluate a set of selected elements, where one of the elements does not have a parent.

We should consider a nullptr parent as satisfying the condition of a parent not being present in the selection set.
Comment 1 Brent Fulgham 2018-03-16 15:31:17 PDT
<rdar://problem/38466976>
Comment 2 Brent Fulgham 2018-03-16 17:01:08 PDT
Created attachment 335983 [details]
Patch
Comment 3 WebKit Commit Bot 2018-03-16 23:44:45 PDT
Comment on attachment 335983 [details]
Patch

Clearing flags on attachment: 335983

Committed r229695: <https://trac.webkit.org/changeset/229695>
Comment 4 WebKit Commit Bot 2018-03-16 23:44:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2018-03-19 09:14:29 PDT
The problem isn’t the assertion. The problem is that in production builds if we pass in null, contains might return true! That’s what the assertion is communicating.