WebKit Bugzilla
Attachment 358278 Details for
Bug 189302
: REGRESSION: -webkit-appearance test case crashes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189302-20190103143329.patch (text/plain), 4.72 KB, created by
zalan
on 2019-01-03 14:33:29 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-03 14:33:29 PST
Size:
4.72 KB
patch
obsolete
>Subversion Revision: 239568 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 97a0991c7a404612ffb4f3e467652ca7a3fff60b..aa853f2d1b21657ffac5e9ac927fd9e81d7c965a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-03 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION: -webkit-appearance test case crashes >+ https://bugs.webkit.org/show_bug.cgi?id=189302 >+ <rdar://problem/44143049> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-01 Jeff Miller <jeffm@apple.com> > > Update user-visible copyright strings to include 2019 >diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm >index aa8b68b52dc49c76ee9b7de942f0e239a0f62d99..60f162dab144e459e3847d14a51dc699da1ca064 100644 >--- a/Source/WebCore/rendering/RenderThemeMac.mm >+++ b/Source/WebCore/rendering/RenderThemeMac.mm >@@ -2076,27 +2076,13 @@ bool RenderThemeMac::paintSearchFieldCancelButton(const RenderBox& box, const Pa > [[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 horizontal position back to based on the content direction (cancelButtonRectForBounds() only knows about 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()); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4a85e5fbb6bcc0a74bb554f3d975fd9fe6ea9fc8..4e223b47d872d2929d335d13807315e193cad99b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-01-03 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION: -webkit-appearance test case crashes >+ https://bugs.webkit.org/show_bug.cgi?id=189302 >+ <rdar://problem/44143049> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt: Added. >+ * fast/forms/webkit-appearance-searchfield-cancel-button-crash.html: Added. >+ > 2018-12-31 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Support PHP 7.3 in Debian. >diff --git a/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt b/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..1c72d6c4e8a4e1677ad1225aeaf2eace02649875 >--- /dev/null >+++ b/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt >@@ -0,0 +1 @@ >+ PASS if no crash or assert. >diff --git a/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html b/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html >new file mode 100644 >index 0000000000000000000000000000000000000000..26cbe1b160a46fd9d1bf871dc153ec0a1f8037be >--- /dev/null >+++ b/LayoutTests/fast/forms/webkit-appearance-searchfield-cancel-button-crash.html >@@ -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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189302
:
358204
|
358278
|
358280