And peavo@outlook.com <peavo@outlook.com>
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jun 2014 21:04:17 +0000 (21:04 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jun 2014 21:04:17 +0000 (21:04 +0000)
Use references instead of pointers in RenderTheme.
https://bugs.webkit.org/show_bug.cgi?id=134261

Reviewed by Zalan Bujtas.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::shouldHaveSpinButton):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::updateAppearance):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::supportsFocusRing):
(WebCore::RenderThemeGtk::adjustButtonStyle):
(WebCore::RenderThemeGtk::adjustMenuListStyle):
(WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldStyle):
(WebCore::RenderThemeGtk::adjustSliderTrackStyle):
(WebCore::RenderThemeGtk::adjustSliderThumbStyle):
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
(WebCore::RenderThemeGtk::adjustProgressBarStyle):
(WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeGtk::animationDurationForProgressBar):
(WebCore::RenderThemeGtk::calculateProgressRect):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::setToggleSize):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::RenderThemeGtk::comboBoxArrowSize):
(WebCore::RenderThemeGtk::getComboBoxPadding):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::setToggleSize):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::layout):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
* rendering/RenderMediaControls.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle):
(RenderMenuList::computeIntrinsicLogicalWidths):
(RenderMenuList::menuStyle):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::updateLogicalWidth):
(WebCore::RenderMeter::computeLogicalHeight):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::updateAnimationState):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::isControlStyled):
(WebCore::RenderTheme::supportsFocusRing):
(WebCore::RenderTheme::stateChanged):
(WebCore::RenderTheme::adjustCheckboxStyle):
(WebCore::RenderTheme::adjustRadioStyle):
(WebCore::RenderTheme::adjustButtonStyle):
(WebCore::RenderTheme::adjustInnerSpinButtonStyle):
(WebCore::RenderTheme::adjustTextFieldStyle):
(WebCore::RenderTheme::adjustTextAreaStyle):
(WebCore::RenderTheme::adjustMenuListStyle):
(WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
(WebCore::RenderTheme::adjustMeterStyle):
(WebCore::RenderTheme::meterSizeForBounds):
(WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
(WebCore::RenderTheme::animationDurationForProgressBar):
(WebCore::RenderTheme::adjustProgressBarStyle):
(WebCore::RenderTheme::shouldHaveSpinButton):
(WebCore::RenderTheme::adjustMediaControlStyle):
(WebCore::RenderTheme::adjustSliderTrackStyle):
(WebCore::RenderTheme::adjustSliderThumbStyle):
(WebCore::RenderTheme::adjustSliderThumbSize):
(WebCore::RenderTheme::adjustSearchFieldStyle):
(WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::supportsHover):
(WebCore::RenderTheme::minimumMenuListSize):
(WebCore::RenderTheme::popupInternalPaddingLeft):
(WebCore::RenderTheme::popupInternalPaddingRight):
(WebCore::RenderTheme::popupInternalPaddingTop):
(WebCore::RenderTheme::popupInternalPaddingBottom):
(WebCore::RenderTheme::popupMenuSize):
(WebCore::RenderTheme::setCheckboxSize):
(WebCore::RenderTheme::setRadioSize):
(WebCore::RenderTheme::setButtonSize):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle):
(WebCore::RenderThemeIOS::isControlStyled):
(WebCore::RenderThemeIOS::adjustRadioStyle):
(WebCore::RenderThemeIOS::popupInternalPaddingRight):
(WebCore::RenderThemeIOS::adjustRoundBorderRadius):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
(WebCore::RenderThemeIOS::adjustSliderTrackStyle):
(WebCore::RenderThemeIOS::adjustSliderThumbSize):
(WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeIOS::animationDurationForProgressBar):
(WebCore::RenderThemeIOS::adjustSearchFieldStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle):
(WebCore::RenderThemeIOS::setButtonSize):
(WebCore::RenderThemeIOS::shouldHaveSpinButton):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::isControlStyled):
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::setSizeFromFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::adjustTextFieldStyle):
(WebCore::RenderThemeMac::adjustTextAreaStyle):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::meterSizeForBounds):
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::progressBarRectForBounds):
(WebCore::RenderThemeMac::minimumProgressBarHeight):
(WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeMac::animationDurationForProgressBar):
(WebCore::RenderThemeMac::adjustProgressBarStyle):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::popupMenuSize):
(WebCore::RenderThemeMac::minimumMenuListSize):
(WebCore::RenderThemeMac::adjustSliderTrackStyle):
(WebCore::RenderThemeMac::adjustSliderThumbStyle):
(WebCore::RenderThemeMac::setSearchCellState):
(WebCore::RenderThemeMac::setSearchFieldSize):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::isControlStyled):
(WebCore::RenderThemeSafari::adjustRepaintRect):
(WebCore::RenderThemeSafari::baselinePosition):
(WebCore::RenderThemeSafari::controlSizeForFont):
(WebCore::RenderThemeSafari::sizeForFont):
(WebCore::RenderThemeSafari::sizeForSystemFont):
(WebCore::RenderThemeSafari::setSizeFromFont):
(WebCore::RenderThemeSafari::setFontFromControlSize):
(WebCore::RenderThemeSafari::controlSizeForSystemFont):
(WebCore::RenderThemeSafari::paintCheckbox):
(WebCore::RenderThemeSafari::setCheckboxSize):
(WebCore::RenderThemeSafari::paintRadio):
(WebCore::RenderThemeSafari::setRadioSize):
(WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
(WebCore::RenderThemeSafari::adjustButtonStyle):
(WebCore::RenderThemeSafari::setButtonSize):
(WebCore::RenderThemeSafari::adjustTextFieldStyle):
(WebCore::RenderThemeSafari::adjustTextAreaStyle):
(WebCore::RenderThemeSafari::paintMenuList):
(WebCore::RenderThemeSafari::adjustMenuListStyle):
(WebCore::RenderThemeSafari::popupInternalPaddingLeft):
(WebCore::RenderThemeSafari::popupInternalPaddingRight):
(WebCore::RenderThemeSafari::popupInternalPaddingTop):
(WebCore::RenderThemeSafari::popupInternalPaddingBottom):
(WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
(WebCore::RenderThemeSafari::minimumMenuListSize):
(WebCore::RenderThemeSafari::adjustSliderThumbStyle):
(WebCore::RenderThemeSafari::adjustSliderThumbSize):
(WebCore::RenderThemeSafari::setSearchFieldSize):
(WebCore::RenderThemeSafari::adjustSearchFieldStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeSafari::adjustMeterStyle):
(WebCore::RenderThemeSafari::meterSizeForBounds):
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::supportsHover):
(WebCore::RenderThemeWin::supportsFocusRing):
(WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeWin::setCheckboxSize):
(WebCore::RenderThemeWin::paintTextField):
(WebCore::RenderThemeWin::paintMenuList):
(WebCore::RenderThemeWin::adjustMenuListStyle):
(WebCore::RenderThemeWin::adjustMenuListButtonStyle):
(WebCore::RenderThemeWin::adjustSliderThumbSize):
(WebCore::RenderThemeWin::adjustSearchFieldStyle):
(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeWin::adjustMeterStyle):
(WebCore::RenderThemeWin::meterSizeForBounds):
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderThemeWin.h:
(WebCore::RenderThemeWin::paintCheckbox):
(WebCore::RenderThemeWin::paintRadio):
(WebCore::RenderThemeWin::setRadioSize):
(WebCore::RenderThemeWin::paintTextArea):
(WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
(WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
(WebCore::RenderThemeWin::adjustButtonStyle):
(WebCore::RenderThemeWin::adjustTextFieldStyle):
(WebCore::RenderThemeWin::adjustTextAreaStyle):
(WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.h
Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderMediaControls.cpp
Source/WebCore/rendering/RenderMediaControls.h
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMeter.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderProgress.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeIOS.h
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderThemeSafari.cpp
Source/WebCore/rendering/RenderThemeSafari.h
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebCore/rendering/RenderThemeWin.h

index 4784237..07aadda 100644 (file)
@@ -1,3 +1,269 @@
+2014-06-25  Alex Christensen  <achristensen@webkit.org>
+            And peavo@outlook.com  <peavo@outlook.com>
+
+        Use references instead of pointers in RenderTheme.
+        https://bugs.webkit.org/show_bug.cgi?id=134261
+
+        Reviewed by Zalan Bujtas.
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::adjustRenderStyle):
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::shouldHaveSpinButton):
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::RenderSliderThumb::updateAppearance):
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::adjustSizeConstraints):
+        (WebCore::RenderThemeEfl::applyEdjeRTLState):
+        (WebCore::RenderThemeEfl::isControlStyled):
+        (WebCore::RenderThemeEfl::paintThemePart):
+        (WebCore::RenderThemeEfl::supportsFocusRing):
+        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbSize):
+        (WebCore::RenderThemeEfl::adjustCheckboxStyle):
+        (WebCore::RenderThemeEfl::adjustRadioStyle):
+        (WebCore::RenderThemeEfl::adjustButtonStyle):
+        (WebCore::RenderThemeEfl::adjustMenuListStyle):
+        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeEfl::adjustTextFieldStyle):
+        (WebCore::RenderThemeEfl::adjustTextAreaStyle):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
+        (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
+        (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeEfl::animationDurationForProgressBar):
+        * platform/efl/RenderThemeEfl.h:
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::supportsFocusRing):
+        (WebCore::RenderThemeGtk::adjustButtonStyle):
+        (WebCore::RenderThemeGtk::adjustMenuListStyle):
+        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
+        (WebCore::adjustSearchFieldIconStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
+        (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
+        (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
+        (WebCore::borderRadiiFromStyle):
+        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
+        (WebCore::RenderThemeGtk::paintMediaSliderThumb):
+        (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
+        (WebCore::RenderThemeGtk::adjustProgressBarStyle):
+        (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeGtk::animationDurationForProgressBar):
+        (WebCore::RenderThemeGtk::calculateProgressRect):
+        * platform/gtk/RenderThemeGtk.h:
+        * platform/gtk/RenderThemeGtk2.cpp:
+        (WebCore::setToggleSize):
+        (WebCore::RenderThemeGtk::setCheckboxSize):
+        (WebCore::RenderThemeGtk::setRadioSize):
+        (WebCore::RenderThemeGtk::comboBoxArrowSize):
+        (WebCore::RenderThemeGtk::getComboBoxPadding):
+        (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
+        (WebCore::RenderThemeGtk::popupInternalPaddingRight):
+        (WebCore::RenderThemeGtk::popupInternalPaddingTop):
+        (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
+        (WebCore::RenderThemeGtk::paintMenuList):
+        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
+        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
+        * platform/gtk/RenderThemeGtk3.cpp:
+        (WebCore::setToggleSize):
+        (WebCore::RenderThemeGtk::setCheckboxSize):
+        (WebCore::RenderThemeGtk::setRadioSize):
+        (WebCore::getComboBoxMetrics):
+        (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
+        (WebCore::RenderThemeGtk::popupInternalPaddingRight):
+        (WebCore::RenderThemeGtk::popupInternalPaddingTop):
+        (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
+        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
+        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
+        * rendering/RenderButton.cpp:
+        (WebCore::RenderButton::layout):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::paintOutline):
+        * rendering/RenderMediaControls.cpp:
+        (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
+        * rendering/RenderMediaControls.h:
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::adjustInnerStyle):
+        (RenderMenuList::computeIntrinsicLogicalWidths):
+        (RenderMenuList::menuStyle):
+        * rendering/RenderMeter.cpp:
+        (WebCore::RenderMeter::updateLogicalWidth):
+        (WebCore::RenderMeter::computeLogicalHeight):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::paintOutline):
+        * rendering/RenderProgress.cpp:
+        (WebCore::RenderProgress::updateAnimationState):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::layout):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::adjustStyle):
+        (WebCore::RenderTheme::isControlStyled):
+        (WebCore::RenderTheme::supportsFocusRing):
+        (WebCore::RenderTheme::stateChanged):
+        (WebCore::RenderTheme::adjustCheckboxStyle):
+        (WebCore::RenderTheme::adjustRadioStyle):
+        (WebCore::RenderTheme::adjustButtonStyle):
+        (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
+        (WebCore::RenderTheme::adjustTextFieldStyle):
+        (WebCore::RenderTheme::adjustTextAreaStyle):
+        (WebCore::RenderTheme::adjustMenuListStyle):
+        (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
+        (WebCore::RenderTheme::adjustMeterStyle):
+        (WebCore::RenderTheme::meterSizeForBounds):
+        (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderTheme::animationDurationForProgressBar):
+        (WebCore::RenderTheme::adjustProgressBarStyle):
+        (WebCore::RenderTheme::shouldHaveSpinButton):
+        (WebCore::RenderTheme::adjustMediaControlStyle):
+        (WebCore::RenderTheme::adjustSliderTrackStyle):
+        (WebCore::RenderTheme::adjustSliderThumbStyle):
+        (WebCore::RenderTheme::adjustSliderThumbSize):
+        (WebCore::RenderTheme::adjustSearchFieldStyle):
+        (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::supportsHover):
+        (WebCore::RenderTheme::minimumMenuListSize):
+        (WebCore::RenderTheme::popupInternalPaddingLeft):
+        (WebCore::RenderTheme::popupInternalPaddingRight):
+        (WebCore::RenderTheme::popupInternalPaddingTop):
+        (WebCore::RenderTheme::popupInternalPaddingBottom):
+        (WebCore::RenderTheme::popupMenuSize):
+        (WebCore::RenderTheme::setCheckboxSize):
+        (WebCore::RenderTheme::setRadioSize):
+        (WebCore::RenderTheme::setButtonSize):
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::adjustCheckboxStyle):
+        (WebCore::RenderThemeIOS::isControlStyled):
+        (WebCore::RenderThemeIOS::adjustRadioStyle):
+        (WebCore::RenderThemeIOS::popupInternalPaddingRight):
+        (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
+        (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
+        (WebCore::RenderThemeIOS::adjustSliderThumbSize):
+        (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeIOS::animationDurationForProgressBar):
+        (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
+        (WebCore::RenderThemeIOS::adjustButtonStyle):
+        (WebCore::RenderThemeIOS::setButtonSize):
+        (WebCore::RenderThemeIOS::shouldHaveSpinButton):
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::isControlStyled):
+        (WebCore::RenderThemeMac::controlSizeForFont):
+        (WebCore::RenderThemeMac::sizeForFont):
+        (WebCore::RenderThemeMac::sizeForSystemFont):
+        (WebCore::RenderThemeMac::setSizeFromFont):
+        (WebCore::RenderThemeMac::setFontFromControlSize):
+        (WebCore::RenderThemeMac::controlSizeForSystemFont):
+        (WebCore::RenderThemeMac::adjustTextFieldStyle):
+        (WebCore::RenderThemeMac::adjustTextAreaStyle):
+        (WebCore::RenderThemeMac::paintMenuList):
+        (WebCore::RenderThemeMac::meterSizeForBounds):
+        (WebCore::RenderThemeMac::paintMeter):
+        (WebCore::RenderThemeMac::levelIndicatorFor):
+        (WebCore::RenderThemeMac::progressBarRectForBounds):
+        (WebCore::RenderThemeMac::minimumProgressBarHeight):
+        (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeMac::animationDurationForProgressBar):
+        (WebCore::RenderThemeMac::adjustProgressBarStyle):
+        (WebCore::RenderThemeMac::paintProgressBar):
+        (WebCore::RenderThemeMac::adjustMenuListStyle):
+        (WebCore::RenderThemeMac::popupInternalPaddingLeft):
+        (WebCore::RenderThemeMac::popupInternalPaddingRight):
+        (WebCore::RenderThemeMac::popupInternalPaddingTop):
+        (WebCore::RenderThemeMac::popupInternalPaddingBottom):
+        (WebCore::RenderThemeMac::popupMenuSize):
+        (WebCore::RenderThemeMac::minimumMenuListSize):
+        (WebCore::RenderThemeMac::adjustSliderTrackStyle):
+        (WebCore::RenderThemeMac::adjustSliderThumbStyle):
+        (WebCore::RenderThemeMac::setSearchCellState):
+        (WebCore::RenderThemeMac::setSearchFieldSize):
+        (WebCore::RenderThemeMac::adjustSearchFieldStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeMac::adjustSliderThumbSize):
+        * rendering/RenderThemeSafari.cpp:
+        (WebCore::RenderThemeSafari::isControlStyled):
+        (WebCore::RenderThemeSafari::adjustRepaintRect):
+        (WebCore::RenderThemeSafari::baselinePosition):
+        (WebCore::RenderThemeSafari::controlSizeForFont):
+        (WebCore::RenderThemeSafari::sizeForFont):
+        (WebCore::RenderThemeSafari::sizeForSystemFont):
+        (WebCore::RenderThemeSafari::setSizeFromFont):
+        (WebCore::RenderThemeSafari::setFontFromControlSize):
+        (WebCore::RenderThemeSafari::controlSizeForSystemFont):
+        (WebCore::RenderThemeSafari::paintCheckbox):
+        (WebCore::RenderThemeSafari::setCheckboxSize):
+        (WebCore::RenderThemeSafari::paintRadio):
+        (WebCore::RenderThemeSafari::setRadioSize):
+        (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
+        (WebCore::RenderThemeSafari::adjustButtonStyle):
+        (WebCore::RenderThemeSafari::setButtonSize):
+        (WebCore::RenderThemeSafari::adjustTextFieldStyle):
+        (WebCore::RenderThemeSafari::adjustTextAreaStyle):
+        (WebCore::RenderThemeSafari::paintMenuList):
+        (WebCore::RenderThemeSafari::adjustMenuListStyle):
+        (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
+        (WebCore::RenderThemeSafari::popupInternalPaddingRight):
+        (WebCore::RenderThemeSafari::popupInternalPaddingTop):
+        (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
+        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeSafari::minimumMenuListSize):
+        (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
+        (WebCore::RenderThemeSafari::adjustSliderThumbSize):
+        (WebCore::RenderThemeSafari::setSearchFieldSize):
+        (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeSafari::adjustMeterStyle):
+        (WebCore::RenderThemeSafari::meterSizeForBounds):
+        (WebCore::RenderThemeSafari::paintMeter):
+        * rendering/RenderThemeSafari.h:
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::supportsHover):
+        (WebCore::RenderThemeWin::supportsFocusRing):
+        (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeWin::setCheckboxSize):
+        (WebCore::RenderThemeWin::paintTextField):
+        (WebCore::RenderThemeWin::paintMenuList):
+        (WebCore::RenderThemeWin::adjustMenuListStyle):
+        (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeWin::adjustSliderThumbSize):
+        (WebCore::RenderThemeWin::adjustSearchFieldStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeWin::adjustMeterStyle):
+        (WebCore::RenderThemeWin::meterSizeForBounds):
+        (WebCore::RenderThemeWin::paintMeter):
+        * rendering/RenderThemeWin.h:
+        (WebCore::RenderThemeWin::paintCheckbox):
+        (WebCore::RenderThemeWin::paintRadio):
+        (WebCore::RenderThemeWin::setRadioSize):
+        (WebCore::RenderThemeWin::paintTextArea):
+        (WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
+        (WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
+        (WebCore::RenderThemeWin::adjustButtonStyle):
+        (WebCore::RenderThemeWin::adjustTextFieldStyle):
+        (WebCore::RenderThemeWin::adjustTextAreaStyle):
+        (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
+
 2014-06-25  Benjamin Poulain  <benjamin@webkit.org>
 
         [Mac] Update the time base of event's timestamp when the system time changes
index f290829..598a990 100644 (file)
@@ -1330,8 +1330,10 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
     }
 
     // Let the theme also have a crack at adjusting the style.
-    if (style.hasAppearance())
-        RenderTheme::defaultTheme()->adjustStyle(*this, style, e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
+    if (style.hasAppearance()) {
+        ASSERT(e);
+        RenderTheme::defaultTheme()->adjustStyle(*this, style, *e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
+    }
 
     // If we have first-letter pseudo style, do not share this style.
     if (style.hasPseudoStyle(FIRST_LETTER))
index c3f6ffa..0b88d03 100644 (file)
@@ -232,7 +232,7 @@ bool TextFieldInputType::shouldHaveSpinButton() const
 {
     Document& document = element().document();
     RefPtr<RenderTheme> theme = document.page() ? &document.page()->theme() : RenderTheme::defaultTheme();
-    return theme->shouldHaveSpinButton(&element());
+    return theme->shouldHaveSpinButton(element());
 }
 
 void TextFieldInputType::createShadowSubtree()
index 1979325..7c60dbf 100644 (file)
@@ -94,8 +94,10 @@ void RenderSliderThumb::updateAppearance(RenderStyle* parentStyle)
         style().setAppearance(MediaVolumeSliderThumbPart);
     else if (parentStyle->appearance() == MediaFullScreenVolumeSliderPart)
         style().setAppearance(MediaFullScreenVolumeSliderThumbPart);
-    if (style().hasAppearance())
-        theme().adjustSliderThumbSize(&style(), element());
+    if (style().hasAppearance()) {
+        ASSERT(element());
+        theme().adjustSliderThumbSize(style(), *element());
+    }
 }
 
 bool RenderSliderThumb::isSliderThumb() const
index 260c1fb..08d78dc 100755 (executable)
@@ -123,27 +123,27 @@ static bool setSourceGroupForEdjeObject(Evas_Object* o, const String& themePath,
     return true;
 }
 
-void RenderThemeEfl::adjustSizeConstraints(RenderStyle* style, FormType type) const
+void RenderThemeEfl::adjustSizeConstraints(RenderStyle& style, FormType type) const
 {
     loadThemeIfNeeded();
 
     // These are always valid, even if no theme could be loaded.
     const ThemePartDesc* desc = m_partDescs + (size_t)type;
 
-    if (style->minWidth().isIntrinsic())
-        style->setMinWidth(desc->min.width());
-    if (style->minHeight().isIntrinsic())
-        style->setMinHeight(desc->min.height());
+    if (style.minWidth().isIntrinsic())
+        style.setMinWidth(desc->min.width());
+    if (style.minHeight().isIntrinsic())
+        style.setMinHeight(desc->min.height());
 
-    if (desc->max.width().value() > 0 && style->maxWidth().isIntrinsicOrAuto())
-        style->setMaxWidth(desc->max.width());
-    if (desc->max.height().value() > 0 && style->maxHeight().isIntrinsicOrAuto())
-        style->setMaxHeight(desc->max.height());
+    if (desc->max.width().value() > 0 && style.maxWidth().isIntrinsicOrAuto())
+        style.setMaxWidth(desc->max.width());
+    if (desc->max.height().value() > 0 && style.maxHeight().isIntrinsicOrAuto())
+        style.setMaxHeight(desc->max.height());
 
-    style->setPaddingTop(desc->padding.top());
-    style->setPaddingBottom(desc->padding.bottom());
-    style->setPaddingLeft(desc->padding.left());
-    style->setPaddingRight(desc->padding.right());
+    style.setPaddingTop(desc->padding.top());
+    style.setPaddingBottom(desc->padding.bottom());
+    style.setPaddingLeft(desc->padding.left());
+    style.setPaddingRight(desc->padding.right());
 }
 
 static bool isFormElementTooLargeToDisplay(const IntSize& elementSize)
@@ -323,10 +323,10 @@ void RenderThemeEfl::applyEdjeRTLState(Evas_Object* edje, const RenderObject& ob
         msg->val[1] = (input.valueAsNumber() - input.minimum()) / valueRange;
         edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
     } else if (type == ProgressBar) {
-        const RenderProgress* renderProgress = toRenderProgress(&object);
+        const RenderProgress& renderProgress = toRenderProgress(object);
 
         int max = rect.width();
-        double value = renderProgress->position();
+        double value = renderProgress.position();
 
         OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(::operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
         msg->count = 2;
@@ -340,9 +340,9 @@ void RenderThemeEfl::applyEdjeRTLState(Evas_Object* edje, const RenderObject& ob
     }
 }
 
-bool RenderThemeEfl::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
+bool RenderThemeEfl::isControlStyled(const RenderStyle& style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
 {
-    return RenderTheme::isControlStyled(style, border, background, backgroundColor) || style->appearance() == MenulistButtonPart;
+    return RenderTheme::isControlStyled(style, border, background, backgroundColor) || style.appearance() == MenulistButtonPart;
 }
 
 bool RenderThemeEfl::paintThemePart(const RenderObject& object, FormType type, const PaintInfo& info, const IntRect& rect)
@@ -354,7 +354,7 @@ bool RenderThemeEfl::paintThemePart(const RenderObject& object, FormType type, c
     if (!entry)
         return false;
 
-    bool haveBackgroundColor = isControlStyled(&object.style(), object.style().border(), *object.style().backgroundLayers(), Color::white);
+    bool haveBackgroundColor = isControlStyled(object.style(), object.style().border(), *object.style().backgroundLayers(), Color::white);
     ControlStates states(extractControlStatesForRenderer(object));
     applyEdjeStateFromForm(entry->edje(), &states, haveBackgroundColor);
 
@@ -621,9 +621,9 @@ static bool supportsFocus(ControlPart appearance)
     }
 }
 
-bool RenderThemeEfl::supportsFocusRing(const RenderStyle* style) const
+bool RenderThemeEfl::supportsFocusRing(const RenderStyle& style) const
 {
-    return supportsFocus(style->appearance());
+    return supportsFocus(style.appearance());
 }
 
 bool RenderThemeEfl::controlSupportsTints(const RenderObject& object) const
@@ -693,26 +693,26 @@ bool RenderThemeEfl::paintSliderTrack(const RenderObject& object, const PaintInf
     return false;
 }
 
-void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-void RenderThemeEfl::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustSliderThumbStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-void RenderThemeEfl::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeEfl::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    ControlPart part = style->appearance();
+    ControlPart part = style.appearance();
     if (part == SliderThumbVerticalPart) {
-        style->setWidth(Length(sliderThumbHeight, Fixed));
-        style->setHeight(Length(sliderThumbWidth, Fixed));
+        style.setWidth(Length(sliderThumbHeight, Fixed));
+        style.setHeight(Length(sliderThumbWidth, Fixed));
     } else if (part == SliderThumbHorizontalPart) {
-        style->setWidth(Length(sliderThumbWidth, Fixed));
-        style->setHeight(Length(sliderThumbHeight, Fixed));
+        style.setWidth(Length(sliderThumbWidth, Fixed));
+        style.setHeight(Length(sliderThumbHeight, Fixed));
     }
 }
 
@@ -760,22 +760,22 @@ bool RenderThemeEfl::paintSliderThumb(const RenderObject& object, const PaintInf
     return false;
 }
 
-void RenderThemeEfl::adjustCheckboxStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustCheckboxStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustCheckboxStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustCheckboxStyle(styleResolver, style, element);
         return;
     }
 
     adjustSizeConstraints(style, CheckBox);
 
-    style->resetBorder();
+    style.resetBorder();
 
     const ThemePartDesc* desc = m_partDescs + (size_t)CheckBox;
-    if (style->width().value() < desc->min.width().value())
-        style->setWidth(desc->min.width());
-    if (style->height().value() < desc->min.height().value())
-        style->setHeight(desc->min.height());
+    if (style.width().value() < desc->min.width().value())
+        style.setWidth(desc->min.width());
+    if (style.height().value() < desc->min.height().value())
+        style.setHeight(desc->min.height());
 }
 
 bool RenderThemeEfl::paintCheckbox(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -783,22 +783,22 @@ bool RenderThemeEfl::paintCheckbox(const RenderObject& object, const PaintInfo&
     return paintThemePart(object, CheckBox, info, rect);
 }
 
-void RenderThemeEfl::adjustRadioStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustRadioStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustRadioStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustRadioStyle(styleResolver, style, element);
         return;
     }
 
     adjustSizeConstraints(style, RadioButton);
 
-    style->resetBorder();
+    style.resetBorder();
 
     const ThemePartDesc* desc = m_partDescs + (size_t)RadioButton;
-    if (style->width().value() < desc->min.width().value())
-        style->setWidth(desc->min.width());
-    if (style->height().value() < desc->min.height().value())
-        style->setHeight(desc->min.height());
+    if (style.width().value() < desc->min.width().value())
+        style.setWidth(desc->min.width());
+    if (style.height().value() < desc->min.height().value())
+        style.setHeight(desc->min.height());
 }
 
 bool RenderThemeEfl::paintRadio(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -806,15 +806,15 @@ bool RenderThemeEfl::paintRadio(const RenderObject& object, const PaintInfo& inf
     return paintThemePart(object, RadioButton, info, rect);
 }
 
-void RenderThemeEfl::adjustButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustButtonStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustButtonStyle(styleResolver, style, element);
         return;
     }
 
     // adjustSizeConstrains can make SquareButtonPart's size wrong (by adjusting paddings), so call it only for PushButtonPart and ButtonPart
-    if (style->appearance() == PushButtonPart || style->appearance() == ButtonPart)
+    if (style.appearance() == PushButtonPart || style.appearance() == ButtonPart)
         adjustSizeConstraints(style, Button);
 }
 
@@ -823,17 +823,17 @@ bool RenderThemeEfl::paintButton(const RenderObject& object, const PaintInfo& in
     return paintThemePart(object, Button, info, rect);
 }
 
-void RenderThemeEfl::adjustMenuListStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustMenuListStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustMenuListStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustMenuListStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, ComboBox);
-    style->resetBorder();
-    style->setWhiteSpace(PRE);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
 
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
 }
 
 bool RenderThemeEfl::paintMenuList(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
@@ -854,7 +854,7 @@ void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver& styleResolver, Ren
     minHeight = std::max(minHeight, dropDownBoxMinHeight);
     style.setMinHeight(Length(minHeight, Fixed));
 
-    adjustMenuListStyle(&styleResolver, &style, &element);
+    adjustMenuListStyle(styleResolver, style, element);
 }
 
 bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
@@ -862,14 +862,14 @@ bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderObject& object,
     return paintMenuList(object, info, rect);
 }
 
-void RenderThemeEfl::adjustTextFieldStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustTextFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustTextFieldStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustTextFieldStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, TextField);
-    style->resetBorder();
+    style.resetBorder();
 }
 
 bool RenderThemeEfl::paintTextField(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
@@ -877,7 +877,7 @@ bool RenderThemeEfl::paintTextField(const RenderObject& object, const PaintInfo&
     return paintThemePart(object, TextField, info, IntRect(rect));
 }
 
-void RenderThemeEfl::adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeEfl::adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -886,21 +886,21 @@ bool RenderThemeEfl::paintTextArea(const RenderObject& object, const PaintInfo&
     return paintTextField(object, info, rect);
 }
 
-void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldResultsButton);
-    style->resetBorder();
-    style->setWhiteSpace(PRE);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
 
-    float fontScale = style->fontSize() / defaultFontSize;
+    float fontScale = style.fontSize() / defaultFontSize;
     int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
 
-    style->setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
-    style->setHeight(Length(decorationSize, Fixed));
+    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
+    style.setHeight(Length(decorationSize, Fixed));
 }
 
 bool RenderThemeEfl::paintSearchFieldResultsButton(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -908,21 +908,21 @@ bool RenderThemeEfl::paintSearchFieldResultsButton(const RenderObject& object, c
     return paintThemePart(object, SearchFieldResultsButton, info, rect);
 }
 
-void RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldResultsDecoration);
-    style->resetBorder();
-    style->setWhiteSpace(PRE);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
 
-    float fontScale = style->fontSize() / defaultFontSize;
+    float fontScale = style.fontSize() / defaultFontSize;
     int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
 
-    style->setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
-    style->setHeight(Length(decorationSize, Fixed));
+    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
+    style.setHeight(Length(decorationSize, Fixed));
 }
 
 bool RenderThemeEfl::paintSearchFieldResultsDecorationPart(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -930,23 +930,23 @@ bool RenderThemeEfl::paintSearchFieldResultsDecorationPart(const RenderObject& o
     return paintThemePart(object, SearchFieldResultsDecoration, info, rect);
 }
 
-void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldCancelButton);
-    style->resetBorder();
-    style->setWhiteSpace(PRE);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
 
     // Logic taken from RenderThemeChromium.cpp.
     // Scale the button size based on the font size.
-    float fontScale = style->fontSize() / defaultFontSize;
+    float fontScale = style.fontSize() / defaultFontSize;
     int cancelButtonSize = lroundf(std::min(std::max(minCancelButtonSize, defaultFontSize * fontScale), maxCancelButtonSize));
 
-    style->setWidth(Length(cancelButtonSize, Fixed));
-    style->setHeight(Length(cancelButtonSize, Fixed));
+    style.setWidth(Length(cancelButtonSize, Fixed));
+    style.setHeight(Length(cancelButtonSize, Fixed));
 }
 
 bool RenderThemeEfl::paintSearchFieldCancelButton(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -954,15 +954,15 @@ bool RenderThemeEfl::paintSearchFieldCancelButton(const RenderObject& object, co
     return paintThemePart(object, SearchFieldCancelButton, info, rect);
 }
 
-void RenderThemeEfl::adjustSearchFieldStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchField);
-    style->resetBorder();
-    style->setWhiteSpace(PRE);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
 }
 
 bool RenderThemeEfl::paintSearchField(const RenderObject& object, const PaintInfo& info, const IntRect& rect)
