Title: [120239] trunk/Source/WebCore
Revision
120239
Author
[email protected]
Date
2012-06-13 13:04:10 -0700 (Wed, 13 Jun 2012)

Log Message

Code cleanup from bug 88881 to share the SliderVerticalPart code.
https://bugs.webkit.org/show_bug.cgi?id=88930

Patch by Silvia Pfeiffer <[email protected]> on 2012-06-13
Reviewed by Eric Carlson.

No new tests - this is just code cleanup.

* html/shadow/SliderThumbElement.cpp:
(WebCore::hasVerticalAppearance):
Avoid having two ifdef-ed returns in the code depending on ENABLE(VIDEO).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120238 => 120239)


--- trunk/Source/WebCore/ChangeLog	2012-06-13 19:46:08 UTC (rev 120238)
+++ trunk/Source/WebCore/ChangeLog	2012-06-13 20:04:10 UTC (rev 120239)
@@ -1,3 +1,16 @@
+2012-06-13  Silvia Pfeiffer  <[email protected]>
+
+        Code cleanup from bug 88881 to share the SliderVerticalPart code.
+        https://bugs.webkit.org/show_bug.cgi?id=88930
+
+        Reviewed by Eric Carlson.
+
+        No new tests - this is just code cleanup.
+
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::hasVerticalAppearance):
+        Avoid having two ifdef-ed returns in the code depending on ENABLE(VIDEO).
+
 2012-06-13  Mark Mentovai  <[email protected]>
 
         [chromium mac] Don't include things in subframeworks of

Modified: trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp (120238 => 120239)


--- trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp	2012-06-13 19:46:08 UTC (rev 120238)
+++ trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp	2012-06-13 20:04:10 UTC (rev 120239)
@@ -64,13 +64,11 @@
     RenderStyle* sliderStyle = input->renderer()->style();
 
 #if ENABLE(VIDEO)
-    RenderTheme* sliderTheme = input->renderer()->theme();
+    if (sliderStyle->appearance() == MediaVolumeSliderPart && input->renderer()->theme()->usesVerticalVolumeSlider())
+        return true;
+#endif
 
-    return sliderStyle->appearance() == SliderVerticalPart
-        || (sliderStyle->appearance() == MediaVolumeSliderPart && sliderTheme->usesVerticalVolumeSlider());
-#else
     return sliderStyle->appearance() == SliderVerticalPart;
-#endif
 }
 
 SliderThumbElement* sliderThumbElementOf(Node* node)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to