Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: sky/engine/core/rendering/RenderView.cpp

Issue 939793003: Change the return value of RenderLayer::hitTestLayer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix indentation Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // RenderView should make sure to update layout before entering hit testing 85 // RenderView should make sure to update layout before entering hit testing
86 ASSERT(!frame()->view()->layoutPending()); 86 ASSERT(!frame()->view()->layoutPending());
87 ASSERT(!document().renderView()->needsLayout()); 87 ASSERT(!document().renderView()->needsLayout());
88 88
89 // TODO(ojan): Does any of this intersection stuff make sense for Sky? 89 // TODO(ojan): Does any of this intersection stuff make sense for Sky?
90 LayoutRect hitTestArea = view()->documentRect(); 90 LayoutRect hitTestArea = view()->documentRect();
91 if (!request.ignoreClipping()) 91 if (!request.ignoreClipping())
92 hitTestArea.intersect(frame()->view()->visibleContentRect()); 92 hitTestArea.intersect(frame()->view()->visibleContentRect());
93 93
94 RenderLayer* insideLayer = layer()->hitTestLayer(layer(), 0, request, result , hitTestArea, location); 94 bool insideLayer = layer()->hitTestLayer(layer(), 0, request, result, hitTes tArea, location);
95 if (!insideLayer) { 95 if (!insideLayer) {
96 // TODO(ojan): Is this code needed for Sky? 96 // TODO(ojan): Is this code needed for Sky?
97 97
98 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 98 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
99 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has 99 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has
100 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 100 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
101 if (request.active() || request.release()) { 101 if (request.active() || request.release()) {
102 updateHitTestResult(result, location.point()); 102 updateHitTestResult(result, location.point());
103 insideLayer = layer(); 103 insideLayer = true;
104 } 104 }
105 } 105 }
106 return insideLayer; 106 return insideLayer;
107 } 107 }
108 108
109 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi calExtentComputedValues& computedValues) const 109 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi calExtentComputedValues& computedValues) const
110 { 110 {
111 computedValues.m_extent = m_frameView ? LayoutUnit(viewLogicalHeight()) : lo gicalHeight; 111 computedValues.m_extent = m_frameView ? LayoutUnit(viewLogicalHeight()) : lo gicalHeight;
112 } 112 }
113 113
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 m_iframes.remove(iframe); 440 m_iframes.remove(iframe);
441 } 441 }
442 442
443 void RenderView::updateIFramesAfterLayout() 443 void RenderView::updateIFramesAfterLayout()
444 { 444 {
445 for (auto& iframe: m_iframes) 445 for (auto& iframe: m_iframes)
446 iframe->updateWidgetBounds(); 446 iframe->updateWidgetBounds();
447 } 447 }
448 448
449 } // namespace blink 449 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698