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

Side by Side Diff: Source/core/rendering/RenderPart.cpp

Issue 527263002: Clean-up hit-testing of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix scrollbar-ticks-hittest test Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/HitTestRequest.h ('k') | Source/core/rendering/RenderView.cpp » ('j') | 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 * (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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTe stLocation, childFrameResult); 107 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTe stLocation, childFrameResult);
108 108
109 if (newHitTestLocation.isRectBasedTest()) 109 if (newHitTestLocation.isRectBasedTest())
110 result.append(childFrameResult); 110 result.append(childFrameResult);
111 else if (isInsideChildFrame) 111 else if (isInsideChildFrame)
112 result = childFrameResult; 112 result = childFrameResult;
113 113
114 if (isInsideChildFrame) 114 if (isInsideChildFrame)
115 return true; 115 return true;
116
117 if (request.allowsFrameScrollbars()) {
118 // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,
119 // so we need to test ScrollView scrollbars separately here.
120 // FIXME: Consider if this test could be done unconditionally.
121 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitT estLocation.roundedPoint());
122 if (frameScrollbar)
123 result.setScrollbar(frameScrollbar);
124 }
125 } 116 }
126 117
127 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum ulatedOffset, action); 118 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum ulatedOffset, action);
128 } 119 }
129 120
130 CompositingReasons RenderPart::additionalCompositingReasons() const 121 CompositingReasons RenderPart::additionalCompositingReasons() const
131 { 122 {
132 if (requiresAcceleratedCompositing()) 123 if (requiresAcceleratedCompositing())
133 return CompositingReasonIFrame; 124 return CompositingReasonIFrame;
134 return CompositingReasonNone; 125 return CompositingReasonNone;
135 } 126 }
136 127
137 } 128 }
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestRequest.h ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698