Changeset 110455 in webkit


Ignore:
Timestamp:
Mar 12, 2012 12:20:56 PM (12 years ago)
Author:
mikelawther@chromium.org
Message:

CSS3 calc: enable mixed percent/absolute for font
https://bugs.webkit.org/show_bug.cgi?id=80813

Reviewed by Ojan Vafai.

Source/WebCore:

Add support for mixed percent/absolute expressions to the font handling class.

  • css/CSSStyleApplyProperty.cpp:

(WebCore::ApplyPropertyFontSize::applyValue):

LayoutTests:

  • css3/calc/font-expected.txt:
  • css3/calc/font-size-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r110451 r110455  
     12012-03-12  Mike Lawther  <mikelawther@chromium.org>
     2
     3        CSS3 calc: enable mixed percent/absolute for font
     4        https://bugs.webkit.org/show_bug.cgi?id=80813
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * css3/calc/font-expected.txt:
     9        * css3/calc/font-size-expected.txt:
     10
    1112012-03-12  Mike Reed  <reed@google.com>
    212
  • trunk/LayoutTests/css3/calc/font-expected.txt

    r107688 r110455  
    1111PASS getComputedStyle(document.getElementById("calc-both"), null).fontSize is "24px"
    1212PASS getComputedStyle(document.getElementById("calc-percent-size"), null).lineHeight is "63px"
    13 FAIL getComputedStyle(document.getElementById("calc-percent-size"), null).fontSize should be 24px. Was 16px.
     13PASS getComputedStyle(document.getElementById("calc-percent-size"), null).fontSize is "24px"
    1414PASS successfullyParsed is true
    1515
  • trunk/LayoutTests/css3/calc/font-size-expected.txt

    r107688 r110455  
    55
    66PASS getComputedStyle(document.getElementById("calc-percent"), null).fontSize is "40px"
    7 FAIL getComputedStyle(document.getElementById("calc-percent-pixels"), null).fontSize should be 40px. Was 20px.
     7PASS getComputedStyle(document.getElementById("calc-percent-pixels"), null).fontSize is "40px"
    88PASS successfullyParsed is true
    99
  • trunk/Source/WebCore/ChangeLog

    r110450 r110455  
     12012-03-12  Mike Lawther  <mikelawther@chromium.org>
     2
     3        CSS3 calc: enable mixed percent/absolute for font
     4        https://bugs.webkit.org/show_bug.cgi?id=80813
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Add support for mixed percent/absolute expressions to the font handling class.
     9
     10        * css/CSSStyleApplyProperty.cpp:
     11        (WebCore::ApplyPropertyFontSize::applyValue):
     12
    1132012-03-12  Andreas Kling  <awesomekling@apple.com>
    214
  • trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp

    r110148 r110455  
    740740            else if (primitiveValue->isPercentage())
    741741                size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
     742            else if (primitiveValue->isCalculatedPercentageWithLength())
     743                size = primitiveValue->cssCalcValue()->toCalcValue(selector->parentStyle(), selector->rootElementStyle())->evaluate(parentSize);               
    742744            else
    743745                return;
Note: See TracChangeset for help on using the changeset viewer.