Changeset 131979 in webkit
- Timestamp:
- Oct 19, 2012, 11:05:14 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r131978 r131979 1 2012-10-19 Dan Bernstein <mitz@apple.com> 2 3 Add bundle API for hit-testing 4 https://bugs.webkit.org/show_bug.cgi?id=99907 5 6 Reviewed by Sam Weinig. 7 8 Test: TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp 9 10 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: 11 (WKBundleFrameCreateHitTestResult): Added this wrapper. 12 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: 13 * WebProcess/WebPage/WebFrame.cpp: 14 (WebKit::WebFrame::hitTest): Added. Hit tests at the given point, ignoring clipping. 15 * WebProcess/WebPage/WebFrame.h: 16 (WebFrame): Declared hitTest. 17 1 18 2012-10-19 Jinwoo Song <jinwoo7.song@samsung.com> 2 19 -
TabularUnified trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp ¶
r129743 r131979 28 28 #include "WKBundleFramePrivate.h" 29 29 30 #include "InjectedBundleHitTestResult.h" 30 31 #include "WKAPICast.h" 31 32 #include "WKBundleAPICast.h" … … 281 282 return coreFrame->loader()->shouldClose(); 282 283 } 284 285 WKBundleHitTestResultRef WKBundleFrameCreateHitTestResult(WKBundleFrameRef frameRef, WKPoint point) 286 { 287 return toAPI(toImpl(frameRef)->hitTest(toIntPoint(point)).leakRef()); 288 } -
TabularUnified trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h ¶
r128612 r131979 56 56 WK_EXPORT bool WKBundleFrameCallShouldCloseOnWebView(WKBundleFrameRef frame); 57 57 58 WK_EXPORT WKBundleHitTestResultRef WKBundleFrameCreateHitTestResult(WKBundleFrameRef frame, WKPoint point); 59 58 60 #ifdef __cplusplus 59 61 } -
TabularUnified trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp ¶
r131085 r131979 28 28 29 29 #include "DownloadManager.h" 30 #include "InjectedBundleHitTestResult.h" 30 31 #include "InjectedBundleNodeHandle.h" 31 32 #include "InjectedBundleRangeHandle.h" … … 618 619 } 619 620 621 PassRefPtr<InjectedBundleHitTestResult> WebFrame::hitTest(const IntPoint point) const 622 { 623 if (!m_coreFrame) 624 return 0; 625 626 return InjectedBundleHitTestResult::create(m_coreFrame->eventHandler()->hitTestResultAtPoint(point, false, true)); 627 } 628 620 629 bool WebFrame::getDocumentBackgroundColor(double* red, double* green, double* blue, double* alpha) 621 630 { -
TabularUnified trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h ¶
r128612 r131979 43 43 class Frame; 44 44 class HTMLFrameOwnerElement; 45 class IntPoint; 45 46 class IntRect; 46 47 #if ENABLE(WEB_INTENTS) … … 52 53 namespace WebKit { 53 54 55 class InjectedBundleHitTestResult; 54 56 class InjectedBundleNodeHandle; 55 57 class InjectedBundleRangeHandle; … … 112 114 bool hasHorizontalScrollbar() const; 113 115 bool hasVerticalScrollbar() const; 116 PassRefPtr<InjectedBundleHitTestResult> hitTest(const WebCore::IntPoint) const; 114 117 bool getDocumentBackgroundColor(double* red, double* green, double* blue, double* alpha); 115 118 bool containsAnyFormElements() const; -
TabularUnified trunk/Tools/ChangeLog ¶
r131962 r131979 1 2012-10-19 Dan Bernstein <mitz@apple.com> 2 3 Add bundle API for hit-testing 4 https://bugs.webkit.org/show_bug.cgi?id=99907 5 6 Reviewed by Sam Weinig. 7 8 Added an API test for WKBundleFrameCreateHitTest(). 9 10 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added InjectedBundleFrameHitTest.cpp, 11 InjectedBundleFrameHitTest_bundle.cpp, and link-with-title.html. 12 13 * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: Added. 14 (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Checks that the message contains the 15 title of the link in link-with-title.html. 16 (TestWebKitAPI::setInjectedBundleClient): 17 (TestWebKitAPI::TEST): 18 * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: Added. 19 (TestWebKitAPI::InjectedBundleFrameHitTestTest::InjectedBundleFrameHitTestTest): 20 (TestWebKitAPI::didFinishLoadForFrameCallback): Hit tests at (50, 50) and sends the link title 21 from the result back to the UI process. 22 (TestWebKitAPI::InjectedBundleFrameHitTestTest::didCreatePage): 23 (TestWebKitAPI::InjectedBundleFrameHitTestTest::frameLoadFinished): 24 * TestWebKitAPI/Tests/WebKit2/link-with-title.html: Added. 25 1 26 2012-10-19 Sheriff Bot <webkit.review.bot@gmail.com> 2 27 -
TabularUnified trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj ¶
r131149 r131979 43 43 3722C8691461E03E00C45D00 /* RenderedImageFromDOMRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */; }; 44 44 3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */; }; 45 378E64731632646D00B6C676 /* InjectedBundleFrameHitTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */; }; 46 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */; }; 47 378E64791632707400B6C676 /* link-with-title.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 378E647816326FDF00B6C676 /* link-with-title.html */; }; 45 48 379028B614FABD92007E6B43 /* AcceptsFirstMouse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 379028B514FABD92007E6B43 /* AcceptsFirstMouse.mm */; }; 46 49 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */; }; … … 224 227 1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */, 225 228 C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */, 229 378E64791632707400B6C676 /* link-with-title.html in Copy Resources */, 226 230 9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */, 227 231 93AF4ED11506F130007FD57E /* lots-of-images.html in Copy Resources */, … … 280 284 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMRange.mm; sourceTree = "<group>"; }; 281 285 3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorInDashboardRegions.mm; sourceTree = "<group>"; }; 286 378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest.cpp; sourceTree = "<group>"; }; 287 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest_Bundle.cpp; sourceTree = "<group>"; }; 288 378E647816326FDF00B6C676 /* link-with-title.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "link-with-title.html"; sourceTree = "<group>"; }; 282 289 379028B514FABD92007E6B43 /* AcceptsFirstMouse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AcceptsFirstMouse.mm; sourceTree = "<group>"; }; 283 290 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = acceptsFirstMouse.html; sourceTree = "<group>"; }; … … 593 600 BC575AAC126E83B9006F0F12 /* InjectedBundleBasic.cpp */, 594 601 BC575AAF126E83C8006F0F12 /* InjectedBundleBasic_Bundle.cpp */, 602 378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */, 603 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */, 595 604 F660AA1215A619C8003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp */, 596 605 F660AA1415A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp */, … … 671 680 children = ( 672 681 C045F9461385C2F800C0F3CD /* 18-characters.html */, 682 76E182DE15475A8300F1FADD /* auto-submitting-form.html */, 673 683 BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */, 674 684 1A02C84B125D4A5E00E3F4BD /* find.html */, 675 685 BCBD372E125ABBE600D2C29F /* icon.png */, 686 378E647816326FDF00B6C676 /* link-with-title.html */, 676 687 9361002814DC957B0061379D /* lots-of-iframes.html */, 677 688 93AF4ECF1506F123007FD57E /* lots-of-images.html */, … … 685 696 BC909778125571AB00083756 /* simple.html */, 686 697 C02B7882126615410026BF0F /* spacebar-scrolling.html */, 687 76E182DE15475A8300F1FADD /* auto-submitting-form.html */,688 698 ); 689 699 name = Resources; … … 996 1006 2943BE86161DFEB800999E3D /* UserContentTest.mm in Sources */, 997 1007 4F4D2C0E1626FE2700320FE1 /* MemoryInstrumentationTest.cpp in Sources */, 1008 378E64731632646D00B6C676 /* InjectedBundleFrameHitTest.cpp in Sources */, 998 1009 ); 999 1010 runOnlyForDeploymentPostprocessing = 0; … … 1030 1041 F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */, 1031 1042 F660AA1515A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp in Sources */, 1043 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */, 1032 1044 ); 1033 1045 runOnlyForDeploymentPostprocessing = 0;
Note:
See TracChangeset
for help on using the changeset viewer.