New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 12 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature


Sign in to add a comment
link

Issue 882663: Implement display locking

Reported by vmp...@chromium.org, Sep 10 Project Member

Issue description

Comment 1 by bugdroid1@chromium.org, Oct 4

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

commit d5f146f30d4fbd276c59e3985a2dc39971c55e15
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Oct 04 23:47:44 2018

Add DisplayLock idl with a sample layout test.

This patch adds an idl for acquireDisplayLock and DisplayLockContext
with a schedule function. Also adds a naive implementation that just
runs the callback immediately, which makes the layout test pass.

The test should keep passing whenever we actually start implementing
the feature.

See the bug for description of the feature.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Ia8770e2ca3e6387eec3946c770d0f47cf57d23b4
Reviewed-on: https://chromium-review.googlesource.com/c/1258247
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596927}
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/WebKit/LayoutTests/display-lock/acquire-display-lock-expected.html
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/WebKit/LayoutTests/display-lock/acquire-display-lock.html
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/WebKit/LayoutTests/virtual/display-lock/display-lock/README.txt
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/core_idl_files.gni
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/display_lock/BUILD.gn
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/display_lock/display_lock_context.idl
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/core/dom/element.idl
[modify] https://crrev.com/d5f146f30d4fbd276c59e3985a2dc39971c55e15/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 2 by bugdroid1@chromium.org, Oct 18

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

commit 7c8fc7878f280dce712d052aac4821bc67b1dcc4
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Oct 18 17:39:01 2018

[DL] Add a DisplayLocking callback queue.

This patch adds a callback queue to display locking context in order to
process scheduled tasks in the correct order.

Currently the behavior is:
- Put callbacks in a queue, and post a task to run them.
- While running the task, process all callbacks in the existing queue
- If any of the callbacks schedule a _new_ callback, then they go into
  a new queue, and a new task is scheduled to run them.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I41dfc756bb5585d33da85746054a42cc7f5072ef
Reviewed-on: https://chromium-review.googlesource.com/c/1277696
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600814}
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/display_lock/display_lock_context.idl
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/dom/element_rare_data.cc
[modify] https://crrev.com/7c8fc7878f280dce712d052aac4821bc67b1dcc4/third_party/blink/renderer/core/dom/element_rare_data.h

Comment 3 by bugdroid1@chromium.org, Nov 15

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

commit 69afc0963fca341b741ad17e1706921ddf0368f8
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Nov 15 19:22:08 2018

[DL] Implement all-or-nothing display locking.

This patch adds ability to delay style until display lock is committed.
However, once committed it will go through all the phases and display
contents synchronously.

It adds the ability for the DisplayLockContext to keep track of the
current state, making it easier to reason about what should happen
next. As well, it adds a lifecycle update state to keep track of which
lifecycle stage should occur next.

This is a stepping stone towards a correct solution.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I660e81d9cd30604883f8f4971920a1bb19dafe67
Reviewed-on: https://chromium-review.googlesource.com/c/1334656
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608470}
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/WebKit/LayoutTests/display-lock/context-suspend-resume-empty.html
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/dom/element_rare_data.h
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/inspector/inspector_trace_events.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/inspector/inspector_trace_events.h
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/layout/layout_block.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/layout/subtree_layout_scope.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/paint/paint_layer_painter.cc
[modify] https://crrev.com/69afc0963fca341b741ad17e1706921ddf0368f8/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc

Comment 4 by bugdroid1@chromium.org, Nov 20

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

commit 0697b0c24186b5c5deff58d69439ee97bfe4f84c
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Nov 20 14:53:16 2018

[DL] Add style recalc as one of the needed lifecycle states.

This patch adds style recalc and one of the stages that the display
lock prevents. Note that in order to reach the element during commit,
this also adds a "style needs recalc" to the element.

I'll replace these with smaller hammers after updating the layout tests,
and fixing any bugs that popup there.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Icf8ac9c285b5e340c38addca7483b419f34ebadc
Reviewed-on: https://chromium-review.googlesource.com/c/1340570
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609700}
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/dom/node.cc
[modify] https://crrev.com/0697b0c24186b5c5deff58d69439ee97bfe4f84c/third_party/blink/renderer/core/dom/node.h

Comment 5 by vmp...@chromium.org, Nov 21

Blockedon: 907613

Comment 6 by vmp...@chromium.org, Nov 21

Blockedon: 907619

Comment 7 by bugdroid1@chromium.org, Nov 27

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

commit ddc12b7ef38ce5964982162f13b9a9276ca4c189
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Nov 27 19:53:37 2018

[DL] Update layout tests to be mode 2 tests.

This updates the layout test and some code changes to make those tests
pass to be mode 2 tests (ie append after lock).

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I44554d486c5af0db1c680d5be719d687fd2745d2
Reviewed-on: https://chromium-review.googlesource.com/c/1344263
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611264}
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/renderer/core/style/computed_style.h
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/TestExpectations
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/context-suspend-empty-expected.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/context-suspend-expected.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/context-suspend-no-schedules-expected.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/context-suspend-resume-expected.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/context-two-suspend-resume-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-expected.txt
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container-expected.txt
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-display-lock-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-display-lock.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-inline-fails-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-inline-fails.html
[copy] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-no-containment-added-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-no-containment-added.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-no-containment-fails-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/acquire-on-no-containment-fails.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-empty-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-empty.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-no-schedules-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-no-schedules.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume-empty-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume-empty.html
[copy] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend.html
[copy] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-two-suspend-resume-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/context-two-suspend-resume.html
[copy] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/element-retained-by-context-expected.html
[add] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/element-retained-by-context.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-recursive-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-recursive.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-1-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-1.html
[copy] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-2-expected.html
[rename] https://crrev.com/ddc12b7ef38ce5964982162f13b9a9276ca4c189/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-2.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/display-lock/simple-schedule-2-expected.html
[delete] https://crrev.com/d3efa8220b06059cfa1a2ebf15c543131122071f/third_party/blink/web_tests/virtual/display-lock/display-lock/acquire-callback-throws-expected.txt