@@ -970,10 +970,10 @@ bool RenderThemeEfl::paintSearchField(const RenderObject& object, const PaintInf
     return paintThemePart(object, SearchField, info, rect);
 }
 
-void RenderThemeEfl::adjustInnerSpinButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeEfl::adjustInnerSpinButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
-    if (!m_page && element && element->document().page()) {
-        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
+    if (!m_page && element.document().page()) {
+        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, Spinner);
@@ -1001,17 +1001,17 @@ void RenderThemeEfl::systemFont(CSSValueID, FontDescription& fontDescription) co
     fontDescription.setItalic(false);
 }
 
-void RenderThemeEfl::adjustProgressBarStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeEfl::adjustProgressBarStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-double RenderThemeEfl::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double RenderThemeEfl::animationRepeatIntervalForProgressBar(RenderProgress&) const
 {
     return progressAnimationInterval;
 }
 
-double RenderThemeEfl::animationDurationForProgressBar(RenderProgress*) const
+double RenderThemeEfl::animationDurationForProgressBar(RenderProgress&) const
 {
     return progressAnimationInterval * progressAnimationFrames * 2; // "2" for back and forth;
 }
index dd50831..8fc411b 100644 (file)
@@ -66,13 +66,13 @@ public:
     static PassRefPtr<RenderTheme> create(Page*);
 
     // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle*) const override { return true; }
+    virtual bool supportsHover(const RenderStyle&) const override { return true; }
 
     // A method Returning whether the control is styled by css or not e.g specifying background-color.
-    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const override;
+    virtual bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color& backgroundColor) const override;
 
     // A method asking if the theme is able to draw the focus ring.
-    virtual bool supportsFocusRing(const RenderStyle*) const override;
+    virtual bool supportsFocusRing(const RenderStyle&) const override;
 
     // A method asking if the control changes its tint when the window has focus or not.
     virtual bool controlSupportsTints(const RenderObject&) const override;
@@ -102,50 +102,50 @@ public:
     void setEntryTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
     void setSearchTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
 
-    void adjustSizeConstraints(RenderStyle*, FormType) const;
+    void adjustSizeConstraints(RenderStyle&, FormType) const;
 
     // System fonts.
     virtual void systemFont(CSSValueID, FontDescription&) const override;
 
-    virtual void adjustCheckboxStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustCheckboxStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustRadioStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustRadioStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
     virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const 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 void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const override;
 
 #if ENABLE(DATALIST_ELEMENT)
     virtual IntSize sliderTickSize() const override;
@@ -157,15 +157,15 @@ public:
 
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     static void setDefaultFontSize(int fontsize);
 
-    virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const override;
-    virtual double animationDurationForProgressBar(RenderProgress*) const override;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const override;
+    virtual double animationDurationForProgressBar(RenderProgress&) const override;
 
 #if ENABLE(VIDEO)
     virtual String mediaControlsStyleSheet() override;
index e99b48b..afe6d01 100644 (file)
@@ -165,9 +165,9 @@ static bool supportsFocus(ControlPart appearance)
     }
 }
 
-bool RenderThemeGtk::supportsFocusRing(const RenderStyle* style) const
+bool RenderThemeGtk::supportsFocusRing(const RenderStyle& style) const
 {
-    return supportsFocus(style->appearance());
+    return supportsFocus(style.appearance());
 }
 
 bool RenderThemeGtk::controlSupportsTints(const RenderObject& o) const
@@ -217,25 +217,25 @@ static GtkStateType gtkIconState(RenderTheme* theme, const RenderObject& renderO
     return GTK_STATE_NORMAL;
 }
 
-void RenderThemeGtk::adjustButtonStyle(StyleResolver*, RenderStyle* style, WebCore::Element*) const
+void RenderThemeGtk::adjustButtonStyle(StyleResolver&, RenderStyle& style, WebCore::Element&) const
 {
     // Some layout tests check explicitly that buttons ignore line-height.
-    if (style->appearance() == PushButtonPart)
-        style->setLineHeight(RenderStyle::initialLineHeight());
+    if (style.appearance() == PushButtonPart)
+        style.setLineHeight(RenderStyle::initialLineHeight());
 }
 
-void RenderThemeGtk::adjustMenuListStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustMenuListStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // The tests check explicitly that select menu buttons ignore line height.
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
 
     // We cannot give a proper rendering when border radius is active, unfortunately.
-    style->resetBorderRadius();
+    style.resetBorderRadius();
 }
 
 void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
-    adjustMenuListStyle(&styleResolver, &style, &e);
+    adjustMenuListStyle(styleResolver, style, e);
 }
 
 bool RenderThemeGtk::paintMenuListButtonDecorations(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
@@ -290,7 +290,7 @@ static GtkIconSize getIconSizeForPixelSize(gint pixelSize)
     return GTK_ICON_SIZE_DIALOG;
 }
 
-void RenderThemeGtk::adjustSearchFieldResultsButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeGtk::adjustSearchFieldResultsButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
 }
@@ -300,25 +300,25 @@ bool RenderThemeGtk::paintSearchFieldResultsButton(const RenderObject& o, const
     return paintSearchFieldResultsDecorationPart(o, i, rect);
 }
 
-static void adjustSearchFieldIconStyle(RenderStyle* style)
+static void adjustSearchFieldIconStyle(RenderStyle& style)
 {
-    style->resetBorder();
-    style->resetPadding();
+    style.resetBorder();
+    style.resetPadding();
 
     // Get the icon size based on the font size.
-    int fontSize = style->fontSize();
+    int fontSize = style.fontSize();
     if (fontSize < gtkIconSizeMenu) {
-        style->setWidth(Length(fontSize, Fixed));
-        style->setHeight(Length(fontSize, Fixed));
+        style.setWidth(Length(fontSize, Fixed));
+        style.setHeight(Length(fontSize, Fixed));
         return;
     }
     gint width = 0, height = 0;
     gtk_icon_size_lookup(getIconSizeForPixelSize(fontSize), &width, &height);
-    style->setWidth(Length(width, Fixed));
-    style->setHeight(Length(height, Fixed));
+    style.setWidth(Length(width, Fixed));
+    style.setHeight(Length(height, Fixed));
 }
 
-void RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     adjustSearchFieldIconStyle(style);
 }
@@ -357,7 +357,7 @@ bool RenderThemeGtk::paintSearchFieldResultsDecorationPart(const RenderObject& r
     return false;
 }
 
-void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     adjustSearchFieldIconStyle(style);
 }
@@ -376,11 +376,11 @@ bool RenderThemeGtk::paintSearchFieldCancelButton(const RenderObject& renderObje
     return false;
 }
 
-void RenderThemeGtk::adjustSearchFieldStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSearchFieldStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // We cannot give a proper rendering when border radius is active, unfortunately.
-    style->resetBorderRadius();
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.resetBorderRadius();
+    style.setLineHeight(RenderStyle::initialLineHeight());
 }
 
 bool RenderThemeGtk::paintSearchField(const RenderObject& o, const PaintInfo& i, const IntRect& rect)
@@ -411,15 +411,15 @@ bool RenderThemeGtk::paintCapsLockIndicator(const RenderObject& renderObject, co
     return true;
 }
 
-void RenderThemeGtk::adjustSliderTrackStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSliderTrackStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-void RenderThemeGtk::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeGtk::adjustSliderThumbStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 double RenderThemeGtk::caretBlinkInterval() const
@@ -573,13 +573,13 @@ bool RenderThemeGtk::paintMediaToggleClosedCaptionsButton(const RenderObject& re
 }
 #endif
 
