Title: [128013] trunk
Revision
128013
Author
[email protected]
Date
2012-09-09 20:34:30 -0700 (Sun, 09 Sep 2012)

Log Message

[EFL] Wrong rendering results for square-button-appearance.html
https://bugs.webkit.org/show_bug.cgi?id=85493

Patch by KyungTae Kim <[email protected]> on 2012-09-09
Reviewed by Gyuyoung Kim.

Source/WebCore:

A square-button is an element that has '-webkit-appearance: square-button' style.

If it is a block element,
the RenderBlock::recomputeLogicalWidth recalculate the width from the padding values.

But the recalculated width became wrong because the RenderThemeEfl::adjustSizeConstraints
called from RenderThemeEfl::adjustButtonStyle adds padding values for a button.

So, the adjustSizeConstraints must not be called for a square-button(SquareButtonPart).

Test : fast/css/square-button-appearance.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustButtonStyle): Call adjustSizeConstrains only for PushButtonPart and ButtonPart

LayoutTests:

Remove fast/css/square-button-appearance.html from TestExpectations because it became PASS.

* platform/efl/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128012 => 128013)


--- trunk/LayoutTests/ChangeLog	2012-09-10 02:44:57 UTC (rev 128012)
+++ trunk/LayoutTests/ChangeLog	2012-09-10 03:34:30 UTC (rev 128013)
@@ -1,3 +1,14 @@
+2012-09-09  KyungTae Kim  <[email protected]>
+
+        [EFL] Wrong rendering results for square-button-appearance.html
+        https://bugs.webkit.org/show_bug.cgi?id=85493
+
+        Reviewed by Gyuyoung Kim.
+
+        Remove fast/css/square-button-appearance.html from TestExpectations because it became PASS.
+
+        * platform/efl/TestExpectations:
+
 2012-09-09  Kenichi Ishibashi  <[email protected]>
 
         [Chromium] Unreviewed test expectations update after r128002

Modified: trunk/LayoutTests/platform/efl/TestExpectations (128012 => 128013)


--- trunk/LayoutTests/platform/efl/TestExpectations	2012-09-10 02:44:57 UTC (rev 128012)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2012-09-10 03:34:30 UTC (rev 128013)
@@ -624,8 +624,6 @@
 BUGWK85484 : fast/forms/textarea-scroll-height.html = MISSING
 BUGWK85484 : fast/forms/textarea-scrolled-type.html = MISSING
 
-BUGWK85493 : fast/css/square-button-appearance.html = TEXT
-
 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = IMAGE IMAGE+TEXT
 
 BUGWK85466 : css3/images/cross-fade-background-size.html = TEXT

Modified: trunk/Source/WebCore/ChangeLog (128012 => 128013)


--- trunk/Source/WebCore/ChangeLog	2012-09-10 02:44:57 UTC (rev 128012)
+++ trunk/Source/WebCore/ChangeLog	2012-09-10 03:34:30 UTC (rev 128013)
@@ -1,3 +1,25 @@
+2012-09-09  KyungTae Kim  <[email protected]>
+
+        [EFL] Wrong rendering results for square-button-appearance.html
+        https://bugs.webkit.org/show_bug.cgi?id=85493
+
+        Reviewed by Gyuyoung Kim.
+
+        A square-button is an element that has '-webkit-appearance: square-button' style.
+        
+        If it is a block element, 
+        the RenderBlock::recomputeLogicalWidth recalculate the width from the padding values.
+        
+        But the recalculated width became wrong because the RenderThemeEfl::adjustSizeConstraints 
+        called from RenderThemeEfl::adjustButtonStyle adds padding values for a button.
+
+        So, the adjustSizeConstraints must not be called for a square-button(SquareButtonPart).
+
+        Test : fast/css/square-button-appearance.html
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::adjustButtonStyle): Call adjustSizeConstrains only for PushButtonPart and ButtonPart
+
 2012-09-09  Jinwoo Song  <[email protected]>
 
         [EFL][WK2] Minibrowser locks up when right clicking editable filed

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (128012 => 128013)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-09-10 02:44:57 UTC (rev 128012)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-09-10 03:34:30 UTC (rev 128013)
@@ -878,7 +878,9 @@
         return;
     }
 
-    adjustSizeConstraints(style, Button);
+    // adjustSizeConstrains can make SquareButtonPart's size wrong (by adjusting paddings), so call it only for PushButtonPart and ButtonPart
+    if (style->appearance() == PushButtonPart || style->appearance() == ButtonPart)
+        adjustSizeConstraints(style, Button);
 }
 
 bool RenderThemeEfl::paintButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to