[Webkit-unassigned] [Bug 80707] Presentation attribute cache
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 9 10:43:34 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=80707
--- Comment #5 from Andreas Kling <kling at webkit.org> 2012-03-09 10:43:34 PST ---
(From update of attachment 131054)
View in context: https://bugs.webkit.org/attachment.cgi?id=131054&action=review
> Source/WebCore/dom/StyledElement.cpp:73
> + static PresentationAttributeCache* cache = new PresentationAttributeCache();
> + return *cache;
Needs more common WebKit patterns:
DEFINE_STATIC_LOCAL(PresentationAttributeCache, cache, ());
return cache;
> Source/WebCore/dom/StyledElement.cpp:204
> + if (!attribute->namespaceURI().isNull())
> + return;
Perhaps this could be an assertion instead?
> Source/WebCore/dom/StyledElement.cpp:236
> + PresentationAttributeCache::iterator cacheIterator;
> + if (cacheHash) {
> + cacheIterator = presentationAttributeCache().add(cacheHash, nullptr).first;
We could grab the PresentationAttributeCacheEntry* instead of holding on to a PresentationAttributeCache::iterator here to make the following code a little prettier.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list