Chromium Code Reviews
DescriptionMake InlineBoxPosition constructor not to accept null-InlineBox and an negative offset
This patch makes |InlineBoxPosition| not to accept null |InlineBox| and an
negative offset to avoid wrong usage of |InlineBoxPosition|.
Before this patch, |InlineBoxPosition.offset_in_box| holds an offset of
specified position event if |.layout_object| is null. After this patch,
|.offset_in_box| is zero if |.layout_object| is null.
Other than explicit test case and |LocalCaretRectOfPositionTemplate()|, we don't
use |offset_in_box| member when |InlineBox| is null. We've not seen wrong usage
so far and code reading doesn't find wrong usages. Once we find wrong call
sites, we'll fix them.
BUG=707656
TEST=run_webkit_unit_tests --gtest_filter=VisibleUnitsTest.ComputeInlineBoxPositionMixedEditable
Review-Url: https://codereview.chromium.org/2931673004
Cr-Commit-Position: refs/heads/master@{#479264}
Committed: https://chromium.googlesource.com/chromium/src/+/4a043e477b4857645c2f73583ea147b318fb40a4
Patch Set 1 : 2017-06-12T14:51:57 #
Total comments: 3
Messages
Total messages: 21 (15 generated)
|
|||||||||||||||||||||||||||||||||||||