Changeset 36046 in webkit


Ignore:
Timestamp:
Sep 2, 2008 11:12:30 PM (16 years ago)
Author:
mrowe@apple.com
Message:

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Eric Seidel.

Fix https://bugs.webkit.org/show_bug.cgi?id=20397
Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash

The function checkForOrphanedUnits() would change the length of a list whose size was
was already determined before the call to checkForOrphanedUnits was made. Later in
the caller, the old size was being used for boundary management.

This has been fixed by moving the call to checkForOrphanedUnits() earlier in the
calling function, before the size of the list is determined.

Test: fast/css/orphaned_units_crash.html

  • css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Moved call to checkForOrphanedUnits() earlier in the function.

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Eric Seidel.

Tests for https://bugs.webkit.org/show_bug.cgi?id=20397
Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash

Added new tests to check whether an orphaned unit identifier in particular
CSS attributes will crash the browser.

  • fast/css/orphaned_units_crash-expected.txt: Added.
  • fast/css/orphaned_units_crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r36044 r36046  
     12008-09-02  Glenn Wilson  <wilsong@gmail.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Tests for https://bugs.webkit.org/show_bug.cgi?id=20397
     6        Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash
     7
     8        Added new tests to check whether an orphaned unit identifier in particular
     9        CSS attributes will crash the browser.
     10
     11        * fast/css/orphaned_units_crash-expected.txt: Added.
     12        * fast/css/orphaned_units_crash.html: Added.
     13
    1142008-09-02  Dirk Schulze  <vbs85@gmx.de>
    215
  • trunk/WebCore/ChangeLog

    r36044 r36046  
     12008-09-02  Glenn Wilson  <wilsong@gmail.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix https://bugs.webkit.org/show_bug.cgi?id=20397
     6        Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash
     7
     8        The function checkForOrphanedUnits() would change the length of a list whose size was
     9        was already determined before the call to checkForOrphanedUnits was made.  Later in
     10        the caller, the old size was being used for boundary management.
     11
     12        This has been fixed by moving the call to checkForOrphanedUnits() earlier in the
     13        calling function, before the size of the list is determined.
     14
     15        Test: fast/css/orphaned_units_crash.html
     16
     17        * css/CSSParser.cpp:
     18        (WebCore::CSSParser::parseValue):  Moved call to checkForOrphanedUnits() earlier in the function.
     19
    1202008-09-02  Dirk Schulze  <vbs85@gmx.de>
    221
  • trunk/WebCore/css/CSSParser.cpp

    r35910 r36046  
    531531    int id = value->id;
    532532
     533    // In quirks mode, we will look for units that have been incorrectly separated from the number they belong to
     534    // by a space.  We go ahead and associate the unit with the number even though it is invalid CSS.
     535    checkForOrphanedUnits();
     536   
    533537    int num = inShorthand() ? 1 : m_valueList->size();
    534538
     
    556560    bool valid_primitive = false;
    557561    RefPtr<CSSValue> parsedValue;
    558 
    559     // In quirks mode, we will look for units that have been incorrectly separated from the number they belong to
    560     // by a space.  We go ahead and associate the unit with the number even though it is invalid CSS.
    561     checkForOrphanedUnits();
    562562
    563563    switch (static_cast<CSSPropertyID>(propId)) {
Note: See TracChangeset for help on using the changeset viewer.