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

Unified Diff: third_party/WebKit/Source/core/dom/ElementRareData.cpp

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Implemented root margin 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/ElementRareData.cpp
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.cpp b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
index 7000ea932f250ebf1a9b57cd92453960668cc336..d52ef89a2048d35f4e753a545165e480dcdddf71 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
@@ -28,10 +28,22 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* STATIC_ASSERT_STRUCT_SIZES_EQUAL
+
+ Compile-time assert that a struct has the expected size. The old way to do this is:
+
+ static_assert(sizeof(StructWithSameSize) == sizeof(Struct)), "Wrong size!");
+
+ However, static_assert will not emit the actual sizes of the structs in question, and
+ there is no way to use an interpolated string in the error message. By contrast,
+ STATIC_ASSERT_STRUCT_SIZES_EQUAL will ensure that the actual sizes of the compared structs
+ will appear in the compiler error output.
+*/
esprehn 2015/12/12 00:14:13 this comment belongs with that macro, not in Eleme
szager1 2015/12/16 19:15:34 This was meant for a separate patch, removing it f
+
#include "config.h"
#include "core/dom/ElementRareData.h"
-
#include "core/dom/CompositorProxiedPropertySet.h"
+#include "core/dom/IntersectionObservation.h"
#include "core/style/ComputedStyle.h"
namespace blink {
@@ -40,8 +52,8 @@ struct SameSizeAsElementRareData : NodeRareData {
short indices[1];
LayoutSize sizeForResizing;
IntSize scrollOffset;
- void* pointers[13];
- PersistentWillBeMember<void*> member[1];
+ void* pointers[14];
+ PersistentWillBeMember<void*> member[3];
};
CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* ownerElement)
@@ -69,11 +81,14 @@ DEFINE_TRACE_AFTER_DISPATCH(ElementRareData)
#endif
visitor->trace(m_elementAnimations);
visitor->trace(m_cssomWrapper);
+ visitor->trace(m_weakPointerFactory);
visitor->trace(m_customElementDefinition);
visitor->trace(m_generatedBefore);
visitor->trace(m_generatedAfter);
visitor->trace(m_generatedFirstLetter);
visitor->trace(m_backdrop);
+ visitor->trace(m_intersectionObservers);
+ visitor->trace(m_intersectionObservations);
NodeRareData::traceAfterDispatch(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698