Comment 8 by bugdroid1@chromium.org, Nov 28

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

commit ad949985f1d715372f9280d46b134ad9ceb859a7
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Nov 28 18:40:33 2018

[DL] Don't do full layout invalidation when committing a lock.

This patch mimics the style code in that it tries not to propagate the
invalidation up the container chain if the element is locked for display

When the lock commits and the element needs layout, then it marks
the ancestor chain so that the code can reach it in layout.

R=chrishtr@chromium.org, mstensho@chromium.org

Bug: 882663
Change-Id: I499e91e6a14f61e5dfbeae74d3c93ac8b321e944
Reviewed-on: https://chromium-review.googlesource.com/c/1344825
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611792}
[modify] https://crrev.com/ad949985f1d715372f9280d46b134ad9ceb859a7/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/ad949985f1d715372f9280d46b134ad9ceb859a7/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/ad949985f1d715372f9280d46b134ad9ceb859a7/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/ad949985f1d715372f9280d46b134ad9ceb859a7/third_party/blink/renderer/core/layout/layout_object.h

Comment 9 by bugdroid1@chromium.org, Nov 28

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

commit def8247a37e4afa0b009436d1f9554f6f03b8157
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Nov 28 20:41:11 2018

[DL] Reject the promise if it's acquired while connected.

This patch ensures that we don't accidentally use display locking in
mode 1, which isn't currently supported.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I2be26e2573ebe93a97bd6df4c8fcb7cd6221b28c
Reviewed-on: https://chromium-review.googlesource.com/c/1347102
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611859}
[modify] https://crrev.com/def8247a37e4afa0b009436d1f9554f6f03b8157/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/def8247a37e4afa0b009436d1f9554f6f03b8157/third_party/blink/renderer/core/dom/element.cc

Comment 10 by bugdroid1@chromium.org, Dec 5

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

commit 2f3e8883f2ed560cd9645dbb3ea4d6d14717b417
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Dec 05 15:25:15 2018

[DL]: Eliminate a leak caused by active script wrappable + element ref.

This patch fixes a leak:
- DisplayLockContext is an active script wrappable meaning it can keep
  itself alive. It does so as long as we're not resolved.
- It also holds a strong reference to the locked element since it can
  be accessed via callbacks (via context.lockedElement). The reference
  prevents GC from cleaning it up.

However, what can happen is that we get into the disconnected state, and
script loses the element reference. In that case the context is alive
because it's unresolved, and it's keeping the element alive as well.

Instead, when we become disconnected, we only hold on to a weak reference
to the element.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I1106b4862444578a1290e7188b5e24b3c61761dd
Reviewed-on: https://chromium-review.googlesource.com/c/1361659
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613972}
[modify] https://crrev.com/2f3e8883f2ed560cd9645dbb3ea4d6d14717b417/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/2f3e8883f2ed560cd9645dbb3ea4d6d14717b417/third_party/blink/renderer/core/DEPS
[modify] https://crrev.com/2f3e8883f2ed560cd9645dbb3ea4d6d14717b417/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/2f3e8883f2ed560cd9645dbb3ea4d6d14717b417/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/2f3e8883f2ed560cd9645dbb3ea4d6d14717b417/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc

Comment 11 by bugdroid1@chromium.org, Dec 6

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

commit 43a377d1697ac74ec5e45f739ee90becbcf253df
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Dec 06 16:15:58 2018

[DL] Don't immediately update the locked element frame rect.

This patch ensures that we do layout in a pending frame rect, which is
only put in place for children of the locked element during layout.

After the promise is resolved, we put the pending frame rect as the
active one and ensure that we relayout the previously locked box itself.

This means that if the promise resolution, for example, removed the
element as is the case in
https://docs.google.com/document/d/1VrcVA5JyBmYn0Yi4wjPt1l9ce5Mhf-zu6o63p_mt98w/edit

Then we never commit what was a pending layout and never see a flash
of laid out content.

R=chrishtr@chromium.org, mstensho@chromium.org

Bug:  907613 , 882663
Change-Id: I7d03ae73ea4cb96c17ce8bb4162718155c2072be
Reviewed-on: https://chromium-review.googlesource.com/c/1358969
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614373}
[modify] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/renderer/core/layout/layout_block.cc
[modify] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/renderer/core/layout/layout_object.h
[add] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/web_tests/display-lock/lock-before-append/measure-and-remove-expected.html
[add] https://crrev.com/43a377d1697ac74ec5e45f739ee90becbcf253df/third_party/blink/web_tests/display-lock/lock-before-append/measure-and-remove.html

Comment 12 by bugdroid1@chromium.org, Dec 11

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

commit 26cbade5de8d3803d9bf83ee1686022056e2d295
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Dec 11 16:56:36 2018

[DL] Handle forced layouts.

If the layout is forced, then we temporarily allow the processing of
the subtree. The locked element's frame rect still remains to be the same
as at the time the lock was acquired.

R=chrishtr@chromium.org, mstensho@chromium.org, futhark@chromium.org

Bug:  907613 , 882663
Change-Id: I9d1f63c287a73e7a8f3cbc9cb5acc2a009ddd024
Reviewed-on: https://chromium-review.googlesource.com/c/1363957
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615556}
[modify] https://crrev.com/26cbade5de8d3803d9bf83ee1686022056e2d295/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/26cbade5de8d3803d9bf83ee1686022056e2d295/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/26cbade5de8d3803d9bf83ee1686022056e2d295/third_party/blink/renderer/core/dom/document.cc
[add] https://crrev.com/26cbade5de8d3803d9bf83ee1686022056e2d295/third_party/blink/web_tests/display-lock/lock-before-append/measure-forced-layout.html

Comment 13 by bugdroid1@chromium.org, Dec 14

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

commit bfa40879994ac2a1370653c0f1188cb8e775d25a
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Fri Dec 14 15:49:51 2018

[DL]: Implement a budget interface in display locking.

This patch does a few things:
- Removes the debugging macro code since it's losing its value.
- Add a DisplayLockBudget with two implementations:
  - Unyielding budget that never yields and finishes everything
  - Strict yielding budget that always yields between every lifecycle phase.
