diff --git a/.github/workflows/stageBuild.yml b/.github/workflows/stageBuild.yml index a2b9c70aa79d..37bfbb0a9f14 100644 --- a/.github/workflows/stageBuild.yml +++ b/.github/workflows/stageBuild.yml @@ -26,23 +26,63 @@ jobs: - name: Setup depot_tools run: | git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /tmp/depot_tools - - - name: add depot_tools path to PATH - run: | - echo "${{ github.workspace }}/depot_tools" >> $GITHUB_PATH + echo "/tmp/depot_tools" >> $GITHUB_PATH - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} + - name: Create gclient config + run: | + cat > .gclient << 'EOF' + solutions = [ + { + "managed": False, + "name": "devtools-frontend", + "url": "https://chromium.googlesource.com/devtools/devtools-frontend.git", + "custom_deps": {}, + "deps_file": "DEPS", + "safesync_url": "", + }, + ] + EOF + - name: Sync dependencies run: | - export PATH="${{ github.workspace }}/depot_tools:$PATH" + export PATH="/tmp/depot_tools:$PATH" gclient sync + # Add ninja to PATH (check both possible locations) + if [ -d "devtools-frontend/third_party/ninja" ]; then + export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" + echo "$PWD/devtools-frontend/third_party/ninja" >> $GITHUB_PATH + elif [ -d "third_party/ninja" ]; then + export PATH="$PWD/third_party/ninja:$PATH" + echo "$PWD/third_party/ninja" >> $GITHUB_PATH + fi + + - name: Generate build files + run: | + export PATH="/tmp/depot_tools:$PATH" + # Ensure ninja is in PATH + if [ -d "devtools-frontend/third_party/ninja" ]; then + export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" + elif [ -d "third_party/ninja" ]; then + export PATH="$PWD/third_party/ninja:$PATH" + fi + cd devtools-frontend || cd . + gn gen out/Default - name: Build Chrome DevTools run: | + export PATH="/tmp/depot_tools:$PATH" + # Ensure ninja is in PATH + if [ -d "devtools-frontend/third_party/ninja" ]; then + export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" + elif [ -d "third_party/ninja" ]; then + export PATH="$PWD/third_party/ninja:$PATH" + fi + cd devtools-frontend || cd . npm install npm run build @@ -75,4 +115,4 @@ jobs: --acl public-read --follow-symlinks --delete - name: Confirm S3 upload - run: aws s3 ls s3://${{ env.S3_BUCKET }}/${{ inputs.version }}/ + run: aws s3 ls s3://${{ env.S3_BUCKET }}/${{ inputs.version }}/ \ No newline at end of file diff --git a/front_end/core/sdk/OverlayModel.ts b/front_end/core/sdk/OverlayModel.ts index c9f84b546cd9..96b62060dd75 100644 --- a/front_end/core/sdk/OverlayModel.ts +++ b/front_end/core/sdk/OverlayModel.ts @@ -287,10 +287,28 @@ export class OverlayModel extends SDKModel implements ProtocolProxyA Promise { await this.domModel.requestDocument(); this.inspectModeEnabledInternal = mode !== Protocol.Overlay.InspectMode.None; + this.notifyParentWindowOfInspectModeChange(); this.dispatchEventToListeners(Events.InspectModeWillBeToggled, this); this.highlighter.setInspectMode(mode, this.buildHighlightConfig('all', showDetailedTooltip)); } + private notifyParentWindowOfInspectModeChange(): void { + // If the window is not undefined and the parent is not the same as the window, send a message to the parent window. + try { + if (typeof window !== "undefined" && window.parent && window.parent !== window) { + window.parent.postMessage( + { + type: "inspectModeStateChanged", + enabled: this.inspectModeEnabledInternal, + }, + "*" + ); + } + } catch (error) { + console.error('Error sending inspect mode', error); + } + } + inspectModeEnabled(): boolean { return this.inspectModeEnabledInternal; }