Commit 5b3ce4e3 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Use HashMap::Take(...) in Document::RemoveComputedStyleMapItem

at(<key>)+erase(<key>) is two hash computations, which can be replaced
with Take(<key>).

Change-Id: I0300052c629177ffb5317a8b58c222f32b0c1e38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903201Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#713452}
parent c87907c6
...@@ -8233,10 +8233,7 @@ void Document::AddComputedStyleMapItem( ...@@ -8233,10 +8233,7 @@ void Document::AddComputedStyleMapItem(
StylePropertyMapReadOnly* Document::RemoveComputedStyleMapItem( StylePropertyMapReadOnly* Document::RemoveComputedStyleMapItem(
Element* element) { Element* element) {
StylePropertyMapReadOnly* computed_style = return element_computed_style_map_.Take(element);
element_computed_style_map_.at(element);
element_computed_style_map_.erase(element);
return computed_style;
} }
void Document::Trace(Visitor* visitor) { void Document::Trace(Visitor* visitor) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment