Refactor: Remove master/slave terminology from window.context API (Fi…#40365
Refactor: Remove master/slave terminology from window.context API (Fi…#40365itzperi wants to merge 1 commit intoampproject:mainfrom
Conversation
|
|
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the window.context API to eliminate problematic master/slave terminology, replacing it with primary/secondary terminology while maintaining full backward compatibility.
Key changes include:
- Function and property renames from master/slave to primary/secondary terminology
- Addition of legacy compatibility properties and methods
- Comprehensive test updates to use the new terminology
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/unit/test-3p.js |
Updates test cases to use computeInPrimaryFrame and primary/secondary terminology |
test/unit/ads/test-ssp.js |
Updates SSP ad tests to use new primary frame terminology |
test/unit/ads/test-pubmine.js |
Updates pubmine ad tests to use isPrimary property |
test/unit/3p/test-ampcontext-integration.js |
Updates integration tests to use primaryFrameSelection |
test/integration/test-amp-ad-3p.js |
Updates integration tests to expect new context properties |
src/3p-frame.js |
Updates comment to use primary frame terminology |
extensions/amp-ad/0.1/test/test-amp-ad-xorigin-iframe-handler.js |
Updates iframe handler tests to use primary terminology |
extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js |
Updates iframe handling logic to check for primary frames |
build-system/externs/amp.extern.js |
Adds new primary properties while preserving legacy ones |
ads/vendors/*.js |
Updates vendor implementations to use new primary frame API |
WINDOW_CONTEXT_API_REFACTORING.md |
Documentation of the refactoring effort |
3p/ampcontext.js |
Updates context implementation comments |
3p/ampcontext-integration.js |
Core implementation of new primary frame API with legacy compatibility |
3p/3p.js |
Implementation of computeInPrimaryFrame with legacy wrapper |
| global.context.primary.Swoop.announcePlace(global, data); | ||
| } |
There was a problem hiding this comment.
The indentation is inconsistent - this line appears to have extra spaces compared to the surrounding code structure.
| global.context.primary.Swoop.announcePlace(global, data); | |
| } | |
| global.context.primary.Swoop.announcePlace(global, data); | |
| } |
|
heya our expert in the ads space is currently on leave and I don't feel comfortable approving this without their review, so it might take a bit for to get to this review. |
…xes #30789)