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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2542463002: Do not try to convert point to root coordinate space when |local_frame_id_| is invalid. (Closed)
Patch Set: Created 4 years 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 | « chrome/browser/ssl/ssl_browser_tests.cc ('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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 void RenderWidgetHostViewChildFrame::ProcessGestureEvent( 514 void RenderWidgetHostViewChildFrame::ProcessGestureEvent(
515 const blink::WebGestureEvent& event, 515 const blink::WebGestureEvent& event,
516 const ui::LatencyInfo& latency) { 516 const ui::LatencyInfo& latency) {
517 host_->ForwardGestureEventWithLatencyInfo(event, latency); 517 host_->ForwardGestureEventWithLatencyInfo(event, latency);
518 } 518 }
519 519
520 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( 520 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace(
521 const gfx::Point& point) { 521 const gfx::Point& point) {
522 if (!frame_connector_) 522 if (!frame_connector_ || !local_frame_id_.is_valid())
523 return point; 523 return point;
524 524
525 return frame_connector_->TransformPointToRootCoordSpace( 525 return frame_connector_->TransformPointToRootCoordSpace(
526 point, cc::SurfaceId(frame_sink_id_, local_frame_id_)); 526 point, cc::SurfaceId(frame_sink_id_, local_frame_id_));
527 } 527 }
528 528
529 bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace( 529 bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace(
530 const gfx::Point& point, 530 const gfx::Point& point,
531 const cc::SurfaceId& original_surface, 531 const cc::SurfaceId& original_surface,
532 gfx::Point* transformed_point) { 532 gfx::Point* transformed_point) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 732
733 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 733 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
734 return true; 734 return true;
735 } 735 }
736 736
737 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 737 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
738 return cc::SurfaceId(frame_sink_id_, local_frame_id_); 738 return cc::SurfaceId(frame_sink_id_, local_frame_id_);
739 }; 739 };
740 740
741 } // namespace content 741 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698