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

Side by Side Diff: third_party/WebKit/Source/core/dom/NodeComputedStyle.h

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Internals.* Created 5 years 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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2008 David Smith (catfish.man@gmail.com) 5 * (C) 2008 David Smith (catfish.man@gmail.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // <option> and <optgroup> can be styled even if they don't get layout objec ts, 46 // <option> and <optgroup> can be styled even if they don't get layout objec ts,
47 // so they store their style internally and return it through nonLayoutObjec tComputedStyle(). 47 // so they store their style internally and return it through nonLayoutObjec tComputedStyle().
48 // We check here explicitly to avoid the virtual call in the common case. 48 // We check here explicitly to avoid the virtual call in the common case.
49 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this)) 49 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this))
50 return nonLayoutObjectComputedStyle(); 50 return nonLayoutObjectComputedStyle();
51 return 0; 51 return 0;
52 } 52 }
53 53
54 inline const ComputedStyle* Node::parentComputedStyle() const 54 inline const ComputedStyle* Node::parentComputedStyle() const
55 { 55 {
56 if (isActiveInsertionPoint(*this)) 56 if (isSlotOrActiveInsertionPoint())
57 return 0; 57 return 0;
58 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this); 58 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this);
59 return parent ? parent->computedStyle() : 0; 59 return parent ? parent->computedStyle() : 0;
60 } 60 }
61 61
62 inline const ComputedStyle& Node::computedStyleRef() const 62 inline const ComputedStyle& Node::computedStyleRef() const
63 { 63 {
64 const ComputedStyle* style = computedStyle(); 64 const ComputedStyle* style = computedStyle();
65 ASSERT(style); 65 ASSERT(style);
66 return *style; 66 return *style;
67 } 67 }
68 68
69 } 69 }
70 #endif // NodeComputedStyle_h 70 #endif // NodeComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | third_party/WebKit/Source/core/dom/NonDocumentTypeChildNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698