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

Unified Diff: third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h

Issue 1649983003: Remove the forced layout in getComputedStyle for elements in Shadow DOM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Look at ShadowRoots when walking up the tree in updateLayoutTreeForNodeIfNeeded. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
index 39bb2e0ee44c5ce46183e3fd80aee1aa31d27465..455406043765e70bbd237d9914a22c99daaca098 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
@@ -40,21 +40,21 @@ namespace LayoutTreeBuilderTraversal {
class ParentDetails {
STACK_ALLOCATED();
rune 2016/02/01 09:24:23 Is this also WTF_MAKE_NONCOPYABLE? Not that I thin
public:
- ParentDetails()
- : m_insertionPoint(nullptr)
- { }
+ bool wasDistributedToInsertionPoint() const { return m_wasDistributedToInsertionPoint; }
+ void didTraverseInsertionPoint() { m_wasDistributedToInsertionPoint = true; }
- const InsertionPoint* insertionPoint() const { return m_insertionPoint; }
+ const ShadowRoot* shadowRoot() const { return m_shadowRoot; }
+ void didTraverseShadowRoot(const ShadowRoot* shadowRoot) { m_shadowRoot = shadowRoot; }
- void didTraverseInsertionPoint(const InsertionPoint*);
-
- bool operator==(const ParentDetails& other)
rune 2016/02/01 09:24:23 Are objects of this class ever being compared? Doe
+ void reset()
{
- return m_insertionPoint == other.m_insertionPoint;
+ m_wasDistributedToInsertionPoint = false;
+ m_shadowRoot = nullptr;
}
private:
- RawPtrWillBeMember<const InsertionPoint> m_insertionPoint;
+ bool m_wasDistributedToInsertionPoint = false;
+ RawPtrWillBeMember<const ShadowRoot> m_shadowRoot = nullptr;
};
CORE_EXPORT ContainerNode* parent(const Node&, ParentDetails* = 0);

Powered by Google App Engine
This is Rietveld 408576698