Title: [270892] trunk/Source/WebCore
Revision
270892
Author
[email protected]
Date
2020-12-16 08:16:35 -0800 (Wed, 16 Dec 2020)

Log Message

Make FrameView::m_customSizeForResizeEvent an Optional<IntSize>
https://bugs.webkit.org/show_bug.cgi?id=219931

Reviewed by Zalan Bujtas.

Replace bool + IntSize with an Optional<IntSize>.

* page/FrameView.cpp:
(WebCore::FrameView::sizeForResizeEvent const):
(WebCore::FrameView::setCustomSizeForResizeEvent):
* page/FrameView.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270891 => 270892)


--- trunk/Source/WebCore/ChangeLog	2020-12-16 16:13:18 UTC (rev 270891)
+++ trunk/Source/WebCore/ChangeLog	2020-12-16 16:16:35 UTC (rev 270892)
@@ -1,3 +1,17 @@
+2020-12-16  Simon Fraser  <[email protected]>
+
+        Make FrameView::m_customSizeForResizeEvent an Optional<IntSize>
+        https://bugs.webkit.org/show_bug.cgi?id=219931
+
+        Reviewed by Zalan Bujtas.
+
+        Replace bool + IntSize with an Optional<IntSize>.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::sizeForResizeEvent const):
+        (WebCore::FrameView::setCustomSizeForResizeEvent):
+        * page/FrameView.h:
+
 2020-12-16  Zalan Bujtas  <[email protected]>
 
         [LFC][BFC] Non-quantitative values such as auto and min-content are not influenced by the box-sizing property

Modified: trunk/Source/WebCore/page/FrameView.cpp (270891 => 270892)


--- trunk/Source/WebCore/page/FrameView.cpp	2020-12-16 16:13:18 UTC (rev 270891)
+++ trunk/Source/WebCore/page/FrameView.cpp	2020-12-16 16:16:35 UTC (rev 270892)
@@ -3366,8 +3366,8 @@
 IntSize FrameView::sizeForResizeEvent() const
 {
 #if PLATFORM(IOS_FAMILY)
-    if (m_useCustomSizeForResizeEvent)
-        return m_customSizeForResizeEvent;
+    if (m_customSizeForResizeEvent)
+        return *m_customSizeForResizeEvent;
 #endif
     if (useFixedLayout() && !fixedLayoutSize().isEmpty() && delegatesScrolling())
         return fixedLayoutSize();
@@ -5201,7 +5201,6 @@
 
 void FrameView::setCustomSizeForResizeEvent(IntSize customSize)
 {
-    m_useCustomSizeForResizeEvent = true;
     m_customSizeForResizeEvent = customSize;
     sendResizeEventIfNeeded();
 }

Modified: trunk/Source/WebCore/page/FrameView.h (270891 => 270892)


--- trunk/Source/WebCore/page/FrameView.h	2020-12-16 16:13:18 UTC (rev 270891)
+++ trunk/Source/WebCore/page/FrameView.h	2020-12-16 16:16:35 UTC (rev 270892)
@@ -147,7 +147,6 @@
     WEBCORE_EXPORT void setCustomFixedPositionLayoutRect(const IntRect&);
     bool updateFixedPositionLayoutRect();
 
-    IntSize customSizeForResizeEvent() const { return m_customSizeForResizeEvent; }
     WEBCORE_EXPORT void setCustomSizeForResizeEvent(IntSize);
 
     WEBCORE_EXPORT void setScrollVelocity(const VelocityData&);
@@ -908,10 +907,9 @@
 
 #if PLATFORM(IOS_FAMILY)
     bool m_useCustomFixedPositionLayoutRect { false };
-    bool m_useCustomSizeForResizeEvent { false };
 
     IntRect m_customFixedPositionLayoutRect;
-    IntSize m_customSizeForResizeEvent;
+    Optional<IntSize> m_customSizeForResizeEvent;
 #endif
 
     Optional<OverrideViewportSize> m_overrideViewportSize;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to