- Pulls out the lifecycle state from the context to the budget
- Adds tests for the budgets.

The step after this would be to implement a yielding budget, which should
be a combination of strictly yielding logic with some sort of a deadline.

R=chrishtr@chromium.org, mstensho@chromium.org

Bug:  907619 , 882663
Change-Id: Idc75abd2334ce7b5aa6b48714b5b720d3da81b42
Reviewed-on: https://chromium-review.googlesource.com/c/1372307
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616687}
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/BUILD.gn
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_budget.cc
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_budget.h
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_budget_test.cc
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/strict_yielding_display_lock_budget.cc
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/strict_yielding_display_lock_budget.h
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/unyielding_display_lock_budget.cc
[add] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/display_lock/unyielding_display_lock_budget.h
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/frame/local_frame_view.cc
[modify] https://crrev.com/bfa40879994ac2a1370653c0f1188cb8e775d25a/third_party/blink/renderer/core/frame/local_frame_view.h

Comment 14 by bugdroid1@chromium.org, Dec 20

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

commit 57a3d4408f85df4286704d379d59ba85eb959b2c
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Dec 20 18:58:35 2018

[DL]: Update display locking to use the revised API.

This patch replaces acquireDisplayLock() and all associated context
operations with getDisplayLock() and three ops:
- acquire
- update
- commit.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I7e85a3d164538f826a411498e1cddcf58a4c70a1
Reviewed-on: https://chromium-review.googlesource.com/c/1378669
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618283}
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/DEPS
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/BUILD.gn
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/display_lock_budget_test.cc
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/display_lock_context.idl
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/display_lock/display_lock_options.idl
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/renderer/core/display_lock/display_lock_suspended_handle.cc
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/renderer/core/display_lock/display_lock_suspended_handle.h
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/dom/element.idl
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/dom/element_rare_data.h
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/renderer/core/paint/paint_layer.cc
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-expected.txt
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container-expected.txt
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws-removes-container.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-callback-throws.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit-expected.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-display-lock-expected.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-infinite-timeout-no-commit-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-infinite-timeout-no-commit.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-timeout-expected.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-timeout.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-commit-expected.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-commit.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-measure-remove-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-measure-remove.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-no-containment-fails-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-no-containment-fails.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire-fails-expected.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire-fails.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-empty-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-no-schedules-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-no-schedules.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume-empty-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume-empty.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend-resume.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-suspend.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-two-suspend-resume-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/context-two-suspend-resume.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/element-retained-by-context-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/element-retained-by-context.html
[modify] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/measure-forced-layout.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/measure-updated-layout.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed-expected.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-recursive-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules-recursive.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/multiple-schedules.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-1-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-1.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-2-expected.html
[delete] https://crrev.com/c81c4ea7dd504df864602f92929bbf1764455e4a/third_party/blink/web_tests/display-lock/lock-before-append/simple-schedule-2.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/update-together-with-commit-both-succeed-expected.html
[add] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/update-together-with-commit-both-succeed.html
[copy] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails-expected.html
[rename] https://crrev.com/57a3d4408f85df4286704d379d59ba85eb959b2c/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails.html

Comment 15 by bugdroid1@chromium.org, Dec 20

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

commit 61b12f24706aeb661de0d1cd1b6e48b2e2e3b194
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Dec 20 22:10:45 2018

[DL]: Make update() not do the paint phase.

This patch changes the display locking update() function to not paint.
The reason for this is that update cannot release the lock on its own
and painted information is not needed for any information that script
might want.

Note that this updates the budget to actually check if any work is
required since we cannot reliably wait for any lifecycle phase.
Previously we waited for paint which was always guaranteed to happen.
Note that this updates the budget API to have NeedsLifecycleUpdates
instead of DidFinishLifecycleUpdates, which now checks the dirty bits
for any phases that might need updating.

It might be nice to implement co-operative painting that stashes the
paint for later use, but at this point it is only doing extra work.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Ie426dc75ea036b6f2e16b1b592763267957685ce
Reviewed-on: https://chromium-review.googlesource.com/c/1383324
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618351}
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/display_lock_budget.cc
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/display_lock_budget.h
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/display_lock_budget_test.cc
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/strict_yielding_display_lock_budget.cc
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/strict_yielding_display_lock_budget.h
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/unyielding_display_lock_budget.cc
[modify] https://crrev.com/61b12f24706aeb661de0d1cd1b6e48b2e2e3b194/third_party/blink/renderer/core/display_lock/unyielding_display_lock_budget.h

Comment 16 by bugdroid1@chromium.org, Dec 22

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

commit 5f4ce97e16f4a7c1d57f5685ad230923285cf549
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Sat Dec 22 02:09:42 2018

[DL]: Ensure to reject update/commit promises on disconnected elements.

This patch ensures that we reject update/commit when it happens on
a disconnected element.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Iaee923a4f41714b437c0a2b85bbb175359a2f32c
Reviewed-on: https://chromium-review.googlesource.com/c/1387944
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618713}
[modify] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected-expected.html
[add] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[add] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected-expected.html
[add] https://crrev.com/5f4ce97e16f4a7c1d57f5685ad230923285cf549/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected.html

Comment 17 by bugdroid1@chromium.org, Dec 24

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

commit a36e6e1d9422377bb173d2c1139e66276933c51c
Author: Avi Drissman <avi@chromium.org>
Date: Mon Dec 24 23:55:04 2018

Revert "[DL]: Ensure to reject update/commit promises on disconnected elements."

This reverts commit 5f4ce97e16f4a7c1d57f5685ad230923285cf549.

Reason for revert: On https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20Tests%20%28dbg%29%281%29?limit=200, virtual/display-lock/display-lock/lock-before-append/acquire-update-measure-remove.html has been failing about 90% of the time since this landed.

Original change's description:
> [DL]: Ensure to reject update/commit promises on disconnected elements.
> 
> This patch ensures that we reject update/commit when it happens on
> a disconnected element.
> 
> R=​chrishtr@chromium.org
> 
> Bug: 882663
> Change-Id: Iaee923a4f41714b437c0a2b85bbb175359a2f32c
> Reviewed-on: https://chromium-review.googlesource.com/c/1387944
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#618713}

TBR=vmpstr@chromium.org,chrishtr@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 882663
Change-Id: I491a3f7db511a69f2538e3158bc4666c6f9eaf85
Reviewed-on: https://chromium-review.googlesource.com/c/1390433
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618847}
[modify] https://crrev.com/a36e6e1d9422377bb173d2c1139e66276933c51c/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/a36e6e1d9422377bb173d2c1139e66276933c51c/third_party/blink/renderer/core/display_lock/display_lock_context.h
[delete] https://crrev.com/92d47cc92a00edfb6aa7c7878db0565bd17ca964/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected-expected.html
[delete] https://crrev.com/92d47cc92a00edfb6aa7c7878db0565bd17ca964/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[delete] https://crrev.com/92d47cc92a00edfb6aa7c7878db0565bd17ca964/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected-expected.html
[delete] https://crrev.com/92d47cc92a00edfb6aa7c7878db0565bd17ca964/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected.html

Comment 18 by bugdroid1@chromium.org, Jan 2

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

commit 1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Jan 02 19:17:31 2019

[DL]: Add a budget that yields between lifecycles if the deadline is passed.

This patch adds a yielding budget which tries to do as much work as
possible within the budget. If the budget expires, it yields between
lifecycles.

This patch also makes this the default budget, since it's the best
behavior currently implemented.

See YieldingDisplayLockBudget::GetCurrentBudgetMs() for the time budgets.
These were picked arbitrarily, but I think they seem reasonable.

R=chrishtr@chromium.org

Bug:  907619 , 882663
Change-Id: If8b3680df6b52690c238f23a319591dd8e181add
Reviewed-on: https://chromium-review.googlesource.com/c/1388159
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619453}
[modify] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/BUILD.gn
[modify] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/display_lock_budget_test.cc
[modify] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/yielding_display_lock_budget.cc
[add] https://crrev.com/1266d1fbfe7bc8ea757a5a3712917b8be61a4ffb/third_party/blink/renderer/core/display_lock/yielding_display_lock_budget.h

Comment 19 by bugdroid1@chromium.org, Jan 2

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

commit 40b00c4bcb4ed2ac12dd977f07aff072cca356f8
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Jan 02 21:04:12 2019

Reland "[DL]: Ensure to reject update/commit promises on disconnected elements."

This reverts commit a36e6e1d9422377bb173d2c1139e66276933c51c, which reverted
the initial patch.

The original patch description is:
"""
    This patch ensures that we reject update/commit when it happens on
    a disconnected element.

"""

The changes in this CL include:
- Ensuring that we can commit a disconnected element, since it just
  unlocks the lock
- Ensuring that a timeout triggered on a disconnected element does not DCHECK
  (this was the cause of the revert to begin with)
- Updates the test to have an explicit infinite timeout if timeout is not being
  tested, since bots can be slow and timeout the lock thus making tests flaky.
- Adds a test for timeout on disconnected element.

R=chrishtr@chromium.org

Bug:  917584 , 882663
Change-Id: I6a417fde2c6bd113959128c8bb33a865c97cac8b
Reviewed-on: https://chromium-review.googlesource.com/c/1393346
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619490}
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/acquire-infinite-timeout-no-commit.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-measure-remove.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-expected.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-no-containment-fails.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected-expected.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/measure-forced-layout.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/measure-updated-layout.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/timeout-while-disconnected-expected.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/timeout-while-disconnected.html
[modify] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/update-together-with-commit-both-succeed.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected-expected.html
[add] https://crrev.com/40b00c4bcb4ed2ac12dd977f07aff072cca356f8/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected.html

Comment 20 by bugdroid1@chromium.org, Jan 3

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

commit c105b0e24ec489854870f181393c6ed29e82a579
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Jan 03 17:22:55 2019

[DL]: Add an acquire-update-disconnect-commit test.

This patch adds a test that does an acquire and update, then
before the update finishes it removes the element from the DOM and does
a commit. This fails the update promise.

This test is meant to be paired with another one already checked in
where we don't call a commit and also expect the update to fail.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Idbe58b5162d4189da05379ed2044a0e620ce5dd9
Reviewed-on: https://chromium-review.googlesource.com/c/1393451
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619669}
[add] https://crrev.com/c105b0e24ec489854870f181393c6ed29e82a579/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit-expected.html
[add] https://crrev.com/c105b0e24ec489854870f181393c6ed29e82a579/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit.html

Comment 21 by bugdroid1@chromium.org, Jan 10

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

commit 0b68d81fea801ff52940d48ee14fa1994bb8d889
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Jan 10 16:41:47 2019

[DL]: Loosen the requirement for containment from content to style & layout

This patch ensures that we don't need paint containment to use display
locking. Updates all the tests to use the least needed containment
(style & layout)

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I4deedb9f298cf63dd69dd0828420451e291684f0
Reviewed-on: https://chromium-review.googlesource.com/c/1396310
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621604}
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-infinite-timeout-no-commit.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-timeout-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-timeout.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-commit-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-commit.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-measure-remove.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire-fails-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire-fails.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/measure-forced-layout.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/measure-updated-layout.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/timeout-while-disconnected-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/timeout-while-disconnected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/update-together-with-commit-both-succeed-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/update-together-with-commit-both-succeed.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails-expected.html
[modify] https://crrev.com/0b68d81fea801ff52940d48ee14fa1994bb8d889/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails.html

Comment 22 by bugdroid1@chromium.org, Jan 10

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

commit c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Jan 10 19:20:28 2019

[DL]: Implement lock after append mode.

This patch adds the lock after append mode which "clears" the painted
output while retaining the size information for the locked element.

Also adds a few tests to test the new functionality.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Id70d7af9d99e919d34691b032db26fec9199e02e
Reviewed-on: https://chromium-review.googlesource.com/c/1401269
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621693}
[modify] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-after-resize-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-after-resize.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-commit-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-commit.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-commit-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-commit.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-added-containment-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-added-containment.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-no-containment-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-no-containment.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/delayed-acquire-removes-painted-output-expected.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/delayed-acquire-removes-painted-output.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/measure-forced-layout.html
[add] https://crrev.com/c96acfdcb3eddfedd5348e6d81cbd8f1fef0cab4/third_party/blink/web_tests/display-lock/lock-after-append/measure-updated-layout.html

Comment 23 by bugdroid1@chromium.org, Jan 10

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

commit 56c6845f7e8908e56d5cc3c9c960f6eae3c327ba
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Jan 10 21:46:39 2019

[DL]: Add locked-element-moved test for lock-after-append mode.

This patch adds another test to ensure that the locked element can be
moved by other elements during layout, and it also itself moves other
elements.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I4378b3e6e52fd2781efcded7fe1da9f815cc527b
Reviewed-on: https://chromium-review.googlesource.com/c/1403084
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621746}
[add] https://crrev.com/56c6845f7e8908e56d5cc3c9c960f6eae3c327ba/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-shifted-down-expected.html
[add] https://crrev.com/56c6845f7e8908e56d5cc3c9c960f6eae3c327ba/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-shifted-down.html

Comment 24 by chrishtr@chromium.org, Jan 11

Cc: shans@chromium.org flackr@chromium.org ajuma@chromium.org zakinasab@chromium.org chrishtr@google.com nduca@chromium.org vmp...@chromium.org vollick@chromium.org
 Issue 230233  has been merged into this issue.

Comment 25 by bugdroid1@chromium.org, Jan 14

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

commit 3e3ea49c7dac96988481345ade25e6eb5118333c
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Mon Jan 14 19:54:46 2019

[DL]: Reject the acquire promise if we commit while acquiring.

This patch ensures that we reject the acquire promise if we call commit
before lock acquire finishes. Since we unlock the lock because of the
commit, it makes sense that "acquire" rejects.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I89a079427c155ba227fcacff083ac0fdf2a38982
Reviewed-on: https://chromium-review.googlesource.com/c/1409608
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622557}
[modify] https://crrev.com/3e3ea49c7dac96988481345ade25e6eb5118333c/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[copy] https://crrev.com/3e3ea49c7dac96988481345ade25e6eb5118333c/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-commit-resolves-expected.html
[rename] https://crrev.com/3e3ea49c7dac96988481345ade25e6eb5118333c/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-commit-resolves.html
[rename] https://crrev.com/3e3ea49c7dac96988481345ade25e6eb5118333c/third_party/blink/web_tests/display-lock/lock-after-append/acquire-rejects-after-immediate-commit-expected.html
[add] https://crrev.com/3e3ea49c7dac96988481345ade25e6eb5118333c/third_party/blink/web_tests/display-lock/lock-after-append/acquire-rejects-after-immediate-commit.html

Comment 26 by bugdroid1@chromium.org, Jan 15

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

commit 6daacb6388772e0b6d0d78e616bf9f0ba0111101
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Jan 15 23:58:11 2019

[DL]: Ensure find in page doesn't find locked not searchable elements.

This patch ensures that find in page skips elements that are locked for
display and for which the context IsSearchable returns false.

IsSearchable is currently set to return false for any locked element.

R=chrishtr@chromium.org, rakina@chromium.org

Bug: 882663
Change-Id: I8e9ee9b20c7cece7f70c81b5d77da7070bb907a8
Reviewed-on: https://chromium-review.googlesource.com/c/1403914
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622884}
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/editing/finder/find_buffer.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/editing/iterators/text_iterator.cc

Comment 27 by bugdroid1@chromium.org, Jan 16

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

commit 6daacb6388772e0b6d0d78e616bf9f0ba0111101
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Jan 15 23:58:11 2019

[DL]: Ensure find in page doesn't find locked not searchable elements.

This patch ensures that find in page skips elements that are locked for
display and for which the context IsSearchable returns false.

IsSearchable is currently set to return false for any locked element.

R=chrishtr@chromium.org, rakina@chromium.org

Bug: 882663
Change-Id: I8e9ee9b20c7cece7f70c81b5d77da7070bb907a8
Reviewed-on: https://chromium-review.googlesource.com/c/1403914
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622884}
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context.h
[add] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/editing/finder/find_buffer.cc
[modify] https://crrev.com/6daacb6388772e0b6d0d78e616bf9f0ba0111101/third_party/blink/renderer/core/editing/iterators/text_iterator.cc

Comment 28 by vmp...@chromium.org, Jan 23

Blockedon: 924550

Comment 29 by bugdroid, Jan 23

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

commit b96fd3179adab9ffb44faab88c3a05c54039b165
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Jan 23 19:01:43 2019

[DL]: Ensure that locked elements are skipped in tab order navigation

This patch ensures that the elements in a locked subtree with
searchable: false are not focusable by either mouse or keyboard. In
effect this prevents tab order navigation to elements in locked subtrees.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I0fbde6ba811be21021e450b38b584aa24ad7e52a
Reviewed-on: https://chromium-review.googlesource.com/c/1417715
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625287}

Comment 30 by bugdroid, Jan 24

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

commit c76fd42a73dfa16b831294e81da3872e97da4d0a
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Jan 24 23:28:03 2019

[DL]: Replace getDisplayLock() with displayLock attribute.

It can be confusing whether getDisplayLock() actually acquires the lock.
Since this does not, it's better to make it an attribute instead.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I61bd8cd1f081bd14e5e364b41088fdd076114f9e
Reviewed-on: https://chromium-review.googlesource.com/c/1431833
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625868}

Comment 31 by bugdroid, Jan 25

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

commit 33c85095df347a7de7ec8f80786161a716ad82cc
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Fri Jan 25 22:35:28 2019

[DL]: Implement updateAndCommit().

This patch adds updateAndCommit() which updates the subtree cooperatively
and then commits.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I14b906ff1ccf2ed57df082bfe883bb5d4c6e9ac3
Reviewed-on: https://chromium-review.googlesource.com/c/1422867
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626242}

