Last Comment Bug 771935 - SVGs that are larger than the browser content area should scroll
: SVGs that are larger than the browser content area should scroll
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Jonathan Watt [:jwatt]
:
Mentors:
Depends on:
Blocks: 769645
  Show dependency treegraph
 
Reported: 2012-07-08 12:50 PDT by Jonathan Watt [:jwatt]
Modified: 2012-07-09 04:50 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.74 KB, patch)
2012-07-08 14:32 PDT, Jonathan Watt [:jwatt]
roc: review+
Details | Diff | Review

Description Jonathan Watt [:jwatt] 2012-07-08 12:50:04 PDT
SVG files that take up an area larger than the browser content area should scroll, but the change to svg.css in the patch for bug 769645 has broken that. The reason for that change was to prevent SVGs that are smaller than the viewport from painting outside their content area (needed for backwards compatibility), but I think the value that we really need is 'scroll', not 'hidden'. I need to run some tests to check that both fixes this bug and keeps us backwards compatible, but if it works I'll attach a patch.
Comment 1 Jonathan Watt [:jwatt] 2012-07-08 14:18:32 PDT
No, using:

svg:root {
  overflow: scroll;
}

in svg.css doesn't work since it causes SVG files embedded using <embed> to get scrollbars when they didn't previously. For example, the references for the following two tests are given scrollbars when they should not be:

reftests/svg/as-image/zoom/img-zoomIn-1.html
reftests/svg/as-image/zoom/img-zoomOut-1.html
Comment 2 Jonathan Watt [:jwatt] 2012-07-08 14:32:50 PDT
Created attachment 640102 [details] [diff] [review]
patch

Let's just go back to clipping without checking IsScrollableOverflow(), as we used to, but still using the nsDisplayClip to do the clipping. Right now I don't have any more time to spend on this, so I'll look into giving users more clipping control in bug 378923 later.
Comment 4 Ed Morley [:emorley] 2012-07-09 04:50:11 PDT
https://hg.mozilla.org/mozilla-central/rev/43993f45c328

Note You need to log in before you can comment on or make changes to this bug.