Title: [235281] trunk/Source/WebCore
- Revision
- 235281
- Author
- an...@apple.com
- Date
- 2018-08-24 00:43:44 -0700 (Fri, 24 Aug 2018)
Log Message
Use OptionSet::containsAny and containsAll in some more places
https://bugs.webkit.org/show_bug.cgi?id=188885
Reviewed by Sam Weinig.
* page/PerformanceMonitor.cpp:
(WebCore::PerformanceMonitor::activityStateChanged):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (235280 => 235281)
--- trunk/Source/WebCore/ChangeLog 2018-08-24 07:32:20 UTC (rev 235280)
+++ trunk/Source/WebCore/ChangeLog 2018-08-24 07:43:44 UTC (rev 235281)
@@ -1,3 +1,19 @@
+2018-08-24 Antti Koivisto <an...@apple.com>
+
+ Use OptionSet::containsAny and containsAll in some more places
+ https://bugs.webkit.org/show_bug.cgi?id=188885
+
+ Reviewed by Sam Weinig.
+
+ * page/PerformanceMonitor.cpp:
+ (WebCore::PerformanceMonitor::activityStateChanged):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
+ (WebCore::RenderLayer::paintLayerContents):
+ (WebCore::RenderLayer::calculateClipRects const):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::~RenderLayerBacking):
+
2018-08-23 Simon Fraser <simon.fra...@apple.com>
Add support for dumping GC heap snapshots, and a viewer
Modified: trunk/Source/WebCore/page/PerformanceMonitor.cpp (235280 => 235281)
--- trunk/Source/WebCore/page/PerformanceMonitor.cpp 2018-08-24 07:32:20 UTC (rev 235280)
+++ trunk/Source/WebCore/page/PerformanceMonitor.cpp 2018-08-24 07:43:44 UTC (rev 235281)
@@ -131,7 +131,7 @@
m_postBackgroundingMemoryUsageTimer.startOneShot(memoryUsageMeasurementDelay);
}
- if (newState & ActivityState::IsVisible && newState & ActivityState::WindowIsActive) {
+ if (newState.containsAll({ ActivityState::IsVisible, ActivityState::WindowIsActive })) {
m_processMayBecomeInactive = false;
m_processMayBecomeInactiveTimer.stop();
} else if (!m_processMayBecomeInactive && !m_processMayBecomeInactiveTimer.isActive())
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (235280 => 235281)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2018-08-24 07:32:20 UTC (rev 235280)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2018-08-24 07:43:44 UTC (rev 235281)
@@ -853,7 +853,7 @@
if (positionChanged)
flags |= HasChangedAncestor;
- if (flags & HasChangedAncestor || flags & HasSeenViewportConstrainedAncestor || flags & IsOverflowScroll)
+ if (flags.containsAny({ HasChangedAncestor, HasSeenViewportConstrainedAncestor, IsOverflowScroll }))
clearClipRects();
if (renderer().style().hasViewportConstrainedPosition())
@@ -862,7 +862,7 @@
if (renderer().hasOverflowClip())
flags |= HasSeenAncestorWithOverflowClip;
- bool shouldComputeRepaintRects = (flags & HasSeenViewportConstrainedAncestor || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip)) && isSelfPaintingLayer();
+ bool shouldComputeRepaintRects = (flags.contains(HasSeenViewportConstrainedAncestor) || flags.containsAll({ IsOverflowScroll, HasSeenAncestorWithOverflowClip })) && isSelfPaintingLayer();
bool isVisuallyEmpty = !isVisuallyNonEmpty();
bool shouldPushAndPopMappings = geometryMap && ((shouldComputeRepaintRects && !isVisuallyEmpty) || firstChild());
if (shouldPushAndPopMappings)
@@ -4456,7 +4456,7 @@
paintChildClippingMaskForFragments(layerFragments, context, paintingInfo, paintBehavior, subtreePaintRootForRenderer);
}
- if ((localPaintFlags & PaintLayerPaintingChildClippingMaskPhase)) {
+ if (localPaintFlags & PaintLayerPaintingChildClippingMaskPhase) {
// Paint the border radius mask for the fragments.
paintChildClippingMaskForFragments(layerFragments, context, paintingInfo, paintBehavior, subtreePaintRootForRenderer);
}
@@ -5771,7 +5771,7 @@
inclusionMode = IncludeCompositedPaginatedLayers;
const RenderLayer* paginationLayer = nullptr;
- if (flags & UseFragmentBoxesExcludingCompositing || flags & UseFragmentBoxesIncludingCompositing)
+ if (flags.containsAny({ UseFragmentBoxesExcludingCompositing, UseFragmentBoxesIncludingCompositing }))
paginationLayer = enclosingPaginationLayerInSubtree(ancestorLayer, inclusionMode);
const RenderLayer* childLayer = this;
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (235280 => 235281)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-08-24 07:32:20 UTC (rev 235280)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-08-24 07:43:44 UTC (rev 235281)
@@ -245,7 +245,7 @@
updateBackgroundLayer(false);
updateMaskingLayer(false, false);
updateScrollingLayers(false);
- detachFromScrollingCoordinator({Scrolling, ViewportConstrained });
+ detachFromScrollingCoordinator({ Scrolling, ViewportConstrained });
destroyGraphicsLayers();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes