Title: [206055] trunk/Source/WebCore
Revision
206055
Author
an...@apple.com
Date
2016-09-16 16:33:33 -0700 (Fri, 16 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 (206054 => 206055)


--- trunk/Source/WebCore/ChangeLog	2016-09-16 22:14:54 UTC (rev 206054)
+++ trunk/Source/WebCore/ChangeLog	2016-09-16 23:33:33 UTC (rev 206055)
@@ -1,5 +1,18 @@
 2016-09-16  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-16  Antti Koivisto  <an...@apple.com>
+
         Tighten region style map to use RenderElement instead of RenderObject
         https://bugs.webkit.org/show_bug.cgi?id=162064
 

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (206054 => 206055)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2016-09-16 22:14:54 UTC (rev 206054)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2016-09-16 23:33:33 UTC (rev 206055)
@@ -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 (206054 => 206055)


--- trunk/Source/WebCore/rendering/RenderElement.h	2016-09-16 22:14:54 UTC (rev 206054)
+++ trunk/Source/WebCore/rendering/RenderElement.h	2016-09-16 23:33:33 UTC (rev 206055)
@@ -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