WebKit Bugzilla
Attachment 342909 Details for
Bug 186219
: [GTK] Correct behavior for dark themes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186219-20180617094312.patch (text/plain), 4.48 KB, created by
Carlos Bentzen
on 2018-06-17 00:43:14 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Bentzen
Created:
2018-06-17 00:43:14 PDT
Size:
4.48 KB
patch
obsolete
>Subversion Revision: 232910 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 221ee25c8a76f15c811f340c95052f410bd125b0..b98d44185baa9aaacf201b6be33c1816bf550e58 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-13 Carlos Eduardo Ramalho <cadubentzen@gmail.com> >+ >+ [GTK] Correct behavior for dark themes >+ https://bugs.webkit.org/show_bug.cgi?id=186219 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Override RenderThemeGtk::isControlStyled() to not style >+ text inputs if color is set different than default. >+ >+ No new tests. Manual theme test and existing layout tests already cover it. >+ >+ * rendering/RenderThemeGtk.cpp: >+ (WebCore::RenderThemeGtk::isControlStyled const): >+ * rendering/RenderThemeGtk.h: >+ > 2018-06-16 Chris Dumez <cdumez@apple.com> > > Better pack ResourceResponse >diff --git a/Source/WebCore/rendering/RenderThemeGtk.cpp b/Source/WebCore/rendering/RenderThemeGtk.cpp >index f549471d31f1f74715173ed327c47394858e4023..d04a6845f26a3fd0d5608f7a63bbf5f30ff68844 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.cpp >+++ b/Source/WebCore/rendering/RenderThemeGtk.cpp >@@ -924,6 +924,15 @@ bool RenderThemeGtk::paintMenuListButtonDecorations(const RenderBox& object, con > return paintMenuList(object, info, rect); > } > >+bool RenderThemeGtk::isControlStyled(const RenderStyle& style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const >+{ >+ // To avoid rendering issues with dark themes, if text input elements have color styling, we don't style them with GTK. >+ if ((style.appearance() == TextFieldPart || style.appearance() == TextAreaPart || style.appearance() == SearchFieldPart) && style.color() != RenderStyle::initialColor()) >+ return true; >+ >+ return RenderTheme::isControlStyled(style, border, background, backgroundColor); >+} >+ > #if GTK_CHECK_VERSION(3, 20, 0) > > static IntSize spinButtonSize() >diff --git a/Source/WebCore/rendering/RenderThemeGtk.h b/Source/WebCore/rendering/RenderThemeGtk.h >index 31ee7b7a3026616ecbdf49464595e18a8d176924..097f9418430893eddc14f653714c6acc5529b83c 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.h >+++ b/Source/WebCore/rendering/RenderThemeGtk.h >@@ -168,6 +168,8 @@ private: > #endif > #endif > >+ bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color&) const override; >+ > Seconds animationRepeatIntervalForProgressBar(RenderProgress&) const override; > Seconds animationDurationForProgressBar(RenderProgress&) const override; > void adjustProgressBarStyle(StyleResolver&, RenderStyle&, const Element*) const override; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index a48efc712aac8a90cc5a653b654ea6195b1ce772..70fe10e79409731524788d88ea28214b1ff40aa0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-13 Carlos Eduardo Ramalho <cadubentzen@gmail.com> >+ >+ [GTK] Correct behavior for dark themes >+ https://bugs.webkit.org/show_bug.cgi?id=186219 >+ >+ Update expectations in reftests expected to fail due to not >+ styling text inputs with GTK when color is different than default color. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/gtk/TestExpectations: >+ > 2018-06-16 Brendan McLoughlin <brendan@bocoup.com> > > Sync additional web-platform-tests directories up to 197cdad >diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations >index d5dab74644561dbb663a1aa5e1a10cf38fa8c67e..cac2489a475b593a9614718e45e5586c270d9883 100644 >--- a/LayoutTests/platform/gtk/TestExpectations >+++ b/LayoutTests/platform/gtk/TestExpectations >@@ -1167,6 +1167,12 @@ webkit.org/b/186086 fast/text/font-collection.html [ ImageOnlyFailure ] > # Test does not make sense for our platform > webkit.org/b/181659 fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.html [ Skip ] > >+# When text input colors are set we do not style with GTK, so these reftests will fail >+webkit.org/b/186219 fast/forms/input-placeholder-text-indent.html [ ImageOnlyFailure ] >+webkit.org/b/186219 fast/forms/password-placeholder-text-security.html [ ImageOnlyFailure ] >+webkit.org/b/186219 fast/forms/placeholder-with-positioned-element.html [ ImageOnlyFailure ] >+webkit.org/b/186219 fast/forms/textarea-placeholder-wrapping.html [ ImageOnlyFailure ] >+ > #//////////////////////////////////////////////////////////////////////////////////////// > # End of Expected failures. > #
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 186219
:
342732
| 342909