forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTMLObjectElement printing in iframes.
LazyReattachIfAttached is not idempotent. Calling it will cause HTMLObjectElements to discard their contents, which must be asynchronously regenerated. Avoid calling it if we think it won't have an effect. This still leaves the edge case of HTMLObjectElements in display:none iframes not printing correctly. Bug: 838760 Change-Id: I5d4fdbfe7e2710b824c3ecc446385fae09cbc7c7 Reviewed-on: https://chromium-review.googlesource.com/1053882 Commit-Queue: Erik Chen <erikchen@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#559652}
- Loading branch information
Showing
5 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
third_party/WebKit/LayoutTests/printing/iframe-svg-in-object-print-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
layer at (0,0) size 800x600 | ||
LayoutView at (0,0) size 1066x799 | ||
layer at (0,0) size 1066x799 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 | ||
LayoutBlockFlow {HTML} at (0,0) size 1066x799 | ||
LayoutBlockFlow {BODY} at (8,8) size 1050x783 | ||
LayoutText {#text} at (0,0) size 0x0 | ||
layer at (8,8) size 204x204 | ||
LayoutIFrame {IFRAME} at (0,0) size 204x204 [border: (2px inset #EEEEEE)] | ||
layer at (0,0) size 200x200 | ||
LayoutView at (0,0) size 200x200 | ||
layer at (0,0) size 100x100 | ||
LayoutBlockFlow {HTML} at (0,0) size 100x100 | ||
LayoutBlockFlow {BODY} at (8,8) size 100x100 | ||
LayoutText {#text} at (0,0) size 0x0 | ||
layer at (8,8) size 100x100 | ||
LayoutEmbeddedObject {OBJECT} at (0,0) size 100x100 | ||
layer at (0,0) size 100x100 | ||
LayoutView at (0,0) size 100x100 | ||
layer at (0,0) size 100x100 | ||
LayoutSVGRoot {svg} at (0,0) size 100x100 | ||
LayoutSVGEllipse {circle} at (25,25) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [cx=50.00] [cy=50.00] [r=25.00] | ||
|
11 changes: 11 additions & 0 deletions
11
third_party/WebKit/LayoutTests/printing/iframe-svg-in-object-print.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
<body> | ||
<iframe src="./resources/iframe-subframe-svg-in-object.html" width="200px" height="200px"></iframe> | ||
</body> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.setPrinting(); | ||
testRunner.dumpAsText(); | ||
} | ||
</script> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
third_party/WebKit/LayoutTests/printing/resources/iframe-subframe-svg-in-object.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html style="width: 100px; height:100px;"> | ||
<body style="width: 100px; height:100px;"> | ||
<object width="100px" height="100px" data="circle.svg" type="image/svg+xml"></object> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters