| Summary: | CSS :visited color taken on non-visited link when using CSS variables | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Adam_Dierkens | ||||||||
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Major | CC: | beidson, darin, koivisto, sam, simon.fraser, twilco.o, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari 13 | ||||||||||
| Hardware: | Mac | ||||||||||
| OS: | macOS 10.14 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Adam_Dierkens
2020-04-14 17:38:06 PDT
Created attachment 408005 [details]
Patch
Created attachment 408018 [details]
Patch
Comment on attachment 408018 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408018&action=review > Source/WebCore/style/StyleBuilder.cpp:190 > + auto originalLinkMatch = m_state.m_linkMatch; This won’t do the right thing if the "return" below is done after changing m_state.m_linkMatch. We have a class SetForScope designed for this kind of thing, that could make sure we get that right. Created attachment 408059 [details]
Patch
TIL of SetForScope, thanks Darin! I think I've fixed it -- can you take another look? Comment on attachment 408059 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408059&action=review > Source/WebCore/style/StyleBuilder.cpp:43 > #include "StylePropertyShorthand.h" > > +#include <wtf/SetForScope.h> WebKit coding style does not leave a space between these making it two paragraphs. But fine to land like this for now. > Source/WebCore/style/StyleBuilder.cpp:220 > + SetForScope<SelectorChecker::LinkMatchMask> scopedLinkMatchMutation(m_state.m_linkMatch, index); Oh, looks like there is a better way to write it: auto scopedLinkMatchMutation = SetForScope(m_state.m_linkMatch, index); That way we don’t have to write out the type. But fine to land like this for now. Committed r266656: <https://trac.webkit.org/changeset/266656> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408059 [details]. |