Revert "Reland "Use border box or layout overflow rect for layout shift tracking""

This reverts commit 84b0d04040453e3f56381655d68909afcc90e6d6.

Reason for revert: Caused crbug.com/1112642.

Original change's description:
> Reland "Use border box or layout overflow rect for layout shift tracking"
>
> This reverts commit 491b5a9cbe75eb9cdde6e9e0b21e8246f441b086.
>
> The original CL was reverted because it caused failure on MSAN bots
> due to use of uninitialized value.
>
> The reason was that PaintInvalidatorContext::tree_builder_context_
> pointed into an PrePaintTreeWalkContext entry in a vector, and the
> vector could be reallocated when we added new entries, causing the
> pointer in the parent PaintInvalidatorContext to point to an invalid
> address.
>
> Now remove PaintInvalidatorContext::tree_builder_context_ and add
> PaintInvalidatorContext::transform_ (which was the only used information
> from the parent PaintInvalidatorContext) to avoid the problem.
>
> Original change's description:
> > Revert "Use border box or layout overflow rect for layout shift tracking"
> >
> > This reverts commit 0933392f84b4bb96466bd86c0e814d96f63ba137.
> >
> > Reason for revert: ASAN/MSAN failures due to "use of uninitialized value"; see e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8873209606965810848/+/steps/browser_tests/0/logs/Deterministic_failure:_AllForms__x2f_FormStructureBrowserTest.DataDrivenHeuristics__x2f_148__status_FAILURE_/0
> >
> > Original change's description:
> > > Use border box or layout overflow rect for layout shift tracking
> > >
> > > This CL addresses the following issues of layout shift tracking:
> > > - Changed visual overflows triggered layout shift report
> > >   (originally filed as crbug.com/1090763).
> > > - Descendant layout overflows were not included in ancestor's layout
> > >   shift report.
> > > - Unnecessary descendant layout shift report.
> > > - Slow visual rect calculation for LayoutInline and LayoutText.
> > >
> > > It includes the following changes
> > > - Track LayoutBoxes and LayoutTexts only.
> > > - Track both old and new starting points and visual representations
> > >   instead of using location of visual rects as starting points.
> > > - For a LayoutBox, the local visual representation is the layout
> > >   overflow rect if the LayoutBox has layout overflow and doesn't clip
> > >   overflow. Otherwise use the border box rect.
> > > - For a LayoutText, suppose its shift causes shift of all contents
> > >   in containing block logically below the LayoutText, and use that
> > >   part of visual representation of the containing block as the visual
> > >   representation of the shift.
> > > - Map both local starting points and local visual representations to
> > >   the initial containing block and viewport.
> > >
> > > This has the following benefits:
> > > - More accurate starting points and visual representations, conforming
> > >   to the specs;
> > > - Better performance by
> > >   * avoiding unnecessary layout shift reports of descendants
> > >   * avoiding slow LayoutInline and LayoutText visual rect calculation.
> > > - sizeof(LayoutObject) is reduced by 16 bytes because now we use the
> > >   previous geometry data in LayoutBoxes for paint invalidation.
> > >
> > > Bug: 1108622
> > > Change-Id: I7ebb4e250e7ca2a03b4dadea50034e300e55ad84
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2319538
> > > Reviewed-by: Steve Kobes <skobes@chromium.org>
> > > Reviewed-by: Koji Ishii <kojii@chromium.org>
> > > Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#793806}
> >
> > TBR=wangxianzhu@chromium.org,skobes@chromium.org,kojii@chromium.org
> >
> > Change-Id: I590f2abc4a48ba65bdfe7a948ffce00b299f9e06
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1108622
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333578
> > Reviewed-by: Peter Kasting <pkasting@chromium.org>
> > Commit-Queue: Peter Kasting <pkasting@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#793874}
>
> # Not skipping CQ checks because this is a reland.
>
> Bug: 1108622
> Change-Id: I253a24799b6d2a3af346d4f65e3889217064b035
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333648
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#794218}

TBR=wangxianzhu@chromium.org,pdr@chromium.org

