Traverse on flat tree to mark and invalidate kInside LayoutObject in LayoutSelection
We mark and invalidate LayoutObject by - finding first/last LayoutObject by canonicalization and - traverse on layout tree However we can those operation at once by traversing flat tree. For that, this CL changes SelectionState::kInside marking from layout tree to flat tree. I will change kStart/kEnd marking. Core part is L517-L549, which replaces old SetSelectionState and CollectInvalidationSet. LayoutSelectionTest.cpp: It traverses LayoutTree using NextInPreorder() and confirm each SelectionState and ShouldInvalidateSelection bit. This CL introduces InsertLayoutObjectAndAncestorBlocks() from CollectInvalidationSet() to construct PaintInvalidationSet in SetShouldInvalidateSelection(). Test expectations update: Since we traverse on flat tree, we skip pseudo element, or list style marker. Bug: 739062 Change-Id: I0717340fb7eef2c130d1281c2c9f5d8ff9b9b586 Reviewed-on: https://chromium-review.googlesource.com/593529 Commit-Queue: Yoichi Osato <yoichio@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Walter Korman <wkorman@chromium.org> Cr-Commit-Position: refs/heads/master@{#491988}
Showing





