
For date and color picker pop-ups, we rely on changing the preferred color-scheme for the pop-up document to the used color-scheme for the owner element and use prefers-color-scheme media queries inside the popup document to render the popup in a light or dark scheme. For color-scheme override (force dark), that works fine because the used color-scheme will be overridden from light to dark and having a <meta name="color-scheme" content="light dark"> will opt out of forced darkening (no need for override inside the popup). Also, those popups do not include author styled elements from the owner document. <select> popups is more complicated. We copy option styles into the popup document, and if the popup document includes a meta to opt-out of forced darkening, options will not be force darkened. We keep the behavior for other popups, but for <select> popups we keep the same preferred color-scheme as the owner document and write a color-scheme <meta> matching the computed color-scheme of the owner element. Also, the forced darkening setting is used for the popup document. Additionally, color-scheme style is copied for the option copies in the popup document. This means we will correctly force-darken the styled options in the popup while still allow per element opt-out for options in the popup. Bug: 1289184 Change-Id: Ia7ac5b9bb6f858f24f3c8b36825e47b74a3c0848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3412118 Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#964021}
The third_party directory contains sources from other projects.
For guidelines on adding a new package to the third_party directory can be found at //docs/adding_to_third_party.md