Changeset 92200 in webkit


Ignore:
Timestamp:
Aug 2, 2011 10:08:18 AM (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

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

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. We choose the insertion
point to be the first child only if the anonymous block has children, otherwise the before element ends up
in a wrong block.

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

fast/dynamic/hover-before-position-after-style-change2.html

  • rendering/RenderObjectChildList.cpp:

(WebCore::RenderObjectChildList::updateBeforeAfterContent):

LayoutTests:

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r92196 r92200  
     12011-08-02  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        * fast/dynamic/hover-before-position-after-style-change2-expected.txt: Added.
     11        * fast/dynamic/hover-before-position-after-style-change2.html: Added.
     12
    1132011-07-30  Pavel Podivilov  <podivilov@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r92197 r92200  
     12011-08-02  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        When a 'before' pseudo-element is re-added, we should check whether the insertion point is an anonymous
     9        block with inline children. If it is, then we should change the insertion point to the first child of the
     10        anonymous block, otherwise the 'before' pseudo-element ends up in a different block. We choose the insertion
     11        point to be the first child only if the anonymous block has children, otherwise the before element ends up
     12        in a wrong block.
     13
     14        Tests: fast/dynamic/hover-before-position-after-style-change.html
     15               fast/dynamic/hover-before-position-after-style-change2.html
     16
     17        * rendering/RenderObjectChildList.cpp:
     18        (WebCore::RenderObjectChildList::updateBeforeAfterContent):
     19
    1202011-08-02  Andreas Kling  <kling@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderObjectChildList.cpp

    r91702 r92200  
    411411   
    412412    RenderObject* insertBefore = (type == BEFORE) ? owner->virtualChildren()->firstChild() : 0;
     413    if (insertBefore && insertBefore->isAnonymousBlock() && insertBefore->childrenInline() && !insertBefore->isEmpty()) {
     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. We do this only when the anonymous block has children, otherwise
     418        // we end up with the before element in a wrong block.
     419        insertBefore = insertBefore->firstChild();
     420    }
    413421
    414422    // Generated content consists of a single container that houses multiple children (specified
Note: See TracChangeset for help on using the changeset viewer.