Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More fixes for Firefox XML namespace handling incompatibilities in package document parser #50

Merged
merged 2 commits into from
Jul 30, 2014

Conversation

jccr
Copy link
Member

@jccr jccr commented Jul 3, 2014

This fixes more instances of jQuery selectors being used to parse a package document's XML DOM.

This caused a certain book I was testing with (in FF 30) to load with an empty spine.

…ckage document parser

by using getElementsByTagNameNS() instead of jQuery selectors that
behave differently on WebKit than on other engines.
@jccr
Copy link
Member Author

jccr commented Jul 3, 2014

@aadamowski I believe you are familiar with this issue, can you review this pull request for me?

@danielweck
Copy link
Member

The code diff looks fine to me, but could you please fix the metadata parsing as well? (so that this PR addresses all occurrences in the document parser)
Are you aware of other occurrences in other JS files?

@jccr
Copy link
Member Author

jccr commented Jul 12, 2014

The only other two instances I see are:
publication_fetcher.js

    this.getRootFile = function(containerXmlDom) {
        var rootFile = $('rootfile', containerXmlDom);
        var packageFullPath = rootFile.attr('full-path');
        return packageFullPath;
    };

var rootFile = $('rootfile', containerXmlDom);

smil_document_parser.js

    // Parse a media overlay manifest item XML
    this.parse = function(spineItem, manifestItemSMIL, smilJson, deferred, callback, errorCallback) {
        var that = this;
        publicationFetcher.getRelativeXmlFileDom(manifestItemSMIL.href, function(xmlDom) {

            var smil = $("smil", xmlDom)[0];

var smil = $("smil", xmlDom)[0];

@jccr
Copy link
Member Author

jccr commented Jul 14, 2014

@danielweck I have updated the PR to handle metadata parsing and other miscellaneous uses such as cover href parsing.

@aadamowski
Copy link
Member

Hello @jccr, the changes look fine to me.

jccr added a commit that referenced this pull request Jul 30, 2014
More fixes for Firefox XML namespace handling incompatibilities in package document parser
@jccr jccr merged commit a8f1a0b into readium:develop Jul 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants