Commit 3cafe50a authored by enne@google.com's avatar enne@google.com

Properly detect top level frames when propogating compositing

https://bugs.webkit.org/show_bug.cgi?id=78033

Reviewed by James Robinson.

There's no need to enumerate all tag names when searching for a
top-level frame. If a render view's document has a frame, then that
frame is not the top-level one.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 667ee8ba
2012-02-07 Adrienne Walker <enne@google.com>
Properly detect top level frames when propogating compositing
https://bugs.webkit.org/show_bug.cgi?id=78033
Reviewed by James Robinson.
There's no need to enumerate all tag names when searching for a
top-level frame. If a render view's document has a frame, then that
frame is not the top-level one.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2012-02-07 Chris Palmer <palmer@google.com>
Resolve crash in FrameLoader::checkTimerFired.
......@@ -1261,7 +1261,7 @@ bool RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame() const
// Parent document content needs to be able to render on top of a composited frame, so correct behavior
// is to have the parent document become composited too. However, this can cause problems on platforms that
// use native views for frames (like Mac), so disable that behavior on those platforms for now.
HTMLFrameOwnerElement* ownerElement = enclosingFrameElement();
HTMLFrameOwnerElement* ownerElement = m_renderView->document()->ownerElement();
RenderObject* renderer = ownerElement ? ownerElement->renderer() : 0;
// If we are the top-level frame, don't propagate.
......@@ -1292,14 +1292,6 @@ bool RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame() const
return false;
}
HTMLFrameOwnerElement* RenderLayerCompositor::enclosingFrameElement() const
{
if (HTMLFrameOwnerElement* ownerElement = m_renderView->document()->ownerElement())
return (ownerElement->hasTagName(iframeTag) || ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(objectTag)) ? ownerElement : 0;
return 0;
}
bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const
{
if (!canBeComposited(layer))
......
......@@ -178,8 +178,6 @@ public:
static bool allowsIndependentlyCompositedFrames(const FrameView*);
bool shouldPropagateCompositingToEnclosingFrame() const;
HTMLFrameOwnerElement* enclosingFrameElement() const;
static RenderLayerCompositor* frameContentsCompositor(RenderPart*);
// Return true if the layers changed.
static bool parentFrameContentLayers(RenderPart*);
......
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