New issue
Advanced search Search tips
Starred by 8 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----



Sign in to add a comment
link

Issue 873057: KumaDOM

Reported by rakina@chromium.org, Aug 10 Project Member

Issue description

Meta bug for kuma (aka Searchable Invisible DOM)
 

Comment 1 by rakina@chromium.org, Aug 13

Description: Show this description

Comment 2 by bugdroid1@chromium.org, Aug 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2

commit 06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Aug 16 11:21:02 2018

Invisible Attribute and activateinvisible Event + Anchor Link Support Prototype

This CL adds a new attribute "invisible" and event "activateinvisible"
behind the flag "InvisibleDOM". When an element has the kuma attribute,
it is treated as if its display value is "none", meaning all of its
inclusive flat-tree descendants are not rendered.

When an invisible element needs to be shown for anchor-link navigation,
a DOM event of type “activateinvisible”  will be sent to all of its
flat tree inclusive ancestors that have the invisible attribute.
The event is cancelable and bubbles but is not composed.
If the event is not canceled, UA will remove the invisible attribute
from all the flat tree inclusive ancestors that originally have
the invisible attribute.

See design doc at https://goo.gl/sEJt3e
I2I: https://groups.google.com/a/chromium.org/d/msg/blink-dev/Icw_sU6PqVA/8hwXw0jTDwAJ

Bug: 873057
Change-Id: I0ba108789d5ddaa6227b1488f088cd10113fdc58
Reviewed-on: https://chromium-review.googlesource.com/1163052
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583603}
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/invisible_dom/OWNERS
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/invisible_dom/invisible-activate.html
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/invisible_dom/invisible-attribute.html
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/invisible_dom/invisible-reftest-expected.html
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/invisible_dom/invisible-reftest.html
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/css/style_change_reason.cc
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/css/style_change_reason.h
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/element.idl
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/events/event.cc
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/events/event.h
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/global_event_handlers.h
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/dom/global_event_handlers.idl
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/events/event_type_names.json5
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/frame/local_frame_view.cc
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/html/html_attribute_names.json5
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/html/html_element.cc
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/invisible_dom/BUILD.gn
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/invisible_dom/OWNERS
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/invisible_dom/activate_invisible_event.cc
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/invisible_dom/activate_invisible_event.h
[add] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/core/invisible_dom/activate_invisible_event.idl
[modify] https://crrev.com/06dc9b4a1c8a7da5e2c628a52a5e29cb5f2a97b2/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 3 by bugdroid1@chromium.org, Sep 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72bcd29b8995a5739137b73bcf1bdd63c37589ed

commit 72bcd29b8995a5739137b73bcf1bdd63c37589ed
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Fri Sep 07 05:28:53 2018

Don't upgrade custom elements inside invisible-static subtree

Adds a new level of "invisible" attribute: "static", which prohibits
custom element upgrade inside invisible-static subtree unless authors
explicitly call CustomElementRegistry.upgrade()

See design doc at https://goo.gl/sEJt3e
I2I: https://groups.google.com/a/chromium.org/d/msg/blink-dev/Icw_sU6PqVA/8hwXw0jTDwAJ

Bug: 873057
Change-Id: I5c2a88446ca3a758b28917fcae349c5cdadd0132
Reviewed-on: https://chromium-review.googlesource.com/1204373
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589440}
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/WebKit/LayoutTests/invisible_dom/invisible-attribute.html
[add] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/WebKit/LayoutTests/invisible_dom/invisible-static.html
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/dom/element.idl
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element.h
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element_registry.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element_upgrade_reaction.cc
[modify] https://crrev.com/72bcd29b8995a5739137b73bcf1bdd63c37589ed/third_party/blink/renderer/core/html/custom/custom_element_upgrade_reaction.h

Comment 4 by bugdroid1@chromium.org, Sep 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/479e27759271255ab1fe09e2c6953d3c5342e033

commit 479e27759271255ab1fe09e2c6953d3c5342e033
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Sep 20 07:33:07 2018

Test invisible-static elements upgrading when created with HTML parser

Invisible-static custom elements are still upgraded when they are
constructed through HTML parser. To make it clear, we are adding test
to confirm this behavior. This CL also make the previous test's
custom element constructor to not append a child to verify upgrades.

Previous change that defer upgrades of invisible="static" elements:
https://chromium-review.googlesource.com/c/chromium/src/+/1204373

Bug: 873057
Change-Id: If25afa4c1c77ecd70988d3d29cc5ab020247b8ea
Reviewed-on: https://chromium-review.googlesource.com/1235265
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592710}
[modify] https://crrev.com/479e27759271255ab1fe09e2c6953d3c5342e033/third_party/WebKit/LayoutTests/invisible_dom/invisible-static.html

Comment 5 by bugdroid1@chromium.org, Oct 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/150a1839886ffde6659dbc249f942d7868096390

commit 150a1839886ffde6659dbc249f942d7868096390
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Oct 11 21:05:38 2018

Bail out of computing style for invisible elements

Previously style for invisible elements are still computed but changed
to have the value display:none at the end of computation through
StyleAdjuster. This CL moves the check for invisible attribute to
near the start of Element::StyleForLayoutObject so that we won't waste
time computing style for invisible elements.

Bug: 873057
Change-Id: I21a9f3fe4b8ddacf781d0e5e3de54f3bb0b04b17
Reviewed-on: https://chromium-review.googlesource.com/c/1276066
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598934}
[modify] https://crrev.com/150a1839886ffde6659dbc249f942d7868096390/third_party/WebKit/LayoutTests/invisible_dom/invisible-attribute.html
[modify] https://crrev.com/150a1839886ffde6659dbc249f942d7868096390/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
[modify] https://crrev.com/150a1839886ffde6659dbc249f942d7868096390/third_party/blink/renderer/core/dom/element.cc

Comment 6 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

commit b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 08 02:31:25 2018

Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow

This patch allows computing NGOffsetMapping for legacy inline
formatting context.

For an experimental project "Invisible DOM"[1][2] to support
the find-in-page feature, it is needed to compute the text
content with whitespace collapsing applied, along with the
mapping to the DOM offset. This patch adds an API to compute
NGOffsetMapping even when the LayoutBlockFlow is not laid out
by LayoutNG for that purpose.

Note that the project is still in the early phase. We may
revisit the design as it moves forward.

[1] https://github.com/rakina/searchable-invisible-dom
[2] https://www.chromestatus.com/feature/5105291213406208

Bug: 636993, 873057
Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
Reviewed-on: https://chromium-review.googlesource.com/c/1322184
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606292}
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 7 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aef33f11cd7ce7d81c98205c845f2c6a79ce74df

commit aef33f11cd7ce7d81c98205c845f2c6a79ce74df
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Nov 08 03:27:35 2018

Revert "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This reverts commit b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 606292 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2I0M2M2ZmNhNDM0OWI3ZjJmZjUzYjQxOTI2ZjVkN2NiNDJlZTRlMGYM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/24981

Sample Failed Step: webkit_unit_tests

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
> 
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
> 
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
> 
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
> 
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
> 
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

Change-Id: I7942801d9268078959619af61363c3a769fc0a53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 636993, 873057
Reviewed-on: https://chromium-review.googlesource.com/c/1325350
Cr-Commit-Position: refs/heads/master@{#606316}
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 8 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3a685fda9dc74255e5c44b46472eb89e05f7873

commit b3a685fda9dc74255e5c44b46472eb89e05f7873
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 08 17:49:38 2018

Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

Cannot reproduce the failures locally, nor in CQ.

Try to reland the same CL to see if it was a flake.

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
>
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
>
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
>
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
>
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
>
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

TBR=yoshin@chromium.org, eae@chromium.org

Bug: 636993, 873057
Change-Id: I241c6e9163add4000fa078c5d70a62b89acea9ac
Reviewed-on: https://chromium-review.googlesource.com/c/1326343
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606525}
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 9 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5025d5931bd62db3abae530f257a9316fae3d6f1

