Changeset 168683 in webkit
- Timestamp:
- May 13, 2014 8:34:00 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r168681 r168683 1 2014-05-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed 4 https://bugs.webkit.org/show_bug.cgi?id=132864 5 6 Reviewed by Philippe Normand. 7 8 This is because the virtual methods changed the API in the parent, 9 and since we don't have the methods marked as override we didn't 10 noticed it. After using override keyword for all virtual methods 11 in the derived class another problem showed up, the ActiveListBox 12 selection methods were incorrectly named. 13 14 * platform/gtk/RenderThemeGtk.cpp: 15 (WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the 16 parent class. 17 * platform/gtk/RenderThemeGtk.h: Mark all virtual methods as 18 override and the class as final. 19 * platform/gtk/RenderThemeGtk2.cpp: 20 (WebCore::RenderThemeGtk::paintTextField): Update to API changes 21 in the parent class. 22 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): 23 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): 24 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): 25 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): 26 (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted. 27 (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted. 28 (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted. 29 (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted. 30 * platform/gtk/RenderThemeGtk3.cpp: 31 (WebCore::RenderThemeGtk::paintTextField): Update to API changes 32 in the parent class. 33 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): 34 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): 35 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): 36 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): 37 (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted. 38 (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted. 39 (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted. 40 (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted. 41 1 42 2014-05-13 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 43 -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
r168601 r168683 247 247 } 248 248 249 bool RenderThemeGtk::paintTextArea(const RenderObject& o, const PaintInfo& i, const IntRect& r)249 bool RenderThemeGtk::paintTextArea(const RenderObject& o, const PaintInfo& i, const FloatRect& r) 250 250 { 251 251 return paintTextField(o, i, r); -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h
r168601 r168683 36 36 namespace WebCore { 37 37 38 class RenderThemeGtk : public RenderTheme {38 class RenderThemeGtk final : public RenderTheme { 39 39 private: 40 40 RenderThemeGtk(); … … 45 45 46 46 // A method asking if the theme's controls actually care about redrawing when hovered. 47 virtual bool supportsHover(const RenderStyle*) const { return true; }47 virtual bool supportsHover(const RenderStyle*) const override { return true; } 48 48 49 49 // A method asking if the theme is able to draw the focus ring. 50 virtual bool supportsFocusRing(const RenderStyle*) const ;50 virtual bool supportsFocusRing(const RenderStyle*) const override; 51 51 52 52 // A method asking if the control changes its tint when the window has focus or not. 53 virtual bool controlSupportsTints(const RenderObject&) const ;53 virtual bool controlSupportsTints(const RenderObject&) const override; 54 54 55 55 // A general method asking if any control tinting is supported at all. 56 virtual bool supportsControlTints() const { return true; }57 58 virtual void adjustRepaintRect(const RenderObject&, IntRect&) ;56 virtual bool supportsControlTints() const override { return true; } 57 58 virtual void adjustRepaintRect(const RenderObject&, IntRect&) override; 59 59 60 60 // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline 61 61 // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of 62 62 // controls that need to do this. 63 virtual int baselinePosition(const RenderObject&) const ;63 virtual int baselinePosition(const RenderObject&) const override; 64 64 65 65 // The platform selection color. 66 virtual Color platformActiveSelectionBackgroundColor() const ;67 virtual Color platformInactiveSelectionBackgroundColor() const ;68 virtual Color platformActiveSelectionForegroundColor() const ;69 virtual Color platformInactiveSelectionForegroundColor() const ;66 virtual Color platformActiveSelectionBackgroundColor() const override; 67 virtual Color platformInactiveSelectionBackgroundColor() const override; 68 virtual Color platformActiveSelectionForegroundColor() const override; 69 virtual Color platformInactiveSelectionForegroundColor() const override; 70 70 71 71 // List Box selection color 72 virtual Color activeListBoxSelectionBackgroundColor() const;73 virtual Color activeListBoxSelectionForegroundColor() const;74 virtual Color inactiveListBoxSelectionBackgroundColor() const;75 virtual Color inactiveListBoxSelectionForegroundColor() const;76 77 virtual double caretBlinkInterval() const ;78 79 virtual void platformColorsDidChange() ;72 virtual Color platformActiveListBoxSelectionBackgroundColor() const override; 73 virtual Color platformActiveListBoxSelectionForegroundColor() const override; 74 virtual Color platformInactiveListBoxSelectionBackgroundColor() const override; 75 virtual Color platformInactiveListBoxSelectionForegroundColor() const override; 76 77 virtual double caretBlinkInterval() const override; 78 79 virtual void platformColorsDidChange() override; 80 80 81 81 // System fonts and colors. 82 virtual void systemFont(CSSValueID, FontDescription&) const ;83 virtual Color systemColor(CSSValueID) const ;82 virtual void systemFont(CSSValueID, FontDescription&) const override; 83 virtual Color systemColor(CSSValueID) const override; 84 84 85 85 virtual bool popsMenuBySpaceOrReturn() const override { return true; } 86 86 87 87 #if ENABLE(VIDEO) 88 virtual String extraMediaControlsStyleSheet() ;89 virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const ;88 virtual String extraMediaControlsStyleSheet() override; 89 virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const override; 90 90 virtual bool supportsClosedCaptioning() const override { return true; } 91 virtual String mediaControlsScript() ;91 virtual String mediaControlsScript() override; 92 92 93 93 #if ENABLE(FULLSCREEN_API) 94 virtual String extraFullScreenStyleSheet() ;94 virtual String extraFullScreenStyleSheet() override; 95 95 #endif 96 96 #endif … … 99 99 // Returns size of one slider tick mark for a horizontal track. 100 100 // For vertical tracks we rotate it and use it. i.e. Width is always length along the track. 101 virtual IntSize sliderTickSize() const ;101 virtual IntSize sliderTickSize() const override; 102 102 // Returns the distance of slider tick origin from the slider track center. 103 virtual int sliderTickOffsetFromTrackCenter() const ;103 virtual int sliderTickOffsetFromTrackCenter() const override; 104 104 #endif 105 105 … … 114 114 #endif 115 115 116 pr otected:117 virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) ;118 virtual void setCheckboxSize(RenderStyle* style) const;119 120 virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) ;121 virtual void setRadioSize(RenderStyle* style) const;122 123 virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const ;124 virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) ;125 126 virtual bool paintTextField(const RenderObject&, const PaintInfo&, const IntRect&);127 virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const IntRect&);128 129 int popupInternalPaddingLeft(RenderStyle*) const ;130 int popupInternalPaddingRight(RenderStyle*) const ;131 int popupInternalPaddingTop(RenderStyle*) const ;132 int popupInternalPaddingBottom(RenderStyle*) const ;116 private: 117 virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) override; 118 virtual void setCheckboxSize(RenderStyle*) const override; 119 120 virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) override; 121 virtual void setRadioSize(RenderStyle*) const override; 122 123 virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const override; 124 virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 125 126 virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override; 127 virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override; 128 129 int popupInternalPaddingLeft(RenderStyle*) const override; 130 int popupInternalPaddingRight(RenderStyle*) const override; 131 int popupInternalPaddingTop(RenderStyle*) const override; 132 int popupInternalPaddingBottom(RenderStyle*) const override; 133 133 134 134 // The Mac port differentiates between the "menu list" and the "menu list button." … … 136 136 // Aqua themed controls whenever possible. We always want to use GTK+ theming, so 137 137 // we don't maintain this differentiation. 138 virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const ;139 virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const ;140 virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&) ;141 virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) ;142 143 virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const ;144 virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) ;145 146 virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const ;147 virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) ;148 149 virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const ;138 virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const override; 139 virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const override; 140 virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&) override; 141 virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override; 142 143 virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const override; 144 virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override; 145 146 virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const override; 147 virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override; 148 149 virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const override; 150 150 virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&); 151 151 152 virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const ;153 virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) ;154 155 virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) ;156 virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const ;157 158 virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) ;159 virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const ;160 161 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const ;152 virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const override; 153 virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 154 155 virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override; 156 virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const override; 157 158 virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override; 159 virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const override; 160 161 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const override; 162 162 163 163 #if ENABLE(VIDEO) 164 164 void initMediaColors(); 165 165 void initMediaButtons(); 166 virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const ;167 virtual bool paintMediaFullscreenButton(const RenderObject&, const PaintInfo&, const IntRect&) ;168 virtual bool paintMediaPlayButton(const RenderObject&, const PaintInfo&, const IntRect&) ;169 virtual bool paintMediaMuteButton(const RenderObject&, const PaintInfo&, const IntRect&) ;170 virtual bool paintMediaSeekBackButton(const RenderObject&, const PaintInfo&, const IntRect&) ;171 virtual bool paintMediaSeekForwardButton(const RenderObject&, const PaintInfo&, const IntRect&) ;172 virtual bool paintMediaSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) ;173 virtual bool paintMediaSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) ;174 virtual bool paintMediaVolumeSliderContainer(const RenderObject&, const PaintInfo&, const IntRect&) ;175 virtual bool paintMediaVolumeSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) ;176 virtual bool paintMediaVolumeSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) ;177 virtual bool paintMediaCurrentTime(const RenderObject&, const PaintInfo&, const IntRect&) ;166 virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const override; 167 virtual bool paintMediaFullscreenButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 168 virtual bool paintMediaPlayButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 169 virtual bool paintMediaMuteButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 170 virtual bool paintMediaSeekBackButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 171 virtual bool paintMediaSeekForwardButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 172 virtual bool paintMediaSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override; 173 virtual bool paintMediaSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override; 174 virtual bool paintMediaVolumeSliderContainer(const RenderObject&, const PaintInfo&, const IntRect&) override; 175 virtual bool paintMediaVolumeSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override; 176 virtual bool paintMediaVolumeSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override; 177 virtual bool paintMediaCurrentTime(const RenderObject&, const PaintInfo&, const IntRect&) override; 178 178 #if ENABLE(VIDEO_TRACK) 179 virtual bool paintMediaToggleClosedCaptionsButton(const RenderObject&, const PaintInfo&, const IntRect&) ;179 virtual bool paintMediaToggleClosedCaptionsButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 180 180 #endif 181 181 #endif 182 182 183 183 #if ENABLE(PROGRESS_ELEMENT) 184 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const; 185 virtual double animationDurationForProgressBar(RenderProgress*) const; 186 virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const; 187 virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&); 188 #endif 189 190 virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&); 191 192 virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const; 193 virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&); 194 195 private: 184 virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const override; 185 virtual double animationDurationForProgressBar(RenderProgress*) const override; 186 virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const override; 187 virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override; 188 #endif 189 190 virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&) override; 191 192 virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const override; 193 virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override; 194 196 195 virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const override; 197 196 -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
r167755 r168683 423 423 } 424 424 425 bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const PaintInfo& info, const IntRect& rect)425 bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const PaintInfo& info, const FloatRect& rect) 426 426 { 427 427 GtkWidget* widget = gtkEntry(); … … 433 433 setWidgetHasFocus(widget, isFocused(renderObject)); 434 434 435 WidgetRenderingContext widgetContext(info.context, rect);436 IntRect textFieldRect(IntPoint(), rect.size());435 WidgetRenderingContext widgetContext(info.context, IntRect(rect)); 436 IntRect textFieldRect(IntPoint(), IntSize(rect.size())); 437 437 438 438 // The entry background is only painted over the interior part of the GTK+ entry, not … … 700 700 } 701 701 702 Color RenderThemeGtk:: activeListBoxSelectionBackgroundColor() const702 Color RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor() const 703 703 { 704 704 GtkWidget* widget = gtkTreeView(); … … 706 706 } 707 707 708 Color RenderThemeGtk:: inactiveListBoxSelectionBackgroundColor() const708 Color RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor() const 709 709 { 710 710 GtkWidget* widget = gtkTreeView(); … … 712 712 } 713 713 714 Color RenderThemeGtk:: activeListBoxSelectionForegroundColor() const714 Color RenderThemeGtk::platformActiveListBoxSelectionForegroundColor() const 715 715 { 716 716 GtkWidget* widget = gtkTreeView(); … … 718 718 } 719 719 720 Color RenderThemeGtk:: inactiveListBoxSelectionForegroundColor() const720 Color RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor() const 721 721 { 722 722 GtkWidget* widget = gtkTreeView(); -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
r167755 r168683 596 596 } 597 597 598 bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)598 bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const PaintInfo& paintInfo, const FloatRect& rect) 599 599 { 600 600 GtkStyleContext* context = getStyleContext(GTK_TYPE_ENTRY); … … 962 962 } 963 963 964 Color RenderThemeGtk:: activeListBoxSelectionBackgroundColor() const964 Color RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor() const 965 965 { 966 966 GdkRGBA gdkRGBAColor; … … 969 969 } 970 970 971 Color RenderThemeGtk:: inactiveListBoxSelectionBackgroundColor() const971 Color RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor() const 972 972 { 973 973 GdkRGBA gdkRGBAColor; … … 976 976 } 977 977 978 Color RenderThemeGtk:: activeListBoxSelectionForegroundColor() const978 Color RenderThemeGtk::platformActiveListBoxSelectionForegroundColor() const 979 979 { 980 980 GdkRGBA gdkRGBAColor; … … 983 983 } 984 984 985 Color RenderThemeGtk:: inactiveListBoxSelectionForegroundColor() const985 Color RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor() const 986 986 { 987 987 GdkRGBA gdkRGBAColor;
Note: See TracChangeset
for help on using the changeset viewer.