| Summary: | Use setBooleanAttribute instead of setAttributeWithoutSynchronization(X, Y ? emptyAtom() : nullAtom()); | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> | ||||
| Component: | DOM | Assignee: | Tim Nguyen (:ntim) <ntim> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, changseok, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, koivisto, mifenton, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tim Nguyen (:ntim)
2021-07-07 07:54:16 PDT
Created attachment 433030 [details]
Patch
Committed r279643 (239456@main): <https://commits.webkit.org/239456@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433030 [details]. Comment on attachment 433030 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433030&action=review > Source/WebCore/ChangeLog:8 > + It's easier to read and attribute sync doesn't make a difference here (it only does for style & SVG attributes). This comment shows a slight misunderstanding of "without synchronization". The function does not exist so that we can bypass synchronization. It’s an optimized case that saves work when we know the attribute we are setting is not something that can have SVG animation applied to it, nor is the attribute "style". By calling the plain old setAttribute, we are just forgoing a micro-optimization. So a more accurate comment would be more like, "we can do without the slight optimization that we get by calling setAttributeWithoutSynchronization". |