Title: [270250] trunk/Source/WebCore
Revision
270250
Author
[email protected]
Date
2020-11-30 10:13:14 -0800 (Mon, 30 Nov 2020)

Log Message

RenderTheme::paintDecorations should return void
https://bugs.webkit.org/show_bug.cgi?id=219357

Reviewed by Simon Fraser.

RenderTheme::paintDecorations currently returns a boolean value.
However, the returned value is unused. For clarity, the method is
updated to return void. The various "paint*Decorations" methods
called in RenderTheme:paintDecorations are also updated to return void.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintFileUploadIconDecorations):
(WebCore::RenderTheme::paintCheckboxDecorations):
(WebCore::RenderTheme::paintRadioDecorations):
(WebCore::RenderTheme::paintButtonDecorations):
(WebCore::RenderTheme::paintTextFieldDecorations):
(WebCore::RenderTheme::paintTextAreaDecorations):
(WebCore::RenderTheme::paintMenuListDecorations):
(WebCore::RenderTheme::paintMenuListButtonDecorations):
(WebCore::RenderTheme::paintPushButtonDecorations):
(WebCore::RenderTheme::paintSquareButtonDecorations):
(WebCore::RenderTheme::paintSliderThumbDecorations):
(WebCore::RenderTheme::paintSearchFieldDecorations):
* rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::paintMenuListButtonDecorations):
* rendering/RenderThemeAdwaita.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintCheckboxDecorations):
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderThumbDecorations):
(WebCore::RenderThemeIOS::paintSearchFieldDecorations):
(WebCore::RenderThemeIOS::paintButtonDecorations):
(WebCore::RenderThemeIOS::paintPushButtonDecorations):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMenuList):
(WebCore::RenderThemeWin::paintMenuListButtonDecorations):
* rendering/RenderThemeWin.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270249 => 270250)