-static FloatRoundedRect::Radii borderRadiiFromStyle(RenderStyle* style)
+static FloatRoundedRect::Radii borderRadiiFromStyle(RenderStyle& style)
 {
     return FloatRoundedRect::Radii(
-        IntSize(style->borderTopLeftRadius().width().intValue(), style->borderTopLeftRadius().height().intValue()),
-        IntSize(style->borderTopRightRadius().width().intValue(), style->borderTopRightRadius().height().intValue()),
-        IntSize(style->borderBottomLeftRadius().width().intValue(), style->borderBottomLeftRadius().height().intValue()),
-        IntSize(style->borderBottomRightRadius().width().intValue(), style->borderBottomRightRadius().height().intValue()));
+        IntSize(style.borderTopLeftRadius().width().intValue(), style.borderTopLeftRadius().height().intValue()),
+        IntSize(style.borderTopRightRadius().width().intValue(), style.borderTopRightRadius().height().intValue()),
+        IntSize(style.borderBottomLeftRadius().width().intValue(), style.borderBottomLeftRadius().height().intValue()),
+        IntSize(style.borderBottomRightRadius().width().intValue(), style.borderBottomRightRadius().height().intValue()));
 }
 
 bool RenderThemeGtk::paintMediaSliderTrack(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -594,7 +594,7 @@ bool RenderThemeGtk::paintMediaSliderTrack(const RenderObject& o, const PaintInf
 
     float mediaDuration = mediaElement->duration();
     float totalTrackWidth = r.width();
-    RenderStyle* style = &o.style();
+    RenderStyle& style = o.style();
     RefPtr<TimeRanges> timeRanges = mediaElement->buffered();
     for (unsigned index = 0; index < timeRanges->length(); ++index) {
         float start = timeRanges->start(index, IGNORE_EXCEPTION);
@@ -608,7 +608,7 @@ bool RenderThemeGtk::paintMediaSliderTrack(const RenderObject& o, const PaintInf
         rangeRect.setWidth(lengthRatio * totalTrackWidth);
         if (index)
             rangeRect.move(startRatio * totalTrackWidth, 0);
-        context->fillRoundedRect(FloatRoundedRect(rangeRect, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
+        context->fillRoundedRect(FloatRoundedRect(rangeRect, borderRadiiFromStyle(style)), style.visitedDependentColor(CSSPropertyColor), style.colorSpace());
     }
 
     context->restore();
@@ -617,8 +617,8 @@ bool RenderThemeGtk::paintMediaSliderTrack(const RenderObject& o, const PaintInf
 
 bool RenderThemeGtk::paintMediaSliderThumb(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
 {
-    RenderStyle* style = &o.style();
-    paintInfo.context->fillRoundedRect(FloatRoundedRect(r, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
+    RenderStyle& style = o.style();
+    paintInfo.context->fillRoundedRect(FloatRoundedRect(r, borderRadiiFromStyle(style)), style.visitedDependentColor(CSSPropertyColor), style.colorSpace());
     return false;
 }
 
@@ -643,13 +643,13 @@ bool RenderThemeGtk::paintMediaVolumeSliderTrack(const RenderObject& renderObjec
 
     int rectHeight = rect.height();
     float trackHeight = rectHeight * volume;
-    RenderStyle* style = &renderObject.style();
+    RenderStyle& style = renderObject.style();
     IntRect volumeRect(rect);
     volumeRect.move(0, rectHeight - trackHeight);
     volumeRect.setHeight(ceil(trackHeight));
 
     context->fillRoundedRect(FloatRoundedRect(volumeRect, borderRadiiFromStyle(style)),
-        style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
+        style.visitedDependentColor(CSSPropertyColor), style.colorSpace());
     context->restore();
 
     return false;
@@ -671,21 +671,21 @@ bool RenderThemeGtk::paintMediaCurrentTime(const RenderObject&, const PaintInfo&
 }
 #endif
 
-void RenderThemeGtk::adjustProgressBarStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustProgressBarStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 // These values have been copied from RenderThemeChromiumSkia.cpp
 static const int progressActivityBlocks = 5;
 static const int progressAnimationFrames = 10;
 static const double progressAnimationInterval = 0.125;
-double RenderThemeGtk::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double RenderThemeGtk::animationRepeatIntervalForProgressBar(RenderProgress&) const
 {
     return progressAnimationInterval;
 }
 
-double RenderThemeGtk::animationDurationForProgressBar(RenderProgress*) const
+double RenderThemeGtk::animationDurationForProgressBar(RenderProgress&) const
 {
     return progressAnimationInterval * progressAnimationFrames * 2; // "2" for back and forth;
 }
@@ -693,16 +693,16 @@ double RenderThemeGtk::animationDurationForProgressBar(RenderProgress*) const
 IntRect RenderThemeGtk::calculateProgressRect(const RenderObject& renderObject, const IntRect& fullBarRect)
 {
     IntRect progressRect(fullBarRect);
-    const RenderProgress* renderProgress = toRenderProgress(&renderObject);
-    if (renderProgress->isDeterminate()) {
-        int progressWidth = progressRect.width() * renderProgress->position();
+    const RenderProgress& renderProgress = toRenderProgress(renderObject);
+    if (renderProgress.isDeterminate()) {
+        int progressWidth = progressRect.width() * renderProgress.position();
         if (renderObject.style().direction() == RTL)
             progressRect.setX(progressRect.x() + progressRect.width() - progressWidth);
         progressRect.setWidth(progressWidth);
         return progressRect;
     }
 
-    double animationProgress = renderProgress->animationProgress();
+    double animationProgress = renderProgress.animationProgress();
 
     // Never let the progress rect shrink smaller than 2 pixels.
     int newWidth = std::max(2, progressRect.width() / progressActivityBlocks);
index 6c727d9..3c2e410 100644 (file)
@@ -44,10 +44,10 @@ public:
     static PassRefPtr<RenderTheme> create();
 
     // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle*) const override { return true; }
+    virtual bool supportsHover(const RenderStyle&) const override { return true; }
 
     // A method asking if the theme is able to draw the focus ring.
-    virtual bool supportsFocusRing(const RenderStyle*) const override;
+    virtual bool supportsFocusRing(const RenderStyle&) const override;
 
     // A method asking if the control changes its tint when the window has focus or not.
     virtual bool controlSupportsTints(const RenderObject&) const override;
@@ -115,50 +115,50 @@ public:
 
 private:
     virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void setCheckboxSize(RenderStyle*) const override;
+    virtual void setCheckboxSize(RenderStyle&) const override;
 
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void setRadioSize(RenderStyle*) const override;
+    virtual void setRadioSize(RenderStyle&) const override;
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    int popupInternalPaddingLeft(RenderStyle*) const override;
-    int popupInternalPaddingRight(RenderStyle*) const override;
-    int popupInternalPaddingTop(RenderStyle*) const override;
-    int popupInternalPaddingBottom(RenderStyle*) const override;
+    int popupInternalPaddingLeft(RenderStyle&) const override;
+    int popupInternalPaddingRight(RenderStyle&) const override;
+    int popupInternalPaddingTop(RenderStyle&) const override;
+    int popupInternalPaddingBottom(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
     // Aqua themed controls whenever possible. We always want to use GTK+ theming, so
     // we don't maintain this differentiation.
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const 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 void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&);
 
-    virtual void adjustSearchFieldCancelButtonStyle(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 paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const override;
 
 #if ENABLE(VIDEO)
     void initMediaColors();
@@ -180,20 +180,20 @@ private:
 #endif
 #endif
 
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const override;
-    virtual double animationDurationForProgressBar(RenderProgress*) const override;
-    virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const override;
+    virtual double animationDurationForProgressBar(RenderProgress&) const override;
+    virtual void adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const override;
 
     void platformInit();
-    static void setTextInputBorders(RenderStyle*);
+    static void setTextInputBorders(RenderStyle&);
     static double getScreenDPI();
 
 #if ENABLE(VIDEO)
@@ -211,9 +211,9 @@ private:
 #ifdef GTK_API_VERSION_2
     void setupWidgetAndAddToContainer(GtkWidget*, GtkWidget*) const;
     void refreshComboBoxChildren() const;
-    void getComboBoxPadding(RenderStyle*, int& left, int& top, int& right, int& bottom) const;
+    void getComboBoxPadding(RenderStyle&, int& left, int& top, int& right, int& bottom) const;
     int getComboBoxSeparatorWidth() const;
-    int comboBoxArrowSize(RenderStyle*) const;
+    int comboBoxArrowSize(RenderStyle&) const;
 
     GtkWidget* gtkButton() const;
     GtkWidget* gtkTreeView() const;
index d2bf709..56b8b72 100644 (file)
@@ -142,18 +142,18 @@ static GtkStateType getGtkStateType(RenderThemeGtk* theme, const RenderObject& o
     return GTK_STATE_NORMAL;
 }
 
-static void setToggleSize(const RenderThemeGtk*, RenderStyle* style, GtkWidget* widget)
+static void setToggleSize(const RenderThemeGtk*, RenderStyle& style, GtkWidget* widget)
 {
     // The width and height are both specified, so we shouldn't change them.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     gint indicatorSize;
     gtk_widget_style_get(widget, "indicator-size", &indicatorSize, NULL);
-    if (style->width().isIntrinsicOrAuto())
-        style->setWidth(Length(indicatorSize, Fixed));
-    if (style->height().isAuto())
-        style->setHeight(Length(indicatorSize, Fixed));
+    if (style.width().isIntrinsicOrAuto())
+        style.setWidth(Length(indicatorSize, Fixed));
+    if (style.height().isAuto())
+        style.setHeight(Length(indicatorSize, Fixed));
 }
 
 static void paintToggle(RenderThemeGtk* theme, const RenderObject& renderObject, const PaintInfo& info, const IntRect& rect, GtkWidget* widget)
@@ -194,7 +194,7 @@ static void paintToggle(RenderThemeGtk* theme, const RenderObject& renderObject,
     }
 }
 
-void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const
+void RenderThemeGtk::setCheckboxSize(RenderStyle& style) const
 {
     setToggleSize(this, style, gtkCheckButton());
 }
@@ -205,7 +205,7 @@ bool RenderThemeGtk::paintCheckbox(const RenderObject& renderObject, const Paint
     return false;
 }
 
-void RenderThemeGtk::setRadioSize(RenderStyle* style) const
+void RenderThemeGtk::setRadioSize(RenderStyle& style) const
 {
     setToggleSize(this, style, gtkRadioButton());
 }
@@ -289,11 +289,11 @@ int RenderThemeGtk::getComboBoxSeparatorWidth() const
     return gtk_widget_get_style(separator)->xthickness;
 }
 
-int RenderThemeGtk::comboBoxArrowSize(RenderStyle* style) const
+int RenderThemeGtk::comboBoxArrowSize(RenderStyle& style) const
 {
     // Taking the font size and reversing the DPI conversion seems to match
     // GTK+ rendering as closely as possible.
-    return style->font().size() * (72.0 / RenderThemeGtk::getScreenDPI());
+    return style.font().size() * (72.0 / RenderThemeGtk::getScreenDPI());
 }
 
 static void getButtonInnerBorder(GtkWidget* button, int& left, int& top, int& right, int& bottom)
@@ -316,11 +316,11 @@ static void getButtonInnerBorder(GtkWidget* button, int& left, int& top, int& ri
 }
 
 
-void RenderThemeGtk::getComboBoxPadding(RenderStyle* style, int& left, int& top, int& right, int& bottom) const
+void RenderThemeGtk::getComboBoxPadding(RenderStyle& style, int& left, int& top, int& right, int& bottom) const
 {
     // If this menu list button isn't drawn using the native theme, we
     // don't add any extra padding beyond what WebCore already uses.
-    if (style->appearance() == NoControlPart)
+    if (style.appearance() == NoControlPart)
         return;
 
     // A combo box button is a button with widgets packed into it.
@@ -332,34 +332,34 @@ void RenderThemeGtk::getComboBoxPadding(RenderStyle* style, int& left, int& top,
     int arrowAndSeperatorLength = comboBoxArrowSize(style) +
         getComboBoxSeparatorWidth() + (3 * buttonWidgetStyle->xthickness);
 
-    if (style->direction() == RTL)
+    if (style.direction() == RTL)
         left += arrowAndSeperatorLength;
     else
         right += arrowAndSeperatorLength;
 }
 
-int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle& style) const
 {
     int left = 0, top = 0, right = 0, bottom = 0;
     getComboBoxPadding(style, left, top, right, bottom);
     return left;
 }
 
-int RenderThemeGtk::popupInternalPaddingRight(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingRight(RenderStyle& style) const
 {
     int left = 0, top = 0, right = 0, bottom = 0;
     getComboBoxPadding(style, left, top, right, bottom);
     return right;
 }
 
-int RenderThemeGtk::popupInternalPaddingTop(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingTop(RenderStyle& style) const
 {
     int left = 0, top = 0, right = 0, bottom = 0;
     getComboBoxPadding(style, left, top, right, bottom);
     return top;
 }
 
-int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle& style) const
 {
     int left = 0, top = 0, right = 0, bottom = 0;
     getComboBoxPadding(style, left, top, right, bottom);
@@ -381,12 +381,12 @@ bool RenderThemeGtk::paintMenuList(const RenderObject& object, const PaintInfo&
 
     int leftBorder = 0, rightBorder = 0, bottomBorder = 0, topBorder = 0;
     getButtonInnerBorder(gtkComboBoxButton(), leftBorder, topBorder, rightBorder, bottomBorder);
-    RenderStyle* style = &object.style();
+    RenderStyle& style = object.style();
     int arrowSize = comboBoxArrowSize(style);
     GtkStyle* buttonStyle = gtk_widget_get_style(gtkComboBoxButton());
 
     IntRect arrowRect(0, (rect.height() - arrowSize) / 2, arrowSize, arrowSize);
-    if (style->direction() == RTL)
+    if (style.direction() == RTL)
         arrowRect.setX(leftBorder + buttonStyle->xthickness);
     else
         arrowRect.setX(rect.width() - rightBorder - buttonStyle->xthickness - arrowSize);
@@ -410,7 +410,7 @@ bool RenderThemeGtk::paintMenuList(const RenderObject& object, const PaintInfo&
     bottomBorder += focusPadding + focusWidth;
     int separatorWidth = getComboBoxSeparatorWidth();
     IntRect separatorRect(0, topBorder, separatorWidth, rect.height() - topBorder - bottomBorder);
-    if (style->direction() == RTL)
+    if (style.direction() == RTL)
         separatorRect.setX(arrowRect.x() + arrowRect.width() + buttonStyle->xthickness + separatorWidth);
     else
         separatorRect.setX(arrowRect.x() - buttonStyle->xthickness - separatorWidth);
@@ -528,9 +528,9 @@ bool RenderThemeGtk::paintSliderThumb(const RenderObject& object, const PaintInf
     return false;
 }
 
-void RenderThemeGtk::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    ControlPart part = style->appearance();
+    ControlPart part = style.appearance();
     if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart)
         return;
 
@@ -542,13 +542,13 @@ void RenderThemeGtk::adjustSliderThumbSize(RenderStyle* style, Element*) const
                          NULL);
 
     if (part == SliderThumbHorizontalPart) {
-        style->setWidth(Length(length, Fixed));
-        style->setHeight(Length(width, Fixed));
+        style.setWidth(Length(length, Fixed));
+        style.setHeight(Length(width, Fixed));
         return;
     }
     ASSERT(part == SliderThumbVerticalPart || part == MediaVolumeSliderThumbPart);
-    style->setWidth(Length(width, Fixed));
-    style->setHeight(Length(length, Fixed));
+    style.setWidth(Length(width, Fixed));
+    style.setHeight(Length(length, Fixed));
 }
 
 bool RenderThemeGtk::paintProgressBar(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
@@ -572,7 +572,7 @@ bool RenderThemeGtk::paintProgressBar(const RenderObject& renderObject, const Pa
     return false;
 }
 
-void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     GtkStyle* gtkStyle = gtk_widget_get_style(gtkSpinButton());
     const PangoFontDescription* fontDescription = gtkStyle->font_desc;
@@ -583,8 +583,8 @@ void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* sty
     int width = std::max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
     width += -((width % 2) - 1) + gtkStyle->xthickness;
 
-    style->setWidth(Length(width, Fixed));
-    style->setMinWidth(Length(width, Fixed));
+    style.setWidth(Length(width, Fixed));
+    style.setMinWidth(Length(width, Fixed));
 }
 
 bool RenderThemeGtk::paintInnerSpinButton(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
index fd49f7d..3630c43 100644 (file)
@@ -201,10 +201,10 @@ void RenderThemeGtk::adjustRepaintRect(const RenderObject& renderObject, FloatRe
     adjustRectForFocus(context, rect);
 }
 
-static void setToggleSize(GtkStyleContext* context, RenderStyle* style)
+static void setToggleSize(GtkStyleContext* context, RenderStyle& style)
 {
     // The width and height are both specified, so we shouldn't change them.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Other ports hard-code this to 13 which is also the default value defined by GTK+.
@@ -213,11 +213,11 @@ static void setToggleSize(GtkStyleContext* context, RenderStyle* style)
     gint indicatorSize;
     gtk_style_context_get_style(context, "indicator-size", &indicatorSize, NULL);
 
-    if (style->width().isIntrinsicOrAuto())
-        style->setWidth(Length(indicatorSize, Fixed));
+    if (style.width().isIntrinsicOrAuto())
+        style.setWidth(Length(indicatorSize, Fixed));
 
-    if (style->height().isAuto())
-        style->setHeight(Length(indicatorSize, Fixed));
+    if (style.height().isAuto())
+        style.setHeight(Length(indicatorSize, Fixed));
 }
 
 static void paintToggle(const RenderThemeGtk* theme, GType widgetType, const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& fullRect)
@@ -275,7 +275,7 @@ static void paintToggle(const RenderThemeGtk* theme, GType widgetType, const Ren
     gtk_style_context_restore(context);
 }
 
-void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const
+void RenderThemeGtk::setCheckboxSize(RenderStyle& style) const
 {
     setToggleSize(getStyleContext(GTK_TYPE_CHECK_BUTTON), style);
 }
@@ -286,7 +286,7 @@ bool RenderThemeGtk::paintCheckbox(const RenderObject& renderObject, const Paint
     return false;
 }
 
-void RenderThemeGtk::setRadioSize(RenderStyle* style) const
+void RenderThemeGtk::setRadioSize(RenderStyle& style) const
 {
     setToggleSize(getStyleContext(GTK_TYPE_RADIO_BUTTON), style);
 }
@@ -378,18 +378,18 @@ bool RenderThemeGtk::paintButton(const RenderObject& renderObject, const PaintIn
     return false;
 }
 
-static void getComboBoxMetrics(RenderStyle* style, GtkBorder& border, int& focus, int& separator)
+static void getComboBoxMetrics(RenderStyle& style, GtkBorder& border, int& focus, int& separator)
 {
     // If this menu list button isn't drawn using the native theme, we
     // don't add any extra padding beyond what WebCore already uses.
-    if (style->appearance() == NoControlPart)
+    if (style.appearance() == NoControlPart)
         return;
 
     GtkStyleContext* context = getStyleContext(GTK_TYPE_COMBO_BOX);
     gtk_style_context_save(context);
 
     gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON);
-    gtk_style_context_set_direction(context, static_cast<GtkTextDirection>(gtkTextDirection(style->direction())));
+    gtk_style_context_set_direction(context, static_cast<GtkTextDirection>(gtkTextDirection(style.direction())));
 
     gtk_style_context_get_border(context, static_cast<GtkStateFlags>(0), &border);
 
@@ -406,7 +406,7 @@ static void getComboBoxMetrics(RenderStyle* style, GtkBorder& border, int& focus
     context = getStyleContext(GTK_TYPE_SEPARATOR);
     gtk_style_context_save(context);
 
-    GtkTextDirection direction = static_cast<GtkTextDirection>(gtkTextDirection(style->direction()));
+    GtkTextDirection direction = static_cast<GtkTextDirection>(gtkTextDirection(style.direction()));
     gtk_style_context_set_direction(context, direction);
     gtk_style_context_add_class(context, "separator");
 
@@ -426,29 +426,29 @@ static void getComboBoxMetrics(RenderStyle* style, GtkBorder& border, int& focus
     gtk_style_context_restore(context);
 }
 
-int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle& style) const
 {
     GtkBorder borderWidth = { 0, 0, 0, 0 };
     int focusWidth = 0, separatorWidth = 0;
     getComboBoxMetrics(style, borderWidth, focusWidth, separatorWidth);
     int left = borderWidth.left + focusWidth;
-    if (style->direction() == RTL)
+    if (style.direction() == RTL)
         left += separatorWidth + minArrowSize;
     return left;
 }
 
-int RenderThemeGtk::popupInternalPaddingRight(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingRight(RenderStyle& style) const
 {
     GtkBorder borderWidth = { 0, 0, 0, 0 };
     int focusWidth = 0, separatorWidth = 0;
     getComboBoxMetrics(style, borderWidth, focusWidth, separatorWidth);
     int right = borderWidth.right + focusWidth;
-    if (style->direction() == LTR)
+    if (style.direction() == LTR)
         right += separatorWidth + minArrowSize;
     return right;
 }
 
-int RenderThemeGtk::popupInternalPaddingTop(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingTop(RenderStyle& style) const
 {
     GtkBorder borderWidth = { 0, 0, 0, 0 };
     int focusWidth = 0, separatorWidth = 0;
@@ -456,7 +456,7 @@ int RenderThemeGtk::popupInternalPaddingTop(RenderStyle* style) const
     return borderWidth.top + focusWidth;
 }
 
-int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle* style) const
+int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle& style) const
 {
     GtkBorder borderWidth = { 0, 0, 0, 0 };
     int focusWidth = 0, separatorWidth = 0;
@@ -710,9 +710,9 @@ bool RenderThemeGtk::paintSliderThumb(const RenderObject& renderObject, const Pa
     return false;
 }
 
-void RenderThemeGtk::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    ControlPart part = style->appearance();
+    ControlPart part = style.appearance();
     if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart)
         return;
 
@@ -722,13 +722,13 @@ void RenderThemeGtk::adjustSliderThumbSize(RenderStyle* style, Element*) const
                                 "slider-length", &sliderLength,
                                 NULL);
     if (part == SliderThumbHorizontalPart) {
-        style->setWidth(Length(sliderLength, Fixed));
-        style->setHeight(Length(sliderWidth, Fixed));
+        style.setWidth(Length(sliderLength, Fixed));
+        style.setHeight(Length(sliderWidth, Fixed));
         return;
     }
     ASSERT(part == SliderThumbVerticalPart || part == MediaVolumeSliderThumbPart);
-    style->setWidth(Length(sliderWidth, Fixed));
-    style->setHeight(Length(sliderLength, Fixed));
+    style.setWidth(Length(sliderWidth, Fixed));
+    style.setHeight(Length(sliderLength, Fixed));
 }
 
 bool RenderThemeGtk::paintProgressBar(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
@@ -775,7 +775,7 @@ static gint spinButtonArrowSize(GtkStyleContext* context)
     return arrowSize - arrowSize % 2; // Force even.
 }
 
-void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     GtkStyleContext* context = getStyleContext(GTK_TYPE_SPIN_BUTTON);
 
@@ -783,8 +783,8 @@ void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* sty
     gtk_style_context_get_padding(context, static_cast<GtkStateFlags>(0), &padding);
 
     int width = spinButtonArrowSize(context) + padding.left + padding.right;
-    style->setWidth(Length(width, Fixed));
-    style->setMinWidth(Length(width, Fixed));
+    style.setWidth(Length(width, Fixed));
+    style.setMinWidth(Length(width, Fixed));
 }
 
 static void paintSpinArrowButton(RenderTheme* theme, GtkStyleContext* context, const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect, GtkArrowType arrowType)
index 11b0a79..ab6c9f8 100644 (file)
@@ -203,7 +203,7 @@ void RenderButton::layout()
     RenderFlexibleBox::layout();
 
     // FIXME: We should not be adjusting styles during layout. See <rdar://problem/7675493>.
-    RenderThemeIOS::adjustRoundBorderRadius(style(), this);
+    RenderThemeIOS::adjustRoundBorderRadius(style(), *this);
 }
 #endif
 
index 6ea74a1..3c8a172 100644 (file)
@@ -1491,10 +1491,10 @@ void RenderInline::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintOf
 
     RenderStyle& styleToUse = style();
     // Only paint the focus ring by hand if the theme isn't able to draw it.
-    if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(&styleToUse))
+    if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
         paintFocusRing(paintInfo, paintOffset, &styleToUse);
 
-    if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(&styleToUse))
+    if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
         addPDFURLRect(paintInfo, paintOffset);
 
     GraphicsContext* graphicsContext = paintInfo.context;
index c0c2d39..2e742e4 100644 (file)
@@ -101,10 +101,10 @@ static FloatRect getUnzoomedRectAndAdjustCurrentContext(const RenderObject& o, c
 static const int mediaSliderThumbWidth = 13;
 static const int mediaSliderThumbHeight = 14;
 
-void RenderMediaControls::adjustMediaSliderThumbSize(RenderStyle* style)
+void RenderMediaControls::adjustMediaSliderThumbSize(RenderStyle& style)
 {
     int part;
-    switch (style->appearance()) {
+    switch (style.appearance()) {
     case MediaSliderThumbPart:
         part = MediaSliderThumb;
         break;
@@ -121,9 +121,9 @@ void RenderMediaControls::adjustMediaSliderThumbSize(RenderStyle* style)
     CGSize size;
     wkMeasureMediaUIPart(part, 0, &size);
 
-    float zoomLevel = style->effectiveZoom();
-    style->setWidth(Length(static_cast<int>(size.width * zoomLevel), Fixed));
-    style->setHeight(Length(static_cast<int>(size.height * zoomLevel), Fixed));
+    float zoomLevel = style.effectiveZoom();
+    style.setWidth(Length(static_cast<int>(size.width * zoomLevel), Fixed));
+    style.setHeight(Length(static_cast<int>(size.height * zoomLevel), Fixed));
 }
 
 bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
index de02f2a..9809c01 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 #if PLATFORM(WIN)
     static bool paintMediaControlsPart(MediaControlElementType, const RenderObject&, const PaintInfo&, const IntRect&);
-    static void adjustMediaSliderThumbSize(RenderStyle*);
+    static void adjustMediaSliderThumbSize(RenderStyle&);
 #endif
     static IntPoint volumeSliderOffsetFromMuteButton(RenderBox*, const IntSize&);
 };
index e770cb8..c6070c0 100644 (file)
@@ -125,10 +125,10 @@ void RenderMenuList::adjustInnerStyle()
         innerStyle.setAlignSelf(AlignFlexStart);
     }
 
-    innerStyle.setPaddingLeft(Length(theme().popupInternalPaddingLeft(&style()), Fixed));
-    innerStyle.setPaddingRight(Length(theme().popupInternalPaddingRight(&style()), Fixed));
-    innerStyle.setPaddingTop(Length(theme().popupInternalPaddingTop(&style()), Fixed));
-    innerStyle.setPaddingBottom(Length(theme().popupInternalPaddingBottom(&style()), Fixed));
+    innerStyle.setPaddingLeft(Length(theme().popupInternalPaddingLeft(style()), Fixed));
+    innerStyle.setPaddingRight(Length(theme().popupInternalPaddingRight(style()), Fixed));
+    innerStyle.setPaddingTop(Length(theme().popupInternalPaddingTop(style()), Fixed));
+    innerStyle.setPaddingBottom(Length(theme().popupInternalPaddingBottom(style()), Fixed));
 
     if (document().page()->chrome().selectItemWritingDirectionIsNatural()) {
         // Items in the popup will not respect the CSS text-align and direction properties,
@@ -326,7 +326,7 @@ LayoutRect RenderMenuList::controlClipRect(const LayoutPoint& additionalOffset)
 
 void RenderMenuList::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const
 {
-    maxLogicalWidth = std::max(m_optionsWidth, theme().minimumMenuListSize(&style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
+    maxLogicalWidth = std::max(m_optionsWidth, theme().minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
     if (!style().width().isPercent())
         minLogicalWidth = maxLogicalWidth;
 }
@@ -569,7 +569,7 @@ PopupMenuStyle RenderMenuList::menuStyle() const
     return PopupMenuStyle(styleToUse.visitedDependentColor(CSSPropertyColor), styleToUse.visitedDependentColor(CSSPropertyBackgroundColor),
         styleToUse.font(), styleToUse.visibility() == VISIBLE, styleToUse.display() == NONE, style().hasAppearance(), styleToUse.textIndent(),
         style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::DefaultBackgroundColor,
-        PopupMenuStyle::SelectPopup, theme().popupMenuSize(&styleToUse, absBounds));
+        PopupMenuStyle::SelectPopup, theme().popupMenuSize(styleToUse, absBounds));
 }
 
 HostWindow* RenderMenuList::hostWindow() const
index 72eb6f7..97742e8 100644 (file)
@@ -54,7 +54,7 @@ void RenderMeter::updateLogicalWidth()
 {
     RenderBox::updateLogicalWidth();
 
-    IntSize frameSize = theme().meterSizeForBounds(this, pixelSnappedIntRect(frameRect()));
+    IntSize frameSize = theme().meterSizeForBounds(*this, pixelSnappedIntRect(frameRect()));
     setLogicalWidth(isHorizontalWritingMode() ? frameSize.width() : frameSize.height());
 }
 
@@ -67,7 +67,7 @@ void RenderMeter::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logi
         frame.setHeight(computedValues.m_extent);
     else
         frame.setWidth(computedValues.m_extent);
-    IntSize frameSize = theme().meterSizeForBounds(this, pixelSnappedIntRect(frame));
+    IntSize frameSize = theme().meterSizeForBounds(*this, pixelSnappedIntRect(frame));
     computedValues.m_extent = isHorizontalWritingMode() ? frameSize.height() : frameSize.width();
 }
 
index bcd70a7..72be41e 100644 (file)
@@ -1053,10 +1053,10 @@ void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRec
     int outlineOffset = styleToUse.outlineOffset();
 
     // Only paint the focus ring by hand if the theme isn't able to draw it.
-    if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(&styleToUse))
+    if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
         paintFocusRing(paintInfo, paintRect.location(), &styleToUse);
 
-    if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(&styleToUse))
+    if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
         addPDFURLRect(paintInfo, paintRect.location());
 
     if (styleToUse.outlineStyleIsAuto() || styleToUse.outlineStyle() == BNONE)
index a64923e..87faf3b 100644 (file)
@@ -90,8 +90,8 @@ void RenderProgress::animationTimerFired(Timer<RenderProgress>&)
 
 void RenderProgress::updateAnimationState()
 {
-    m_animationDuration = theme().animationDurationForProgressBar(this);
-    m_animationRepeatInterval = theme().animationRepeatIntervalForProgressBar(this);
+    m_animationDuration = theme().animationDurationForProgressBar(*this);
+    m_animationRepeatInterval = theme().animationRepeatIntervalForProgressBar(*this);
 
     bool animating = style().hasAppearance() && m_animationDuration > 0;
     if (animating == m_animating)
index c77c721..2fd441b 100644 (file)
@@ -225,7 +225,7 @@ void RenderTextControlSingleLine::layout()
 #if PLATFORM(IOS)
     // FIXME: We should not be adjusting styles during layout. <rdar://problem/7675493>
     if (inputElement().isSearchField())
-        RenderThemeIOS::adjustRoundBorderRadius(style(), this);
+        RenderThemeIOS::adjustRoundBorderRadius(style(), *this);
 #endif
 }
 
index 52a397a..7f98e10 100644 (file)
@@ -81,7 +81,7 @@ RenderTheme::RenderTheme()
 {
 }
 
-void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style, Element* e, bool UAHasAppearance, const BorderData& border, const FillLayer& background, const Color& backgroundColor)
+void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e, bool UAHasAppearance, const BorderData& border, const FillLayer& background, const Color& backgroundColor)
 {
     // Force inline and table display styles to be inline-block (except for table- which is block)
     ControlPart part = style.appearance();
@@ -93,7 +93,7 @@ void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style,
     else if (style.display() == COMPACT || style.display() == LIST_ITEM || style.display() == TABLE)
         style.setDisplay(BLOCK);
 
-    if (UAHasAppearance && isControlStyled(&style, border, background, backgroundColor)) {
+    if (UAHasAppearance && isControlStyled(style, border, background, backgroundColor)) {
         if (part == MenulistPart) {
             style.setAppearance(MenulistButtonPart);
             part = MenulistButtonPart;
@@ -192,25 +192,25 @@ void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style,
     switch (style.appearance()) {
 #if !USE(NEW_THEME)
     case CheckboxPart:
-        return adjustCheckboxStyle(&styleResolver, &style, e);
+        return adjustCheckboxStyle(styleResolver, style, e);
     case RadioPart:
-        return adjustRadioStyle(&styleResolver, &style, e);
+        return adjustRadioStyle(styleResolver, style, e);
     case PushButtonPart:
     case SquareButtonPart:
     case DefaultButtonPart:
     case ButtonPart:
-        return adjustButtonStyle(&styleResolver, &style, e);
+        return adjustButtonStyle(styleResolver, style, e);
     case InnerSpinButtonPart:
-        return adjustInnerSpinButtonStyle(&styleResolver, &style, e);
+        return adjustInnerSpinButtonStyle(styleResolver, style, e);
 #endif
     case TextFieldPart:
-        return adjustTextFieldStyle(&styleResolver, &style, e);
+        return adjustTextFieldStyle(styleResolver, style, e);
     case TextAreaPart:
-        return adjustTextAreaStyle(&styleResolver, &style, e);
+        return adjustTextAreaStyle(styleResolver, style, e);
     case MenulistPart:
-        return adjustMenuListStyle(&styleResolver, &style, e);
+        return adjustMenuListStyle(styleResolver, style, e);
     case MenulistButtonPart:
-        return adjustMenuListButtonStyle(styleResolver, style, *e);
+        return adjustMenuListButtonStyle(styleResolver, style, e);
     case MediaPlayButtonPart:
     case MediaCurrentTimePart:
     case MediaTimeRemainingPart:
@@ -218,39 +218,39 @@ void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style,
     case MediaExitFullscreenButtonPart:
     case MediaMuteButtonPart:
     case MediaVolumeSliderContainerPart:
-        return adjustMediaControlStyle(&styleResolver, &style, e);
+        return adjustMediaControlStyle(styleResolver, style, e);
     case MediaSliderPart:
     case MediaVolumeSliderPart:
     case MediaFullScreenVolumeSliderPart:
     case SliderHorizontalPart:
     case SliderVerticalPart:
-        return adjustSliderTrackStyle(&styleResolver, &style, e);
+        return adjustSliderTrackStyle(styleResolver, style, e);
     case SliderThumbHorizontalPart:
     case SliderThumbVerticalPart:
-        return adjustSliderThumbStyle(&styleResolver, &style, e);
+        return adjustSliderThumbStyle(styleResolver, style, e);
     case SearchFieldPart:
-        return adjustSearchFieldStyle(&styleResolver, &style, e);
+        return adjustSearchFieldStyle(styleResolver, style, e);
     case SearchFieldCancelButtonPart:
-        return adjustSearchFieldCancelButtonStyle(&styleResolver, &style, e);
+        return adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
     case SearchFieldDecorationPart:
-        return adjustSearchFieldDecorationPartStyle(&styleResolver, &style, e);
+        return adjustSearchFieldDecorationPartStyle(styleResolver, style, e);
     case SearchFieldResultsDecorationPart:
-        return adjustSearchFieldResultsDecorationPartStyle(&styleResolver, &style, e);
+        return adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, e);
     case SearchFieldResultsButtonPart:
-        return adjustSearchFieldResultsButtonStyle(&styleResolver, &style, e);
+        return adjustSearchFieldResultsButtonStyle(styleResolver, style, e);
     case ProgressBarPart:
-        return adjustProgressBarStyle(&styleResolver, &style, e);
+        return adjustProgressBarStyle(styleResolver, style, e);
 #if ENABLE(METER_ELEMENT)
     case MeterPart:
     case RelevancyLevelIndicatorPart:
     case ContinuousCapacityLevelIndicatorPart:
     case DiscreteCapacityLevelIndicatorPart:
     case RatingLevelIndicatorPart:
-        return adjustMeterStyle(&styleResolver, &style, e);
+        return adjustMeterStyle(styleResolver, style, e);
 #endif
 #if ENABLE(INPUT_SPEECH)
     case InputSpeechButtonPart:
-        return adjustInputFieldSpeechButtonStyle(&styleResolver, &style, e);
+        return adjustInputFieldSpeechButtonStyle(styleResolver, style, e);
 #endif
 #if ENABLE(SERVICE_CONTROLS)
     case ImageControlsButtonPart:
@@ -685,9 +685,9 @@ bool RenderTheme::isControlContainer(ControlPart appearance) const
     return appearance != CheckboxPart && appearance != RadioPart;
 }
 
-bool RenderTheme::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
+bool RenderTheme::isControlStyled(const RenderStyle& style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
 {
-    switch (style->appearance()) {
+    switch (style.appearance()) {
     case PushButtonPart:
     case SquareButtonPart:
     case DefaultButtonPart:
@@ -704,9 +704,9 @@ bool RenderTheme::isControlStyled(const RenderStyle* style, const BorderData& bo
     case TextFieldPart:
     case TextAreaPart:
         // Test the style to see if the UA border and background match.
-        return (style->border() != border
-            || *style->backgroundLayers() != background
-            || style->visitedDependentColor(CSSPropertyBackgroundColor) != backgroundColor);
+        return (style.border() != border
+            || *style.backgroundLayers() != background
+            || style.visitedDependentColor(CSSPropertyBackgroundColor) != backgroundColor);
     default:
         return false;
     }
@@ -723,15 +723,15 @@ void RenderTheme::adjustRepaintRect(const RenderObject& renderer, FloatRect& rec
 #endif
 }
 
-bool RenderTheme::supportsFocusRing(const RenderStyle* style) const
+bool RenderTheme::supportsFocusRing(const RenderStyle& style) const
 {
-    return (style->hasAppearance() && style->appearance() != TextFieldPart && style->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart && style->appearance() != ListboxPart);
+    return (style.hasAppearance() && style.appearance() != TextFieldPart && style.appearance() != TextAreaPart && style.appearance() != MenulistButtonPart && style.appearance() != ListboxPart);
 }
 
 bool RenderTheme::stateChanged(const RenderObject& o, ControlStates::States state) const
 {
     // Default implementation assumes the controls don't respond to changes in :hover state
-    if (state == ControlStates::HoverState && !supportsHover(&o.style()))
+    if (state == ControlStates::HoverState && !supportsHover(o.style()))
         return false;
 
     // Assume pressed state is only responded to if the control is enabled.
@@ -902,7 +902,7 @@ bool RenderTheme::isDefault(const RenderObject& o) const
 
 #if !USE(NEW_THEME)
 
-void RenderTheme::adjustCheckboxStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderTheme::adjustCheckboxStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // A summary of the rules for checkbox designed to match WinIE:
     // width/height - honored (WinIE actually scales its control for small widths, but lets it overflow for small heights.)
@@ -910,16 +910,16 @@ void RenderTheme::adjustCheckboxStyle(StyleResolver*, RenderStyle* style, Elemen
     setCheckboxSize(style);
 
     // padding - not honored by WinIE, needs to be removed.
-    style->resetPadding();
+    style.resetPadding();
 
     // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
     // for now, we will not honor it.
-    style->resetBorder();
+    style.resetBorder();
 
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-void RenderTheme::adjustRadioStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderTheme::adjustRadioStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // A summary of the rules for checkbox designed to match WinIE:
     // width/height - honored (WinIE actually scales its control for small widths, but lets it overflow for small heights.)
@@ -927,16 +927,16 @@ void RenderTheme::adjustRadioStyle(StyleResolver*, RenderStyle* style, Element*)
     setRadioSize(style);
 
     // padding - not honored by WinIE, needs to be removed.
-    style->resetPadding();
+    style.resetPadding();
 
     // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
     // for now, we will not honor it.
-    style->resetBorder();
+    style.resetBorder();
 
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-void RenderTheme::adjustButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderTheme::adjustButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // Most platforms will completely honor all CSS, and so we have no need to
     // adjust the style at all by default. We will still allow the theme a crack
@@ -944,25 +944,25 @@ void RenderTheme::adjustButtonStyle(StyleResolver*, RenderStyle* style, Element*
     setButtonSize(style);
 }
 
-void RenderTheme::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 #endif
 
-void RenderTheme::adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
 #if ENABLE(INPUT_SPEECH)
-void RenderTheme::adjustInputFieldSpeechButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderTheme::adjustInputFieldSpeechButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
     RenderInputSpeech::adjustInputFieldSpeechButtonStyle(styleResolver, style, element);
 }
@@ -974,12 +974,12 @@ bool RenderTheme::paintInputFieldSpeechButton(const RenderObject& object, const
 #endif
 
 #if ENABLE(METER_ELEMENT)
-void RenderTheme::adjustMeterStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderTheme::adjustMeterStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-IntSize RenderTheme::meterSizeForBounds(const RenderMeter*, const IntRect& bounds) const
+IntSize RenderTheme::meterSizeForBounds(const RenderMeter&, const IntRect& bounds) const
 {
     return bounds.size();
 }
@@ -1085,17 +1085,17 @@ void RenderTheme::paintSliderTicks(const RenderObject& o, const PaintInfo& paint
 }
 #endif
 
-double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress&) const
 {
     return 0;
 }
 
-double RenderTheme::animationDurationForProgressBar(RenderProgress*) const
+double RenderTheme::animationDurationForProgressBar(RenderProgress&) const
 {
     return 0;
 }
 
-void RenderTheme::adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -1104,49 +1104,49 @@ IntRect RenderTheme::progressBarRectForBounds(const RenderObject&, const IntRect
     return bounds;
 }
 
-bool RenderTheme::shouldHaveSpinButton(HTMLInputElement* inputElement) const
+bool RenderTheme::shouldHaveSpinButton(HTMLInputElement& inputElement) const
 {
-    return inputElement->isSteppable() && !inputElement->isRangeControl();
+    return inputElement.isSteppable() && !inputElement.isRangeControl();
 }
 
 void RenderTheme::adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustMediaControlStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustMediaControlStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSliderThumbStyle(StyleResolver*, RenderStyle* style, Element* element) const
+void RenderTheme::adjustSliderThumbStyle(StyleResolver&, RenderStyle& style, Element& element) const
 {
     adjustSliderThumbSize(style, element);
 }
 
-void RenderTheme::adjustSliderThumbSize(RenderStyle*, Element*) const
+void RenderTheme::adjustSliderThumbSize(RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
-void RenderTheme::adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderTheme::adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
index 5cc9e17..c9d84a4 100644 (file)
@@ -73,7 +73,7 @@ public:
     // metrics and defaults given the contents of the style.  This includes sophisticated operations like
     // selection of control size based off the font, the disabling of appearance when certain other properties like
     // "border" are set, or if the appearance is not supported by the theme.
-    void adjustStyle(StyleResolver&, RenderStyle&, Element*,  bool UAHasAppearance, const BorderData&, const FillLayer&, const Color& backgroundColor);
+    void adjustStyle(StyleResolver&, RenderStyle&, Element&,  bool UAHasAppearance, const BorderData&, const FillLayer&, const Color& backgroundColor);
 
     // This method is called to paint the widget as a background of the RenderObject.  A widget's foreground, e.g., the
     // text of a button, is always rendered by the engine itself.  The boolean return value indicates
@@ -115,7 +115,7 @@ public:
     virtual bool controlSupportsTints(const RenderObject&) const { return false; }
 
     // Whether or not the control has been styled enough by the author to disable the native appearance.
-    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
+    virtual bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
 
     // A general method asking if any control tinting is supported at all.
     virtual bool supportsControlTints() const { return false; }
@@ -133,10 +133,10 @@ public:
     virtual void themeChanged() { }
 
     // A method asking if the theme is able to draw the focus ring.
-    virtual bool supportsFocusRing(const RenderStyle*) const;
+    virtual bool supportsFocusRing(const RenderStyle&) const;
 
     // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle*) const { return false; }
+    virtual bool supportsHover(const RenderStyle&) const { return false; }
 
     // A method asking if the platform is able to show datalist suggestions for a given input type.
     virtual bool supportsDataListUI(const AtomicString&) const { return false; }
@@ -175,16 +175,16 @@ public:
     virtual void systemFont(CSSValueID, FontDescription&) const = 0;
     virtual Color systemColor(CSSValueID) const;
 
-    virtual int minimumMenuListSize(RenderStyle*) const { return 0; }
+    virtual int minimumMenuListSize(RenderStyle&) const { return 0; }
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
+    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(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 bool popupOptionSupportsTextIndent() const { return false; }
-    virtual PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle*, IntRect&) const { return PopupMenuStyle::PopupMenuSizeNormal; }
+    virtual PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle&, IntRect&) const { return PopupMenuStyle::PopupMenuSizeNormal; }
 
     virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) { return RegularScrollbar; }
 
@@ -192,9 +192,9 @@ public:
     virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&) { return 0; };
 
     // Returns the repeat interval of the animation for the progress bar.
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const;
     // Returns the duration of the animation for the progress bar.
-    virtual double animationDurationForProgressBar(RenderProgress*) const;
+    virtual double animationDurationForProgressBar(RenderProgress&) const;
     virtual IntRect progressBarRectForBounds(const RenderObject&, const IntRect&) const;
 
 #if ENABLE(VIDEO)
@@ -215,7 +215,7 @@ public:
 #endif
 
 #if ENABLE(METER_ELEMENT)
-    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const;
+    virtual IntSize meterSizeForBounds(const RenderMeter&, const IntRect&) const;
     virtual bool supportsMeter(ControlPart) const;
 #endif
 
@@ -231,7 +231,7 @@ public:
 #endif
 
     virtual bool shouldShowPlaceholderWhenFocused() const { return false; }
-    virtual bool shouldHaveSpinButton(HTMLInputElement*) const;
+    virtual bool shouldHaveSpinButton(HTMLInputElement&) const;
 
     // Functions for <select> elements.
     virtual bool delegatesMenuListRendering() const { return false; }
@@ -266,19 +266,19 @@ protected:
 
 #if !USE(NEW_THEME)
     // Methods for each appearance value.
-    virtual void adjustCheckboxStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustCheckboxStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual void setCheckboxSize(RenderStyle*) const { }
+    virtual void setCheckboxSize(RenderStyle&) const { }
 
-    virtual void adjustRadioStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustRadioStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual void setRadioSize(RenderStyle*) const { }
+    virtual void setRadioSize(RenderStyle&) const { }
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-    virtual void setButtonSize(RenderStyle*) const { }
+    virtual void setButtonSize(RenderStyle&) const { }
 
-    virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 #endif
 
@@ -286,15 +286,15 @@ protected:
     virtual bool paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
     virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
 
-    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
     virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
 
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
     virtual bool paintMenuListDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
@@ -305,42 +305,42 @@ protected:
     virtual bool paintSquareButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
 #if ENABLE(METER_ELEMENT)
-    virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMeterStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintMeter(const RenderObject&, const PaintInfo&, const IntRect&);
 #endif
 
-    virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
 #if ENABLE(INPUT_SPEECH)
-    virtual void adjustInputFieldSpeechButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustInputFieldSpeechButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintInputFieldSpeechButton(const RenderObject&, const PaintInfo&, const IntRect&);
 #endif
 
-    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
+    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 void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustMediaControlStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMediaControlStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintMediaFullscreenButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintMediaPlayButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintMediaOverlayPlayButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
index 875ffe4..2b31af9 100644 (file)
@@ -39,9 +39,9 @@ class RenderThemeIOS : public RenderTheme {
 public:
     static PassRefPtr<RenderTheme> create();
 
-    virtual int popupInternalPaddingRight(RenderStyle*) const override;
+    virtual int popupInternalPaddingRight(RenderStyle&) const override;
 
-    static void adjustRoundBorderRadius(RenderStyle&, RenderBox*);
+    static void adjustRoundBorderRadius(RenderStyle&, RenderBox&);
 
     virtual void systemFont(CSSValueID, FontDescription&) const override;
 
@@ -52,19 +52,19 @@ public:
 protected:
     virtual int baselinePosition(const RenderObject&) const override;
 
-    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer& background, const Color& backgroundColor) const override;
+    virtual bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer& background, const Color& backgroundColor) const override;
 
     // Methods for each appearance value.
-    virtual void adjustCheckboxStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustCheckboxStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintCheckboxDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustRadioStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustRadioStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintRadioDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
     virtual bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void setButtonSize(RenderStyle*) const override;
+    virtual void setButtonSize(RenderStyle&) const override;
 
     virtual bool paintFileUploadIconDecorations(const RenderObject& inputRenderer, const RenderObject& buttonRenderer, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) override;
 
@@ -74,16 +74,16 @@ protected:
     virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const override;
     virtual bool paintSliderThumbDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     // Returns the repeat interval of the animation for the progress bar.
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const override;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const override;
     // Returns the duration of the animation for the progress bar.
-    virtual double animationDurationForProgressBar(RenderProgress*) const override;
+    virtual double animationDurationForProgressBar(RenderProgress&) const override;
 
     virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
@@ -92,7 +92,7 @@ protected:
     virtual int sliderTickOffsetFromTrackCenter() const override;
 #endif
 
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual Color platformActiveSelectionBackgroundColor() const override;
@@ -103,7 +103,7 @@ protected:
 #endif
 
     virtual bool shouldShowPlaceholderWhenFocused() const override;
-    virtual bool shouldHaveSpinButton(HTMLInputElement*) const override;
+    virtual bool shouldHaveSpinButton(HTMLInputElement&) const override;
 
 #if ENABLE(VIDEO)
     virtual String mediaControlsStyleSheet() override;
index c83a31d..3e60afa 100644 (file)
@@ -350,15 +350,15 @@ FloatRect RenderThemeIOS::addRoundedBorderClip(const RenderObject& box, Graphics
     return border.rect();
 }
 
-void RenderThemeIOS::adjustCheckboxStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeIOS::adjustCheckboxStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
-    Length length = Length(static_cast<int>(ceilf(std::max(style->fontSize(), 10))), Fixed);
+    Length length = Length(static_cast<int>(ceilf(std::max(style.fontSize(), 10))), Fixed);
     
-    style->setWidth(length);
-    style->setHeight(length);
+    style.setWidth(length);
+    style.setHeight(length);
 }
 
 static CGPoint shortened(CGPoint start, CGPoint end, float width)
@@ -434,27 +434,27 @@ int RenderThemeIOS::baselinePosition(const RenderObject& renderer) const
     return RenderTheme::baselinePosition(box);
 }
 
-bool RenderThemeIOS::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
+bool RenderThemeIOS::isControlStyled(const RenderStyle& style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const
 {
     // Buttons and MenulistButtons are styled if they contain a background image.
-    if (style->appearance() == PushButtonPart || style->appearance() == MenulistButtonPart)
-        return !style->visitedDependentColor(CSSPropertyBackgroundColor).alpha() || style->backgroundLayers()->hasImage();
+    if (style.appearance() == PushButtonPart || style.appearance() == MenulistButtonPart)
+        return !style.visitedDependentColor(CSSPropertyBackgroundColor).alpha() || style.backgroundLayers()->hasImage();
 
-    if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart)
-        return *style->backgroundLayers() != background;
+    if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPart)
+        return *style.backgroundLayers() != background;
 
     return RenderTheme::isControlStyled(style, border, background, backgroundColor);
 }
 
-void RenderThemeIOS::adjustRadioStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeIOS::adjustRadioStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
-    Length length = Length(static_cast<int>(ceilf(std::max(style->fontSize(), 10))), Fixed);
-    style->setWidth(length);
-    style->setHeight(length);
-    style->setBorderRadius(IntSize(length.value() / 2.0f, length.value() / 2.0f));
+    Length length = Length(static_cast<int>(ceilf(std::max(style.fontSize(), 10))), Fixed);
+    style.setWidth(length);
+    style.setHeight(length);
+    style.setBorderRadius(IntSize(length.value() / 2.0f, length.value() / 2.0f));
 }
 
 bool RenderThemeIOS::paintRadioDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
@@ -516,21 +516,21 @@ const float MenuListArrowWidth = 7;
 const float MenuListArrowHeight = 6;
 const float MenuListButtonPaddingRight = 19;
 
-int RenderThemeIOS::popupInternalPaddingRight(RenderStyle* style) const
+int RenderThemeIOS::popupInternalPaddingRight(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistButtonPart)
-        return MenuListButtonPaddingRight + style->borderTopWidth();
+    if (style.appearance() == MenulistButtonPart)
+        return MenuListButtonPaddingRight + style.borderTopWidth();
     return 0;
 }
 
-void RenderThemeIOS::adjustRoundBorderRadius(RenderStyle& style, RenderBox* box)
+void RenderThemeIOS::adjustRoundBorderRadius(RenderStyle& style, RenderBox& box)
 {
     if (style.appearance() == NoControlPart || style.backgroundLayers()->hasImage())
         return;
 
     // FIXME: We should not be relying on border radius for the appearance of our controls <rdar://problem/7675493>
-    Length radiusWidth(static_cast<int>(std::min(box->width(), box->height()) / 2.0), Fixed);
-    Length radiusHeight(static_cast<int>(box->height() / 2.0), Fixed);
+    Length radiusWidth(static_cast<int>(std::min(box.width(), box.height()) / 2.0), Fixed);
+    Length radiusHeight(static_cast<int>(box.height() / 2.0), Fixed);
     style.setBorderRadius(LengthSize(radiusWidth, radiusHeight));
 }
 
@@ -616,10 +616,8 @@ void RenderThemeIOS::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& styl
     // "-webkit-appearance: menulist-button".
     if (element.hasTagName(HTMLNames::selectTag) && !element.hasAttribute(HTMLNames::multipleAttr))
         adjustSelectListButtonStyle(style, element);
-    else if (element.hasTagName(HTMLNames::inputTag)) {
-        HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(&element);
-        adjustInputElementButtonStyle(style, *inputElement);
-    }
+    else if (element.hasTagName(HTMLNames::inputTag))
+        adjustInputElementButtonStyle(style, static_cast<HTMLInputElement&>(element));
 }
 
 bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
@@ -714,14 +712,14 @@ const CGFloat kTrackThickness = 4.0;
 const CGFloat kTrackRadius = kTrackThickness / 2.0;
 const int kDefaultSliderThumbSize = 16;
 
-void RenderThemeIOS::adjustSliderTrackStyle(StyleResolver* selector, RenderStyle* style, Element* element) const
+void RenderThemeIOS::adjustSliderTrackStyle(StyleResolver& selector, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustSliderTrackStyle(selector, style, element);
 
     // FIXME: We should not be relying on border radius for the appearance of our controls <rdar://problem/7675493>
     Length radiusWidth(static_cast<int>(kTrackRadius), Fixed);
     Length radiusHeight(static_cast<int>(kTrackRadius), Fixed);
-    style->setBorderRadius(LengthSize(radiusWidth, radiusHeight));
+    style.setBorderRadius(LengthSize(radiusWidth, radiusHeight));
 }
 
 bool RenderThemeIOS::paintSliderTrack(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
@@ -802,20 +800,20 @@ bool RenderThemeIOS::paintSliderTrack(const RenderObject& box, const PaintInfo&
     return false;
 }
 
-void RenderThemeIOS::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeIOS::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    if (style->appearance() != SliderThumbHorizontalPart && style->appearance() != SliderThumbVerticalPart)
+    if (style.appearance() != SliderThumbHorizontalPart && style.appearance() != SliderThumbVerticalPart)
         return;
 
     // Enforce "border-radius: 50%".
     Length length(50.0f, Percent);
-    style->setBorderRadius(LengthSize(length, length));
+    style.setBorderRadius(LengthSize(length, length));
 
     // Enforce a 16x16 size if no size is provided.
-    if (style->width().isIntrinsicOrAuto() || style->height().isAuto()) {
+    if (style.width().isIntrinsicOrAuto() || style.height().isAuto()) {
         Length length = Length(kDefaultSliderThumbSize, Fixed);
-        style->setWidth(length);
-        style->setHeight(length);
+        style.setWidth(length);
+        style.setHeight(length);
     }
 }
 
@@ -836,12 +834,12 @@ bool RenderThemeIOS::paintSliderThumbDecorations(const RenderObject& box, const
     return false;
 }
 
-double RenderThemeIOS::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double RenderThemeIOS::animationRepeatIntervalForProgressBar(RenderProgress&) const
 {
     return 0;
 }
 
-double RenderThemeIOS::animationDurationForProgressBar(RenderProgress*) const
+double RenderThemeIOS::animationDurationForProgressBar(RenderProgress&) const
 {
     return 0;
 }
@@ -942,21 +940,18 @@ int RenderThemeIOS::sliderTickOffsetFromTrackCenter() const
 }
 #endif
 
-void RenderThemeIOS::adjustSearchFieldStyle(StyleResolver* selector, RenderStyle* style, Element* element) const
+void RenderThemeIOS::adjustSearchFieldStyle(StyleResolver& selector, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustSearchFieldStyle(selector, style, element);
 
-    if (!element)
-        return;
-
-    if (!style->hasBorder())
+    if (!style.hasBorder())
         return;
 
-    RenderBox* box = element->renderBox();
+    RenderBox* box = element.renderBox();
     if (!box)
         return;
 
-    adjustRoundBorderRadius(*style, box);
+    adjustRoundBorderRadius(style, *box);
 }
 
 bool RenderThemeIOS::paintSearchFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
@@ -964,7 +959,7 @@ bool RenderThemeIOS::paintSearchFieldDecorations(const RenderObject& box, const
     return paintTextFieldDecorations(box, paintInfo, rect);
 }
 
-void RenderThemeIOS::adjustButtonStyle(StyleResolver* selector, RenderStyle* style, Element* element) const
+void RenderThemeIOS::adjustButtonStyle(StyleResolver& selector, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustButtonStyle(selector, style, element);
 
@@ -973,17 +968,14 @@ void RenderThemeIOS::adjustButtonStyle(StyleResolver* selector, RenderStyle* sty
     // Since the element might not be in a document, just pass nullptr for the root element style
     // and the render view.
     RefPtr<CSSPrimitiveValue> emSize = CSSPrimitiveValue::create(1.0, CSSPrimitiveValue::CSS_EMS);
-    int pixels = emSize->computeLength<int>(CSSToLengthConversionData(style, nullptr, nullptr, 1.0, false));
-    style->setPaddingBox(LengthBox(0, pixels, 0, pixels));
-
-    if (!element)
-        return;
+    int pixels = emSize->computeLength<int>(CSSToLengthConversionData(&style, nullptr, nullptr, 1.0, false));
+    style.setPaddingBox(LengthBox(0, pixels, 0, pixels));
 
-    RenderBox* box = element->renderBox();
+    RenderBox* box = element.renderBox();
     if (!box)
         return;
 
-    adjustRoundBorderRadius(*style, box);
+    adjustRoundBorderRadius(style, *box);
 }
 
 bool RenderThemeIOS::paintButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
@@ -1006,14 +998,14 @@ bool RenderThemeIOS::paintPushButtonDecorations(const RenderObject& box, const P
     return false;
 }
 
-void RenderThemeIOS::setButtonSize(RenderStyle* style) const
+void RenderThemeIOS::setButtonSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Use the font size to determine the intrinsic width of the control.
-    style->setHeight(Length(static_cast<int>(ControlBaseHeight / ControlBaseFontSize * style->fontDescription().computedSize()), Fixed));
+    style.setHeight(Length(static_cast<int>(ControlBaseHeight / ControlBaseFontSize * style.fontDescription().computedSize()), Fixed));
 }
 
 const int kThumbnailBorderStrokeWidth = 1;
@@ -1082,7 +1074,7 @@ bool RenderThemeIOS::shouldShowPlaceholderWhenFocused() const
     return true;
 }
 
-bool RenderThemeIOS::shouldHaveSpinButton(HTMLInputElement*) const
+bool RenderThemeIOS::shouldHaveSpinButton(HTMLInputElement&) const
 {
     return false;
 }
index 92edbf9..2b83d40 100644 (file)
@@ -51,7 +51,7 @@ public:
 
     virtual void adjustRepaintRect(const RenderObject&, FloatRect&) override;
 
-    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const override;
+    virtual bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color& backgroundColor) const override;
 
     virtual Color platformActiveSelectionBackgroundColor() const override;
     virtual Color platformInactiveSelectionBackgroundColor() const override;
@@ -69,35 +69,35 @@ public:
     // System fonts.
     virtual void systemFont(CSSValueID, FontDescription&) const override;
 
-    virtual int minimumMenuListSize(RenderStyle*) const override;
+    virtual int minimumMenuListSize(RenderStyle&) const override;
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const override;
 
 #if ENABLE(DATALIST_ELEMENT)
     virtual IntSize sliderTickSize() const override;
     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 PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle*, IntRect&) const 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 PopupMenuStyle::PopupMenuSize popupMenuSize(const RenderStyle&, IntRect&) const override;
 
     virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual bool popsMenuByArrowKeys() const override { return true; }
 
 #if ENABLE(METER_ELEMENT)
-    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const override;
+    virtual IntSize meterSizeForBounds(const RenderMeter&, const IntRect&) const override;
     virtual bool paintMeter(const RenderObject&, const PaintInfo&, const IntRect&) override;
     virtual bool supportsMeter(ControlPart) const override;
 #endif
 
     // Returns the repeat interval of the animation for the progress bar.
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const override;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const override;
     // Returns the duration of the animation for the progress bar.
-    virtual double animationDurationForProgressBar(RenderProgress*) const override;
+    virtual double animationDurationForProgressBar(RenderProgress&) const override;
     virtual IntRect progressBarRectForBounds(const RenderObject&, const IntRect&) const override;
 
     virtual Color systemColor(CSSValueID) const override;
@@ -123,39 +123,39 @@ protected:
     virtual bool supportsSelectionForegroundColors() const override { return false; }
 
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
-    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override;
-    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
     virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
-    virtual void adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
     virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
     virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const 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 void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
 #if ENABLE(VIDEO)
@@ -172,14 +172,14 @@ private:
     FloatRect convertToPaintingRect(const RenderObject& inputRenderer, const RenderObject& partRenderer, const FloatRect& inputRect, const IntRect&) const;
 
     // 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(RenderStyle&) const;
+    NSControlSize controlSizeForSystemFont(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;
-    void setFontFromControlSize(StyleResolver*, RenderStyle*, NSControlSize) const;
+    void setSizeFromFont(RenderStyle&, const IntSize* sizes) const;
+    IntSize sizeForFont(RenderStyle&, const IntSize* sizes) const;
+    IntSize sizeForSystemFont(RenderStyle&, const IntSize* sizes) const;
+    void setFontFromControlSize(StyleResolver&, RenderStyle&, NSControlSize) const;
 
     void updateCheckedState(NSCell*, const RenderObject&);
     void updateEnabledState(NSCell*, const RenderObject&);
@@ -199,7 +199,7 @@ private:
     const IntSize* cancelButtonSizes() const;
     const IntSize* resultsButtonSizes() const;
     void setSearchCellState(const RenderObject&, const IntRect&);
-    void setSearchFieldSize(RenderStyle*) const;
+    void setSearchFieldSize(RenderStyle&) const;
 
     NSPopUpButtonCell *popupButton() const;
     NSSearchFieldCell *search() const;
@@ -210,10 +210,10 @@ private:
 
 #if ENABLE(METER_ELEMENT)
     NSLevelIndicatorStyle levelIndicatorStyleFor(ControlPart) const;
-    NSLevelIndicatorCell *levelIndicatorFor(const RenderMeter*) const;
+    NSLevelIndicatorCell *levelIndicatorFor(const RenderMeter&) const;
 #endif
 
-    int minimumProgressBarHeight(RenderStyle*) const;
+    int minimumProgressBarHeight(RenderStyle&) const;
     const IntSize* progressBarSizes() const;
     const int* progressBarMargins(NSControlSize) const;
 
index b8ffbac..17f6a8d 100644 (file)
@@ -599,17 +599,17 @@ bool RenderThemeMac::usesTestModeFocusRingColor() const
     return WebCore::usesTestModeFocusRingColor();
 }
 
-bool RenderThemeMac::isControlStyled(const RenderStyle* style, const BorderData& border,
+bool RenderThemeMac::isControlStyled(const RenderStyle& style, const BorderData& border,
                                      const FillLayer& background, const Color& backgroundColor) const
 {
-    if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
-        return style->border() != border;
+    if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPart || style.appearance() == ListboxPart)
+        return style.border() != border;
 
     // FIXME: This is horrible, but there is not much else that can be done.  Menu lists cannot draw properly when
     // scaled.  They can't really draw properly when transformed either.  We can't detect the transform case at style
     // adjustment time so that will just have to stay broken.  We can however detect that we're zooming.  If zooming
     // is in effect we treat it like the control is styled.
-    if (style->appearance() == MenulistPart && style->effectiveZoom() != 1.0f)
+    if (style.appearance() == MenulistPart && style.effectiveZoom() != 1.0f)
         return true;
 
     return RenderTheme::isControlStyled(style, border, background, backgroundColor);
@@ -743,9 +743,9 @@ bool RenderThemeMac::controlSupportsTints(const RenderObject& o) const
     return true;
 }
 
-NSControlSize RenderThemeMac::controlSizeForFont(RenderStyle* style) const
+NSControlSize RenderThemeMac::controlSizeForFont(RenderStyle& style) const
 {
-    int fontSize = style->fontSize();
+    int fontSize = style.fontSize();
     if (fontSize >= 16)
         return NSRegularControlSize;
     if (fontSize >= 11)
@@ -773,35 +773,35 @@ 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(RenderStyle& style, const IntSize* sizes) const
 {
-    if (style->effectiveZoom() != 1.0f) {
+    if (style.effectiveZoom() != 1.0f) {
         IntSize result = sizes[controlSizeForFont(style)];
-        return IntSize(result.width() * style->effectiveZoom(), result.height() * style->effectiveZoom());
+        return IntSize(result.width() * style.effectiveZoom(), result.height() * style.effectiveZoom());
     }
     return sizes[controlSizeForFont(style)];
 }
 
-IntSize RenderThemeMac::sizeForSystemFont(RenderStyle* style, const IntSize* sizes) const
+IntSize RenderThemeMac::sizeForSystemFont(RenderStyle& style, const IntSize* sizes) const
 {
-    if (style->effectiveZoom() != 1.0f) {
+    if (style.effectiveZoom() != 1.0f) {
         IntSize result = sizes[controlSizeForSystemFont(style)];
-        return IntSize(result.width() * style->effectiveZoom(), result.height() * style->effectiveZoom());
+        return IntSize(result.width() * style.effectiveZoom(), result.height() * style.effectiveZoom());
     }
     return sizes[controlSizeForSystemFont(style)];
 }
 
-void RenderThemeMac::setSizeFromFont(RenderStyle* style, const IntSize* sizes) const
+void RenderThemeMac::setSizeFromFont(RenderStyle& style, const IntSize* sizes) const
 {
     // FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
     IntSize size = sizeForFont(style, sizes);
-    if (style->width().isIntrinsicOrAuto() && size.width() > 0)
-        style->setWidth(Length(size.width(), Fixed));
-    if (style->height().isAuto() && size.height() > 0)
-        style->setHeight(Length(size.height(), Fixed));
+    if (style.width().isIntrinsicOrAuto() && size.width() > 0)
+        style.setWidth(Length(size.width(), Fixed));
+    if (style.height().isAuto() && size.height() > 0)
+        style.setHeight(Length(size.height(), Fixed));
 }
 
-void RenderThemeMac::setFontFromControlSize(StyleResolver*, RenderStyle* style, NSControlSize controlSize) const
+void RenderThemeMac::setFontFromControlSize(StyleResolver&, RenderStyle& style, NSControlSize controlSize) const
 {
     FontDescription fontDescription;
     fontDescription.setIsAbsoluteSize(true);
@@ -809,19 +809,19 @@ void RenderThemeMac::setFontFromControlSize(StyleResolver*, RenderStyle* style,
 
     NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:controlSize]];
     fontDescription.setOneFamily([font webCoreFamilyName]);
-    fontDescription.setComputedSize([font pointSize] * style->effectiveZoom());
-    fontDescription.setSpecifiedSize([font pointSize] * style->effectiveZoom());
+    fontDescription.setComputedSize([font pointSize] * style.effectiveZoom());
+    fontDescription.setSpecifiedSize([font pointSize] * style.effectiveZoom());
 
     // Reset line height
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
 
-    if (style->setFontDescription(fontDescription))
-        style->font().update(0);
+    if (style.setFontDescription(fontDescription))
+        style.font().update(0);
 }
 
-NSControlSize RenderThemeMac::controlSizeForSystemFont(RenderStyle* style) const
+NSControlSize RenderThemeMac::controlSizeForSystemFont(RenderStyle& style) const
 {
-    int fontSize = style->fontSize();
+    int fontSize = style.fontSize();
     if (fontSize >= [NSFont systemFontSizeForControlSize:NSRegularControlSize])
         return NSRegularControlSize;
     if (fontSize >= [NSFont systemFontSizeForControlSize:NSSmallControlSize])
@@ -845,7 +845,7 @@ bool RenderThemeMac::paintTextField(const RenderObject& o, const PaintInfo& pain
     return false;
 }
 
-void RenderThemeMac::adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeMac::adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -867,7 +867,7 @@ bool RenderThemeMac::paintTextArea(const RenderObject& o, const PaintInfo& paint
     return false;
 }
 
-void RenderThemeMac::adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeMac::adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -913,7 +913,7 @@ bool RenderThemeMac::paintMenuList(const RenderObject& renderer, const PaintInfo
 
     // Now inflate it to account for the shadow.
     FloatRect inflatedRect = rect;
-    if (rect.width() >= minimumMenuListSize(&renderer.style()))
+    if (rect.width() >= minimumMenuListSize(renderer.style()))
         inflatedRect = inflateRect(rect, size, popupButtonMargins(), zoomLevel);
 
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
@@ -943,9 +943,9 @@ bool RenderThemeMac::paintMenuList(const RenderObject& renderer, const PaintInfo
 
 #if ENABLE(METER_ELEMENT)
 
-IntSize RenderThemeMac::meterSizeForBounds(const RenderMeter* renderMeter, const IntRect& bounds) const
+IntSize RenderThemeMac::meterSizeForBounds(const RenderMeter& renderMeter, const IntRect& bounds) const
 {
-    if (NoControlPart == renderMeter->style().appearance())
+    if (NoControlPart == renderMeter.style().appearance())
         return bounds.size();
 
     NSLevelIndicatorCell* cell = levelIndicatorFor(renderMeter);
@@ -962,7 +962,7 @@ bool RenderThemeMac::paintMeter(const RenderObject& renderObject, const PaintInf
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
 
-    NSLevelIndicatorCell* cell = levelIndicatorFor(toRenderMeter(&renderObject));
+    NSLevelIndicatorCell* cell = levelIndicatorFor(toRenderMeter(renderObject));
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
 
     [cell drawWithFrame:rect inView:documentViewFor(renderObject)];
@@ -1001,16 +1001,16 @@ NSLevelIndicatorStyle RenderThemeMac::levelIndicatorStyleFor(ControlPart part) c
 
 }
 
-NSLevelIndicatorCell* RenderThemeMac::levelIndicatorFor(const RenderMeter* renderMeter) const
+NSLevelIndicatorCell* RenderThemeMac::levelIndicatorFor(const RenderMeter& renderMeter) const
 {
-    const RenderStyle& style = renderMeter->style();
+    const RenderStyle& style = renderMeter.style();
     ASSERT(style.appearance() != NoControlPart);
 
     if (!m_levelIndicator)
         m_levelIndicator = adoptNS([[NSLevelIndicatorCell alloc] initWithLevelIndicatorStyle:NSContinuousCapacityLevelIndicatorStyle]);
     NSLevelIndicatorCell* cell = m_levelIndicator.get();
 
-    HTMLMeterElement* element = renderMeter->meterElement();
+    HTMLMeterElement* element = renderMeter.meterElement();
     double value = element->value();
 
     // Because NSLevelIndicatorCell does not support optimum-in-the-middle type coloring,
@@ -1071,35 +1071,35 @@ IntRect RenderThemeMac::progressBarRectForBounds(const RenderObject& renderObjec
         return progressBarBounds;
 
     float zoomLevel = renderObject.style().effectiveZoom();
-    NSControlSize controlSize = controlSizeForFont(&renderObject.style());
+    NSControlSize controlSize = controlSizeForFont(renderObject.style());
     IntSize size = progressBarSizes()[controlSize];
     size.setHeight(size.height() * zoomLevel);
     size.setWidth(progressBarBounds.width());
 
     // Now inflate it to account for the shadow.
     IntRect inflatedRect = progressBarBounds;
-    if (progressBarBounds.height() <= minimumProgressBarHeight(&renderObject.style()))
+    if (progressBarBounds.height() <= minimumProgressBarHeight(renderObject.style()))
         inflatedRect = IntRect(inflateRect(inflatedRect, size, progressBarMargins(controlSize), zoomLevel));
 
     return inflatedRect;
 }
 
-int RenderThemeMac::minimumProgressBarHeight(RenderStyle* style) const
+int RenderThemeMac::minimumProgressBarHeight(RenderStyle& style) const
 {
     return sizeForSystemFont(style, progressBarSizes()).height();
 }
 
-double RenderThemeMac::animationRepeatIntervalForProgressBar(RenderProgress*) const
+double RenderThemeMac::animationRepeatIntervalForProgressBar(RenderProgress&) const
 {
     return progressAnimationFrameRate;
 }
 
-double RenderThemeMac::animationDurationForProgressBar(RenderProgress*) const
+double RenderThemeMac::animationDurationForProgressBar(RenderProgress&) const
 {
     return progressAnimationNumFrames * progressAnimationFrameRate;
 }
 
-void RenderThemeMac::adjustProgressBarStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeMac::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -1109,7 +1109,7 @@ bool RenderThemeMac::paintProgressBar(const RenderObject& renderObject, const Pa
         return true;
 
     IntRect inflatedRect = progressBarRectForBounds(renderObject, rect);
-    NSControlSize controlSize = controlSizeForFont(&renderObject.style());
+    NSControlSize controlSize = controlSizeForFont(renderObject.style());
 
     const RenderProgress& renderProgress = *toRenderProgress(&renderObject);
     HIThemeTrackDrawInfo trackInfo;
@@ -1335,22 +1335,22 @@ static const IntSize* menuListButtonSizes()
     return sizes;
 }
 
-void RenderThemeMac::adjustMenuListStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeMac::adjustMenuListStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     NSControlSize controlSize = controlSizeForFont(style);
 
-    style->resetBorder();
-    style->resetPadding();
+    style.resetBorder();
+    style.resetPadding();
 
     // Height is locked to auto.
-    style->setHeight(Length(Auto));
+    style.setHeight(Length(Auto));
 
     // White-space is locked to pre
-    style->setWhiteSpace(PRE);
+    style.setWhiteSpace(PRE);
 
     // Set the foreground color to black or gray when we have the aqua look.
     // Cast to RGB32 is to work around a compiler bug.
-    style->setColor(e && !e->isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+    style.setColor(!e.isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
 
     // Set the button's vertical size.
     setSizeFromFont(style, menuListButtonSizes());
@@ -1360,52 +1360,52 @@ void RenderThemeMac::adjustMenuListStyle(StyleResolver* styleResolver, RenderSty
     // system font for the control size instead.
     setFontFromControlSize(styleResolver, style, controlSize);
 
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
-int RenderThemeMac::popupInternalPaddingLeft(RenderStyle* style) const
+int RenderThemeMac::popupInternalPaddingLeft(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
-        return popupButtonPadding(controlSizeForFont(style))[leftPadding] * style->effectiveZoom();
-    if (style->appearance() == MenulistButtonPart)
-        return styledPopupPaddingLeft * style->effectiveZoom();
+    if (style.appearance() == MenulistPart)
+        return popupButtonPadding(controlSizeForFont(style))[leftPadding] * style.effectiveZoom();
+    if (style.appearance() == MenulistButtonPart)
+        return styledPopupPaddingLeft * style.effectiveZoom();
     return 0;
 }
 
-int RenderThemeMac::popupInternalPaddingRight(RenderStyle* style) const
+int RenderThemeMac::popupInternalPaddingRight(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
-        return popupButtonPadding(controlSizeForFont(style))[rightPadding] * style->effectiveZoom();
-    if (style->appearance() == MenulistButtonPart) {
-        float fontScale = style->fontSize() / baseFontSize;
+    if (style.appearance() == MenulistPart)
+        return popupButtonPadding(controlSizeForFont(style))[rightPadding] * style.effectiveZoom();
+    if (style.appearance() == MenulistButtonPart) {
+        float fontScale = style.fontSize() / baseFontSize;
         float arrowWidth = baseArrowWidth * fontScale;
-        return static_cast<int>(ceilf(arrowWidth + (arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator) * style->effectiveZoom()));
+        return static_cast<int>(ceilf(arrowWidth + (arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator) * style.effectiveZoom()));
     }
     return 0;
 }
 
-int RenderThemeMac::popupInternalPaddingTop(RenderStyle* style) const
+int RenderThemeMac::popupInternalPaddingTop(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
-        return popupButtonPadding(controlSizeForFont(style))[topPadding] * style->effectiveZoom();
-    if (style->appearance() == MenulistButtonPart)
-        return styledPopupPaddingTop * style->effectiveZoom();
+    if (style.appearance() == MenulistPart)
+        return popupButtonPadding(controlSizeForFont(style))[topPadding] * style.effectiveZoom();
+    if (style.appearance() == MenulistButtonPart)
+        return styledPopupPaddingTop * style.effectiveZoom();
     return 0;
 }
 
-int RenderThemeMac::popupInternalPaddingBottom(RenderStyle* style) const
+int RenderThemeMac::popupInternalPaddingBottom(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
-        return popupButtonPadding(controlSizeForFont(style))[bottomPadding] * style->effectiveZoom();
-    if (style->appearance() == MenulistButtonPart)
-        return styledPopupPaddingBottom * style->effectiveZoom();
+    if (style.appearance() == MenulistPart)
+        return popupButtonPadding(controlSizeForFont(style))[bottomPadding] * style.effectiveZoom();
+    if (style.appearance() == MenulistButtonPart)
+        return styledPopupPaddingBottom * style.effectiveZoom();
     return 0;
 }
 
-PopupMenuStyle::PopupMenuSize RenderThemeMac::popupMenuSize(const RenderStyle* style, IntRect& rect) const
+PopupMenuStyle::PopupMenuSize RenderThemeMac::popupMenuSize(const RenderStyle& style, IntRect& rect) const
 {
     NSPopUpButtonCell* popupButton = this->popupButton();
-    NSControlSize size = controlSizeForCell(popupButton, popupButtonSizes(), rect.size(), style->effectiveZoom());
+    NSControlSize size = controlSizeForCell(popupButton, popupButtonSizes(), rect.size(), style.effectiveZoom());
     switch (size) {
     case NSRegularControlSize:
         return PopupMenuStyle::PopupMenuSizeNormal;
@@ -1450,7 +1450,7 @@ const IntSize* RenderThemeMac::menuListSizes() const
     return sizes;
 }
 
-int RenderThemeMac::minimumMenuListSize(RenderStyle* style) const
+int RenderThemeMac::minimumMenuListSize(RenderStyle& style) const
 {
     return sizeForSystemFont(style, menuListSizes()).width();
 }
@@ -1458,9 +1458,9 @@ int RenderThemeMac::minimumMenuListSize(RenderStyle* style) const
 const int trackWidth = 5;
 const int trackRadius = 2;
 
-void RenderThemeMac::adjustSliderTrackStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSliderTrackStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeMac::paintSliderTrack(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -1504,10 +1504,10 @@ bool RenderThemeMac::paintSliderTrack(const RenderObject& o, const PaintInfo& pa
     return false;
 }
 
-void RenderThemeMac::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
+void RenderThemeMac::adjustSliderThumbStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
 {
     RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 const float verticalSliderHeightPadding = 0.1f;
@@ -1606,7 +1606,7 @@ void RenderThemeMac::setSearchCellState(const RenderObject& o, const IntRect&)
 {
     NSSearchFieldCell* search = this->search();
 
-    [search setControlSize:controlSizeForFont(&o.style())];
+    [search setControlSize:controlSizeForFont(o.style())];
 
     // Update the various states we respond to.
     updateEnabledState(search, o);
@@ -1619,45 +1619,45 @@ const IntSize* RenderThemeMac::searchFieldSizes() const
     return sizes;
 }
 
-void RenderThemeMac::setSearchFieldSize(RenderStyle* style) const
+void RenderThemeMac::setSearchFieldSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Use the font size to determine the intrinsic width of the control.
     setSizeFromFont(style, searchFieldSizes());
 }
 
-void RenderThemeMac::adjustSearchFieldStyle(StyleResolver* styleResolver, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element&) const
 {
     // Override border.
-    style->resetBorder();
-    const short borderWidth = 2 * style->effectiveZoom();
-    style->setBorderLeftWidth(borderWidth);
-    style->setBorderLeftStyle(INSET);
-    style->setBorderRightWidth(borderWidth);
-    style->setBorderRightStyle(INSET);
-    style->setBorderBottomWidth(borderWidth);
-    style->setBorderBottomStyle(INSET);
-    style->setBorderTopWidth(borderWidth);
-    style->setBorderTopStyle(INSET);
+    style.resetBorder();
+    const short borderWidth = 2 * style.effectiveZoom();
+    style.setBorderLeftWidth(borderWidth);
+    style.setBorderLeftStyle(INSET);
+    style.setBorderRightWidth(borderWidth);
+    style.setBorderRightStyle(INSET);
+    style.setBorderBottomWidth(borderWidth);
+    style.setBorderBottomStyle(INSET);
+    style.setBorderTopWidth(borderWidth);
+    style.setBorderTopStyle(INSET);
 
     // Override height.
-    style->setHeight(Length(Auto));
+    style.setHeight(Length(Auto));
     setSearchFieldSize(style);
 
     // Override padding size to match AppKit text positioning.
-    const int padding = 1 * style->effectiveZoom();
-    style->setPaddingLeft(Length(padding, Fixed));
-    style->setPaddingRight(Length(padding, Fixed));
-    style->setPaddingTop(Length(padding, Fixed));
-    style->setPaddingBottom(Length(padding, Fixed));
+    const int padding = 1 * style.effectiveZoom();
+    style.setPaddingLeft(Length(padding, Fixed));
+    style.setPaddingRight(Length(padding, Fixed));
+    style.setPaddingTop(Length(padding, Fixed));
+    style.setPaddingBottom(Length(padding, Fixed));
 
     NSControlSize controlSize = controlSizeForFont(style);
     setFontFromControlSize(styleResolver, style, controlSize);
 
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeMac::paintSearchFieldCancelButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -1716,12 +1716,12 @@ const IntSize* RenderThemeMac::cancelButtonSizes() const
     return sizes;
 }
 
-void RenderThemeMac::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, cancelButtonSizes());
-    style->setWidth(Length(size.width(), Fixed));
-    style->setHeight(Length(size.height(), Fixed));
-    style->setBoxShadow(nullptr);
+    style.setWidth(Length(size.width(), Fixed));
+    style.setHeight(Length(size.height(), Fixed));
+    style.setBoxShadow(nullptr);
 }
 
 const IntSize* RenderThemeMac::resultsButtonSizes() const
@@ -1731,12 +1731,12 @@ const IntSize* RenderThemeMac::resultsButtonSizes() const
 }
 
 const int emptyResultsOffset = 9;
-void RenderThemeMac::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width() - emptyResultsOffset, Fixed));
-    style->setHeight(Length(size.height(), Fixed));
-    style->setBoxShadow(nullptr);
+    style.setWidth(Length(size.width() - emptyResultsOffset, Fixed));
+    style.setHeight(Length(size.height(), Fixed));
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeMac::paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&)
@@ -1744,12 +1744,12 @@ bool RenderThemeMac::paintSearchFieldDecorationPart(const RenderObject&, const P
     return false;
 }
 
-void RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width(), Fixed));
-    style->setHeight(Length(size.height(), Fixed));
-    style->setBoxShadow(nullptr);
+    style.setWidth(Length(size.width(), Fixed));
+    style.setHeight(Length(size.height(), Fixed));
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeMac::paintSearchFieldResultsDecorationPart(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -1777,12 +1777,12 @@ bool RenderThemeMac::paintSearchFieldResultsDecorationPart(const RenderObject& o
 }
 
 const int resultsArrowWidth = 5;
-void RenderThemeMac::adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width() + resultsArrowWidth, Fixed));
-    style->setHeight(Length(size.height(), Fixed));
-    style->setBoxShadow(nullptr);
+    style.setWidth(Length(size.width() + resultsArrowWidth, Fixed));
+    style.setHeight(Length(size.height(), Fixed));
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeMac::paintSearchFieldResultsButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -1914,12 +1914,12 @@ int RenderThemeMac::sliderTickOffsetFromTrackCenter() const
 const int sliderThumbWidth = 15;
 const int sliderThumbHeight = 15;
 
-void RenderThemeMac::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeMac::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    float zoomLevel = style->effectiveZoom();
-    if (style->appearance() == SliderThumbHorizontalPart || style->appearance() == SliderThumbVerticalPart) {
-        style->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), Fixed));
-        style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed));
+    float zoomLevel = style.effectiveZoom();
+    if (style.appearance() == SliderThumbHorizontalPart || style.appearance() == SliderThumbVerticalPart) {
+        style.setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), Fixed));
+        style.setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed));
     }
 }
 
index eda3f32..4ba711a 100644 (file)
@@ -252,21 +252,21 @@ void RenderThemeSafari::systemFont(CSSValueID valueID, FontDescription& fontDesc
     fontDescription = *cachedDesc;
 }
 
-bool RenderThemeSafari::isControlStyled(const RenderStyle* style, const BorderData& border,
+bool RenderThemeSafari::isControlStyled(const RenderStyle& style, const BorderData& border,
                                      const FillLayer& background, const Color& backgroundColor) const
 {
     // If we didn't find SafariTheme.dll we won't be able to paint any themed controls.
     if (!SafariThemeLibrary())
         return true;
 
-    if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
-        return style->border() != border;
+    if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPart || style.appearance() == ListboxPart)
+        return style.border() != border;
     return RenderTheme::isControlStyled(style, border, background, backgroundColor);
 }
 
 void RenderThemeSafari::adjustRepaintRect(const RenderObject& o, IntRect& r)
 {
-    NSControlSize controlSize = controlSizeForFont(&o.style());
+    NSControlSize controlSize = controlSizeForFont(o.style());
 
     switch (o.style().appearance()) {
         case CheckboxPart: {
@@ -323,8 +323,8 @@ int RenderThemeSafari::baselinePosition(const RenderObject& o) const
         return 0;
 
     if (o.style().appearance() == CheckboxPart || o.style().appearance() == RadioPart) {
-        const RenderBox* box = toRenderBox(&o);
-        return box->marginTop() + box->height() - 2; // The baseline is 2px up from the bottom of the checkbox/radio in AppKit.
+        const RenderBox& box = toRenderBox(o);
+        return box.marginTop() + box.height() - 2; // The baseline is 2px up from the bottom of the checkbox/radio in AppKit.
     }
 
     return RenderTheme::baselinePosition(o);
@@ -343,9 +343,9 @@ bool RenderThemeSafari::controlSupportsTints(const RenderObject& o) const
     return true;
 }
 
-NSControlSize RenderThemeSafari::controlSizeForFont(RenderStyle* style) const
+NSControlSize RenderThemeSafari::controlSizeForFont(RenderStyle& style) const
 {
-    int fontSize = style->fontSize();
+    int fontSize = style.fontSize();
     if (fontSize >= 16)
         return NSRegularControlSize;
     if (fontSize >= 11)
@@ -368,27 +368,27 @@ void RenderThemeSafari::setControlSize(NSCell* cell, const IntSize* sizes, const
         [cell setControlSize:size];
 }
 */
-IntSize RenderThemeSafari::sizeForFont(RenderStyle* style, const IntSize* sizes) const
+IntSize RenderThemeSafari::sizeForFont(RenderStyle& style, const IntSize* sizes) const
 {
     return sizes[controlSizeForFont(style)];
 }
 
-IntSize RenderThemeSafari::sizeForSystemFont(RenderStyle* style, const IntSize* sizes) const
+IntSize RenderThemeSafari::sizeForSystemFont(RenderStyle& style, const IntSize* sizes) const
 {
     return sizes[controlSizeForSystemFont(style)];
 }
 
-void RenderThemeSafari::setSizeFromFont(RenderStyle* style, const IntSize* sizes) const
+void RenderThemeSafari::setSizeFromFont(RenderStyle& style, const IntSize* sizes) const
 {
     // FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
     IntSize size = sizeForFont(style, sizes);
-    if (style->width().isIntrinsicOrAuto() && size.width() > 0)
-        style->setWidth(Length(size.width(), Fixed));
-    if (style->height().isAuto() && size.height() > 0)
-        style->setHeight(Length(size.height(), Fixed));
+    if (style.width().isIntrinsicOrAuto() && size.width() > 0)
+        style.setWidth(Length(size.width(), Fixed));
+    if (style.height().isAuto() && size.height() > 0)
+        style.setHeight(Length(size.height(), Fixed));
 }
 
-void RenderThemeSafari::setFontFromControlSize(StyleResolver* styleResolver, RenderStyle* style, NSControlSize controlSize) const
+void RenderThemeSafari::setFontFromControlSize(StyleResolver& styleResolver, RenderStyle& style, NSControlSize controlSize) const
 {
     FontDescription fontDescription;
     fontDescription.setIsAbsoluteSize(true);
@@ -400,15 +400,15 @@ void RenderThemeSafari::setFontFromControlSize(StyleResolver* styleResolver, Ren
     fontDescription.setSpecifiedSize(fontSize);
 
     // Reset line height
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
 
-    if (style->setFontDescription(fontDescription))
-        style->font().update(styleResolver->fontSelector());
+    if (style.setFontDescription(fontDescription))
+        style.font().update(styleResolver.fontSelector());
 }
 
-NSControlSize RenderThemeSafari::controlSizeForSystemFont(RenderStyle* style) const
+NSControlSize RenderThemeSafari::controlSizeForSystemFont(RenderStyle& style) const
 {
-    int fontSize = style->fontSize();
+    int fontSize = style.fontSize();
     if (fontSize >= 13)
         return NSRegularControlSize;
     if (fontSize >= 11)
@@ -420,7 +420,7 @@ bool RenderThemeSafari::paintCheckbox(const RenderObject& o, const PaintInfo& pa
 {
     ASSERT(SafariThemeLibrary());
 
-    NSControlSize controlSize = controlSizeForFont(&o.style());
+    NSControlSize controlSize = controlSizeForFont(o.style());
 
     IntRect inflatedRect = inflateRect(r, checkboxSizes()[controlSize], checkboxMargins(controlSize));  
     paintThemePart(SafariTheme::CheckboxPart, paintInfo.context->platformContext(), inflatedRect, controlSize, determineState(o));
@@ -445,10 +445,10 @@ const int* RenderThemeSafari::checkboxMargins(NSControlSize controlSize) const
     return margins[controlSize];
 }
 
-void RenderThemeSafari::setCheckboxSize(RenderStyle* style) const
+void RenderThemeSafari::setCheckboxSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Use the font size to determine the intrinsic width of the control.
@@ -459,7 +459,7 @@ bool RenderThemeSafari::paintRadio(const RenderObject& o, const PaintInfo& paint
 {
     ASSERT(SafariThemeLibrary());
 
-    NSControlSize controlSize = controlSizeForFont(&o.style());
+    NSControlSize controlSize = controlSizeForFont(o.style());
  
     IntRect inflatedRect = inflateRect(r, radioSizes()[controlSize], radioMargins(controlSize));    
     paintThemePart(RadioButtonPart, paintInfo.context->platformContext(), inflatedRect, controlSize, determineState(o));
@@ -484,17 +484,17 @@ const int* RenderThemeSafari::radioMargins(NSControlSize controlSize) const
     return margins[controlSize];
 }
 
-void RenderThemeSafari::setRadioSize(RenderStyle* style) const
+void RenderThemeSafari::setRadioSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Use the font size to determine the intrinsic width of the control.
     setSizeFromFont(style, radioSizes());
 }
 
-void RenderThemeSafari::setButtonPaddingFromControlSize(RenderStyle* style, NSControlSize size) const
+void RenderThemeSafari::setButtonPaddingFromControlSize(RenderStyle& style, NSControlSize size) const
 {
     // Just use 8px.  AppKit wants to use 11px for mini buttons, but that padding is just too large
     // for real-world Web sites (creating a huge necessary minimum width for buttons whose space is
@@ -502,13 +502,13 @@ void RenderThemeSafari::setButtonPaddingFromControlSize(RenderStyle* style, NSCo
     // This also guarantees the HTML4 <button> will match our rendering by default, since we're using a consistent
     // padding.
     const int padding = 8;
-    style->setPaddingLeft(Length(padding, Fixed));
-    style->setPaddingRight(Length(padding, Fixed));
-    style->setPaddingTop(Length(0, Fixed));
-    style->setPaddingBottom(Length(0, Fixed));
+    style.setPaddingLeft(Length(padding, Fixed));
+    style.setPaddingRight(Length(padding, Fixed));
+    style.setPaddingTop(Length(0, Fixed));
+    style.setPaddingBottom(Length(0, Fixed));
 }
 
-void RenderThemeSafari::adjustButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeSafari::adjustButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     // There are three appearance constants for buttons.
     // (1) Push-button is the constant for the default Aqua system button.  Push buttons will not scale vertically and will not allow
@@ -522,15 +522,15 @@ void RenderThemeSafari::adjustButtonStyle(StyleResolver* styleResolver, RenderSt
     // Determine our control size based off our font.
     NSControlSize controlSize = controlSizeForFont(style);
 
-    if (style->appearance() == PushButtonPart) {
+    if (style.appearance() == PushButtonPart) {
         // Ditch the border.
-        style->resetBorder();
+        style.resetBorder();
 
         // Height is locked to auto.
-        style->setHeight(Length(Auto));
+        style.setHeight(Length(Auto));
 
         // White-space is locked to pre
-        style->setWhiteSpace(PRE);
+        style.setWhiteSpace(PRE);
 
         // Set the button's vertical size.
         setButtonSize(style);
@@ -544,11 +544,11 @@ void RenderThemeSafari::adjustButtonStyle(StyleResolver* styleResolver, RenderSt
         setFontFromControlSize(styleResolver, style, controlSize);
     } else {
         // Set a min-height so that we can't get smaller than the mini button.
-        style->setMinHeight(Length(15, Fixed));
+        style.setMinHeight(Length(15, Fixed));
 
         // Reset the top and bottom borders.
-        style->resetBorderTop();
-        style->resetBorderBottom();
+        style.resetBorderTop();
+        style.resetBorderBottom();
     }
 }
 
@@ -569,10 +569,10 @@ const int* RenderThemeSafari::buttonMargins(NSControlSize controlSize) const
     return margins[controlSize];
 }
 
-void RenderThemeSafari::setButtonSize(RenderStyle* style) const
+void RenderThemeSafari::setButtonSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // Use the font size to determine the intrinsic width of the control.
@@ -620,7 +620,7 @@ bool RenderThemeSafari::paintTextField(const RenderObject& o, const PaintInfo& p
     return false;
 }
 
-void RenderThemeSafari::adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeSafari::adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -648,7 +648,7 @@ bool RenderThemeSafari::paintTextArea(const RenderObject& o, const PaintInfo& pa
     return false;
 }
 
-void RenderThemeSafari::adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const
+void RenderThemeSafari::adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const
 {
 }
 
@@ -690,7 +690,7 @@ bool RenderThemeSafari::paintMenuList(const RenderObject& o, const PaintInfo& in
     size.setWidth(r.width());
 
     // Now inflate it to account for the shadow.
-    if (r.width() >= minimumMenuListSize(&o.style()))
+    if (r.width() >= minimumMenuListSize(o.style()))
         inflatedRect = inflateRect(inflatedRect, size, popupButtonMargins(controlSize));
 
     paintThemePart(DropDownButtonPart, info.context->platformContext(), inflatedRect, controlSize, determineState(o));
@@ -864,22 +864,22 @@ bool RenderThemeSafari::paintMenuListButtonDecorations(const RenderObject& rende
     return false;
 }
 
-void RenderThemeSafari::adjustMenuListStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeSafari::adjustMenuListStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     NSControlSize controlSize = controlSizeForFont(style);
 
-    style->resetBorder();
-    style->resetPadding();
+    style.resetBorder();
+    style.resetPadding();
     
     // Height is locked to auto.
-    style->setHeight(Length(Auto));
+    style.setHeight(Length(Auto));
 
     // White-space is locked to pre
-    style->setWhiteSpace(PRE);
+    style.setWhiteSpace(PRE);
 
     // Set the foreground color to black or gray when we have the aqua look.
     // Cast to RGB32 is to work around a compiler bug.
-    style->setColor(e && !e->isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+    style.setColor(!e.isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
 
     // Set the button's vertical size.
     setButtonSize(style);
@@ -890,56 +890,56 @@ void RenderThemeSafari::adjustMenuListStyle(StyleResolver* styleResolver, Render
     setFontFromControlSize(styleResolver, style, controlSize);
 }
 
-int RenderThemeSafari::popupInternalPaddingLeft(RenderStyle* style) const
+int RenderThemeSafari::popupInternalPaddingLeft(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
+    if (style.appearance() == MenulistPart)
         return popupButtonPadding(controlSizeForFont(style))[leftPadding];
-    if (style->appearance() == MenulistButtonPart)
+    if (style.appearance() == MenulistButtonPart)
         return styledPopupPaddingLeft;
     return 0;
 }
 
-int RenderThemeSafari::popupInternalPaddingRight(RenderStyle* style) const
+int RenderThemeSafari::popupInternalPaddingRight(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
+    if (style.appearance() == MenulistPart)
         return popupButtonPadding(controlSizeForFont(style))[rightPadding];
-    if (style->appearance() == MenulistButtonPart) {
-        float fontScale = style->fontSize() / baseFontSize;
+    if (style.appearance() == MenulistButtonPart) {
+        float fontScale = style.fontSize() / baseFontSize;
         float arrowWidth = baseArrowWidth * fontScale;
         return static_cast<int>(ceilf(arrowWidth + arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator));
     }
     return 0;
 }
 
-int RenderThemeSafari::popupInternalPaddingTop(RenderStyle* style) const
+int RenderThemeSafari::popupInternalPaddingTop(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
+    if (style.appearance() == MenulistPart)
         return popupButtonPadding(controlSizeForFont(style))[topPadding];
-    if (style->appearance() == MenulistButtonPart)
+    if (style.appearance() == MenulistButtonPart)
         return styledPopupPaddingTop;
     return 0;
 }
 
-int RenderThemeSafari::popupInternalPaddingBottom(RenderStyle* style) const
+int RenderThemeSafari::popupInternalPaddingBottom(RenderStyle& style) const
 {
-    if (style->appearance() == MenulistPart)
+    if (style.appearance() == MenulistPart)
         return popupButtonPadding(controlSizeForFont(style))[bottomPadding];
-    if (style->appearance() == MenulistButtonPart)
+    if (style.appearance() == MenulistButtonPart)
         return styledPopupPaddingBottom;
     return 0;
 }
 
-void RenderThemeSafari::adjustMenuListButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    float fontScale = style->fontSize() / baseFontSize;
+    float fontScale = style.fontSize() / baseFontSize;
     
-    style->resetPadding();
-    style->setBorderRadius(IntSize(int(baseBorderRadius + fontScale - 1), int(baseBorderRadius + fontScale - 1))); // FIXME: Round up?
+    style.resetPadding();
+    style.setBorderRadius(IntSize(int(baseBorderRadius + fontScale - 1), int(baseBorderRadius + fontScale - 1))); // FIXME: Round up?
 
     const int minHeight = 15;
-    style->setMinHeight(Length(minHeight, Fixed));
+    style.setMinHeight(Length(minHeight, Fixed));
     
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
 }
 
 const IntSize* RenderThemeSafari::menuListSizes() const
@@ -948,7 +948,7 @@ const IntSize* RenderThemeSafari::menuListSizes() const
     return sizes;
 }
 
-int RenderThemeSafari::minimumMenuListSize(RenderStyle* style) const
+int RenderThemeSafari::minimumMenuListSize(RenderStyle& style) const
 {
     return sizeForSystemFont(style, menuListSizes()).width();
 }
@@ -987,10 +987,10 @@ bool RenderThemeSafari::paintSliderTrack(const RenderObject& o, const PaintInfo&
     return false;
 }
 
-void RenderThemeSafari::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const 
+void RenderThemeSafari::adjustSliderThumbStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const 
 { 
     RenderTheme::adjustSliderThumbStyle(styleResolver, style, e);
-    style->setBoxShadow(nullptr); 
+    style.setBoxShadow(nullptr); 
 } 
 
 const float verticalSliderHeightPadding = 0.1f;
@@ -1005,14 +1005,14 @@ bool RenderThemeSafari::paintSliderThumb(const RenderObject& o, const PaintInfo&
 const int sliderThumbWidth = 15;
 const int sliderThumbHeight = 15;
 
-void RenderThemeSafari::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    if (style->appearance() == SliderThumbHorizontalPart || style->appearance() == SliderThumbVerticalPart) {
-        style->setWidth(Length(sliderThumbWidth, Fixed));
-        style->setHeight(Length(sliderThumbHeight, Fixed));
+    if (style.appearance() == SliderThumbHorizontalPart || style.appearance() == SliderThumbVerticalPart) {
+        style.setWidth(Length(sliderThumbWidth, Fixed));
+        style.setHeight(Length(sliderThumbHeight, Fixed));
     } 
 #if ENABLE(VIDEO)
-    else if (style->appearance() == MediaSliderThumbPart) 
+    else if (style.appearance() == MediaSliderThumbPart) 
         RenderMediaControls::adjustMediaSliderThumbSize(style);
 #endif
 }
@@ -1031,40 +1031,40 @@ const IntSize* RenderThemeSafari::searchFieldSizes() const
     return sizes;
 }
 
-void RenderThemeSafari::setSearchFieldSize(RenderStyle* style) const
+void RenderThemeSafari::setSearchFieldSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
     
     // Use the font size to determine the intrinsic width of the control.
     setSizeFromFont(style, searchFieldSizes());
 }
 
-void RenderThemeSafari::adjustSearchFieldStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeSafari::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     // Override border.
-    style->resetBorder();
+    style.resetBorder();
     const short borderWidth = 2;
-    style->setBorderLeftWidth(borderWidth);
-    style->setBorderLeftStyle(INSET);
-    style->setBorderRightWidth(borderWidth);
-    style->setBorderRightStyle(INSET);
-    style->setBorderBottomWidth(borderWidth);
-    style->setBorderBottomStyle(INSET);
-    style->setBorderTopWidth(borderWidth);
-    style->setBorderTopStyle(INSET);    
+    style.setBorderLeftWidth(borderWidth);
+    style.setBorderLeftStyle(INSET);
+    style.setBorderRightWidth(borderWidth);
+    style.setBorderRightStyle(INSET);
+    style.setBorderBottomWidth(borderWidth);
+    style.setBorderBottomStyle(INSET);
+    style.setBorderTopWidth(borderWidth);
+    style.setBorderTopStyle(INSET);    
     
     // Override height.
-    style->setHeight(Length(Auto));
+    style.setHeight(Length(Auto));
     setSearchFieldSize(style);
     
     // Override padding size to match AppKit text positioning.
     const int padding = 1;
-    style->setPaddingLeft(Length(padding, Fixed));
-    style->setPaddingRight(Length(padding, Fixed));
-    style->setPaddingTop(Length(padding, Fixed));
-    style->setPaddingBottom(Length(padding, Fixed));
+    style.setPaddingLeft(Length(padding, Fixed));
+    style.setPaddingRight(Length(padding, Fixed));
+    style.setPaddingTop(Length(padding, Fixed));
+    style.setPaddingBottom(Length(padding, Fixed));
     
     NSControlSize controlSize = controlSizeForFont(style);
     setFontFromControlSize(styleResolver, style, controlSize);
@@ -1092,11 +1092,11 @@ const IntSize* RenderThemeSafari::cancelButtonSizes() const
     return sizes;
 }
 
-void RenderThemeSafari::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, cancelButtonSizes());
-    style->setWidth(Length(size.width(), Fixed));
-    style->setHeight(Length(size.height(), Fixed));
+    style.setWidth(Length(size.width(), Fixed));
+    style.setHeight(Length(size.height(), Fixed));
 }
 
 const IntSize* RenderThemeSafari::resultsButtonSizes() const
@@ -1106,11 +1106,11 @@ const IntSize* RenderThemeSafari::resultsButtonSizes() const
 }
 
 const int emptyResultsOffset = 9;
-void RenderThemeSafari::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width() - emptyResultsOffset, Fixed));
-    style->setHeight(Length(size.height(), Fixed));
+    style.setWidth(Length(size.width() - emptyResultsOffset, Fixed));
+    style.setHeight(Length(size.height(), Fixed));
 }
 
 bool RenderThemeSafari::paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&)
@@ -1118,11 +1118,11 @@ bool RenderThemeSafari::paintSearchFieldDecorationPart(const RenderObject&, cons
     return false;
 }
 
-void RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width(), Fixed));
-    style->setHeight(Length(size.height(), Fixed));
+    style.setWidth(Length(size.width(), Fixed));
+    style.setHeight(Length(size.height(), Fixed));
 }
 
 bool RenderThemeSafari::paintSearchFieldResultsDecorationPart(const RenderObject& o, const PaintInfo& paintInfo, const IntRect&)
@@ -1142,11 +1142,11 @@ bool RenderThemeSafari::paintSearchFieldResultsDecorationPart(const RenderObject
 }
 
 const int resultsArrowWidth = 5;
-void RenderThemeSafari::adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize size = sizeForSystemFont(style, resultsButtonSizes());
-    style->setWidth(Length(size.width() + resultsArrowWidth, Fixed));
-    style->setHeight(Length(size.height(), Fixed));
+    style.setWidth(Length(size.width() + resultsArrowWidth, Fixed));
+    style.setHeight(Length(size.height(), Fixed));
 }
 
 bool RenderThemeSafari::paintSearchFieldResultsButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect&)
@@ -1190,9 +1190,9 @@ String RenderThemeSafari::mediaControlsScript()
 #endif
 
 #if ENABLE(METER_ELEMENT)
-void RenderThemeSafari::adjustMeterStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeSafari::adjustMeterStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeSafari::supportsMeter(ControlPart part) const
@@ -1205,7 +1205,7 @@ bool RenderThemeSafari::supportsMeter(ControlPart part) const
     }
 }
 
-IntSize RenderThemeSafari::meterSizeForBounds(const RenderMeter*, const IntRect& bounds) const
+IntSize RenderThemeSafari::meterSizeForBounds(const RenderMeter&, const IntRect& bounds) const
 {
     return bounds.size();
 }
