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

Side by Side Diff: sky/engine/core/frame/FrameView.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, 1 month 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/frame/FrameView.h ('k') | sky/engine/core/frame/LocalDOMWindow.h » ('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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 IntRect clipRect = contentsToWindow(visibleContentRect(scrollbarInclusion)); 1378 IntRect clipRect = contentsToWindow(visibleContentRect(scrollbarInclusion));
1379 return clipRect; 1379 return clipRect;
1380 } 1380 }
1381 1381
1382 bool FrameView::isActive() const 1382 bool FrameView::isActive() const
1383 { 1383 {
1384 Page* page = frame().page(); 1384 Page* page = frame().page();
1385 return page && page->focusController().isActive(); 1385 return page && page->focusController().isActive();
1386 } 1386 }
1387 1387
1388 void FrameView::scrollTo(const IntSize& newOffset)
1389 {
1390 // FIXME(sky): remove
1391 }
1392
1393 void FrameView::invalidateScrollbarRect(Scrollbar*, const IntRect&) 1388 void FrameView::invalidateScrollbarRect(Scrollbar*, const IntRect&)
1394 { 1389 {
1395 // FIXME(sky): remove 1390 // FIXME(sky): remove
1396 } 1391 }
1397 1392
1398 void FrameView::getTickmarks(Vector<IntRect>& tickmarks) const 1393 void FrameView::getTickmarks(Vector<IntRect>& tickmarks) const
1399 { 1394 {
1400 if (!m_tickmarks.isEmpty()) 1395 if (!m_tickmarks.isEmpty())
1401 tickmarks = m_tickmarks; 1396 tickmarks = m_tickmarks;
1402 else 1397 else
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 { 1701 {
1707 IntPoint point = roundedIntPoint(renderer.localToAbsolute(rendererPoint, Use Transforms)); 1702 IntPoint point = roundedIntPoint(renderer.localToAbsolute(rendererPoint, Use Transforms));
1708 1703
1709 // Convert from page ("absolute") to FrameView coordinates. 1704 // Convert from page ("absolute") to FrameView coordinates.
1710 point.moveBy(-scrollPosition()); 1705 point.moveBy(-scrollPosition());
1711 return point; 1706 return point;
1712 } 1707 }
1713 1708
1714 IntPoint FrameView::convertToRenderer(const RenderObject& renderer, const IntPoi nt& viewPoint) const 1709 IntPoint FrameView::convertToRenderer(const RenderObject& renderer, const IntPoi nt& viewPoint) const
1715 { 1710 {
1716 IntPoint point = viewPoint; 1711 return roundedIntPoint(renderer.absoluteToLocal(viewPoint, UseTransforms));
1717
1718 // Convert from FrameView coords into page ("absolute") coordinates.
1719 point += IntSize(scrollX(), scrollY());
1720
1721 return roundedIntPoint(renderer.absoluteToLocal(point, UseTransforms));
1722 } 1712 }
1723 1713
1724 IntRect FrameView::convertToContainingView(const IntRect& localRect) const 1714 IntRect FrameView::convertToContainingView(const IntRect& localRect) const
1725 { 1715 {
1726 return localRect; 1716 return localRect;
1727 } 1717 }
1728 1718
1729 IntRect FrameView::convertFromContainingView(const IntRect& parentRect) const 1719 IntRect FrameView::convertFromContainingView(const IntRect& parentRect) const
1730 { 1720 {
1731 return parentRect; 1721 return parentRect;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 void FrameView::setLayoutSizeInternal(const IntSize& size) 1858 void FrameView::setLayoutSizeInternal(const IntSize& size)
1869 { 1859 {
1870 if (m_layoutSize == size) 1860 if (m_layoutSize == size)
1871 return; 1861 return;
1872 1862
1873 m_layoutSize = size; 1863 m_layoutSize = size;
1874 contentsResized(); 1864 contentsResized();
1875 } 1865 }
1876 1866
1877 } // namespace blink 1867 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698