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

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

Issue 925933004: Prune HitTestResult and stop special-casing links. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review comments 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/web/WebViewImpl.h ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "sky/engine/platform/graphics/Image.h" 67 #include "sky/engine/platform/graphics/Image.h"
68 #include "sky/engine/platform/graphics/ImageBuffer.h" 68 #include "sky/engine/platform/graphics/ImageBuffer.h"
69 #include "sky/engine/public/platform/Platform.h" 69 #include "sky/engine/public/platform/Platform.h"
70 #include "sky/engine/public/platform/WebFloatPoint.h" 70 #include "sky/engine/public/platform/WebFloatPoint.h"
71 #include "sky/engine/public/platform/WebImage.h" 71 #include "sky/engine/public/platform/WebImage.h"
72 #include "sky/engine/public/platform/WebLayerTreeView.h" 72 #include "sky/engine/public/platform/WebLayerTreeView.h"
73 #include "sky/engine/public/platform/WebURLRequest.h" 73 #include "sky/engine/public/platform/WebURLRequest.h"
74 #include "sky/engine/public/platform/WebVector.h" 74 #include "sky/engine/public/platform/WebVector.h"
75 #include "sky/engine/public/web/WebBeginFrameArgs.h" 75 #include "sky/engine/public/web/WebBeginFrameArgs.h"
76 #include "sky/engine/public/web/WebFrameClient.h" 76 #include "sky/engine/public/web/WebFrameClient.h"
77 #include "sky/engine/public/web/WebHitTestResult.h"
78 #include "sky/engine/public/web/WebNode.h" 77 #include "sky/engine/public/web/WebNode.h"
79 #include "sky/engine/public/web/WebRange.h" 78 #include "sky/engine/public/web/WebRange.h"
80 #include "sky/engine/public/web/WebTextInputInfo.h" 79 #include "sky/engine/public/web/WebTextInputInfo.h"
81 #include "sky/engine/public/web/WebViewClient.h" 80 #include "sky/engine/public/web/WebViewClient.h"
82 #include "sky/engine/web/CompositionUnderlineVectorBuilder.h" 81 #include "sky/engine/web/CompositionUnderlineVectorBuilder.h"
83 #include "sky/engine/web/WebLocalFrameImpl.h" 82 #include "sky/engine/web/WebLocalFrameImpl.h"
84 #include "sky/engine/web/WebSettingsImpl.h" 83 #include "sky/engine/web/WebSettingsImpl.h"
85 #include "sky/engine/wtf/CurrentTime.h" 84 #include "sky/engine/wtf/CurrentTime.h"
86 #include "sky/engine/wtf/RefPtr.h" 85 #include "sky/engine/wtf/RefPtr.h"
87 #include "sky/engine/wtf/TemporaryChange.h" 86 #include "sky/engine/wtf/TemporaryChange.h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 726 }
728 727
729 IntSize WebViewImpl::contentsSize() const 728 IntSize WebViewImpl::contentsSize() const
730 { 729 {
731 RenderView* root = page()->mainFrame()->contentRenderer(); 730 RenderView* root = page()->mainFrame()->contentRenderer();
732 if (!root) 731 if (!root)
733 return IntSize(); 732 return IntSize();
734 return root->documentRect().size(); 733 return root->documentRect().size();
735 } 734 }
736 735
737 WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point)
738 {
739 return coreHitTestResultAt(point);
740 }
741
742 HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& point)
743 {
744 IntPoint scaledPoint = point;
745 return hitTestResultForWindowPos(scaledPoint);
746 }
747
748 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers) 736 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers)
749 { 737 {
750 Vector<uint32_t> result; 738 Vector<uint32_t> result;
751 LocalFrame* frame = m_page->mainFrame(); 739 LocalFrame* frame = m_page->mainFrame();
752 const DocumentMarkerVector& documentMarkers = frame->document()->markers().m arkers(); 740 const DocumentMarkerVector& documentMarkers = frame->document()->markers().m arkers();
753 for (size_t i = 0; i < documentMarkers.size(); ++i) 741 for (size_t i = 0; i < documentMarkers.size(); ++i)
754 result.append(documentMarkers[i]->hash()); 742 result.append(documentMarkers[i]->hash());
755 markers->assign(result); 743 markers->assign(result);
756 } 744 }
757 745
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, 839 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
852 bool isInitialState) { 840 bool isInitialState) {
853 if (!page()) 841 if (!page())
854 return; 842 return;
855 843
856 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 844 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
857 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 845 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
858 } 846 }
859 847
860 } // namespace blink 848 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698