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

Unified Diff: Source/core/dom/MutationObserver.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MutationObserver.cpp
diff --git a/Source/core/dom/MutationObserver.cpp b/Source/core/dom/MutationObserver.cpp
index 9a3a465db3f1ad4d4b08f0c45ea00c80c1d6d97b..b543e51589b8b41dd1de415468790ded6829c3e7 100644
--- a/Source/core/dom/MutationObserver.cpp
+++ b/Source/core/dom/MutationObserver.cpp
@@ -86,36 +86,36 @@ void MutationObserver::observe(Node* node, const Dictionary& optionsDictionary,
MutationObserverOptions options = 0;
bool attributeOldValue = false;
- bool attributeOldValuePresent = optionsDictionary.get("attributeOldValue", attributeOldValue);
+ bool attributeOldValuePresent = DictionaryHelper::get(optionsDictionary, "attributeOldValue", attributeOldValue);
if (attributeOldValue)
options |= AttributeOldValue;
HashSet<AtomicString> attributeFilter;
- bool attributeFilterPresent = optionsDictionary.get("attributeFilter", attributeFilter);
+ bool attributeFilterPresent = DictionaryHelper::get(optionsDictionary, "attributeFilter", attributeFilter);
if (attributeFilterPresent)
options |= AttributeFilter;
bool attributes = false;
- bool attributesPresent = optionsDictionary.get("attributes", attributes);
+ bool attributesPresent = DictionaryHelper::get(optionsDictionary, "attributes", attributes);
if (attributes || (!attributesPresent && (attributeOldValuePresent || attributeFilterPresent)))
options |= Attributes;
bool characterDataOldValue = false;
- bool characterDataOldValuePresent = optionsDictionary.get("characterDataOldValue", characterDataOldValue);
+ bool characterDataOldValuePresent = DictionaryHelper::get(optionsDictionary, "characterDataOldValue", characterDataOldValue);
if (characterDataOldValue)
options |= CharacterDataOldValue;
bool characterData = false;
- bool characterDataPresent = optionsDictionary.get("characterData", characterData);
+ bool characterDataPresent = DictionaryHelper::get(optionsDictionary, "characterData", characterData);
if (characterData || (!characterDataPresent && characterDataOldValuePresent))
options |= CharacterData;
bool childListValue = false;
- if (optionsDictionary.get("childList", childListValue) && childListValue)
+ if (DictionaryHelper::get(optionsDictionary, "childList", childListValue) && childListValue)
options |= ChildList;
bool subtreeValue = false;
- if (optionsDictionary.get("subtree", subtreeValue) && subtreeValue)
+ if (DictionaryHelper::get(optionsDictionary, "subtree", subtreeValue) && subtreeValue)
options |= Subtree;
if (!(options & Attributes)) {
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698