--- trunk/Source/WebCore/ChangeLog	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/ChangeLog	2020-11-30 18:13:14 UTC (rev 270250)
@@ -1,3 +1,53 @@
+2020-11-30  Aditya Keerthi  <[email protected]>
+
+        RenderTheme::paintDecorations should return void
+        https://bugs.webkit.org/show_bug.cgi?id=219357
+
+        Reviewed by Simon Fraser.
+
+        RenderTheme::paintDecorations currently returns a boolean value.
+        However, the returned value is unused. For clarity, the method is
+        updated to return void. The various "paint*Decorations" methods
+        called in RenderTheme:paintDecorations are also updated to return void.
+
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::paintDecorations):
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::paintFileUploadIconDecorations):
+        (WebCore::RenderTheme::paintCheckboxDecorations):
+        (WebCore::RenderTheme::paintRadioDecorations):
+        (WebCore::RenderTheme::paintButtonDecorations):
+        (WebCore::RenderTheme::paintTextFieldDecorations):
+        (WebCore::RenderTheme::paintTextAreaDecorations):
+        (WebCore::RenderTheme::paintMenuListDecorations):
+        (WebCore::RenderTheme::paintMenuListButtonDecorations):
+        (WebCore::RenderTheme::paintPushButtonDecorations):
+        (WebCore::RenderTheme::paintSquareButtonDecorations):
+        (WebCore::RenderTheme::paintSliderThumbDecorations):
+        (WebCore::RenderTheme::paintSearchFieldDecorations):
+        * rendering/RenderThemeAdwaita.cpp:
+        (WebCore::RenderThemeAdwaita::paintMenuListButtonDecorations):
+        * rendering/RenderThemeAdwaita.h:
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::paintCheckboxDecorations):
+        (WebCore::RenderThemeIOS::paintRadioDecorations):
+        (WebCore::RenderThemeIOS::paintTextFieldDecorations):
+        (WebCore::RenderThemeIOS::paintTextAreaDecorations):
+        (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
+        (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
+        (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
+        (WebCore::RenderThemeIOS::paintButtonDecorations):
+        (WebCore::RenderThemeIOS::paintPushButtonDecorations):
+        (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::paintMenuList):
+        (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
+        * rendering/RenderThemeWin.h:
+
 2020-11-30  Tyler Wilcock  <[email protected]>
 
         getComputedStyle rounds lineHeight to nearest pixel

Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2020-11-30 18:13:14 UTC (rev 270250)
@@ -490,10 +490,10 @@
 #endif
 }
 
-bool RenderTheme::paintDecorations(const RenderBox& box, const PaintInfo& paintInfo, const LayoutRect& rect)
+void RenderTheme::paintDecorations(const RenderBox& box, const PaintInfo& paintInfo, const LayoutRect& rect)
 {
     if (paintInfo.context().paintingDisabled())
-        return false;
+        return;
 
     IntRect integralSnappedRect = snappedIntRect(rect);
     FloatRect devicePixelSnappedRect = snapRectToDevicePixels(rect, box.document().deviceScaleFactor());
@@ -501,31 +501,42 @@
     // Call the appropriate paint method based off the appearance value.
     switch (box.style().appearance()) {
     case MenulistButtonPart:
-        return paintMenuListButtonDecorations(box, paintInfo, devicePixelSnappedRect);
+        paintMenuListButtonDecorations(box, paintInfo, devicePixelSnappedRect);
+        break;
     case TextFieldPart:
-        return paintTextFieldDecorations(box, paintInfo, devicePixelSnappedRect);
+        paintTextFieldDecorations(box, paintInfo, devicePixelSnappedRect);
+        break;
     case TextAreaPart:
-        return paintTextAreaDecorations(box, paintInfo, devicePixelSnappedRect);
+        paintTextAreaDecorations(box, paintInfo, devicePixelSnappedRect);
+        break;
     case CheckboxPart:
-        return paintCheckboxDecorations(box, paintInfo, integralSnappedRect);
+        paintCheckboxDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case RadioPart:
-        return paintRadioDecorations(box, paintInfo, integralSnappedRect);
+        paintRadioDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case PushButtonPart:
-        return paintPushButtonDecorations(box, paintInfo, integralSnappedRect);
+        paintPushButtonDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case SquareButtonPart:
-        return paintSquareButtonDecorations(box, paintInfo, integralSnappedRect);
+        paintSquareButtonDecorations(box, paintInfo, integralSnappedRect);
+        break;
 #if ENABLE(INPUT_TYPE_COLOR)
     case ColorWellPart:
 #endif
     case ButtonPart:
-        return paintButtonDecorations(box, paintInfo, integralSnappedRect);
+        paintButtonDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case MenulistPart:
-        return paintMenuListDecorations(box, paintInfo, integralSnappedRect);
+        paintMenuListDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case SliderThumbHorizontalPart:
     case SliderThumbVerticalPart:
-        return paintSliderThumbDecorations(box, paintInfo, integralSnappedRect);
+        paintSliderThumbDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case SearchFieldPart:
-        return paintSearchFieldDecorations(box, paintInfo, integralSnappedRect);
+        paintSearchFieldDecorations(box, paintInfo, integralSnappedRect);
+        break;
     case MeterPart:
     case RelevancyLevelIndicatorPart:
     case ContinuousCapacityLevelIndicatorPart:
@@ -546,8 +557,6 @@
     default:
         break;
     }
-
-    return false;
 }
 
 #if ENABLE(VIDEO)

Modified: trunk/Source/WebCore/rendering/RenderTheme.h (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderTheme.h	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderTheme.h	2020-11-30 18:13:14 UTC (rev 270250)
@@ -72,7 +72,7 @@
     // whether the CSS border/background should also be painted.
     bool paint(const RenderBox&, ControlStates&, const PaintInfo&, const LayoutRect&);
     bool paintBorderOnly(const RenderBox&, const PaintInfo&, const LayoutRect&);
-    bool paintDecorations(const RenderBox&, const PaintInfo&, const LayoutRect&);
+    void paintDecorations(const RenderBox&, const PaintInfo&, const LayoutRect&);
 
     // The remaining methods should be implemented by the platform-specific portion of the theme, e.g.,
     // RenderThemeMac.cpp for Mac OS X.
@@ -236,7 +236,7 @@
     virtual String fileListNameForWidth(const FileList*, const FontCascade&, int width, bool multipleFilesAllowed) const;
 
     enum FileUploadDecorations { SingleFile, MultipleFiles };
-    virtual bool paintFileUploadIconDecorations(const RenderObject& /*inputRenderer*/, const RenderObject& /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { return true; }
+    virtual void paintFileUploadIconDecorations(const RenderObject& /*inputRenderer*/, const RenderObject& /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { }
 
 #if ENABLE(SERVICE_CONTROLS)
     virtual IntSize imageControlsButtonSize(const RenderObject&) const { return IntSize(); }
@@ -298,27 +298,27 @@
     virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 #endif
 
-    virtual bool paintCheckboxDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual bool paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual bool paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+    virtual void paintCheckboxDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
+    virtual void paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
+    virtual void paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
 
     virtual void adjustTextFieldStyle(RenderStyle&, const Element*) const;
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
-    virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
+    virtual void paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { }
 
     virtual void adjustTextAreaStyle(RenderStyle&, const Element*) const;
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
-    virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
+    virtual void paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { }
 
     virtual void adjustMenuListStyle(RenderStyle&, const Element*) const;
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
-    virtual bool paintMenuListDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+    virtual void paintMenuListDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
 
     virtual void adjustMenuListButtonStyle(RenderStyle&, const Element*) const;
-    virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) { return true; }
+    virtual void paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) { }
 
-    virtual bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual bool paintSquareButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+    virtual void paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
+    virtual void paintSquareButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
 
     virtual void adjustMeterStyle(RenderStyle&, const Element*) const;
     virtual bool paintMeter(const RenderObject&, const PaintInfo&, const IntRect&);
@@ -348,11 +348,11 @@
 
     virtual void adjustSliderThumbStyle(RenderStyle&, const Element*) const;
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual bool paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+    virtual void paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
 
     virtual void adjustSearchFieldStyle(RenderStyle&, const Element*) const;
     virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+    virtual void paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { }
 
     virtual void adjustSearchFieldCancelButtonStyle(RenderStyle&, const Element*) const;
     virtual bool paintSearchFieldCancelButton(const RenderBox&, const PaintInfo&, const IntRect&) { return true; }

Modified: trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp	2020-11-30 18:13:14 UTC (rev 270250)
@@ -297,9 +297,9 @@
     return false;
 }
 
-bool RenderThemeAdwaita::paintMenuListButtonDecorations(const RenderBox& renderObject, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeAdwaita::paintMenuListButtonDecorations(const RenderBox& renderObject, const PaintInfo& paintInfo, const FloatRect& rect)
 {
-    return paintMenuList(renderObject, paintInfo, rect);
+    paintMenuList(renderObject, paintInfo, rect);
 }
 
 Seconds RenderThemeAdwaita::animationRepeatIntervalForProgressBar(const RenderProgress&) const

Modified: trunk/Source/WebCore/rendering/RenderThemeAdwaita.h (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeAdwaita.h	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeAdwaita.h	2020-11-30 18:13:14 UTC (rev 270250)
@@ -68,7 +68,7 @@
     void adjustMenuListButtonStyle(RenderStyle&, const Element*) const override;
     LengthBox popupInternalPaddingBox(const RenderStyle&) const final;
     bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) final;
-    bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
+    void paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
 
     Seconds animationRepeatIntervalForProgressBar(const RenderProgress&) const final;
     Seconds animationDurationForProgressBar(const RenderProgress&) const final;

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.h	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h	2020-11-30 18:13:14 UTC (rev 270250)
@@ -76,29 +76,29 @@
 
     // Methods for each appearance value.
     void adjustCheckboxStyle(RenderStyle&, const Element*) const override;
-    bool paintCheckboxDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintCheckboxDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     void adjustRadioStyle(RenderStyle&, const Element*) const override;
-    bool paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     void adjustButtonStyle(RenderStyle&, const Element*) const override;
-    bool paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
     void setButtonSize(RenderStyle&) const override;
 
-    bool paintFileUploadIconDecorations(const RenderObject& inputRenderer, const RenderObject& buttonRenderer, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) override;
+    void paintFileUploadIconDecorations(const RenderObject& inputRenderer, const RenderObject& buttonRenderer, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) override;
 
-    bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
-    bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+    void paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+    void paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
     void adjustMenuListButtonStyle(RenderStyle&, const Element*) const override;
-    bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
+    void paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
 
     void adjustSliderTrackStyle(RenderStyle&, const Element*) const override;
     bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     void adjustSliderThumbSize(RenderStyle&, const Element*) const override;
-    bool paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
@@ -108,7 +108,7 @@
 #endif
 
     void adjustSearchFieldStyle(RenderStyle&, const Element*) const override;
-    bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    void paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
 #if ENABLE(IOS_FORM_CONTROL_REFRESH)
     bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) override;

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-11-30 18:13:14 UTC (rev 270250)
@@ -375,11 +375,11 @@
     CGContextStrokePath(context);
 }
 
-bool RenderThemeIOS::paintCheckboxDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintCheckboxDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
 #if ENABLE(IOS_FORM_CONTROL_REFRESH)
     if (box.settings().iOSFormControlRefreshEnabled())
-        return true;
+        return;
 #endif
 
     bool checked = isChecked(box);
@@ -438,7 +438,6 @@
         drawAxialGradient(cgContext, gradientWithName(ShadeGradient), clip.location(), FloatPoint { clip.x(), clip.maxY() }, LinearInterpolation);
         drawRadialGradient(cgContext, gradientWithName(ShineGradient), bottomCenter, 0, bottomCenter, sqrtf((width * width) / 4.0f + height * height), ExponentialInterpolation);
     }
-    return false;
 }
 
 int RenderThemeIOS::baselinePosition(const RenderBox& box) const
