Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Issue 184613003: Avoid double attribute lookup in HTMLElement::matchesReadWritePseudoClass() (Closed)

Created:
6 years, 9 months ago by Inactive
Modified:
6 years, 9 months ago
Reviewers:
eseidel, adamk, rwlbuis
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Visibility:
Public.

Description

Avoid double attribute lookup in HTMLElement::matchesReadWritePseudoClass() Avoid double attribute lookup in HTMLElement::matchesReadWritePseudoClass(). Instead of calling fastHasAttribute() then fastGetAttribute(), call fastGetAttribute() directly and check if the returned value is nullAtom. fastHasAttribute() and fastGetAttribute() do exactly the same thing internally and the only difference is the return type. The attribute lookup is a linear search and thus it is a good idea to avoid doing it twice. R=adamk, eseidel Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168318

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M Source/core/html/HTMLElement.cpp View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Inactive
6 years, 9 months ago (2014-02-28 21:38:54 UTC) #1
rwlbuis
lgtm
6 years, 9 months ago (2014-03-03 16:30:50 UTC) #2
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-03 17:02:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/184613003/1
6 years, 9 months ago (2014-03-03 17:03:00 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-03 17:07:37 UTC) #5
Message was sent while issue was closed.
Change committed as 168318

Powered by Google App Engine
This is Rietveld 408576698