ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Sep 2014 20:33:36 +0000 (20:33 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Sep 2014 20:33:36 +0000 (20:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136366

Reviewed by Benjamin Poulain.

Source/WebCore:

Since element becomes nullptr when resolving styles for pseudo elements,
so don't do `ASSERT(e)` and use pointer for that.

Test: fast/css/appearance-with-pseudo-elements.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::updateAppearance):
* platform/efl/RenderThemeEfl.cpp:
(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):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::adjustCheckboxStyle):
(WebCore::RenderTheme::adjustRadioStyle):
(WebCore::RenderTheme::adjustButtonStyle):
(WebCore::RenderTheme::adjustInnerSpinButtonStyle):
(WebCore::RenderTheme::adjustTextFieldStyle):
(WebCore::RenderTheme::adjustTextAreaStyle):
(WebCore::RenderTheme::adjustMenuListStyle):
(WebCore::RenderTheme::adjustMeterStyle):
(WebCore::RenderTheme::adjustProgressBarStyle):
(WebCore::RenderTheme::adjustMenuListButtonStyle):
(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:
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::adjustButtonStyle):
(WebCore::RenderThemeGtk::adjustMenuListStyle):
(WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldStyle):
(WebCore::RenderThemeGtk::adjustSliderTrackStyle):
(WebCore::RenderThemeGtk::adjustSliderThumbStyle):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeGtk::adjustProgressBarStyle):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle):
(WebCore::RenderThemeIOS::adjustRadioStyle):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
(WebCore::RenderThemeIOS::adjustSliderTrackStyle):
(WebCore::RenderThemeIOS::adjustSliderThumbSize):
(WebCore::RenderThemeIOS::adjustSearchFieldStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustTextFieldStyle):
(WebCore::RenderThemeMac::adjustTextAreaStyle):
(WebCore::RenderThemeMac::adjustProgressBarStyle):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle):
(WebCore::RenderThemeMac::adjustSliderTrackStyle):
(WebCore::RenderThemeMac::adjustSliderThumbStyle):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::adjustButtonStyle):
(WebCore::RenderThemeSafari::adjustTextFieldStyle):
(WebCore::RenderThemeSafari::adjustTextAreaStyle):
(WebCore::RenderThemeSafari::adjustMenuListStyle):
(WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
(WebCore::RenderThemeSafari::adjustSliderThumbStyle):
(WebCore::RenderThemeSafari::adjustSliderThumbSize):
(WebCore::RenderThemeSafari::adjustSearchFieldStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeSafari::adjustMeterStyle):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
(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):
* rendering/RenderThemeWin.h:

LayoutTests:

* fast/css/appearance-with-pseudo-elements-expected.html: Added.
* fast/css/appearance-with-pseudo-elements.html: Added.

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

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/appearance-with-pseudo-elements-expected.html [new file with mode: 0644]
LayoutTests/fast/css/appearance-with-pseudo-elements.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h
Source/WebCore/platform/gtk/RenderThemeGtk.h
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeGtk.cpp
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 1948fa9..35d63ef 100644 (file)
@@ -1,3 +1,13 @@
+2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
+        https://bugs.webkit.org/show_bug.cgi?id=136366
+
+        Reviewed by Benjamin Poulain.
+
+        * fast/css/appearance-with-pseudo-elements-expected.html: Added.
+        * fast/css/appearance-with-pseudo-elements.html: Added.
+
 2014-09-11  Alexey Proskuryakov  <ap@apple.com>
 
         fast/forms/submit-to-blank-multiple-times.html crashes with JSC_slowPathAllocsBetweenGCs
diff --git a/LayoutTests/fast/css/appearance-with-pseudo-elements-expected.html b/LayoutTests/fast/css/appearance-with-pseudo-elements-expected.html
new file mode 100644 (file)
index 0000000..f5a204e
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+#center::before {
+    content: "cocoa";
+    -webkit-appearance: button;
+}
+#center::after {
+    content: "cappuccino";
+    -webkit-appearance: list-item;
+}
+</style>
+<body>
+<p>This should not incur crashes.</p>
+<p><a href="https://bugs.webkit.org/show_bug.cgi?id=136366">https://bugs.webkit.org/show_bug.cgi?id=136366</a></p>
+<p id="center"> and </p>
+</body>
diff --git a/LayoutTests/fast/css/appearance-with-pseudo-elements.html b/LayoutTests/fast/css/appearance-with-pseudo-elements.html
new file mode 100644 (file)
index 0000000..3c9547b
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<style>
+#description::first-letter {
+    -webkit-appearance: push-button;
+}
+#bug::first-line {
+    -webkit-appearance: menulist-button;  /* In the older implementation, it incurs crash. */
+}
+#center::before {
+    content: "cocoa";
+    -webkit-appearance: button;
+}
+#center::after {
+    content: "cappuccino";
+    -webkit-appearance: list-item;
+}
+</style>
+<body>
+<p id="description">This should not incur crashes.</p>
+<p id="bug"><a href="https://bugs.webkit.org/show_bug.cgi?id=136366">https://bugs.webkit.org/show_bug.cgi?id=136366</a></p>
+<p id="center"> and </p>
+</body>
index e9b0c00..52d714d 100644 (file)
@@ -1,3 +1,125 @@
+2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
+        https://bugs.webkit.org/show_bug.cgi?id=136366
+
+        Reviewed by Benjamin Poulain.
+
+        Since element becomes nullptr when resolving styles for pseudo elements,
+        so don't do `ASSERT(e)` and use pointer for that.
+
+        Test: fast/css/appearance-with-pseudo-elements.html
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::adjustRenderStyle):
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::RenderSliderThumb::updateAppearance):
+        * platform/efl/RenderThemeEfl.cpp:
+        (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):
+        * platform/efl/RenderThemeEfl.h:
+        * platform/gtk/RenderThemeGtk.h:
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::adjustStyle):
+        (WebCore::RenderTheme::adjustCheckboxStyle):
+        (WebCore::RenderTheme::adjustRadioStyle):
+        (WebCore::RenderTheme::adjustButtonStyle):
+        (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
+        (WebCore::RenderTheme::adjustTextFieldStyle):
+        (WebCore::RenderTheme::adjustTextAreaStyle):
+        (WebCore::RenderTheme::adjustMenuListStyle):
+        (WebCore::RenderTheme::adjustMeterStyle):
+        (WebCore::RenderTheme::adjustProgressBarStyle):
+        (WebCore::RenderTheme::adjustMenuListButtonStyle):
+        (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:
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::adjustButtonStyle):
+        (WebCore::RenderThemeGtk::adjustMenuListStyle):
+        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
+        (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
+        (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
+        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
+        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeGtk::adjustProgressBarStyle):
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::adjustCheckboxStyle):
+        (WebCore::RenderThemeIOS::adjustRadioStyle):
+        (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
+        (WebCore::RenderThemeIOS::adjustSliderThumbSize):
+        (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
+        (WebCore::RenderThemeIOS::adjustButtonStyle):
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::adjustTextFieldStyle):
+        (WebCore::RenderThemeMac::adjustTextAreaStyle):
+        (WebCore::RenderThemeMac::adjustProgressBarStyle):
+        (WebCore::RenderThemeMac::adjustMenuListStyle):
+        (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeMac::adjustSliderTrackStyle):
+        (WebCore::RenderThemeMac::adjustSliderThumbStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeMac::adjustSliderThumbSize):
+        * rendering/RenderThemeSafari.cpp:
+        (WebCore::RenderThemeSafari::adjustButtonStyle):
+        (WebCore::RenderThemeSafari::adjustTextFieldStyle):
+        (WebCore::RenderThemeSafari::adjustTextAreaStyle):
+        (WebCore::RenderThemeSafari::adjustMenuListStyle):
+        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
+        (WebCore::RenderThemeSafari::adjustSliderThumbSize):
+        (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeSafari::adjustMeterStyle):
+        * rendering/RenderThemeSafari.h:
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
+        (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):
+        * rendering/RenderThemeWin.h:
+
 2014-09-12  Joseph Pecoraro  <pecoraro@apple.com>
 
         Fix casing in method name - formatNumberForCustomCSSText
index 4f71ded..ad16ede 100644 (file)
@@ -1341,8 +1341,7 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
 
     // Let the theme also have a crack at adjusting the style.
     if (style.hasAppearance()) {
-        ASSERT(e);
-        RenderTheme::defaultTheme()->adjustStyle(*this, style, *e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
+        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.
index f18daa5..81c2068 100644 (file)
@@ -96,7 +96,7 @@ void RenderSliderThumb::updateAppearance(RenderStyle* parentStyle)
         style().setAppearance(MediaFullScreenVolumeSliderThumbPart);
     if (style().hasAppearance()) {
         ASSERT(element());
-        theme().adjustSliderThumbSize(style(), *element());
+        theme().adjustSliderThumbSize(style(), element());
     }
 }
 
index 34cb9fc..fc26787 100755 (executable)
@@ -693,18 +693,18 @@ 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);
 }
 
-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);
 }
 
