Changeset 147701 in webkit


Ignore:
Timestamp:
Apr 4, 2013 8:46:22 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops traversing render tree when it hits an iframe element
https://bugs.webkit.org/show_bug.cgi?id=113944

Patch by Andrew Lo <anlo@rim.com> on 2013-04-04
Reviewed by Rob Buis.
Internally reviewed by Mike Fenton.

Internal PR 320732.
When checking whether a RenderObject is fixed position or has a fixed position
ancestor, we traverse the render tree upwards.

When we reach the root of the tree, check whether the root is an
iframe and has an element owner. If so, we also need to continue iterating
up the tree from the owner to see if the iframe is a descendant of a fixed
position element.

  • WebKitSupport/DOMSupport.cpp:

(BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r147687 r147701  
     12013-04-04  Andrew Lo  <anlo@rim.com>
     2
     3        [BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops traversing render tree when it hits an iframe element
     4        https://bugs.webkit.org/show_bug.cgi?id=113944
     5
     6        Reviewed by Rob Buis.
     7        Internally reviewed by Mike Fenton.
     8
     9        Internal PR 320732.
     10        When checking whether a RenderObject is fixed position or has a fixed position
     11        ancestor, we traverse the render tree upwards.
     12
     13        When we reach the root of the tree, check whether the root is an
     14        iframe and has an element owner. If so, we also need to continue iterating
     15        up the tree from the owner to see if the iframe is a descendant of a fixed
     16        position element.
     17
     18        * WebKitSupport/DOMSupport.cpp:
     19        (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):
     20
    1212013-04-04  Tiancheng Jiang  <tijiang@rim.com>
    222
  • trunk/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp

    r147135 r147701  
    2424#include "FrameView.h"
    2525#include "HTMLFormElement.h"
     26#include "HTMLFrameOwnerElement.h"
    2627#include "HTMLInputElement.h"
    2728#include "HTMLNames.h"
     
    597598            return true;
    598599
     600        // Check if the current frame is an iframe. If so, continue checking with the iframe's owner element.
     601        if (!currentRenderer->parent() && currentRenderer->isRenderView() && currentRenderer->frame() && currentRenderer->frame()->ownerElement()) {
     602            currentRenderer = currentRenderer->frame()->ownerElement()->renderer();
     603            continue;
     604        }
     605
    599606        currentRenderer = currentRenderer->parent();
    600607    }
Note: See TracChangeset for help on using the changeset viewer.