Changeset 147249 in webkit


Ignore:
Timestamp:
Mar 29, 2013 1:34:17 PM (11 years ago)
Author:
hmuller@adobe.com
Message:

[CSS Exclusions] Incorrect margin corner radii formula
https://bugs.webkit.org/show_bug.cgi?id=111186

Reviewed by Dirk Schulze.

Source/WebCore:

Corrected an error in the forumla for the margin ellipse's radii.

Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html

fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html

  • rendering/ExclusionRectangle.cpp:

(WebCore::FloatRoundedRect::marginBounds):

LayoutTests:

  • fast/exclusions/resources/subpixel-utils.js:

(SubPixelLayout): Added an initSubPixelLayout() function so that inline test code doesn't have to wait until the DOMContentLoaded event.

  • fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left-expected.txt: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right-expected.txt: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147245 r147249  
     12013-03-29  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Exclusions] Incorrect margin corner radii formula
     4        https://bugs.webkit.org/show_bug.cgi?id=111186
     5
     6        Reviewed by Dirk Schulze.
     7
     8        * fast/exclusions/resources/subpixel-utils.js:
     9        (SubPixelLayout): Added an initSubPixelLayout() function so that inline test code doesn't have to wait until the DOMContentLoaded event.
     10        * fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left-expected.txt: Added.
     11        * fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html: Added.
     12        * fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right-expected.txt: Added.
     13        * fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html: Added.
     14
    1152013-03-19  Ojan Vafai  <ojan@chromium.org>
    216
  • trunk/LayoutTests/fast/exclusions/resources/subpixel-utils.js

    r133384 r147249  
    11var SubPixelLayout = (function() {
    22    var _subPixelLayout = null;
    3     document.addEventListener('DOMContentLoaded', function() {
     3    function initSubPixelLayout() {
    44        var elem = document.createElement('div');
    55        elem.style.setProperty('width', '4.5px');
     
    88        _subPixelLayout =  (bounds.width != Math.floor(bounds.width));
    99        document.body.removeChild(elem);
    10     });
     10    }
     11    document.addEventListener('DOMContentLoaded', initSubPixelLayout);
    1112    return {
     13        initSubPixelLayout: initSubPixelLayout,
    1214        roundLineLeft: function(f) {
    1315            if (!_subPixelLayout)
  • trunk/Source/WebCore/ChangeLog

    r147245 r147249  
     12013-03-29  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Exclusions] Incorrect margin corner radii formula
     4        https://bugs.webkit.org/show_bug.cgi?id=111186
     5
     6        Reviewed by Dirk Schulze.
     7
     8        Corrected an error in the forumla for the margin ellipse's radii.
     9
     10        Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
     11               fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html
     12
     13        * rendering/ExclusionRectangle.cpp:
     14        (WebCore::FloatRoundedRect::marginBounds):
     15
    1162013-03-19  Ojan Vafai  <ojan@chromium.org>
    217
  • trunk/Source/WebCore/rendering/ExclusionRectangle.cpp

    r144258 r147249  
    7272    float boundsWidth = width() + margin * 2;
    7373    float boundsHeight = height() + margin * 2;
    74     float boundsRadiusX = std::max(rx(), margin);
    75     float boundsRadiusY = std::max(ry(), margin);
     74    float boundsRadiusX = rx() + margin;
     75    float boundsRadiusY = ry() + margin;
    7676    return FloatRoundedRect(FloatRect(boundsX, boundsY, boundsWidth, boundsHeight), FloatSize(boundsRadiusX, boundsRadiusY));
    7777}
Note: See TracChangeset for help on using the changeset viewer.