Lines Matching full:context
84 static JSValueRef dumpAsPDFCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
88 return JSValueMakeUndefined(context);
91 static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
95 return JSValueMakeUndefined(context);
98 static JSValueRef dumpBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
102 return JSValueMakeUndefined(context);
105 static JSValueRef dumpChildFramesAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
109 return JSValueMakeUndefined(context);
112 static JSValueRef dumpChildFrameScrollPositionsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
116 return JSValueMakeUndefined(context);
119 static JSValueRef dumpDatabaseCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
123 return JSValueMakeUndefined(context);
126 static JSValueRef dumpDOMAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
130 return JSValueMakeUndefined(context);
133 static JSValueRef dumpEditingCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
137 return JSValueMakeUndefined(context);
140 static JSValueRef dumpFrameLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
144 return JSValueMakeUndefined(context);
147 static JSValueRef dumpResourceLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
151 return JSValueMakeUndefined(context);
154 static JSValueRef dumpResourceResponseMIMETypesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
158 return JSValueMakeUndefined(context);
161 static JSValueRef dumpSelectionRectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
165 return JSValueMakeUndefined(context);
168 static JSValueRef dumpSourceAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
172 return JSValueMakeUndefined(context);
175 static JSValueRef dumpStatusCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
179 return JSValueMakeUndefined(context);
182 static JSValueRef dumpTitleChangesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
186 return JSValueMakeUndefined(context);
189 static JSValueRef dumpWillCacheResponseCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
193 return JSValueMakeUndefined(context);
196 static JSValueRef pathToLocalResourceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
199 return JSValueMakeUndefined(context);
202 JSRetainPtr<JSStringRef> localPath(Adopt, JSValueToStringCopy(context, arguments[0], exception));
205 JSRetainPtr<JSStringRef> convertedPath(Adopt, controller->pathToLocalResource(context, localPath.get()));
207 return JSValueMakeUndefined(context);
209 return JSValueMakeString(context, convertedPath.get());
212 static JSValueRef removeAllVisitedLinksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
217 return JSValueMakeUndefined(context);
220 static JSValueRef repaintSweepHorizontallyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
224 return JSValueMakeUndefined(context);
227 static JSValueRef setCallCloseOnWebViewsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
230 return JSValueMakeUndefined(context);
233 controller->setCallCloseOnWebViews(JSValueToBoolean(context, arguments[0]));
234 return JSValueMakeUndefined(context);
237 static JSValueRef setCanOpenWindowsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
241 return JSValueMakeUndefined(context);
244 static JSValueRef setCloseRemainingWindowsWhenCompleteCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
247 return JSValueMakeUndefined(context);
250 controller->setCloseRemainingWindowsWhenComplete(JSValueToBoolean(context, arguments[0]));
251 return JSValueMakeUndefined(context);
254 static JSValueRef testOnscreenCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
258 return JSValueMakeUndefined(context);
261 static JSValueRef testRepaintCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
265 return JSValueMakeUndefined(context);
268 static JSValueRef addDisallowedURLCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
272 return JSValueMakeUndefined(context);
274 JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
280 return JSValueMakeUndefined(context);
283 static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
289 return JSValueMakeUndefined(context);
292 static JSValueRef clearBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
298 return JSValueMakeUndefined(context);
301 static JSValueRef clearPersistentUserStyleSheetCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
307 return JSValueMakeUndefined(context);
310 static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
314 return JSValueMakeUndefined(context);
316 JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
321 return JSValueMakeString(context, decodedHostName.get());
324 static JSValueRef disableImageLoadingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
330 context);
333 static JSValueRef dispatchPendingLoadRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
339 return JSValueMakeUndefined(context);
342 static JSValueRef displayCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
348 return JSValueMakeUndefined(context);
351 static JSValueRef encodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
355 return JSValueMakeUndefined(context);
357 JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
362 return JSValueMakeString(context, encodedHostName.get());
365 static JSValueRef execCommandCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
369 return JSValueMakeUndefined(context);
371 JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
378 value.adopt(JSValueToStringCopy(context, arguments[2], exception));
387 return JSValueMakeUndefined(context);
390 static JSValueRef counterValueForElementByIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
393 return JSValueMakeUndefined(context);
395 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
397 return JSValueMakeUndefined(context);
402 return JSValueMakeUndefined(context);
403 return JSValueMakeString(context, counterValue.get());
406 static JSValueRef grantDesktopNotificationPermissionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
410 return JSValueMakeUndefined(context);
414 controller->grantDesktopNotificationPermission(JSValueToStringCopy(context, arguments[0], NULL));
416 return JSValueMakeUndefined(context);
419 static JSValueRef isCommandEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
424 return JSValueMakeUndefined(context);
426 JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
431 return JSValueMakeBoolean(context, controller->isCommandEnabled(name.get()));
434 static JSValueRef overridePreferenceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
437 return JSValueMakeUndefined(context);
439 JSRetainPtr<JSStringRef> key(Adopt, JSValueToStringCopy(context, arguments[0], exception));
441 JSRetainPtr<JSStringRef> value(Adopt, JSValueToStringCopy(context, arguments[1], exception));
447 return JSValueMakeUndefined(context);
450 static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
456 return JSValueMakeUndefined(context);
459 static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
465 return JSValueMakeUndefined(context);
468 static bool parsePageParameters(JSContextRef context, int argumentCount, const JSValueRef* arguments, JSValueRef* exception, float& pageWidthInPixels, float& pageHeightInPixels)
476 pageWidthInPixels = static_cast<float>(JSValueToNumber(context, arguments[0], exception));
479 pageHeightInPixels = static_cast<float>(JSValueToNumber(context, arguments[1], exception));
490 static JSValueRef pageNumberForElementByIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
494 if (!parsePageParameters(context, argumentCount - 1, arguments + 1, exception, pageWidthInPixels, pageHeightInPixels))
495 return JSValueMakeUndefined(context);
497 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
499 return JSValueMakeUndefined(context);
503 return JSValueMakeNumber(context, pageNumber);
506 static JSValueRef numberOfPagesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
510 if (!parsePageParameters(context, argumentCount, arguments, exception, pageWidthInPixels, pageHeightInPixels))
511 return JSValueMakeUndefined(context);
514 return JSValueMakeNumber(context, controller->numberOfPages(pageWidthInPixels, pageHeightInPixels));
517 static JSValueRef queueBackNavigationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
522 return JSValueMakeUndefined(context);
524 double howFarBackDouble = JSValueToNumber(context, arguments[0], exception);
530 return JSValueMakeUndefined(context);
533 static JSValueRef queueForwardNavigationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
538 return JSValueMakeUndefined(context);
540 double howFarForwardDouble = JSValueToNumber(context, arguments[0], exception);
546 return JSValueMakeUndefined(context);
549 static JSValueRef queueLoadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
554 return JSValueMakeUndefined(context);
556 JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
561 target.adopt(JSValueToStringCopy(context, arguments[1], exception));
569 return JSValueMakeUndefined(context);
572 static JSValueRef queueReloadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
580 return JSValueMakeUndefined(context);
583 static JSValueRef queueLoadingScriptCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
588 return JSValueMakeUndefined(context);
590 JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[0], exception));
596 return JSValueMakeUndefined(context);
599 static JSValueRef queueNonLoadingScriptCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
604 return JSValueMakeUndefined(context);
606 JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[0], exception));
612 return JSValueMakeUndefined(context);
615 static JSValueRef setAcceptsEditingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
619 return JSValueMakeUndefined(context);
622 controller->setAcceptsEditing(JSValueToBoolean(context, arguments[0]));
624 return JSValueMakeUndefined(context);
627 static JSValueRef setAlwaysAcceptCookiesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
631 return JSValueMakeUndefined(context);
634 controller->setAlwaysAcceptCookies(JSValueToBoolean(context, arguments[0]));
636 return JSValueMakeUndefined(context);
639 static JSValueRef setAppCacheMaximumSizeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
643 return JSValueMakeUndefined(context);
647 double size = JSValueToNumber(context, arguments[0], NULL);
651 return JSValueMakeUndefined(context);
655 static JSValueRef setAuthenticationPasswordCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
659 return JSValueMakeUndefined(context);
661 JSRetainPtr<JSStringRef> password(Adopt, JSValueToStringCopy(context, arguments[0], exception));
672 return JSValueMakeUndefined(context);
675 static JSValueRef setAuthenticationUsernameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
679 return JSValueMakeUndefined(context);
681 JSRetainPtr<JSStringRef> username(Adopt, JSValueToStringCopy(context, arguments[0], exception));
692 return JSValueMakeUndefined(context);
695 static JSValueRef setAuthorAndUserStylesEnabledCallback(JSContextRef context
699 return JSValueMakeUndefined(context);
702 controller->setAuthorAndUserStylesEnabled(JSValueToBoolean(context, arguments[0]));
704 return JSValueMakeUndefined(context);
707 static JSValueRef setCacheModelCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
711 return JSValueMakeUndefined(context);
713 int cacheModel = JSValueToNumber(context, arguments[0], exception);
719 return JSValueMakeUndefined(context);
722 static JSValueRef setCustomPolicyDelegateCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
726 return JSValueMakeUndefined(context);
730 permissive = JSValueToBoolean(context, arguments[1]);
733 controller->setCustomPolicyDelegate(JSValueToBoolean(context, arguments[0]), permissive);
735 return JSValueMakeUndefined(context);
738 static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
742 return JSValueMakeUndefined(context);
746 double quota = JSValueToNumber(context, arguments[0], NULL);
750 return JSValueMakeUndefined(context);
753 static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
757 return JSValueMakeUndefined(context);
761 bool forbidden = JSValueToBoolean(context, arguments[0]);
762 JSRetainPtr<JSStringRef> scheme(Adopt, JSValueToStringCopy(context, arguments[1], 0));
765 return JSValueMakeUndefined(context);
768 static JSValueRef setMockGeolocationPositionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
771 return JSValueMakeUndefined(context);
774 controller->setMockGeolocationPosition(JSValueToNumber(context, arguments[0], NULL), // latitude
775 JSValueToNumber(context, arguments[1], NULL), // longitude
776 JSValueToNumber(context, arguments[2], NULL)); // accuracy
778 return JSValueMakeUndefined(context);
781 static JSValueRef setMockGeolocationErrorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
784 return JSValueMakeUndefined(context);
786 int code = JSValueToNumber(context, arguments[0], NULL);
787 JSRetainPtr<JSStringRef> message(Adopt, JSValueToStringCopy(context, arguments[1], exception));
793 return JSValueMakeUndefined(context);
796 static JSValueRef setNewWindowsCopyBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
800 return JSValueMakeUndefined(context);
803 controller->setNewWindowsCopyBackForwardList(JSValueToBoolean(context, arguments[0]));
805 return JSValueMakeUndefined(context);
808 static JSValueRef setGeolocationPermissionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
812 return JSValueMakeUndefined(context);
815 controller->setGeolocationPermission(JSValueToBoolean(context, arguments[0]));
817 return JSValueMakeUndefined(context);
820 static JSValueRef setHandlesAuthenticationChallengesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
824 return JSValueMakeUndefined(context);
827 controller->setHandlesAuthenticationChallenges(JSValueToBoolean(context, arguments[0]));
829 return JSValueMakeUndefined(context);
832 static JSValueRef setPOSIXLocaleCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
835 return JSValueMakeUndefined(context);
838 JSRetainPtr<JSStringRef> locale(Adopt, JSValueToStringCopy(context, arguments[0], exception));
842 return JSValueMakeUndefined(context);
845 static JSValueRef setIconDatabaseEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
849 return JSValueMakeUndefined(context);
852 controller->setIconDatabaseEnabled(JSValueToBoolean(context, arguments[0]));
854 return JSValueMakeUndefined(context);
857 static JSValueRef setJavaScriptProfilingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
860 return JSValueMakeUndefined(context);
863 controller->setJavaScriptProfilingEnabled(JSValueToBoolean(context, arguments[0]));
865 return JSValueMakeUndefined(context);
868 static JSValueRef setMainFrameIsFirstResponderCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
872 return JSValueMakeUndefined(context);
875 controller->setMainFrameIsFirstResponder(JSValueToBoolean(context, arguments[0]));
877 return JSValueMakeUndefined(context);
880 static JSValueRef setPersistentUserStyleSheetLocationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
884 return JSValueMakeUndefined(context);
886 JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
892 return JSValueMakeUndefined(context);
895 static JSValueRef setPrivateBrowsingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
899 return JSValueMakeUndefined(context);
902 controller->setPrivateBrowsingEnabled(JSValueToBoolean(context, arguments[0]));
904 return JSValueMakeUndefined(context);
907 static JSValueRef setXSSAuditorEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
911 return JSValueMakeUndefined(context);
914 controller->setXSSAuditorEnabled(JSValueToBoolean(context, arguments[0]));
916 return JSValueMakeUndefined(context);
919 static JSValueRef setFrameSetFlatteningEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
923 return JSValueMakeUndefined(context);
926 controller->setFrameSetFlatteningEnabled(JSValueToBoolean(context, arguments[0]));
928 return JSValueMakeUndefined(context);
931 static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
935 return JSValueMakeUndefined(context);
938 controller->setAllowUniversalAccessFromFileURLs(JSValueToBoolean(context, arguments[0]));
940 return JSValueMakeUndefined(context);
943 static JSValueRef setTabKeyCyclesThroughElementsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
947 return JSValueMakeUndefined(context);
950 controller->setTabKeyCyclesThroughElements(JSValueToBoolean(context, arguments[0]));
952 return JSValueMakeUndefined(context);
955 static JSValueRef setTimelineProfilingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
958 return JSValueMakeUndefined(context);
961 controller->setTimelineProfilingEnabled(JSValueToBoolean(context, arguments[0]));
962 return JSValueMakeUndefined(context);
965 static JSValueRef setUseDashboardCompatibilityModeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
969 return JSValueMakeUndefined(context);
972 controller->setUseDashboardCompatibilityMode(JSValueToBoolean(context, arguments[0]));
974 return JSValueMakeUndefined(context);
977 static JSValueRef setUserStyleSheetEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
981 return JSValueMakeUndefined(context);
984 controller->setUserStyleSheetEnabled(JSValueToBoolean(context, arguments[0]));
986 return JSValueMakeUndefined(context);
989 static JSValueRef setUserStyleSheetLocationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
993 return JSValueMakeUndefined(context);
995 JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1001 return JSValueMakeUndefined(context);
1004 static JSValueRef setWillSendRequestReturnsNullCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1008 return JSValueMakeUndefined(context);
1011 controller->setWillSendRequestReturnsNull(JSValueToBoolean(context, arguments[0]));
1013 return JSValueMakeUndefined(context);
1016 static JSValueRef setWillSendRequestReturnsNullOnRedirectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1020 return JSValueMakeUndefined(context);
1023 controller->setWillSendRequestReturnsNullOnRedirect(JSValueToBoolean(context, arguments[0]));
1025 return JSValueMakeUndefined(context);
1028 static JSValueRef setWindowIsKeyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1032 return JSValueMakeUndefined(context);
1035 controller->setWindowIsKey(JSValueToBoolean(context, arguments[0]));
1037 return JSValueMakeUndefined(context);
1040 static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1046 return JSValueMakeUndefined(context);
1049 static JSValueRef windowCountCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1054 return JSValueMakeNumber(context, windows);
1057 context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1061 return JSValueMakeUndefined(context);
1064 controller->setPopupBlockingEnabled(JSValueToBoolean(context, arguments[0]));
1066 return JSValueMakeUndefined(context);
1069 static JSValueRef setSmartInsertDeleteEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1072 return JSValueMakeUndefined(context);
1075 controller->setSmartInsertDeleteEnabled(JSValueToBoolean(context, arguments[0]));
1076 return JSValueMakeUndefined(context);
1079 static JSValueRef setSelectTrailingWhitespaceEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1082 return JSValueMakeUndefined(context);
1085 controller->setSelectTrailingWhitespaceEnabled(JSValueToBoolean(context, arguments[0]));
1086 return JSValueMakeUndefined(context);
1089 static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1093 return JSValueMakeUndefined(context);
1096 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1100 return JSValueMakeUndefined(context);
1103 static JSValueRef closeWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1108 return JSValueMakeUndefined(context);
1111 static JSValueRef evaluateInWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1114 double callId = JSValueToNumber(context, arguments[0], exception);
1116 JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception));
1120 return JSValueMakeUndefined(context);
1123 static JSValueRef evaluateScriptInIsolatedWorldCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1126 double worldID = JSValueToNumber(context, arguments[0], exception);
1128 JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception));
1131 controller->evaluateScriptInIsolatedWorld(static_cast<unsigned>(worldID), JSContextGetGlobalObject(context), script.get());
1132 return JSValueMakeUndefined(context);
1135 static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1138 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1143 return JSValueMakeBoolean(context, autoCompletes);
1146 static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1149 return JSValueMakeUndefined(context);
1151 JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1153 double time = JSValueToNumber(context, arguments[1], exception);
1155 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
1159 return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
1162 static JSValueRef pauseTransitionAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1165 return JSValueMakeUndefined(context);
1167 JSRetainPtr<JSStringRef> propertyName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1169 double time = JSValueToNumber(context, arguments[1], exception);
1171 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
1175 return JSValueMakeBoolean(context, controller->pauseTransitionAtTimeOnElementWithId(propertyName.get(), time, elementId.get()));
1178 static JSValueRef sampleSVGAnimationForElementAtTimeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1181 return JSValueMakeUndefined(context);
1183 JSRetainPtr<JSStringRef> animationId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1185 double time = JSValueToNumber(context, arguments[1], exception);
1187 JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
1191 return JSValueMakeBoolean(context, controller->sampleSVGAnimationForElementAtTime(animationId.get(), time, elementId.get()));
1194 static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1197 return JSValueMakeUndefined(context);
1200 return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
1203 static JSValueRef waitForPolicyDelegateCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
1207 return JSValueMakeUndefined(context);
1210 static JSValueRef whiteListAccessFromOriginCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1213 return JSValueMakeUndefined(context);
1215 JSRetainPtr<JSStringRef> sourceOrigin(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1217 JSRetainPtr<JSStringRef> destinationProtocol(Adopt, JSValueToStringCopy(context, arguments[1], exception));
1219 JSRetainPtr<JSStringRef> destinationHost(Adopt, JSValueToStringCopy(context, arguments[2], exception));
1221 bool allowDestinationSubdomains = JSValueToBoolean(context, arguments[3]);
1225 return JSValueMakeUndefined(context);
1228 static JSValueRef addUserScriptCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1231 return JSValueMakeUndefined(context);
1233 JSRetainPtr<JSStringRef> source(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1235 bool runAtStart = JSValueToBoolean(context, arguments[1]);
1239 return JSValueMakeUndefined(context);
1242 static JSValueRef addUserStyleSheetCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1245 return JSValueMakeUndefined(context);
1247 JSRetainPtr<JSStringRef> source(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1252 return JSValueMakeUndefined(context);
1257 static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
1260 return JSValueMakeBoolean(context, controller->globalFlag());
1263 static JSValueRef getWebHistoryItemCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
1266 return JSValueMakeNumber(context, controller->webHistoryItemCount());
1269 static JSValueRef getWorkerThreadCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
1272 return JSValueMakeNumber(context, controller->workerThreadCount());
1275 static bool setGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
1278 controller->setGlobalFlag(JSValueToBoolean(context, value));
1290 void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
1296 JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this);
1299 JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);