Pre-paint: Set up properties for missed OOF descendants.

Set up paint properties as correctly as possible for ancestors of a
missed out-of-flow positioned descendant. OOF fragments may be missed
when block-fragmented, when some ancestor between the OOF itself and the
fragmentainer isn't represented in that fragmentainer. Previously we'd
just miss out on all paint properties specified on such ancestors (e.g.
opacity, transforms, clipping).

When setting up paint properties in this mode, side-effects will be
disabled for the ancestors that we're processing - i.e. we'll leave
LayoutObject, PaintLayer and FragmentData alone. We'll just set up the
temporary context objects for pre-paint correctly, so that the missed
descendants get *their* FragmentData objects set up correctly, with
transforms, opacity, etc.

Note that, for now we're skipping this for all clip-related properties.
We need to fix crbug.com/1442211 first, or we risk clipping content that
really should be visible. For other properties like transforms this is
less of an issue. Prior to this change, transforms wouldn't be applied
at all, while, with this CL, they will, although with a potentially
incorrect transform origin. For other properties again, like opacity or
filters, this shortcoming is of no concern at all, since they don't
depend on the offset or size of the fragment (which we currently get
wrong in some cases, due to the bug mentioned).

Added a run-time enabled feature kill-switch, just in case.

Bug: 1371426
Change-Id: I2fcebaba913907c09b7cd182053aae7fc8689179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4507224
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1141275}
12 files changed
tree: 10728d0ee7f1397966264d825ead4db0e5f15d7e
  1. .github/
  2. .well-known/
  3. accelerometer/
  4. accessibility/
  5. accname/
  6. acid/
  7. ambient-light/
  8. animation-worklet/
  9. annotation-model/
  10. annotation-protocol/
  11. annotation-vocab/
  12. apng/
  13. appmanifest/
  14. attribution-reporting/
  15. audio-output/
  16. autoplay-policy-detection/
  17. avif/
  18. background-fetch/
  19. background-sync/
  20. badging/
  21. battery-status/
  22. beacon/
  23. bluetooth/
  24. browsing-topics/
  25. clear-site-data/
  26. client-hints/
  27. clipboard-apis/
  28. close-watcher/
  29. common/
  30. compat/
  31. compression/
  32. compute-pressure/
  33. conformance-checkers/
  34. console/
  35. contacts/
  36. content-dpr/
  37. content-index/
  38. content-security-policy/
  39. contenteditable/
  40. cookie-store/
  41. cookies/
  42. core-aam/
  43. cors/
  44. credential-management/
  45. css/
  46. custom-elements/
  47. custom-state-pseudo-class/
  48. delegated-ink/
  49. density-size-correction/
  50. deprecation-reporting/
  51. device-memory/
  52. direct-sockets/
  53. docs/
  54. document-picture-in-picture/
  55. document-policy/
  56. dom/
  57. domparsing/
  58. domxpath/
  59. dpub-aam/
  60. dpub-aria/
  61. ecmascript/
  62. editing/
  63. element-timing/
  64. encoding/
  65. encoding-detection/
  66. encrypted-media/
  67. entries-api/
  68. event-timing/
  69. eventsource/
  70. eyedropper/
  71. feature-policy/
  72. fenced-frame/
  73. fetch/
  74. file-system-access/
  75. FileAPI/
  76. fledge/
  77. focus/
  78. font-access/
  79. fonts/
  80. forced-colors-mode/
  81. fs/
  82. fullscreen/
  83. gamepad/
  84. generic-sensor/
  85. geolocation-API/
  86. geolocation-sensor/
  87. graphics-aam/
  88. gyroscope/
  89. hr-time/
  90. html/
  91. html-aam/
  92. html-longdesc/
  93. html-media-capture/
  94. idle-detection/
  95. imagebitmap-renderingcontext/
  96. images/
  97. import-maps/
  98. IndexedDB/
  99. inert/
  100. infrastructure/
  101. input-device-capabilities/
  102. input-events/
  103. installedapp/
  104. interfaces/
  105. intersection-observer/
  106. intervention-reporting/
  107. is-input-pending/
  108. js/
  109. js-self-profiling/
  110. keyboard-lock/
  111. keyboard-map/
  112. largest-contentful-paint/
  113. layout-instability/
  114. lifecycle/
  115. loading/
  116. long-animation-frame/
  117. longtask-timing/
  118. magnetometer/
  119. managed/
  120. mathml/
  121. measure-memory/
  122. media/
  123. media-capabilities/
  124. media-playback-quality/
  125. media-source/
  126. mediacapture-extensions/
  127. mediacapture-fromelement/
  128. mediacapture-handle/
  129. mediacapture-image/
  130. mediacapture-insertable-streams/
  131. mediacapture-record/
  132. mediacapture-region/
  133. mediacapture-streams/
  134. mediasession/
  135. merchant-validation/
  136. mimesniff/
  137. mixed-content/
  138. mst-content-hint/
  139. navigation-api/
  140. navigation-timing/
  141. netinfo/
  142. network-error-logging/
  143. notifications/
  144. old-tests/
  145. orientation-event/
  146. orientation-sensor/
  147. page-lifecycle/
  148. page-visibility/
  149. paint-timing/
  150. parakeet/
  151. payment-handler/
  152. payment-method-basic-card/
  153. payment-method-id/
  154. payment-request/
  155. pending-beacon/
  156. performance-timeline/
  157. periodic-background-sync/
  158. permissions/
  159. permissions-policy/
  160. permissions-request/
  161. permissions-revoke/
  162. picture-in-picture/
  163. png/
  164. pointerevents/
  165. pointerlock/
  166. portals/
  167. preload/
  168. presentation-api/
  169. private-click-measurement/
  170. proximity/
  171. push-api/
  172. quirks/
  173. referrer-policy/
  174. remote-playback/
  175. reporting/
  176. requestidlecallback/
  177. resize-observer/
  178. resource-timing/
  179. resources/
  180. sanitizer-api/
  181. savedata/
  182. scheduler/
  183. screen-capture/
  184. screen-details/
  185. screen-orientation/
  186. screen-wake-lock/
  187. scroll-animations/
  188. scroll-to-text-fragment/
  189. secure-contexts/
  190. secure-payment-confirmation/
  191. selection/
  192. serial/
  193. server-timing/
  194. service-workers/
  195. shadow-dom/
  196. shape-detection/
  197. shared-storage/
  198. signed-exchange/
  199. soft-navigation-heuristics/
  200. speculation-rules/
  201. speech-api/
  202. storage/
  203. storage-access-api/
  204. streams/
  205. subapps/
  206. subresource-integrity/
  207. svg/
  208. svg-aam/
  209. timing-entrytypes-registry/
  210. tools/
  211. top-level-storage-access-api/
  212. touch-events/
  213. trust-tokens/
  214. trusted-types/
  215. ua-client-hints/
  216. uievents/
  217. upgrade-insecure-requests/
  218. url/
  219. urlpattern/
  220. user-timing/
  221. vibration/
  222. video-rvfc/
  223. virtual-keyboard/
  224. visual-viewport/
  225. wai-aria/
  226. wasm/
  227. web-animations/
  228. web-bundle/
  229. web-locks/
  230. web-nfc/
  231. web-otp/
  232. web-share/
  233. webaudio/
  234. webauthn/
  235. webcodecs/
  236. WebCryptoAPI/
  237. webdriver/
  238. webgl/
  239. webgpu/
  240. webhid/
  241. webidl/
  242. webmessaging/
  243. webmidi/
  244. webnn/
  245. webrtc/
  246. webrtc-encoded-transform/
  247. webrtc-extensions/
  248. webrtc-ice/
  249. webrtc-identity/
  250. webrtc-priority/
  251. webrtc-stats/
  252. webrtc-svc/
  253. websockets/
  254. webstorage/
  255. webtransport/
  256. webusb/
  257. webvr/
  258. webvtt/
  259. webxr/
  260. window-placement/
  261. workers/
  262. worklets/
  263. x-frame-options/
  264. xhr/
  265. .azure-pipelines.yml
  266. .gitattributes
  267. .gitignore
  268. .mailmap
  269. .taskcluster.yml
  270. CODE_OF_CONDUCT.md
  271. CODEOWNERS
  272. CONTRIBUTING.md
  273. LICENSE.md
  274. lint.ignore
  275. README.md
  276. wpt
  277. 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 wpt:matrix.org matrix channel; includes participants located around the world, but busiest during the European working day.
  • 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 wpt.live and w3c-test.org.

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!