Changeset 77273 in webkit


Ignore:
Timestamp:
Feb 1, 2011 12:28:08 PM (13 years ago)
Author:
carol.szabo@nokia.com
Message:

2011-02-01 Carol Szabo <carol.szabo@nokia.com>

Reviewed by David Hyatt.

layoutTestController.counterValueForElementById does not return the correct value
https://bugs.webkit.org/show_bug.cgi?id=53037

  • fast/css/counters/deep-before-expected.txt: Added.
  • fast/css/counters/deep-before.html: Added. This tests whether DumpRenderTree properly retrieves counters and whether counters are properly set when the before pseudo element's renderer is not a direct child of the generating element's renderer.

2011-02-01 Carol Szabo <carol.szabo@nokia.com>

Reviewed by David Hyatt.

layoutTestController.counterValueForElementById does not return the correct value
https://bugs.webkit.org/show_bug.cgi?id=53037

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

  • rendering/RenderTreeAsText.cpp: (WebCore::counterValueForElement): Modified to use the newly available RenderObject::beforePseudoElement() and RenderObject::afterPseudoElement() instead of the old imperfect algorithm to find the before and after pseudo elements.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77271 r77273  
     12011-02-01  Carol Szabo  <carol.szabo@nokia.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        layoutTestController.counterValueForElementById does not return the correct value
     6        https://bugs.webkit.org/show_bug.cgi?id=53037
     7
     8        * fast/css/counters/deep-before-expected.txt: Added.
     9        * fast/css/counters/deep-before.html: Added.
     10        This tests whether DumpRenderTree properly retrieves counters and
     11        whether counters are properly set when the before pseudo element's
     12        renderer is not a direct child of the generating element's renderer.
     13
    1142011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r77272 r77273  
     12011-02-01  Carol Szabo  <carol.szabo@nokia.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        layoutTestController.counterValueForElementById does not return the correct value
     6        https://bugs.webkit.org/show_bug.cgi?id=53037
     7
     8        Test: fast/css/counters/deep-before.html
     9
     10        * rendering/RenderTreeAsText.cpp:
     11        (WebCore::counterValueForElement):
     12        Modified to use the newly available RenderObject::beforePseudoElement()
     13        and RenderObject::afterPseudoElement() instead of the old imperfect
     14        algorithm to find the before and after pseudo elements.
     15
    1162011-02-01  Anton Muhin  <antonm@chromium.org>
    217
  • trunk/Source/WebCore/rendering/RenderTreeAsText.cpp

    r77062 r77273  
    770770    TextStream stream;
    771771    bool isFirstCounter = true;
    772     // The counter renderers should be children of anonymous children
    773     // (i.e., :before or :after pseudo-elements).
     772    // The counter renderers should be children of :before or :after pseudo-elements.
    774773    if (RenderObject* renderer = element->renderer()) {
    775         for (RenderObject* child = renderer->firstChild(); child; child = child->nextSibling()) {
    776             if (child->isAnonymous())
    777                 writeCounterValuesFromChildren(stream, child, isFirstCounter);
    778         }
     774        if (RenderObject* pseudoElement = renderer->beforePseudoElementRenderer())
     775            writeCounterValuesFromChildren(stream, pseudoElement, isFirstCounter);
     776        if (RenderObject* pseudoElement = renderer->afterPseudoElementRenderer())
     777            writeCounterValuesFromChildren(stream, pseudoElement, isFirstCounter);
    779778    }
    780779    return stream.release();
Note: See TracChangeset for help on using the changeset viewer.