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

Side by Side Diff: sky/engine/web/WebLocalFrameImpl.cpp

Issue 939483005: Merge RenderLayer::hitTest into RenderView::hitTest. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add TODOs and remove redundant isRootLayer check 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/RenderView.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 void WebLocalFrameImpl::setCaretVisible(bool visible) 469 void WebLocalFrameImpl::setCaretVisible(bool visible)
470 { 470 {
471 frame()->selection().setCaretVisible(visible); 471 frame()->selection().setCaretVisible(visible);
472 } 472 }
473 473
474 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint& point) 474 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint& point)
475 { 475 {
476 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping; 476 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping;
477 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(Float Point(point)))); 477 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(Float Point(point))));
478 frame()->document()->renderView()->layer()->hitTest(request, result.hitTestL ocation(), result); 478 frame()->document()->renderView()->hitTest(request, result.hitTestLocation() , result);
479 479
480 if (Node* node = result.targetNode()) 480 if (Node* node = result.targetNode())
481 return frame()->selection().selection().visiblePositionRespectingEditing Boundary(result.localPoint(), node); 481 return frame()->selection().selection().visiblePositionRespectingEditing Boundary(result.localPoint(), node);
482 return VisiblePosition(); 482 return VisiblePosition();
483 } 483 }
484 484
485 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const 485 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const
486 { 486 {
487 if (!frame()) 487 if (!frame())
488 return WebString(); 488 return WebString();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse t, float contentScaleFactor) 590 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse t, float contentScaleFactor)
591 { 591 {
592 m_inputEventsOffsetForEmulation = offset; 592 m_inputEventsOffsetForEmulation = offset;
593 m_inputEventsScaleFactorForEmulation = contentScaleFactor; 593 m_inputEventsScaleFactorForEmulation = contentScaleFactor;
594 if (frame()->view()) 594 if (frame()->view())
595 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset ForEmulation, m_inputEventsScaleFactorForEmulation); 595 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset ForEmulation, m_inputEventsScaleFactorForEmulation);
596 } 596 }
597 597
598 } // namespace blink 598 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698