summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amiga/Makefile.target2
-rwxr-xr-xamiga/search.c42
-rw-r--r--javascript/jsapi.h6
-rw-r--r--javascript/jsapi/htmldocument.bnd31
4 files changed, 60 insertions, 21 deletions
diff --git a/amiga/Makefile.target b/amiga/Makefile.target
index f2c429998..d7abea5cf 100644
--- a/amiga/Makefile.target
+++ b/amiga/Makefile.target
@@ -59,7 +59,7 @@ else
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
ifeq ($(SUBTARGET),os3)
- LDFLAGS += -liconv
+ LDFLAGS += -lpbl -liconv
else
LDFLAGS += -lauto -lpbl -liconv
endif
diff --git a/amiga/search.c b/amiga/search.c
index 1148f6d77..f1fad600b 100755
--- a/amiga/search.c
+++ b/amiga/search.c
@@ -174,6 +174,9 @@ void ami_search_open(struct gui_window *gwin)
fwin->node = AddObject(window_list,AMINS_FINDWINDOW);
fwin->node->objstruct = fwin;
gwin->shared->searchwin = fwin;
+
+ ActivateLayoutGadget((struct Gadget *)fwin->objects[GID_MAIN], fwin->win,
+ NULL, fwin->objects[GID_SEARCHSTRING]);
}
void ami_search_close(void)
@@ -202,6 +205,26 @@ BOOL ami_search_event(void)
case WMHI_GADGETUP:
switch(result & WMHI_GADGETMASK)
{
+ case GID_SEARCHSTRING:
+ browser_window_search_destroy_context(
+ fwin->gwin->shared->bw);
+ ami_search_set_forward_state(
+ true, NULL);
+ ami_search_set_back_state(
+ true, NULL);
+
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
+ fwin->win, NULL,
+ GA_Disabled, FALSE,
+ TAG_DONE);
+
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
+ fwin->win, NULL,
+ GA_Disabled, FALSE,
+ TAG_DONE);
+
+ /* fall through */
+
case GID_NEXT:
search_insert = true;
flags = SEARCH_FLAG_FORWARDS |
@@ -228,25 +251,6 @@ BOOL ami_search_event(void)
flags,
ami_search_string());
ActivateWindow(fwin->gwin->shared->win);
- break;
-
- case GID_SEARCHSTRING:
- browser_window_search_destroy_context(
- fwin->gwin->shared->bw);
- ami_search_set_forward_state(
- true, NULL);
- ami_search_set_back_state(
- true, NULL);
-
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
- fwin->win, NULL,
- GA_Disabled, FALSE,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
- fwin->win, NULL,
- GA_Disabled, FALSE,
- TAG_DONE);
break;
}
break;
diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index e3295fee9..b26eb5572 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -75,6 +75,8 @@
/* native proprty definition */
+#define JSAPI_PROP_DEFAULT(name, cx, obj, vp) \
+ jsapi_property_##name(cx, obj, jsval jsapi_id, vp)
#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
jsapi_property_##name##_get(cx, obj, jsval jsapi_id, vp)
#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
@@ -195,6 +197,8 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
/* proprty native calls */
+#define JSAPI_PROP_DEFAULT(name, cx, obj, vp) \
+ jsapi_property_##name(cx, obj, jsval jsapi_id, vp)
#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
jsapi_property_##name##_get(cx, obj, jsval jsapi_id, vp)
#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
@@ -307,6 +311,8 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
#define JSAPI_THIS_OBJECT(cx,vp) JS_THIS_OBJECT(cx,vp)
/* proprty native calls */
+#define JSAPI_PROP_DEFAULT(name, cx, obj, vp) \
+ jsapi_property_##name(cx, obj, jsid jsapi_id, vp)
#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
jsapi_property_##name##_get(cx, obj, jsid jsapi_id, vp)
#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd
index 8d5c69eb5..c948e2dbb 100644
--- a/javascript/jsapi/htmldocument.bnd
+++ b/javascript/jsapi/htmldocument.bnd
@@ -52,6 +52,9 @@ binding document {
/** location instantiated on first use */
property unshared location;
+ /* compatability mode instantiated on first use */
+ property unshared compatMode;
+
/* events through a single interface */
property unshared type EventHandler;
}
@@ -66,7 +69,7 @@ api finalise %{
getter location %{
- if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx, vp))) {
/* already created - return it */
return JS_TRUE;
}
@@ -95,6 +98,32 @@ getter documentURI %{
jsret = JSVAL_TO_STRING(jsstr);
%}
+
+getter compatMode %{
+ /* Returns the string "CSS1Compat" if document is in no-quirks
+ * mode or limited-quirks mode, and "BackCompat", if document
+ * is in quirks mode.
+ */
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx, vp))) {
+ /* already created, just use it */
+ return JS_TRUE;
+ }
+ if (private->htmlc->quirks == DOM_DOCUMENT_QUIRKS_MODE_FULL) {
+ jsret = JS_NewStringCopyN(cx, "BackCompat", SLEN("BackCompat"));
+ } else {
+ jsret = JS_NewStringCopyN(cx, "CSS1Compat", SLEN("CSS1Compat"));
+ }
+
+%}
+
+/*
+getter characterSet %{
+%}
+
+getter contentType %{
+%}
+*/
+
getter cookie %{
char *cookie_str;
cookie_str = urldb_get_cookie(llcache_handle_get_url(private->htmlc->base.llcache), false);