Move javascript content handler as appropriate for updated source format

This commit is contained in:
Vincent Sanders 2016-06-07 16:01:04 +01:00
parent 9754539e22
commit 042fcb82b8
85 changed files with 40 additions and 54 deletions

View File

@ -679,8 +679,8 @@ INPUT = frontends/amiga \
content/fetchers \ content/fetchers \
content/handlers/image \ content/handlers/image \
content/handlers/css \ content/handlers/css \
javascript \ content/handlers/javascript \
javascript/jsapi \ content/handlers/javascript/duktape \
utils \ utils \
utils/http \ utils/http \
Docs/UnimplementedJavascript.txt Docs/UnimplementedJavascript.txt

View File

@ -630,7 +630,6 @@ getter HTMLElement::onerror(user);\n
setter HTMLElement::onerror(user);\n setter HTMLElement::onerror(user);\n
getter HTMLElement::spellcheck(boolean);\n getter HTMLElement::spellcheck(boolean);\n
setter HTMLElement::spellcheck(boolean);\n setter HTMLElement::spellcheck(boolean);\n
getter HTMLElement::style(user);\n
getter HTMLElement::tabIndex(long);\n getter HTMLElement::tabIndex(long);\n
setter HTMLElement::tabIndex(long);\n setter HTMLElement::tabIndex(long);\n
getter HTMLElement::translate(boolean);\n getter HTMLElement::translate(boolean);\n

View File

@ -596,17 +596,11 @@ include utils/http/Makefile
# Desktop sources # Desktop sources
include desktop/Makefile include desktop/Makefile
# Javascript source
include javascript/Makefile
# S_COMMON are sources common to all builds # S_COMMON are sources common to all builds
S_COMMON := $(S_CONTENT) $(S_FETCHERS) $(S_CSS) $(S_RENDER) $(S_UTILS) \ S_COMMON := $(S_CONTENT) $(S_FETCHERS) $(S_RENDER) $(S_UTILS) $(S_HTTP) \
$(S_HTTP) $(S_DESKTOP) $(S_JAVASCRIPT) $(S_DESKTOP) $(S_JAVASCRIPT_BINDING)
# Include directory flags
IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Message targets # Message targets
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
@ -630,7 +624,7 @@ MESSAGES += $$(MESSAGES_TARGET)/$(1)/Messages
endef endef
# geenrate the message file rules # generate the message file rules
$(eval $(foreach LANG,$(MESSAGES_LANGUAGES), \ $(eval $(foreach LANG,$(MESSAGES_LANGUAGES), \
$(call split_messages,$(LANG)))) $(call split_messages,$(LANG))))
@ -653,6 +647,9 @@ endif
OBJECTS := $(sort $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(patsubst %.m,%.o,$(patsubst %.s,%.o,$(SOURCES)))))))) OBJECTS := $(sort $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(patsubst %.m,%.o,$(patsubst %.s,%.o,$(SOURCES))))))))
# Include directory flags
IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
$(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES) $(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES)
$(VQ)echo " LINK: $(EXETARGET)" $(VQ)echo " LINK: $(EXETARGET)"
ifneq ($(TARGET)$(SUBTARGET),riscos-elf) ifneq ($(TARGET)$(SUBTARGET),riscos-elf)

View File

@ -8,10 +8,11 @@ ifeq ($(NETSURF_FS_BACKING_STORE),YES)
S_CONTENT += fs_backing_store.c S_CONTENT += fs_backing_store.c
endif endif
S_CONTENT := $(addprefix content/,$(S_CONTENT))
# Content fetchers sources # Content fetchers sources
include content/fetchers/Makefile include content/fetchers/Makefile
# Content handlers # Content handlers
include content/handlers/Makefile include content/handlers/Makefile
S_CONTENT := $(addprefix content/,$(S_CONTENT))

View File

@ -6,6 +6,11 @@ S_IMAGE := $(addprefix content/handlers/image/,$(S_IMAGE))
# CSS sources # CSS sources
include content/handlers/css/Makefile include content/handlers/css/Makefile
S_CSS := $(addprefix content/handlers/css/,$(S_CSS)) S_CONTENT += $(addprefix handlers/css/,$(S_CSS))
# Javascript source
include content/handlers/javascript/Makefile
S_CONTENT += $(addprefix handlers/javascript/,$(S_JAVASCRIPT))
INCLUDE_DIRS += content/handlers INCLUDE_DIRS += content/handlers

View File

