summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm')
-rw-r--r--WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm36
1 files changed, 0 insertions, 36 deletions
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index be3eb09..e3f2141 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -583,42 +583,6 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
[[mainFrame webView] _executeCoreCommandByName:nameNS value:valueNS];
}
-bool LayoutTestController::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
-{
- WebFindOptions options = 0;
-
- JSRetainPtr<JSStringRef> lengthPropertyName(Adopt, JSStringCreateWithUTF8CString("length"));
- JSValueRef lengthValue = JSObjectGetProperty(context, optionsArray, lengthPropertyName.get(), 0);
- if (!JSValueIsNumber(context, lengthValue))
- return false;
-
- RetainPtr<CFStringRef> targetCFString(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, target));
-
- size_t length = static_cast<size_t>(JSValueToNumber(context, lengthValue, 0));
- for (size_t i = 0; i < length; ++i) {
- JSValueRef value = JSObjectGetPropertyAtIndex(context, optionsArray, i, 0);
- if (!JSValueIsString(context, value))
- continue;
-
- JSRetainPtr<JSStringRef> optionName(Adopt, JSValueToStringCopy(context, value, 0));
-
- if (JSStringIsEqualToUTF8CString(optionName.get(), "CaseInsensitive"))
- options |= WebFindOptionsCaseInsensitive;
- else if (JSStringIsEqualToUTF8CString(optionName.get(), "AtWordStarts"))
- options |= WebFindOptionsAtWordStarts;
- else if (JSStringIsEqualToUTF8CString(optionName.get(), "TreatMedialCapitalAsWordStart"))
- options |= WebFindOptionsTreatMedialCapitalAsWordStart;
- else if (JSStringIsEqualToUTF8CString(optionName.get(), "Backwards"))
- options |= WebFindOptionsBackwards;
- else if (JSStringIsEqualToUTF8CString(optionName.get(), "WrapAround"))
- options |= WebFindOptionsWrapAround;
- else if (JSStringIsEqualToUTF8CString(optionName.get(), "StartInSelection"))
- options |= WebFindOptionsStartInSelection;
- }
-
- return [[mainFrame webView] findString:(NSString *)targetCFString.get() options:options];
-}
-
void LayoutTestController::setCacheModel(int cacheModel)
{
[[WebPreferences standardPreferences] setCacheModel:cacheModel];