Commit d163f0f7 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops...

[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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bedac6ee
2013-04-04 Andrew Lo <anlo@rim.com>
[BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops traversing render tree when it hits an iframe element
https://bugs.webkit.org/show_bug.cgi?id=113944
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):
2013-04-04 Tiancheng Jiang <tijiang@rim.com>
 
[BlackBerry] Adjust fatfinger result priority
......
......@@ -23,6 +23,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLTextAreaElement.h"
......@@ -596,6 +597,12 @@ bool isFixedPositionOrHasFixedPositionAncestor(RenderObject* renderer)
if (currentRenderer->isOutOfFlowPositioned() && currentRenderer->style()->position() == FixedPosition)
return true;
// Check if the current frame is an iframe. If so, continue checking with the iframe's owner element.
if (!currentRenderer->parent() && currentRenderer->isRenderView() && currentRenderer->frame() && currentRenderer->frame()->ownerElement()) {
currentRenderer = currentRenderer->frame()->ownerElement()->renderer();
continue;
}
currentRenderer = currentRenderer->parent();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment