Changeset 31426 in webkit


Ignore:
Timestamp:
Mar 28, 2008 8:07:21 PM (16 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Dave Hyatt.

  • fix a percentage background position regression from r31389

Test: fast/backgrounds/background-position-1.html

  • rendering/Length.h: (WebCore::Length::calcValue): Divide by 100. (WebCore::Length::calcMinValue): Ditto.

LayoutTests:

Reviewed by Dave Hyatt.

  • pixel test for a percentage background position regression from r31389
  • fast/backgrounds/background-position-1.html: Added.
  • platform/mac/fast/backgrounds/background-position-1-expected.checksum: Added.
  • platform/mac/fast/backgrounds/background-position-1-expected.png: Added.
  • platform/mac/fast/backgrounds/background-position-1-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r31413 r31426  
     12008-03-28  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - pixel test for a percentage background position regression from r31389
     6
     7        * fast/backgrounds/background-position-1.html: Added.
     8        * platform/mac/fast/backgrounds/background-position-1-expected.checksum: Added.
     9        * platform/mac/fast/backgrounds/background-position-1-expected.png: Added.
     10        * platform/mac/fast/backgrounds/background-position-1-expected.txt: Added.
     11
    1122008-03-28  Stephanie Lewis  <slewis@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r31424 r31426  
     12008-03-28  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - fix a percentage background position regression from r31389
     6
     7        Test: fast/backgrounds/background-position-1.html
     8
     9        * rendering/Length.h:
     10        (WebCore::Length::calcValue): Divide by 100.
     11        (WebCore::Length::calcMinValue): Ditto.
     12
    1132008-03-28  David Hyatt  <hyatt@apple.com>
    214
  • trunk/WebCore/rendering/Length.h

    r31392 r31426  
    112112                case Percent:
    113113                    if (roundPercentages)
    114                         return static_cast<int>(round(maxValue * percent()));
     114                        return static_cast<int>(round(maxValue * percent() / 100.0));
    115115                    return maxValue * rawValue() / (100 * percentScaleFactor);
    116116                case Auto:
     
    128128                case Percent:
    129129                    if (roundPercentages)
    130                         return static_cast<int>(round(maxValue * percent()));
     130                        return static_cast<int>(round(maxValue * percent() / 100.0));
    131131                    return maxValue * rawValue() / (100 * percentScaleFactor);
    132132                case Auto:
Note: See TracChangeset for help on using the changeset viewer.