DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (409f3966645a)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311

# This directory contains tests that test the sizing of the SVG viewport into
# which SVG is rendered. It includes tests for standalone SVG, SVG embedded by
# reference using the HTML <object> element, and SVG rendered inline within
# XHTML.
#
# SVG's <svg> element is a "replaced element". The main specification texts
# covering how the <svg> element is sized are:
#
#   http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport
#   http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing
#   http://www.w3.org/TR/CSS21/visudet.html

skip-if(Android) != scrollbars-01.svg scrollbars-01-anti-ref.svg
skip-if(Android) != scrollbars-02.svg scrollbars-01-anti-ref.svg

# Standalone tests
#
# To get reasonable test coverage of the implementation of the replaced element
# algorythm we test all permutations of the CSS 'width' and 'height' properties
# having the values zero, auto, a px value or a percentage value, and of the
# intrinsic width and height (the 'width' and 'height' attributes) having the
# values zero, a px value or a percentage value. This gives us 4*4*3*3 == 144
# tests. On top of that, there are 12 cases from the 144 permutations for which
# the 'viewBox' attribute should have an affect (see below).
#
# In the file names for the standalone tests that follow, the first two fields
# denote the type of value specified for the CSS 'width' and 'height'
# properties, and the third and four fields denote the type of value used for
# the intrinsic width and height (i.e. the 'width' and 'height' attributes).
#
# Note that the standalone SVG testcases can't test defaulting to 300x150 px
# because SVG always has an intrinsic width and height. To get the size of an
# SVG to default to 300x150 px the SVG will need to have a containing block
# that depends on the SVG's size (e.g. a floating containing block). Again, see
# below for those tests.

== standalone--0-0--0-0.svg             pass-empty.svg
== standalone--0-0--0-pct.svg           pass-empty.svg
== standalone--0-0--0-px.svg            pass-empty.svg
== standalone--0-0--pct-0.svg           pass-empty.svg
== standalone--0-0--pct-pct.svg         pass-empty.svg
== standalone--0-0--pct-px.svg          pass-empty.svg
== standalone--0-0--px-0.svg            pass-empty.svg
== standalone--0-0--px-pct.svg          pass-empty.svg
== standalone--0-0--px-px.svg           pass-empty.svg

== standalone--0-auto--0-0.svg          pass-empty.svg
== standalone--0-auto--0-pct.svg        pass-empty.svg
== standalone--0-auto--0-px.svg         pass-empty.svg
== standalone--0-auto--pct-0.svg        pass-empty.svg
== standalone--0-auto--pct-pct.svg      pass-empty.svg
== standalone--0-auto--pct-px.svg       pass-empty.svg
== standalone--0-auto--px-0.svg         pass-empty.svg
== standalone--0-auto--px-pct.svg       pass-empty.svg
== standalone--0-auto--px-px.svg        pass-empty.svg

== standalone--0-pct--0-0.svg           pass-empty.svg
== standalone--0-pct--0-pct.svg         pass-empty.svg
== standalone--0-pct--0-px.svg          pass-empty.svg
== standalone--0-pct--pct-0.svg         pass-empty.svg
== standalone--0-pct--pct-pct.svg       pass-empty.svg
== standalone--0-pct--pct-px.svg        pass-empty.svg
== standalone--0-pct--px-0.svg          pass-empty.svg
== standalone--0-pct--px-pct.svg        pass-empty.svg
== standalone--0-pct--px-px.svg         pass-empty.svg

== standalone--0-px--0-0.svg            pass-empty.svg
== standalone--0-px--0-pct.svg          pass-empty.svg
== standalone--0-px--0-px.svg           pass-empty.svg
== standalone--0-px--pct-0.svg          pass-empty.svg
== standalone--0-px--pct-pct.svg        pass-empty.svg
== standalone--0-px--pct-px.svg         pass-empty.svg
== standalone--0-px--px-0.svg           pass-empty.svg
== standalone--0-px--px-pct.svg         pass-empty.svg
== standalone--0-px--px-px.svg          pass-empty.svg

== standalone--auto-0--0-0.svg          pass-empty.svg
== standalone--auto-0--0-pct.svg        pass-empty.svg
== standalone--auto-0--0-px.svg         pass-empty.svg
== standalone--auto-0--pct-0.svg        pass-empty.svg
== standalone--auto-0--pct-pct.svg      pass-empty.svg
== standalone--auto-0--pct-px.svg       pass-empty.svg
== standalone--auto-0--px-0.svg         pass-empty.svg
== standalone--auto-0--px-pct.svg       pass-empty.svg
== standalone--auto-0--px-px.svg        pass-empty.svg

