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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2868173002: Add PlatformLocalFrame class. (Closed)
Patch Set: this time with new file included Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/frame/FrameViewTest.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 4516 matching lines...) Expand 10 before | Expand all | Expand 10 after
4527 IntPoint point_in_frame = ContentsToFrame(point_in_contents); 4527 IntPoint point_in_frame = ContentsToFrame(point_in_contents);
4528 IntPoint point_in_root_frame = ConvertToRootFrame(point_in_frame); 4528 IntPoint point_in_root_frame = ConvertToRootFrame(point_in_frame);
4529 return frame_->GetPage()->GetVisualViewport().RootFrameToViewport( 4529 return frame_->GetPage()->GetVisualViewport().RootFrameToViewport(
4530 point_in_root_frame); 4530 point_in_root_frame);
4531 } 4531 }
4532 4532
4533 IntRect FrameView::ContentsToScreen(const IntRect& rect) const { 4533 IntRect FrameView::ContentsToScreen(const IntRect& rect) const {
4534 PlatformChromeClient* client = GetChromeClient(); 4534 PlatformChromeClient* client = GetChromeClient();
4535 if (!client) 4535 if (!client)
4536 return IntRect(); 4536 return IntRect();
4537 return client->ViewportToScreen(ContentsToViewport(rect), this); 4537 return client->ViewportToScreen(ContentsToViewport(rect), frame_);
4538 } 4538 }
4539 4539
4540 IntPoint FrameView::SoonToBeRemovedUnscaledViewportToContents( 4540 IntPoint FrameView::SoonToBeRemovedUnscaledViewportToContents(
4541 const IntPoint& point_in_viewport) const { 4541 const IntPoint& point_in_viewport) const {
4542 IntPoint point_in_root_frame = FlooredIntPoint( 4542 IntPoint point_in_root_frame = FlooredIntPoint(
4543 frame_->GetPage()->GetVisualViewport().ViewportCSSPixelsToRootFrame( 4543 frame_->GetPage()->GetVisualViewport().ViewportCSSPixelsToRootFrame(
4544 point_in_viewport)); 4544 point_in_viewport));
4545 IntPoint point_in_this_frame = ConvertFromRootFrame(point_in_root_frame); 4545 IntPoint point_in_this_frame = ConvertFromRootFrame(point_in_root_frame);
4546 return FrameToContents(point_in_this_frame); 4546 return FrameToContents(point_in_this_frame);
4547 } 4547 }
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
5388 void FrameView::SetAnimationHost( 5388 void FrameView::SetAnimationHost(
5389 std::unique_ptr<CompositorAnimationHost> host) { 5389 std::unique_ptr<CompositorAnimationHost> host) {
5390 animation_host_ = std::move(host); 5390 animation_host_ = std::move(host);
5391 } 5391 }
5392 5392
5393 LayoutUnit FrameView::CaretWidth() const { 5393 LayoutUnit FrameView::CaretWidth() const {
5394 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); 5394 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1));
5395 } 5395 }
5396 5396
5397 } // namespace blink 5397 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698