Comment 32 by bugdroid, Jan 28

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

commit 544bd17c157f182cfae5ccd6fe9415ddb12262b3
Author: Kevin McNee <mcnee@chromium.org>
Date: Mon Jan 28 16:54:44 2019

Revert "[DL]: Implement updateAndCommit()."

This reverts commit 33c85095df347a7de7ec8f80786161a716ad82cc.

Reason for revert: Newly added tests fail on MSAN https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/WebKit%20Linux%20Trusty%20MSAN/12380

Original change's description:
> [DL]: Implement updateAndCommit().
> 
> This patch adds updateAndCommit() which updates the subtree cooperatively
> and then commits.
> 
> R=​chrishtr@chromium.org
> 
> Bug: 882663
> Change-Id: I14b906ff1ccf2ed57df082bfe883bb5d4c6e9ac3
> Reviewed-on: https://chromium-review.googlesource.com/c/1422867
> Commit-Queue: vmpstr <vmpstr@chromium.org>
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#626242}

TBR=vmpstr@chromium.org,chrishtr@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 882663
Change-Id: Ib9ad778b10923a061b420d2c55475bcae82926f8
Reviewed-on: https://chromium-review.googlesource.com/c/1439621
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626572}

Comment 33 by bugdroid, Jan 28

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

commit 6870fe5483a75cc88cb50557992e74eec7ccfc27
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Mon Jan 28 23:50:09 2019

[PE]: Initialize an uninitialized variable in the strict yielding budget.

This bug was caught by MSan when I inadvertently used this budget in
a different patch. The problem is that this variable is accessed before
being initialized by anything. This patch fixes the problem.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Ie1091ec668923fe53df095aff009ac054832c769
Reviewed-on: https://chromium-review.googlesource.com/c/1440114
Commit-Queue: vmpstr <vmpstr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Auto-Submit: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626783}

Comment 34 by bugdroid, Jan 29

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

commit a952765b8efce6b1c25c80768d71a61afa4de862
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Jan 29 00:39:25 2019

Reland "[DL]: Implement updateAndCommit().""

This reverts commit 544bd17c157f182cfae5ccd6fe9415ddb12262b3. In other
words it relands the updateAndCommit() functionality with a fix to
not change the used budget. The accidental change to the strict yielding
budget revealed a use-after-free bug, which is being fixed in a separate
patch.

The original updateAndCommit() description:
"""
This patch adds updateAndCommit() which updates the subtree cooperatively
and then commits.
"""

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Ib62989ee51cd7da143d2f81a9ba674659365a20e
Reviewed-on: https://chromium-review.googlesource.com/c/1440830
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626812}
[modify] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/renderer/core/display_lock/display_lock_context.idl
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-update-and-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-and-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/commit-followed-by-update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/commit-followed-by-update-and-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/multiple-update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/multiple-update-and-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit-followed-by-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit-followed-by-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit-followed-by-update-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit-followed-by-update.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-followed-by-update-and-commit-expected.html
[add] https://crrev.com/a952765b8efce6b1c25c80768d71a61afa4de862/third_party/blink/web_tests/display-lock/lock-before-append/update-followed-by-update-and-commit.html

Comment 35 by vmp...@chromium.org, Jan 29

Blockedon: 926276

Comment 36 by bugdroid, Jan 29

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

commit b96172f2ed1872a1429efced02d31ef25dcbcdd0
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Jan 29 19:30:19 2019

[DL]: Prevent anchor link navigation on locked elements.

This patch renames IsDisplayLockedForFocus into
DisplayLockPreventsDiscoverability.

Also uses this function to prevent anchor link and manual js
scrollIntoView() from scrolling to elements in a locked subtree.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I1f45900d012d682bfb57b9c92cbb1739471bca84
Reviewed-on: https://chromium-review.googlesource.com/c/1435709
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627104}
[modify] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/renderer/core/dom/element.h
[add] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-prevents-anchor-links-expected.html
[add] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-prevents-anchor-links.html
[add] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-prevents-scroll-into-view-expected.html
[add] https://crrev.com/b96172f2ed1872a1429efced02d31ef25dcbcdd0/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-prevents-scroll-into-view.html

Comment 37 by bugdroid, Jan 30

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

commit 0ae7366b8ea48610c79cd8352b6875c0996e3011
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Jan 30 21:50:58 2019

[DL]: Keep track of non-searchable and locked display locks on the doc.

This patch keeps a count on the document of two things:
- Non-searchable display locks
  - This is used to early out tab order and anchor link navigation,
    since if everything is searchable then display locks don't prevent it.
- Locked display locks.
  - This is used to early out forcing updates for display locks during
    forced layouts, since if nothing is locked then nothing needs to be
    forced.

R=chrishtr@chromium.org

Bug: 882663, 924550
Change-Id: I9c4e7be0b1a7d864e57641f46690d2d618a5b4dc
Reviewed-on: https://chromium-review.googlesource.com/c/1436536
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627605}
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/0ae7366b8ea48610c79cd8352b6875c0996e3011/third_party/blink/renderer/core/dom/element.h

Comment 38 by bugdroid, Jan 30

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

commit 609c6f3530b710a66f2cd031f9aa2d217daf2d53
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Wed Jan 30 22:08:03 2019

[DL]: Add nested lock tests + fix-up code to make some of them pass.

This patch adds nested lock tests and fixes up some code paths to ensure
we don't DCHECK or otherwise crash. Note that two of the tests are marked
as failing due to the open (referenced) bug.

R=chrishtr@chromium.org

Bug: 882663, 926276
Change-Id: Ie0786d53edac9824d74190ab48450a15ea50e24d
Reviewed-on: https://chromium-review.googlesource.com/c/1446568
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627611}
[modify] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/TestExpectations
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-acquire-expected.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-acquire.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-commit-expected.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-commit.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-update-and-commit-expected.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-update-and-commit.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-update-expected.html
[add] https://crrev.com/609c6f3530b710a66f2cd031f9aa2d217daf2d53/third_party/blink/web_tests/display-lock/lock-after-append/nested-update.html