@@ -473,11 +472,11 @@
     style.setBorderRadius({ size / 2, size / 2 });
 }
 
-bool RenderThemeIOS::paintRadioDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintRadioDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
 #if ENABLE(IOS_FORM_CONTROL_REFRESH)
     if (box.settings().iOSFormControlRefreshEnabled())
-        return true;
+        return;
 #endif
 
     GraphicsContextStateSaver stateSaver(paintInfo.context());
@@ -514,10 +513,9 @@
         auto clip = addRoundedBorderClip(box, paintInfo.context(), rect);
         drawShadeAndShineGradients(clip);
     }
-    return false;
 }
 
-bool RenderThemeIOS::paintTextFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeIOS::paintTextFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
 {
     auto& style = box.style();
     FloatPoint point(rect.x() + style.borderLeftWidth(), rect.y() + style.borderTopWidth());
@@ -531,12 +529,11 @@
     bool topBorderIsInvisible = !style.hasBorder() || !style.borderTopWidth() || style.borderTopIsTransparent();
     if (!box.view().printing() && !topBorderIsInvisible)
         drawAxialGradient(paintInfo.context().platformContext(), gradientWithName(InsetGradient), point, FloatPoint(CGPointMake(point.x(), point.y() + 3.0f)), LinearInterpolation);
-    return false;
 }
 
-bool RenderThemeIOS::paintTextAreaDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeIOS::paintTextAreaDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
 {
-    return paintTextFieldDecorations(box, paintInfo, rect);
+    paintTextFieldDecorations(box, paintInfo, rect);
 }
 
 const int MenuListMinHeight = 15;
@@ -663,7 +660,7 @@
         adjustInputElementButtonStyle(style, downcast<HTMLInputElement>(*element));
 }
 
-bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderBox& box, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeIOS::paintMenuListButtonDecorations(const RenderBox& box, const PaintInfo& paintInfo, const FloatRect& rect)
 {
     auto& style = box.style();
     bool isRTL = style.direction() == TextDirection::RTL;
@@ -780,8 +777,6 @@
         paintInfo.context().setFillColor(Color::white);
         paintInfo.context().drawPath(Path::polygonPathFromPoints(arrow));
     }
-
-    return false;
 }
 
 const CGFloat kTrackThickness = 4.0;
@@ -890,7 +885,7 @@
     }
 }
 
-bool RenderThemeIOS::paintSliderThumbDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintSliderThumbDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
     GraphicsContextStateSaver stateSaver(paintInfo.context());
     FloatRect clip = addRoundedBorderClip(box, paintInfo.context(), rect);
@@ -903,8 +898,6 @@
         drawAxialGradient(cgContext, gradientWithName(ShadeGradient), clip.location(), FloatPoint(clip.x(), clip.maxY()), LinearInterpolation);
         drawRadialGradient(cgContext, gradientWithName(ShineGradient), bottomCenter, 0.0f, bottomCenter, std::max(clip.width(), clip.height()), ExponentialInterpolation);
     }
-
-    return false;
 }
 
 bool RenderThemeIOS::paintProgressBar(const RenderObject& renderer, const PaintInfo& paintInfo, const IntRect& rect)
@@ -1024,9 +1017,9 @@
     adjustRoundBorderRadius(style, *box);
 }
 
-bool RenderThemeIOS::paintSearchFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintSearchFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    return paintTextFieldDecorations(box, paintInfo, rect);
+    paintTextFieldDecorations(box, paintInfo, rect);
 }
 
 void RenderThemeIOS::adjustButtonStyle(RenderStyle& style, const Element* element) const
@@ -1056,9 +1049,9 @@
     adjustRoundBorderRadius(style, *box);
 }
 
-bool RenderThemeIOS::paintButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    return paintPushButtonDecorations(box, paintInfo, rect);
+    paintPushButtonDecorations(box, paintInfo, rect);
 }
 
 static bool shouldUseConvexGradient(const Color& backgroundColor)
@@ -1069,7 +1062,7 @@
     return a > 0.5 && largestNonAlphaChannel < 0.5;
 }
 