commit 5025d5931bd62db3abae530f257a9316fae3d6f1
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Nov 08 18:38:20 2018

Revert "Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow""

This reverts commit b3a685fda9dc74255e5c44b46472eb89e05f7873.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 606525 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2IzYTY4NWZkYTlkYzc0MjU1ZTVjNDRiNDY0NzJlYjg5ZTA1Zjc4NzMM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/25051

Sample Failed Step: webkit_unit_tests

Original change's description:
> Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"
> 
> This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f
> 
> Cannot reproduce the failures locally, nor in CQ.
> 
> Try to reland the same CL to see if it was a flake.
> 
> Original change's description:
> > Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
> >
> > This patch allows computing NGOffsetMapping for legacy inline
> > formatting context.
> >
> > For an experimental project "Invisible DOM"[1][2] to support
> > the find-in-page feature, it is needed to compute the text
> > content with whitespace collapsing applied, along with the
> > mapping to the DOM offset. This patch adds an API to compute
> > NGOffsetMapping even when the LayoutBlockFlow is not laid out
> > by LayoutNG for that purpose.
> >
> > Note that the project is still in the early phase. We may
> > revisit the design as it moves forward.
> >
> > [1] https://github.com/rakina/searchable-invisible-dom
> > [2] https://www.chromestatus.com/feature/5105291213406208
> >
> > Bug: 636993, 873057
> > Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> > Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> > Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> > Reviewed-by: Emil A Eklund <eae@chromium.org>
> > Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Commit-Queue: Koji Ishii <kojii@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#606292}
> 
> TBR=yoshin@chromium.org, eae@chromium.org
> 
> Bug: 636993, 873057
> Change-Id: I241c6e9163add4000fa078c5d70a62b89acea9ac
> Reviewed-on: https://chromium-review.googlesource.com/c/1326343
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Commit-Queue: Emil A Eklund <eae@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606525}

Change-Id: If3d6c17f4cf7ba241380ab3906da0a8029720a0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 636993, 873057
Reviewed-on: https://chromium-review.googlesource.com/c/1327401
Cr-Commit-Position: refs/heads/master@{#606547}
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 10 by bugdroid1@chromium.org, Nov 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843

commit de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Nov 09 10:35:54 2018

Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

The original CL had moved a call to ToString() to within
DCHECK, because the result is used only by DCHECK. But the
ToString() has a side effect that must be performed.

Because of the change, this CL breaks if DCHECK is not
enabled. Unfortunately, no build configs in trybots and
CQs have DCHECK disabled.

Reverted the change, and added TODO to clean it up.

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
>
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
>
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
>
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
>
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
>
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

TBR=yoshin@chromium.org, eae@chromium.org, xiaochengh@chromium.org, rakina@chromium.org

Bug: 636993, 873057
Change-Id: I8a29073fb18a1349d758d37033e6b046a54d5beb
Reviewed-on: https://chromium-review.googlesource.com/c/1327582
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606786}
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 11 by bugdroid1@chromium.org, Jan 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e82c8d48d0c6430757fb61cb3fd3779c3264915b

commit e82c8d48d0c6430757fb61cb3fd3779c3264915b
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Sat Jan 19 00:05:02 2019

Make invisible nodes count in total matches for find-in-page

Previously, invisible nodes are skipped when doing find-in-page
because they don't have layout objects. With this change, when
find-in-page encounters invisible nodes in a block, it will calculate
the layout tree for the block including the invisible nodes, making
those nodes findable through find buffer. Invisible nodes that are
located in a different block/doesn't share the same invisible root
will not be calculated because they are not relevant. Once we have
finished finding through a block, we will remove the layout objects
for invisible nodes.

