WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-154708-20160225184938.patch (text/plain), 13.59 KB, created by
alan
on 2016-02-25 18:49:54 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2016-02-25 18:49:54 PST
Size:
13.59 KB
patch
obsolete
>Subversion Revision: 197032 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0e3e51aa2f96de5921d5d0929dc2175b94097f40..5a24abf17719dc5bf80f9f857dfc2483041efcb1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,31 @@ >+2016-02-25 Zalan Bujtas <zalan@apple.com> >+ >+ RenderTheme::controlSize* methods should take const RenderStyle&. >+ https://bugs.webkit.org/show_bug.cgi?id=154708 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No change in functionality. >+ >+ * rendering/RenderTheme.h: >+ (WebCore::RenderTheme::minimumMenuListSize): >+ (WebCore::RenderTheme::popupInternalPaddingLeft): >+ (WebCore::RenderTheme::popupInternalPaddingRight): >+ (WebCore::RenderTheme::popupInternalPaddingTop): >+ (WebCore::RenderTheme::popupInternalPaddingBottom): >+ * rendering/RenderThemeMac.h: >+ * rendering/RenderThemeMac.mm: >+ (WebCore::RenderThemeMac::controlSizeForFont): >+ (WebCore::RenderThemeMac::sizeForFont): >+ (WebCore::RenderThemeMac::sizeForSystemFont): >+ (WebCore::RenderThemeMac::controlSizeForSystemFont): >+ (WebCore::RenderThemeMac::minimumProgressBarHeight): >+ (WebCore::RenderThemeMac::popupInternalPaddingLeft): >+ (WebCore::RenderThemeMac::popupInternalPaddingRight): >+ (WebCore::RenderThemeMac::popupInternalPaddingTop): >+ (WebCore::RenderThemeMac::popupInternalPaddingBottom): >+ (WebCore::RenderThemeMac::minimumMenuListSize): >+ > 2016-02-24 Ryan Haddad <ryanhaddad@apple.com> > > Speculative fix for ios build. >diff --git a/Source/WebCore/rendering/RenderTheme.h b/Source/WebCore/rendering/RenderTheme.h >index c14e7d319372487684bb7f65d02ee0378922818c..7ba4112f50919f7150ca27ec1aa42958bad517a7 100644 >--- a/Source/WebCore/rendering/RenderTheme.h >+++ b/Source/WebCore/rendering/RenderTheme.h >@@ -180,14 +180,14 @@ public: > void systemFont(CSSValueID, FontCascadeDescription&) const; > virtual Color systemColor(CSSValueID) const; > >- virtual int minimumMenuListSize(RenderStyle&) const { return 0; } >+ virtual int minimumMenuListSize(const RenderStyle&) const { return 0; } > > virtual void adjustSliderThumbSize(RenderStyle&, Element*) const; > >- virtual int popupInternalPaddingLeft(RenderStyle&) const { return 0; } >- virtual int popupInternalPaddingRight(RenderStyle&) const { return 0; } >- virtual int popupInternalPaddingTop(RenderStyle&) const { return 0; } >- virtual int popupInternalPaddingBottom(RenderStyle&) const { return 0; } >+ virtual int popupInternalPaddingLeft(const RenderStyle&) const { return 0; } >+ virtual int popupInternalPaddingRight(const RenderStyle&) const { return 0; } >+ virtual int popupInternalPaddingTop(const RenderStyle&) const { return 0; } >+ virtual int popupInternalPaddingBottom(const RenderStyle&) const { return 0; } > virtual bool popupOptionSupportsTextIndent() const { return false; } > virtual PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle&, IntRect&) const { return PopupMenuStyle::PopupMenuSizeNormal; } > >diff --git a/Source/WebCore/rendering/RenderThemeGtk.cpp b/Source/WebCore/rendering/RenderThemeGtk.cpp >index e106dca1fb2c400cb4dd3c3c13c3441971f6a150..bb1e56c354ebf0105ca2e030caac9cba0b69f07f 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.cpp >+++ b/Source/WebCore/rendering/RenderThemeGtk.cpp >@@ -741,7 +741,7 @@ void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver& styleResolver, Ren > adjustMenuListStyle(styleResolver, style, e); > } > >-static void getComboBoxMetrics(RenderStyle& style, GtkBorder& border, int& focus) >+static void getComboBoxMetrics(const RenderStyle& style, GtkBorder& border, int& focus) > { > // If this menu list button isn't drawn using the native theme, we > // don't add any extra padding beyond what WebCore already uses. >@@ -760,7 +760,7 @@ static void getComboBoxMetrics(RenderStyle& style, GtkBorder& border, int& focus > focus = interiorFocus ? focusWidth + focusPad : 0; > } > >-int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle& style) const >+int RenderThemeGtk::popupInternalPaddingLeft(const RenderStyle& style) const > { > GtkBorder borderWidth = { 0, 0, 0, 0 }; > int focusWidth = 0; >@@ -771,7 +771,7 @@ int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle& style) const > return left; > } > >-int RenderThemeGtk::popupInternalPaddingRight(RenderStyle& style) const >+int RenderThemeGtk::popupInternalPaddingRight(const RenderStyle& style) const > { > GtkBorder borderWidth = { 0, 0, 0, 0 }; > int focusWidth = 0; >@@ -782,7 +782,7 @@ int RenderThemeGtk::popupInternalPaddingRight(RenderStyle& style) const > return right; > } > >-int RenderThemeGtk::popupInternalPaddingTop(RenderStyle& style) const >+int RenderThemeGtk::popupInternalPaddingTop(const RenderStyle& style) const > { > GtkBorder borderWidth = { 0, 0, 0, 0 }; > int focusWidth = 0; >@@ -790,7 +790,7 @@ int RenderThemeGtk::popupInternalPaddingTop(RenderStyle& style) const > return borderWidth.top + focusWidth; > } > >-int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle& style) const >+int RenderThemeGtk::popupInternalPaddingBottom(const RenderStyle& style) const > { > GtkBorder borderWidth = { 0, 0, 0, 0 }; > int focusWidth = 0; >diff --git a/Source/WebCore/rendering/RenderThemeGtk.h b/Source/WebCore/rendering/RenderThemeGtk.h >index ad33b80820a06a2eb459da3627e09eb629c77031..d19367226d7a5951d9626227b13d32e41c5a9592 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.h >+++ b/Source/WebCore/rendering/RenderThemeGtk.h >@@ -119,10 +119,10 @@ private: > virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override; > virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override; > >- virtual int popupInternalPaddingLeft(RenderStyle&) const override; >- virtual int popupInternalPaddingRight(RenderStyle&) const override; >- virtual int popupInternalPaddingTop(RenderStyle&) const override; >- virtual int popupInternalPaddingBottom(RenderStyle&) const override; >+ virtual int popupInternalPaddingLeft(const RenderStyle&) const override; >+ virtual int popupInternalPaddingRight(const RenderStyle&) const override; >+ virtual int popupInternalPaddingTop(const RenderStyle&) const override; >+ virtual int popupInternalPaddingBottom(const RenderStyle&) const override; > > // The Mac port differentiates between the "menu list" and the "menu list button." > // The former is used when a menu list button has been styled. This is used to ensure >diff --git a/Source/WebCore/rendering/RenderThemeMac.h b/Source/WebCore/rendering/RenderThemeMac.h >index 9e247c37c86b39c847c4711c28a127facfc146b4..89cca48562e695f4ba0a181a6ec0d87750360579 100644 >--- a/Source/WebCore/rendering/RenderThemeMac.h >+++ b/Source/WebCore/rendering/RenderThemeMac.h >@@ -66,7 +66,7 @@ public: > > virtual void platformColorsDidChange() override; > >- virtual int minimumMenuListSize(RenderStyle&) const override; >+ virtual int minimumMenuListSize(const RenderStyle&) const override; > > virtual void adjustSliderThumbSize(RenderStyle&, Element*) const override; > >@@ -75,10 +75,10 @@ public: > virtual int sliderTickOffsetFromTrackCenter() const override; > #endif > >- virtual int popupInternalPaddingLeft(RenderStyle&) const override; >- virtual int popupInternalPaddingRight(RenderStyle&) const override; >- virtual int popupInternalPaddingTop(RenderStyle&) const override; >- virtual int popupInternalPaddingBottom(RenderStyle&) const override; >+ virtual int popupInternalPaddingLeft(const RenderStyle&) const override; >+ virtual int popupInternalPaddingRight(const RenderStyle&) const override; >+ virtual int popupInternalPaddingTop(const RenderStyle&) const override; >+ virtual int popupInternalPaddingBottom(const RenderStyle&) const override; > virtual PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle&, IntRect&) const override; > > virtual bool popsMenuByArrowKeys() const override { return true; } >@@ -175,13 +175,13 @@ private: > virtual Color systemColor(CSSValueID) const override; > > // Get the control size based off the font. Used by some of the controls (like buttons). >- NSControlSize controlSizeForFont(RenderStyle&) const; >- NSControlSize controlSizeForSystemFont(RenderStyle&) const; >+ NSControlSize controlSizeForFont(const RenderStyle&) const; >+ NSControlSize controlSizeForSystemFont(const RenderStyle&) const; > NSControlSize controlSizeForCell(NSCell*, const IntSize* sizes, const IntSize& minSize, float zoomLevel = 1.0f) const; > void setControlSize(NSCell*, const IntSize* sizes, const IntSize& minSize, float zoomLevel = 1.0f); > void setSizeFromFont(RenderStyle&, const IntSize* sizes) const; >- IntSize sizeForFont(RenderStyle&, const IntSize* sizes) const; >- IntSize sizeForSystemFont(RenderStyle&, const IntSize* sizes) const; >+ IntSize sizeForFont(const RenderStyle&, const IntSize* sizes) const; >+ IntSize sizeForSystemFont(const RenderStyle&, const IntSize* sizes) const; > void setFontFromControlSize(StyleResolver&, RenderStyle&, NSControlSize) const; > > void updateCheckedState(NSCell*, const RenderObject&); >@@ -217,7 +217,7 @@ private: > NSLevelIndicatorCell *levelIndicatorFor(const RenderMeter&) const; > #endif > >- int minimumProgressBarHeight(RenderStyle&) const; >+ int minimumProgressBarHeight(const RenderStyle&) const; > const IntSize* progressBarSizes() const; > const int* progressBarMargins(NSControlSize) const; > >diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm >index a192b0e3c7ebc17a5fc8ed038eb2334bac3de72d..3b7f85ee21286d105d36b51d3a2020fe0398e0b1 100644 >--- a/Source/WebCore/rendering/RenderThemeMac.mm >+++ b/Source/WebCore/rendering/RenderThemeMac.mm >@@ -737,7 +737,7 @@ bool RenderThemeMac::controlSupportsTints(const RenderObject& o) const > return true; > } > >-NSControlSize RenderThemeMac::controlSizeForFont(RenderStyle& style) const >+NSControlSize RenderThemeMac::controlSizeForFont(const RenderStyle& style) const > { > int fontSize = style.fontSize(); > if (fontSize >= 16) >@@ -767,7 +767,7 @@ void RenderThemeMac::setControlSize(NSCell* cell, const IntSize* sizes, const In > [cell setControlSize:size]; > } > >-IntSize RenderThemeMac::sizeForFont(RenderStyle& style, const IntSize* sizes) const >+IntSize RenderThemeMac::sizeForFont(const RenderStyle& style, const IntSize* sizes) const > { > if (style.effectiveZoom() != 1.0f) { > IntSize result = sizes[controlSizeForFont(style)]; >@@ -776,7 +776,7 @@ IntSize RenderThemeMac::sizeForFont(RenderStyle& style, const IntSize* sizes) co > return sizes[controlSizeForFont(style)]; > } > >-IntSize RenderThemeMac::sizeForSystemFont(RenderStyle& style, const IntSize* sizes) const >+IntSize RenderThemeMac::sizeForSystemFont(const RenderStyle& style, const IntSize* sizes) const > { > if (style.effectiveZoom() != 1.0f) { > IntSize result = sizes[controlSizeForSystemFont(style)]; >@@ -812,7 +812,7 @@ void RenderThemeMac::setFontFromControlSize(StyleResolver&, RenderStyle& style, > style.fontCascade().update(0); > } > >-NSControlSize RenderThemeMac::controlSizeForSystemFont(RenderStyle& style) const >+NSControlSize RenderThemeMac::controlSizeForSystemFont(const RenderStyle& style) const > { > int fontSize = style.fontSize(); > if (fontSize >= [NSFont systemFontSizeForControlSize:NSRegularControlSize]) >@@ -1065,7 +1065,7 @@ IntRect RenderThemeMac::progressBarRectForBounds(const RenderObject& renderObjec > return inflatedRect; > } > >-int RenderThemeMac::minimumProgressBarHeight(RenderStyle& style) const >+int RenderThemeMac::minimumProgressBarHeight(const RenderStyle& style) const > { > return sizeForSystemFont(style, progressBarSizes()).height(); > } >@@ -1344,7 +1344,7 @@ void RenderThemeMac::adjustMenuListStyle(StyleResolver& styleResolver, RenderSty > style.setBoxShadow(nullptr); > } > >-int RenderThemeMac::popupInternalPaddingLeft(RenderStyle& style) const >+int RenderThemeMac::popupInternalPaddingLeft(const RenderStyle& style) const > { > if (style.appearance() == MenulistPart) > return popupButtonPadding(controlSizeForFont(style))[leftPadding] * style.effectiveZoom(); >@@ -1353,7 +1353,7 @@ int RenderThemeMac::popupInternalPaddingLeft(RenderStyle& style) const > return 0; > } > >-int RenderThemeMac::popupInternalPaddingRight(RenderStyle& style) const >+int RenderThemeMac::popupInternalPaddingRight(const RenderStyle& style) const > { > if (style.appearance() == MenulistPart) > return popupButtonPadding(controlSizeForFont(style))[rightPadding] * style.effectiveZoom(); >@@ -1365,7 +1365,7 @@ int RenderThemeMac::popupInternalPaddingRight(RenderStyle& style) const > return 0; > } > >-int RenderThemeMac::popupInternalPaddingTop(RenderStyle& style) const >+int RenderThemeMac::popupInternalPaddingTop(const RenderStyle& style) const > { > if (style.appearance() == MenulistPart) > return popupButtonPadding(controlSizeForFont(style))[topPadding] * style.effectiveZoom(); >@@ -1374,7 +1374,7 @@ int RenderThemeMac::popupInternalPaddingTop(RenderStyle& style) const > return 0; > } > >-int RenderThemeMac::popupInternalPaddingBottom(RenderStyle& style) const >+int RenderThemeMac::popupInternalPaddingBottom(const RenderStyle& style) const > { > if (style.appearance() == MenulistPart) > return popupButtonPadding(controlSizeForFont(style))[bottomPadding] * style.effectiveZoom(); >@@ -1441,7 +1441,7 @@ const IntSize* RenderThemeMac::menuListSizes() const > return sizes; > } > >-int RenderThemeMac::minimumMenuListSize(RenderStyle& style) const >+int RenderThemeMac::minimumMenuListSize(const RenderStyle& style) const > { > return sizeForSystemFont(style, menuListSizes()).width(); > }
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 154708
:
272277
|
272328