Bug 254751 - Avoid calling hasAttributeWithoutSynchronization() and then attributeWithoutSynchronization() for performance in HTMLAnchorElement.cpp
Summary: Avoid calling hasAttributeWithoutSynchronization() and then attributeWithoutS...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-30 10:25 PDT by Ahmad Saleem
Modified: 2023-03-30 14:45 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>