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

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

Issue 1175173002: Simplify inDetach() assert and make it stronger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DocumentLifecycle.h ('k') | Source/core/dom/Node.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 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. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 537
538 // Attaches this node to the layout tree. This calculates the style to be ap plied to the node and creates an 538 // Attaches this node to the layout tree. This calculates the style to be ap plied to the node and creates an
539 // appropriate LayoutObject which will be inserted into the tree (except whe n the style has display: none). This 539 // appropriate LayoutObject which will be inserted into the tree (except whe n the style has display: none). This
540 // makes the node visible in the FrameView. 540 // makes the node visible in the FrameView.
541 virtual void attach(const AttachContext& = AttachContext()); 541 virtual void attach(const AttachContext& = AttachContext());
542 542
543 // Detaches the node from the layout tree, making it invisible in the render ed view. This method will remove 543 // Detaches the node from the layout tree, making it invisible in the render ed view. This method will remove
544 // the node's layout object from the layout tree and delete it. 544 // the node's layout object from the layout tree and delete it.
545 virtual void detach(const AttachContext& = AttachContext()); 545 virtual void detach(const AttachContext& = AttachContext());
546 546
547 #if ENABLE(ASSERT)
548 bool inDetach() const;
549 #endif
550
551 void reattach(const AttachContext& = AttachContext()); 547 void reattach(const AttachContext& = AttachContext());
552 void lazyReattachIfAttached(); 548 void lazyReattachIfAttached();
553 549
554 // Returns true if recalcStyle should be called on the object, if there is s uch a method (on Document and Element). 550 // Returns true if recalcStyle should be called on the object, if there is s uch a method (on Document and Element).
555 bool shouldCallRecalcStyle(StyleRecalcChange); 551 bool shouldCallRecalcStyle(StyleRecalcChange);
556 552
557 // Wrapper for nodes that don't have a layoutObject, but still cache the sty le (like HTMLOptionElement). 553 // Wrapper for nodes that don't have a layoutObject, but still cache the sty le (like HTMLOptionElement).
558 ComputedStyle* mutableComputedStyle() const; 554 ComputedStyle* mutableComputedStyle() const;
559 const ComputedStyle* computedStyle() const; 555 const ComputedStyle* computedStyle() const;
560 const ComputedStyle* parentComputedStyle() const; 556 const ComputedStyle* parentComputedStyle() const;
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 } // namespace blink 911 } // namespace blink
916 912
917 #ifndef NDEBUG 913 #ifndef NDEBUG
918 // Outside the WebCore namespace for ease of invocation from gdb. 914 // Outside the WebCore namespace for ease of invocation from gdb.
919 void showNode(const blink::Node*); 915 void showNode(const blink::Node*);
920 void showTree(const blink::Node*); 916 void showTree(const blink::Node*);
921 void showNodePath(const blink::Node*); 917 void showNodePath(const blink::Node*);
922 #endif 918 #endif
923 919
924 #endif // Node_h 920 #endif // Node_h
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentLifecycle.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698