[Editing] Fix null check for block_flow while creating inline contents
on extending selection backward.
When selection is extended backward word-wise and block element is part
of the inline item, if the target in |CreateInlineContentsFromBlockFlow|
is part of the Shadow tree but the block_flow is anonymous and outside
the Shadow tree then the target is never reached and as block_flow being
a PseudoNode, makes |first| and |last| as nullptr since the traversal
inside the shadow tree doesn't happen for user agent root. Thus we need
to re-target the target before we create inline contents from block_flow
in this case to avoid the crash and get to the correct target. This CL
fixes this by sending the correct target before calling
|CreateInlineContentsFromBlockFlow| in |ComputeInlineContentsFromNode|.
Bug: 380107555
Change-Id: I40dbb7628ed6dd7ecebd5842ee740c28c7a5037d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6175802
Commit-Queue: Pranav Modi pranavmodi@microsoft.com
Reviewed-by: Kent Tamura tkent@chromium.org
Reviewed-by: Sambamurthy Bandaru sambamurthy.bandaru@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1424395}