Changeset 81778 in webkit


Ignore:
Timestamp:
Mar 23, 2011 9:38:58 AM (13 years ago)
Author:
carol.szabo@nokia.com
Message:

2011-03-23 Carol Szabo <carol.szabo@nokia.com>

Reviewed by David Hyatt.

Added new test to expose failure to correctly find the
before/after container when creating a CSS counter.

CSS 2.1 failure: various before-after-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=47207

  • fast/css/counters/complex-before-expected.txt: Added.
  • fast/css/counters/complex-before.html: Added.

2011-03-23 Carol Szabo <carol.szabo@nokia.com>

Reviewed by David Hyatt.

Modified RenderCounter::originalText() to correctly attach
the created counter to the before/after container even when
that is not the RenderCounter's direct parent.

CSS 2.1 failure: various before-after-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=47207

Test: fast/css/counters/complex-before.html

  • rendering/RenderCounter.cpp: (WebCore::RenderCounter::originalText):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r81769 r81778  
     12011-03-23  Carol Szabo  <carol.szabo@nokia.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        Added new test to expose failure to correctly find the
     6        before/after container when creating a CSS counter.
     7
     8        CSS 2.1 failure: various before-after-* tests fail
     9        https://bugs.webkit.org/show_bug.cgi?id=47207
     10
     11        * fast/css/counters/complex-before-expected.txt: Added.
     12        * fast/css/counters/complex-before.html: Added.
     13
    1142011-03-23  Csaba Osztrogonác  <ossy@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r81777 r81778  
     12011-03-23  Carol Szabo  <carol.szabo@nokia.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        Modified RenderCounter::originalText() to correctly attach
     6        the created counter to the before/after container even when
     7        that is not the RenderCounter's direct parent.
     8
     9        CSS 2.1 failure: various before-after-* tests fail
     10        https://bugs.webkit.org/show_bug.cgi?id=47207
     11
     12        Test: fast/css/counters/complex-before.html
     13
     14        * rendering/RenderCounter.cpp:
     15        (WebCore::RenderCounter::originalText):
     16
    1172011-03-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    218
  • trunk/Source/WebCore/rendering/RenderCounter.cpp

    r81724 r81778  
    475475PassRefPtr<StringImpl> RenderCounter::originalText() const
    476476{
    477     if (!parent())
    478         return 0;
    479 
    480477    if (!m_counterNode) {
    481         makeCounterNode(parent(), m_counter.identifier(), true)->addRenderer(const_cast<RenderCounter*>(this));
     478        RenderObject* beforeAfterContainer = parent();
     479        while (true) {
     480            if (!beforeAfterContainer)
     481                return 0;
     482            if (!beforeAfterContainer->isAnonymous())
     483                return 0; // RenderCounters are restricted to before and after pseudo elements
     484            PseudoId containerStyle = beforeAfterContainer->style()->styleType();
     485            if ((containerStyle == BEFORE) || (containerStyle == AFTER))
     486                break;
     487            beforeAfterContainer = beforeAfterContainer->parent();
     488        }
     489        makeCounterNode(beforeAfterContainer, m_counter.identifier(), true)->addRenderer(const_cast<RenderCounter*>(this));
    482490        ASSERT(m_counterNode);
    483491    }
Note: See TracChangeset for help on using the changeset viewer.