Summary: | Expose the value of `<meta name="theme-color" content="...">` as SPI | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
Component: | WebKit API | Assignee: | Devin Rousso <hi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, hi, kangil.han, thorton, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=221015 | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 224509, 224389 | ||||||||||
Attachments: |
|
Description
Devin Rousso
2021-01-25 13:45:17 PST
Created attachment 418330 [details]
Patch
Comment on attachment 418330 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418330&action=review > Source/WebCore/html/HTMLMetaElement.cpp:70 > + process(); This seems... surprising? Did we really not support dynamic change of name before? Should we bother now? > Source/WebKit/UIProcess/WebPageProxy.h:649 > + // Set by the WebProcess when parsing `<meta name="theme-color" content="...">`. Maybe "corresponds to the web content's `<meta name="theme-color" ...`"? Comment on attachment 418330 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418330&action=review >> Source/WebCore/html/HTMLMetaElement.cpp:70 >> + process(); > > This seems... surprising? Did we really not support dynamic change of name before? Should we bother now? AFAIK we did not. I was surprised as well. According to the spec we should <https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color> > If any meta elements are inserted into the document or removed from the document, or existing meta elements have their name or content attributes changed, user agents must re-run the above algorithm and apply the result to any affected UI. Also, something I just realized, I should double-check and make sure that the `_themeColor` is `nil`-d out if the page navigates and the new page doesn't have a `<meta name="theme-color" content="...">` (or at least that `_themeColor` stays `nil` until that node is processed). Created attachment 418457 [details]
Patch
Comment on attachment 418457 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418457&action=review > Source/WebKit/WebProcess/WebPage/WebPage.cpp:3911 > + layerTransaction.setThemeColor(corePage()->themeColor()); Should this reset m_pendingThemeColorChange? I guess it doesn't matter, it's just a bit funny that it gets stuck if UI-side compositing is on. Created attachment 418460 [details]
Patch
Committed r271920: <https://trac.webkit.org/changeset/271920> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418460 [details]. |