Title: [280244] trunk
Revision
280244
Author
akeer...@apple.com
Date
2021-07-23 09:07:58 -0700 (Fri, 23 Jul 2021)

Log Message

[macOS] Repainting artifacts when moving input type=range slider thumb
https://bugs.webkit.org/show_bug.cgi?id=228135
rdar://76247487

Reviewed by Tim Horton.

Source/WebCore:

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustSliderThumbSize const):

The size of NSSliderCell's knob increased in Big Sur. Consequently, the
knob was being painted outside of its box. Unfortunately, there is
currently no way to obtain the size programmatically, so we are forced
to update the hardcoded size.

LayoutTests:

Rebaselined tests to account for the change to the size of the slider
thumb.

* fast/dom/HTMLInputElement/input-slider-update-expected.txt:
* fast/repaint/block-inputrange-repaint-expected.txt:
* fast/repaint/block-inputrange-repaint.html:
* fast/repaint/slider-thumb-drag-release-expected.txt:
* platform/gtk/fast/repaint/block-inputrange-repaint-expected.txt:
* platform/mac-catalina/fast/dom/HTMLInputElement/input-slider-update-expected.txt: Copied from LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt.
* platform/mac-catalina/fast/forms/input-appearance-height-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt.
* platform/mac-catalina/fast/forms/range/input-appearance-range-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt.
* platform/mac-catalina/fast/forms/range/slider-padding-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt.
* platform/mac-catalina/fast/forms/range/slider-thumb-shared-style-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt.
* platform/mac-catalina/fast/forms/range/thumbslider-no-parent-slider-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt.
* platform/mac-catalina/fast/repaint/block-inputrange-repaint-expected.txt: Added.
* platform/mac-catalina/fast/repaint/slider-thumb-drag-release-expected.txt: Copied from LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt.
* platform/mac/fast/forms/box-shadow-override-expected.txt:
* platform/mac/fast/forms/input-appearance-height-expected.txt:
* platform/mac/fast/forms/range/input-appearance-range-expected.txt:
* platform/mac/fast/forms/range/slider-padding-expected.txt:
* platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt:
* platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (280243 => 280244)


--- trunk/LayoutTests/ChangeLog	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/ChangeLog	2021-07-23 16:07:58 UTC (rev 280244)
@@ -1,3 +1,34 @@
+2021-07-23  Aditya Keerthi  <akeer...@apple.com>
+
+        [macOS] Repainting artifacts when moving input type=range slider thumb
+        https://bugs.webkit.org/show_bug.cgi?id=228135
+        rdar://76247487
+
+        Reviewed by Tim Horton.
+
+        Rebaselined tests to account for the change to the size of the slider
+        thumb.
+
+        * fast/dom/HTMLInputElement/input-slider-update-expected.txt:
+        * fast/repaint/block-inputrange-repaint-expected.txt:
+        * fast/repaint/block-inputrange-repaint.html:
+        * fast/repaint/slider-thumb-drag-release-expected.txt:
+        * platform/gtk/fast/repaint/block-inputrange-repaint-expected.txt:
+        * platform/mac-catalina/fast/dom/HTMLInputElement/input-slider-update-expected.txt: Copied from LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt.
+        * platform/mac-catalina/fast/forms/input-appearance-height-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt.
+        * platform/mac-catalina/fast/forms/range/input-appearance-range-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt.
+        * platform/mac-catalina/fast/forms/range/slider-padding-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt.
+        * platform/mac-catalina/fast/forms/range/slider-thumb-shared-style-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt.
+        * platform/mac-catalina/fast/forms/range/thumbslider-no-parent-slider-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt.
+        * platform/mac-catalina/fast/repaint/block-inputrange-repaint-expected.txt: Added.
+        * platform/mac-catalina/fast/repaint/slider-thumb-drag-release-expected.txt: Copied from LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt.
+        * platform/mac/fast/forms/box-shadow-override-expected.txt:
+        * platform/mac/fast/forms/input-appearance-height-expected.txt:
+        * platform/mac/fast/forms/range/input-appearance-range-expected.txt:
+        * platform/mac/fast/forms/range/slider-padding-expected.txt:
+        * platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt:
+        * platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt:
+
 2021-07-23  Devin Rousso  <drou...@apple.com>
 
         [Modern Media Controls] [macOS] Only show total duration when the elapsed time is visible

Modified: trunk/LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt (280243 => 280244)


--- trunk/LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -3,8 +3,8 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-        RenderFlexibleBox {DIV} at (0,0) size 129x15
-          RenderBlock {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (114,0) size 15x15
+      RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+        RenderFlexibleBox {DIV} at (0,0) size 129x17
+          RenderBlock {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (112,0) size 17x17
       RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt (280243 => 280244)


--- trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -1,4 +1,4 @@
-PASS repaintRects.indexOf('495 8 15 15') is not -1
+PASS repaintRects.indexOf('493 8 17 17') is not -1
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html (280243 => 280244)


--- trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html	2021-07-23 16:07:58 UTC (rev 280244)
@@ -20,7 +20,7 @@
     if (window.internals) {
       repaintRects = window.internals.repaintRectsAsText();
       window.internals.stopTrackingRepaints();
-      shouldNotBe("repaintRects.indexOf('495 8 15 15')", "-1");
+      shouldNotBe("repaintRects.indexOf('493 8 17 17')", "-1");
     }
     finishJSTest();
   }

Modified: trunk/LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt (280243 => 280244)


--- trunk/LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -3,8 +3,8 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-        RenderFlexibleBox {DIV} at (0,0) size 129x15
-          RenderBlock {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (114,0) size 15x15
+      RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+        RenderFlexibleBox {DIV} at (0,0) size 129x17
+          RenderBlock {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (112,0) size 17x17
       RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/gtk/fast/repaint/block-inputrange-repaint-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/gtk/fast/repaint/block-inputrange-repaint-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/gtk/fast/repaint/block-inputrange-repaint-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -1,4 +1,4 @@
-FAIL repaintRects.indexOf('495 8 15 15') should not be -1.
+FAIL repaintRects.indexOf('493 8 17 17') should not be -1.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -37,10 +37,10 @@
         RenderBlock {INPUT} at (22,13) size 12x12
         RenderText {#text} at (36,9) size 4x18
           text run at (36,9) width 4: " "
-        RenderSlider {INPUT} at (42,8) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (57,0) size 15x15
+        RenderSlider {INPUT} at (42,6) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (56,0) size 17x17
         RenderText {#text} at (173,9) size 4x18
           text run at (173,9) width 4: " "
         RenderFileUploadControl {INPUT} at (179,10) size 238x18 "no file selected"

Modified: trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -6,7 +6,7 @@
       RenderBlock (anonymous) at (0,0) size 784x18
         RenderText {#text} at (0,0) size 781x18
           text run at (0,0) width 781: "This tests the height attribute of form elements. The only element that should honour this value is the Image type of input."
-      RenderBlock {FORM} at (0,18) size 784x258
+      RenderBlock {FORM} at (0,18) size 784x260
         RenderText {#text} at (0,2) size 37x18
           text run at (0,2) width 37: "input "
         RenderTextControl {INPUT} at (38,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
@@ -47,50 +47,50 @@
         RenderText {#text} at (52,105) size 5x18
           text run at (52,105) width 5: " "
         RenderBR {BR} at (56,105) size 1x18
-        RenderText {#text} at (0,127) size 40x18
-          text run at (0,127) width 40: "range "
-        RenderSlider {INPUT} at (41,126) size 130x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (57,0) size 15x15
-        RenderText {#text} at (172,127) size 5x18
-          text run at (172,127) width 5: " "
-        RenderBR {BR} at (176,127) size 1x18
-        RenderText {#text} at (0,146) size 35x18
-          text run at (0,146) width 35: "reset "
-        RenderButton {INPUT} at (36,147) size 46x18 [color=#000000D8] [bgcolor=#C0C0C0]
+        RenderText {#text} at (0,129) size 40x18
+          text run at (0,129) width 40: "range "
+        RenderSlider {INPUT} at (41,126) size 130x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (56,0) size 17x17
+        RenderText {#text} at (172,129) size 5x18
+          text run at (172,129) width 5: " "
+        RenderBR {BR} at (176,129) size 1x18
+        RenderText {#text} at (0,148) size 35x18
+          text run at (0,148) width 35: "reset "
+        RenderButton {INPUT} at (36,149) size 46x18 [color=#000000D8] [bgcolor=#C0C0C0]
           RenderBlock (anonymous) at (8,2) size 30x13
             RenderText at (0,0) size 30x13
               text run at (0,0) width 30: "Reset"
-        RenderText {#text} at (83,146) size 5x18
-          text run at (83,146) width 5: " "
-        RenderBR {BR} at (87,146) size 1x18
-        RenderText {#text} at (0,168) size 48x18
-          text run at (0,168) width 48: "submit "
-        RenderButton {INPUT} at (49,169) size 54x18 [color=#000000D8] [bgcolor=#C0C0C0]
+        RenderText {#text} at (83,148) size 5x18
+          text run at (83,148) width 5: " "
+        RenderBR {BR} at (87,148) size 1x18
+        RenderText {#text} at (0,170) size 48x18
+          text run at (0,170) width 48: "submit "
+        RenderButton {INPUT} at (49,171) size 54x18 [color=#000000D8] [bgcolor=#C0C0C0]
           RenderBlock (anonymous) at (8,2) size 37x13
             RenderText at (0,0) size 37x13
               text run at (0,0) width 37: "Submit"
-        RenderText {#text} at (104,168) size 5x18
-          text run at (104,168) width 5: " "
-        RenderBR {BR} at (108,168) size 1x18
-        RenderText {#text} at (0,191) size 51x18
-          text run at (0,191) width 51: "isindex "
-        RenderTextControl {INPUT} at (52,191) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (201,191) size 5x18
-          text run at (201,191) width 5: " "
-        RenderBR {BR} at (205,191) size 1x18
-        RenderText {#text} at (0,214) size 65x18
-          text run at (0,214) width 65: "password "
-        RenderTextControl {INPUT} at (66,214) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (104,170) size 5x18
+          text run at (104,170) width 5: " "
+        RenderBR {BR} at (108,170) size 1x18
+        RenderText {#text} at (0,193) size 51x18
+          text run at (0,193) width 51: "isindex "
+        RenderTextControl {INPUT} at (52,193) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (201,193) size 5x18
+          text run at (201,193) width 5: " "
+        RenderBR {BR} at (205,193) size 1x18
+        RenderText {#text} at (0,216) size 65x18
+          text run at (0,216) width 65: "password "
+        RenderTextControl {INPUT} at (66,216) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
           RenderFlexibleBox {DIV} at (3,3) size 141x13
             RenderBlock {DIV} at (0,0) size 141x13
-        RenderText {#text} at (215,214) size 5x18
-          text run at (215,214) width 5: " "
-        RenderBR {BR} at (219,214) size 1x18
-        RenderText {#text} at (0,237) size 45x18
-          text run at (0,237) width 45: "search "
-        RenderTextControl {INPUT} at (46,237) size 175x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (215,216) size 5x18
+          text run at (215,216) width 5: " "
+        RenderBR {BR} at (219,216) size 1x18
+        RenderText {#text} at (0,239) size 45x18
+          text run at (0,239) width 45: "search "
+        RenderTextControl {INPUT} at (46,239) size 175x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
           RenderFlexibleBox {DIV} at (3,0) size 168x19
             RenderBlock {DIV} at (0,0) size 8x19
             RenderBlock {DIV} at (8,3) size 141x13
@@ -100,9 +100,9 @@
   RenderBlock {DIV} at (3,3) size 141x13
 layer at (41,54) size 141x13
   RenderBlock {DIV} at (3,3) size 141x13
-layer at (63,220) size 141x13
+layer at (63,222) size 141x13
   RenderBlock {DIV} at (3,3) size 141x13
-layer at (77,243) size 141x13
+layer at (77,245) size 141x13
   RenderBlock {DIV} at (0,0) size 141x13
-layer at (66,266) size 141x13
+layer at (66,268) size 141x13
   RenderBlock {DIV} at (0,0) size 141x13

Modified: trunk/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -1,31 +1,31 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x261
-  RenderBlock {HTML} at (0,0) size 800x261
-    RenderBody {BODY} at (8,8) size 784x245
+layer at (0,0) size 800x267
+  RenderBlock {HTML} at (0,0) size 800x267
+    RenderBody {BODY} at (8,8) size 784x251
       RenderBlock {DIV} at (0,0) size 784x36
         RenderSlider {INPUT} at (2,2) size 129x30 [color=#909090] [bgcolor=#FFFFFF]
           RenderFlexibleBox {DIV} at (0,0) size 129x30
-            RenderBlock {DIV} at (0,7) size 129x16
-              RenderBlock {DIV} at (57,0) size 15x15
-      RenderBlock {DIV} at (0,36) size 784x21
-        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (0,0) size 15x15
-      RenderBlock {DIV} at (0,57) size 784x21
-        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (114,0) size 15x15
-      RenderBlock {DIV} at (0,78) size 784x146
+            RenderBlock {DIV} at (0,6) size 129x18
+              RenderBlock {DIV} at (56,0) size 17x17
+      RenderBlock {DIV} at (0,36) size 784x23
+        RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (0,0) size 17x17
+      RenderBlock {DIV} at (0,59) size 784x23
+        RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (112,0) size 17x17
+      RenderBlock {DIV} at (0,82) size 784x146
         RenderSlider {INPUT} at (64,2) size 129x140 [color=#909090] [bgcolor=#FFFFFF]
           RenderFlexibleBox {DIV} at (0,0) size 129x140
-            RenderBlock {DIV} at (57,0) size 15x140
-              RenderBlock {DIV} at (0,62) size 15x16
-      RenderBlock {DIV} at (0,224) size 784x21
-layer at (10,234) size 129x15
-  RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-    RenderFlexibleBox {DIV} at (0,0) size 129x15
-      RenderBlock {DIV} at (0,0) size 129x15
-        RenderBlock {DIV} at (85,0) size 16x15
+            RenderBlock {DIV} at (56,0) size 17x140
+              RenderBlock {DIV} at (0,61) size 17x18
+      RenderBlock {DIV} at (0,228) size 784x23
+layer at (10,238) size 129x17
+  RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+    RenderFlexibleBox {DIV} at (0,0) size 129x17
+      RenderBlock {DIV} at (0,0) size 129x17
+        RenderBlock {DIV} at (84,0) size 17x17

Modified: trunk/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -7,10 +7,10 @@
         RenderText {#text} at (0,0) size 326x18
           text run at (0,0) width 326: "This tests that the slider control considers padding."
         RenderBR {BR} at (325,0) size 1x18
-      RenderBlock {DIV} at (0,18) size 784x39 [bgcolor=#ADD8E6]
-        RenderSlider {INPUT} at (2,2) size 100x35 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (10,10) size 80x15
-            RenderBlock {DIV} at (0,0) size 80x15
-              RenderBlock {DIV} at (0,0) size 15x15
+      RenderBlock {DIV} at (0,18) size 784x41 [bgcolor=#ADD8E6]
+        RenderSlider {INPUT} at (2,2) size 100x37 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (10,10) size 80x17
+            RenderBlock {DIV} at (0,0) size 80x17
+              RenderBlock {DIV} at (0,0) size 17x17
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {PRE} at (0,70) size 784x0
+      RenderBlock {PRE} at (0,72) size 784x0

Modified: trunk/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -18,14 +18,14 @@
       RenderBlock {P} at (0,34) size 784x18
         RenderText {#text} at (0,0) size 289x18
           text run at (0,0) width 289: "The first slider\x{2019}s thumb should be on the left."
-      RenderBlock {DIV} at (0,68) size 784x38
-        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (0,0) size 15x15
-        RenderBR {BR} at (133,3) size 0x18
-        RenderSlider {INPUT} at (2,21) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
-          RenderFlexibleBox {DIV} at (0,0) size 129x15
-            RenderBlock {DIV} at (0,0) size 129x15
-              RenderBlock {DIV} at (114,0) size 15x15
+      RenderBlock {DIV} at (0,68) size 784x42
+        RenderSlider {INPUT} at (2,2) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (0,0) size 17x17
+        RenderBR {BR} at (133,5) size 0x18
+        RenderSlider {INPUT} at (2,23) size 129x17 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x17
+            RenderBlock {DIV} at (0,0) size 129x17
+              RenderBlock {DIV} at (112,0) size 17x17
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt (280243 => 280244)


--- trunk/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -3,7 +3,7 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {SPAN} at (0,0) size 15x15
-      RenderBR {BR} at (15,1) size 0x18
-      RenderBlock {SPAN} at (0,15) size 15x15
+      RenderBlock {SPAN} at (0,0) size 17x17
+      RenderBR {BR} at (17,3) size 0x18
+      RenderBlock {SPAN} at (0,17) size 17x17
       RenderText {#text} at (0,0) size 0x0

Copied: trunk/LayoutTests/platform/mac-catalina/fast/dom/HTMLInputElement/input-slider-update-expected.txt (from rev 280243, trunk/LayoutTests/fast/dom/HTMLInputElement/input-slider-update-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/dom/HTMLInputElement/input-slider-update-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/dom/HTMLInputElement/input-slider-update-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+        RenderFlexibleBox {DIV} at (0,0) size 129x15
+          RenderBlock {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (114,0) size 15x15
+      RenderText {#text} at (0,0) size 0x0

Copied: trunk/LayoutTests/platform/mac-catalina/fast/forms/input-appearance-height-expected.txt (from rev 280243, trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/forms/input-appearance-height-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/forms/input-appearance-height-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,108 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 781x18
+          text run at (0,0) width 781: "This tests the height attribute of form elements. The only element that should honour this value is the Image type of input."
+      RenderBlock {FORM} at (0,18) size 784x258
+        RenderText {#text} at (0,2) size 37x18
+          text run at (0,2) width 37: "input "
+        RenderTextControl {INPUT} at (38,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (187,2) size 5x18
+          text run at (187,2) width 5: " "
+        RenderBR {BR} at (191,2) size 1x18
+        RenderText {#text} at (0,25) size 28x18
+          text run at (0,25) width 28: "text "
+        RenderTextControl {INPUT} at (29,25) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (178,25) size 5x18
+          text run at (178,25) width 5: " "
+        RenderBR {BR} at (182,25) size 1x18
+        RenderText {#text} at (0,46) size 66x18
+          text run at (0,46) width 66: "checkbox "
+        RenderBlock {INPUT} at (67,50) size 13x12
+        RenderText {#text} at (81,46) size 5x18
+          text run at (81,46) width 5: " "
+        RenderBR {BR} at (85,46) size 1x18
+        RenderText {#text} at (0,66) size 25x18
+          text run at (0,66) width 25: "file "
+        RenderFileUploadControl {INPUT} at (26,67) size 239x18 "no file selected"
+          RenderButton {INPUT} at (0,0) size 78x18 [color=#000000D8] [bgcolor=#C0C0C0]
+            RenderBlock (anonymous) at (8,2) size 62x13
+              RenderText at (0,0) size 62x13
+                text run at (0,0) width 62: "Choose File"
+        RenderText {#text} at (266,66) size 5x18
+          text run at (266,66) width 5: " "
+        RenderBR {BR} at (270,66) size 1x18
+        RenderText {#text} at (0,87) size 44x18
+          text run at (0,87) width 44: "image "
+        RenderImage {INPUT} at (43,100) size 11x1
+        RenderText {#text} at (53,87) size 5x18
+          text run at (53,87) width 5: " "
+        RenderBR {BR} at (57,87) size 1x18
+        RenderText {#text} at (0,105) size 37x18
+          text run at (0,105) width 37: "radio "
+        RenderBlock {INPUT} at (38,109) size 13x12
+        RenderText {#text} at (52,105) size 5x18
+          text run at (52,105) width 5: " "
+        RenderBR {BR} at (56,105) size 1x18
+        RenderText {#text} at (0,127) size 40x18
+          text run at (0,127) width 40: "range "
+        RenderSlider {INPUT} at (41,126) size 130x15 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (0,0) size 129x15
+              RenderBlock {DIV} at (57,0) size 15x15
+        RenderText {#text} at (172,127) size 5x18
+          text run at (172,127) width 5: " "
+        RenderBR {BR} at (176,127) size 1x18
+        RenderText {#text} at (0,146) size 35x18
+          text run at (0,146) width 35: "reset "
+        RenderButton {INPUT} at (36,147) size 46x18 [color=#000000D8] [bgcolor=#C0C0C0]
+          RenderBlock (anonymous) at (8,2) size 30x13
+            RenderText at (0,0) size 30x13
+              text run at (0,0) width 30: "Reset"
+        RenderText {#text} at (83,146) size 5x18
+          text run at (83,146) width 5: " "
+        RenderBR {BR} at (87,146) size 1x18
+        RenderText {#text} at (0,168) size 48x18
+          text run at (0,168) width 48: "submit "
+        RenderButton {INPUT} at (49,169) size 54x18 [color=#000000D8] [bgcolor=#C0C0C0]
+          RenderBlock (anonymous) at (8,2) size 37x13
+            RenderText at (0,0) size 37x13
+              text run at (0,0) width 37: "Submit"
+        RenderText {#text} at (104,168) size 5x18
+          text run at (104,168) width 5: " "
+        RenderBR {BR} at (108,168) size 1x18
+        RenderText {#text} at (0,191) size 51x18
+          text run at (0,191) width 51: "isindex "
+        RenderTextControl {INPUT} at (52,191) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (201,191) size 5x18
+          text run at (201,191) width 5: " "
+        RenderBR {BR} at (205,191) size 1x18
+        RenderText {#text} at (0,214) size 65x18
+          text run at (0,214) width 65: "password "
+        RenderTextControl {INPUT} at (66,214) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 141x13
+            RenderBlock {DIV} at (0,0) size 141x13
+        RenderText {#text} at (215,214) size 5x18
+          text run at (215,214) width 5: " "
+        RenderBR {BR} at (219,214) size 1x18
+        RenderText {#text} at (0,237) size 45x18
+          text run at (0,237) width 45: "search "
+        RenderTextControl {INPUT} at (46,237) size 175x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,0) size 168x19
+            RenderBlock {DIV} at (0,0) size 8x19
+            RenderBlock {DIV} at (8,3) size 141x13
+            RenderBlock {DIV} at (148,0) size 20x19
+        RenderText {#text} at (0,0) size 0x0
+layer at (50,31) size 141x13
+  RenderBlock {DIV} at (3,3) size 141x13
+layer at (41,54) size 141x13
+  RenderBlock {DIV} at (3,3) size 141x13
+layer at (63,220) size 141x13
+  RenderBlock {DIV} at (3,3) size 141x13
+layer at (77,243) size 141x13
+  RenderBlock {DIV} at (0,0) size 141x13
+layer at (66,266) size 141x13
+  RenderBlock {DIV} at (0,0) size 141x13

Copied: trunk/LayoutTests/platform/mac-catalina/fast/forms/range/input-appearance-range-expected.txt (from rev 280243, trunk/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/forms/range/input-appearance-range-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/forms/range/input-appearance-range-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,31 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x261
+  RenderBlock {HTML} at (0,0) size 800x261
+    RenderBody {BODY} at (8,8) size 784x245
+      RenderBlock {DIV} at (0,0) size 784x36
+        RenderSlider {INPUT} at (2,2) size 129x30 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x30
+            RenderBlock {DIV} at (0,7) size 129x16
+              RenderBlock {DIV} at (57,0) size 15x15
+      RenderBlock {DIV} at (0,36) size 784x21
+        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (0,0) size 129x15
+              RenderBlock {DIV} at (0,0) size 15x15
+      RenderBlock {DIV} at (0,57) size 784x21
+        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (0,0) size 129x15
+              RenderBlock {DIV} at (114,0) size 15x15
+      RenderBlock {DIV} at (0,78) size 784x146
+        RenderSlider {INPUT} at (64,2) size 129x140 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x140
+            RenderBlock {DIV} at (57,0) size 15x140
+              RenderBlock {DIV} at (0,62) size 15x16
+      RenderBlock {DIV} at (0,224) size 784x21
+layer at (10,234) size 129x15
+  RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+    RenderFlexibleBox {DIV} at (0,0) size 129x15
+      RenderBlock {DIV} at (0,0) size 129x15
+        RenderBlock {DIV} at (85,0) size 16x15

Copied: trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-padding-expected.txt (from rev 280243, trunk/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-padding-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-padding-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x579
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 326x18
+          text run at (0,0) width 326: "This tests that the slider control considers padding."
+        RenderBR {BR} at (325,0) size 1x18
+      RenderBlock {DIV} at (0,18) size 784x39 [bgcolor=#ADD8E6]
+        RenderSlider {INPUT} at (2,2) size 100x35 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (10,10) size 80x15
+            RenderBlock {DIV} at (0,0) size 80x15
+              RenderBlock {DIV} at (0,0) size 15x15
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {PRE} at (0,70) size 784x0

Copied: trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-thumb-shared-style-expected.txt (from rev 280243, trunk/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-thumb-shared-style-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/forms/range/slider-thumb-shared-style-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,31 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 54x18
+          text run at (0,0) width 54: "Test for "
+        RenderInline {I} at (0,0) size 717x18
+          RenderInline {A} at (0,0) size 305x18 [color=#0000EE]
+            RenderText {#text} at (53,0) size 305x18
+              text run at (53,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=13800"
+          RenderText {#text} at (357,0) size 413x18
+            text run at (357,0) width 5: " "
+            text run at (361,0) width 409: "REGRESSION: Moving a slider moves another unrelated slider"
+        RenderText {#text} at (769,0) size 5x18
+          text run at (769,0) width 5: "."
+      RenderBlock {P} at (0,34) size 784x18
+        RenderText {#text} at (0,0) size 289x18
+          text run at (0,0) width 289: "The first slider\x{2019}s thumb should be on the left."
+      RenderBlock {DIV} at (0,68) size 784x38
+        RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (0,0) size 129x15
+              RenderBlock {DIV} at (0,0) size 15x15
+        RenderBR {BR} at (133,3) size 0x18
+        RenderSlider {INPUT} at (2,21) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+          RenderFlexibleBox {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (0,0) size 129x15
+              RenderBlock {DIV} at (114,0) size 15x15
+        RenderText {#text} at (0,0) size 0x0

Copied: trunk/LayoutTests/platform/mac-catalina/fast/forms/range/thumbslider-no-parent-slider-expected.txt (from rev 280243, trunk/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/forms/range/thumbslider-no-parent-slider-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/forms/range/thumbslider-no-parent-slider-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {SPAN} at (0,0) size 15x15
+      RenderBR {BR} at (15,1) size 0x18
+      RenderBlock {SPAN} at (0,15) size 15x15
+      RenderText {#text} at (0,0) size 0x0

Added: trunk/LayoutTests/platform/mac-catalina/fast/repaint/block-inputrange-repaint-expected.txt (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/repaint/block-inputrange-repaint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/repaint/block-inputrange-repaint-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,5 @@
+FAIL repaintRects.indexOf('493 8 17 17') should not be -1.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/platform/mac-catalina/fast/repaint/slider-thumb-drag-release-expected.txt (from rev 280243, trunk/LayoutTests/fast/repaint/slider-thumb-drag-release-expected.txt) (0 => 280244)


--- trunk/LayoutTests/platform/mac-catalina/fast/repaint/slider-thumb-drag-release-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-catalina/fast/repaint/slider-thumb-drag-release-expected.txt	2021-07-23 16:07:58 UTC (rev 280244)
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderSlider {INPUT} at (2,2) size 129x15 [color=#909090] [bgcolor=#FFFFFF]
+        RenderFlexibleBox {DIV} at (0,0) size 129x15
+          RenderBlock {DIV} at (0,0) size 129x15
+            RenderBlock {DIV} at (114,0) size 15x15
+      RenderText {#text} at (0,0) size 0x0

Modified: trunk/Source/WebCore/ChangeLog (280243 => 280244)


--- trunk/Source/WebCore/ChangeLog	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/Source/WebCore/ChangeLog	2021-07-23 16:07:58 UTC (rev 280244)
@@ -1,3 +1,19 @@
+2021-07-23  Aditya Keerthi  <akeer...@apple.com>
+
+        [macOS] Repainting artifacts when moving input type=range slider thumb
+        https://bugs.webkit.org/show_bug.cgi?id=228135
+        rdar://76247487
+
+        Reviewed by Tim Horton.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::adjustSliderThumbSize const):
+
+        The size of NSSliderCell's knob increased in Big Sur. Consequently, the
+        knob was being painted outside of its box. Unfortunately, there is
+        currently no way to obtain the size programmatically, so we are forced
+        to update the hardcoded size.
+
 2021-07-23  Philippe Normand  <pnorm...@igalia.com>
 
         [GStreamer][1.19] Warnings due to AppSinkCallbacks struct growth

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (280243 => 280244)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2021-07-23 15:38:29 UTC (rev 280243)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2021-07-23 16:07:58 UTC (rev 280244)
@@ -2103,15 +2103,20 @@
 }
 #endif
 
-const int sliderThumbWidth = 15;
-const int sliderThumbHeight = 15;
+// FIXME (<rdar://problem/80870479>): Ideally, this constant should be obtained from AppKit using -[NSSliderCell knobThickness].
+// However, the method currently returns an incorrect value, both with and without a control view associated with the cell.
+#if HAVE(LARGE_CONTROL_SIZE)
+constexpr int sliderThumbThickness = 17;
+#else
+constexpr int sliderThumbThickness = 15;
+#endif
 
 void RenderThemeMac::adjustSliderThumbSize(RenderStyle& style, const Element*) const
 {
     float zoomLevel = style.effectiveZoom();
     if (style.appearance() == SliderThumbHorizontalPart || style.appearance() == SliderThumbVerticalPart) {
-        style.setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), LengthType::Fixed));
-        style.setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), LengthType::Fixed));
+        style.setWidth(Length(static_cast<int>(sliderThumbThickness * zoomLevel), LengthType::Fixed));
+        style.setHeight(Length(static_cast<int>(sliderThumbThickness * zoomLevel), LengthType::Fixed));
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to