== standalone--auto-auto--0-0.svg       pass-empty.svg
== standalone--auto-auto--0-pct.svg     pass-empty.svg
== standalone--auto-auto--0-px.svg      pass-empty.svg
== standalone--auto-auto--pct-0.svg     pass-empty.svg
fuzzy-if(d2d,0-1,0-400) == standalone--auto-auto--pct-pct.svg   pass-pct-pct.xhtml
== standalone--auto-auto--pct-px.svg    pass-pct-px.xhtml
== standalone--auto-auto--px-0.svg      pass-empty.svg
== standalone--auto-auto--px-pct.svg    pass-px-pct.xhtml
== standalone--auto-auto--px-px.svg     pass-px-px.xhtml

== standalone--auto-pct--0-0.svg        pass-empty.svg
== standalone--auto-pct--0-pct.svg      pass-empty.svg
== standalone--auto-pct--0-px.svg       pass-empty.svg
fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-0.svg      pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-pct.svg    pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-px.svg     pass-pct-pct.xhtml
== standalone--auto-pct--px-0.svg       pass-px-pct.xhtml
== standalone--auto-pct--px-pct.svg     pass-px-pct.xhtml
fuzzy-if(d2d,0-1,0-1000) == standalone--auto-pct--px-px.svg      pass-pct-height-square.xhtml # intrinsic ratio!

== standalone--auto-px--0-0.svg         pass-empty.svg
== standalone--auto-px--0-pct.svg       pass-empty.svg
== standalone--auto-px--0-px.svg        pass-empty.svg
== standalone--auto-px--pct-0.svg       pass-pct-px.xhtml
== standalone--auto-px--pct-pct.svg     pass-pct-px.xhtml
== standalone--auto-px--pct-px.svg      pass-pct-px.xhtml
== standalone--auto-px--px-0.svg        pass-px-px.xhtml
== standalone--auto-px--px-pct.svg      pass-px-px.xhtml
== standalone--auto-px--px-px.svg       pass-px-px.xhtml # intrinsic ratio!

== standalone--pct-0--0-0.svg           pass-empty.svg
== standalone--pct-0--0-pct.svg         pass-empty.svg
== standalone--pct-0--0-px.svg          pass-empty.svg
== standalone--pct-0--pct-0.svg         pass-empty.svg
== standalone--pct-0--pct-pct.svg       pass-empty.svg
== standalone--pct-0--pct-px.svg        pass-empty.svg
== standalone--pct-0--px-0.svg          pass-empty.svg
== standalone--pct-0--px-pct.svg        pass-empty.svg
== standalone--pct-0--px-px.svg         pass-empty.svg

== standalone--pct-auto--0-0.svg        pass-empty.svg
fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--0-pct.svg      pass-pct-pct.xhtml
== standalone--pct-auto--0-px.svg       pass-pct-px.xhtml
== standalone--pct-auto--pct-0.svg      pass-empty.svg
fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--pct-pct.svg    pass-pct-pct.xhtml
== standalone--pct-auto--pct-px.svg     pass-pct-px.xhtml
== standalone--pct-auto--px-0.svg       pass-empty.svg
fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--px-pct.svg     pass-pct-pct.xhtml
== standalone--pct-auto--px-px.svg      pass-pct-width-square.xhtml # intrinsic ratio!

fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-0.svg         pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-pct.svg       pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-px.svg        pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-0.svg       pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-pct.svg     pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-px.svg      pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-0.svg        pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-pct.svg      pass-pct-pct.xhtml
fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-px.svg       pass-pct-pct.xhtml

== standalone--pct-px--0-0.svg          pass-pct-px.xhtml
== standalone--pct-px--0-pct.svg        pass-pct-px.xhtml
== standalone--pct-px--0-px.svg         pass-pct-px.xhtml
== standalone--pct-px--pct-0.svg        pass-pct-px.xhtml
== standalone--pct-px--pct-pct.svg      pass-pct-px.xhtml
== standalone--pct-px--pct-px.svg       pass-pct-px.xhtml
== standalone--pct-px--px-0.svg         pass-pct-px.xhtml
== standalone--pct-px--px-pct.svg       pass-pct-px.xhtml
== standalone--pct-px--px-px.svg        pass-pct-px.xhtml

