author Brendan Dahl <>
Sat, 09 Mar 2019 01:00:23 +0000
changeset 521223 f996bb0f3d232ad13c8d9f87ecbe9baa868ebac2
parent 517088 51c3380d5b9456e9307f35ff09678634a7d0ee7b
child 522610 f74e07af9897218f5af09cc0188e753e74ecb58d
permissions -rw-r--r--
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:

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

# interfaces/*/ are annotated per directory, this is for new files
with Files("**"):
    BUG_COMPONENT = ("Core", "DOM")

with Files("plugins/**"):
    BUG_COMPONENT = ("Core", "Plug-ins")


interfaces = [

DIRS += ['interfaces/' + i for i in interfaces]

DIRS += [

    DIRS += ['plugins/ipc/hangui']

DIRS += ['presentation']


if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'cocoa', 'windows'):
    TEST_DIRS += ['plugins/test']