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

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

Issue 1962953002: Storage of ComputedStyle separate from LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed ComputedStyle from ElementRareData Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 #include "core/css/cssom/InlineStylePropertyMap.h" 33 #include "core/css/cssom/InlineStylePropertyMap.h"
34 #include "core/dom/CompositorProxiedPropertySet.h" 34 #include "core/dom/CompositorProxiedPropertySet.h"
35 #include "core/style/ComputedStyle.h" 35 #include "core/style/ComputedStyle.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 struct SameSizeAsElementRareData : NodeRareData { 39 struct SameSizeAsElementRareData : NodeRareData {
40 short indices[1]; 40 short indices[1];
41 LayoutSize sizeForResizing; 41 LayoutSize sizeForResizing;
42 IntSize scrollOffset; 42 IntSize scrollOffset;
43 void* pointers[10]; 43 void* pointers[9];
44 Member<void*> persistentMember[3]; 44 Member<void*> persistentMember[3];
45 }; 45 };
46 46
47 CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* o wnerElement) 47 CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* o wnerElement)
48 { 48 {
49 if (!m_cssomWrapper) 49 if (!m_cssomWrapper)
50 m_cssomWrapper = new InlineCSSStyleDeclaration(ownerElement); 50 m_cssomWrapper = new InlineCSSStyleDeclaration(ownerElement);
51 return *m_cssomWrapper; 51 return *m_cssomWrapper;
52 } 52 }
53 53
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 visitor->traceWrappers(m_attributeMap); 93 visitor->traceWrappers(m_attributeMap);
94 visitor->traceWrappers(m_dataset); 94 visitor->traceWrappers(m_dataset);
95 visitor->traceWrappers(m_classList); 95 visitor->traceWrappers(m_classList);
96 visitor->traceWrappers(m_intersectionObserverData); 96 visitor->traceWrappers(m_intersectionObserverData);
97 NodeRareData::traceWrappersAfterDispatch(visitor); 97 NodeRareData::traceWrappersAfterDispatch(visitor);
98 } 98 }
99 99
100 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "Ele mentRareData should stay small"); 100 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "Ele mentRareData should stay small");
101 101
102 } // namespace blink 102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698