@@ -1217,7 +1217,7 @@ bool RenderThemeSafari::paintMeter(const RenderObject& renderObject, const Paint
     if (!renderObject.isMeter())
         return true;
 
-    HTMLMeterElement* element = toRenderMeter(&renderObject)->meterElement();
+    HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
 
     int remaining = static_cast<int>((1.0 - element->valueRatio()) * static_cast<double>(rect.size().width()));
 
index 5ee9b4b..f7449c6 100644 (file)
@@ -62,7 +62,7 @@ public:
 
     virtual void adjustRepaintRect(const RenderObject&, IntRect&);
 
-    virtual bool isControlStyled(const RenderStyle*, const BorderData&,
+    virtual bool isControlStyled(const RenderStyle&, const BorderData&,
                                  const FillLayer&, const Color& backgroundColor) const;
 
     virtual Color platformActiveSelectionBackgroundColor() const;
@@ -74,56 +74,56 @@ public:
     // System fonts.
     virtual void systemFont(CSSValueID, FontDescription&) const;
 
-    virtual int minimumMenuListSize(RenderStyle*) const;
+    virtual int minimumMenuListSize(RenderStyle&) const;
 
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
-    virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const; 
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const;
+    virtual void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element&) const; 
     
-    virtual int popupInternalPaddingLeft(RenderStyle*) const;
-    virtual int popupInternalPaddingRight(RenderStyle*) const;
-    virtual int popupInternalPaddingTop(RenderStyle*) const;
-    virtual int popupInternalPaddingBottom(RenderStyle*) const;
+    virtual int popupInternalPaddingLeft(RenderStyle&) const;
+    virtual int popupInternalPaddingRight(RenderStyle&) const;
+    virtual int popupInternalPaddingTop(RenderStyle&) const;
+    virtual int popupInternalPaddingBottom(RenderStyle&) const;
 
 protected:
     // Methods for each appearance value.
     virtual bool paintCheckbox(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void setCheckboxSize(RenderStyle*) const;
+    virtual void setCheckboxSize(RenderStyle&) const;
 
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void setRadioSize(RenderStyle*) const;
+    virtual void setRadioSize(RenderStyle&) const;
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, WebCore::Element*) const;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, WebCore::Element&) const;
     virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void setButtonSize(RenderStyle*) const;
