Changeset 69862 in webkit
- Timestamp:
- Oct 15, 2010 10:27:12 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 19 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r69861 r69862 1 2010-10-13 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add a FindIndicator class 6 https://bugs.webkit.org/show_bug.cgi?id=47635 7 8 Make Gradient.h and Generator.h private headers; they're used by WebKit2. 9 10 * WebCore.xcodeproj/project.pbxproj: 11 1 12 2010-10-15 Sergio Villar Senin <svillar@igalia.com> 2 13 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r69844 r69862 4752 4752 BC5157DD0C03BC22008BB0EE /* DOMHTMLFrameElementPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5156F30C03B7DC008BB0EE /* DOMHTMLFrameElementPrivate.h */; }; 4753 4753 BC51580B0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC51580A0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp */; }; 4754 BC53C5F50DA56B920021EB5D /* Gradient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC53C5F40DA56B920021EB5D /* Gradient.h */; };4754 BC53C5F50DA56B920021EB5D /* Gradient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC53C5F40DA56B920021EB5D /* Gradient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4755 4755 BC53C6080DA56C570021EB5D /* Gradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC53C6070DA56C570021EB5D /* Gradient.cpp */; }; 4756 4756 BC53C60B0DA56CF10021EB5D /* GradientCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */; }; … … 5061 5061 BCE0139A0C0BEF180043860A /* JSStyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE013980C0BEF180043860A /* JSStyleSheet.cpp */; }; 5062 5062 BCE0139B0C0BEF180043860A /* JSStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE013990C0BEF180043860A /* JSStyleSheet.h */; }; 5063 BCE04C8A0DAFF7A0007A0F41 /* Generator.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE04C890DAFF7A0007A0F41 /* Generator.h */; };5063 BCE04C8A0DAFF7A0007A0F41 /* Generator.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE04C890DAFF7A0007A0F41 /* Generator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5064 5064 BCE04C940DAFF902007A0F41 /* GeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE04C930DAFF902007A0F41 /* GeneratedImage.cpp */; }; 5065 5065 BCE1C41B0D982980003B02F2 /* Location.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE1C4190D982980003B02F2 /* Location.h */; }; -
trunk/WebKit2/ChangeLog
r69826 r69862 1 2010-10-13 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add a FindIndicator class 6 https://bugs.webkit.org/show_bug.cgi?id=47635 7 8 * Shared/BackingStore.h: 9 (WebKit::BackingStore::bounds): 10 New function that returns the bounds of the backing store. 11 12 * UIProcess/API/mac/PageClientImpl.mm: 13 (WebKit::PageClientImpl::setFindIndicator): 14 Add stub. 15 16 * UIProcess/API/qt/qwkpage.cpp: 17 (QWKPagePrivate::setFindIndicator): 18 Add stub. 19 20 * UIProcess/FindIndicator.cpp: Added. 21 * UIProcess/FindIndicator.h: 22 23 * UIProcess/PageClient.h: 24 Add setFindIndicator client member function. 25 26 * UIProcess/WebPageProxy.cpp: 27 (WebKit::WebPageProxy::setFindIndicator): 28 Call PageClient::setFindIndicator. 29 30 * UIProcess/WebPageProxy.messages.in: 31 Add a fadeOut boolean to the message. 32 33 * UIProcess/win/WebView.cpp: 34 (WebKit::WebView::setFindIndicator): 35 Add stub. 36 37 * UIProcess/win/WebView.h: 38 * WebKit2.pro: 39 * WebKit2.xcodeproj/project.pbxproj: 40 * WebProcess/WebPage/FindController.cpp: 41 (WebKit::FindController::findString): 42 (WebKit::FindController::updateFindIndicator): 43 (WebKit::FindController::resetFindIndicator): 44 * WebProcess/WebPage/FindController.h: 45 * win/WebKit2.vcproj: 46 1 47 2010-10-14 Simon Fraser <simon.fraser@apple.com> 2 48 -
trunk/WebKit2/Shared/BackingStore.h
r69687 r69862 28 28 29 29 #include "SharedMemory.h" 30 #include <WebCore/Int Size.h>30 #include <WebCore/IntRect.h> 31 31 #include <wtf/PassOwnPtr.h> 32 32 #include <wtf/PassRefPtr.h> … … 36 36 namespace WebCore { 37 37 class GraphicsContext; 38 class IntRect;39 38 } 40 39 … … 58 57 59 58 const WebCore::IntSize& size() const { return m_size; } 59 WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); } 60 60 61 bool resize(const WebCore::IntSize& size); 61 62 -
trunk/WebKit2/UIProcess/API/mac/PageClientImpl.h
r69788 r69862 63 63 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&); 64 64 65 void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut); 66 65 67 #if USE(ACCELERATED_COMPOSITING) 66 68 void pageDidEnterAcceleratedCompositing(); -
trunk/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r69788 r69862 226 226 } 227 227 228 void PageClientImpl::setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut) 229 { 230 // FIXME: Implement. 231 } 232 228 233 #if USE(ACCELERATED_COMPOSITING) 229 234 void PageClientImpl::pageDidEnterAcceleratedCompositing() -
trunk/WebKit2/UIProcess/API/qt/qwkpage.cpp
r69788 r69862 110 110 111 111 void QWKPagePrivate::didNotHandleKeyEvent(const NativeWebKeyboardEvent&) 112 { 113 } 114 115 void QWKPagePrivate::setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut) 112 116 { 113 117 } -
trunk/WebKit2/UIProcess/API/qt/qwkpage_p.h
r69788 r69862 61 61 virtual void didNotHandleKeyEvent(const WebKit::NativeWebKeyboardEvent&); 62 62 63 virtual void setFindIndicator(PassRefPtr<WebKit::FindIndicator>, bool fadeOut); 64 63 65 void paint(QPainter* painter, QRect); 64 66 -
trunk/WebKit2/UIProcess/FindIndicator.h
r69861 r69862 24 24 */ 25 25 26 #ifndef Find Controller_h27 #define Find Controller_h26 #ifndef FindIndicator_h 27 #define FindIndicator_h 28 28 29 #include "FindOptions.h" 30 #include <wtf/Forward.h> 31 #include <wtf/Noncopyable.h> 29 #include "SharedMemory.h" 30 #include <WebCore/FloatRect.h> 31 #include <wtf/PassRefPtr.h> 32 #include <wtf/RefCounted.h> 33 #include <wtf/Vector.h> 32 34 33 35 namespace WebCore { 34 class Frame;36 class GraphicsContext; 35 37 } 36 38 37 39 namespace WebKit { 38 40 39 class FindPageOverlay; 40 class WebPage; 41 class BackingStore; 41 42 42 class FindController { 43 WTF_MAKE_NONCOPYABLE(FindController); 43 class FindIndicator : public RefCounted<FindIndicator> { 44 public: 45 static PassRefPtr<FindIndicator> create(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle); 46 ~FindIndicator(); 44 47 45 public: 46 explicit FindController(WebPage*); 48 WebCore::FloatRect frameRect() const; 47 49 48 void findString(const String&, FindDirection, FindOptions, unsigned maxNumMatches); 49 void hideFindUI(); 50 const Vector<WebCore::FloatRect>& textRects() const { return m_textRects; } 50 51 51 void findPageOverlayDestroyed(); 52 BackingStore* contentImage() const { return m_contentImage.get(); } 53 54 void draw(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect); 52 55 53 56 private: 54 bool updateFindIndicator(WebCore::Frame* selectedFrame); 55 void resetFindIndicator(); 56 57 WebPage* m_webPage; 58 FindPageOverlay* m_findPageOverlay; 57 FindIndicator(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, PassRefPtr<BackingStore> contentImage); 59 58 60 // Whether the UI process is showing the find indicator. Note that this can be true even if61 // the find indicator isn't showing, but it will never be false when it is showing.62 bool m_isShowingFindIndicator;59 WebCore::FloatRect m_selectionRect; 60 Vector<WebCore::FloatRect> m_textRects; 61 RefPtr<BackingStore> m_contentImage; 63 62 }; 64 63 65 64 } // namespace WebKit 66 65 67 #endif // Find Controller_h66 #endif // FindIndicator_h -
trunk/WebKit2/UIProcess/PageClient.h
r69788 r69862 37 37 namespace WebKit { 38 38 39 class FindIndicator; 39 40 class NativeWebKeyboardEvent; 40 41 class WebEditCommandProxy; … … 62 63 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&) = 0; 63 64 65 virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut) = 0; 66 64 67 #if USE(ACCELERATED_COMPOSITING) 65 68 virtual void pageDidEnterAcceleratedCompositing() = 0; -
trunk/WebKit2/UIProcess/WebPageProxy.cpp
r69788 r69862 27 27 28 28 #include "DrawingAreaProxy.h" 29 #include "FindIndicator.h" 29 30 #include "MessageID.h" 30 31 #include "NativeWebKeyboardEvent.h" … … 957 958 } 958 959 959 void WebPageProxy::setFindIndicator(const FloatRect& selectionRect, const Vector<FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle) 960 { 961 // FIXME: Implement. 960 void WebPageProxy::setFindIndicator(const FloatRect& selectionRect, const Vector<FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle, bool fadeOut) 961 { 962 RefPtr<FindIndicator> findIndicator = FindIndicator::create(selectionRect, textRects, contentImageHandle); 963 m_pageClient->setFindIndicator(findIndicator.release(), fadeOut); 962 964 } 963 965 -
trunk/WebKit2/UIProcess/WebPageProxy.h
r69689 r69862 283 283 // Find. 284 284 void didCountStringMatches(const String&, uint32_t numMatches); 285 void setFindIndicator(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle );285 void setFindIndicator(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, const SharedMemory::Handle& contentImageHandle, bool fadeOut); 286 286 287 287 void takeFocus(bool direction); -
trunk/WebKit2/UIProcess/WebPageProxy.messages.in
r69689 r69862 94 94 # Find. 95 95 DidCountStringMatches(WTF::String string, uint32_t numMatches) 96 SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle )96 SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut) 97 97 98 98 #if USE(ACCELERATED_COMPOSITING) -
trunk/WebKit2/UIProcess/win/WebView.cpp
r69788 r69862 609 609 } 610 610 611 void WebView::setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut) 612 { 613 // FIXME: Implement. 614 } 615 611 616 #if USE(ACCELERATED_COMPOSITING) 612 617 void WebView::pageDidEnterAcceleratedCompositing() -
trunk/WebKit2/UIProcess/win/WebView.h
r69788 r69862 103 103 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&); 104 104 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&); 105 virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut); 105 106 106 107 #if USE(ACCELERATED_COMPOSITING) -
trunk/WebKit2/WebKit2.pro
r69687 r69862 241 241 UIProcess/ChunkedUpdateDrawingAreaProxy.h \ 242 242 UIProcess/DrawingAreaProxy.h \ 243 UIProcess/FindIndicator.h \ 243 244 UIProcess/GenericCallback.h \ 244 245 UIProcess/Launcher/ProcessLauncher.h \ … … 377 378 UIProcess/ChunkedUpdateDrawingAreaProxy.cpp \ 378 379 UIProcess/DrawingAreaProxy.cpp \ 380 UIProcess/FindIndicator.cpp \ 379 381 UIProcess/Plugins/PluginInfoStore.cpp \ 380 382 UIProcess/Plugins/qt/PluginInfoStoreQt.cpp \ -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r69677 r69862 127 127 1A90C2A312650C60003E44D4 /* FindPageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A90C2A112650C60003E44D4 /* FindPageOverlay.h */; }; 128 128 1A90C2A412650C60003E44D4 /* FindPageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A90C2A212650C60003E44D4 /* FindPageOverlay.cpp */; }; 129 1A910071126675C4001842F5 /* FindIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A91006F126675C3001842F5 /* FindIndicator.h */; }; 130 1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A910070126675C4001842F5 /* FindIndicator.cpp */; }; 129 131 1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; }; 130 132 1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; }; … … 592 594 1A90C2A112650C60003E44D4 /* FindPageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindPageOverlay.h; sourceTree = "<group>"; }; 593 595 1A90C2A212650C60003E44D4 /* FindPageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindPageOverlay.cpp; sourceTree = "<group>"; }; 596 1A91006F126675C3001842F5 /* FindIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindIndicator.h; sourceTree = "<group>"; }; 597 1A910070126675C4001842F5 /* FindIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindIndicator.cpp; sourceTree = "<group>"; }; 594 598 1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 595 599 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 1354 1358 BC2652121182608100243E12 /* DrawingAreaProxy.cpp */, 1355 1359 BC2652131182608100243E12 /* DrawingAreaProxy.h */, 1360 1A910070126675C4001842F5 /* FindIndicator.cpp */, 1361 1A91006F126675C3001842F5 /* FindIndicator.h */, 1356 1362 BC17753E118BABF0007D9E9A /* GenericCallback.h */, 1357 1363 0F5265B711DD377F0006D33C /* LayerBackedDrawingAreaProxy.cpp */, … … 2028 2034 1A90C23712650717003E44D4 /* PageOverlay.h in Headers */, 2029 2035 1A90C2A312650C60003E44D4 /* FindPageOverlay.h in Headers */, 2036 1A910071126675C4001842F5 /* FindIndicator.h in Headers */, 2030 2037 ); 2031 2038 runOnlyForDeploymentPostprocessing = 0; … … 2334 2341 1A90C2A412650C60003E44D4 /* FindPageOverlay.cpp in Sources */, 2335 2342 C01A260112662F2100C9ED55 /* BackingStoreCG.cpp in Sources */, 2343 1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */, 2336 2344 ); 2337 2345 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/WebPage/FindController.cpp
r69689 r69862 88 88 } 89 89 90 if (!(findOptions & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame )) {90 if (!(findOptions & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) { 91 91 // Either we shouldn't show the find indicator, or we couldn't update it. 92 92 resetFindIndicator(); … … 125 125 } 126 126 127 bool FindController::updateFindIndicator(Frame* selectedFrame )127 bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOverlay) 128 128 { 129 129 if (!selectedFrame) … … 163 163 } 164 164 165 WebProcess::shared().connection()->send(Messages::WebPageProxy::SetFindIndicator(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, handle ), m_webPage->pageID());165 WebProcess::shared().connection()->send(Messages::WebPageProxy::SetFindIndicator(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, handle, !isShowingOverlay), m_webPage->pageID()); 166 166 m_isShowingFindIndicator = true; 167 167 … … 175 175 176 176 SharedMemory::Handle handle; 177 WebProcess::shared().connection()->send(Messages::WebPageProxy::SetFindIndicator(FloatRect(), Vector<FloatRect>(), handle ), m_webPage->pageID());177 WebProcess::shared().connection()->send(Messages::WebPageProxy::SetFindIndicator(FloatRect(), Vector<FloatRect>(), handle, false), m_webPage->pageID()); 178 178 m_isShowingFindIndicator = false; 179 179 } -
trunk/WebKit2/WebProcess/WebPage/FindController.h
r69689 r69862 52 52 53 53 private: 54 bool updateFindIndicator(WebCore::Frame* selectedFrame );54 bool updateFindIndicator(WebCore::Frame* selectedFrame, bool isShowingOverlay); 55 55 void resetFindIndicator(); 56 56 -
trunk/WebKit2/win/WebKit2.vcproj
r69692 r69862 1502 1502 </File> 1503 1503 <File 1504 RelativePath="..\UIProcess\FindIndicator.cpp" 1505 > 1506 </File> 1507 <File 1508 RelativePath="..\UIProcess\FindIndicator.h" 1509 > 1510 </File> 1511 <File 1504 1512 RelativePath="..\UIProcess\GenericCallback.h" 1505 1513 >
Note: See TracChangeset
for help on using the changeset viewer.