New issue
Advanced search Search tips

Issue 849112 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 708452



Sign in to add a comment

[LayoutNG] Need NGPaintFragment version of ObjectPaintInvalidator::InvalidateSelection

Project Member Reported by wangxianzhu@chromium.org, Jun 3 2018

Issue description

ObjectPaintInvalidator::InvalidateSelection() calculates selection visual rect, and if needed, add old and new selection visual rects into partial invalidation rects. Currently NGPaintFragment lacks the functionality after we enable partial raster invalidation for SPv175. We should either let handle selection invalidation for each NGPaintFragment, or accumulate selection rects of NGPaintFragments of a container (through LayoutObject::LocalSelectionRect()).

 
The CL to enable partial raster invalidation is https://chromium-review.googlesource.com/c/chromium/src/+/1083131.
Blocking: 708452
Fixing this bug might also fix many failures of bug 708452.
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d86f197841d9bfc912936955f9c776a855c1a51

commit 6d86f197841d9bfc912936955f9c776a855c1a51
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Wed Jun 06 00:08:15 2018

[LayoutNG] Selection paint invalidation

In Pre-LayoutNG, selections are painted by LayoutText and LayoutReplaced.
We record SelectionVisualRect in LayoutObject::FragmentData, and check
for change of selection (in style and geometry) in
ObjectPaintInvalidator::InvalidateSelection, update SelectionVisualRect
and add needed invalidation rects into PartialInvalidationVisualRect.

In LayoutNG, selections are mainly painted by NGPaintFragment. Now we
keep track of NGPaintFragment's selection using
NGPaintFragment::SelectionVisualRect, and invlaidate the NGPaintFragment
if SelectionVisualRect changes.

PaintInvalidationReason::kSelection is treated as a full invalidation
reason for LayoutNG to simplify the logic (otherwise we need to support
partial raster invalidation in NGPaintFragment which seems not worth it,
with increased memory usage). This can be adjusted by the fact that we
now have finer grain selection invalidation in LayoutNG
(per NGPaintFragment) than Pre-LayoutNG (per LayoutObject).

For selection style changes (::selection pseudo style), we simply
invalidate the whole containing LayoutObject as the case is rare.

Bug:  849112 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7a04a12e8007fb4c2841e5db9b17f37b6d9e2580
Reviewed-on: https://chromium-review.googlesource.com/1084314
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564717}
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/selection-repaint-with-gaps-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-1-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-10-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-2-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-3-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-4-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-5-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-6-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-7-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-8-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-9-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/japanese-rl-selection-clear-expected.txt
[add] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.png
[add] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.txt
[add] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-within-composited-scroller-expected.png
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-within-composited-scroller-expected.txt
[add] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/text-selection-rect-in-overflow-expected.txt
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/layout/layout_text_control.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/object_paint_invalidator.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/paint_invalidator.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/core/paint/paint_invalidator.h
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/platform/graphics/paint/drawing_display_item.cc
[modify] https://crrev.com/6d86f197841d9bfc912936955f9c776a855c1a51/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.h

Status: Fixed (was: Assigned)

Sign in to add a comment