haikuwebkit/LayoutTests/fast/rendering
Julian Gonzalez 211cacb1c4 Crash in WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart() from large scale
https://bugs.webkit.org/show_bug.cgi?id=221635

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-02-12
Reviewed by Darin Adler.

Source/WebCore:

Test: platform/mac/editing/style/large-scale-crash.html

paintSearchFieldResultsDecorationPart(), unlike other functions like
paintSearchField(), paintSearchFieldCancelButton(), etc. has been
calling [NSButton:drawWithFrame:inView] directly. When a very large
scale has been applied however, this can lead to an assertion below us.
First draw the cell to an ImageBuffer using
paintCellAndSetFocusedElementNeedsRepaintIfNecessary(), as other
functions are already doing (as of 213352).
Thanks to Aditya Keerthi for pointing out this difference
and help with the fix.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):

LayoutTests:

Add a test with a very large value of scale that tests that
we do not trigger the assertion here.
Thanks to Ryosuke Niwa for help in cleaning up the test
and making it more reliable.

* fast/rendering/searchfield-scale-crash-expected.txt: Added.
* fast/rendering/searchfield-scale-crash.html: Added.

Canonical link: https://commits.webkit.org/234030@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-12 19:08:28 +00:00
..
iframe-window-animation-modifies-iframe-srcdoc-crash-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
iframe-window-animation-modifies-iframe-srcdoc-crash.html REGRESSION(r260800): Null Ptr Deref READ @ WTF::Optional<WTF::Seconds>::clear 2020-06-25 22:12:15 +00:00
nested-render-tree-update-crash-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
nested-render-tree-update-crash.html
searchfield-scale-crash-expected.txt Crash in WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart() from large scale 2021-02-12 19:08:28 +00:00
searchfield-scale-crash.html Crash in WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart() from large scale 2021-02-12 19:08:28 +00:00
widget-removal-in-render-tree-builder-crash-expected.txt Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder 2020-06-14 23:45:05 +00:00
widget-removal-in-render-tree-builder-crash.html Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder 2020-06-14 23:45:05 +00:00