| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // renderer and the plugin has a layer, then we need a layer. Second, if thi
s is | 109 // renderer and the plugin has a layer, then we need a layer. Second, if thi
s is |
| 110 // a renderer with a contentDocument and that document needs a layer, then w
e need | 110 // a renderer with a contentDocument and that document needs a layer, then w
e need |
| 111 // a layer. | 111 // a layer. |
| 112 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform
Layer()) | 112 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform
Layer()) |
| 113 return true; | 113 return true; |
| 114 | 114 |
| 115 if (!node() || !node()->isFrameOwnerElement()) | 115 if (!node() || !node()->isFrameOwnerElement()) |
| 116 return false; | 116 return false; |
| 117 | 117 |
| 118 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node()); | 118 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node()); |
| 119 if (element->contentFrame() && element->contentFrame()->remotePlatformLayer(
)) | 119 if (element->contentFrame() && element->contentFrame()->isRemoteFrame()) |
| 120 return true; | 120 return true; |
| 121 | 121 |
| 122 if (Document* contentDocument = element->contentDocument()) { | 122 if (Document* contentDocument = element->contentDocument()) { |
| 123 if (RenderView* view = contentDocument->renderView()) | 123 if (RenderView* view = contentDocument->renderView()) |
| 124 return view->usesCompositing(); | 124 return view->usesCompositing(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 return false; | 127 return false; |
| 128 } | 128 } |
| 129 | 129 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 if ((inside || result.isRectBasedTest()) && !hadResult && result.innerNode()
== node()) | 143 if ((inside || result.isRectBasedTest()) && !hadResult && result.innerNode()
== node()) |
| 144 result.setIsOverWidget(contentBoxRect().contains(result.localPoint())); | 144 result.setIsOverWidget(contentBoxRect().contains(result.localPoint())); |
| 145 return inside; | 145 return inside; |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool RenderPart::nodeAtPoint(const HitTestRequest& request, HitTestResult& resul
t, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOff
set, HitTestAction action) | 148 bool RenderPart::nodeAtPoint(const HitTestRequest& request, HitTestResult& resul
t, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOff
set, HitTestAction action) |
| 149 { | 149 { |
| 150 if (!widget() || !widget()->isFrameView() || !request.allowsChildFrameConten
t()) | 150 if (!widget() || !widget()->isFrameView() || !request.allowsChildFrameConten
t()) |
| 151 return nodeAtPointOverWidget(request, result, locationInContainer, accum
ulatedOffset, action); | 151 return nodeAtPointOverWidget(request, result, locationInContainer, accum
ulatedOffset, action); |
| 152 | 152 |
| 153 // FIXME: Until RemoteFrames use RemoteFrameViews, we need an explicit check
here. | |
| 154 if (toFrameView(widget())->frame().isRemoteFrameTemporary()) | |
| 155 return nodeAtPointOverWidget(request, result, locationInContainer, accum
ulatedOffset, action); | |
| 156 | |
| 157 FrameView* childFrameView = toFrameView(widget()); | 153 FrameView* childFrameView = toFrameView(widget()); |
| 158 RenderView* childRoot = childFrameView->renderView(); | 154 RenderView* childRoot = childFrameView->renderView(); |
| 159 | 155 |
| 160 if (visibleToHitTestRequest(request) && childRoot) { | 156 if (visibleToHitTestRequest(request) && childRoot) { |
| 161 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 157 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
| 162 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo
rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); | 158 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo
rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); |
| 163 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio
n - contentOffset); | 159 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio
n - contentOffset); |
| 164 HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildF
rameHitTest); | 160 HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildF
rameHitTest); |
| 165 HitTestResult childFrameResult(newHitTestLocation); | 161 HitTestResult childFrameResult(newHitTestLocation); |
| 166 | 162 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 if (widget->frameRect() == newFrame) | 309 if (widget->frameRect() == newFrame) |
| 314 return false; | 310 return false; |
| 315 | 311 |
| 316 RefPtrWillBeRawPtr<RenderPart> protector(this); | 312 RefPtrWillBeRawPtr<RenderPart> protector(this); |
| 317 RefPtrWillBeRawPtr<Node> protectedNode(node()); | 313 RefPtrWillBeRawPtr<Node> protectedNode(node()); |
| 318 widget->setFrameRect(newFrame); | 314 widget->setFrameRect(newFrame); |
| 319 return widget->frameRect().size() != newFrame.size(); | 315 return widget->frameRect().size() != newFrame.size(); |
| 320 } | 316 } |
| 321 | 317 |
| 322 } | 318 } |
| OLD | NEW |