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

Side by Side Diff: sky/engine/core/dom/TreeScope.cpp

Issue 677223002: Remove some more frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/dom/Element.cpp ('k') | sky/engine/core/events/MouseRelatedEvent.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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 { 202 {
203 LocalFrame* frame = document->frame(); 203 LocalFrame* frame = document->frame();
204 204
205 if (!frame) 205 if (!frame)
206 return HitTestResult(); 206 return HitTestResult();
207 FrameView* frameView = frame->view(); 207 FrameView* frameView = frame->view();
208 if (!frameView) 208 if (!frameView)
209 return HitTestResult(); 209 return HitTestResult();
210 210
211 float scaleFactor = frame->pageZoomFactor(); 211 float scaleFactor = frame->pageZoomFactor();
212 IntPoint point = roundedIntPoint(FloatPoint(x * scaleFactor + frameView->sc rollX(), y * scaleFactor + frameView->scrollY())); 212 IntPoint point = roundedIntPoint(FloatPoint(x * scaleFactor, y * scaleFactor ));
213 213
214 if (!frameView->visibleContentRect().contains(point)) 214 if (!frameView->visibleContentRect().contains(point))
215 return HitTestResult(); 215 return HitTestResult();
216 216
217 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); 217 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
218 HitTestResult result(point); 218 HitTestResult result(point);
219 document->renderView()->hitTest(request, result); 219 document->renderView()->hitTest(request, result);
220 return result; 220 return result;
221 } 221 }
222 222
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 visitor->trace(m_document); 451 visitor->trace(m_document);
452 visitor->trace(m_parentTreeScope); 452 visitor->trace(m_parentTreeScope);
453 visitor->trace(m_selection); 453 visitor->trace(m_selection);
454 visitor->trace(m_elementsById); 454 visitor->trace(m_elementsById);
455 visitor->trace(m_imageMapsByName); 455 visitor->trace(m_imageMapsByName);
456 visitor->trace(m_labelsByForAttribute); 456 visitor->trace(m_labelsByForAttribute);
457 visitor->trace(m_scopedStyleResolver); 457 visitor->trace(m_scopedStyleResolver);
458 } 458 }
459 459
460 } // namespace blink 460 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/events/MouseRelatedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698