Changeset 31915 in webkit


Ignore:
Timestamp:
Apr 15, 2008 12:21:38 PM (16 years ago)
Author:
hyatt@apple.com
Message:

2008-04-15 David Hyatt <hyatt@apple.com>

https://bugs.webkit.org/show_bug.cgi?id=18467

Make sure to ignore zoom:0. That is not supposed to actually do anything. It's a hack in IE
to cause an element to set "hasLayout."

Reviewed by Anders

Added fast/css/zoom-property-parsing.html

  • css/CSSParser.cpp: (WebCore::CSSParser::parseValue):
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r31914 r31915  
     12008-04-15  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=18467
     4
     5        Make sure to ignore zoom:0.  That is not supposed to actually do anything.  It's a hack in IE
     6        to cause an element to set "hasLayout."
     7
     8        Reviewed by Anders
     9
     10        Added fast/css/zoom-property-parsing.html
     11
     12        * css/CSSParser.cpp:
     13        (WebCore::CSSParser::parseValue):
     14        * css/CSSStyleSelector.cpp:
     15        (WebCore::CSSStyleSelector::applyProperty):
     16
    1172008-04-15  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/WebCore/css/CSSParser.cpp

    r31873 r31915  
    10811081            valid_primitive = true;
    10821082        else
    1083             valid_primitive = (!id && validUnit(value, FNumber | FPercent, true));
     1083            valid_primitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true));
    10841084        break;
    10851085       
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r31873 r31915  
    35763576            m_style->setEffectiveZoom(RenderStyle::initialZoom());
    35773577            m_style->setZoom(RenderStyle::initialZoom());
    3578         } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
    3579             m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);
    3580         else if (type == CSSPrimitiveValue::CSS_NUMBER)
    3581             m_style->setZoom(primitiveValue->getFloatValue());
     3578        } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) {
     3579            if (primitiveValue->getFloatValue())
     3580                m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);
     3581        } else if (type == CSSPrimitiveValue::CSS_NUMBER) {
     3582            if (primitiveValue->getFloatValue())
     3583                m_style->setZoom(primitiveValue->getFloatValue());
     3584        }
    35823585        return;
    35833586    }
Note: See TracChangeset for help on using the changeset viewer.