Change-Id: I06c05f8cab6b2cc2ecd3cf3febf930e6eb95f777
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1108622, 1112642
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336782
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794567}
3 files changed
tree: cc0986da0fa8a95b2c6de4a4170d6959ec33bdfe
  1. .github/
  2. .well-known/
  3. accelerometer/
  4. accname/
  5. acid/
  6. ambient-light/
  7. animation-worklet/
  8. annotation-model/
  9. annotation-protocol/
  10. annotation-vocab/
  11. apng/
  12. appmanifest/
  13. audio-output/
  14. background-fetch/
  15. BackgroundSync/
  16. badging/
  17. battery-status/
  18. beacon/
  19. bluetooth/
  20. clear-site-data/
  21. client-hints/
  22. clipboard-apis/
  23. common/
  24. compat/
  25. compression/
  26. conformance-checkers/
  27. console/
  28. contacts/
  29. content-dpr/
  30. content-index/
  31. content-security-policy/
  32. contenteditable/
  33. cookie-store/
  34. cookies/
  35. core-aam/
  36. cors/
  37. credential-management/
  38. css/
  39. custom-elements/
  40. custom-state-pseudo-class/
  41. delegated-ink/
  42. deprecation-reporting/
  43. device-memory/
  44. docs/
  45. document-policy/
  46. dom/
  47. domparsing/
  48. domxpath/
  49. dpub-aam/
  50. dpub-aria/
  51. editing/
  52. element-timing/
  53. encoding/
  54. encoding-detection/
  55. encrypted-media/
  56. entries-api/
  57. event-timing/
  58. eventsource/
  59. feature-policy/
  60. fetch/
  61. FileAPI/
  62. focus/
  63. fonts/
  64. forced-colors-mode/
  65. fullscreen/
  66. gamepad/
  67. generic-sensor/
  68. geolocation-API/
  69. geolocation-sensor/
  70. graphics-aam/
  71. gyroscope/
  72. hr-time/
  73. html/
  74. html-longdesc/
  75. html-media-capture/
  76. idle-detection/
  77. imagebitmap-renderingcontext/
  78. images/
  79. import-maps/
  80. IndexedDB/
  81. inert/
  82. infrastructure/
  83. input-device-capabilities/
  84. input-events/
  85. installedapp/
  86. interfaces/
  87. intersection-observer/
  88. intervention-reporting/
  89. is-input-pending/
  90. js/
  91. js-self-profiling/
  92. keyboard-lock/
  93. keyboard-map/
  94. largest-contentful-paint/
  95. layout-instability/
  96. lifecycle/
  97. loading/
  98. longtask-timing/
  99. magnetometer/
  100. mathml/
  101. measure-memory/
  102. media/
  103. media-capabilities/
  104. media-feeds/
  105. media-playback-quality/
  106. media-source/
  107. mediacapture-depth/
  108. mediacapture-fromelement/
  109. mediacapture-image/
  110. mediacapture-record/
  111. mediacapture-streams/
  112. mediasession/
  113. mimesniff/
  114. mixed-content/
  115. mst-content-hint/
  116. native-file-system/
  117. native-io/
  118. navigation-timing/
  119. netinfo/
  120. network-error-logging/
  121. notifications/
  122. old-tests/
  123. orientation-event/
  124. orientation-sensor/
  125. origin-isolation/
  126. origin-policy/
  127. page-lifecycle/
  128. page-visibility/
  129. paint-timing/
  130. payment-handler/
  131. payment-method-basic-card/
  132. payment-method-id/
  133. payment-request/
  134. performance-timeline/
  135. periodic-background-sync/
  136. permissions/
  137. permissions-request/
  138. permissions-revoke/
  139. picture-in-picture/
  140. pointerevents/
  141. pointerlock/
  142. portals/
  143. preload/
  144. presentation-api/
  145. priority-hints/
  146. proximity/
  147. push-api/
  148. quirks/
  149. referrer-policy/
  150. remote-playback/
  151. reporting/
  152. requestidlecallback/
  153. resize-observer/
  154. resource-timing/
  155. resources/
  156. savedata/
  157. screen-capture/
  158. screen-orientation/
  159. screen-wake-lock/
  160. screen_enumeration/
  161. scroll-animations/
  162. scroll-to-text-fragment/
  163. secure-contexts/
  164. selection/
  165. serial/
  166. server-timing/
  167. service-workers/
  168. shadow-dom/
  169. shape-detection/
  170. signed-exchange/
  171. speech-api/
  172. storage/
  173. storage-access-api/
  174. streams/
  175. subresource-integrity/
  176. svg/
  177. svg-aam/
  178. timing-entrytypes-registry/
  179. tools/
  180. touch-events/
  181. trust-tokens/
  182. trusted-types/
  183. ua-client-hints/
  184. uievents/
  185. upgrade-insecure-requests/
  186. url/
  187. user-timing/
  188. vibration/
  189. video-rvfc/
  190. visual-viewport/
  191. wai-aria/
  192. wasm/
  193. web-animations/
  194. web-bundle/
  195. web-locks/
  196. web-nfc/
  197. web-otp/
  198. web-share/
  199. webaudio/
  200. webauthn/
  201. WebCryptoAPI/
  202. webdriver/
  203. webgl/
  204. webgpu/
  205. webhid/
  206. WebIDL/
  207. webmessaging/
  208. webmidi/
  209. webrtc/
  210. webrtc-extensions/
  211. webrtc-identity/
  212. webrtc-insertable-streams/
  213. webrtc-priority/
  214. webrtc-quic/
  215. webrtc-stats/
  216. webrtc-svc/
  217. websockets/
  218. webstorage/
  219. webtransport/
  220. webusb/
  221. webvr/
  222. webvtt/
  223. webxr/
  224. window-segments/
  225. workers/
  226. worklets/
  227. x-frame-options/
  228. xhr/
  229. xslt/
  230. .azure-pipelines.yml
  231. .codecov.yml
  232. .gitattributes
  233. .gitignore
  234. .mailmap
  235. .pyup.yml
  236. .taskcluster.yml
  237. CODE_OF_CONDUCT.md
  238. CODEOWNERS
  239. CONTRIBUTING.md
  240. LICENSE.md
  241. lint.ignore
  242. README.md
  243. testharness_runner.html
  244. update-built-tests.sh
  245. wpt
  246. wpt.py
