Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Brendan Dahl 05719da576 Bug 1533883 - Test loading XHTML with and without the prototype. r=smaug
Ensure the prototype is used when the pref is enabled and likewise
when disabled. Also, compare the contents of the DOM with and without the
prototype.

Depends on D27745

Differential Revision: https://phabricator.services.mozilla.com/D27746

--HG--
extra : moz-landing-system : lando
2019-04-16 18:46:52 +00:00
Brendan Dahl 51d9c2f820 Bug 1544144 - Fix custom HTML element creation when using prototype and XHTML. r=smaug
Use the correct global for custom HTML elements created from a prototype.
Also, add an error message to make it easier to spot when the
PrototypeDocumentSink fails.

Differential Revision: https://phabricator.services.mozilla.com/D27401

--HG--
extra : moz-landing-system : lando
2019-04-15 10:56:03 +00:00
Brendan Dahl 4ac9a7a0eb Bug 1543245 - Prevent HTML script tags from loading twice when using PrototypeDocument. r=smaug
HTML script tags were being loaded once by the element when it was bound
to the tree and a second time by the PrototypeDocumentContentSink. This
patch disables the script element from loading itself.

Differential Revision: https://phabricator.services.mozilla.com/D26823
2019-04-12 13:15:19 -07:00
Coroiu Cristina 9943b037bc Backed out 2 changesets (bug 1543245) for frequently failing devtools at devtools/client/inspector/test/browser_inspector_highlighter-07.js on a CLOSED TREE
Backed out changeset 8e8da015fde1 (bug 1543245)
Backed out changeset a4d256528051 (bug 1543245)
2019-04-11 05:21:18 +03:00
Brendan Dahl 0d976daec9 Bug 1543245 - Prevent HTML script tags from loading twice when using PrototypeDocument. r=smaug
HTML script tags were being loaded once by the element when it was bound
to the tree and a second time by the PrototypeDocumentContentSink. This
patch disables the script element from loading itself.

Depends on D26822

Differential Revision: https://phabricator.services.mozilla.com/D26823

--HG--
extra : moz-landing-system : lando
2019-04-10 06:36:06 +00:00
Brendan Dahl 44fd876aaf Bug 1080029 - Support HTML template in XUL documents. r=smaug
Check if the current parent element is an HTML template element and if it
is, append to the document fragment instead of it.

Differential Revision: https://phabricator.services.mozilla.com/D26768

--HG--
extra : moz-landing-system : lando
2019-04-09 19:50:00 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Brendan Dahl 7ebaf1cd2b Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug
Create a new parser (PrototypeDocumentParser) and content sink
(PrototypeDocumentContentSink) that can be used by both XUL and XHTML.

The new parser moves the code from XULDocument that handles creating and
loading a nsXULPrototypeDocument from either the cache or the source
file. Once the parser has finished loading the prototype it notifies the
content sink. The parser is largely a stub and would be better suited
for use as a nsBaseParser, but nsHTMLDocument unfortunately needs an
nsIParser.

The new content sink has the XULDocument code responsible for the
prototype traversal that creates the DOM (XULDocument::ResumeWalk and
friends) and fires off various events.

To unify XUL and XHTML, the XHTML readystate event sequence is used in
XUL. However, the layout path of XHTML loaded from the prototype cache
more closely follows XUL, where frame initializers and layout don't
start until the entire DOM is built.

Differential Revision: https://phabricator.services.mozilla.com/D21236

--HG--
rename : dom/xul/XULDocument.cpp => dom/prototype/PrototypeDocumentContentSink.cpp
rename : parser/moz.build => dom/prototype/moz.build
rename : parser/moz.build => parser/prototype/moz.build
extra : moz-landing-system : lando
2019-03-09 01:00:23 +00:00