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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/ElementResolveContext.cpp

Issue 2633633003: Changed EInsideLink to an enum class with an unsigned type. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 18 matching lines...) Expand all
29 #include "core/dom/shadow/InsertionPoint.h" 29 #include "core/dom/shadow/InsertionPoint.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 ElementResolveContext::ElementResolveContext(const Document& document) 33 ElementResolveContext::ElementResolveContext(const Document& document)
34 : m_element(nullptr), 34 : m_element(nullptr),
35 m_parentNode(nullptr), 35 m_parentNode(nullptr),
36 m_rootElementStyle(document.documentElement() 36 m_rootElementStyle(document.documentElement()
37 ? document.documentElement()->computedStyle() 37 ? document.documentElement()->computedStyle()
38 : document.computedStyle()), 38 : document.computedStyle()),
39 m_elementLinkState(NotInsideLink), 39 m_elementLinkState(EInsideLink::kNotInsideLink),
40 m_distributedToInsertionPoint(false) {} 40 m_distributedToInsertionPoint(false) {}
41 41
42 ElementResolveContext::ElementResolveContext(Element& element) 42 ElementResolveContext::ElementResolveContext(Element& element)
43 : m_element(&element), 43 : m_element(&element),
44 m_elementLinkState( 44 m_elementLinkState(
45 element.document().visitedLinkState().determineLinkState(element)), 45 element.document().visitedLinkState().determineLinkState(element)),
46 m_distributedToInsertionPoint(false) { 46 m_distributedToInsertionPoint(false) {
47 LayoutTreeBuilderTraversal::ParentDetails parentDetails; 47 LayoutTreeBuilderTraversal::ParentDetails parentDetails;
48 m_parentNode = 48 m_parentNode =
49 element.isActiveSlotOrActiveInsertionPoint() 49 element.isActiveSlotOrActiveInsertionPoint()
50 ? nullptr 50 ? nullptr
51 : LayoutTreeBuilderTraversal::parent(element, &parentDetails); 51 : LayoutTreeBuilderTraversal::parent(element, &parentDetails);
52 m_distributedToInsertionPoint = parentDetails.insertionPoint(); 52 m_distributedToInsertionPoint = parentDetails.insertionPoint();
53 53
54 const Document& document = element.document(); 54 const Document& document = element.document();
55 Node* documentElement = document.documentElement(); 55 Node* documentElement = document.documentElement();
56 const ComputedStyle* documentStyle = document.computedStyle(); 56 const ComputedStyle* documentStyle = document.computedStyle();
57 m_rootElementStyle = documentElement && element != documentElement 57 m_rootElementStyle = documentElement && element != documentElement
58 ? documentElement->computedStyle() 58 ? documentElement->computedStyle()
59 : documentStyle; 59 : documentStyle;
60 if (!m_rootElementStyle) 60 if (!m_rootElementStyle)
61 m_rootElementStyle = documentStyle; 61 m_rootElementStyle = documentStyle;
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698