README.md

The web-platform-tests Project

Taskcluster CI Status documentation manifest Python 3

The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

The most important sources of information and activity are:

  • github.com/web-platform-tests/wpt: the canonical location of the project's source code revision history and the discussion forum for changes to the code
  • web-platform-tests.org: the documentation website; details how to set up the project, how to write tests, how to give and receive peer review, how to serve as an administrator, and more
  • wpt.live: a public deployment of the test suite, allowing anyone to run the tests by visiting from an Internet-enabled browser of their choice
  • wpt.fyi: an archive of test results collected from an array of web browsers on a regular basis
  • Real-time chat room: the IRC chat room named #testing on irc.w3.org; includes participants located around the world, but busiest during the European working day; all discussion is archived here
  • Mailing list: a public and low-traffic discussion list
  • RFCs: a repo for requesting comments on substantial changes that would impact other stakeholders or users; people who work on WPT infra are encouraged to watch the repo.

If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.

Setting Up the Repo

Clone or otherwise get https://github.com/web-platform-tests/wpt.

Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune (or git fetch -p && git merge).

Running the Tests

See the documentation website and in particular the system setup for running tests locally.

Command Line Tools

The wpt command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:

  • wpt serve - For starting the wpt http server
  • wpt run - For running tests in a browser
  • wpt lint - For running the lint against all tests
  • wpt manifest - For updating or generating a MANIFEST.json test manifest
  • wpt install - For installing the latest release of a browser or webdriver server on the local machine.
  • wpt serve-wave - For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.

Windows Notes

On Windows wpt commands must be prefixed with python or the path to the python binary (if python is not in your %PATH%).

python wpt [command]

Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt commands.

Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false in your working tree.

Publication

The master branch is automatically synced to http://w3c-test.org/.

Pull requests are automatically mirrored except those that modify sensitive resources (such as .py). The latter require someone with merge access to comment with “LGTM” or “w3c-test:mirror” to indicate the pull request has been checked.

Branches

In the vast majority of cases the only upstream branch that you should need to care about is master. If you see other branches in the repository, you can generally safely ignore them.

Contributing

Save the Web, Write Some Tests!

Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.

The way to contribute is just as usual:

  • Fork this repository (and make sure you're still relatively in sync with it if you forked a while ago).
  • Create a branch for your changes: git checkout -b topic.
  • Make your changes.
  • Run ./wpt lint as described above.
  • Commit locally and push that to your repo.
  • Create a pull request based on the above.

Issues with web-platform-tests

If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!