<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[260052] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/260052">260052</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2020-04-13 17:47:00 -0700 (Mon, 13 Apr 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add ENABLE_CUSTOM_SCROLLBARS and define it for macOS and for non-Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=210460

Reviewed by Tim Horton.

Source/WebCore:

Wrap all custom scrollbar and custom scroll corner code in ENABLE(CUSTOM_SCROLLBARS).

* page/FrameView.cpp:
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::updateScrollCorner):
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock const):
* rendering/RenderObject.h:
* rendering/RenderScrollbar.cpp:
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
* rendering/RenderScrollbarTheme.cpp:
* rendering/RenderScrollbarTheme.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderTextControlSingleLine.cpp:
* style/StyleResolver.cpp:

Source/WTF:

Define ENABLE_CUSTOM_SCROLLBARS for PLATFORM(MAC) and other non-Cocoa platforms.

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformEnableh">trunk/Source/WTF/wtf/PlatformEnable.h</a></li>
<li><a href="#trunkSourceWTFwtfPlatformEnableCocoah">trunk/Source/WTF/wtf/PlatformEnableCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarcpp">trunk/Source/WebCore/rendering/RenderScrollbar.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarh">trunk/Source/WebCore/rendering/RenderScrollbar.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarPartcpp">trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarParth">trunk/Source/WebCore/rendering/RenderScrollbarPart.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarThemecpp">trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarThemeh">trunk/Source/WebCore/rendering/RenderScrollbarTheme.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSearchFieldcpp">trunk/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlSingleLinecpp">trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolvercpp">trunk/Source/WebCore/style/StyleResolver.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WTF/ChangeLog  2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2020-04-13  Simon Fraser  <simon.fraser@apple.com>
+
+        Add ENABLE_CUSTOM_SCROLLBARS and define it for macOS and for non-Cocoa platforms
+        https://bugs.webkit.org/show_bug.cgi?id=210460
+
+        Reviewed by Tim Horton.
+
+        Define ENABLE_CUSTOM_SCROLLBARS for PLATFORM(MAC) and other non-Cocoa platforms.
+
+        * wtf/PlatformEnable.h:
+        * wtf/PlatformEnableCocoa.h:
+
</ins><span class="cx"> 2020-04-13  David Kilzer  <ddkilzer@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformEnableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformEnable.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformEnable.h    2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WTF/wtf/PlatformEnable.h       2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -835,6 +835,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(ENABLE_CUSTOM_SCROLLBARS)
+#define ENABLE_CUSTOM_SCROLLBARS 1
+#endif
+
</ins><span class="cx"> /* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code
</span><span class="cx">    that executes each opcode. It cannot be supported by the CLoop since there's no way to embed the
</span><span class="cx">    OpcodeID word in the CLoop's switch statement cases. It is also currently not implemented for MSVC.
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformEnableCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h       2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h  2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -211,6 +211,10 @@
</span><span class="cx"> #define ENABLE_ASYNC_SCROLLING 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(ENABLE_CUSTOM_SCROLLBARS) && PLATFORM(MAC)
+#define ENABLE_CUSTOM_SCROLLBARS 1
+#endif
+
</ins><span class="cx"> #if !defined(ENABLE_SCROLLING_THREAD) && PLATFORM(MAC)
</span><span class="cx"> #define ENABLE_SCROLLING_THREAD 1
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/ChangeLog      2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2020-04-13  Simon Fraser  <simon.fraser@apple.com>
+
+        Add ENABLE_CUSTOM_SCROLLBARS and define it for macOS and for non-Cocoa platforms
+        https://bugs.webkit.org/show_bug.cgi?id=210460
+
+        Reviewed by Tim Horton.
+
+        Wrap all custom scrollbar and custom scroll corner code in ENABLE(CUSTOM_SCROLLBARS).
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::createScrollbar):
+        (WebCore::FrameView::updateScrollCorner):
+        * page/FrameView.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::createScrollbar):
+        (WebCore::RenderLayer::calculateClipRects const):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLayerCompositor.cpp:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::createScrollbar):
+        * rendering/RenderMenuList.cpp:
+        (RenderMenuList::createScrollbar):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::containingBlock const):
+        * rendering/RenderObject.h:
+        * rendering/RenderScrollbar.cpp:
+        * rendering/RenderScrollbar.h:
+        * rendering/RenderScrollbarPart.cpp:
+        * rendering/RenderScrollbarPart.h:
+        * rendering/RenderScrollbarTheme.cpp:
+        * rendering/RenderScrollbarTheme.h:
+        * rendering/RenderSearchField.cpp:
+        (WebCore::RenderSearchField::createScrollbar):
+        * rendering/RenderTextControlSingleLine.cpp:
+        * style/StyleResolver.cpp:
+
</ins><span class="cx"> 2020-04-13  Kenneth Russell  <kbr@chromium.org>
</span><span class="cx"> 
</span><span class="cx">         Clean up more resources during WebGLLayer teardown
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp  2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/page/FrameView.cpp     2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -554,6 +554,7 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     if (auto element = rootElementForCustomScrollbarPartStyle(PseudoId::Scrollbar))
</span><span class="cx">         return RenderScrollbar::createCustomScrollbar(*this, orientation, element.get());
</span><span class="cx">     
</span><span class="lines">@@ -562,6 +563,7 @@
</span><span class="cx">     RenderWidget* frameRenderer = frame().ownerRenderer();
</span><span class="cx">     if (frameRenderer && frameRenderer->style().hasPseudoStyle(PseudoId::Scrollbar))
</span><span class="cx">         return RenderScrollbar::createCustomScrollbar(*this, orientation, nullptr, &frame());
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // Nobody set a custom style, so we just use a native scrollbar.
</span><span class="cx">     return ScrollView::createScrollbar(orientation);
</span><span class="lines">@@ -3949,6 +3951,7 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::updateScrollCorner()
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     RenderElement* renderer = nullptr;
</span><span class="cx">     std::unique_ptr<RenderStyle> cornerStyle;
</span><span class="cx">     IntRect cornerRect = scrollCornerRect();
</span><span class="lines">@@ -3989,6 +3992,7 @@
</span><span class="cx">             m_scrollCorner->setStyle(WTFMove(*cornerStyle));
</span><span class="cx">         invalidateScrollCorner(cornerRect);
</span><span class="cx">     }
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h    2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/page/FrameView.h       2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -502,7 +502,9 @@
</span><span class="cx">     WEBCORE_EXPORT FloatRect clientToLayoutViewportRect(FloatRect) const;
</span><span class="cx">     WEBCORE_EXPORT FloatPoint clientToLayoutViewportPoint(FloatPoint) const;
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     bool isFrameViewScrollCorner(const RenderScrollbarPart& scrollCorner) const { return m_scrollCorner.get() == &scrollCorner; }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // isScrollable() takes an optional Scrollability parameter that allows the caller to define what they mean by 'scrollable.'
</span><span class="cx">     // Most callers are interested in the default value, Scrollability::Scrollable, which means that there is actually content
</span><span class="lines">@@ -841,8 +843,10 @@
</span><span class="cx">     RefPtr<ContainerNode> m_maintainScrollPositionAnchor;
</span><span class="cx">     RefPtr<Node> m_nodeToDraw;
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     // Renderer to hold our custom scroll corner.
</span><span class="cx">     RenderPtr<RenderScrollbarPart> m_scrollCorner;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     Timer m_updateEmbeddedObjectsTimer;
</span><span class="cx">     Timer m_updateWidgetPositionsTimer;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp   2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp      2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -3489,11 +3489,14 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr<Scrollbar> widget;
</span><span class="cx">     ASSERT(rendererForScrollbar(renderer()));
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     auto& actualRenderer = *rendererForScrollbar(renderer());
</span><span class="cx">     bool hasCustomScrollbarStyle = is<RenderBox>(actualRenderer) && downcast<RenderBox>(actualRenderer).style().hasPseudoStyle(PseudoId::Scrollbar);
</span><span class="cx">     if (hasCustomScrollbarStyle)
</span><span class="cx">         widget = RenderScrollbar::createCustomScrollbar(*this, orientation, downcast<RenderBox>(actualRenderer).element());
</span><del>-    else {
</del><ins>+    else
+#endif
+    {
</ins><span class="cx">         widget = Scrollbar::createNativeScrollbar(*this, orientation, RegularScrollbar);
</span><span class="cx">         didAddScrollbar(widget.get(), orientation);
</span><span class="cx">         if (page().isMonitoringWheelEvents())
</span><span class="lines">@@ -6811,6 +6814,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::updateScrollCornerStyle()
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     RenderElement* actualRenderer = rendererForScrollbar(renderer());
</span><span class="cx">     auto corner = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle({ PseudoId::ScrollbarCorner }, &actualRenderer->style()) : nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -6826,18 +6830,23 @@
</span><span class="cx">         m_scrollCorner->initializeStyle();
</span><span class="cx">     } else
</span><span class="cx">         m_scrollCorner->setStyle(WTFMove(*corner));
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::clearScrollCorner()
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     if (!m_scrollCorner)
</span><span class="cx">         return;
</span><span class="cx">     m_scrollCorner->setParent(nullptr);
</span><span class="cx">     m_scrollCorner = nullptr;
</span><ins>+#endif
+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::updateResizerStyle()
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     RenderElement* actualRenderer = rendererForScrollbar(renderer());
</span><span class="cx">     auto resizer = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle({ PseudoId::Resizer }, &actualRenderer->style()) : nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -6853,14 +6862,17 @@
</span><span class="cx">         m_resizer->initializeStyle();
</span><span class="cx">     } else
</span><span class="cx">         m_resizer->setStyle(WTFMove(*resizer));
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::clearResizer()
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     if (!m_resizer)
</span><span class="cx">         return;
</span><span class="cx">     m_resizer->setParent(nullptr);
</span><span class="cx">     m_resizer = nullptr;
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderLayer* RenderLayer::reflectionLayer() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h     2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -77,12 +77,15 @@
</span><span class="cx"> class RenderLayerFilters;
</span><span class="cx"> class RenderMarquee;
</span><span class="cx"> class RenderReplica;
</span><del>-class RenderScrollbarPart;
</del><span class="cx"> class RenderStyle;
</span><span class="cx"> class RenderView;
</span><span class="cx"> class Scrollbar;
</span><span class="cx"> class TransformationMatrix;
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+class RenderScrollbarPart;
+#endif
+
</ins><span class="cx"> enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelfForBorderRadius };
</span><span class="cx"> enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf };
</span><span class="cx"> enum CrossFrameBoundaries { No, Yes };
</span><span class="lines">@@ -1350,9 +1353,11 @@
</span><span class="cx">     // May ultimately be extended to many replicas (with their own paint order).
</span><span class="cx">     RenderPtr<RenderReplica> m_reflection;
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     // Renderers to hold our custom scroll corner and resizer.
</span><span class="cx">     RenderPtr<RenderScrollbarPart> m_scrollCorner;
</span><span class="cx">     RenderPtr<RenderScrollbarPart> m_resizer;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // Pointer to the enclosing RenderLayer that caused us to be paginated. It is 0 if we are not paginated.
</span><span class="cx">     WeakPtr<RenderLayer> m_enclosingPaginationLayer;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp    2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -76,7 +76,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx"> #include "LegacyTileCache.h"
</span><del>-#include "RenderScrollbar.h"
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp    2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -918,10 +918,13 @@
</span><span class="cx"> Ref<Scrollbar> RenderListBox::createScrollbar()
</span><span class="cx"> {
</span><span class="cx">     RefPtr<Scrollbar> widget;
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar);
</span><span class="cx">     if (hasCustomScrollbarStyle)
</span><span class="cx">         widget = RenderScrollbar::createCustomScrollbar(*this, VerticalScrollbar, &selectElement());
</span><del>-    else {
</del><ins>+    else
+#endif
+    {
</ins><span class="cx">         widget = Scrollbar::createNativeScrollbar(*this, VerticalScrollbar, theme().scrollbarControlSizeForPart(ListboxPart));
</span><span class="cx">         didAddScrollbar(widget.get(), VerticalScrollbar);
</span><span class="cx">         if (page().isMonitoringWheelEvents())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp        2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp   2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -560,9 +560,11 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<Scrollbar> RenderMenuList::createScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar);
</span><span class="cx">     if (hasCustomScrollbarStyle)
</span><span class="cx">         return RenderScrollbar::createCustomScrollbar(scrollableArea, orientation, &selectElement());
</span><ins>+#endif
</ins><span class="cx">     return Scrollbar::createNativeScrollbar(scrollableArea, orientation, controlSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp  2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp     2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -632,11 +632,13 @@
</span><span class="cx">     if (is<RenderText>(*this))
</span><span class="cx">         return containingBlockForObjectInFlow();
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     if (!parent() && is<RenderScrollbarPart>(*this)) {
</span><span class="cx">         if (auto* scrollbarPart = downcast<RenderScrollbarPart>(*this).rendererOwningScrollbar())
</span><span class="cx">             return containingBlockForRenderer(*scrollbarPart);
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><ins>+#endif
</ins><span class="cx">     return containingBlockForRenderer(downcast<RenderElement>(*this));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h    2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderObject.h       2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -265,7 +265,9 @@
</span><span class="cx">     virtual bool isRenderMultiColumnFlow() const { return false; }
</span><span class="cx">     virtual bool isRenderMultiColumnSpannerPlaceholder() const { return false; }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     virtual bool isRenderScrollbarPart() const { return false; }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     bool isDocumentElementRenderer() const { return document().documentElement() == &m_node; }
</span><span class="cx">     bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbar.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbar.cpp       2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbar.cpp  2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderScrollbar.h"
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "RenderScrollbarPart.h"
</span><span class="lines">@@ -367,3 +369,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span><ins>+
+#endif // ENABLE(CUSTOM_SCROLLBARS)
+
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbar.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbar.h 2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbar.h    2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> #include "Scrollbar.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Frame;
</span><span class="lines">@@ -94,3 +96,5 @@
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::RenderScrollbar)
</span><span class="cx">     static bool isType(const WebCore::Scrollbar& scrollbar) { return scrollbar.isCustomScrollbar(); }
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_END()
</span><ins>+
+#endif // ENABLE(CUSTOM_SCROLLBARS)
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarPartcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp   2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp      2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderScrollbarPart.h"
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> #include "PaintInfo.h"
</span><span class="cx"> #include "RenderScrollbar.h"
</span><span class="cx"> #include "RenderScrollbarTheme.h"
</span><span class="lines">@@ -201,3 +203,4 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span><ins>+#endif // ENABLE(CUSTOM_SCROLLBARS)
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarParth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbarPart.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbarPart.h     2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbarPart.h        2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> #include "RenderBlock.h"
</span><span class="cx"> #include "ScrollTypes.h"
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class RenderScrollbar;
</span><span class="lines">@@ -76,3 +78,5 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderScrollbarPart, isRenderScrollbarPart())
</span><ins>+
+#endif // ENABLE(CUSTOM_SCROLLBARS)
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp  2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp     2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -25,6 +25,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderScrollbarTheme.h"
</span><ins>+
+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> #include "RenderScrollbar.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="lines">@@ -162,3 +165,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span><ins>+
+#endif // ENABLE(CUSTOM_SCROLLBARS)
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbarTheme.h (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbarTheme.h    2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderScrollbarTheme.h       2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -27,6 +27,8 @@
</span><span class="cx"> 
</span><span class="cx"> #include "ScrollbarThemeComposite.h"
</span><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class PlatformMouseEvent;
</span><span class="lines">@@ -81,3 +83,5 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // ENABLE(CUSTOM_SCROLLBARS)
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.cpp     2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderSearchField.cpp        2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -359,9 +359,11 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<Scrollbar> RenderSearchField::createScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_SCROLLBARS)
</ins><span class="cx">     bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar);
</span><span class="cx">     if (hasCustomScrollbarStyle)
</span><span class="cx">         return RenderScrollbar::createCustomScrollbar(scrollableArea, orientation, &inputElement());
</span><ins>+#endif
</ins><span class="cx">     return Scrollbar::createNativeScrollbar(scrollableArea, orientation, controlSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlSingleLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp   2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp      2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include "HitTestResult.h"
</span><span class="cx"> #include "LocalizedStrings.h"
</span><span class="cx"> #include "RenderLayer.h"
</span><del>-#include "RenderScrollbar.h"
</del><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "StyleResolver.h"
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolver.cpp (260051 => 260052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolver.cpp     2020-04-14 00:32:26 UTC (rev 260051)
+++ trunk/Source/WebCore/style/StyleResolver.cpp        2020-04-14 00:47:00 UTC (rev 260052)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx"> #include "NodeRenderStyle.h"
</span><span class="cx"> #include "PageRuleCollector.h"
</span><span class="cx"> #include "Pair.h"
</span><del>-#include "RenderScrollbar.h"
</del><span class="cx"> #include "RenderStyleConstants.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RuleSet.h"
</span></span></pre>
</div>
</div>

</body>
</html>