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

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

Issue 2398293003: Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: Final patch to land Created 4 years, 2 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
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 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
7 * (http://www.torchmobile.com/) 7 * (http://www.torchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 ContainerNode* parentNode() const; 201 ContainerNode* parentNode() const;
202 Element* parentElement() const; 202 Element* parentElement() const;
203 ContainerNode* parentElementOrShadowRoot() const; 203 ContainerNode* parentElementOrShadowRoot() const;
204 ContainerNode* parentElementOrDocumentFragment() const; 204 ContainerNode* parentElementOrDocumentFragment() const;
205 Node* previousSibling() const { return m_previous; } 205 Node* previousSibling() const { return m_previous; }
206 Node* nextSibling() const { return m_next; } 206 Node* nextSibling() const { return m_next; }
207 NodeList* childNodes(); 207 NodeList* childNodes();
208 Node* firstChild() const; 208 Node* firstChild() const;
209 Node* lastChild() const; 209 Node* lastChild() const;
210 Node* getRootNode(const GetRootNodeOptions&) const; 210 Node* getRootNode(const GetRootNodeOptions&) const;
211 Text* nextTextSibling() const;
211 Node& treeRoot() const; 212 Node& treeRoot() const;
212 Node& shadowIncludingRoot() const; 213 Node& shadowIncludingRoot() const;
213 // closed-shadow-hidden is defined at 214 // closed-shadow-hidden is defined at
214 // https://dom.spec.whatwg.org/#concept-closed-shadow-hidden 215 // https://dom.spec.whatwg.org/#concept-closed-shadow-hidden
215 bool isClosedShadowHiddenFrom(const Node&) const; 216 bool isClosedShadowHiddenFrom(const Node&) const;
216 217
217 void prepend(const HeapVector<NodeOrString>&, ExceptionState&); 218 void prepend(const HeapVector<NodeOrString>&, ExceptionState&);
218 void append(const HeapVector<NodeOrString>&, ExceptionState&); 219 void append(const HeapVector<NodeOrString>&, ExceptionState&);
219 void before(const HeapVector<NodeOrString>&, ExceptionState&); 220 void before(const HeapVector<NodeOrString>&, ExceptionState&);
220 void after(const HeapVector<NodeOrString>&, ExceptionState&); 221 void after(const HeapVector<NodeOrString>&, ExceptionState&);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void setHasName(bool f) { 421 void setHasName(bool f) {
421 DCHECK(!isTextNode()); 422 DCHECK(!isTextNode());
422 setFlag(f, HasNameOrIsEditingTextFlag); 423 setFlag(f, HasNameOrIsEditingTextFlag);
423 } 424 }
424 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); } 425 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); }
425 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } 426 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); }
426 427
427 void setNeedsStyleRecalc(StyleChangeType, const StyleChangeReasonForTracing&); 428 void setNeedsStyleRecalc(StyleChangeType, const StyleChangeReasonForTracing&);
428 void clearNeedsStyleRecalc(); 429 void clearNeedsStyleRecalc();
429 430
431 bool needsReattachLayoutTree() { return getFlag(NeedsReattachLayoutTree); }
432 bool childNeedsReattachLayoutTree() {
433 return getFlag(ChildNeedsReattachLayoutTree);
434 }
435
436 void setNeedsReattachLayoutTree();
437 void setChildNeedsReattachLayoutTree() {
438 setFlag(ChildNeedsReattachLayoutTree);
439 }
440
441 void clearNeedsReattachLayoutTree() { clearFlag(NeedsReattachLayoutTree); }
442 void clearChildNeedsReattachLayoutTree() {
443 clearFlag(ChildNeedsReattachLayoutTree);
444 }
445
446 void markAncestorsWithChildNeedsReattachLayoutTree();
447
430 bool needsDistributionRecalc() const; 448 bool needsDistributionRecalc() const;
431 449
432 bool childNeedsDistributionRecalc() const { 450 bool childNeedsDistributionRecalc() const {
433 return getFlag(ChildNeedsDistributionRecalcFlag); 451 return getFlag(ChildNeedsDistributionRecalcFlag);
434 } 452 }
435 void setChildNeedsDistributionRecalc() { 453 void setChildNeedsDistributionRecalc() {
436 setFlag(ChildNeedsDistributionRecalcFlag); 454 setFlag(ChildNeedsDistributionRecalcFlag);
437 } 455 }
438 void clearChildNeedsDistributionRecalc() { 456 void clearChildNeedsDistributionRecalc() {
439 clearFlag(ChildNeedsDistributionRecalcFlag); 457 clearFlag(ChildNeedsDistributionRecalcFlag);
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 } // namespace blink 1034 } // namespace blink
1017 1035
1018 #ifndef NDEBUG 1036 #ifndef NDEBUG
1019 // Outside the WebCore namespace for ease of invocation from gdb. 1037 // Outside the WebCore namespace for ease of invocation from gdb.
1020 void showNode(const blink::Node*); 1038 void showNode(const blink::Node*);
1021 void showTree(const blink::Node*); 1039 void showTree(const blink::Node*);
1022 void showNodePath(const blink::Node*); 1040 void showNodePath(const blink::Node*);
1023 #endif 1041 #endif
1024 1042
1025 #endif // Node_h 1043 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698