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

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

Issue 2460813002: Make slots in non-shadow trees participate in a flat tree (Closed)
Patch Set: update expectation Created 4 years, 1 month 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
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 28 matching lines...) Expand all
39 m_elementLinkState(NotInsideLink), 39 m_elementLinkState(NotInsideLink),
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.isSlotOrActiveInsertionPoint() 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

Powered by Google App Engine
This is Rietveld 408576698