Title: [206107] trunk/Source/WebCore
Revision
206107
Author
an...@apple.com
Date
2016-09-19 12:26:31 -0700 (Mon, 19 Sep 2016)

Log Message

Add size assert for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=162096

Reviewed by Simon Fraser.

Also remove the unused m_visibleInViewportState field.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::unregisterForVisibleInViewportCallback):
* rendering/RenderElement.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206106 => 206107)


--- trunk/Source/WebCore/ChangeLog	2016-09-19 19:08:45 UTC (rev 206106)
+++ trunk/Source/WebCore/ChangeLog	2016-09-19 19:26:31 UTC (rev 206107)
@@ -1,3 +1,16 @@
+2016-09-19  Antti Koivisto  <an...@apple.com>
+
+        Add size assert for RenderElement
+        https://bugs.webkit.org/show_bug.cgi?id=162096
+
+        Reviewed by Simon Fraser.
+
+        Also remove the unused m_visibleInViewportState field.
+
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::unregisterForVisibleInViewportCallback):
+        * rendering/RenderElement.h:
+
 2016-09-19  Nan Wang  <n_w...@apple.com>
 
         AX: Add accessibility support for details element on iOS

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (206106 => 206107)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2016-09-19 19:08:45 UTC (rev 206106)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2016-09-19 19:26:31 UTC (rev 206107)
@@ -78,6 +78,15 @@
 
 namespace WebCore {
 
+struct SameSizeAsRenderElement : public RenderObject {
+    uint32_t bitfields;
+    void* firstChild;
+    void* lastChild;
+    RenderStyle style;
+};
+
+static_assert(sizeof(RenderElement) == sizeof(SameSizeAsRenderElement), "RenderElement should stay small");
+
 bool RenderElement::s_affectsParentBlock = false;
 bool RenderElement::s_noLongerAffectsParentBlock = false;
     
@@ -1483,7 +1492,6 @@
     setIsRegisteredForVisibleInViewportCallback(false);
 
     view().unregisterForVisibleInViewportCallback(*this);
-    m_visibleInViewportState = VisibilityUnknown;
 }
 
 void RenderElement::visibleInViewportStateChanged(VisibleInViewportState state)

Modified: trunk/Source/WebCore/rendering/RenderElement.h (206106 => 206107)


--- trunk/Source/WebCore/rendering/RenderElement.h	2016-09-19 19:08:45 UTC (rev 206106)
+++ trunk/Source/WebCore/rendering/RenderElement.h	2016-09-19 19:26:31 UTC (rev 206107)
@@ -345,8 +345,6 @@
     unsigned m_renderBlockFlowHasMarkupTruncation : 1;
     unsigned m_renderBlockFlowLineLayoutPath : 2;
 
-    VisibleInViewportState m_visibleInViewportState { VisibilityUnknown };
-
     RenderObject* m_firstChild;
     RenderObject* m_lastChild;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to