-bool RenderThemeIOS::paintPushButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
+void RenderThemeIOS::paintPushButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
 {
     GraphicsContextStateSaver stateSaver(paintInfo.context());
     FloatRect clip = addRoundedBorderClip(box, paintInfo.context(), rect);
@@ -1081,7 +1074,6 @@
         drawAxialGradient(cgContext, gradientWithName(ShadeGradient), clip.location(), FloatPoint(clip.x(), clip.maxY()), LinearInterpolation);
         drawAxialGradient(cgContext, gradientWithName(ShineGradient), FloatPoint(clip.x(), clip.maxY()), clip.location(), ExponentialInterpolation);
     }
-    return false;
 }
 
 void RenderThemeIOS::setButtonSize(RenderStyle& style) const
@@ -1099,7 +1091,7 @@
 const int kVisibleBackgroundImageWidth = 1;
 const int kMultipleThumbnailShrinkSize = 2;
 
-bool RenderThemeIOS::paintFileUploadIconDecorations(const RenderObject&, const RenderObject& buttonRenderer, const PaintInfo& paintInfo, const IntRect& rect, Icon* icon, FileUploadDecorations fileUploadDecorations)
+void RenderThemeIOS::paintFileUploadIconDecorations(const RenderObject&, const RenderObject& buttonRenderer, const PaintInfo& paintInfo, const IntRect& rect, Icon* icon, FileUploadDecorations fileUploadDecorations)
 {
     GraphicsContextStateSaver stateSaver(paintInfo.context());
 
@@ -1141,8 +1133,6 @@
     // Foreground picture frame and icon.
     paintInfo.context().fillRoundedRect(FloatRoundedRect(thumbnailPictureFrameRect, cornerSize, cornerSize, cornerSize, cornerSize), pictureFrameColor);
     icon->paint(paintInfo.context(), thumbnailRect);
-
-    return false;
 }
 
 Color RenderThemeIOS::platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeMac.h	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h	2020-11-30 18:13:14 UTC (rev 270250)
@@ -120,7 +120,7 @@
     bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) final;
     void adjustMenuListStyle(RenderStyle&, const Element*) const final;
 
-    bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
+    void paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
     void adjustMenuListButtonStyle(RenderStyle&, const Element*) const final;
 
     void adjustProgressBarStyle(RenderStyle&, const Element*) const final;

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2020-11-30 18:13:14 UTC (rev 270250)
@@ -1526,7 +1526,7 @@
     }
 }
 
-bool RenderThemeMac::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeMac::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
 {
     bool isRTL = renderer.style().direction() == TextDirection::RTL;
     IntRect bounds = IntRect(rect.x() + renderer.style().borderLeftWidth(),
@@ -1549,7 +1549,7 @@
     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale;
 
     if (bounds.width() < arrowWidth + arrowPaddingBefore * renderer.style().effectiveZoom())
-        return false;
+        return;
 
     GraphicsContextStateSaver stateSaver(paintInfo.context());
 
@@ -1593,7 +1593,6 @@
     paintInfo.context().setStrokeColor(rightSeparatorColor);
     paintInfo.context().drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.y()),
         IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.maxY()));
-    return false;
 }
 
 static const IntSize* menuListButtonSizes()

Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2020-11-30 18:13:14 UTC (rev 270250)
@@ -739,7 +739,9 @@
 
     drawControl(paintInfo.context(), renderer, theme, ThemeData(part, determineState(renderer)), IntRect(rect));
     
-    return paintMenuListButtonDecorations(downcast<RenderBox>(renderer), paintInfo, FloatRect(rect));
+    paintMenuListButtonDecorations(downcast<RenderBox>(renderer), paintInfo, FloatRect(rect));
+
+    return false;
 }
 
 void RenderThemeWin::adjustMenuListStyle(RenderStyle& style, const Element* e) const
@@ -779,7 +781,7 @@
     style.setWhiteSpace(WhiteSpace::Pre);
 }
 
-bool RenderThemeWin::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
+void RenderThemeWin::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
 {
     // FIXME: Don't make hardcoded assumptions about the thickness of the textfield border.
     int borderThickness = haveTheme ? 1 : 2;
@@ -800,8 +802,6 @@
     }
 
     drawControl(paintInfo.context(), renderer, menuListTheme(), getThemeData(renderer), buttonRect);
-
-    return false;
 }
 
 const int trackWidth = 4;

Modified: trunk/Source/WebCore/rendering/RenderThemeWin.h (270249 => 270250)


--- trunk/Source/WebCore/rendering/RenderThemeWin.h	2020-11-30 17:40:43 UTC (rev 270249)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.h	2020-11-30 18:13:14 UTC (rev 270250)
@@ -84,7 +84,7 @@
     bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
     void adjustMenuListButtonStyle(RenderStyle&, const Element*) const override;
 
-    bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
+    void paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
 
     bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
     bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to