@ -0,0 +1,18 @@
#
# NetSurf javascript source file inclusion
#
# Included by Makefile
#
S_JAVASCRIPT_BINDING:=
ifeq ($(NETSURF_USE_DUKTAPE),YES)
# Duktape
include content/handlers/javascript/duktape/Makefile
else
# None
include content/handlers/javascript/none/Makefile
endif
# Fetcher for javascript scheme is always required
S_JAVASCRIPT += fetcher.c

View File

@ -4,27 +4,27 @@
# Included by javascript/Makefile # Included by javascript/Makefile
# #
javascript/dukky.c: $(OBJROOT)/duktape/binding.h content/handlers/javascript/dukky.c: $(OBJROOT)/duktape/binding.h
BINDINGS := $(wildcard javascript/duktape/*.bnd) BINDINGS := $(wildcard content/handlers/javascript/duktape/*.bnd)
# ensure genbind generates debugging files # ensure genbind generates debugging files
GBFLAGS+=-D GBFLAGS+=-D
$(OBJROOT)/duktape/binding.h $(OBJROOT)/duktape/Makefile: javascript/duktape/netsurf.bnd $(BINDINGS) $(OBJROOT)/duktape/binding.h $(OBJROOT)/duktape/Makefile: content/handlers/javascript/duktape/netsurf.bnd $(BINDINGS)
$(Q)mkdir -p $(OBJROOT)/duktape $(Q)mkdir -p $(OBJROOT)/duktape
$(VQ)echo " GENBIND: $<" $(VQ)echo " GENBIND: $<"
$(Q)nsgenbind $(GBFLAGS) -I javascript/WebIDL $< $(OBJROOT)/duktape $(Q)nsgenbind $(GBFLAGS) -I content/handlers/javascript/WebIDL $< $(OBJROOT)/duktape
$(VQ)echo " GENBIND: completed" $(VQ)echo " GENBIND: completed"
# create unimplemented report for doxygen # create unimplemented report for doxygen
Docs/UnimplementedJavascript.txt: javascript/duktape/netsurf.bnd $(BINDINGS) Docs/UnimplementedJavascript.txt: content/handlers/javascript/duktape/netsurf.bnd $(BINDINGS)
$(Q)mkdir -p $(OBJROOT)/duktape $(Q)mkdir -p $(OBJROOT)/duktape
$(VQ)echo "/** \page unimplemented Unimplemented javascript bindings" > $@ $(VQ)echo "/** \page unimplemented Unimplemented javascript bindings" > $@
$(VQ)echo "This is a list of all the binding methods, getters and setters without an implementation in a binding." >> $@ $(VQ)echo "This is a list of all the binding methods, getters and setters without an implementation in a binding." >> $@
$(VQ)echo "" >> $@ $(VQ)echo "" >> $@
$(VQ)echo " GENBIND: $<" $(VQ)echo " GENBIND: $<"
$(Q)nsgenbind $(GBFLAGS) -Wunimplemented -I javascript/WebIDL $< $(OBJROOT)/duktape 2>&1 >/dev/null | grep "Unimplemented" | cut -d' ' -f4- | sort -k 2 | awk '{print $$0"\\n" }' >> $@ $(Q)nsgenbind $(GBFLAGS) -Wunimplemented -I content/handlers/javascript/WebIDL $< $(OBJROOT)/duktape 2>&1 >/dev/null | grep "Unimplemented" | cut -d' ' -f4- | sort -k 2 | awk '{print $$0"\\n" }' >> $@
$(VQ)echo "*/" >> $@ $(VQ)echo "*/" >> $@
ifeq ($(filter $(MAKECMDGOALS),clean test coverage),) ifeq ($(filter $(MAKECMDGOALS),clean test coverage),)

View File

@ -1,34 +0,0 @@
#
# NetSurf javascript source file inclusion
#
# Included by Makefile
#
# Check if jsapi is required
ifeq ($(NETSURF_USE_JS),YES)
WANT_JS_SOURCE := YES
else
ifeq ($(NETSURF_USE_MOZJS),YES)
WANT_JS_SOURCE := YES
endif
endif
S_JAVASCRIPT_BINDING:=
ifeq ($(WANT_JS_SOURCE),YES)
# JSAPI (spidemonkey)
include javascript/jsapi/Makefile
else
ifeq ($(NETSURF_USE_DUKTAPE),YES)
# Duktape
include javascript/duktape/Makefile
else
# None
include javascript/none/Makefile
endif
endif
# Fetcher for javascript scheme is always required
S_JAVASCRIPT += fetcher.c
S_JAVASCRIPT := $(addprefix javascript/,$(S_JAVASCRIPT)) $(S_JAVASCRIPT_BINDING)