+    virtual void setButtonSize(RenderStyle&) const;
 
     virtual bool paintTextField(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element&) const;
 
     virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element&) const;
 
     virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const;
 
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&);
-    virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
 
     virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&);
     virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&);
 
     virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const;
 
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&);
 
-    virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&);
 
-    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&);
 
-    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
     virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&);
  
     virtual bool paintCapsLockIndicator(const RenderObject&, const PaintInfo&, const IntRect&);
@@ -134,9 +134,9 @@ protected:
 #endif
 
 #if ENABLE(METER_ELEMENT)
-    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const override;
+    virtual IntSize meterSizeForBounds(const RenderMeter&, const IntRect&) const override;
     virtual bool supportsMeter(ControlPart) const override;
-    virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustMeterStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMeter(const RenderObject&, const PaintInfo&, const IntRect&) override;
 #endif
 
@@ -150,13 +150,13 @@ private:
 
     // 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(RenderStyle&) const;
+    NSControlSize controlSizeForSystemFont(RenderStyle&) const;
     //void setControlSize(NSCell*, const IntSize* sizes, const IntSize& minSize);
-    void setSizeFromFont(RenderStyle*, const IntSize* sizes) const;
-    IntSize sizeForFont(RenderStyle*, const IntSize* sizes) const;
-    IntSize sizeForSystemFont(RenderStyle*, const IntSize* sizes) const;
-    void setFontFromControlSize(StyleResolver*, RenderStyle*, NSControlSize) const;
+    void setSizeFromFont(RenderStyle&, const IntSize* sizes) const;
+    IntSize sizeForFont(RenderStyle&, const IntSize* sizes) const;
+    IntSize sizeForSystemFont(RenderStyle&, const IntSize* sizes) const;
+    void setFontFromControlSize(StyleResolver&, RenderStyle&, NSControlSize) const;
 
     // Helpers for adjusting appearance and for painting
     const IntSize* checkboxSizes() const;
@@ -165,7 +165,7 @@ private:
     const IntSize* radioSizes() const;
     const int* radioMargins(NSControlSize) const;
 
-    void setButtonPaddingFromControlSize(RenderStyle*, NSControlSize) const;
+    void setButtonPaddingFromControlSize(RenderStyle&, NSControlSize) const;
     const IntSize* buttonSizes() const;
     const int* buttonMargins(NSControlSize) const;
 
@@ -178,7 +178,7 @@ private:
     const IntSize* searchFieldSizes() const;
     const IntSize* cancelButtonSizes() const;
     const IntSize* resultsButtonSizes() const;
-    void setSearchFieldSize(RenderStyle*) const;
+    void setSearchFieldSize(RenderStyle&) const;
 
     ThemeControlState determineState(const RenderObject&) const;
 
index 932eef8..88e9310 100644 (file)
@@ -291,7 +291,7 @@ String RenderThemeWin::extraQuirksStyleSheet()
     return String(themeWinQuirksUserAgentStyleSheet, sizeof(themeWinQuirksUserAgentStyleSheet));
 }
 
-bool RenderThemeWin::supportsHover(const RenderStyle*) const
+bool RenderThemeWin::supportsHover(const RenderStyle&) const
 {
     // The Classic/2k look has no hover effects.
     return haveTheme;
@@ -429,9 +429,9 @@ bool RenderThemeWin::supportsFocus(ControlPart appearance) const
     }
 }
 
-bool RenderThemeWin::supportsFocusRing(const RenderStyle* style) const
+bool RenderThemeWin::supportsFocusRing(const RenderStyle& style) const
 {
-    return supportsFocus(style->appearance());
+    return supportsFocus(style.appearance());
 }
 
 unsigned RenderThemeWin::determineClassicState(const RenderObject& o, ControlSubPart subPart)
@@ -730,13 +730,13 @@ bool RenderThemeWin::paintButton(const RenderObject& o, const PaintInfo& i, cons
     return false;
 }
 
-void RenderThemeWin::adjustInnerSpinButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeWin::adjustInnerSpinButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     int width = ::GetSystemMetrics(SM_CXVSCROLL);
     if (width <= 0)
         width = 17; // Vista's default.
-    style->setWidth(Length(width, Fixed));
-    style->setMinWidth(Length(width, Fixed));
+    style.setWidth(Length(width, Fixed));
+    style.setMinWidth(Length(width, Fixed));
 }
 
 bool RenderThemeWin::paintInnerSpinButton(const RenderObject& o, const PaintInfo& i, const IntRect& r)
@@ -755,29 +755,29 @@ bool RenderThemeWin::paintInnerSpinButton(const RenderObject& o, const PaintInfo
     return false;
 }
 
-void RenderThemeWin::setCheckboxSize(RenderStyle* style) const
+void RenderThemeWin::setCheckboxSize(RenderStyle& style) const
 {
     // If the width and height are both specified, then we have nothing to do.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+    if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto())
         return;
 
     // FIXME:  A hard-coded size of 13 is used.  This is wrong but necessary for now.  It matches Firefox.
     // At different DPI settings on Windows, querying the theme gives you a larger size that accounts for
     // the higher DPI.  Until our entire engine honors a DPI setting other than 96, we can't rely on the theme's
     // metrics.
-    if (style->width().isIntrinsicOrAuto())
-        style->setWidth(Length(13, Fixed));
-    if (style->height().isAuto())
-        style->setHeight(Length(13, Fixed));
+    if (style.width().isIntrinsicOrAuto())
+        style.setWidth(Length(13, Fixed));
+    if (style.height().isAuto())
+        style.setHeight(Length(13, Fixed));
 }
 
-bool RenderThemeWin::paintTextField(const RenderObject& o, const PaintInfo& i, const IntRect& r)
+bool RenderThemeWin::paintTextField(const RenderObject& o, const PaintInfo& i, const FloatRect& r)
 {
-    drawControl(i.context,  o, textFieldTheme(), getThemeData(o), r);
+    drawControl(i.context,  o, textFieldTheme(), getThemeData(o), IntRect(r));
     return false;
 }
 
-bool RenderThemeWin::paintMenuList(const RenderObject& renderer, const PaintInfo& paintInfo, const IntRect& rect)
+bool RenderThemeWin::paintMenuList(const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
 {
     HANDLE theme;
     int part;
@@ -792,46 +792,46 @@ bool RenderThemeWin::paintMenuList(const RenderObject& renderer, const PaintInfo
         part = TFP_TEXTFIELD;
     }
 
-    drawControl(paintInfo.context, renderer, theme, ThemeData(part, determineState(renderer)), rect);
+    drawControl(paintInfo.context, renderer, theme, ThemeData(part, determineState(renderer)), IntRect(rect));
     
     return paintMenuListButtonDecorations(renderer, paintInfo, FloatRect(rect));
 }
 
-void RenderThemeWin::adjustMenuListStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeWin::adjustMenuListStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
-    style->resetBorder();
+    style.resetBorder();
     adjustMenuListButtonStyle(styleResolver, style, e);
 }
 
-void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     // These are the paddings needed to place the text correctly in the <select> box
     const int dropDownBoxPaddingTop    = 2;
-    const int dropDownBoxPaddingRight  = style->direction() == LTR ? 4 + dropDownButtonWidth : 4;
+    const int dropDownBoxPaddingRight  = style.direction() == LTR ? 4 + dropDownButtonWidth : 4;
     const int dropDownBoxPaddingBottom = 2;
-    const int dropDownBoxPaddingLeft   = style->direction() == LTR ? 4 : 4 + dropDownButtonWidth;
+    const int dropDownBoxPaddingLeft   = style.direction() == LTR ? 4 : 4 + dropDownButtonWidth;
     // The <select> box must be at least 12px high for the button to render nicely on Windows
     const int dropDownBoxMinHeight = 12;
     
     // Position the text correctly within the select box and make the box wide enough to fit the dropdown button
-    style->setPaddingTop(Length(dropDownBoxPaddingTop, Fixed));
-    style->setPaddingRight(Length(dropDownBoxPaddingRight, Fixed));
-    style->setPaddingBottom(Length(dropDownBoxPaddingBottom, Fixed));
-    style->setPaddingLeft(Length(dropDownBoxPaddingLeft, Fixed));
+    style.setPaddingTop(Length(dropDownBoxPaddingTop, Fixed));
+    style.setPaddingRight(Length(dropDownBoxPaddingRight, Fixed));
+    style.setPaddingBottom(Length(dropDownBoxPaddingBottom, Fixed));
+    style.setPaddingLeft(Length(dropDownBoxPaddingLeft, Fixed));
 
     // Height is locked to auto
-    style->setHeight(Length(Auto));
+    style.setHeight(Length(Auto));
 
     // Calculate our min-height
-    int minHeight = style->fontMetrics().height();
+    int minHeight = style.fontMetrics().height();
     minHeight = max(minHeight, dropDownBoxMinHeight);
 
-    style->setMinHeight(Length(minHeight, Fixed));
+    style.setMinHeight(Length(minHeight, Fixed));
 
-    style->setLineHeight(RenderStyle::initialLineHeight());
+    style.setLineHeight(RenderStyle::initialLineHeight());
     
     // White-space is locked to pre
-    style->setWhiteSpace(PRE);
+    style.setWhiteSpace(PRE);
 }
 
 bool RenderThemeWin::paintMenuListButtonDecorations(const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
@@ -886,15 +886,15 @@ bool RenderThemeWin::paintSliderThumb(const RenderObject& o, const PaintInfo& i,
 const int sliderThumbWidth = 7;
 const int sliderThumbHeight = 15;
 
-void RenderThemeWin::adjustSliderThumbSize(RenderStyle* style, Element*) const
+void RenderThemeWin::adjustSliderThumbSize(RenderStyle& style, Element&) const
 {
-    ControlPart part = style->appearance();
+    ControlPart part = style.appearance();
     if (part == SliderThumbVerticalPart) {
-        style->setWidth(Length(sliderThumbHeight, Fixed));
-        style->setHeight(Length(sliderThumbWidth, Fixed));
+        style.setWidth(Length(sliderThumbHeight, Fixed));
+        style.setHeight(Length(sliderThumbWidth, Fixed));
     } else if (part == SliderThumbHorizontalPart) {
-        style->setWidth(Length(sliderThumbWidth, Fixed));
-        style->setHeight(Length(sliderThumbHeight, Fixed));
+        style.setWidth(Length(sliderThumbWidth, Fixed));
+        style.setHeight(Length(sliderThumbHeight, Fixed));
     }
 #if ENABLE(VIDEO) && USE(CG)
     else if (part == MediaSliderThumbPart || part == MediaVolumeSliderThumbPart) 
@@ -907,16 +907,16 @@ bool RenderThemeWin::paintSearchField(const RenderObject& o, const PaintInfo& i,
     return paintTextField(o, i, r);
 }
 
-void RenderThemeWin::adjustSearchFieldStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
+void RenderThemeWin::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
 {
     // Override paddingSize to match AppKit text positioning.
     const int padding = 1;
-    style->setPaddingLeft(Length(padding, Fixed));
-    style->setPaddingRight(Length(padding, Fixed));
-    style->setPaddingTop(Length(padding, Fixed));
-    style->setPaddingBottom(Length(padding, Fixed));
-    if (e && e->focused() && e->document().frame()->selection().isFocusedAndActive())
-        style->setOutlineOffset(-2);
+    style.setPaddingLeft(Length(padding, Fixed));
+    style.setPaddingRight(Length(padding, Fixed));
+    style.setPaddingTop(Length(padding, Fixed));
+    style.setPaddingBottom(Length(padding, Fixed));
+    if (e.focused() && e.document().frame()->selection().isFocusedAndActive())
+        style.setOutlineOffset(-2);
 }
 
 bool RenderThemeWin::paintSearchFieldCancelButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -944,30 +944,30 @@ bool RenderThemeWin::paintSearchFieldCancelButton(const RenderObject& o, const P
     return false;
 }
 
-void RenderThemeWin::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeWin::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // Scale the button size based on the font size
-    float fontScale = style->fontSize() / defaultControlFontPixelSize;
+    float fontScale = style.fontSize() / defaultControlFontPixelSize;
     int cancelButtonSize = lroundf(min(max(minCancelButtonSize, defaultCancelButtonSize * fontScale), maxCancelButtonSize));
-    style->setWidth(Length(cancelButtonSize, Fixed));
-    style->setHeight(Length(cancelButtonSize, Fixed));
+    style.setWidth(Length(cancelButtonSize, Fixed));
+    style.setHeight(Length(cancelButtonSize, Fixed));
 }
 
-void RenderThemeWin::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeWin::adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     IntSize emptySize(1, 11);
-    style->setWidth(Length(emptySize.width(), Fixed));
-    style->setHeight(Length(emptySize.height(), Fixed));
+    style.setWidth(Length(emptySize.width(), Fixed));
+    style.setHeight(Length(emptySize.height(), Fixed));
 }
 
-void RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // Scale the decoration size based on the font size
-    float fontScale = style->fontSize() / defaultControlFontPixelSize;
+    float fontScale = style.fontSize() / defaultControlFontPixelSize;
     int magnifierSize = lroundf(min(max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
                                      maxSearchFieldResultsDecorationSize));
-    style->setWidth(Length(magnifierSize, Fixed));
-    style->setHeight(Length(magnifierSize, Fixed));
+    style.setWidth(Length(magnifierSize, Fixed));
+    style.setHeight(Length(magnifierSize, Fixed));
 }
 
 bool RenderThemeWin::paintSearchFieldResultsDecorationPart(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -993,15 +993,15 @@ bool RenderThemeWin::paintSearchFieldResultsDecorationPart(const RenderObject& o
     return false;
 }
 
-void RenderThemeWin::adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeWin::adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
     // Scale the button size based on the font size
-    float fontScale = style->fontSize() / defaultControlFontPixelSize;
+    float fontScale = style.fontSize() / defaultControlFontPixelSize;
     int magnifierHeight = lroundf(min(max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
                                    maxSearchFieldResultsDecorationSize));
     int magnifierWidth = lroundf(magnifierHeight * defaultSearchFieldResultsButtonWidth / defaultSearchFieldResultsDecorationSize);
-    style->setWidth(Length(magnifierWidth, Fixed));
-    style->setHeight(Length(magnifierHeight, Fixed));
+    style.setWidth(Length(magnifierWidth, Fixed));
+    style.setHeight(Length(magnifierHeight, Fixed));
 }
 
 bool RenderThemeWin::paintSearchFieldResultsButton(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
@@ -1157,9 +1157,9 @@ String RenderThemeWin::mediaControlsScript()
 #endif
 
 #if ENABLE(METER_ELEMENT)
-void RenderThemeWin::adjustMeterStyle(StyleResolver*, RenderStyle* style, Element*) const
+void RenderThemeWin::adjustMeterStyle(StyleResolver&, RenderStyle& style, Element&) const
 {
-    style->setBoxShadow(nullptr);
+    style.setBoxShadow(nullptr);
 }
 
 bool RenderThemeWin::supportsMeter(ControlPart part) const
@@ -1172,7 +1172,7 @@ bool RenderThemeWin::supportsMeter(ControlPart part) const
     }
 }
 
-IntSize RenderThemeWin::meterSizeForBounds(const RenderMeter*, const IntRect& bounds) const
+IntSize RenderThemeWin::meterSizeForBounds(const RenderMeter&, const IntRect& bounds) const
 {
     return bounds.size();
 }
@@ -1182,7 +1182,7 @@ bool RenderThemeWin::paintMeter(const RenderObject& renderObject, const PaintInf
     if (!renderObject.isMeter())
         return true;
 
-    HTMLMeterElement* element = toRenderMeter(&renderObject)->meterElement();
+    HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
 
     ThemeData theme = getThemeData(renderObject);
 
index feb059f..2ea7131 100644 (file)
@@ -55,74 +55,74 @@ public:
     virtual String extraQuirksStyleSheet();
 
     // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle*) const;
+    virtual bool supportsHover(const RenderStyle&) const override;
 
-    virtual Color platformActiveSelectionBackgroundColor() const;
-    virtual Color platformInactiveSelectionBackgroundColor() const;
-    virtual Color platformActiveSelectionForegroundColor() const;
-    virtual Color platformInactiveSelectionForegroundColor() const;
+    virtual Color platformActiveSelectionBackgroundColor() const override;
+    virtual Color platformInactiveSelectionBackgroundColor() const override;
+    virtual Color platformActiveSelectionForegroundColor() const override;
+    virtual Color platformInactiveSelectionForegroundColor() const override;
 
     // System fonts.
-    virtual void systemFont(CSSValueID, FontDescription&) const;
-    virtual Color systemColor(CSSValueID) const;
+    virtual void systemFont(CSSValueID, FontDescription&) const override;
+    virtual Color systemColor(CSSValueID) const override;
 
-    virtual bool paintCheckbox(const RenderObject& o, const PaintInfo& i, const IntRect& r)
+    virtual bool paintCheckbox(const RenderObject& o, const PaintInfo& i, const IntRect& r) override
     { return paintButton(o, i, r); }
-    virtual void setCheckboxSize(RenderStyle*) const;
+    virtual void setCheckboxSize(RenderStyle&) const override;
 
-    virtual bool paintRadio(const RenderObject& o, const PaintInfo& i, const IntRect& r)
+    virtual bool paintRadio(const RenderObject& o, const PaintInfo& i, const IntRect& r) override
     { return paintButton(o, i, r); }
-    virtual void setRadioSize(RenderStyle* style) const
+    virtual void setRadioSize(RenderStyle& style) const override
     { return setCheckboxSize(style); }
 
-    virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual bool paintTextField(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual bool paintTextArea(const RenderObject& o, const PaintInfo& i, const IntRect& r)
+    virtual bool paintTextArea(const RenderObject& o, const PaintInfo& i, const FloatRect& r) override
     { return paintTextField(o, i, r); }
 
-    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
+    virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+    virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
 
-    virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&);
+    virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&);
-    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
+    virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
+    virtual void adjustSliderThumbSize(RenderStyle&, Element&) const override;
 
-    virtual bool popupOptionSupportsTextIndent() const { return true; }
+    virtual bool popupOptionSupportsTextIndent() const override { return true; }
 
-    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintSearchFieldCancelButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) { return false; }
+    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;
-    virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&);
+    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    virtual bool paintSearchFieldResultsButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
-    virtual void themeChanged();
+    virtual void themeChanged() override;
 
-    virtual void adjustButtonStyle(StyleResolver*, RenderStyle* style, Element*) const { }
-    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle* style, Element*) const { }
-    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle* style, Element*) const { }
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle& style, Element&) const override { }
+    virtual void adjustTextFieldStyle(StyleResolver&, RenderStyle& style, Element&) const override { }
+    virtual void adjustTextAreaStyle(StyleResolver&, RenderStyle& style, Element&) const override { }
 
     static void setWebKitIsBeingUnloaded();
 
     static String stringWithContentsOfFile(CFStringRef name, CFStringRef type);
 
-    virtual bool supportsFocusRing(const RenderStyle*) const;
+    virtual bool supportsFocusRing(const RenderStyle&) const override;
 
 #if ENABLE(VIDEO)
     virtual String mediaControlsStyleSheet() override;
@@ -130,13 +130,13 @@ public:
 #endif
 
 #if ENABLE(METER_ELEMENT)
-    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const override;
+    virtual IntSize meterSizeForBounds(const RenderMeter&, const IntRect&) const override;
     virtual bool supportsMeter(ControlPart) const override;
-    virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const override;
+    virtual void adjustMeterStyle(StyleResolver&, RenderStyle&, Element&) const override;
     virtual bool paintMeter(const RenderObject&, const PaintInfo&, const IntRect&) override;
 #endif
 
-    virtual bool shouldShowPlaceholderWhenFocused() const { return true; }
+    virtual bool shouldShowPlaceholderWhenFocused() const override { return true; }
 
 private:
     enum ControlSubPart {
@@ -148,7 +148,7 @@ private:
     RenderThemeWin();
     virtual ~RenderThemeWin();
 
-    void addIntrinsicMargins(RenderStyle*) const;
+    void addIntrinsicMargins(RenderStyle&) const;
     void close();
 
     unsigned determineState(const RenderObject&);