== standalone--px-0--0-0.svg            pass-empty.svg
== standalone--px-0--0-pct.svg          pass-empty.svg
== standalone--px-0--0-px.svg           pass-empty.svg
== standalone--px-0--pct-0.svg          pass-empty.svg
== standalone--px-0--pct-pct.svg        pass-empty.svg
== standalone--px-0--pct-px.svg         pass-empty.svg
== standalone--px-0--px-0.svg           pass-empty.svg
== standalone--px-0--px-pct.svg         pass-empty.svg
== standalone--px-0--px-px.svg          pass-empty.svg

== standalone--px-auto--0-0.svg         pass-empty.svg
== standalone--px-auto--0-pct.svg       pass-px-pct.xhtml
== standalone--px-auto--0-px.svg        pass-px-px.xhtml
== standalone--px-auto--pct-0.svg       pass-empty.svg
== standalone--px-auto--pct-pct.svg     pass-px-pct.xhtml
== standalone--px-auto--pct-px.svg      pass-px-px.xhtml
== standalone--px-auto--px-0.svg        pass-empty.svg
== standalone--px-auto--px-pct.svg      pass-px-pct.xhtml
== standalone--px-auto--px-px.svg       pass-px-px.xhtml # intrinsic ratio!

== standalone--px-pct--0-0.svg          pass-px-pct.xhtml
== standalone--px-pct--0-pct.svg        pass-px-pct.xhtml
== standalone--px-pct--0-px.svg         pass-px-pct.xhtml
== standalone--px-pct--pct-0.svg        pass-px-pct.xhtml
== standalone--px-pct--pct-pct.svg      pass-px-pct.xhtml
== standalone--px-pct--pct-px.svg       pass-px-pct.xhtml
== standalone--px-pct--px-0.svg         pass-px-pct.xhtml
== standalone--px-pct--px-pct.svg       pass-px-pct.xhtml
== standalone--px-pct--px-px.svg        pass-px-pct.xhtml

== standalone--px-px--0-0.svg           pass-px-px.xhtml
== standalone--px-px--0-pct.svg         pass-px-px.xhtml
== standalone--px-px--0-px.svg          pass-px-px.xhtml
== standalone--px-px--pct-0.svg         pass-px-px.xhtml
== standalone--px-px--pct-pct.svg       pass-px-px.xhtml
== standalone--px-px--pct-px.svg        pass-px-px.xhtml
== standalone--px-px--px-0.svg          pass-px-px.xhtml
== standalone--px-px--px-pct.svg        pass-px-px.xhtml
== standalone--px-px--px-px.svg         pass-px-px.xhtml


# As mentioned above, the 'viewBox' attribute may play a part in the sizing of
# the SVG viewport in 12 of the 144 standalone tests above. The 'viewBox'
# attribute only affects the replaced element sizing algorithm (by providing an
# intrinsic ratio) when the SVG 'width' and 'height' attributes don't provide
# an intrinsic ratio but the algorithm says the intrinsic ratio should be used
# if avaliable. In other words, this is when one of the CSS properties 'width'
# or 'height' has the value 'auto' and the other has a non-zero value, while
# one or both of the SVG 'width' and 'height' attributes has a percentage
# value. For the standalone tests above that means the value of the 'viewBox'
# attribute matters in the 12 cases that follow.
#
# XXX We could also check that 'viewBox' does NOT have an affect in the other
# cases.
#
# XXX What about cases like standalone--auto-pct--0-px--viewBox.svg? Is the
# intrinsic ratio zero and not used, or should we use the viewBox ratio?

== standalone--auto-pct--pct-pct--viewBox.svg   pass-pct-height-square.xhtml
== standalone--auto-pct--pct-px--viewBox.svg    pass-pct-height-square.xhtml
== standalone--auto-pct--px-pct--viewBox.svg    pass-pct-height-square.xhtml
== standalone--auto-px--pct-pct--viewBox.svg    pass-px-px.xhtml
== standalone--auto-px--pct-px--viewBox.svg     pass-px-px.xhtml
== standalone--auto-px--px-pct--viewBox.svg     pass-px-px.xhtml
== standalone--pct-auto--pct-pct--viewBox.svg   pass-pct-width-square.xhtml
== standalone--pct-auto--pct-px--viewBox.svg    pass-pct-width-square.xhtml
== standalone--pct-auto--px-pct--viewBox.svg    pass-pct-width-square.xhtml
== standalone--px-auto--pct-pct--viewBox.svg    pass-px-px.xhtml
== standalone--px-auto--pct-px--viewBox.svg     pass-px-px.xhtml
== standalone--px-auto--px-pct--viewBox.svg     pass-px-px.xhtml