-void RenderThemeEfl::adjustSliderThumbSize(RenderStyle& style, Element&) const
+void RenderThemeEfl::adjustSliderThumbSize(RenderStyle& style, Element*) const
 {
     ControlPart part = style.appearance();
     if (part == SliderThumbVerticalPart) {
@@ -760,10 +760,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustCheckboxStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustCheckboxStyle(styleResolver, style, element);
         return;
     }
 
@@ -783,10 +783,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustRadioStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustRadioStyle(styleResolver, style, element);
         return;
     }
 
@@ -806,10 +806,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustButtonStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustButtonStyle(styleResolver, style, element);
         return;
     }
 
@@ -823,10 +823,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustMenuListStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustMenuListStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, ComboBox);
@@ -841,7 +841,7 @@ bool RenderThemeEfl::paintMenuList(const RenderObject& object, const PaintInfo&
     return paintThemePart(object, ComboBox, info, IntRect(rect));
 }
 
-void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& element) const
+void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element* element) const
 {
     // Height is locked to auto if height is not specified.
     style.setHeight(Length(Auto));
@@ -862,10 +862,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustTextFieldStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustTextFieldStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, TextField);
@@ -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,10 +886,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldResultsButton);
@@ -908,10 +908,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldResultsDecoration);
@@ -930,10 +930,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchFieldCancelButton);
@@ -954,10 +954,10 @@ 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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustSearchFieldStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustSearchFieldStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, SearchField);
@@ -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.document().page()) {
-        static_cast<RenderThemeEfl&>(element.document().page()->theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
+    if (!m_page && element && element->document().page()) {
+        static_cast<RenderThemeEfl&>(element->document().page()->theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
         return;
     }
     adjustSizeConstraints(style, Spinner);
@@ -1001,7 +1001,7 @@ 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);
 }
index 8fc411b..f073d71 100644 (file)
@@ -107,45 +107,45 @@ public:
     // 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 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,12 +157,12 @@ 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;
index c30130f..0e1065b 100644 (file)
@@ -110,7 +110,7 @@ private:
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&) 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;
@@ -125,30 +125,30 @@ private:
     // 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 adjustMenuListButtonStyle(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();
@@ -172,12 +172,12 @@ private:
 
     virtual double animationRepeatIntervalForProgressBar(RenderProgress&) const override;
     virtual double animationDurationForProgressBar(RenderProgress&) 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 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;
index bdff5a3..a1508b8 100644 (file)
@@ -77,7 +77,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();
@@ -882,7 +882,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.)
@@ -899,7 +899,7 @@ void RenderTheme::adjustCheckboxStyle(StyleResolver&, RenderStyle& style, Elemen
     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.)
@@ -916,7 +916,7 @@ void RenderTheme::adjustRadioStyle(StyleResolver&, RenderStyle& style, Element&)
     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
@@ -924,25 +924,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(METER_ELEMENT)
-void RenderTheme::adjustMeterStyle(StyleResolver&, RenderStyle& style, Element&) const
+void RenderTheme::adjustMeterStyle(StyleResolver&, RenderStyle& style, Element*) const
 {
     style.setBoxShadow(nullptr);
 }
@@ -1063,7 +1063,7 @@ double RenderTheme::animationDurationForProgressBar(RenderProgress&) const
     return 0;
 }
 
-void RenderTheme::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const
+void RenderTheme::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element*) const
 {
 }
 
@@ -1077,44 +1077,44 @@ bool RenderTheme::shouldHaveSpinButton(HTMLInputElement& inputElement) const
     return inputElement.isSteppable() && !inputElement.isRangeControl();
 }
 
