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

Side by Side Diff: sky/engine/core/dom/NodeRareData.h

Issue 871203005: Remove ElementFlags system. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/ElementRareData.h ('k') | no next file » | 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) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 NodeMutationObserverData* mutationObserverData() { return m_mutationObserver Data.get(); } 59 NodeMutationObserverData* mutationObserverData() { return m_mutationObserver Data.get(); }
60 NodeMutationObserverData& ensureMutationObserverData() 60 NodeMutationObserverData& ensureMutationObserverData()
61 { 61 {
62 if (!m_mutationObserverData) 62 if (!m_mutationObserverData)
63 m_mutationObserverData = NodeMutationObserverData::create(); 63 m_mutationObserverData = NodeMutationObserverData::create();
64 return *m_mutationObserverData; 64 return *m_mutationObserverData;
65 } 65 }
66 66
67 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask; }
68 void setElementFlag(ElementFlags mask, bool value) { m_elementFlags = (m_ele mentFlags & ~mask) | (-(int32_t)value & mask); }
69 void clearElementFlag(ElementFlags mask) { m_elementFlags &= ~mask; }
70
71 protected: 67 protected:
72 explicit NodeRareData(RenderObject* renderer) 68 explicit NodeRareData(RenderObject* renderer)
73 : NodeRareDataBase(renderer) 69 : NodeRareDataBase(renderer)
74 , m_elementFlags(0)
75 , m_isElementRareData(false) 70 , m_isElementRareData(false)
76 { } 71 { }
77 72
78 private: 73 private:
79 OwnPtr<NodeMutationObserverData> m_mutationObserverData; 74 OwnPtr<NodeMutationObserverData> m_mutationObserverData;
80 75
81 unsigned m_elementFlags : NumberOfElementFlags;
82 protected: 76 protected:
83 unsigned m_isElementRareData : 1; 77 unsigned m_isElementRareData : 1;
84 }; 78 };
85 79
86 } // namespace blink 80 } // namespace blink
87 81
88 #endif // SKY_ENGINE_CORE_DOM_NODERAREDATA_H_ 82 #endif // SKY_ENGINE_CORE_DOM_NODERAREDATA_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ElementRareData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698