Changeset 91285 in webkit


Ignore:
Timestamp:
Jul 19, 2011 12:25:30 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

hover then un-hover makes state change
https://bugs.webkit.org/show_bug.cgi?id=56401

Source/WebCore:

When a 'before' pseudo-element is re-added, we should check whether the insertion point is an anonymous
block with inline children. If it is, then we should change the insertion point to the first child of the
anonymous block, otherwise the 'before' pseudo-element ends up in a different block.

Patch by Mihnea Ovidenie <mihnea@adobe.com> on 2011-07-19
Reviewed by David Hyatt.

Test: fast/dynamic/hover-before-position-after-style-change.html

  • rendering/RenderObjectChildList.cpp:

(WebCore::RenderObjectChildList::updateBeforeAfterContent):

LayoutTests:

Patch by Mihnea Ovidenie <mihnea@adobe.com> on 2011-07-19
Reviewed by David Hyatt.

  • fast/dynamic/hover-before-position-after-style-change-expected.txt: Added.
  • fast/dynamic/hover-before-position-after-style-change.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91284 r91285  
     12011-07-19  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        hover then un-hover makes state change
     4        https://bugs.webkit.org/show_bug.cgi?id=56401
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/dynamic/hover-before-position-after-style-change-expected.txt: Added.
     9        * fast/dynamic/hover-before-position-after-style-change.html: Added.
     10
    1112011-07-19  Gavin Barraclough  <barraclough@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r91283 r91285  
     12011-07-19  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        hover then un-hover makes state change
     4        https://bugs.webkit.org/show_bug.cgi?id=56401
     5
     6        When a 'before' pseudo-element is re-added, we should check whether the insertion point is an anonymous
     7        block with inline children. If it is, then we should change the insertion point to the first child of the
     8        anonymous block, otherwise the 'before' pseudo-element ends up in a different block.
     9
     10        Reviewed by David Hyatt.
     11
     12        Test: fast/dynamic/hover-before-position-after-style-change.html
     13
     14        * rendering/RenderObjectChildList.cpp:
     15        (WebCore::RenderObjectChildList::updateBeforeAfterContent):
     16
    1172011-07-19  Luke Macpherson   <macpherson@chromium.org>
    218
  • trunk/Source/WebCore/rendering/RenderObjectChildList.cpp

    r91178 r91285  
    411411   
    412412    RenderObject* insertBefore = (type == BEFORE) ? owner->virtualChildren()->firstChild() : 0;
     413    if (insertBefore && insertBefore->isAnonymousBlock() && insertBefore->childrenInline()) {
     414        // We are going to add the "before" element. We have to check whether the "insertBefore" element
     415        // is an anonymous block with inline children. If it is, then we should insert the "before" element
     416        // before the first inline child of the anonymous block, otherwise we will end up with the "before"
     417        // element in a different block.
     418        insertBefore = insertBefore->firstChild();
     419    }
    413420
    414421    // Generated content consists of a single container that houses multiple children (specified
Note: See TracChangeset for help on using the changeset viewer.