-void RenderTheme::adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const
+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 a69efbb..dc91978 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
@@ -177,7 +177,7 @@ public:
 
     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; }
@@ -268,19 +268,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 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 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 adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
     virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 #endif
 
@@ -288,56 +288,56 @@ 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; }
 
-    virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const;
+    virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
 
     virtual bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     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; }
 
-    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 053fa89..4bd2397 100644 (file)
@@ -463,7 +463,7 @@ void RenderThemeGtk::adjustRepaintRect(const RenderObject& renderObject, FloatRe
     adjustRectForFocus(context, rect);
 }
 
-void RenderThemeGtk::adjustButtonStyle(StyleResolver&, RenderStyle& style, WebCore::Element&) const
+void RenderThemeGtk::adjustButtonStyle(StyleResolver&, RenderStyle& style, Element*) const
 {
     // Some layout tests check explicitly that buttons ignore line-height.
     if (style.appearance() == PushButtonPart)
@@ -651,7 +651,7 @@ bool RenderThemeGtk::paintButton(const RenderObject& renderObject, const PaintIn
     return false;
 }
 
-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());
@@ -660,7 +660,7 @@ void RenderThemeGtk::adjustMenuListStyle(StyleResolver&, RenderStyle& style, Ele
     style.resetBorderRadius();
 }
 
-void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
+void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element* e) const
 {
     adjustMenuListStyle(styleResolver, style, e);
 }
@@ -951,7 +951,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);
 }
@@ -979,7 +979,7 @@ static void adjustSearchFieldIconStyle(RenderStyle& style)
     style.setHeight(Length(height, Fixed));
 }
 
-void RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element&) const
+void RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle& style, Element*) const
 {
     adjustSearchFieldIconStyle(style);
 }
@@ -1018,7 +1018,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);
 }
@@ -1037,7 +1037,7 @@ 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();
@@ -1073,12 +1073,12 @@ 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);
 }
 
-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);
@@ -1152,7 +1152,7 @@ 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();
     if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart)
@@ -1216,7 +1216,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);
 
@@ -1599,7 +1599,7 @@ 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);
 }
index 50975f7..cd8ef2c 100644 (file)
@@ -55,13 +55,13 @@ protected:
     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;
@@ -71,13 +71,13 @@ protected:
     virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
     virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
-    virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element&) const override;
+    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.
@@ -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;
index be1467b..94e1bdb 100644 (file)
@@ -350,7 +350,7 @@ 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())
         return;
@@ -446,7 +446,7 @@ bool RenderThemeIOS::isControlStyled(const RenderStyle& style, const BorderData&
     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())
         return;
@@ -603,7 +603,7 @@ static void adjustInputElementButtonStyle(RenderStyle& style, HTMLInputElement&
     }
 }
 
-void RenderThemeIOS::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element& element) const
+void RenderThemeIOS::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element* element) const
 {
     // Set the min-height to be at least MenuListMinHeight.
     if (style.height().isAuto())
@@ -611,13 +611,16 @@ void RenderThemeIOS::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& styl
     else
         style.setMinHeight(Length(MenuListMinHeight, Fixed));
 
+    if (!element)
+        return;
+
     // Enforce some default styles in the case that this is a non-multiple <select> element,
     // or a date input. We don't force these if this is just an element with
     // "-webkit-appearance: menulist-button".
-    if (element.hasTagName(HTMLNames::selectTag) && !element.hasAttribute(HTMLNames::multipleAttr))
-        adjustSelectListButtonStyle(style, element);
-    else if (element.hasTagName(HTMLNames::inputTag))
-        adjustInputElementButtonStyle(style, static_cast<HTMLInputElement&>(element));
+    if (element->hasTagName(HTMLNames::selectTag) && !element->hasAttribute(HTMLNames::multipleAttr))
+        adjustSelectListButtonStyle(style, *element);
+    else if (element->hasTagName(HTMLNames::inputTag))
+        adjustInputElementButtonStyle(style, static_cast<HTMLInputElement&>(*element));
 }
 
 bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
