Bug 254751

Summary: Avoid calling hasAttributeWithoutSynchronization() and then attributeWithoutSynchronization() for performance in HTMLAnchorElement.cpp
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-03-30 10:25:04 PDT
Hi Team,

While going through Blink's commit, I came across another potential commit (already testing locally).

Blink Commit (only partial needs to be done in HTMLAnchorElement.cpp) - https://chromium.googlesource.com/chromium/blink/+/f28d0fba0e523c1669c48354a416a091c5f062e0

WebKit Source - https://github.com/WebKit/WebKit/blob/fbbdeface10baf1a91eea6a903a622f5f2abb119/Source/WebCore/html/HTMLAnchorElement.cpp#L360

____

Locally:

  A  const auto& pingValue = attributeWithoutSynchronization(pingAttr);
  M  if (pingValue.isNull() || !document().settings().hyperlinkAuditingEnabled())
        return;
  M  SpaceSplitString pingURLs(pingValue, SpaceSplitString::ShouldFoldCase::No);

_____

Just wanted to raise if we have any complications or we can go ahead and do this.

Thanks!
Comment 1 EWS 2023-03-30 14:44:58 PDT
Committed 262367@main (a53f705a48ab): <https://commits.webkit.org/262367@main>

Reviewed commits have been landed. Closing PR #12185 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-03-30 14:45:24 PDT
<rdar://problem/107440578>