| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) | 66 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) |
| 67 { | 67 { |
| 68 return hitTest(request, result.hitTestLocation(), result); | 68 return hitTest(request, result.hitTestLocation(), result); |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) | 71 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) |
| 72 { | 72 { |
| 73 TRACE_EVENT0("blink", "RenderView::hitTest"); | 73 TRACE_EVENT0("blink", "RenderView::hitTest"); |
| 74 m_hitTestCount++; | 74 m_hitTestCount++; |
| 75 | 75 |
| 76 if (!m_frameView->visibleContentRect().contains(location.roundedPoint())) |
| 77 return false; |
| 78 |
| 76 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses | 79 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses |
| 77 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers | 80 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers |
| 78 // that are higher up in the call stack, leading to crashes. | 81 // that are higher up in the call stack, leading to crashes. |
| 79 // Note that Document::updateLayout calls its parent's updateLayout. | 82 // Note that Document::updateLayout calls its parent's updateLayout. |
| 80 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. | 83 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. |
| 81 frameView()->updateLayoutAndStyleIfNeededRecursive(); | 84 frameView()->updateLayoutAndStyleIfNeededRecursive(); |
| 82 return layer()->hitTest(request, location, result); | 85 return layer()->hitTest(request, location, result); |
| 83 } | 86 } |
| 84 | 87 |
| 85 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const | 88 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 m_iframes.remove(iframe); | 479 m_iframes.remove(iframe); |
| 477 } | 480 } |
| 478 | 481 |
| 479 void RenderView::updateIFramesAfterLayout() | 482 void RenderView::updateIFramesAfterLayout() |
| 480 { | 483 { |
| 481 for (auto& iframe: m_iframes) | 484 for (auto& iframe: m_iframes) |
| 482 iframe->updateWidgetBounds(); | 485 iframe->updateWidgetBounds(); |
| 483 } | 486 } |
| 484 | 487 |
| 485 } // namespace blink | 488 } // namespace blink |
| OLD | NEW |