Description was changed from ========== Disable scroll anchoring when in printing mode BUG=651020 ========== to ...
4 years, 2 months ago
(2016-10-12 22:17:35 UTC)
#1
Description was changed from
==========
Disable scroll anchoring when in printing mode
BUG=651020
==========
to
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
ymalik
Description was changed from ========== Disable scroll anchoring when in printing mode BUG=651020 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== ...
4 years, 2 months ago
(2016-10-12 22:20:51 UTC)
#2
Description was changed from
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
https://codereview.chromium.org/2417683002/diff/1/components/printing/renderer/print_web_view_helper.cc File components/printing/renderer/print_web_view_helper.cc (right): https://codereview.chromium.org/2417683002/diff/1/components/printing/renderer/print_web_view_helper.cc#newcode810 components/printing/renderer/print_web_view_helper.cc:810: frame->printEnd(); This is needed because RestoreSize would trigger layout ...
4 years, 2 months ago
(2016-10-12 22:21:01 UTC)
#4
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1069 third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document because it's reset before the set ...
4 years, 2 months ago
(2016-10-12 22:40:31 UTC)
#5
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1069 third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document because it's reset before the set ...
4 years, 2 months ago
(2016-10-13 13:48:04 UTC)
#6
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1069 third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document because it's reset before the set ...
4 years, 2 months ago
(2016-10-13 16:24:00 UTC)
#7
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/frame/FrameView.h (right):
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document
because it's reset before the set of layouts caused
On 2016/10/13 13:48:04, ymalik wrote:
> Another potential fix is clearing the bit at the end of the
> LocalFrame::setPrinting function, but I am afraid it has a lot of users and
its
> not clear to me whether the order matters.
Ah, I suspect LocalFrame::setPrinting does a layout after clearing m_printing in
order to reset the layout tree to its original state, and the anchor node moves
during this layout.
I'd rather turn Document::m_printing into an enum {NotPrinting, Printing,
ExitingPrinting} than add a new bit on FrameView for this. But I also see we
have Document::wasPrinting() added to suppress CSS transitions in
http://crbug.com/412281. Is it feasible to use that?
ymalik
@skobes, PTAL :) https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1069 third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document because it's reset ...
4 years, 2 months ago
(2016-10-14 16:30:56 UTC)
#8
@skobes, PTAL :)
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/frame/FrameView.h (right):
https://codereview.chromium.org/2417683002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/frame/FrameView.h:1069: // from blink::Document
because it's reset before the set of layouts caused
On 2016/10/13 16:24:00, skobes wrote:
> On 2016/10/13 13:48:04, ymalik wrote:
> > Another potential fix is clearing the bit at the end of the
> > LocalFrame::setPrinting function, but I am afraid it has a lot of users and
> its
> > not clear to me whether the order matters.
>
> Ah, I suspect LocalFrame::setPrinting does a layout after clearing m_printing
in
> order to reset the layout tree to its original state, and the anchor node
moves
> during this layout.
>
> I'd rather turn Document::m_printing into an enum {NotPrinting, Printing,
> ExitingPrinting} than add a new bit on FrameView for this. But I also see we
> have Document::wasPrinting() added to suppress CSS transitions in
> http://crbug.com/412281. Is it feasible to use that?
Yes an enum is cleaner in this case. It also allows us to remove
Document::wasPrinting()
Document::wasPrinting is used to disable css transitions in PrintMode. Basically
the call stack is as follows:
PrintContext::Begin
Update CSS Animation (m_printing = 1, m_wasPrinting = 0) - Don't update
transition
Document::UpdateState (m_wasPrinting = 1)
layout for printing mode
...
PrintContext::End
Update CSS Animation (m_printing = 0, m_wasPrinting = 1) - Don't update
transition
Document::UpdateState (m_wasPrinting = 0)
layout to restore original state
We couldn't use m_wasPrinting in the case of scroll anchoring because it was
reset before layout. Using this enum, we can cover both the transition case and
scroll anchoring case. I verified locally that this works.
skobes
Thanks, this looks much better. LGTM w/ nit https://codereview.chromium.org/2417683002/diff/20001/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (right): https://codereview.chromium.org/2417683002/diff/20001/third_party/WebKit/Source/core/dom/Document.h#newcode631 third_party/WebKit/Source/core/dom/Document.h:631: enum ...
4 years, 2 months ago
(2016-10-14 16:36:24 UTC)
#9
Description was changed from ========== Disable scroll anchoring when in printing mode BUG=651020 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== ...
4 years, 2 months ago
(2016-10-17 19:51:20 UTC)
#21
Message was sent while issue was closed.
Description was changed from
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago
(2016-10-17 19:51:21 UTC)
#22
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
commit-bot: I haz the power
Description was changed from ========== Disable scroll anchoring when in printing mode BUG=651020 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== ...
4 years, 2 months ago
(2016-10-17 19:54:50 UTC)
#23
Message was sent while issue was closed.
Description was changed from
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Disable scroll anchoring when in printing mode
BUG=651020
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/32628627dac02e25eb29924fa9b39b399d694547
Cr-Commit-Position: refs/heads/master@{#425756}
==========
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/32628627dac02e25eb29924fa9b39b399d694547 Cr-Commit-Position: refs/heads/master@{#425756}
4 years, 2 months ago
(2016-10-17 19:54:51 UTC)
#24
Issue 2417683002: Disable scroll anchoring when in printing mode
(Closed)
Created 4 years, 2 months ago by ymalik
Modified 4 years, 2 months ago
Reviewers: skobes, Lei Zhang, nainar
Base URL:
Comments: 6