# Sanity tests. These tests check that our choice of percentage width (49%)
# doesn't coincidently result in the same width as our choice of px width
# (70px) or the fall back width (300 px), and that our choice of percentage
# height (49%) doesn't coincidently result in the same height as our choice of
# px height (70px) or the fall back height (150 px). This ensures that we won't
# miss false positives for the tests:
#
#   standalone--pct-xxx--px-xxx.svg
#   standalone--xxx-pct--xxx-px.svg
#   standalone--px-xxx--pct-xxx.svg
#   standalone--xxx-px--xxx-pct.svg
#
# if the user agent ignores the CSS property and uses the attribute instead.
# This will happen if the content area width is 612 px or the content height is
# 306 px. Hopefully it's unlikely testers will encounter this.

!= standalone-sanity-width-pct.svg      standalone-sanity-width-px.svg
!= standalone-sanity-width-pct.svg      standalone-sanity-width-300px.svg
!= standalone-sanity-height-pct.svg     standalone-sanity-height-px.svg
!= standalone-sanity-height-pct.svg     standalone-sanity-height-150px.svg


# Embedded inline tests
#
# The standalone tests provide a reasonable workout for replaced element
# algorithm sizing, but we also want to test that SVG embedded inline is
# positioned correctly when the properties 'display', 'float' and 'position'
# are set to different values.
#
# We could certainly expand on these tests, but they provide reasonable base
# coverage.

== inline--display-block--01.xhtml inline--display-block--01-ref.xhtml
fuzzy-if(OSX,0-1,0-10) == inline--display-inline--01.xhtml inline--display-inline--01-ref.xhtml
== inline--display-inline-block--01.xhtml inline--display-inline-block--01-ref.xhtml
== inline--float-left--01.xhtml            inline--float-left--01-ref.xhtml
== inline--float-right--01.xhtml           inline--float-right--01-ref.xhtml
== inline--position-absolute--01.xhtml     inline--position-absolute--01-ref.xhtml
== inline--position-absolute--02.xhtml     pass.svg
== inline--position-relative--01.xhtml    inline--position-relative--01-ref.xhtml


# Embedded by reference tests
#
# One issue when it comes to documents embedded by reference is whether
# non-'auto' values for the CSS 'width' and 'height' properties on the
# _embedded_ document's root element should be used as intrinsic values by
# replaced elements like HTML <object>. For the sake of simplicity we will
# ignore this case for now, but it's certainly worth revisiting at some point
# in the future.
#
# Since we have given the replaced element algorithm a reasonable workout in
# the standalone tests, for the embedded by reference tests we will simply
# check that the embedded SVG's intrinsic dimensions are used. The following
# tests do not have any width or height on the <object> element so they should
# be sized purely by the embedded SVG's intrinsic size.

random-if(Android) == object--auto-auto--0-0.html          pass-empty.svg # XXX add border
random-if(Android) == object--auto-auto--0-pct.html        object--auto-auto--0-pct--ref.html
random-if(Android) == object--auto-auto--0-px.html         object--auto-auto--0-px--ref.html
random-if(Android) == object--auto-auto--pct-0.html        object--auto-auto--pct-0--ref.html
# The following four commented out tests fail post bug 428023:
#== object--auto-auto--pct-pct.html      object--auto-auto--pct-pct--ref.html
#== object--auto-auto--pct-px.html       object--auto-auto--pct-px--ref.html
random-if(Android) == object--auto-auto--px-0.html         object--auto-auto--px-0--ref.html
#== object--auto-auto--px-pct.html       object--auto-auto--px-pct--ref.html
random-if(Android) == object--auto-auto--px-px.html        object--auto-auto--px-px--ref.html
#== object--pct-pct--0-0.html            pass.svg


# Assorted tests to check that dynamic changes work correctly
#
# Here we have an assortment of different tests to check that updates occur
# correctly when changes are made that should result in a change in the size
# or position of the SVG.

== dynamic--inline-css-height.xhtml             pass.svg
== dynamic--inline-css-width.xhtml              pass.svg
skip == dynamic--inline-resize-window-height.xhtml  pass.svg # XXX breaks the reftest run as the window height somehow is not restored
skip == dynamic--inline-resize-window-width.xhtml    pass.svg # Fails way too much
fails random-if(Android) == dynamic--object-svg-unloaded.xhtml     pass.svg
# == dynamic--object--auto-auto--pct-px.html