@@ -712,7 +715,7 @@ 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);
 
@@ -800,7 +803,7 @@ 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)
         return;
@@ -940,14 +943,17 @@ 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())
         return;
 
-    RenderBox* box = element.renderBox();
+    RenderBox* box = element->renderBox();
     if (!box)
         return;
 
@@ -959,7 +965,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);
 
@@ -971,7 +977,10 @@ void RenderThemeIOS::adjustButtonStyle(StyleResolver& selector, RenderStyle& sty
     int pixels = emSize->computeLength<int>(CSSToLengthConversionData(&style, nullptr, nullptr, 1.0, false));
     style.setPaddingBox(LengthBox(0, pixels, 0, pixels));
 
-    RenderBox* box = element.renderBox();
+    if (!element)
+        return;
+
+    RenderBox* box = element->renderBox();
     if (!box)
         return;
 
index 2522a27..de0dc30 100644 (file)
@@ -71,7 +71,7 @@ public:
 
     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;
@@ -125,39 +125,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 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)
index 499611f..d4cab2b 100644 (file)
@@ -849,7 +849,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
 {
 }
 
@@ -871,7 +871,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
 {
 }
 
@@ -1103,7 +1103,7 @@ double RenderThemeMac::animationDurationForProgressBar(RenderProgress&) const
     return progressAnimationNumFrames * progressAnimationFrameRate;
 }
 
-void RenderThemeMac::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element&) const
+void RenderThemeMac::adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element*) const
 {
 }
 
@@ -1339,7 +1339,7 @@ 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);
 
@@ -1354,7 +1354,7 @@ void RenderThemeMac::adjustMenuListStyle(StyleResolver& styleResolver, RenderSty
 
     // 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.isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+    style.setColor(e && !e->isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
 
     // Set the button's vertical size.
     setSizeFromFont(style, menuListButtonSizes());
@@ -1422,7 +1422,7 @@ PopupMenuStyle::PopupMenuSize RenderThemeMac::popupMenuSize(const RenderStyle& s
     }
 }
 
-void RenderThemeMac::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
+void RenderThemeMac::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element*) const
 {
     float fontScale = style.fontSize() / baseFontSize;
 
@@ -1462,7 +1462,7 @@ 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);
 }
@@ -1508,7 +1508,7 @@ 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);
@@ -1633,7 +1633,7 @@ void RenderThemeMac::setSearchFieldSize(RenderStyle& style) const
     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();
@@ -1710,7 +1710,7 @@ 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));
@@ -1725,7 +1725,7 @@ 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));
@@ -1738,7 +1738,7 @@ 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));
@@ -1771,7 +1771,7 @@ 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));
@@ -1908,7 +1908,7 @@ 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) {
index 4ba711a..4771482 100644 (file)
@@ -508,7 +508,7 @@ void RenderThemeSafari::setButtonPaddingFromControlSize(RenderStyle& style, NSCo
     style.setPaddingBottom(Length(0, Fixed));
 }
 
-void RenderThemeSafari::adjustButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
+void RenderThemeSafari::adjustButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element*) 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
@@ -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
 {
 }
 
@@ -864,7 +864,7 @@ 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);
 
@@ -879,7 +879,7 @@ void RenderThemeSafari::adjustMenuListStyle(StyleResolver& styleResolver, Render
 
     // 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.isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+    style.setColor(e && !e->isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
 
     // Set the button's vertical size.
     setButtonSize(style);
@@ -929,7 +929,7 @@ int RenderThemeSafari::popupInternalPaddingBottom(RenderStyle& style) const
     return 0;
 }
 