This change makes the total match count include matches that are
in invisible nodes, but since find-in-page active match highlighting
still uses  Editor::FindRangeOfString instead of FindBuffer,
this change doesn't make invisible matches navigable (e.g. highlighted
and can be scrolled to with find next/prev arrow buttons). That
functionality will be added in a different CL.

See doc for details:
https://docs.google.com/document/d/1D5q7ZMrLPfilXnIGI3SOL0mwdiQC7SQEtGWk-9ysbMg/edit?usp=sharing


Bug: 873057
Change-Id: I800747d6cf37879c238d7922ff6b9fd959b60540
Reviewed-on: https://chromium-review.googlesource.com/c/1406493
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624369}
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/css/style_change_reason.cc
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/css/style_change_reason.h
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/container_node.cc
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/container_node.h
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/editing/finder/find_buffer.cc
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/editing/finder/find_buffer.h
[modify] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/invisible_dom/BUILD.gn
[add] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/invisible_dom/find_invisible_test.cc
[add] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/invisible_dom/invisible_dom.cc
[add] https://crrev.com/e82c8d48d0c6430757fb61cb3fd3779c3264915b/third_party/blink/renderer/core/invisible_dom/invisible_dom.h

Comment 12 by bugdroid, Jan 25

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88a919a99170fe41e48b12b40d4c06675c7f7650

commit 88a919a99170fe41e48b12b40d4c06675c7f7650
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Fri Jan 25 01:32:22 2019

Activate invisible elements when focusing happens

When an invisible element needs to be focused, for example with the
focus() method or through tabindex navigation, we will send the
activateinvisible event and focus the element. If the event's default
action is prevented and the element stays invisible, we will focus on
the next in order when appropriate.

Bug: 873057
Change-Id: Ieb47823e5bdfadc3477127c56d7a2db1598cb524
Reviewed-on: https://chromium-review.googlesource.com/c/1381363
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625934}

Comment 13 by bugdroid, Feb 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1cf15c7f5ed50ba69cba650092a73d619199f9a7

commit 1cf15c7f5ed50ba69cba650092a73d619199f9a7
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Mon Feb 04 08:07:15 2019

Make FindStringBetweenPositions use FindBuffer and activate invisible matches

Previously FindStringBetweenPositions uses TextIterator which doesn't
support matching of invisible nodes. This function is used by find-next
but not counting total FIP matches, which uses FindBuffer already.
Thus, the total count of FIP matches is correct (counting invisible
nodes), but when we try to navigate to the match through find-next/prev
it will skip those matches.

This CL modifies FindStringBetweenPositions to use FindBuffer that now
supports finding a match within a range.
This CL also dispatches the "activateinvisible" event to active matches
that are invisible when navigated-to through find-next/prev, because
otherwise it couldn't highlight the range even when it has the range.

Bug: 868227, 873057
Change-Id: Ib9475318bcb38ec1d97e3b029a7eb25495aed060
Reviewed-on: https://chromium-review.googlesource.com/c/1451697
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628683}
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/editing/editor.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/editing/finder/find_buffer.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/editing/finder/find_buffer.h
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/editing/finder/find_buffer_test.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/editing/finder/text_finder.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/invisible_dom/find_invisible_test.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/invisible_dom/invisible_dom.cc
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/renderer/core/invisible_dom/invisible_dom.h
[delete] https://crrev.com/c6bb24c14f1b19f356f75ea8a30a24cbd0a41ae1/third_party/blink/web_tests/editing/execCommand/6355786.html
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/web_tests/editing/text-iterator/findString-expected.txt
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/web_tests/editing/text-iterator/findString.html
[modify] https://crrev.com/1cf15c7f5ed50ba69cba650092a73d619199f9a7/third_party/blink/web_tests/fast/text/selection/find-hidden-text.html

Sign in to add a comment