Title: [239604] trunk
- Revision
- 239604
- Author
- [email protected]
- Date
- 2019-01-03 18:34:19 -0800 (Thu, 03 Jan 2019)
Log Message
REGRESSION: -webkit-appearance test case crashes
https://bugs.webkit.org/show_bug.cgi?id=189302
<rdar://problem/44143049>
Reviewed by Wenson Hsieh.
Source/WebCore:
The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
This patch removes the previous position inlining attempts.
Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
LayoutTests:
* fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt: Added.
* fast/forms/webkit-appearance-searchfield-cancel-button-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (239603 => 239604)
--- trunk/LayoutTests/ChangeLog 2019-01-04 01:08:43 UTC (rev 239603)
+++ trunk/LayoutTests/ChangeLog 2019-01-04 02:34:19 UTC (rev 239604)
@@ -1,3 +1,14 @@
+2019-01-03 Zalan Bujtas <[email protected]>
+
+ REGRESSION: -webkit-appearance test case crashes
+ https://bugs.webkit.org/show_bug.cgi?id=189302
+ <rdar://problem/44143049>
+
+ Reviewed by Wenson Hsieh.
+
+ * fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt: Added.
+ * fast/forms/webkit-appearance-searchfield-cancel-button-crash.html: Added.
+
2019-01-03 Chris Dumez <[email protected]>
Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
Added: trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt (0 => 239604)
--- trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt 2019-01-04 02:34:19 UTC (rev 239604)
@@ -0,0 +1 @@
+ PASS if no crash or assert.
Added: trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html (0 => 239604)
--- trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html (rev 0)
+++ trunk/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html 2019-01-04 02:34:19 UTC (rev 239604)
@@ -0,0 +1,9 @@
+<style>
+ input { -webkit-appearance: searchfield-cancel-button; }
+</style>
+<input>
+PASS if no crash or assert.
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
Modified: trunk/Source/WebCore/ChangeLog (239603 => 239604)
--- trunk/Source/WebCore/ChangeLog 2019-01-04 01:08:43 UTC (rev 239603)
+++ trunk/Source/WebCore/ChangeLog 2019-01-04 02:34:19 UTC (rev 239604)
@@ -1,3 +1,19 @@
+2019-01-03 Zalan Bujtas <[email protected]>
+
+ REGRESSION: -webkit-appearance test case crashes
+ https://bugs.webkit.org/show_bug.cgi?id=189302
+ <rdar://problem/44143049>
+
+ Reviewed by Wenson Hsieh.
+
+ The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
+ This patch removes the previous position inlining attempts.
+
+ Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
+
2019-01-03 David Kilzer <[email protected]>
Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (239603 => 239604)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2019-01-04 01:08:43 UTC (rev 239603)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2019-01-04 02:34:19 UTC (rev 239604)
@@ -2076,27 +2076,13 @@
[[search cancelButtonCell] setHighlighted:NO];
GraphicsContextStateSaver stateSaver(paintInfo.context());
-
- float zoomLevel = box.style().effectiveZoom();
-
FloatRect localBounds = adjustedCancelButtonRect([search cancelButtonRectForBounds:NSRect(snappedIntRect(inputBox.contentBoxRect()))]);
-
- // Adjust position based on the content direction.
- float adjustedXPosition;
-
- if (is<HTMLInputElement>(*input)) {
- RenderBox* cancelButtonBox = downcast<RenderBox>(downcast<HTMLInputElement>(*input).cancelButtonElement()->renderer());
- // The cancel button won't always be the rightmost element.
- adjustedXPosition = inputBox.contentBoxRect().x() + (cancelButtonBox->absoluteContentBox().x() - inputBox.absoluteContentBox().x());
- } else if (box.style().direction() == TextDirection::RTL)
- adjustedXPosition = inputBox.contentBoxRect().x();
- else
- adjustedXPosition = inputBox.contentBoxRect().maxX() - localBounds.size().width();
-
- localBounds.setX(adjustedXPosition);
+ // Set the original horizontal position back (cancelButtonRectForBounds() moves it based on the system direction).
+ localBounds.setX(inputBox.contentBoxRect().x() + box.x());
FloatPoint paintingPos = convertToPaintingPosition(inputBox, box, localBounds.location(), r.location());
FloatRect unzoomedRect(paintingPos, localBounds.size());
+ auto zoomLevel = box.style().effectiveZoom();
if (zoomLevel != 1.0f) {
unzoomedRect.setSize(unzoomedRect.size() / zoomLevel);
paintInfo.context().translate(unzoomedRect.location());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes