[webkit-reviews] review granted: [Bug 111551] Web Inspector: identify layers for CSS generated content in LayerTreeAgent : [Attachment 191703] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 6 14:28:19 PST 2013


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Antoine Quint
<graouts at apple.com>'s request for review:
Bug 111551: Web Inspector: identify layers for CSS generated content in
LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=111551

Attachment 191703: Patch
https://bugs.webkit.org/attachment.cgi?id=191703&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=191703&action=review


> Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:250
> +	   return "";

It's better to use emptyString().

> Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:268
> +    String identifier = m_pseudoElementToIdMap.get(pseudoElement);
> +    if (identifier.isNull())
> +	   return;
> +
> +    m_pseudoElementToIdMap.remove(pseudoElement);
> +    m_idToPseudoElement.remove(identifier);

get() and remove() both do hash lookups. It would be better to find(), compare
with != .end() to know if you found anything, then use remove(iterator);


More information about the webkit-reviews mailing list