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

Side by Side Diff: Source/core/css/resolver/StyleResolverState.cpp

Issue 16629006: Revert 151996 "Avoid N^2 walk placing renderers when building th..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Update to head Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/ContainerNode.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_childIndex = 0;
49 m_styledElement = 0; 48 m_styledElement = 0;
50 m_parentStyle = 0; 49 m_parentStyle = 0;
51 m_parentNode = 0; 50 m_parentNode = 0;
52 m_regionForStyling = 0; 51 m_regionForStyling = 0;
53 m_pendingImageProperties.clear(); 52 m_pendingImageProperties.clear();
54 m_hasPendingShaders = false; 53 m_hasPendingShaders = false;
55 m_pendingSVGDocuments.clear(); 54 m_pendingSVGDocuments.clear();
56 } 55 }
57 56
58 void StyleResolverState::initElement(Element* e, int childIndex) 57 void StyleResolverState::initElement(Element* e)
59 { 58 {
60 m_element = e; 59 m_element = e;
61 m_childIndex = childIndex;
62 m_styledElement = e && e->isStyledElement() ? static_cast<StyledElement*>(e) : 0; 60 m_styledElement = e && e->isStyledElement() ? static_cast<StyledElement*>(e) : 0;
63 m_elementLinkState = e ? e->document()->visitedLinkState()->determineLinkSta te(e) : NotInsideLink; 61 m_elementLinkState = e ? e->document()->visitedLinkState()->determineLinkSta te(e) : NotInsideLink;
64 } 62 }
65 63
66 void StyleResolverState::initForStyleResolve(Document* document, Element* e, Ren derStyle* parentStyle, RenderRegion* regionForStyling) 64 void StyleResolverState::initForStyleResolve(Document* document, Element* e, Ren derStyle* parentStyle, RenderRegion* regionForStyling)
67 { 65 {
68 m_regionForStyling = regionForStyling; 66 m_regionForStyling = regionForStyling;
69 67
70 if (e) { 68 if (e) {
71 NodeRenderingContext context(e); 69 NodeRenderingContext context(e);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return RenderTheme::focusRingColor(); 144 return RenderTheme::focusRingColor();
147 case CSSValueCurrentcolor: 145 case CSSValueCurrentcolor:
148 return style()->color(); 146 return style()->color();
149 default: 147 default:
150 return colorForCSSValue(valueID); 148 return colorForCSSValue(valueID);
151 } 149 }
152 } 150 }
153 151
154 152
155 } // namespace WebCore 153 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698