• Maksim Sadym's avatar
    Reland "Reland "Fix node screenshot. Part 1. Add `captureBeyondViewport` param... · 4b419241
    Maksim Sadym authored
    Reland "Reland "Fix node screenshot. Part 1. Add `captureBeyondViewport` param to CDP command `captureScreenshot`.""
    
    This reverts commit f01c0ad1.
    
    Reason for revert:
    1. Fixed `CaptureScreenshotBeyondViewport_OutOfView` by proper rounding.
    2. Fixed `CaptureScreenshotBeyondViewport_InnerScrollbarsAreShown` on some platform by relaxing color tolerance.
    
    Original change's description:
    > Revert "Reland "Fix node screenshot. Part 1. Add `captureBeyondViewport` param to CDP command `captureScreenshot`.""
    >
    > This reverts commit b8a64dcd.
    >
    > Reason for revert: CaptureScreenshotTest.CaptureScreenshotBeyondViewport_OutOfView is failing consistently on "Android FYI SkiaRenderer Vulkan (Pixel 2)"
    >
    > https://ci.chromium.org/p/chromium/builders/ci/Android%20FYI%20SkiaRenderer%20Vulkan%20%28Pixel%202%29/b8863213321775995088
    >
    > Original change's description:
    > > Reland "Fix node screenshot. Part 1. Add `captureBeyondViewport` param to CDP command `captureScreenshot`."
    > >
    > > This reverts commit 85d844e3.
    > >
    > > Reason for revert: reland initial commit with disabled flaky test.
    > >
    > > Original change's description:
    > > > Revert "Fix node screenshot. Part 1. Add `captureBeyondViewport` param to CDP command `captureScreenshot`."
    > > >
    > > > This reverts commit 114bc6ab.
    > > >
    > > > Reason for revert: CaptureScreenshotTest.CaptureScreenshotBeyondViewport_InnerScrollbarsAreShown is failing consistently on linux-chromeos-rel:
    > > >
    > > > https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-rel/42849
    > > > https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-rel/42850
    > > >
    > > > Original change's description:
    > > > > 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 #1: https://i.imgur.com/VsocJ3L.png - artificial scrollbars.
    > > > > - Patchset #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 #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}
    > > >
    > > > TBR=dgozman@chromium.org,wangxianzhu@chromium.org,pdr@chromium.org,caseq@chromium.org,sigurds@chromium.org,sadym@chromium.org
    > > >
    > > > Change-Id: Iaa9b6ee9f5584adbb4a521808e2d201834a6a6dc
    > > > No-Presubmit: true
    > > > No-Tree-Checks: true
    > > > No-Try: true
    > > > Bug: 1003629
    > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538543
    > > > Reviewed-by: Scott Little <sclittle@chromium.org>
    > > > Commit-Queue: Scott Little <sclittle@chromium.org>
    > > > Cr-Commit-Position: refs/heads/master@{#827505}
    > >
    > > TBR=dgozman@chromium.org,wangxianzhu@chromium.org,pdr@chromium.org,caseq@chromium.org,sclittle@chromium.org,sigurds@chromium.org,sadym@chromium.org
    > >
    > > # Not skipping CQ checks because original CL landed > 1 day ago.
    > >
    > > Bug: 1003629
    > > Change-Id: I2d394d77d0235762c61449ff8e90573de4c0c5d5
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545524
    > > Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
    > > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
    > > Commit-Queue: Maksim Sadym <sadym@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#829147}
    >
    > TBR=wangxianzhu@chromium.org,caseq@chromium.org,sadym@chromium.org
    >
    > Change-Id: I2422b2560d10910cd90290c5647eb068743ac682
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Bug: 1003629
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2550242
    > Reviewed-by: Mingjing Zhang <mjzhang@chromium.org>
    > Commit-Queue: Mingjing Zhang <mjzhang@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#829230}
    
    TBR=wangxianzhu@chromium.org,caseq@chromium.org,mjzhang@chromium.org,sadym@chromium.org
    
    # Not skipping CQ checks because this is a reland.
    
    Bug: 1003629
    Change-Id: Ib6e44df890e6707d811fccf2c6a8817983123c9d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551114
    Commit-Queue: Maksim Sadym <sadym@chromium.org>
    Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
    Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#829636}
    4b419241
devtools_protocol_browsertest.cc 104 KB