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

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

Issue 18139007: Remove StyleResolverState::styledElement() since we can just check isHTMLElement() or isSVGElement() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a comment 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/Node.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 15 matching lines...) Expand all
26 #include "core/dom/Node.h" 26 #include "core/dom/Node.h"
27 #include "core/dom/NodeRenderStyle.h" 27 #include "core/dom/NodeRenderStyle.h"
28 #include "core/dom/NodeRenderingContext.h" 28 #include "core/dom/NodeRenderingContext.h"
29 #include "core/dom/VisitedLinkState.h" 29 #include "core/dom/VisitedLinkState.h"
30 #include "core/page/Page.h" 30 #include "core/page/Page.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 ElementResolveContext::ElementResolveContext(Element* element) 34 ElementResolveContext::ElementResolveContext(Element* element)
35 : m_element(element) 35 : m_element(element)
36 , m_styledElement(element && element->isStyledElement() ? element : 0)
37 , m_elementLinkState(element ? element->document()->visitedLinkState()->dete rmineLinkState(element) : NotInsideLink) 36 , m_elementLinkState(element ? element->document()->visitedLinkState()->dete rmineLinkState(element) : NotInsideLink)
38 , m_distributedToInsertionPoint(false) 37 , m_distributedToInsertionPoint(false)
39 , m_resetStyleInheritance(false) 38 , m_resetStyleInheritance(false)
40 { 39 {
41 NodeRenderingContext context(element); 40 NodeRenderingContext context(element);
42 m_parentNode = context.parentNodeForRenderingAndStyle(); 41 m_parentNode = context.parentNodeForRenderingAndStyle();
43 m_distributedToInsertionPoint = context.insertionPoint(); 42 m_distributedToInsertionPoint = context.insertionPoint();
44 m_resetStyleInheritance = context.resetStyleInheritance(); 43 m_resetStyleInheritance = context.resetStyleInheritance();
45 44
46 Node* documentElement = document()->documentElement(); 45 Node* documentElement = document()->documentElement();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 m_fontDirty = false; 89 m_fontDirty = false;
91 90
92 // FIXME: StyleResolverState is never passed between documents 91 // FIXME: StyleResolverState is never passed between documents
93 // so we should be able to do this initialization at StyleResolverState 92 // so we should be able to do this initialization at StyleResolverState
94 // createion time instead of now, correct? 93 // createion time instead of now, correct?
95 if (Page* page = newDocument->page()) 94 if (Page* page = newDocument->page())
96 m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor()); 95 m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor());
97 } 96 }
98 97
99 } // namespace WebCore 98 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698