forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix node screenshot. Part 1. Add
captureBeyondViewport
param to CDP…
… command `captureScreenshot`. 1. Add `captureBeyondViewport` param to CDP command `captureScreenshot`. 2. Use `WebSettingsImpl::SetMainFrameClipsContent(false)` to force the whole page to be rendered. 3. Set `hide_scrollbars` to avoid artificial scrollbars. 4. Set `record_whole_document` to force the whole page to be rendered. 5. Removed DCHECK from `third_party/blink/renderer/core/frame/visual_viewport.cc`, as soon as it didn't expect to have preferences to be changed "on the flight". Details: https://bugs.chromium.org/p/chromium/issues/detail?id=1003629#c37 Screenshots: - Before: https://i.imgur.com/yt6WZRx.png - Patchset chromium#1: https://i.imgur.com/VsocJ3L.png - artificial scrollbars. - Patchset chromium#3: * https://imgur.com/UVqpzUQ - line breaks are not exactly the same as in original view. * https://imgur.com/MXpgHOl * https://imgur.com/haxemcr - not aligned with the node. * https://imgur.com/RbdlYVT - Patchset chromium#18: * https://imgur.com/EWUmn0O * https://imgur.com/DUrQ1yF * https://imgur.com/cT5oBSi - perfectly aligned. * https://imgur.com/Jy4UWtf - no artificial scrollbars (because of the view extended). Bug: 1003629 Change-Id: I6bbc85cd0995626a8b1fb748ec9048c9d586200e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2470876 Commit-Queue: Maksim Sadym <sadym@chromium.org> Auto-Submit: Maksim Sadym <sadym@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#827440}
- Loading branch information
1 parent
2ca0c46
commit 114bc6a
Showing
5 changed files
with
154 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters