WebKit Bugzilla
Attachment 373259 Details for
Bug 199377
: [WPE] Draw other button types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199377-20190701155927.patch (text/plain), 2.12 KB, created by
Joshua Watt
on 2019-07-01 13:59:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joshua Watt
Created:
2019-07-01 13:59:28 PDT
Size:
2.12 KB
patch
obsolete
>Subversion Revision: 246677 >diff --git a/Source/WebCore/platform/wpe/ThemeWPE.cpp b/Source/WebCore/platform/wpe/ThemeWPE.cpp >index e22a2947ee727aaf80db706ab767a7e6a1845f92..18dd9880322b000795605ae187022bbbefdd21c8 100644 >--- a/Source/WebCore/platform/wpe/ThemeWPE.cpp >+++ b/Source/WebCore/platform/wpe/ThemeWPE.cpp >@@ -67,7 +67,10 @@ void ThemeWPE::paint(ControlPart part, ControlStates& states, GraphicsContext& c > paintRadio(states, context, zoomedRect, zoomFactor); > break; > case PushButtonPart: >- paintButton(states, context, zoomedRect, zoomFactor); >+ case DefaultButtonPart: >+ case ButtonPart: >+ case SquareButtonPart: >+ paintButton(part, states, context, zoomedRect, zoomFactor); > break; > default: > break; >@@ -129,11 +132,16 @@ void ThemeWPE::paintRadio(ControlStates& states, GraphicsContext& context, const > } > } > >-void ThemeWPE::paintButton(ControlStates& states, GraphicsContext& context, const FloatRect& zoomedRect, float) >+void ThemeWPE::paintButton(ControlPart part, ControlStates& states, GraphicsContext& context, const FloatRect& zoomedRect, float) > { > GraphicsContextStateSaver stateSaver(context); > >- FloatSize corner(2, 2); >+ float roundness = 2; >+ >+ if (part == SquareButtonPart) >+ roundness = 0; >+ >+ FloatSize corner(roundness, roundness); > FloatRoundedRect roundedRect(zoomedRect, corner, corner, corner, corner); > Path path; > path.addRoundedRect(roundedRect); >diff --git a/Source/WebCore/platform/wpe/ThemeWPE.h b/Source/WebCore/platform/wpe/ThemeWPE.h >index b176a802f2a98f4fa0c01baa67f598dc08ddc723..7c35dc5c0f92f6d0336e8ba713aa6d29ed8b0fc3 100644 >--- a/Source/WebCore/platform/wpe/ThemeWPE.h >+++ b/Source/WebCore/platform/wpe/ThemeWPE.h >@@ -37,7 +37,7 @@ private: > > void paintCheckbox(ControlStates&, GraphicsContext&, const FloatRect&, float); > void paintRadio(ControlStates&, GraphicsContext&, const FloatRect&, float); >- void paintButton(ControlStates&, GraphicsContext&, const FloatRect&, float); >+ void paintButton(ControlPart, ControlStates&, GraphicsContext&, const FloatRect&, float); > }; > > } // namespace WebCore
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 199377
:
373259
|
374239
|
374790
|
374889