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

Unified Diff: Source/core/inspector/LayoutEditor.cpp

Issue 1305343003: Devtools [LayoutEditor]: Remove caching of the selector information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master-w1
Patch Set: Created 5 years, 3 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/inspector/LayoutEditor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/LayoutEditor.cpp
diff --git a/Source/core/inspector/LayoutEditor.cpp b/Source/core/inspector/LayoutEditor.cpp
index baf5c57795fc2d77a71f6e1db6670ccf00ba1492..05a0c5ecd44eac26ded75752793b082aab15ed5a 100644
--- a/Source/core/inspector/LayoutEditor.cpp
+++ b/Source/core/inspector/LayoutEditor.cpp
@@ -315,7 +315,6 @@ void LayoutEditor::clearSelection(bool commitChanges)
m_element.clear();
m_isDirty = false;
m_matchedRules.clear();
- m_cachedSelectorsInfo.clear();
m_currentRuleIndex = -1;
}
@@ -385,9 +384,6 @@ String LayoutEditor::currentSelectorInfo()
if (!m_element)
return String();
- if (m_cachedSelectorsInfo.contains(m_currentRuleIndex))
- return m_cachedSelectorsInfo.get(m_currentRuleIndex);
-
RefPtr<JSONObject> object = JSONObject::create();
String currentSelectorText = m_currentRuleIndex == -1 ? "inline style" : m_matchedRules[m_currentRuleIndex]->selectorText();
object->setString("selector", currentSelectorText);
@@ -414,8 +410,7 @@ String LayoutEditor::currentSelectorInfo()
}
object->setArray("nodes", highlights.release());
- m_cachedSelectorsInfo.add(m_currentRuleIndex, object->toJSONString());
- return m_cachedSelectorsInfo.get(m_currentRuleIndex);
+ return object->toJSONString();
}
} // namespace blink
« no previous file with comments | « Source/core/inspector/LayoutEditor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698