Commit d877372b authored by hyatt@apple.com's avatar hyatt@apple.com

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):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f0f2c595
<!doctype html>
<div style="width: 250px; zoom: 0;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
38f41f79fc6c203ea5ff5232a4fcfc56
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x250
RenderBlock {HTML} at (0,0) size 800x250
RenderBody {BODY} at (8,8) size 784x234
RenderBlock {DIV} at (0,0) size 250x234
RenderText {#text} at (0,0) size 250x234
text run at (0,0) width 177: "Lorem ipsum dolor sit amet,"
text run at (0,18) width 215: "consectetur adipisicing elit, sed do"
text run at (0,36) width 242: "eiusmod tempor incididunt ut labore et"
text run at (0,54) width 250: "dolore magna aliqua. Ut enim ad minim"
text run at (0,72) width 208: "veniam, quis nostrud exercitation"
text run at (0,90) width 222: "ullamco laboris nisi ut aliquip ex ea"
text run at (0,108) width 231: "commodo consequat. Duis aute irure"
text run at (0,126) width 245: "dolor in reprehenderit in voluptate velit"
text run at (0,144) width 207: "esse cillum dolore eu fugiat nulla"
text run at (0,162) width 204: "pariatur. Excepteur sint occaecat"
text run at (0,180) width 229: "cupidatat non proident, sunt in culpa"
text run at (0,198) width 233: "qui officia deserunt mollit anim id est"
text run at (0,216) width 56: "laborum."
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):
2008-04-15 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
......@@ -1080,7 +1080,7 @@ bool CSSParser::parseValue(int propId, bool important)
if (id == CSSValueNormal || id == CSSValueReset)
valid_primitive = true;
else
valid_primitive = (!id && validUnit(value, FNumber | FPercent, true));
valid_primitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true));
break;
case CSSPropertyTableLayout: // auto | fixed | inherit
......
......@@ -3575,10 +3575,13 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
else if (primitiveValue->getIdent() == CSSValueReset) {
m_style->setEffectiveZoom(RenderStyle::initialZoom());
m_style->setZoom(RenderStyle::initialZoom());
} else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);
else if (type == CSSPrimitiveValue::CSS_NUMBER)
m_style->setZoom(primitiveValue->getFloatValue());
} else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) {
if (primitiveValue->getFloatValue())
m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);
} else if (type == CSSPrimitiveValue::CSS_NUMBER) {
if (primitiveValue->getFloatValue())
m_style->setZoom(primitiveValue->getFloatValue());
}
return;
}
// shorthand properties
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment