Commit Graph

97 Commits

Author SHA1 Message Date
Moonchild 525961c261 [html parser] Check for integer overflow when computing new buffer sizes. 2021-02-24 09:57:24 +00:00
Moonchild 84fa3f9f72 Redundant code path cleanup (#1702)
Remove various obsolete configure options.
Remove Adjust SDK install tracking filth.
Remove redundant code paths in old-configure
This also optimizes linker use
Remove redundant conditional blocks.
Rewrite span.h without constexpr use.
2021-01-02 19:27:13 +00:00
Henri Sivonen 4782e8dfa2 [parser] Make the refcount of nsHtml5OwningUTF16Buffer atomic. 2020-11-18 23:28:27 +00:00
athenian200 9ffc5e6c92 Issue #1673 - Part 4: Unprefix -moz-tab-size.
While we do fail a couple of tests, the other mainstream browsers also fail them and I think our implementation of tab-size is good enough to be unprefixed at this point. Having this patch also makes testing easier.
2020-10-28 14:17:51 -05:00
Moonchild d5a2c45aad Issue #1656 - Part 6: Clean up the build files 2020-09-23 15:52:00 +00:00
Moonchild 528b88d704 Issue #1656 - Part 3: Nuke more vim config lines in the tree.
Another S&R run with some smarter matching.
2020-09-23 15:14:30 +00:00
Moonchild a680bdc637 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-23 13:55:00 +00:00
Moonchild 4d999e03a3 [SVG] Only fire the SVG onload when scripting is enabled and allowed 2020-09-23 01:02:29 +00:00
Moonchild 04ccc4b124 [no issue] Fix whitespace (no code change) 2020-09-23 00:54:31 +00:00
Gaming4JC 0f433fc7c5 Issue #618 - Regenerate the HTML Parser code for nomodule changes
Ref: BZ 1446082
2020-08-26 11:20:39 -04:00
Gaming4JC 38d13e2779 Issue #618 - Don't preload nomodule scripts when modules are enabled
Ref: BZ 1382020
2020-08-26 11:19:42 -04:00
Moonchild b78f53ffb0 Issue #618 - (async) Implement async attribute for inline module scripts.
This commit does several things:
- Moves the pref check from ScriptLoader to ns[I]Document so it can be called on
the document.
- Changes the atrribute freezing function to a better name that takes the
document as a parameter.
- Sets the proper async/defer attributes on HTML script elements based on
keywords and whether they are module scripts or not.
2020-08-25 07:06:43 +00:00
Moonchild 2ca1cbe2f5 Issue #618 - (async, preload) Correctly pass info about async/defer to parser.
This makes sure we don't block body-referred sub-resources by head-referenced
defer and async scripts. This is important for all script loads, not just
modules, but is added here because it was run into while implementing modules.
2020-08-24 11:13:16 +00:00
Moonchild c45b7ee3a9 Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement
- Moves scripting parts of DOM into 'dom/script'
- Renames nsScript{Loader/Element} to Script{Loader/Element}
- Adjusts all callers
2020-06-30 11:51:11 +00:00
Gaming4JC 32c3efa3c2 Issue #1525 - Kill marquee element; Debug Follow Up
The marquee element was still specified in debug code, causing build to fail without it's removal.
2020-06-07 19:02:29 -04:00
Moonchild f828451e5f Issue #1525 - Kill marquee element
* Remove marquee code
* Regenerate HTML Elements/parser code for Removal of Marquee.

Co-authored-by: Gaming4JC <g4jc@hyperbola.info>
2020-06-01 14:16:06 +02:00
Matt A. Tobin 8beb65dd50 Bug 1418002 - Remove HTMLContentElement
Tag #1375
2020-04-17 07:08:22 -04:00
Matt A. Tobin 48f602e65b Bug 1402941 - Add HTMLSlotElement
Tag #1375
2020-04-17 06:37:28 -04:00
Matt A. Tobin 846e0fa4f5 Bug 1401097 - Simplify gHTMLElements and remove redundant conditions in nsXHTMLContentSerializer::LineBreakAfterClose()
Tag #1375
2020-04-17 06:36:20 -04:00
Matt A. Tobin 5f12940329 Bug 1396584 - Remove support for multiple ShadowRoots
Tag #1375
2020-04-17 06:34:38 -04:00
Matt A. Tobin a72b827325 Bug 1400777 - Slim down nsElementTable.h
* Remove eHTMLTags
* De-expose HTML group constants[]
* De-expose gHTMLElements[]
* Split nsHTMLElement
* Clean up nsElementTable.{cpp,h}
* Fixup for eHTMLTag removal in Parser

Tag #1375
2020-04-17 06:33:16 -04:00
Matt A. Tobin 61e46a6d58 Issue #1375 - Stop largely using the parser service
This is based on Bug 1395828

* Add nsHTMLElement::IsBlock()
* Rename nsHTMLTags methods
* Remove AssertParserServiceIsCorrect()
* Remove most uses of nsIParserService/nsParserService
2020-04-17 06:24:43 -04:00
Matt A. Tobin 071957f9fa Bug 1394300 - Streamline nsElementTable.cpp
Tag #1375
2020-04-17 06:14:58 -04:00
Matt A. Tobin f4a1d0123c Bug 1375701 - Atomize class attribute value in the parser in the innerHTML case
Tag #1375
2020-04-17 06:12:55 -04:00
Henri Sivonen 3bf1b83591 [Parser] Move setting context to null to the correct location. 2020-02-14 13:24:59 +01:00
Gaming4JC 3c70b297c7 Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition
Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value), we could use nodeInfo->NameAtom() instead.

Tag UXP Issue #1344
2020-01-26 15:50:52 -05:00
Gaming4JC 8db81508a1 Bug 1415761 - Catch the exception and rethrow it after invoking custom elements reactions;
The spec was unclear on how CEReactions interact with thrown exceptions; see https://github.com/whatwg/html/issues/3217. The spec is now being clarified in https://github.com/whatwg/html/pull/3235.

Tag UXP Issue #1344
2020-01-26 15:50:48 -05:00
Gaming4JC fb657f7a1e Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue #1344
2020-01-26 15:50:46 -05:00
Gaming4JC a0014ac6e9 Bug 1378079 - Part 3: Complete the steps related to custom elements in "create an element for a token".
With fixup for missing header due to unified builds.

Tag UXP Issue #1344
2020-01-26 15:50:44 -05:00
Gaming4JC dd6749f7dd Regenerate Parser for 483155
Tag UXP Issue #1344
2020-01-26 15:50:44 -05:00
Gaming4JC e2fc7a9d49 Fix Build: We don't have SVG or MathML prefs yet
See Bug 1173199 / 1216893

Tag UXP Issue #1344
2020-01-26 15:50:44 -05:00
Gaming4JC 950275abe6 Fix aAttributes
Fallout from 483155

Tag UXP Issue #1344
2020-01-26 15:50:43 -05:00
Gaming4JC ea35625369 Fix ISINDEX
Since we want to keep this element, it has to be adapted to the parser changes in 483155

Tag UXP Issue #1344
2020-01-26 15:50:43 -05:00
Gaming4JC 0f9746b6e5 Add missing space to ElementName.java self-regeneration code.
Tag UXP Issue #1344
2020-01-26 15:50:43 -05:00
Gaming4JC 97ed13a9f9 Add missing elements from Bug 483155
Tag UXP Issue #1344
2020-01-26 15:50:42 -05:00
Gaming4JC d163c367d9 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
2020-01-26 15:50:42 -05:00
Gaming4JC 9bf83c6a78 Bug 483155 - Put Gecko content creator function pointers on ElementName.
Tag UXP Issue #1344
2020-01-26 15:50:41 -05:00
Gaming4JC bec4d0ecdc Bug 1355779 - Skip interned ElementName lookup for Custom Elements (ones with hyphen).
Regen.

Tag UXP Issue #1344
2020-01-26 15:50:41 -05:00
Gaming4JC 1ef7d17528 Bug 1355779 - Skip interned nsHtml5ElementName lookup for Custom Elements (ones with hyphen).
Tag UXP Issue #1344
2020-01-26 15:50:41 -05:00
Gaming4JC 004b231d03 Bug 1378079 - Part 1: Gecko changes for adding attribute 'is' to parser.
Tag UXP Issue #1344
2020-01-26 15:50:40 -05:00
Gaming4JC 4c193edcaf Bug 1378079 - Add attribute 'is' to HTML parser.
Tag UXP Issue #1344
2020-01-26 15:50:39 -05:00
Gaming4JC fce396323d Bug 1366241 - Change memory layout of element name and attribute name hashes in HTML parser from sorted to level order BST in order to take advantage of cache during lookup.
HTML Regen.

Tag UXP Issue #1344
2020-01-26 15:50:38 -05:00
Gaming4JC a8511d983c Bug 1366241 - Change memory layout of element name and attribute name hashes from sorted to level order BST in order to take advantage of cache during lookup.
Java Regen.

Tag UXP Issue #1344
2020-01-26 15:50:38 -05:00
Gaming4JC e17a17766e Bug 1366241 - Change memory layout of element name and attribute name hashes from sorted to level order BST in order to take advantage of cache during lookup.
Tag UXP Issue #1344
2020-01-26 15:50:38 -05:00
Gaming4JC 76a4af3406 Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
HTML Regen.

Tag UXP Issue #1344
2020-01-26 15:50:37 -05:00
Gaming4JC 5d4200f56d Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
Manual changes

Tag UXP Issue #1344
2020-01-26 15:50:37 -05:00
Gaming4JC 41e477e2ce Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
Tag UXP Issue #1344
2020-01-26 15:50:36 -05:00
Gaming4JC e5557d43d6 Bug 1355479 - Flatten attribute storage in the HTML parser to AutoTArray to avoid malloc.
HTML Regen.

Tag UXP Issue #1344
2020-01-26 15:50:36 -05:00
Gaming4JC 650f6b5eb3 Bug 1355479 - Flatten attribute storage in the HTML parser to AutoTArray to avoid malloc.
- Removes nsHtml5ReleasableAttributeName
- Adds nsHtml5AttributeEntry.h
- Makes nsHtml5HtmlAttributes no longer gentered.

Tag UXP Issue #1344
2020-01-26 15:50:36 -05:00
Gaming4JC 90d19b0a31 Bug 1355479 - Remove isindex on the Java side and allow the C++ side to reduce malloc in attribute handling.
Tag UXP Issue #1344
2020-01-26 15:50:35 -05:00