Diff
Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-01-15 12:37:36 UTC (rev 195121)
@@ -1,3 +1,18 @@
+2016-01-08 Zalan Bujtas <[email protected]>
+
+ Absolute positioning -webkit-search-cancel-button crashes Safari.
+ https://bugs.webkit.org/show_bug.cgi?id=152847
+ <rdar://problem/24112087>
+
+ Reviewed by Simon Fraser.
+
+ Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
+ It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
+ This patch also fixes a rendering glitch when the margin-right is > 0.
+
+ * fast/forms/absolute-positioned-custom-search-cancel-crash-expected.txt: Added.
+ * fast/forms/absolute-positioned-custom-search-cancel-crash.html: Added.
+
2015-12-09 Joanmarie Diggs <[email protected]>
AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash-expected.txt (0 => 195121)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash-expected.txt 2016-01-15 12:37:36 UTC (rev 195121)
@@ -0,0 +1 @@
+PASS if no crash.
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash.html (0 => 195121)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash.html (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/forms/absolute-positioned-custom-search-cancel-crash.html 2016-01-15 12:37:36 UTC (rev 195121)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that absolute positioned search/cancel button painting is not crashing</title>
+<style>
+#test {
+ border: 1px solid red;
+ padding-right: 20px;
+ padding-left: 50px;
+ -webkit-appearance: none;
+}
+
+#test::-webkit-search-cancel-button {
+ position: absolute;
+}
+</style>
+</head>
+<body>
+PASS if no crash.
+<input id="test" type="search">
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ document.getElementById("test").value = "foobar";
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-01-15 12:37:36 UTC (rev 195121)
@@ -1,3 +1,29 @@
+2016-01-08 Zalan Bujtas <[email protected]>
+
+ Absolute positioning -webkit-search-cancel-button crashes Safari.
+ https://bugs.webkit.org/show_bug.cgi?id=152847
+ <rdar://problem/24112087>
+
+ Reviewed by Simon Fraser.
+
+ Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
+ It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
+ This patch also fixes a rendering glitch when the margin-right is > 0.
+
+ Test: fast/forms/absolute-positioned-custom-search-cancel-crash.html
+
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintSearchFieldCancelButton):
+ (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
+ (WebCore::RenderTheme::paintSearchFieldResultsButton):
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::convertToPaintingPosition):
+ (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
+ (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
+ (WebCore::RenderThemeMac::convertToPaintingRect): Deleted.
+
2015-12-22 Michael Catanzaro <[email protected]>
[GTK] Everything broken in GTK+ 3.19
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTheme.h (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTheme.h 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTheme.h 2016-01-15 12:37:36 UTC (rev 195121)
@@ -340,16 +340,16 @@
virtual bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
- virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintSearchFieldCancelButton(const RenderBox&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const;
virtual bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const;
- virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
- virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintSearchFieldResultsButton(const RenderBox&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustMediaControlStyle(StyleResolver&, RenderStyle&, Element*) const;
virtual bool paintMediaFullscreenButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.cpp (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.cpp 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.cpp 2016-01-15 12:37:36 UTC (rev 195121)
@@ -1002,7 +1002,7 @@
adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
}
-bool RenderThemeGtk::paintSearchFieldResultsButton(const RenderObject& o, const PaintInfo& i, const IntRect& rect)
+bool RenderThemeGtk::paintSearchFieldResultsButton(const RenderBox& o, const PaintInfo& i, const IntRect& rect)
{
return paintSearchFieldResultsDecorationPart(o, i, rect);
}
@@ -1053,7 +1053,7 @@
return scaledRect;
}
-bool RenderThemeGtk::paintSearchFieldResultsDecorationPart(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
+bool RenderThemeGtk::paintSearchFieldResultsDecorationPart(const RenderBox& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
{
IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect);
if (iconRect.isEmpty())
@@ -1072,7 +1072,7 @@
adjustSearchFieldIconStyle(style);
}
-bool RenderThemeGtk::paintSearchFieldCancelButton(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
+bool RenderThemeGtk::paintSearchFieldCancelButton(const RenderBox& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
{
IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect);
if (iconRect.isEmpty())
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.h (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.h 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeGtk.h 2016-01-15 12:37:36 UTC (rev 195121)
@@ -133,16 +133,16 @@
virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldCancelButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element*) const override;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeMac.h (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeMac.h 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeMac.h 2016-01-15 12:37:36 UTC (rev 195121)
@@ -147,16 +147,16 @@
virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldCancelButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
#if ENABLE(VIDEO)
virtual bool supportsClosedCaptioning() const override { return true; }
@@ -175,8 +175,6 @@
private:
virtual String fileListNameForWidth(const FileList*, const FontCascade&, int width, bool multipleFilesAllowed) const override;
- FloatRect convertToPaintingRect(const RenderObject& inputRenderer, const RenderObject& partRenderer, const FloatRect& inputRect, const IntRect&) const;
-
virtual Color systemColor(CSSValueID) const override;
// Get the control size based off the font. Used by some of the controls (like buttons).
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.cpp (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.cpp 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.cpp 2016-01-15 12:37:36 UTC (rev 195121)
@@ -872,7 +872,7 @@
style.setOutlineOffset(-2);
}
-bool RenderThemeWin::paintSearchFieldCancelButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeWin::paintSearchFieldCancelButton(const RenderBox& o, const PaintInfo& paintInfo, const IntRect& r)
{
IntRect bounds = r;
ASSERT(o.parent());
@@ -921,7 +921,7 @@
style.setHeight(Length(magnifierSize, Fixed));
}
-bool RenderThemeWin::paintSearchFieldResultsDecorationPart(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeWin::paintSearchFieldResultsDecorationPart(const RenderBox& o, const PaintInfo& paintInfo, const IntRect& r)
{
IntRect bounds = r;
ASSERT(o.parent());
@@ -954,7 +954,7 @@
style.setHeight(Length(magnifierHeight, Fixed));
}
-bool RenderThemeWin::paintSearchFieldResultsButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeWin::paintSearchFieldResultsButton(const RenderBox& o, const PaintInfo& paintInfo, const IntRect& r)
{
IntRect bounds = r;
ASSERT(o.parent());
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.h (195120 => 195121)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.h 2016-01-15 12:37:09 UTC (rev 195120)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderThemeWin.h 2016-01-15 12:37:36 UTC (rev 195121)
@@ -99,16 +99,16 @@
virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldCancelButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override { return false; }
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ virtual bool paintSearchFieldResultsButton(const RenderBox&, const PaintInfo&, const IntRect&) override;
virtual void themeChanged() override;