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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 27 matching lines...) Expand all
38 if (m_hasUAAppearance) { 38 if (m_hasUAAppearance) {
39 m_borderData = m_style->border(); 39 m_borderData = m_style->border();
40 m_backgroundData = *m_style->backgroundLayers(); 40 m_backgroundData = *m_style->backgroundLayers();
41 m_backgroundColor = m_style->backgroundColor(); 41 m_backgroundColor = m_style->backgroundColor();
42 } 42 }
43 } 43 }
44 44
45 void StyleResolverState::clear() 45 void StyleResolverState::clear()
46 { 46 {
47 m_element = 0; 47 m_element = 0;
48 m_style = 0;
48 m_styledElement = 0; 49 m_styledElement = 0;
49 m_parentStyle = 0; 50 m_parentStyle = 0;
50 m_parentNode = 0; 51 m_parentNode = 0;
51 m_regionForStyling = 0; 52 m_regionForStyling = 0;
52 m_elementStyleResources.clear(); 53 m_elementStyleResources.clear();
53 } 54 }
54 55
56 PassRefPtr<RenderStyle> StyleResolverState::takeStyleAndClear()
57 {
58 RefPtr<RenderStyle> result = takeStyle();
59 clear();
60 return result.release();
61 }
62
55 void StyleResolverState::initElement(Element* element) 63 void StyleResolverState::initElement(Element* element)
56 { 64 {
57 if (m_element == element) 65 if (m_element == element)
58 return; 66 return;
59 67
60 m_element = element; 68 m_element = element;
61 m_styledElement = element && element->isStyledElement() ? element : 0; 69 m_styledElement = element && element->isStyledElement() ? element : 0;
62 m_elementLinkState = element ? element->document()->visitedLinkState()->dete rmineLinkState(element) : NotInsideLink; 70 m_elementLinkState = element ? element->document()->visitedLinkState()->dete rmineLinkState(element) : NotInsideLink;
63 71
64 if (!element || element != element->document()->documentElement()) 72 if (!element || element != element->document()->documentElement())
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return RenderTheme::focusRingColor(); 164 return RenderTheme::focusRingColor();
157 case CSSValueCurrentcolor: 165 case CSSValueCurrentcolor:
158 m_isMatchedPropertiesCacheable = false; 166 m_isMatchedPropertiesCacheable = false;
159 return style()->color(); 167 return style()->color();
160 default: 168 default:
161 return colorForCSSValue(valueID); 169 return colorForCSSValue(valueID);
162 } 170 }
163 } 171 }
164 172
165 } // namespace WebCore 173 } // namespace WebCore
OLDNEW
« 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