Changeset 205392 in webkit


Ignore:
Timestamp:
Sep 2, 2016 5:53:39 PM (8 years ago)
Author:
Alan Bujtas
Message:

Should never be reached failure in WebCore::floatValueForLength
https://bugs.webkit.org/show_bug.cgi?id=139397
<rdar://problem/27704376>

Reviewed by Simon Fraser.

Source/WebCore:

floatValueForLength can't resolve unspecified Length types. Filter them out and return 0 as if they were auto.

Test: svg/css/assert-on-non-resolvable-dimension.html

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::valueForLength):

LayoutTests:

  • svg/css/assert-on-non-resolvable-dimension-expected.txt: Added.
  • svg/css/assert-on-non-resolvable-dimension.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205388 r205392  
     12016-09-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Should never be reached failure in WebCore::floatValueForLength
     4        https://bugs.webkit.org/show_bug.cgi?id=139397
     5        <rdar://problem/27704376>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * svg/css/assert-on-non-resolvable-dimension-expected.txt: Added.
     10        * svg/css/assert-on-non-resolvable-dimension.html: Added.
     11
    1122016-09-02  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r205391 r205392  
     12016-09-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Should never be reached failure in WebCore::floatValueForLength
     4        https://bugs.webkit.org/show_bug.cgi?id=139397
     5        <rdar://problem/27704376>
     6
     7        Reviewed by Simon Fraser.
     8
     9        floatValueForLength can't resolve unspecified Length types. Filter them out and return 0 as if they were auto.
     10
     11        Test: svg/css/assert-on-non-resolvable-dimension.html
     12
     13        * svg/SVGLengthContext.cpp:
     14        (WebCore::SVGLengthContext::valueForLength):
     15
    1162016-09-02  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebCore/svg/SVGLengthContext.cpp

    r200098 r205392  
    9292    if (length.isPercent())
    9393        return convertValueFromPercentageToUserUnits(length.value() / 100, mode, IGNORE_EXCEPTION);
    94     if (length.isAuto())
     94    if (length.isAuto() || !length.isSpecified())
    9595        return 0;
    9696
Note: See TracChangeset for help on using the changeset viewer.