The 'Selection::toNormalizedRange()' returns nullptr for various conditions, specifically for a 'None' selection, but also for an "Orphaned" range.
We should make sure we check that 'toNormalizedRange' returns a non-null pointer before using it.
Created attachment 323480 [details]
Comment on attachment 323480 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=323480&action=review
> + auto visibleSelection = selection.selection();
> + if (visibleSelection.isNoneOrOrphaned())
> + return false;
There's no reason to check this condition if we're checking null-ty of toNormalizedRange. Please remove it.
Committed r223228: <https://trac.webkit.org/changeset/223228>