Changeset 199551 in webkit


Ignore:
Timestamp:
Apr 14, 2016 1:49:12 PM (8 years ago)
Author:
Manuel Rego Casasnovas
Message:

[css-grid] Implement CSSGridTemplateAreasValue::equals
https://bugs.webkit.org/show_bug.cgi?id=156578

Reviewed by Darin Adler.

Source/WebCore:

This was causing an infinite loop setting grid-template-areas
from JavaScript.

The reason was that CSSGridTemplateAreasValue needs
an specific implementation of equals() method.

Test: fast/css-grid-layout/grid-template-areas-infinite-loop.html

  • css/CSSGridTemplateAreasValue.cpp:

(WebCore::CSSGridTemplateAreasValue::equals):

  • css/CSSGridTemplateAreasValue.h:

LayoutTests:

  • fast/css-grid-layout/grid-template-areas-infinite-loop-expected.txt: Added.
  • fast/css-grid-layout/grid-template-areas-infinite-loop.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r199545 r199551  
     12016-04-14  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Implement CSSGridTemplateAreasValue::equals
     4        https://bugs.webkit.org/show_bug.cgi?id=156578
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/css-grid-layout/grid-template-areas-infinite-loop-expected.txt: Added.
     9        * fast/css-grid-layout/grid-template-areas-infinite-loop.html: Added.
     10
    1112016-04-14  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r199549 r199551  
     12016-04-14  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Implement CSSGridTemplateAreasValue::equals
     4        https://bugs.webkit.org/show_bug.cgi?id=156578
     5
     6        Reviewed by Darin Adler.
     7
     8        This was causing an infinite loop setting grid-template-areas
     9        from JavaScript.
     10
     11        The reason was that CSSGridTemplateAreasValue needs
     12        an specific implementation of equals() method.
     13
     14        Test: fast/css-grid-layout/grid-template-areas-infinite-loop.html
     15
     16        * css/CSSGridTemplateAreasValue.cpp:
     17        (WebCore::CSSGridTemplateAreasValue::equals):
     18        * css/CSSGridTemplateAreasValue.h:
     19
    1202016-04-14  Brent Fulgham  <bfulgham@apple.com>
    221
  • trunk/Source/WebCore/css/CSSGridTemplateAreasValue.cpp

    r198399 r199551  
    8686}
    8787
     88bool CSSGridTemplateAreasValue::equals(const CSSGridTemplateAreasValue& other) const
     89{
     90    return m_gridAreaMap == other.m_gridAreaMap && m_rowCount == other.m_rowCount && m_columnCount == other.m_columnCount;
     91}
     92
    8893} // namespace WebCore
    8994
  • trunk/Source/WebCore/css/CSSGridTemplateAreasValue.h

    r198210 r199551  
    5555    size_t columnCount() const { return m_columnCount; }
    5656
     57    bool equals(const CSSGridTemplateAreasValue&) const;
     58
    5759private:
    5860    CSSGridTemplateAreasValue(const NamedGridAreaMap&, size_t rowCount, size_t columnCount);
Note: See TracChangeset for help on using the changeset viewer.