Don't use shadow DOM for rendering <object>/<embed> #7244
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiple shadow roots are not supported any more in Chrome 51+ (https://crbug.com/603448#c6), so this patch changes the way that PDF are rendered in
<embed>
/<object>
tags.I used shadow roots because their content is not visible from the web page, so the odds of conflicts were minimal. Now I have to render the PDF frame directly in the page, which can be observed from the page (unfortunately).
Now the following happens when an embedded PDF tag is detected:
<embed>
tags: The type and src attributes are updated.<object>
tags: The type attribute is changed and the fallback content is set and displayed.Tested as follows:
pull/7202/head
(Refactors dependencies of PDFViewerApplication on external services #7202), because in the current master, the Chrome extension fails at loading any PDFs because of an undefined ChromeCom reference.<embed>
and<object>
tags.Verified in Chromium 35.0.1916.15 / 49.0.2623.75 / 50.0.2661.75 / 52.0.2714.0 on Linux.
Fixes #7220