Proposals/ResourcePriorities for SVG
Combination of Media Queries
The 'postpone' value of resource priorities is concerned with control of dynamic loading depending on 'display' property.
Therefore, if media queries has zoom feature, dynamic loading according to zooming should be performed. We would like to check it.
Loading condition of the element
>If the postpone boolean attribute has been specified on an element, the User Agent MUST not start downloading the resource associated with the element until either the bounding box of the element is inside the User Agent's interpretation of the Document's viewport or the element has been styled such that its display property is no longer set to none.
It will be more efficient cases to be loaded only when the display part of the clipped object appears in viewport.
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" viewBox="0,0,100,100"> <defs><clipPath id="rect" clip-rule="evenodd"><rect x="200" y="200" width="100" height="100"/></clipPath></defs> <image xlink:href="child.svg" x="0" y="0" width="500" height="500" postpone="true" clip-path="url("#rect")" /> </svg>
In this case, bounding box is determined by x, y, width and height attributes. But child.svg is invisible because of 'clip'. Therefore, it is desirable not to be loaded.
Besides, is behavior in case the descendant of an element with display:none has postpone clear? Furthermore, 'visibility' may be useful as a condition.
- A clipping path is conceptually equivalent to a custom viewport for the referencing element.
- The bounding box of a clipped element must remain the same as if it were not clipped.
It should be applied to svg:video, svg:audio and svg:iframe
The present resource priorities document does not specify them. It is nice if a multipurpose interface is prescribed.
And implement it in the each specifications.
SVGVideoElement implements ResourcePriorityAttributes; SVGAudioElement implements ResourcePriorityAttributes; SVGIframeElement implements ResourcePriorityAttributes;
Moved from embedded.html:
Issue 1§Stakagi: The current Resource Priorities draft does not support embedded content elements which is going to be added by SVG2.0, such as video. Besides, the consideration for mapping and its tiling use cases may be insufficient. It may be better to describe detailed behavior of Resource Priorities in SVG at SVG specifications.
We've discussed that it's better to have those resource priorities discussed in the context of larger Resource Priorities proposal