• Wolfgang Beyer's avatar
    Reland "[DevTools] Introduce `Page.DocumentOpened` CDP event" · 2a727f9f
    Wolfgang Beyer authored
    This is a reland of 2c942cf7
    Revert is at https://crrev.com/c/2545724
    
    Original change's description:
    > [DevTools] Introduce `Page.DocumentOpened` CDP event
    >
    > Send a `Page.DocumentOpened` event via CDP when an iframe's content is
    > edited via JS. Writing to an iframe's document via JS is not considered
    > a navigation, therefore no `Page.Navigated` CDP event is emitted. But
    > since writing to an iframe's document can change attributes which
    > DevTools needs to be informed about, the `Page.DocumentOpened` event is
    > emitted instead. Previously only a refresh of DevTools would let
    > DevTools know about changes to an iframe caused by JS manipulation of
    > said iframe.
    >
    > Example (see http://doc/1gczarAME7AATGHwqm_IDqcGFlOM6DLAoX9rqetv4Rx0):
    > There is a 'frameNavigated' event for the initial load of an iframe.
    > If there is a 'document.write' for this iframe right away, there is no
    > 'frameNavigated' event for this iframe at all.
    >
    > Frontend CL: https://crrev.com/c/2507793
    > (needs to be merged first, this will fix the failing tests, which fail
    > because the frontend cannot handle unknown CDP events)
    >
    > Bug: chromium:1140540, chromium:1140481
    >
    >
    > Change-Id: I92a659b7ab8b1cb7ae50e28df40b8ca9b0bf8c86
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2498482
    > Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    > Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
    > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
    > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#828122}
    
    Bug: chromium:1140540
    Bug: chromium:1140481
    Change-Id: I4fce7b9511e61e15a52c11971ea9be7560da2e55
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545011Reviewed-by: default avatarSigurd Schneider <sigurds@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#829241}
    2a727f9f
browser_protocol.pdl 290 KB