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

Unified Diff: Source/core/css/resolver/StyleResolverState.cpp

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Initial Created 7 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/css/resolver/StyleResolverState.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.cpp
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index cf5a7f5dc1eb1707146c589d267bb8c7a21e182d..9057037b0a193b6c62783f4e47694743f582b10f 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -45,6 +45,7 @@ void StyleResolverState::cacheBorderAndBackground()
void StyleResolverState::clear()
{
m_element = 0;
+ m_style = 0;
m_styledElement = 0;
m_parentStyle = 0;
m_parentNode = 0;
@@ -52,6 +53,13 @@ void StyleResolverState::clear()
m_elementStyleResources.clear();
}
+PassRefPtr<RenderStyle> StyleResolverState::takeStyleAndClear()
+{
+ RefPtr<RenderStyle> result = takeStyle();
+ clear();
+ return result.release();
+}
+
void StyleResolverState::initElement(Element* element)
{
if (m_element == element)
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698