summaryrefslogtreecommitdiffstats
path: root/parser/html/java
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-19 09:57:36 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:42 -0500
commitd163c367d9ee5f13769b8580b97bcc511fdd13cd (patch)
treed8fba280f76b3ff92d5bf1c4d574731ab956f662 /parser/html/java
parent9bf83c6a785ba7463822a159cdaf9eb06ece3690 (diff)
downloadUXP-d163c367d9ee5f13769b8580b97bcc511fdd13cd.tar
UXP-d163c367d9ee5f13769b8580b97bcc511fdd13cd.tar.gz
UXP-d163c367d9ee5f13769b8580b97bcc511fdd13cd.tar.lz
UXP-d163c367d9ee5f13769b8580b97bcc511fdd13cd.tar.xz
UXP-d163c367d9ee5f13769b8580b97bcc511fdd13cd.zip
Bug 483155 - Put content creator function pointers onto nsHtml5ElementName.
This is all the manual work for Bug 483155, minus the added functionality to disable SVG and MathML which can be done at any time and are out of scope. Tag UXP Issue #1344
Diffstat (limited to 'parser/html/java')
-rw-r--r--parser/html/java/README.txt41
1 files changed, 39 insertions, 2 deletions
diff --git a/parser/html/java/README.txt b/parser/html/java/README.txt
index b358cc595..569a5c842 100644
--- a/parser/html/java/README.txt
+++ b/parser/html/java/README.txt
@@ -1,13 +1,13 @@
If this is your first time building the HTML5 parser, you need to execute the
following commands (from this directory) to accomplish the translation:
- make translate # perform the Java-to-C++ translation from the remote
+ make translate # perform the Java-to-C++ translation from the remote
# sources
make named_characters # Generate tables for named character tokenization
If you make changes to the translator or the javaparser, you can rebuild by
retyping 'make' in this directory. If you make changes to the HTML5 Java
-implementation, you can retranslate the Java sources from the htmlparser
+implementation, you can retranslate the Java sources from the htmlparser
repository by retyping 'make translate' in this directory.
The makefile supports the following targets:
@@ -36,6 +36,43 @@ clean-javasrc:
clean:
Runs clean-javaparser, clean-htmlparser, and clean-javasrc.
+## How to add an attribute
+
+# starting from the root of a UXP checkout
+cd parser/html/java/htmlparser/src/
+$EDITOR nu/validator/htmlparser/impl/AttributeName.java
+# Search for the word "uncomment" and uncomment stuff according to the comments that talk about uncommenting
+# Duplicate the declaration a normal attribute (nothings special in SVG mode, etc.). Let's use "alt", since it's the first one.
+# In the duplicate, replace ALT with the new name in all caps and "alt" with the new name in quotes in lower case.
+# Search for "ALT,", duplicate that line and change the duplicate to say the new name in all caps followed by comma.
+# Save.
+javac nu/validator/htmlparser/impl/AttributeName.java
+java nu.validator.htmlparser.impl.AttributeName
+# Copy and paste the output into nu/validator/htmlparser/impl/AttributeName.java replacing the text below the comment "START GENERATED CODE" and above the very last "}".
+# Recomment the bits that you uncommented earlier.
+# Save.
+cd ../.. # Back to parser/html/java/
+make translate
+
+## How to add an element
+
+# First, add an entry to parser/htmlparser/nsHTMLTagList.h or dom/svg/SVGTagList.h!
+# Then, starting from the root of a UXP checkout
+cd parser/html/java/htmlparser/src/
+$EDITOR nu/validator/htmlparser/impl/ElementName.java
+# Search for the word "uncomment" and uncomment stuff according to the comments that talk about uncommenting
+# Duplicate the declaration a normal element. Let's use "bdo", since it's the first normal one.
+# In the duplicate, replace BDO with the new name in all caps and "bdo" with the new name in quotes in lower case (twice).
+# Search for "BDO,", duplicate that line and change the duplicate to say the new name in all caps followed by comma.
+# Save.
+javac nu/validator/htmlparser/impl/ElementName.java
+java nu.validator.htmlparser.impl.ElementName ../../../../../parser/htmlparser/nsHTMLTagList.h ../../../../../dom/svg/SVGTagList.h
+# Copy and paste the output into nu/validator/htmlparser/impl/ElementName.java replacing the text below the comment "START GENERATED CODE" and above the very last "}".
+# Recomment the bits that you uncommented earlier.
+# Save.
+cd ../.. # Back to parser/html/java/
+make translate
+
Ben Newman (23 September 2009)
Henri Sivonen (11 August 2016)
Matt A. Tobin (16 January 2020)