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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2202173004: make a hole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-xss
Patch Set: Created 4 years, 4 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/events/EventPath.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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 ShadowRoot* Element::shadowRoot() const 2054 ShadowRoot* Element::shadowRoot() const
2055 { 2055 {
2056 ElementShadow* elementShadow = shadow(); 2056 ElementShadow* elementShadow = shadow();
2057 if (!elementShadow) 2057 if (!elementShadow)
2058 return nullptr; 2058 return nullptr;
2059 return &elementShadow->youngestShadowRoot(); 2059 return &elementShadow->youngestShadowRoot();
2060 } 2060 }
2061 2061
2062 ShadowRoot* Element::openShadowRoot() const 2062 ShadowRoot* Element::openShadowRoot() const
2063 { 2063 {
2064 if (isSVGUseElement(this)) {
2065 ShadowRoot* root = userAgentShadowRoot();
2066 DCHECK(root);
2067 return root;
2068 }
2064 ShadowRoot* root = shadowRoot(); 2069 ShadowRoot* root = shadowRoot();
2065 if (!root) 2070 if (!root)
2066 return nullptr; 2071 return nullptr;
2067 return root->type() == ShadowRootType::V0 || root->type() == ShadowRootType: :Open ? root : nullptr; 2072 return root->type() == ShadowRootType::V0 || root->type() == ShadowRootType: :Open ? root : nullptr;
2068 } 2073 }
2069 2074
2070 ShadowRoot* Element::closedShadowRoot() const 2075 ShadowRoot* Element::closedShadowRoot() const
2071 { 2076 {
2072 ShadowRoot* root = shadowRoot(); 2077 ShadowRoot* root = shadowRoot();
2073 if (!root) 2078 if (!root)
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 3800
3796 DEFINE_TRACE_WRAPPERS(Element) 3801 DEFINE_TRACE_WRAPPERS(Element)
3797 { 3802 {
3798 if (hasRareData()) { 3803 if (hasRareData()) {
3799 visitor->traceWrappers(elementRareData()); 3804 visitor->traceWrappers(elementRareData());
3800 } 3805 }
3801 ContainerNode::traceWrappers(visitor); 3806 ContainerNode::traceWrappers(visitor);
3802 } 3807 }
3803 3808
3804 } // namespace blink 3809 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/EventPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698