function getUnappliedEditList(editor, changeList) {
        var cachedValue = _cachedValues[editor.document.file.fullPath];

        // We might not have a previous DOM if the document was empty before this edit.
        if (!cachedValue || !cachedValue.dom || _cachedValues[editor.document.file.fullPath].invalid) {
            // We were in an invalid state, so do a full rebuild.
            changeList = null;
        }

        var result = _updateDOM(cachedValue && cachedValue.dom, editor, changeList);

        if (!result.errors) {
            _cachedValues[editor.document.file.fullPath] = {
                timestamp: editor.document.diskTimestamp,
                dom: result.dom,
                dirty: false
            };
            return { edits: result.edits };
        } else {
            if (cachedValue) {
                cachedValue.invalid = true;
            }
            return { errors: result.errors };
        }
    }
Calculates the DOM edits that are needed to update the browser from the state the
editor was in the last time that scanDocument(), getInstrumentedHTML(), or
getUnappliedEditList() was called (whichever is most recent). Caches this state so
it can be used as the base state for the next getUnappliedEditList().

For simple text edits, this update is done quickly and incrementally. For structural
edits (edits that change the DOM structure or add/remove attributes), the update
requires a full reparse.

If the document currently contains invalid HTML, no edits will be generated until
getUnappliedEditList() is called when the document is valid, at which point the edits
will reflect all the changes needed to catch the browser up with all the edits
made while the document was invalid.

@param {Editor} editor The editor containing the instrumented HTML
@param {Array} changeList A CodeMirror change list describing the text changes made
    in the editor since the last update. If specified, we will attempt to do an
    incremental update.
@return {Array} edits A list of edits to apply in the browser. See HTMLDOMDiff for
    more information on the format of these edits.