Diff
Modified: trunk/Source/WebCore/ChangeLog (240900 => 240901)
--- trunk/Source/WebCore/ChangeLog 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/ChangeLog 2019-02-03 00:16:44 UTC (rev 240901)
@@ -1,5 +1,30 @@
2019-02-02 Simon Fraser <[email protected]>
+ Tidy up data memebers of FrameView and related classes to shrink class sizes
+ https://bugs.webkit.org/show_bug.cgi?id=194197
+
+ Reviewed by Zalan Bujtas.
+
+ Make various enums 8-bit. Re-order data members of FrameView, FrameViewLayoutContext, Widget
+ and ScrollView to optimize padding.
+
+ Use more data member initializers.
+
+ This shrinks FrameView from 1168 (144 padding bytes) to 1096 (96 padding bytes).
+
+ * dom/Element.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ * page/FrameView.h:
+ * page/FrameViewLayoutContext.h:
+ * platform/ScrollTypes.h:
+ * platform/ScrollView.h: Data members should come after member functions.
+ * platform/Widget.h:
+ * rendering/Pagination.h:
+ (WebCore::Pagination::Pagination): Deleted.
+
+2019-02-02 Simon Fraser <[email protected]>
+
Rename "scrollingLayer" in RenderLayerBacking to "scrollContainerLayer" for clarity
https://bugs.webkit.org/show_bug.cgi?id=194194
Modified: trunk/Source/WebCore/dom/Element.h (240900 => 240901)
--- trunk/Source/WebCore/dom/Element.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/dom/Element.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -70,12 +70,6 @@
SpellcheckAttributeDefault
};
-enum class SelectionRevealMode {
- Reveal,
- RevealUpToMainFrame, // Scroll overflow and iframes, but not the main frame.
- DoNotReveal
-};
-
#if ENABLE(POINTER_EVENTS)
enum class TouchAction : uint8_t;
#endif
Modified: trunk/Source/WebCore/page/FrameView.cpp (240900 => 240901)
--- trunk/Source/WebCore/page/FrameView.cpp 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/page/FrameView.cpp 2019-02-03 00:16:44 UTC (rev 240901)
@@ -183,36 +183,13 @@
FrameView::FrameView(Frame& frame)
: m_frame(frame)
- , m_canHaveScrollbars(true)
+ , m_layoutContext(*this)
, m_updateEmbeddedObjectsTimer(*this, &FrameView::updateEmbeddedObjectsTimerFired)
, m_updateWidgetPositionsTimer(*this, &FrameView::updateWidgetPositionsTimerFired)
- , m_isTransparent(false)
- , m_baseBackgroundColor(Color::white)
- , m_mediaType("screen")
- , m_overflowStatusDirty(true)
- , m_wasScrolledByUser(false)
- , m_inProgrammaticScroll(false)
, m_delayedScrollEventTimer(*this, &FrameView::sendScrollEvent)
- , m_selectionRevealModeForFocusedElement(SelectionRevealMode::DoNotReveal)
, m_delayedScrollToFocusedElementTimer(*this, &FrameView::scrollToFocusedElementTimerFired)
- , m_isTrackingRepaints(false)
- , m_shouldUpdateWhileOffscreen(true)
- , m_speculativeTilingEnabled(false)
, m_speculativeTilingEnableTimer(*this, &FrameView::speculativeTilingEnableTimerFired)
-#if PLATFORM(IOS_FAMILY)
- , m_useCustomFixedPositionLayoutRect(false)
- , m_useCustomSizeForResizeEvent(false)
-#endif
- , m_shouldAutoSize(false)
- , m_inAutoSize(false)
- , m_didRunAutosize(false)
- , m_autoSizeFixedMinimumHeight(0)
- , m_headerHeight(0)
- , m_footerHeight(0)
- , m_visualUpdatesAllowedByClient(true)
- , m_hasFlippedBlockRenderers(false)
- , m_scrollPinningBehavior(DoNotPin)
- , m_layoutContext(*this)
+ , m_mediaType("screen")
{
init();
Modified: trunk/Source/WebCore/page/FrameView.h (240900 => 240901)
--- trunk/Source/WebCore/page/FrameView.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/page/FrameView.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -66,7 +66,6 @@
class RenderWidget;
enum class FrameFlattening;
-enum class SelectionRevealMode;
Pagination::Mode paginationModeForRenderStyle(const RenderStyle&);
@@ -813,110 +812,74 @@
};
void overrideViewportSizeForCSSViewportUnits(OverrideViewportSize);
- HashSet<Widget*> m_widgetsInRenderTree;
-
static MonotonicTime sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache
- LayoutSize m_size;
- LayoutSize m_margins;
+ const Ref<Frame> m_frame;
+ FrameViewLayoutContext m_layoutContext;
+ HashSet<Widget*> m_widgetsInRenderTree;
std::unique_ptr<ListHashSet<RenderEmbeddedObject*>> m_embeddedObjectsToUpdate;
- const Ref<Frame> m_frame;
-
std::unique_ptr<HashSet<const RenderElement*>> m_slowRepaintObjects;
- bool m_canHaveScrollbars;
- bool m_cannotBlitToWindow;
- bool m_isOverlapped { false };
- bool m_contentIsOpaque;
+ RefPtr<ContainerNode> m_maintainScrollPositionAnchor;
+ RefPtr<Node> m_nodeToDraw;
+ // Renderer to hold our custom scroll corner.
+ RenderPtr<RenderScrollbarPart> m_scrollCorner;
+
Timer m_updateEmbeddedObjectsTimer;
Timer m_updateWidgetPositionsTimer;
+ Timer m_delayedScrollEventTimer;
+ Timer m_delayedScrollToFocusedElementTimer;
+ Timer m_speculativeTilingEnableTimer;
- bool m_firstLayoutCallbackPending;
+ MonotonicTime m_lastPaintTime;
- bool m_isTransparent;
-#if ENABLE(DARK_MODE_CSS)
- bool m_usesDarkAppearance { false };
-#endif
- Color m_baseBackgroundColor;
+ LayoutSize m_size;
+ LayoutSize m_margins;
+
+ Color m_baseBackgroundColor { Color::white };
IntSize m_lastViewportSize;
- float m_lastZoomFactor;
String m_mediaType;
String m_mediaTypeWhenNotPrinting;
- bool m_overflowStatusDirty;
- bool m_horizontalOverflow;
- bool m_verticalOverflow;
- enum class ViewportRendererType { None, Document, Body };
- ViewportRendererType m_viewportRendererType { ViewportRendererType::None };
-
- Pagination m_pagination;
-
- bool m_wasScrolledByUser;
- bool m_inProgrammaticScroll;
- Timer m_delayedScrollEventTimer;
- bool m_shouldScrollToFocusedElement { false };
- SelectionRevealMode m_selectionRevealModeForFocusedElement;
- Timer m_delayedScrollToFocusedElementTimer;
-
- MonotonicTime m_lastPaintTime;
-
- bool m_isTrackingRepaints; // Used for testing.
Vector<FloatRect> m_trackedRepaintRects;
+
+ IntRect* m_cachedWindowClipRect { nullptr };
+ Vector<WTF::Function<void ()>> m_postLayoutCallbackQueue;
- bool m_shouldUpdateWhileOffscreen;
-
- Optional<FloatRect> m_viewExposedRect;
-
LayoutPoint m_layoutViewportOrigin;
Optional<LayoutRect> m_layoutViewportOverrideRect;
Optional<LayoutRect> m_visualViewportOverrideRect; // Used when the iOS keyboard is showing.
- RefPtr<Node> m_nodeToDraw;
+ Optional<FloatRect> m_viewExposedRect;
+
OptionSet<PaintBehavior> m_paintBehavior;
- bool m_isPainting;
- bool m_isVisuallyNonEmpty { false };
+ float m_lastZoomFactor { 1 };
unsigned m_visuallyNonEmptyCharacterCount { 0 };
unsigned m_visuallyNonEmptyPixelCount { 0 };
-
unsigned m_textRendererCountForVisuallyNonEmptyCharacters { 0 };
- bool m_renderedSignificantAmountOfText { false };
- bool m_hasReachedSignificantRenderedTextThreshold { false };
+ int m_headerHeight { 0 };
+ int m_footerHeight { 0 };
- bool m_needsDeferredScrollbarsUpdate { false };
+#if PLATFORM(IOS_FAMILY)
+ bool m_useCustomFixedPositionLayoutRect { false };
+ bool m_useCustomSizeForResizeEvent { false };
- RefPtr<ContainerNode> m_maintainScrollPositionAnchor;
-
- // Renderer to hold our custom scroll corner.
- RenderPtr<RenderScrollbarPart> m_scrollCorner;
-
- bool m_speculativeTilingEnabled;
- Timer m_speculativeTilingEnableTimer;
-
-#if PLATFORM(IOS_FAMILY)
- bool m_useCustomFixedPositionLayoutRect;
IntRect m_customFixedPositionLayoutRect;
-
- bool m_useCustomSizeForResizeEvent;
IntSize m_customSizeForResizeEvent;
#endif
Optional<OverrideViewportSize> m_overrideViewportSize;
- // If true, automatically resize the frame view around its content.
- bool m_shouldAutoSize;
- bool m_inAutoSize;
- // True if autosize has been run since m_shouldAutoSize was set.
- bool m_didRunAutosize;
// The lower bound on the size when autosizing.
IntSize m_minAutoSize;
// The upper bound on the size when autosizing.
IntSize m_maxAutoSize;
// The fixed height to resize the view to after autosizing is complete.
- int m_autoSizeFixedMinimumHeight;
+ int m_autoSizeFixedMinimumHeight { 0 };
// The intrinsic content size decided by autosizing.
IntSize m_autoSizeContentSize;
@@ -923,9 +886,6 @@
std::unique_ptr<ScrollableAreaSet> m_scrollableAreas;
std::unique_ptr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
- int m_headerHeight;
- int m_footerHeight;
-
OptionSet<LayoutMilestone> m_milestonesPendingPaint;
static const unsigned visualCharacterThreshold = 200;
@@ -937,16 +897,51 @@
IntSize m_initialViewportSize;
#endif
- bool m_visualUpdatesAllowedByClient;
- bool m_hasFlippedBlockRenderers;
- bool m_speculativeTilingDelayDisabledForTesting { false };
+ Pagination m_pagination;
- ScrollPinningBehavior m_scrollPinningBehavior;
+ enum class ViewportRendererType : uint8_t { None, Document, Body };
+ ViewportRendererType m_viewportRendererType { ViewportRendererType::None };
+ ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin };
+ SelectionRevealMode m_selectionRevealModeForFocusedElement { SelectionRevealMode::DoNotReveal };
- IntRect* m_cachedWindowClipRect { nullptr };
- Vector<WTF::Function<void ()>> m_postLayoutCallbackQueue;
+ bool m_shouldUpdateWhileOffscreen { true };
+ bool m_overflowStatusDirty { true };
+ bool m_horizontalOverflow { false };
+ bool m_verticalOverflow { false };
+ bool m_canHaveScrollbars { true };
+ bool m_cannotBlitToWindow { false };
+ bool m_isOverlapped { false };
+ bool m_contentIsOpaque { false };
+ bool m_firstLayoutCallbackPending { false };
- FrameViewLayoutContext m_layoutContext;
+ bool m_isTransparent { false };
+#if ENABLE(DARK_MODE_CSS)
+ bool m_usesDarkAppearance { false };
+#endif
+
+ bool m_isTrackingRepaints { false }; // Used for testing.
+ bool m_wasScrolledByUser { false };
+ bool m_inProgrammaticScroll { false };
+ bool m_shouldScrollToFocusedElement { false };
+
+ bool m_isPainting { false };
+
+ bool m_isVisuallyNonEmpty { false };
+
+ bool m_renderedSignificantAmountOfText { false };
+ bool m_hasReachedSignificantRenderedTextThreshold { false };
+
+ bool m_needsDeferredScrollbarsUpdate { false };
+ bool m_speculativeTilingEnabled { false };
+ bool m_visualUpdatesAllowedByClient { true };
+ bool m_hasFlippedBlockRenderers { false };
+ bool m_speculativeTilingDelayDisabledForTesting { false };
+
+ // If true, automatically resize the frame view around its content.
+ bool m_shouldAutoSize { false };
+ bool m_inAutoSize { false };
+ // True if autosize has been run since m_shouldAutoSize was set.
+ bool m_didRunAutosize { false };
};
inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size)
Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.h (240900 => 240901)
--- trunk/Source/WebCore/page/FrameViewLayoutContext.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/page/FrameViewLayoutContext.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -64,7 +64,7 @@
void disableSetNeedsLayout();
void enableSetNeedsLayout();
- enum class LayoutPhase {
+ enum class LayoutPhase : uint8_t {
OutsideLayout,
InPreLayout,
InRenderTreeLayout,
@@ -158,6 +158,7 @@
FrameView& m_frameView;
Timer m_layoutTimer;
Timer m_asynchronousTasksTimer;
+ WeakPtr<RenderElement> m_subtreeLayoutRoot;
bool m_layoutSchedulingIsEnabled { true };
bool m_delayedLayout { false };
@@ -166,14 +167,13 @@
bool m_inAsynchronousTasks { false };
bool m_setNeedsLayoutWasDeferred { false };
LayoutPhase m_layoutPhase { LayoutPhase::OutsideLayout };
- enum class LayoutNestedState { NotInLayout, NotNested, Nested };
+ enum class LayoutNestedState : uint8_t { NotInLayout, NotNested, Nested };
LayoutNestedState m_layoutNestedState { LayoutNestedState::NotInLayout };
unsigned m_layoutCount { 0 };
unsigned m_disableSetNeedsLayoutCount { 0 };
int m_layoutDisallowedCount { 0 };
- WeakPtr<RenderElement> m_subtreeLayoutRoot;
+ unsigned m_paintOffsetCacheDisableCount { 0 };
LayoutStateStack m_layoutStateStack;
- unsigned m_paintOffsetCacheDisableCount { 0 };
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/ScrollTypes.h (240900 => 240901)
--- trunk/Source/WebCore/platform/ScrollTypes.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/platform/ScrollTypes.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollTypes_h
-#define ScrollTypes_h
+#pragma once
#include <cstdint>
#include <wtf/Assertions.h>
@@ -111,24 +110,38 @@
ScrollByPixel
};
-enum ScrollElasticity {
+enum ScrollElasticity : uint8_t {
ScrollElasticityAutomatic,
ScrollElasticityNone,
ScrollElasticityAllowed
};
-enum ScrollbarOrientation { HorizontalScrollbar, VerticalScrollbar };
+enum ScrollbarOrientation : uint8_t {
+ HorizontalScrollbar,
+ VerticalScrollbar
+};
-enum ScrollbarMode { ScrollbarAuto, ScrollbarAlwaysOff, ScrollbarAlwaysOn };
+enum ScrollbarMode : uint8_t {
+ ScrollbarAuto,
+ ScrollbarAlwaysOff,
+ ScrollbarAlwaysOn
+};
-enum ScrollbarControlSize { RegularScrollbar, SmallScrollbar };
+enum ScrollbarControlSize : uint8_t {
+ RegularScrollbar,
+ SmallScrollbar
+};
-enum class ScrollbarExpansionState { Regular, Expanded };
+enum class ScrollbarExpansionState : uint8_t {
+ Regular,
+ Expanded
+};
-enum class ScrollEventAxis { Horizontal, Vertical };
+enum class ScrollEventAxis : uint8_t {
+ Horizontal,
+ Vertical
+};
-typedef unsigned ScrollbarControlState;
-
enum ScrollbarControlStateMask {
ActiveScrollbarState = 1,
EnabledScrollbarState = 1 << 1,
@@ -149,7 +162,7 @@
AllParts = 0xffffffff
};
-enum ScrollbarButtonsPlacement {
+enum ScrollbarButtonsPlacement : uint8_t {
ScrollbarButtonsNone,
ScrollbarButtonsSingle,
ScrollbarButtonsDoubleStart,
@@ -157,36 +170,34 @@
ScrollbarButtonsDoubleBoth
};
-enum class ScrollbarStyle {
+enum class ScrollbarStyle : uint8_t {
AlwaysVisible,
Overlay
};
-enum ScrollbarOverlayStyle {
+enum ScrollbarOverlayStyle: uint8_t {
ScrollbarOverlayStyleDefault,
ScrollbarOverlayStyleDark,
ScrollbarOverlayStyleLight
};
-typedef unsigned ScrollbarControlPartMask;
-
-enum ScrollPinningBehavior {
+enum ScrollPinningBehavior : uint8_t {
DoNotPin,
PinToTop,
PinToBottom
};
-enum class ScrollClamping {
+enum class ScrollClamping : uint8_t {
Unclamped,
Clamped
};
-enum ScrollBehaviorForFixedElements {
+enum ScrollBehaviorForFixedElements : uint8_t {
StickToDocumentBounds,
StickToViewportBounds
};
-enum class ScrollbarButtonPressAction {
+enum class ScrollbarButtonPressAction : uint8_t {
None,
CenterOnThumb,
StartDrag,
@@ -193,8 +204,14 @@
Scroll
};
+enum class SelectionRevealMode : uint8_t {
+ Reveal,
+ RevealUpToMainFrame, // Scroll overflow and iframes, but not the main frame.
+ DoNotReveal
+};
+
+using ScrollbarControlState = unsigned;
+using ScrollbarControlPartMask = unsigned;
using ScrollingNodeID = uint64_t;
-}
-
-#endif
+} // namespace WebCore
Modified: trunk/Source/WebCore/platform/ScrollView.h (240900 => 240901)
--- trunk/Source/WebCore/platform/ScrollView.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/platform/ScrollView.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -427,7 +427,15 @@
virtual void unobscuredContentSizeChanged() = 0;
#endif
+#if PLATFORM(COCOA) && defined __OBJC__
+public:
+ WEBCORE_EXPORT NSView* documentView() const;
+
private:
+ NSScrollView<WebCoreFrameScrollView>* scrollView() const;
+#endif
+
+private:
// Size available for view contents, excluding content insets. Not affected by zooming.
IntSize sizeForUnobscuredContent(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
@@ -440,6 +448,39 @@
bool isScrollView() const final { return true; }
+ void init();
+ void destroy();
+
+ IntRect rectToCopyOnScroll() const;
+
+ // Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
+ virtual void updateLayerPositionsAfterScrolling() = 0;
+ virtual void updateCompositingLayersAfterScrolling() = 0;
+
+ void platformAddChild(Widget*);
+ void platformRemoveChild(Widget*);
+ void platformSetScrollbarModes();
+ void platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode& vertical) const;
+ void platformSetCanBlitOnScroll(bool);
+ bool platformCanBlitOnScroll() const;
+ IntRect platformVisibleContentRect(bool includeScrollbars) const;
+ IntSize platformVisibleContentSize(bool includeScrollbars) const;
+ IntRect platformVisibleContentRectIncludingObscuredArea(bool includeScrollbars) const;
+ IntSize platformVisibleContentSizeIncludingObscuredArea(bool includeScrollbars) const;
+ void platformSetContentsSize();
+ IntRect platformContentsToScreen(const IntRect&) const;
+ IntPoint platformScreenToContents(const IntPoint&) const;
+ void platformSetScrollPosition(const IntPoint&);
+ bool platformScroll(ScrollDirection, ScrollGranularity);
+ void platformSetScrollbarsSuppressed(bool repaintOnUnsuppress);
+ void platformRepaintContentRectangle(const IntRect&);
+ bool platformIsOffscreen() const;
+ void platformSetScrollbarOverlayStyle(ScrollbarOverlayStyle);
+ void platformSetScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updatePositionSynchronously);
+
+ void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
+ void updateOverhangAreas();
+
HashSet<Ref<Widget>> m_children;
RefPtr<Scrollbar> m_horizontalScrollbar;
@@ -466,6 +507,8 @@
IntPoint m_panScrollIconPoint;
+ unsigned m_updateScrollbarsPass { 0 };
+
bool m_horizontalScrollbarLock { false };
bool m_verticalScrollbarLock { false };
@@ -477,9 +520,7 @@
bool m_canBlitOnScroll { true };
bool m_scrollbarsSuppressed { false };
-
bool m_inUpdateScrollbars { false };
- unsigned m_updateScrollbarsPass { 0 };
bool m_drawPanScrollIcon { false };
bool m_useFixedLayout { false };
@@ -486,49 +527,6 @@
bool m_paintsEntireContents { false };
bool m_delegatesScrolling { false };
-
-
- void init();
- void destroy();
-
- IntRect rectToCopyOnScroll() const;
-
- // Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
- virtual void updateLayerPositionsAfterScrolling() = 0;
- virtual void updateCompositingLayersAfterScrolling() = 0;
-
- void platformAddChild(Widget*);
- void platformRemoveChild(Widget*);
- void platformSetScrollbarModes();
- void platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode& vertical) const;
- void platformSetCanBlitOnScroll(bool);
- bool platformCanBlitOnScroll() const;
- IntRect platformVisibleContentRect(bool includeScrollbars) const;
- IntSize platformVisibleContentSize(bool includeScrollbars) const;
- IntRect platformVisibleContentRectIncludingObscuredArea(bool includeScrollbars) const;
- IntSize platformVisibleContentSizeIncludingObscuredArea(bool includeScrollbars) const;
- void platformSetContentsSize();
- IntRect platformContentsToScreen(const IntRect&) const;
- IntPoint platformScreenToContents(const IntPoint&) const;
- void platformSetScrollPosition(const IntPoint&);
- bool platformScroll(ScrollDirection, ScrollGranularity);
- void platformSetScrollbarsSuppressed(bool repaintOnUnsuppress);
- void platformRepaintContentRectangle(const IntRect&);
- bool platformIsOffscreen() const;
- void platformSetScrollbarOverlayStyle(ScrollbarOverlayStyle);
-
- void platformSetScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updatePositionSynchronously);
-
- void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
- void updateOverhangAreas();
-
-#if PLATFORM(COCOA) && defined __OBJC__
-public:
- WEBCORE_EXPORT NSView* documentView() const;
-
-private:
- NSScrollView<WebCoreFrameScrollView>* scrollView() const;
-#endif
}; // class ScrollView
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/Widget.h (240900 => 240901)
--- trunk/Source/WebCore/platform/Widget.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/platform/Widget.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -205,6 +205,9 @@
static IntPoint convertFromContainingWindowToRoot(const Widget* rootWidget, const IntPoint&);
private:
+ bool m_selfVisible { false };
+ bool m_parentVisible { false };
+
WeakPtr<ScrollView> m_parent;
#if !PLATFORM(COCOA)
PlatformWidget m_widget;
@@ -211,8 +214,6 @@
#else
RetainPtr<NSView> m_widget;
#endif
- bool m_selfVisible;
- bool m_parentVisible;
IntRect m_frame; // Not used when a native widget exists.
};
Modified: trunk/Source/WebCore/rendering/Pagination.h (240900 => 240901)
--- trunk/Source/WebCore/rendering/Pagination.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebCore/rendering/Pagination.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -28,15 +28,9 @@
namespace WebCore {
struct Pagination {
- enum Mode { Unpaginated, LeftToRightPaginated, RightToLeftPaginated, TopToBottomPaginated, BottomToTopPaginated };
+ enum Mode : uint8_t { Unpaginated, LeftToRightPaginated, RightToLeftPaginated, TopToBottomPaginated, BottomToTopPaginated };
- Pagination()
- : mode(Unpaginated)
- , behavesLikeColumns(false)
- , pageLength(0)
- , gap(0)
- {
- };
+ Pagination() = default;
bool operator==(const Pagination& other) const
{
@@ -48,10 +42,10 @@
return mode != other.mode || behavesLikeColumns != other.behavesLikeColumns || pageLength != other.pageLength || gap != other.gap;
}
- Mode mode;
- bool behavesLikeColumns;
- unsigned pageLength;
- unsigned gap;
+ Mode mode { Unpaginated };
+ bool behavesLikeColumns { false };
+ unsigned pageLength { 0 };
+ unsigned gap { 0 };
};
} // namespace WebCore
Modified: trunk/Source/WebKit/ChangeLog (240900 => 240901)
--- trunk/Source/WebKit/ChangeLog 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebKit/ChangeLog 2019-02-03 00:16:44 UTC (rev 240901)
@@ -1,3 +1,12 @@
+2019-02-02 Simon Fraser <[email protected]>
+
+ Tidy up data memebers of FrameView and related classes to shrink class sizes
+ https://bugs.webkit.org/show_bug.cgi?id=194197
+
+ Reviewed by Zalan Bujtas.
+
+ * UIProcess/PageClient.h: Declare enum size.
+
2018-12-16 Darin Adler <[email protected]>
Convert additional String::format clients to alternative approaches
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (240900 => 240901)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2019-02-02 20:20:36 UTC (rev 240900)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2019-02-03 00:16:44 UTC (rev 240901)
@@ -83,7 +83,7 @@
class WebMediaSessionManager;
enum class RouteSharingPolicy : uint8_t;
-enum class ScrollbarStyle;
+enum class ScrollbarStyle : uint8_t;
enum class TextIndicatorWindowLifetime : uint8_t;
enum class TextIndicatorWindowDismissalAnimation : uint8_t;