-void RenderThemeSafari::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element&) const
+void RenderThemeSafari::adjustMenuListButtonStyle(StyleResolver&, RenderStyle& style, Element*) const
 {
     float fontScale = style.fontSize() / baseFontSize;
     
@@ -987,7 +987,7 @@ 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); 
@@ -1005,7 +1005,7 @@ 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));
@@ -1041,7 +1041,7 @@ void RenderThemeSafari::setSearchFieldSize(RenderStyle& style) const
     setSizeFromFont(style, searchFieldSizes());
 }
 
-void RenderThemeSafari::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
+void RenderThemeSafari::adjustSearchFieldStyle(StyleResolver& styleResolver, RenderStyle& style, Element*) const
 {
     // Override border.
     style.resetBorder();
@@ -1053,19 +1053,19 @@ void RenderThemeSafari::adjustSearchFieldStyle(StyleResolver& styleResolver, Ren
     style.setBorderBottomWidth(borderWidth);
     style.setBorderBottomStyle(INSET);
     style.setBorderTopWidth(borderWidth);
-    style.setBorderTopStyle(INSET);    
-    
+    style.setBorderTopStyle(INSET);
+
     // Override height.
     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));
-    
+
     NSControlSize controlSize = controlSizeForFont(style);
     setFontFromControlSize(styleResolver, style, controlSize);
 }
@@ -1092,7 +1092,7 @@ 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));
@@ -1106,7 +1106,7 @@ 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));
@@ -1118,7 +1118,7 @@ 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));
@@ -1142,7 +1142,7 @@ 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));
@@ -1190,7 +1190,7 @@ 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);
 }
index f7449c6..cd10623 100644 (file)
@@ -76,8 +76,8 @@ public:
 
     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;
@@ -92,38 +92,38 @@ protected:
     virtual bool paintRadio(const RenderObject&, const PaintInfo&, const IntRect&);
     virtual void setRadioSize(RenderStyle&) const;
 
-    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, WebCore::Element&) const;
+    virtual void adjustButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
     virtual bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&);
     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&);
@@ -136,7 +136,7 @@ protected:
 #if ENABLE(METER_ELEMENT)
     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
 
index 88e9310..b7f257b 100644 (file)
@@ -730,7 +730,7 @@ 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*) const
 {
     int width = ::GetSystemMetrics(SM_CXVSCROLL);
     if (width <= 0)
@@ -797,13 +797,13 @@ bool RenderThemeWin::paintMenuList(const RenderObject& renderer, const PaintInfo
     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();
     adjustMenuListButtonStyle(styleResolver, style, e);
 }
 
-void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element& e) const
+void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver& styleResolver, RenderStyle& style, Element*) const
 {
     // These are the paddings needed to place the text correctly in the <select> box
     const int dropDownBoxPaddingTop    = 2;
@@ -886,7 +886,7 @@ 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();
     if (part == SliderThumbVerticalPart) {
@@ -907,7 +907,7 @@ 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;
@@ -915,7 +915,7 @@ void RenderThemeWin::adjustSearchFieldStyle(StyleResolver& styleResolver, Render
     style.setPaddingRight(Length(padding, Fixed));
     style.setPaddingTop(Length(padding, Fixed));
     style.setPaddingBottom(Length(padding, Fixed));
-    if (e.focused() && e.document().frame()->selection().isFocusedAndActive())
+    if (e && e->focused() && e->document().frame()->selection().isFocusedAndActive())
         style.setOutlineOffset(-2);
 }
 
@@ -944,7 +944,7 @@ 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;
@@ -953,14 +953,14 @@ void RenderThemeWin::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderSt
     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));
 }
 
-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;
@@ -993,7 +993,7 @@ 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;
@@ -1157,7 +1157,7 @@ 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);
 }
index 2ea7131..aeb438f 100644 (file)
@@ -77,7 +77,7 @@ public:
 
     virtual bool paintButton(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 bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
@@ -85,38 +85,38 @@ public:
     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 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 void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
 
     virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
 
     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 void adjustSliderThumbSize(RenderStyle&, Element*) const override;
 
     virtual bool popupOptionSupportsTextIndent() const override { return true; }
 
-    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 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 { return false; }
 
-    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;
 
     virtual void themeChanged() override;
 
-    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 { }
+    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();
 
@@ -132,7 +132,7 @@ public:
 #if ENABLE(METER_ELEMENT)
     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