Merge branch 'master' of git://git.netsurf-browser.org/netsurf

This commit is contained in:
Michael Drake 2013-01-18 22:05:35 +00:00
commit bba7aeca14
4 changed files with 60 additions and 21 deletions

View File

@ -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

View File

@ -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 |
@ -229,25 +252,6 @@ BOOL ami_search_event(void)
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;

View File

@ -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) \

View File

@ -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;
}
@ -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);