Comment 39 by bugdroid, Feb 4

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

commit e6519f62d5aba67a177932ebd4e3d2247ea03cdf
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Mon Feb 04 19:40:16 2019

[DL]: Add a test to ensure we can force true layout after commit().

This patch adds a test that verifies that forced layouts after a call
to commit() act as if there is no display lock and perform true layout.

Note that in this test we don't wait for the commit() promise completion.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I6aa6a17fbcb2b61e54cba4eed1e56ee59c404798
Reviewed-on: https://chromium-review.googlesource.com/c/1452496
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628834}
[add] https://crrev.com/e6519f62d5aba67a177932ebd4e3d2247ea03cdf/third_party/blink/web_tests/display-lock/lock-after-append/measure-forced-layout-after-commit.html

Comment 40 by bugdroid, Feb 4

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

commit 377f783f273eaf78411a650e9860eef8af33e787
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Mon Feb 04 23:04:03 2019

[DL]: Make commit() succeed when the context is unlocked or disconnected.

This patch makes commit() and updateAndCommit() both succeed when:
- The context is unlocked: multiple commits should be able to succeed
  without issue.
- The element is disconnected: if we don't do this then there is no way
  to get rid of the lock without connecting the element. It is fine
  for the developer to change their mind and unlock the context.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I4b8aef40a36d51175f4a8d80866c0ee0efe0b06f
Reviewed-on: https://chromium-review.googlesource.com/c/1452492
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628919}
[modify] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[add] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-after-append/acquire-update-disconnect-commit-expected.html
[add] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-after-append/acquire-update-disconnect-commit.html
[modify] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[rename] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire-expected.html
[rename] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire.html
[modify] https://crrev.com/377f783f273eaf78411a650e9860eef8af33e787/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit.html

Comment 41 by bugdroid, Feb 5

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

commit 46ebd310ee1b5ae13dbfe87aa62ce84838f31c36
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Feb 05 16:16:42 2019

[DL]: Allow containment checks to pass if we have no computed style.

In cases where we might not have computed style, ensure that we pass
the containment checks (optimistically).

This comes with a TODO to switch to something like render=lockable to
force containment.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I78403b9bd5577a9ff006213c8452f07fb9197f93
Reviewed-on: https://chromium-review.googlesource.com/c/1452473
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629164}
[modify] https://crrev.com/46ebd310ee1b5ae13dbfe87aa62ce84838f31c36/third_party/blink/renderer/core/display_lock/display_lock_context.cc

Comment 42 by bugdroid, Feb 5

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

commit bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Feb 05 19:39:50 2019

[DL]: Add promise rejection reasons.

This patch adds reasons for rejection for each promise that is rejected.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I3317862ca5bf8cd76ad7309d61f7ec38e76c9e4d
Reviewed-on: https://chromium-review.googlesource.com/c/1452493
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629265}
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-after-resize.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-commit-resolves.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-immediate-update-and-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-added-containment.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-no-containment-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-on-no-containment.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-rejects-after-immediate-commit-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/acquire-rejects-after-immediate-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/nested-acquire.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/nested-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/nested-update-and-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-after-append/nested-update.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-and-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/acquire-update-remove.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-added-containment.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-inline-fails.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-no-containment-fails-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-on-no-containment-fails.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-while-disconnected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/commit-without-acquire.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/multiple-acquires-all-succeed.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/update-and-commit.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/update-while-disconnected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails-expected.html
[modify] https://crrev.com/bc2c0dd75e236651c144d2c655ab0fb31dcbfb3a/third_party/blink/web_tests/display-lock/lock-before-append/update-without-acquire-fails.html

Comment 43 by bugdroid, Feb 11

Project Member

Comment 44 by bugdroid, Feb 11

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

commit 14420cfe85731189c947c266de7fe803c4014450
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Mon Feb 11 21:15:59 2019

[DL]: Keep a reference to the Document on the DL context.

This patch adds a weak member to the document associated with the locked
element. This accomplishes two things:
1. It simplifies access to the document instead of going through element_.
2. It ensures that if the element_ is destroyed we can still keep the
   locked context counts updated on the document. If the document goes
   away, then we're safe anyway since the counts are destroyed along with
   it.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Iabbbc185c1b9199aba1f22dccd6837fe6f98a4df
Reviewed-on: https://chromium-review.googlesource.com/c/1456641
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630931}
[modify] https://crrev.com/14420cfe85731189c947c266de7fe803c4014450/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/14420cfe85731189c947c266de7fe803c4014450/third_party/blink/renderer/core/display_lock/display_lock_context.h

Comment 45 by bugdroid, Feb 14

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

commit 871cc78c5eb68eb75c73cba13b630a2a7b5606fb
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Thu Feb 14 20:32:11 2019

[DL]: Check whether we have locked display locks before checking ancestors.

This patch fixes one spot that navigates up the ancestor chain to first
check whether the document has any locked display locks.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I461d01e339ecd82ff14e3732dfa1cec79c054c9c
Reviewed-on: https://chromium-review.googlesource.com/c/1473812
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632345}
[modify] https://crrev.com/871cc78c5eb68eb75c73cba13b630a2a7b5606fb/third_party/blink/renderer/core/dom/node.cc

Comment 46 by bugdroid, Feb 14

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

commit d36690db07ba45799c21fd0b9135d6a3a76ebcbe
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Feb 14 22:06:57 2019

[DL]: Add activatable flag to DisplayLockOptions

Adds the boolean "activatable" flag to DisplayLockOptions, which is
false by default. Signifies whether the lock can be activated by the
browser when needed, in cases like find-in-page, tab order navigation,
URL fragment anchor, etc.

This CL also renames the "IsSearchable" method in DisplayLockContext
to "IsActivatable", to be consistent with the option name.

The actual activation & "beforeactivate" event will be implemented in
another CL.

See doc: http://bit.ly/2RXULVi

Bug: 882663
Change-Id: I259ff7f2fed2e3e1f446fa33f202ed2d81a76ad7
Reviewed-on: https://chromium-review.googlesource.com/c/1466544
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632383}
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/display_lock/display_lock_options.idl
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/editing/finder/find_buffer.cc
[modify] https://crrev.com/d36690db07ba45799c21fd0b9135d6a3a76ebcbe/third_party/blink/renderer/core/editing/iterators/text_iterator.cc

Comment 47 by bugdroid, Feb 15

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

commit 0582192db036cd99c83b02b92c5d00c862625202
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Fri Feb 15 02:28:28 2019

[DL]: Rename isLocked to locked as per design principle.

As https://w3ctag.github.io/design-principles/#api-surface suggests,
boolean attributes should not have "is" at the beginning of their names.

This patch fixes this for DisplayLockContext.isLocked

R=chrishtr@chromium.org

Bug: 882663, github.com/WICG/display-locking/issues/43
Change-Id: Ie5be4b4f6fd0ee8656fbb3c31aae0e7eb0fc3612
Reviewed-on: https://chromium-review.googlesource.com/c/1466155
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632467}
[modify] https://crrev.com/0582192db036cd99c83b02b92c5d00c862625202/third_party/blink/renderer/core/display_lock/display_lock_context.idl
[delete] https://crrev.com/a4ac9c70341c20be9aabc6dceb0714bc1e94a142/third_party/blink/web_tests/display-lock/lock-after-append/is-locked-attribute.html
[add] https://crrev.com/0582192db036cd99c83b02b92c5d00c862625202/third_party/blink/web_tests/display-lock/lock-after-append/locked-attribute.html
[delete] https://crrev.com/a4ac9c70341c20be9aabc6dceb0714bc1e94a142/third_party/blink/web_tests/display-lock/lock-before-append/is-locked-attribute.html
[add] https://crrev.com/0582192db036cd99c83b02b92c5d00c862625202/third_party/blink/web_tests/display-lock/lock-before-append/locked-attribute.html

Comment 48 by bugdroid, Feb 15

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

commit cff773e1e73c2cadb64183ed6e3c090504792c78
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Fri Feb 15 17:01:40 2019

[DL]: Make sure to notify observers on all frames when lifecycle happens.

This patch ensures that we notify local frames that have display locks
when lifecycle advances. Otherwise, those frame never get the notifications
and locks seem to "freeze" on acquire or commit.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: I4269364ea5095e9f5eb0f4b2239105be74a3684b
Reviewed-on: https://chromium-review.googlesource.com/c/1474683
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632651}
[modify] https://crrev.com/cff773e1e73c2cadb64183ed6e3c090504792c78/third_party/blink/renderer/core/frame/local_frame_view.cc
[add] https://crrev.com/cff773e1e73c2cadb64183ed6e3c090504792c78/third_party/blink/web_tests/display-lock/lock-after-append/acquire-in-iframe-expected.html
[add] https://crrev.com/cff773e1e73c2cadb64183ed6e3c090504792c78/third_party/blink/web_tests/display-lock/lock-after-append/acquire-in-iframe.html

Comment 49 by vmp...@chromium.org, Feb 19 (3 days ago)

Blockedon: 933544

Comment 50 by bugdroid, Feb 19 (3 days ago)

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

commit faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Feb 19 22:48:14 2019

[DL]: Add beforeactivate event & activate locked elements for anchor link nav

When anchor link navigation hits an element in an activatable locked
subtree, we send beforeactivate events to its locked ancestors and
commit them so that we can navigate to the element.

The beforeactivate event bubbles up but is not composed (will not go through
shadow boundaries), and has the |activatedElement| attribute, which in this
case will be the anchor-link-navigated element.

See doc: http://bit.ly/2RXULVi

Bug: 882663
Change-Id: I3c818b9033e37dbd0db786b2d261a382c0dee414
Reviewed-on: https://chromium-review.googlesource.com/c/1473091
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633433}
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/BUILD.gn
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/before_activate_event.cc
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/before_activate_event.h
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/before_activate_event.idl
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/display_lock_context.cc
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/display_lock/display_lock_context.h
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/dom/global_event_handlers.h
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/dom/global_event_handlers.idl
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/events/event_type_names.json5
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/html/html_attribute_names.json5
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/renderer/core/page/scrolling/element_fragment_anchor.cc
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/web_tests/display-lock/activation/anchor-links-ancestor.html
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/web_tests/display-lock/activation/anchor-links.html
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/web_tests/display-lock/lock-after-append/activatable-locked-element-allows-anchor-links-expected.html
[add] https://crrev.com/faf1ec7ca5bc52ab701fbc84595ae4e2b8815eb0/third_party/blink/web_tests/display-lock/lock-after-append/activatable-locked-element-allows-anchor-links.html

Comment 51 by bugdroid, Feb 19 (3 days ago)

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

commit 5635f07c885a6f003d34999a42f66f114282bdec
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Feb 19 23:09:05 2019

[DL] Activate locked elements when focusing happens

When a locked element needs to be focused, for example with the focus()
method or through tabindex navigation, we will send the beforeactivate
event and focus the element.

See doc: http://bit.ly/2RXULVi

Bug: 882663
Change-Id: I1320c41f5d08e148f52a97480d2cc9833c43fb08
Reviewed-on: https://chromium-review.googlesource.com/c/1477146
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633441}
[modify] https://crrev.com/5635f07c885a6f003d34999a42f66f114282bdec/third_party/blink/renderer/core/dom/element.cc
[add] https://crrev.com/5635f07c885a6f003d34999a42f66f114282bdec/third_party/blink/web_tests/display-lock/activation/focus-shadow.html
[add] https://crrev.com/5635f07c885a6f003d34999a42f66f114282bdec/third_party/blink/web_tests/display-lock/activation/focus.html
[add] https://crrev.com/5635f07c885a6f003d34999a42f66f114282bdec/third_party/blink/web_tests/display-lock/lock-after-append/locked-element-focus.html

Comment 52 by vmp...@chromium.org, Yesterday (33 hours ago)

Blockedon: 934458

Sign in to add a comment