summaryrefslogtreecommitdiffstats
path: root/layout/reftests/bugs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /layout/reftests/bugs
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/bugs')
-rw-r--r--layout/reftests/bugs/1003425-1-ref.html11
-rw-r--r--layout/reftests/bugs/1003425-1.html18
-rw-r--r--layout/reftests/bugs/1003425-2-ref.html11
-rw-r--r--layout/reftests/bugs/1003425-2.html18
-rw-r--r--layout/reftests/bugs/10036-1-ref.html8
-rw-r--r--layout/reftests/bugs/10036-1.html8
-rw-r--r--layout/reftests/bugs/1005405-1-ref.html12
-rw-r--r--layout/reftests/bugs/1005405-1.html19
-rw-r--r--layout/reftests/bugs/100x80-white-rect-top-right.pngbin0 -> 157 bytes
-rw-r--r--layout/reftests/bugs/1012640-1-ref.html21
-rw-r--r--layout/reftests/bugs/1012640-1.html21
-rw-r--r--layout/reftests/bugs/1013054-1-ref.html4
-rw-r--r--layout/reftests/bugs/1013054-1.html13
-rw-r--r--layout/reftests/bugs/1018522-1-ref.html21
-rw-r--r--layout/reftests/bugs/1018522-1.html30
-rw-r--r--layout/reftests/bugs/10209-1.html16
-rw-r--r--layout/reftests/bugs/10209-2.html16
-rw-r--r--layout/reftests/bugs/10209-3-ref.html14
-rw-r--r--layout/reftests/bugs/10209-3.html13
-rw-r--r--layout/reftests/bugs/10209-ref.html14
-rw-r--r--layout/reftests/bugs/1021564-1.html46
-rw-r--r--layout/reftests/bugs/1021564-2.html45
-rw-r--r--layout/reftests/bugs/1021564-3.html46
-rw-r--r--layout/reftests/bugs/1021564-4.html45
-rw-r--r--layout/reftests/bugs/1021564-ref.html28
-rw-r--r--layout/reftests/bugs/1022481-1-ref.html36
-rw-r--r--layout/reftests/bugs/1022481-1.html36
-rw-r--r--layout/reftests/bugs/1022612-1-ref.html7
-rw-r--r--layout/reftests/bugs/1022612-1.html7
-rw-r--r--layout/reftests/bugs/1024473-1-ref.html11
-rw-r--r--layout/reftests/bugs/1024473-1.html16
-rw-r--r--layout/reftests/bugs/1025914-1-ref.html44
-rw-r--r--layout/reftests/bugs/1025914-1.html59
-rw-r--r--layout/reftests/bugs/1035091-2.html8
-rw-r--r--layout/reftests/bugs/1035091-ref.html2
-rw-r--r--layout/reftests/bugs/1042104-1-ref.html27
-rw-r--r--layout/reftests/bugs/1042104-1.html48
-rw-r--r--layout/reftests/bugs/1043537-1-ref.html25
-rw-r--r--layout/reftests/bugs/1043537-1.html26
-rw-r--r--layout/reftests/bugs/1044198-1-ref.html47
-rw-r--r--layout/reftests/bugs/1044198-1.html47
-rw-r--r--layout/reftests/bugs/1049499-1-ref.html20
-rw-r--r--layout/reftests/bugs/1049499-1.html27
-rw-r--r--layout/reftests/bugs/105-1-ref.html8
-rw-r--r--layout/reftests/bugs/105-1.html8
-rw-r--r--layout/reftests/bugs/105030-1-ref.html16
-rw-r--r--layout/reftests/bugs/105030-1.html26
-rw-r--r--layout/reftests/bugs/1050493-1-ref.html18
-rw-r--r--layout/reftests/bugs/1050493-1.html41
-rw-r--r--layout/reftests/bugs/1050788-1.html34
-rw-r--r--layout/reftests/bugs/1053035-1-flex.html17
-rw-r--r--layout/reftests/bugs/1053035-1-grid.html17
-rw-r--r--layout/reftests/bugs/1053035-1-ref.html17
-rw-r--r--layout/reftests/bugs/1059167-1-ref.html29
-rw-r--r--layout/reftests/bugs/1059167-1.html30
-rw-r--r--layout/reftests/bugs/1059498-1-ref.html20
-rw-r--r--layout/reftests/bugs/1059498-1.html32
-rw-r--r--layout/reftests/bugs/1059498-2.html40
-rw-r--r--layout/reftests/bugs/1059498-3.html41
-rw-r--r--layout/reftests/bugs/1062108-1-ref.html16
-rw-r--r--layout/reftests/bugs/1062108-1.html16
-rw-r--r--layout/reftests/bugs/1062792-1-ref.html20
-rw-r--r--layout/reftests/bugs/1062792-1.html22
-rw-r--r--layout/reftests/bugs/1066554-1-ref.html14
-rw-r--r--layout/reftests/bugs/1066554-1.html24
-rw-r--r--layout/reftests/bugs/1069716-1-ref.html11
-rw-r--r--layout/reftests/bugs/1069716-1.html20
-rw-r--r--layout/reftests/bugs/1078262-1.html34
-rw-r--r--layout/reftests/bugs/1081072-1-ref.html15
-rw-r--r--layout/reftests/bugs/1081072-1.html44
-rw-r--r--layout/reftests/bugs/1081185-1-ref.html31
-rw-r--r--layout/reftests/bugs/1081185-1.html32
-rw-r--r--layout/reftests/bugs/109735-1-ref.html11
-rw-r--r--layout/reftests/bugs/109735-1.html11
-rw-r--r--layout/reftests/bugs/1097437-1-ref.html20
-rw-r--r--layout/reftests/bugs/1097437-1.html14
-rw-r--r--layout/reftests/bugs/1098266-1-ref.html9
-rw-r--r--layout/reftests/bugs/1098266-1.html9
-rw-r--r--layout/reftests/bugs/1103258-1-ref.html13
-rw-r--r--layout/reftests/bugs/1103258-1.html37
-rw-r--r--layout/reftests/bugs/1105137-1-ref.html35
-rw-r--r--layout/reftests/bugs/1105137-1.html35
-rw-r--r--layout/reftests/bugs/1111753-1.html38
-rw-r--r--layout/reftests/bugs/1114526-1-ref.html5
-rw-r--r--layout/reftests/bugs/1114526-1.gifbin0 -> 317 bytes
-rw-r--r--layout/reftests/bugs/1114526-1.html68
-rw-r--r--layout/reftests/bugs/1116480-1-fakeitalic-overflow-ref.html32
-rw-r--r--layout/reftests/bugs/1116480-1-fakeitalic-overflow.html32
-rw-r--r--layout/reftests/bugs/1119117-1-ref.html19
-rw-r--r--layout/reftests/bugs/1119117-1a.html29
-rw-r--r--layout/reftests/bugs/1119117-1b.html30
-rw-r--r--layout/reftests/bugs/1120431-1-ref.html202
-rw-r--r--layout/reftests/bugs/1120431-1.html205
-rw-r--r--layout/reftests/bugs/1120431-2-ref.html204
-rw-r--r--layout/reftests/bugs/1120431-2.html207
-rw-r--r--layout/reftests/bugs/1121748-1-ref.html33
-rw-r--r--layout/reftests/bugs/1121748-1.html38
-rw-r--r--layout/reftests/bugs/1121748-2-ref.html28
-rw-r--r--layout/reftests/bugs/1121748-2.html34
-rw-r--r--layout/reftests/bugs/1127107-1-ref.html21
-rw-r--r--layout/reftests/bugs/1127107-1a-nowrap.html27
-rw-r--r--layout/reftests/bugs/1127107-1b-pre.html24
-rw-r--r--layout/reftests/bugs/1127107-2-capitalize-ref.html21
-rw-r--r--layout/reftests/bugs/1127107-2-capitalize.html25
-rw-r--r--layout/reftests/bugs/1127679-1a-inline-flex-relpos.html22
-rw-r--r--layout/reftests/bugs/1127679-1b-inline-flex-relpos.html22
-rw-r--r--layout/reftests/bugs/1128354-1-ref.html50
-rw-r--r--layout/reftests/bugs/1128354-1.html54
-rw-r--r--layout/reftests/bugs/1130231-1-button-padding-rtl-ref.html32
-rw-r--r--layout/reftests/bugs/1130231-1-button-padding-rtl.html32
-rw-r--r--layout/reftests/bugs/1130231-2-button-padding-rtl-ref.html36
-rw-r--r--layout/reftests/bugs/1130231-2-button-padding-rtl.html32
-rw-r--r--layout/reftests/bugs/1133905-1-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-1-h.html9
-rw-r--r--layout/reftests/bugs/1133905-1-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-1-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-1-v.html9
-rw-r--r--layout/reftests/bugs/1133905-1-vh-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-1-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-1.html8
-rw-r--r--layout/reftests/bugs/1133905-2-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-2-h.html9
-rw-r--r--layout/reftests/bugs/1133905-2-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-2-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-2-v.html9
-rw-r--r--layout/reftests/bugs/1133905-2-vh-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-2-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-2.html8
-rw-r--r--layout/reftests/bugs/1133905-3-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-3-h.html9
-rw-r--r--layout/reftests/bugs/1133905-3-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-3-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-3-v.html9
-rw-r--r--layout/reftests/bugs/1133905-3-vh-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-3-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-3.html8
-rw-r--r--layout/reftests/bugs/1133905-4-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-4-h.html9
-rw-r--r--layout/reftests/bugs/1133905-4-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-4-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-4-v.html9
-rw-r--r--layout/reftests/bugs/1133905-4-vh-rtl.html20
-rw-r--r--layout/reftests/bugs/1133905-4-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-4.html8
-rw-r--r--layout/reftests/bugs/1133905-5-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-5-h.html9
-rw-r--r--layout/reftests/bugs/1133905-5-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-5-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-5-v.html9
-rw-r--r--layout/reftests/bugs/1133905-5-vh-rtl.html20
-rw-r--r--layout/reftests/bugs/1133905-5-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-5.html8
-rw-r--r--layout/reftests/bugs/1133905-6-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-6-h.html9
-rw-r--r--layout/reftests/bugs/1133905-6-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-6-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-6-v.html9
-rw-r--r--layout/reftests/bugs/1133905-6-vh-rtl.html20
-rw-r--r--layout/reftests/bugs/1133905-6-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-6.html8
-rw-r--r--layout/reftests/bugs/1133905-ref-h-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-ref-h.html9
-rw-r--r--layout/reftests/bugs/1133905-ref-rtl.html9
-rw-r--r--layout/reftests/bugs/1133905-ref-v-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-ref-v.html9
-rw-r--r--layout/reftests/bugs/1133905-ref-vh-rtl.html10
-rw-r--r--layout/reftests/bugs/1133905-ref-vh.html9
-rw-r--r--layout/reftests/bugs/1133905-ref.html8
-rw-r--r--layout/reftests/bugs/1149304-1-transform-change-ref.html13
-rw-r--r--layout/reftests/bugs/1149304-1-transform-change.html23
-rw-r--r--layout/reftests/bugs/1151145-1-ref.html10
-rw-r--r--layout/reftests/bugs/1151145-1.html21
-rw-r--r--layout/reftests/bugs/1151306-1-ref.html30
-rw-r--r--layout/reftests/bugs/1151306-1.html41
-rw-r--r--layout/reftests/bugs/1153845-1-ref.html16
-rw-r--r--layout/reftests/bugs/1153845-1.html17
-rw-r--r--layout/reftests/bugs/1155828-1-ref.html25
-rw-r--r--layout/reftests/bugs/1155828-1.html26
-rw-r--r--layout/reftests/bugs/1156129-1-ref.html36
-rw-r--r--layout/reftests/bugs/1156129-1.html44
-rw-r--r--layout/reftests/bugs/1157127-1-ref.html15
-rw-r--r--layout/reftests/bugs/1157127-1.html16
-rw-r--r--layout/reftests/bugs/1157127-subframe.xml1
-rw-r--r--layout/reftests/bugs/116882-1-ref.html12
-rw-r--r--layout/reftests/bugs/116882-1.html11
-rw-r--r--layout/reftests/bugs/1169331-1-ref.html46
-rw-r--r--layout/reftests/bugs/1169331-1.html54
-rw-r--r--layout/reftests/bugs/1174332-1-ref.html36
-rw-r--r--layout/reftests/bugs/1174332-1.html20
-rw-r--r--layout/reftests/bugs/1179078-1-ref.html8
-rw-r--r--layout/reftests/bugs/1179078-1.html9
-rw-r--r--layout/reftests/bugs/1179288-1-ref.html3
-rw-r--r--layout/reftests/bugs/1179288-1.html6
-rw-r--r--layout/reftests/bugs/1185266-1-ref.svg9
-rw-r--r--layout/reftests/bugs/1185266-1.svg23
-rw-r--r--layout/reftests/bugs/1190635-1-ref.html9
-rw-r--r--layout/reftests/bugs/1190635-1.html17
-rw-r--r--layout/reftests/bugs/1200611-1-ref.html22
-rw-r--r--layout/reftests/bugs/1200611-1.html16
-rw-r--r--layout/reftests/bugs/1202512-1-ref.html2
-rw-r--r--layout/reftests/bugs/1202512-1.html13
-rw-r--r--layout/reftests/bugs/1202512-2-ref.html2
-rw-r--r--layout/reftests/bugs/1202512-2.html13
-rw-r--r--layout/reftests/bugs/1207326-1.html41
-rw-r--r--layout/reftests/bugs/120834-1-ref.html11
-rw-r--r--layout/reftests/bugs/120834-1a.html13
-rw-r--r--layout/reftests/bugs/120834-2-ref.html12
-rw-r--r--layout/reftests/bugs/120834-2a.html14
-rw-r--r--layout/reftests/bugs/120834-2b.html15
-rw-r--r--layout/reftests/bugs/120834-2c.html15
-rw-r--r--layout/reftests/bugs/120834-2d.html15
-rw-r--r--layout/reftests/bugs/120834-2e.html15
-rw-r--r--layout/reftests/bugs/120834-2f.html15
-rw-r--r--layout/reftests/bugs/120834-2g.html16
-rw-r--r--layout/reftests/bugs/120834-2h.html15
-rw-r--r--layout/reftests/bugs/120834-2i.html15
-rw-r--r--layout/reftests/bugs/120834-2j.html15
-rw-r--r--layout/reftests/bugs/1209603-1-ref.html13
-rw-r--r--layout/reftests/bugs/1209603-1.html50
-rw-r--r--layout/reftests/bugs/1209994-1-ref.html17
-rw-r--r--layout/reftests/bugs/1209994-1.html21
-rw-r--r--layout/reftests/bugs/1209994-2-ref.html17
-rw-r--r--layout/reftests/bugs/1209994-2.html21
-rw-r--r--layout/reftests/bugs/1209994-3-ref.html17
-rw-r--r--layout/reftests/bugs/1209994-3.html21
-rw-r--r--layout/reftests/bugs/1209994-4-ref.html17
-rw-r--r--layout/reftests/bugs/1209994-4.html21
-rw-r--r--layout/reftests/bugs/1219985-1.html16
-rw-r--r--layout/reftests/bugs/1219985-2.html17
-rw-r--r--layout/reftests/bugs/1219985-3.html16
-rw-r--r--layout/reftests/bugs/1219985-4.html17
-rw-r--r--layout/reftests/bugs/1219985-5.html17
-rw-r--r--layout/reftests/bugs/1219985-6.html16
-rw-r--r--layout/reftests/bugs/1219985-7.html17
-rw-r--r--layout/reftests/bugs/1219985-8.html17
-rw-r--r--layout/reftests/bugs/1219985-ref-opaque-clear.html5
-rw-r--r--layout/reftests/bugs/1219985-ref-opaque-with-rendering.html7
-rw-r--r--layout/reftests/bugs/1219985-ref-transparent-clear.html5
-rw-r--r--layout/reftests/bugs/1219985-ref-transparent-with-rendering.html7
-rw-r--r--layout/reftests/bugs/1222226-1-ref.html10
-rw-r--r--layout/reftests/bugs/1222226-1.html20
-rw-r--r--layout/reftests/bugs/1226278-ref.html25
-rw-r--r--layout/reftests/bugs/1226278.html26
-rw-r--r--layout/reftests/bugs/1230466.html12
-rw-r--r--layout/reftests/bugs/1238243-1-notref.html17
-rw-r--r--layout/reftests/bugs/1238243-1.html18
-rw-r--r--layout/reftests/bugs/1238243-2-ref.html16
-rw-r--r--layout/reftests/bugs/1238243-2.html17
-rw-r--r--layout/reftests/bugs/1239564-ref.html21
-rw-r--r--layout/reftests/bugs/1239564.html29
-rw-r--r--layout/reftests/bugs/1241631-1-ref.html5
-rw-r--r--layout/reftests/bugs/1241631-1.html10
-rw-r--r--layout/reftests/bugs/1242172-1-ref.html6
-rw-r--r--layout/reftests/bugs/1242172-1-subdoc.html9
-rw-r--r--layout/reftests/bugs/1242172-1.html12
-rw-r--r--layout/reftests/bugs/1242172-2-ref.html12
-rw-r--r--layout/reftests/bugs/1242172-2.html10
-rw-r--r--layout/reftests/bugs/1242781-ref.html6
-rw-r--r--layout/reftests/bugs/1242781.html6
-rw-r--r--layout/reftests/bugs/124903-1-ref.html15
-rw-r--r--layout/reftests/bugs/124903-1.html15
-rw-r--r--layout/reftests/bugs/1260543-1-ref.html10
-rw-r--r--layout/reftests/bugs/1260543-1.html35
-rw-r--r--layout/reftests/bugs/1263845-ref.html10
-rw-r--r--layout/reftests/bugs/1263845.html15
-rw-r--r--layout/reftests/bugs/1271714-1-ref.html18
-rw-r--r--layout/reftests/bugs/1271714-1.html39
-rw-r--r--layout/reftests/bugs/1272997-1-ref.html15
-rw-r--r--layout/reftests/bugs/1272997-1.html23
-rw-r--r--layout/reftests/bugs/1273154-1-ref.html20
-rw-r--r--layout/reftests/bugs/1273154-1.html23
-rw-r--r--layout/reftests/bugs/1273154-2-ref.html20
-rw-r--r--layout/reftests/bugs/1273154-2.html23
-rw-r--r--layout/reftests/bugs/1274368-1-ref.html14
-rw-r--r--layout/reftests/bugs/1274368-1.html14
-rw-r--r--layout/reftests/bugs/1275411-1-ref.html13
-rw-r--r--layout/reftests/bugs/1275411-1.html13
-rw-r--r--layout/reftests/bugs/1276161-1-notref.html25
-rw-r--r--layout/reftests/bugs/1276161-1a.html25
-rw-r--r--layout/reftests/bugs/1276161-1b.html25
-rw-r--r--layout/reftests/bugs/1288255-ref.html24
-rw-r--r--layout/reftests/bugs/1288255.html34
-rw-r--r--layout/reftests/bugs/128896-ref.html13
-rw-r--r--layout/reftests/bugs/128896-style.css4
-rw-r--r--layout/reftests/bugs/128896.html11
-rw-r--r--layout/reftests/bugs/1291528-ref.html35
-rw-r--r--layout/reftests/bugs/1291528.html29
-rw-r--r--layout/reftests/bugs/1294102-1-ref.html6
-rw-r--r--layout/reftests/bugs/1294102-1.html6
-rw-r--r--layout/reftests/bugs/1295466-1-ref.xhtml52
-rw-r--r--layout/reftests/bugs/1295466-1.xhtml173
-rw-r--r--layout/reftests/bugs/130767-1-ref.html9
-rw-r--r--layout/reftests/bugs/130767-1.html9
-rw-r--r--layout/reftests/bugs/1313772-ref.xhtml53
-rw-r--r--layout/reftests/bugs/1313772.xhtml174
-rw-r--r--layout/reftests/bugs/1315113-1-ref.html21
-rw-r--r--layout/reftests/bugs/1315113-1.html23
-rw-r--r--layout/reftests/bugs/1315113-2-ref.html21
-rw-r--r--layout/reftests/bugs/1315113-2.html23
-rw-r--r--layout/reftests/bugs/1315632-1-ref.html5
-rw-r--r--layout/reftests/bugs/1315632-1.html11
-rw-r--r--layout/reftests/bugs/1316719-1-ref.html19
-rw-r--r--layout/reftests/bugs/1316719-1a.html42
-rw-r--r--layout/reftests/bugs/1316719-1b.html35
-rw-r--r--layout/reftests/bugs/1316719-1c.html29
-rw-r--r--layout/reftests/bugs/1318769-1-ref.html17
-rw-r--r--layout/reftests/bugs/1318769-1.html18
-rw-r--r--layout/reftests/bugs/1322512-1-ref.html6
-rw-r--r--layout/reftests/bugs/1322512-1.html6
-rw-r--r--layout/reftests/bugs/1330051-ref.svg17
-rw-r--r--layout/reftests/bugs/1330051.svg17
-rw-r--r--layout/reftests/bugs/1336591-1-ref.html23
-rw-r--r--layout/reftests/bugs/1336591-1.html34
-rw-r--r--layout/reftests/bugs/134706-1-left-scrollframe-ref.html20
-rw-r--r--layout/reftests/bugs/134706-1-left-scrollframe.html34
-rw-r--r--layout/reftests/bugs/134706-1-left-table-ref.html18
-rw-r--r--layout/reftests/bugs/134706-1-left-table.html34
-rw-r--r--layout/reftests/bugs/134706-1-right-scrollframe-ref.html20
-rw-r--r--layout/reftests/bugs/134706-1-right-scrollframe.html34
-rw-r--r--layout/reftests/bugs/134706-1-right-table-ref.html18
-rw-r--r--layout/reftests/bugs/134706-1-right-table.html34
-rw-r--r--layout/reftests/bugs/134706-2-left-ref.html20
-rw-r--r--layout/reftests/bugs/134706-2-left-scrollframe.html35
-rw-r--r--layout/reftests/bugs/134706-2-left-table.html35
-rw-r--r--layout/reftests/bugs/134706-2-right-ref.html20
-rw-r--r--layout/reftests/bugs/134706-2-right-scrollframe.html35
-rw-r--r--layout/reftests/bugs/134706-2-right-table.html35
-rw-r--r--layout/reftests/bugs/134706-3-left-scrollframe-ref.html18
-rw-r--r--layout/reftests/bugs/134706-3-left-scrollframe.html34
-rw-r--r--layout/reftests/bugs/134706-3-left-table-ref.html18
-rw-r--r--layout/reftests/bugs/134706-3-left-table.html34
-rw-r--r--layout/reftests/bugs/134706-3-right-scrollframe-ref.html18
-rw-r--r--layout/reftests/bugs/134706-3-right-scrollframe.html34
-rw-r--r--layout/reftests/bugs/134706-3-right-table-ref.html18
-rw-r--r--layout/reftests/bugs/134706-3-right-table.html34
-rw-r--r--layout/reftests/bugs/134706-4-ref.html61
-rw-r--r--layout/reftests/bugs/134706-4.html86
-rw-r--r--layout/reftests/bugs/134706-5-ref.html38
-rw-r--r--layout/reftests/bugs/134706-5.html44
-rw-r--r--layout/reftests/bugs/134706-6-ref.html178
-rw-r--r--layout/reftests/bugs/134706-6.html175
-rw-r--r--layout/reftests/bugs/134706-6b-ref.html63
-rw-r--r--layout/reftests/bugs/134706-6c-ref.html63
-rw-r--r--layout/reftests/bugs/134706-7-ref.html111
-rw-r--r--layout/reftests/bugs/134706-7.html114
-rw-r--r--layout/reftests/bugs/1348481-1.html15
-rw-r--r--layout/reftests/bugs/1348481-2.html10
-rw-r--r--layout/reftests/bugs/1348481-ref.html7
-rw-r--r--layout/reftests/bugs/1351924-1-ref.html15
-rw-r--r--layout/reftests/bugs/1351924-1.html20
-rw-r--r--layout/reftests/bugs/1351924-2-ref.html15
-rw-r--r--layout/reftests/bugs/1351924-2.html20
-rw-r--r--layout/reftests/bugs/1352306-1-ref.html4
-rw-r--r--layout/reftests/bugs/1352306-1.html20
-rw-r--r--layout/reftests/bugs/1352464-1-ref.html9
-rw-r--r--layout/reftests/bugs/1352464-1.html9
-rw-r--r--layout/reftests/bugs/1358375-1.html13
-rw-r--r--layout/reftests/bugs/1358375-2.html14
-rw-r--r--layout/reftests/bugs/1358375-3.html14
-rw-r--r--layout/reftests/bugs/1358375-ref.html11
-rw-r--r--layout/reftests/bugs/1364280-1-ref.html9
-rw-r--r--layout/reftests/bugs/1364280-1.html12
-rw-r--r--layout/reftests/bugs/1364280-2-ref.html8
-rw-r--r--layout/reftests/bugs/1364280-2a.html9
-rw-r--r--layout/reftests/bugs/1364280-2b.html9
-rw-r--r--layout/reftests/bugs/1364280-2c.html9
-rw-r--r--layout/reftests/bugs/1364360-1-ref.html15
-rw-r--r--layout/reftests/bugs/1364360-1.html15
-rw-r--r--layout/reftests/bugs/1365159-1-ref.html5
-rw-r--r--layout/reftests/bugs/1365159-1.html8
-rw-r--r--layout/reftests/bugs/1365162-1-ref.html10
-rw-r--r--layout/reftests/bugs/1365162-1.html13
-rw-r--r--layout/reftests/bugs/1366144-ref.html5
-rw-r--r--layout/reftests/bugs/1366144.html11
-rw-r--r--layout/reftests/bugs/1367592-1-ref.html7
-rw-r--r--layout/reftests/bugs/1367592-1.html9
-rw-r--r--layout/reftests/bugs/1368113-1-ref.html5
-rw-r--r--layout/reftests/bugs/1368113-1.html13
-rw-r--r--layout/reftests/bugs/1369584-1-ref.html7
-rw-r--r--layout/reftests/bugs/1369584-1a.html11
-rw-r--r--layout/reftests/bugs/1369584-1b.html16
-rw-r--r--layout/reftests/bugs/1369954-1-ref.xhtml17
-rw-r--r--layout/reftests/bugs/1369954-1.xhtml33
-rw-r--r--layout/reftests/bugs/1369985-1-ref.html25
-rw-r--r--layout/reftests/bugs/1369985-1.html29
-rw-r--r--layout/reftests/bugs/1371130-ref.xhtml29
-rw-r--r--layout/reftests/bugs/1371130.xhtml29
-rw-r--r--layout/reftests/bugs/1372041-ref.html2
-rw-r--r--layout/reftests/bugs/1372041.css1
-rw-r--r--layout/reftests/bugs/1372041.html3
-rw-r--r--layout/reftests/bugs/1374062-ref.html8
-rw-r--r--layout/reftests/bugs/1374062.html16
-rw-r--r--layout/reftests/bugs/1375315-1-ref.html6
-rw-r--r--layout/reftests/bugs/1375315-1.html12
-rw-r--r--layout/reftests/bugs/1375315-10-ref.html4
-rw-r--r--layout/reftests/bugs/1375315-10.html10
-rw-r--r--layout/reftests/bugs/1375315-11-ref.html4
-rw-r--r--layout/reftests/bugs/1375315-11.html10
-rw-r--r--layout/reftests/bugs/1375315-12-ref.html5
-rw-r--r--layout/reftests/bugs/1375315-12.html11
-rw-r--r--layout/reftests/bugs/1375315-2-ref.html6
-rw-r--r--layout/reftests/bugs/1375315-2.html12
-rw-r--r--layout/reftests/bugs/1375315-3-ref.html6
-rw-r--r--layout/reftests/bugs/1375315-3.html12
-rw-r--r--layout/reftests/bugs/1375315-4-ref.html6
-rw-r--r--layout/reftests/bugs/1375315-4.html12
-rw-r--r--layout/reftests/bugs/1375315-5-ref.html5
-rw-r--r--layout/reftests/bugs/1375315-5.html11
-rw-r--r--layout/reftests/bugs/1375315-6-ref.html5
-rw-r--r--layout/reftests/bugs/1375315-6.html11
-rw-r--r--layout/reftests/bugs/1375315-7-ref.html4
-rw-r--r--layout/reftests/bugs/1375315-7.html10
-rw-r--r--layout/reftests/bugs/1375315-8-ref.html4
-rw-r--r--layout/reftests/bugs/1375315-8.html10
-rw-r--r--layout/reftests/bugs/1375315-9-ref.html4
-rw-r--r--layout/reftests/bugs/1375315-9.html10
-rw-r--r--layout/reftests/bugs/1375674-ref.html11
-rw-r--r--layout/reftests/bugs/1375674.html18
-rw-r--r--layout/reftests/bugs/1376092-ref.html5
-rw-r--r--layout/reftests/bugs/1376092.css1
-rw-r--r--layout/reftests/bugs/1376092.html14
-rw-r--r--layout/reftests/bugs/1377447-1-ref.html3
-rw-r--r--layout/reftests/bugs/1377447-1.html4
-rw-r--r--layout/reftests/bugs/1377447-2.html3
-rw-r--r--layout/reftests/bugs/1379041-ref.html4
-rw-r--r--layout/reftests/bugs/1379041.html11
-rw-r--r--layout/reftests/bugs/1379696-ref.html14
-rw-r--r--layout/reftests/bugs/1379696.html14
-rw-r--r--layout/reftests/bugs/1380224-1-ref.html5
-rw-r--r--layout/reftests/bugs/1380224-1.html11
-rw-r--r--layout/reftests/bugs/1381821-ref.html7
-rw-r--r--layout/reftests/bugs/1381821.html16
-rw-r--r--layout/reftests/bugs/1384065-ref.html10
-rw-r--r--layout/reftests/bugs/1384065.html14
-rw-r--r--layout/reftests/bugs/1384275-1-ref.html5
-rw-r--r--layout/reftests/bugs/1384275-1.html9
-rw-r--r--layout/reftests/bugs/139550-1-ref.html13
-rw-r--r--layout/reftests/bugs/139550-1a.html13
-rw-r--r--layout/reftests/bugs/139550-1b.html13
-rw-r--r--layout/reftests/bugs/1395650-1-ref.html4
-rw-r--r--layout/reftests/bugs/1395650-1.html6
-rw-r--r--layout/reftests/bugs/1398500-1-ref.html11
-rw-r--r--layout/reftests/bugs/1398500-1.html20
-rw-r--r--layout/reftests/bugs/1401317-ref.html15
-rw-r--r--layout/reftests/bugs/1401317.html14
-rw-r--r--layout/reftests/bugs/1401992-ref.html21
-rw-r--r--layout/reftests/bugs/1401992.html32
-rw-r--r--layout/reftests/bugs/1404057-noref.html12
-rw-r--r--layout/reftests/bugs/1404057-ref.html12
-rw-r--r--layout/reftests/bugs/1404057.html12
-rw-r--r--layout/reftests/bugs/1405878-1-ref.xml7
-rw-r--r--layout/reftests/bugs/1405878-1.xml6
-rw-r--r--layout/reftests/bugs/1406179-ref.html4
-rw-r--r--layout/reftests/bugs/1406179.html3
-rw-r--r--layout/reftests/bugs/1406183-1-ref.html23
-rw-r--r--layout/reftests/bugs/1406183-1.html30
-rw-r--r--layout/reftests/bugs/1410028-ref.html2
-rw-r--r--layout/reftests/bugs/1410028.html17
-rw-r--r--layout/reftests/bugs/1412375-ref.html30
-rw-r--r--layout/reftests/bugs/1412375.html31
-rw-r--r--layout/reftests/bugs/1415987-1-ref.html31
-rw-r--r--layout/reftests/bugs/1415987-1.html54
-rw-r--r--layout/reftests/bugs/1419820-1-ref.html6
-rw-r--r--layout/reftests/bugs/1419820-1.html30
-rw-r--r--layout/reftests/bugs/1420946-1-ref.html4
-rw-r--r--layout/reftests/bugs/1420946-1.html9
-rw-r--r--layout/reftests/bugs/142233-1-ref.html11
-rw-r--r--layout/reftests/bugs/142233-1.html11
-rw-r--r--layout/reftests/bugs/1422393-ref.html21
-rw-r--r--layout/reftests/bugs/1422393.html22
-rw-r--r--layout/reftests/bugs/1424177-ref.html14
-rw-r--r--layout/reftests/bugs/1424177.html14
-rw-r--r--layout/reftests/bugs/1424680-ref.html21
-rw-r--r--layout/reftests/bugs/1424680.html19
-rw-r--r--layout/reftests/bugs/1424798-1.html20
-rw-r--r--layout/reftests/bugs/1424798-ref.html16
-rw-r--r--layout/reftests/bugs/1425243-1-ref.html21
-rw-r--r--layout/reftests/bugs/1425243-1.html41
-rw-r--r--layout/reftests/bugs/1425243-2-ref.html8
-rw-r--r--layout/reftests/bugs/1425243-2.html8
-rw-r--r--layout/reftests/bugs/1430869-ref.html37
-rw-r--r--layout/reftests/bugs/1430869.html40
-rw-r--r--layout/reftests/bugs/1432541-ref.html19
-rw-r--r--layout/reftests/bugs/1432541.html20
-rw-r--r--layout/reftests/bugs/144004-1-ref.html18
-rw-r--r--layout/reftests/bugs/144004-1.html18
-rw-r--r--layout/reftests/bugs/144004-2-ref.html18
-rw-r--r--layout/reftests/bugs/144004-2.html18
-rw-r--r--layout/reftests/bugs/144004-3-ref.html6
-rw-r--r--layout/reftests/bugs/144004-3.html6
-rw-r--r--layout/reftests/bugs/1446470.html8
-rw-r--r--layout/reftests/bugs/1456111-1.html14
-rw-r--r--layout/reftests/bugs/1466008-ref.html2
-rw-r--r--layout/reftests/bugs/1466008.html5
-rw-r--r--layout/reftests/bugs/1466638-1-ref.html20
-rw-r--r--layout/reftests/bugs/1466638-1.html20
-rw-r--r--layout/reftests/bugs/1475971-1-ref.html16
-rw-r--r--layout/reftests/bugs/1475971-1.html24
-rw-r--r--layout/reftests/bugs/1483649-1-ref.xhtml45
-rw-r--r--layout/reftests/bugs/1483649-1.xhtml56
-rw-r--r--layout/reftests/bugs/1483946-ref.html4
-rw-r--r--layout/reftests/bugs/1483946.html4
-rw-r--r--layout/reftests/bugs/1488155-ref.html7
-rw-r--r--layout/reftests/bugs/1488155.html14
-rw-r--r--layout/reftests/bugs/1492660-1-ref.html12
-rw-r--r--layout/reftests/bugs/1492660-1.html12
-rw-r--r--layout/reftests/bugs/1499386-ref.html3
-rw-r--r--layout/reftests/bugs/1499386.html6
-rw-r--r--layout/reftests/bugs/1503662-ref.html6
-rw-r--r--layout/reftests/bugs/1503662.html5
-rw-r--r--layout/reftests/bugs/1509425-1-ref.html7
-rw-r--r--layout/reftests/bugs/1509425-1.html28
-rw-r--r--layout/reftests/bugs/1511570-ref.html3
-rw-r--r--layout/reftests/bugs/1511570.html2
-rw-r--r--layout/reftests/bugs/1513423-1-ref.html33
-rw-r--r--layout/reftests/bugs/1513423-1.html33
-rw-r--r--layout/reftests/bugs/1513423-2-ref.html33
-rw-r--r--layout/reftests/bugs/1513423-2.html33
-rw-r--r--layout/reftests/bugs/1513423-3-ref.html16
-rw-r--r--layout/reftests/bugs/1513423-3.html16
-rw-r--r--layout/reftests/bugs/1517385-ref.html18
-rw-r--r--layout/reftests/bugs/1517385.html28
-rw-r--r--layout/reftests/bugs/1529992-1-ref.html75
-rw-r--r--layout/reftests/bugs/1529992-1.html94
-rw-r--r--layout/reftests/bugs/1529992-2-ref.html38
-rw-r--r--layout/reftests/bugs/1529992-2.html55
-rw-r--r--layout/reftests/bugs/1535040-1-ref.html5
-rw-r--r--layout/reftests/bugs/1535040-1.html19
-rw-r--r--layout/reftests/bugs/1544895-ref.html42
-rw-r--r--layout/reftests/bugs/1544895.html39
-rw-r--r--layout/reftests/bugs/1545360-1-ref.xhtml27
-rw-r--r--layout/reftests/bugs/1545360-1.xhtml35
-rw-r--r--layout/reftests/bugs/1546856-1.html61
-rw-r--r--layout/reftests/bugs/1546856-2.html56
-rw-r--r--layout/reftests/bugs/1546856-ref.html23
-rw-r--r--layout/reftests/bugs/1547759-1-ref.html15
-rw-r--r--layout/reftests/bugs/1547759-1.html15
-rw-r--r--layout/reftests/bugs/1548809-ref.html7
-rw-r--r--layout/reftests/bugs/1548809.html6
-rw-r--r--layout/reftests/bugs/1551040.html1
-rw-r--r--layout/reftests/bugs/1551040.txt1
-rw-r--r--layout/reftests/bugs/1552789-1.html25
-rw-r--r--layout/reftests/bugs/1552789-ref-1.html19
-rw-r--r--layout/reftests/bugs/1553571-1-ref.html9
-rw-r--r--layout/reftests/bugs/1553571-1.html34
-rw-r--r--layout/reftests/bugs/1553571-2-ref.html9
-rw-r--r--layout/reftests/bugs/1553571-2.html34
-rw-r--r--layout/reftests/bugs/1558937-1-ref.html9
-rw-r--r--layout/reftests/bugs/1558937-1.html10
-rw-r--r--layout/reftests/bugs/1562733-rotated-nastaliq-1-ref.html14
-rw-r--r--layout/reftests/bugs/1562733-rotated-nastaliq-1.html14
-rw-r--r--layout/reftests/bugs/1562733-rotated-nastaliq-2-ref.html14
-rw-r--r--layout/reftests/bugs/1562733-rotated-nastaliq-2.html14
-rw-r--r--layout/reftests/bugs/1563484-notref.html4
-rw-r--r--layout/reftests/bugs/1563484-ref.html8
-rw-r--r--layout/reftests/bugs/1563484.html5
-rw-r--r--layout/reftests/bugs/1565129.txt1
-rw-r--r--layout/reftests/bugs/1576553-1-ref.html17
-rw-r--r--layout/reftests/bugs/1576553-1.html31
-rw-r--r--layout/reftests/bugs/1577566-1-ref.html20
-rw-r--r--layout/reftests/bugs/1577566-1.html33
-rw-r--r--layout/reftests/bugs/1579953-2-ref.html11
-rw-r--r--layout/reftests/bugs/1579953-2.html16
-rw-r--r--layout/reftests/bugs/1580534-ref.html6
-rw-r--r--layout/reftests/bugs/1580534.html14
-rw-r--r--layout/reftests/bugs/1588954-ref.html21
-rw-r--r--layout/reftests/bugs/1588954.html21
-rw-r--r--layout/reftests/bugs/1595199-1-ref.html20
-rw-r--r--layout/reftests/bugs/1595199-1.html41
-rw-r--r--layout/reftests/bugs/1599841-1-ref.html55
-rw-r--r--layout/reftests/bugs/1599841-1.html60
-rw-r--r--layout/reftests/bugs/1599841-2-notref.html50
-rw-r--r--layout/reftests/bugs/1599841-2.html55
-rw-r--r--layout/reftests/bugs/1606130-ref.html13
-rw-r--r--layout/reftests/bugs/1606130.html10
-rw-r--r--layout/reftests/bugs/1608124-1-ref.html9
-rw-r--r--layout/reftests/bugs/1608124-1.html9
-rw-r--r--layout/reftests/bugs/1608124-2-notref.html6
-rw-r--r--layout/reftests/bugs/1608124-2.html6
-rw-r--r--layout/reftests/bugs/1613380-ref.html8
-rw-r--r--layout/reftests/bugs/1613380.html13
-rw-r--r--layout/reftests/bugs/1614788-1-ref.svg58
-rw-r--r--layout/reftests/bugs/1614788-1.svg83
-rw-r--r--layout/reftests/bugs/1617515-1-ref.html4
-rw-r--r--layout/reftests/bugs/1617515-1.html4
-rw-r--r--layout/reftests/bugs/1624118-ref.html2
-rw-r--r--layout/reftests/bugs/1624118.html18
-rw-r--r--layout/reftests/bugs/1626259-1-ref.html16
-rw-r--r--layout/reftests/bugs/1626259-1.html25
-rw-r--r--layout/reftests/bugs/1626259-2-ref.html16
-rw-r--r--layout/reftests/bugs/1626259-2.html37
-rw-r--r--layout/reftests/bugs/163504-1-inner.html21
-rw-r--r--layout/reftests/bugs/163504-1-ref.html13
-rw-r--r--layout/reftests/bugs/163504-1a.html20
-rw-r--r--layout/reftests/bugs/163504-1b.html20
-rw-r--r--layout/reftests/bugs/163504-2-inner.html21
-rw-r--r--layout/reftests/bugs/163504-2-ref.html13
-rw-r--r--layout/reftests/bugs/163504-2a.html20
-rw-r--r--layout/reftests/bugs/163504-2b.html20
-rw-r--r--layout/reftests/bugs/1641769-1-ref.html25
-rw-r--r--layout/reftests/bugs/1641769-1.html31
-rw-r--r--layout/reftests/bugs/1642583-1-ref.html21
-rw-r--r--layout/reftests/bugs/1642583-1.html32
-rw-r--r--layout/reftests/bugs/1642603-1-ref.html46
-rw-r--r--layout/reftests/bugs/1642603-1.html47
-rw-r--r--layout/reftests/bugs/1645549-2-ref.html14
-rw-r--r--layout/reftests/bugs/1645549-2.html15
-rw-r--r--layout/reftests/bugs/1648282-1-ref.html39
-rw-r--r--layout/reftests/bugs/1648282-1a.html45
-rw-r--r--layout/reftests/bugs/1648282-1b.html45
-rw-r--r--layout/reftests/bugs/1672137-1-notref.html10
-rw-r--r--layout/reftests/bugs/1672137-1.html10
-rw-r--r--layout/reftests/bugs/1673677-1-ref.html66
-rw-r--r--layout/reftests/bugs/1673677-1.html63
-rw-r--r--layout/reftests/bugs/1673677-2-ref.html67
-rw-r--r--layout/reftests/bugs/1673677-2.html64
-rw-r--r--layout/reftests/bugs/1673677-3-ref.html68
-rw-r--r--layout/reftests/bugs/1673677-3.html65
-rw-r--r--layout/reftests/bugs/167496-1-ref.html47
-rw-r--r--layout/reftests/bugs/167496-1.html46
-rw-r--r--layout/reftests/bugs/1686729-1-ref.html6
-rw-r--r--layout/reftests/bugs/1686729-1.html12
-rw-r--r--layout/reftests/bugs/1688004.xhtml9
-rw-r--r--layout/reftests/bugs/169749-1-ref.html35
-rw-r--r--layout/reftests/bugs/169749-1.html35
-rw-r--r--layout/reftests/bugs/1714763-1-ref.html37
-rw-r--r--layout/reftests/bugs/1714763-1.html56
-rw-r--r--layout/reftests/bugs/1714763-2-ref.html38
-rw-r--r--layout/reftests/bugs/1714763-2.html57
-rw-r--r--layout/reftests/bugs/1714763-3-ref.html37
-rw-r--r--layout/reftests/bugs/1714763-3.html56
-rw-r--r--layout/reftests/bugs/172073-1-ref.html10
-rw-r--r--layout/reftests/bugs/172073-1.html10
-rw-r--r--layout/reftests/bugs/1721223-1-notref.html15
-rw-r--r--layout/reftests/bugs/1721223-1.html18
-rw-r--r--layout/reftests/bugs/1726663-1-ref.html10
-rw-r--r--layout/reftests/bugs/1726663-1.html12
-rw-r--r--layout/reftests/bugs/1727016-1-ref.html35
-rw-r--r--layout/reftests/bugs/1727016-1.html35
-rw-r--r--layout/reftests/bugs/1727172-1-ref.html6
-rw-r--r--layout/reftests/bugs/1727172-1.xhtml14
-rw-r--r--layout/reftests/bugs/1730314-1-ref.html6
-rw-r--r--layout/reftests/bugs/1730314-1.html6
-rw-r--r--layout/reftests/bugs/1735265-1-ref.html36
-rw-r--r--layout/reftests/bugs/1735265-1.html40
-rw-r--r--layout/reftests/bugs/1738700-1-ref.html40
-rw-r--r--layout/reftests/bugs/1738700-1.html62
-rw-r--r--layout/reftests/bugs/1743533-1-helper.html17
-rw-r--r--layout/reftests/bugs/1743533-1-notref.html4
-rw-r--r--layout/reftests/bugs/1743533-1.html35
-rw-r--r--layout/reftests/bugs/1743533-2.html4
-rw-r--r--layout/reftests/bugs/1743560-1-ref.html4
-rw-r--r--layout/reftests/bugs/1743560-1.html4
-rw-r--r--layout/reftests/bugs/1743851-1-ref.html44
-rw-r--r--layout/reftests/bugs/1743851-1.html44
-rw-r--r--layout/reftests/bugs/1744468-1-downscaled.pngbin0 -> 4643 bytes
-rw-r--r--layout/reftests/bugs/1744468-1-ref.html1
-rw-r--r--layout/reftests/bugs/1744468-1.html1
-rw-r--r--layout/reftests/bugs/1744468-1.pngbin0 -> 15813 bytes
-rw-r--r--layout/reftests/bugs/1747272-1-ref.html37
-rw-r--r--layout/reftests/bugs/1747272-1.html46
-rw-r--r--layout/reftests/bugs/1750146-1-ref.html14
-rw-r--r--layout/reftests/bugs/1750146-1.html14
-rw-r--r--layout/reftests/bugs/175190-1-ref.html40
-rw-r--r--layout/reftests/bugs/175190-1.html41
-rw-r--r--layout/reftests/bugs/1769082-1-ref.html19
-rw-r--r--layout/reftests/bugs/1769082-1.html20
-rw-r--r--layout/reftests/bugs/1773484-ref.html4
-rw-r--r--layout/reftests/bugs/1773484.html4
-rw-r--r--layout/reftests/bugs/1773633-full-zoom.html10
-rw-r--r--layout/reftests/bugs/1773633-text-zoom.html10
-rw-r--r--layout/reftests/bugs/1773633.html9
-rw-r--r--layout/reftests/bugs/1777135-ref.html8
-rw-r--r--layout/reftests/bugs/1777135.html9
-rw-r--r--layout/reftests/bugs/1778834-ref.html9
-rw-r--r--layout/reftests/bugs/1778834.html10
-rw-r--r--layout/reftests/bugs/1780191-1-ref.svg36
-rw-r--r--layout/reftests/bugs/1780191-1.svg33
-rw-r--r--layout/reftests/bugs/1787127-ref.html2
-rw-r--r--layout/reftests/bugs/1787127.html3
-rw-r--r--layout/reftests/bugs/1792643-1-ref.html36
-rw-r--r--layout/reftests/bugs/1792643-1.html40
-rw-r--r--layout/reftests/bugs/179596-1a-ref.html13
-rw-r--r--layout/reftests/bugs/179596-1a.html13
-rw-r--r--layout/reftests/bugs/179596-1b-ref.html13
-rw-r--r--layout/reftests/bugs/179596-1b.html13
-rw-r--r--layout/reftests/bugs/179596-2-ref.html7
-rw-r--r--layout/reftests/bugs/179596-2-ref2.html8
-rw-r--r--layout/reftests/bugs/179596-2-ref3.html8
-rw-r--r--layout/reftests/bugs/179596-2.html7
-rw-r--r--layout/reftests/bugs/1798297-1-notref.html17
-rw-r--r--layout/reftests/bugs/1798297-1-ref.html17
-rw-r--r--layout/reftests/bugs/1798297-1.html17
-rw-r--r--layout/reftests/bugs/1799425-1-ref.html21
-rw-r--r--layout/reftests/bugs/1799425-1.html26
-rw-r--r--layout/reftests/bugs/1800437-1-ref.html36
-rw-r--r--layout/reftests/bugs/1800437-1.html36
-rw-r--r--layout/reftests/bugs/180085-1-ref.html35
-rw-r--r--layout/reftests/bugs/180085-1.html34
-rw-r--r--layout/reftests/bugs/180085-2-ref.html35
-rw-r--r--layout/reftests/bugs/180085-2.html34
-rw-r--r--layout/reftests/bugs/1803999-1-ref.html14
-rw-r--r--layout/reftests/bugs/1803999-1.html17
-rw-r--r--layout/reftests/bugs/1804872-1-ref.html23
-rw-r--r--layout/reftests/bugs/1804872-1.html43
-rw-r--r--layout/reftests/bugs/1804872-2-ref.html23
-rw-r--r--layout/reftests/bugs/1804872-2.html43
-rw-r--r--layout/reftests/bugs/1804872-3-ref.html26
-rw-r--r--layout/reftests/bugs/1804872-3.html47
-rw-r--r--layout/reftests/bugs/1814047-ref.html3
-rw-r--r--layout/reftests/bugs/1814047.html3
-rw-r--r--layout/reftests/bugs/1814628-1-ref.html3
-rw-r--r--layout/reftests/bugs/1814628-1.html4
-rw-r--r--layout/reftests/bugs/1818412-1-ref.html41
-rw-r--r--layout/reftests/bugs/1818412-1.html47
-rw-r--r--layout/reftests/bugs/18217-basic-1-ref.html11
-rw-r--r--layout/reftests/bugs/18217-basic-1.html19
-rw-r--r--layout/reftests/bugs/18217-basic-2-ref.html11
-rw-r--r--layout/reftests/bugs/18217-basic-2a.html20
-rw-r--r--layout/reftests/bugs/18217-basic-2b.html20
-rw-r--r--layout/reftests/bugs/18217-height-1-ref.html14
-rw-r--r--layout/reftests/bugs/18217-height-1.html17
-rw-r--r--layout/reftests/bugs/18217-height-2-ref.html14
-rw-r--r--layout/reftests/bugs/18217-height-2.html17
-rw-r--r--layout/reftests/bugs/18217-valign-1-ref.html27
-rw-r--r--layout/reftests/bugs/18217-valign-1.html32
-rw-r--r--layout/reftests/bugs/18217-width-1-ref.html15
-rw-r--r--layout/reftests/bugs/18217-width-1a.html17
-rw-r--r--layout/reftests/bugs/18217-width-1b.html17
-rw-r--r--layout/reftests/bugs/18217-width-2-ref.html15
-rw-r--r--layout/reftests/bugs/18217-width-2a.html18
-rw-r--r--layout/reftests/bugs/18217-width-2b.html18
-rw-r--r--layout/reftests/bugs/18217-zorder-1.html19
-rw-r--r--layout/reftests/bugs/18217-zorder-2.html20
-rw-r--r--layout/reftests/bugs/18217-zorder-3.html20
-rw-r--r--layout/reftests/bugs/18217-zorder-4.html19
-rw-r--r--layout/reftests/bugs/18217-zorder-5.html20
-rw-r--r--layout/reftests/bugs/18217-zorder-ref-inline-table.html14
-rw-r--r--layout/reftests/bugs/18217-zorder-ref-inline.html14
-rw-r--r--layout/reftests/bugs/18217-zorder-ref.html14
-rw-r--r--layout/reftests/bugs/1827009-1-ref.html15
-rw-r--r--layout/reftests/bugs/1827009-1.html18
-rw-r--r--layout/reftests/bugs/1827337-1-ref.html2
-rw-r--r--layout/reftests/bugs/1827337-1.html6
-rw-r--r--layout/reftests/bugs/1828879-1-ref.html8
-rw-r--r--layout/reftests/bugs/1828879-1.html8
-rw-r--r--layout/reftests/bugs/1834316-1-notref.html15
-rw-r--r--layout/reftests/bugs/1834316-1.html15
-rw-r--r--layout/reftests/bugs/1835271-1-ref.html14
-rw-r--r--layout/reftests/bugs/1835271-1.html14
-rw-r--r--layout/reftests/bugs/1836024-1-notref.html20
-rw-r--r--layout/reftests/bugs/1836024-1.html22
-rw-r--r--layout/reftests/bugs/1840511-1-ref.html10
-rw-r--r--layout/reftests/bugs/1840511-1.html12
-rw-r--r--layout/reftests/bugs/1840511-2.html3
-rw-r--r--layout/reftests/bugs/1840747-1.html19
-rw-r--r--layout/reftests/bugs/1841355-1.html24
-rw-r--r--layout/reftests/bugs/185388-1-ref.html11
-rw-r--r--layout/reftests/bugs/185388-1.html11
-rw-r--r--layout/reftests/bugs/186317-1-ref.html26
-rw-r--r--layout/reftests/bugs/186317-1.html24
-rw-r--r--layout/reftests/bugs/192767-01.xhtml13
-rw-r--r--layout/reftests/bugs/192767-02.xhtml13
-rw-r--r--layout/reftests/bugs/192767-03.xhtml13
-rw-r--r--layout/reftests/bugs/192767-04.xhtml13
-rw-r--r--layout/reftests/bugs/192767-05.xhtml13
-rw-r--r--layout/reftests/bugs/192767-06.xhtml13
-rw-r--r--layout/reftests/bugs/192767-07.xhtml13
-rw-r--r--layout/reftests/bugs/192767-11.xhtml13
-rw-r--r--layout/reftests/bugs/192767-12.xhtml13
-rw-r--r--layout/reftests/bugs/192767-13.xhtml13
-rw-r--r--layout/reftests/bugs/192767-14.xhtml13
-rw-r--r--layout/reftests/bugs/192767-15.xhtml13
-rw-r--r--layout/reftests/bugs/192767-16.xhtml13
-rw-r--r--layout/reftests/bugs/192767-17.xhtml13
-rw-r--r--layout/reftests/bugs/192767-21.xhtml13
-rw-r--r--layout/reftests/bugs/192767-22.xhtml13
-rw-r--r--layout/reftests/bugs/192767-23.xhtml13
-rw-r--r--layout/reftests/bugs/192767-24.xhtml13
-rw-r--r--layout/reftests/bugs/192767-25.xhtml13
-rw-r--r--layout/reftests/bugs/192767-26.xhtml13
-rw-r--r--layout/reftests/bugs/192767-27.xhtml13
-rw-r--r--layout/reftests/bugs/192767-31.xhtml13
-rw-r--r--layout/reftests/bugs/192767-32.xhtml13
-rw-r--r--layout/reftests/bugs/192767-33.xhtml13
-rw-r--r--layout/reftests/bugs/192767-34.xhtml13
-rw-r--r--layout/reftests/bugs/192767-35.xhtml13
-rw-r--r--layout/reftests/bugs/192767-36.xhtml13
-rw-r--r--layout/reftests/bugs/192767-37.xhtml13
-rw-r--r--layout/reftests/bugs/192767.css17
-rw-r--r--layout/reftests/bugs/192902-1.html16
-rw-r--r--layout/reftests/bugs/192902-ref.html16
-rw-r--r--layout/reftests/bugs/200774-1.html94
-rw-r--r--layout/reftests/bugs/201215-1-ref.html11
-rw-r--r--layout/reftests/bugs/201215-1.html22
-rw-r--r--layout/reftests/bugs/201293-1-ref.html31
-rw-r--r--layout/reftests/bugs/201293-1a.html31
-rw-r--r--layout/reftests/bugs/201293-1b.html31
-rw-r--r--layout/reftests/bugs/201293-1c.html31
-rw-r--r--layout/reftests/bugs/201293-1d.html31
-rw-r--r--layout/reftests/bugs/203727-ref.html25
-rw-r--r--layout/reftests/bugs/203727.html40
-rw-r--r--layout/reftests/bugs/206516-1-ref.html9
-rw-r--r--layout/reftests/bugs/206516-1.html12
-rw-r--r--layout/reftests/bugs/206631-1-ref.html15
-rw-r--r--layout/reftests/bugs/206631-1.html15
-rw-r--r--layout/reftests/bugs/206802-ref.html10
-rw-r--r--layout/reftests/bugs/206802.html10
-rw-r--r--layout/reftests/bugs/210094-1-ref.html8
-rw-r--r--layout/reftests/bugs/210094-1a.html8
-rw-r--r--layout/reftests/bugs/210094-1b.html10
-rw-r--r--layout/reftests/bugs/210094-1c.html8
-rw-r--r--layout/reftests/bugs/210876-1-ref.html15
-rw-r--r--layout/reftests/bugs/210876-1.html15
-rw-r--r--layout/reftests/bugs/211931-1-ref.html26
-rw-r--r--layout/reftests/bugs/211931-1.html26
-rw-r--r--layout/reftests/bugs/212563-1-inner.html7
-rw-r--r--layout/reftests/bugs/212563-1-ref-inner.html6
-rw-r--r--layout/reftests/bugs/212563-1-ref.html8
-rw-r--r--layout/reftests/bugs/212563-1.html14
-rw-r--r--layout/reftests/bugs/212563-2-inner.html9
-rw-r--r--layout/reftests/bugs/212563-2-innermost-a.html13
-rw-r--r--layout/reftests/bugs/212563-2-innermost-b.html1
-rw-r--r--layout/reftests/bugs/212563-2-ref-inner.html7
-rw-r--r--layout/reftests/bugs/212563-2-ref.html7
-rw-r--r--layout/reftests/bugs/212563-2.html24
-rw-r--r--layout/reftests/bugs/213834-1-ref.html3
-rw-r--r--layout/reftests/bugs/213834-1.html3
-rw-r--r--layout/reftests/bugs/214077-1-ref.html8
-rw-r--r--layout/reftests/bugs/214077-1a.html8
-rw-r--r--layout/reftests/bugs/214077-1b.html8
-rw-r--r--layout/reftests/bugs/218473-1-ref.html19
-rw-r--r--layout/reftests/bugs/218473-1.html23
-rw-r--r--layout/reftests/bugs/220165-1-ref.svg20
-rw-r--r--layout/reftests/bugs/220165-1.svg22
-rw-r--r--layout/reftests/bugs/223809-1-ref.html17
-rw-r--r--layout/reftests/bugs/223809-1.html19
-rw-r--r--layout/reftests/bugs/228856-1-ref.html34
-rw-r--r--layout/reftests/bugs/228856-1.html34
-rw-r--r--layout/reftests/bugs/228856-2-ref.htmlbin0 -> 6037 bytes
-rw-r--r--layout/reftests/bugs/228856-2-style-1.cssbin0 -> 1069 bytes
-rw-r--r--layout/reftests/bugs/228856-2.htmlbin0 -> 6073 bytes
-rw-r--r--layout/reftests/bugs/229591-1-ref.html14
-rw-r--r--layout/reftests/bugs/229591-1.html8
-rw-r--r--layout/reftests/bugs/231823-1-ref.html59
-rw-r--r--layout/reftests/bugs/231823-1.html66
-rw-r--r--layout/reftests/bugs/232990-1-ref.xhtml33
-rw-r--r--layout/reftests/bugs/232990-1a.xhtml49
-rw-r--r--layout/reftests/bugs/233094-1-ref.html16
-rw-r--r--layout/reftests/bugs/233094-1.html14
-rw-r--r--layout/reftests/bugs/233094-2-ref.html15
-rw-r--r--layout/reftests/bugs/233094-2a.html14
-rw-r--r--layout/reftests/bugs/233094-2b.html15
-rw-r--r--layout/reftests/bugs/233094-2c.html15
-rw-r--r--layout/reftests/bugs/234686-1.gifbin0 -> 123 bytes
-rw-r--r--layout/reftests/bugs/234686-1.html39
-rw-r--r--layout/reftests/bugs/234686-10.gifbin0 -> 585 bytes
-rw-r--r--layout/reftests/bugs/234686-10.html39
-rw-r--r--layout/reftests/bugs/234686-11.gifbin0 -> 383 bytes
-rw-r--r--layout/reftests/bugs/234686-11.html39
-rw-r--r--layout/reftests/bugs/234686-12.gifbin0 -> 462 bytes
-rw-r--r--layout/reftests/bugs/234686-12.html39
-rw-r--r--layout/reftests/bugs/234686-13.gifbin0 -> 383 bytes
-rw-r--r--layout/reftests/bugs/234686-13.html39
-rw-r--r--layout/reftests/bugs/234686-14.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-14.html39
-rw-r--r--layout/reftests/bugs/234686-15.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-15.html39
-rw-r--r--layout/reftests/bugs/234686-16.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-16.html39
-rw-r--r--layout/reftests/bugs/234686-17.gifbin0 -> 92 bytes
-rw-r--r--layout/reftests/bugs/234686-17.html38
-rw-r--r--layout/reftests/bugs/234686-18.gifbin0 -> 156 bytes
-rw-r--r--layout/reftests/bugs/234686-18.html37
-rw-r--r--layout/reftests/bugs/234686-19.gifbin0 -> 92 bytes
-rw-r--r--layout/reftests/bugs/234686-19.html37
-rw-r--r--layout/reftests/bugs/234686-2.gifbin0 -> 227 bytes
-rw-r--r--layout/reftests/bugs/234686-2.html37
-rw-r--r--layout/reftests/bugs/234686-3.gifbin0 -> 227 bytes
-rw-r--r--layout/reftests/bugs/234686-3.html38
-rw-r--r--layout/reftests/bugs/234686-4.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-4.html38
-rw-r--r--layout/reftests/bugs/234686-5.gifbin0 -> 92 bytes
-rw-r--r--layout/reftests/bugs/234686-5.html38
-rw-r--r--layout/reftests/bugs/234686-6.gifbin0 -> 227 bytes
-rw-r--r--layout/reftests/bugs/234686-6.html38
-rw-r--r--layout/reftests/bugs/234686-7.gifbin0 -> 462 bytes
-rw-r--r--layout/reftests/bugs/234686-7.html38
-rw-r--r--layout/reftests/bugs/234686-8.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-8.html38
-rw-r--r--layout/reftests/bugs/234686-9.gifbin0 -> 64 bytes
-rw-r--r--layout/reftests/bugs/234686-9.html38
-rw-r--r--layout/reftests/bugs/234686-ref.gifbin0 -> 123 bytes
-rw-r--r--layout/reftests/bugs/234686-ref.html22
-rw-r--r--layout/reftests/bugs/234964-1-ref.html11
-rw-r--r--layout/reftests/bugs/234964-1.html11
-rw-r--r--layout/reftests/bugs/234964-2-ref.html8
-rw-r--r--layout/reftests/bugs/234964-2.html8
-rw-r--r--layout/reftests/bugs/235593-1-ref.html14
-rw-r--r--layout/reftests/bugs/235593-1.html14
-rw-r--r--layout/reftests/bugs/23604-1-ref.html13
-rw-r--r--layout/reftests/bugs/23604-1.html18
-rw-r--r--layout/reftests/bugs/23604-2-ref.html37
-rw-r--r--layout/reftests/bugs/23604-2.html42
-rw-r--r--layout/reftests/bugs/236539-1-ref.html129
-rw-r--r--layout/reftests/bugs/236539-1.html130
-rw-r--r--layout/reftests/bugs/240029-1-ref.html28
-rw-r--r--layout/reftests/bugs/240029-1.html25
-rw-r--r--layout/reftests/bugs/240470-1-ref.html18
-rw-r--r--layout/reftests/bugs/240470-1.html18
-rw-r--r--layout/reftests/bugs/240933-1-ref.html25
-rw-r--r--layout/reftests/bugs/240933-1.html19
-rw-r--r--layout/reftests/bugs/240933-2-ref.html29
-rw-r--r--layout/reftests/bugs/240933-2.html19
-rw-r--r--layout/reftests/bugs/243266-1-ref.html10
-rw-r--r--layout/reftests/bugs/243266-1.html16
-rw-r--r--layout/reftests/bugs/243302-1-ref.html11
-rw-r--r--layout/reftests/bugs/243302-1.html11
-rw-r--r--layout/reftests/bugs/243519-1-ref.html23
-rw-r--r--layout/reftests/bugs/243519-1.html25
-rw-r--r--layout/reftests/bugs/243519-2-ref.html7
-rw-r--r--layout/reftests/bugs/243519-2.html7
-rw-r--r--layout/reftests/bugs/243519-3-ref.html17
-rw-r--r--layout/reftests/bugs/243519-3.html16
-rw-r--r--layout/reftests/bugs/243519-4-ref.html10
-rw-r--r--layout/reftests/bugs/243519-4a.html12
-rw-r--r--layout/reftests/bugs/243519-4b.html12
-rw-r--r--layout/reftests/bugs/243519-4c.html12
-rw-r--r--layout/reftests/bugs/243519-4d.html12
-rw-r--r--layout/reftests/bugs/243519-4e.html12
-rw-r--r--layout/reftests/bugs/243519-4f.html12
-rw-r--r--layout/reftests/bugs/243519-5-ref.html9
-rw-r--r--layout/reftests/bugs/243519-5a.html12
-rw-r--r--layout/reftests/bugs/243519-5b.html12
-rw-r--r--layout/reftests/bugs/243519-5c.html12
-rw-r--r--layout/reftests/bugs/243519-5d.html12
-rw-r--r--layout/reftests/bugs/243519-6-ref.html12
-rw-r--r--layout/reftests/bugs/243519-6.html11
-rw-r--r--layout/reftests/bugs/243519-7-ref.html11
-rw-r--r--layout/reftests/bugs/243519-7.html11
-rw-r--r--layout/reftests/bugs/243519-8-ref.svg3
-rw-r--r--layout/reftests/bugs/243519-8.svg3
-rw-r--r--layout/reftests/bugs/243519-9-ref.html9
-rw-r--r--layout/reftests/bugs/243519-9a.html9
-rw-r--r--layout/reftests/bugs/243519-9b.html9
-rw-r--r--layout/reftests/bugs/243519-9c.html2
-rw-r--r--layout/reftests/bugs/243519-9d.html2
-rw-r--r--layout/reftests/bugs/243519-9e.html11
-rw-r--r--layout/reftests/bugs/243519-9f.html11
-rw-r--r--layout/reftests/bugs/244135-1-ref.html34
-rw-r--r--layout/reftests/bugs/244135-1.html35
-rw-r--r--layout/reftests/bugs/244135-2-ref.html46
-rw-r--r--layout/reftests/bugs/244135-2.html47
-rw-r--r--layout/reftests/bugs/244932-1-ref.html14
-rw-r--r--layout/reftests/bugs/244932-1.html10
-rw-r--r--layout/reftests/bugs/246669-1-ref.html18
-rw-r--r--layout/reftests/bugs/246669-1.html22
-rw-r--r--layout/reftests/bugs/24998-1-ref.html16
-rw-r--r--layout/reftests/bugs/24998-1.html18
-rw-r--r--layout/reftests/bugs/249982-1-ref.html11
-rw-r--r--layout/reftests/bugs/249982-1.html11
-rw-r--r--layout/reftests/bugs/252920-1-ref.html11
-rw-r--r--layout/reftests/bugs/252920-1.html17
-rw-r--r--layout/reftests/bugs/253701-1-ref.html15
-rw-r--r--layout/reftests/bugs/253701-1.html18
-rw-r--r--layout/reftests/bugs/255820-1-ref.html9
-rw-r--r--layout/reftests/bugs/255820-1.html9
-rw-r--r--layout/reftests/bugs/256180-1-ref.html11
-rw-r--r--layout/reftests/bugs/256180-1.html68
-rw-r--r--layout/reftests/bugs/256180-2-ref.html11
-rw-r--r--layout/reftests/bugs/256180-2.html68
-rw-r--r--layout/reftests/bugs/256180-3-ref.html12
-rw-r--r--layout/reftests/bugs/256180-3.html63
-rw-r--r--layout/reftests/bugs/256180-4-ref.html12
-rw-r--r--layout/reftests/bugs/256180-4.html63
-rw-r--r--layout/reftests/bugs/256180-5-ref.html2004
-rw-r--r--layout/reftests/bugs/256180-5.html2042
-rw-r--r--layout/reftests/bugs/256180-6-ref.html2004
-rw-r--r--layout/reftests/bugs/256180-6.html48
-rw-r--r--layout/reftests/bugs/25888-1l-block.html26
-rw-r--r--layout/reftests/bugs/25888-1l-notref.html23
-rw-r--r--layout/reftests/bugs/25888-1l-ref.html23
-rw-r--r--layout/reftests/bugs/25888-1l.html26
-rw-r--r--layout/reftests/bugs/25888-1r-block.html26
-rw-r--r--layout/reftests/bugs/25888-1r-notref.html23
-rw-r--r--layout/reftests/bugs/25888-1r-ref.html23
-rw-r--r--layout/reftests/bugs/25888-1r.html26
-rw-r--r--layout/reftests/bugs/25888-2l-block.html25
-rw-r--r--layout/reftests/bugs/25888-2l-ref.html22
-rw-r--r--layout/reftests/bugs/25888-2l.html25
-rw-r--r--layout/reftests/bugs/25888-2r-block.html25
-rw-r--r--layout/reftests/bugs/25888-2r-ref.html22
-rw-r--r--layout/reftests/bugs/25888-2r.html25
-rw-r--r--layout/reftests/bugs/25888-3l-block.html25
-rw-r--r--layout/reftests/bugs/25888-3l-ref.html21
-rw-r--r--layout/reftests/bugs/25888-3l.html25
-rw-r--r--layout/reftests/bugs/25888-3r-block.html25
-rw-r--r--layout/reftests/bugs/25888-3r-ref.html21
-rw-r--r--layout/reftests/bugs/25888-3r.html25
-rw-r--r--layout/reftests/bugs/260406-1-ref.html20
-rw-r--r--layout/reftests/bugs/260406-1.html20
-rw-r--r--layout/reftests/bugs/260406.gifbin0 -> 954 bytes
-rw-r--r--layout/reftests/bugs/261826-1-ref.xhtml31
-rw-r--r--layout/reftests/bugs/261826-1.xhtml38
-rw-r--r--layout/reftests/bugs/262151-1-ref.html9
-rw-r--r--layout/reftests/bugs/262151-1.html19
-rw-r--r--layout/reftests/bugs/262998-1-ref.html6
-rw-r--r--layout/reftests/bugs/262998-1.html21
-rw-r--r--layout/reftests/bugs/267353-1-ref.html17
-rw-r--r--layout/reftests/bugs/267353-1.html14
-rw-r--r--layout/reftests/bugs/269908-1-ref.html11
-rw-r--r--layout/reftests/bugs/269908-1.html11
-rw-r--r--layout/reftests/bugs/269908-2-ref.html8
-rw-r--r--layout/reftests/bugs/269908-2.html8
-rw-r--r--layout/reftests/bugs/269908-3-ref.html8
-rw-r--r--layout/reftests/bugs/269908-3.html8
-rw-r--r--layout/reftests/bugs/269908-4-ref.html8
-rw-r--r--layout/reftests/bugs/269908-4.html8
-rw-r--r--layout/reftests/bugs/269908-5-ref.html8
-rw-r--r--layout/reftests/bugs/269908-5.html8
-rw-r--r--layout/reftests/bugs/271747-1-ref.html21
-rw-r--r--layout/reftests/bugs/271747-1a.html21
-rw-r--r--layout/reftests/bugs/271747-1b.html21
-rw-r--r--layout/reftests/bugs/272646-1-ref.xhtml25
-rw-r--r--layout/reftests/bugs/272646-1.xhtml24
-rw-r--r--layout/reftests/bugs/272646-2-ref.xhtml28
-rw-r--r--layout/reftests/bugs/272646-2a.xhtml31
-rw-r--r--layout/reftests/bugs/272646-2b.xhtml31
-rw-r--r--layout/reftests/bugs/272646-2c.xhtml31
-rw-r--r--layout/reftests/bugs/273681-1-ref.html28
-rw-r--r--layout/reftests/bugs/273681-1.html33
-rw-r--r--layout/reftests/bugs/278266-1-ref.html7
-rw-r--r--layout/reftests/bugs/278266-1a.html7
-rw-r--r--layout/reftests/bugs/278266-1b.html7
-rw-r--r--layout/reftests/bugs/280708-1-ref.html9
-rw-r--r--layout/reftests/bugs/280708-1a.html9
-rw-r--r--layout/reftests/bugs/280708-1b.html9
-rw-r--r--layout/reftests/bugs/281241-1-ref.html13
-rw-r--r--layout/reftests/bugs/281241-1.html23
-rw-r--r--layout/reftests/bugs/281241-2.xhtml11
-rw-r--r--layout/reftests/bugs/283686-1.html5
-rw-r--r--layout/reftests/bugs/283686-2-ref.html5
-rw-r--r--layout/reftests/bugs/283686-2.html12
-rw-r--r--layout/reftests/bugs/283686-3.html12
-rw-r--r--layout/reftests/bugs/28811-1-inner.html34
-rw-r--r--layout/reftests/bugs/28811-1-ref.html12
-rw-r--r--layout/reftests/bugs/28811-1a.html19
-rw-r--r--layout/reftests/bugs/28811-1b.html19
-rw-r--r--layout/reftests/bugs/28811-2-inner.html34
-rw-r--r--layout/reftests/bugs/28811-2-ref.html12
-rw-r--r--layout/reftests/bugs/28811-2a.html19
-rw-r--r--layout/reftests/bugs/28811-2b.html19
-rw-r--r--layout/reftests/bugs/289384-1.xhtml18
-rw-r--r--layout/reftests/bugs/289384-ref.xhtml18
-rw-r--r--layout/reftests/bugs/289480-mask.pngbin0 -> 277 bytes
-rw-r--r--layout/reftests/bugs/289480-ref.html17
-rw-r--r--layout/reftests/bugs/289480-ref.pngbin0 -> 2328 bytes
-rw-r--r--layout/reftests/bugs/289480.html153
-rw-r--r--layout/reftests/bugs/290129-1-ref.html16
-rw-r--r--layout/reftests/bugs/290129-1.html49
-rw-r--r--layout/reftests/bugs/291078-1-ref.html19
-rw-r--r--layout/reftests/bugs/291078-1.html26
-rw-r--r--layout/reftests/bugs/291078-2-ref.html12
-rw-r--r--layout/reftests/bugs/291078-2.html19
-rw-r--r--layout/reftests/bugs/291262-1-ref.html20
-rw-r--r--layout/reftests/bugs/291262-1.html20
-rw-r--r--layout/reftests/bugs/294306-1.html10
-rw-r--r--layout/reftests/bugs/294306-1a-ref.html10
-rw-r--r--layout/reftests/bugs/294306-1b-ref.html10
-rw-r--r--layout/reftests/bugs/296361-1.html32
-rw-r--r--layout/reftests/bugs/296361-ref.html23
-rw-r--r--layout/reftests/bugs/296904-1-ref.html2
-rw-r--r--layout/reftests/bugs/296904-1.html25
-rw-r--r--layout/reftests/bugs/299136-1-ref.html6
-rw-r--r--layout/reftests/bugs/299136-1.html11
-rw-r--r--layout/reftests/bugs/299837-1-ref.html13
-rw-r--r--layout/reftests/bugs/299837-1.html13
-rw-r--r--layout/reftests/bugs/299837-3-ref.xhtml101
-rw-r--r--layout/reftests/bugs/299837-3.xhtml100
-rw-r--r--layout/reftests/bugs/300691-1-ref.html6
-rw-r--r--layout/reftests/bugs/300691-1a.html10
-rw-r--r--layout/reftests/bugs/300691-1b.html10
-rw-r--r--layout/reftests/bugs/300691-1c.html12
-rw-r--r--layout/reftests/bugs/300691-1d.html10
-rw-r--r--layout/reftests/bugs/300691-1e.html11
-rw-r--r--layout/reftests/bugs/300691-1f.html15
-rw-r--r--layout/reftests/bugs/301726-1-ref.html33
-rw-r--r--layout/reftests/bugs/301726-1.html32
-rw-r--r--layout/reftests/bugs/301726-2-ref.html10
-rw-r--r--layout/reftests/bugs/301726-2.html10
-rw-r--r--layout/reftests/bugs/302379-ref.html17
-rw-r--r--layout/reftests/bugs/302379.html21
-rw-r--r--layout/reftests/bugs/306630-1-ref.html6
-rw-r--r--layout/reftests/bugs/306630-1.html4
-rw-r--r--layout/reftests/bugs/306660-1-ref.html5
-rw-r--r--layout/reftests/bugs/306660-1.html8
-rw-r--r--layout/reftests/bugs/306660-2-ref.html4
-rw-r--r--layout/reftests/bugs/306660-2.html15
-rw-r--r--layout/reftests/bugs/306660-3-ref.html2
-rw-r--r--layout/reftests/bugs/306660-3.html14
-rw-r--r--layout/reftests/bugs/307076-1-ref.html13
-rw-r--r--layout/reftests/bugs/307076-1.html22
-rw-r--r--layout/reftests/bugs/307102-1-ref.html8
-rw-r--r--layout/reftests/bugs/307102-1.html9
-rw-r--r--layout/reftests/bugs/307102-2-ref.html8
-rw-r--r--layout/reftests/bugs/307102-2.html8
-rw-r--r--layout/reftests/bugs/307102-3-ref.html9
-rw-r--r--layout/reftests/bugs/307102-3.html9
-rw-r--r--layout/reftests/bugs/307102-4-ref.html10
-rw-r--r--layout/reftests/bugs/307102-4.html10
-rw-r--r--layout/reftests/bugs/308406-1-ref.html14
-rw-r--r--layout/reftests/bugs/308406-1.html14
-rw-r--r--layout/reftests/bugs/308406-2-ref.html13
-rw-r--r--layout/reftests/bugs/308406-2.html13
-rw-r--r--layout/reftests/bugs/309550-1-ref.html26
-rw-r--r--layout/reftests/bugs/309550-1.html30
-rw-r--r--layout/reftests/bugs/311366-unknown-block-1-ref.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-block-1.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-block-2-ref.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-block-2.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-block-3-ref.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-block-3.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-inline-1-ref.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-inline-1.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-inline-2-ref.html5
-rw-r--r--layout/reftests/bugs/311366-unknown-inline-2.html5
-rw-r--r--layout/reftests/bugs/311822-1-ref-a.html49
-rw-r--r--layout/reftests/bugs/311822-1-ref-b.html49
-rw-r--r--layout/reftests/bugs/311822-1.html49
-rw-r--r--layout/reftests/bugs/315620-1-ref.html15
-rw-r--r--layout/reftests/bugs/315620-1a.html16
-rw-r--r--layout/reftests/bugs/315620-1b.html16
-rw-r--r--layout/reftests/bugs/315620-2-ref.xhtml13
-rw-r--r--layout/reftests/bugs/315620-2a.xhtml13
-rw-r--r--layout/reftests/bugs/315620-2b.xhtml13
-rw-r--r--layout/reftests/bugs/315920-1-ref.html10
-rw-r--r--layout/reftests/bugs/315920-10-ref.html13
-rw-r--r--layout/reftests/bugs/315920-10.html24
-rw-r--r--layout/reftests/bugs/315920-11-ref.html12
-rw-r--r--layout/reftests/bugs/315920-11.html18
-rw-r--r--layout/reftests/bugs/315920-12-ref.html16
-rw-r--r--layout/reftests/bugs/315920-12a.html19
-rw-r--r--layout/reftests/bugs/315920-12b.html20
-rw-r--r--layout/reftests/bugs/315920-12c.html18
-rw-r--r--layout/reftests/bugs/315920-13-ref.html16
-rw-r--r--layout/reftests/bugs/315920-13a.html18
-rw-r--r--layout/reftests/bugs/315920-13b.html18
-rw-r--r--layout/reftests/bugs/315920-14-ref.html9
-rw-r--r--layout/reftests/bugs/315920-14.html25
-rw-r--r--layout/reftests/bugs/315920-15-ref.html17
-rw-r--r--layout/reftests/bugs/315920-15.html24
-rw-r--r--layout/reftests/bugs/315920-16-ref.html16
-rw-r--r--layout/reftests/bugs/315920-16.html18
-rw-r--r--layout/reftests/bugs/315920-17-ref.html18
-rw-r--r--layout/reftests/bugs/315920-17.html30
-rw-r--r--layout/reftests/bugs/315920-18-ref.html6
-rw-r--r--layout/reftests/bugs/315920-18a.html17
-rw-r--r--layout/reftests/bugs/315920-18b.html14
-rw-r--r--layout/reftests/bugs/315920-18c.html17
-rw-r--r--layout/reftests/bugs/315920-18d.html17
-rw-r--r--layout/reftests/bugs/315920-18e.html18
-rw-r--r--layout/reftests/bugs/315920-18f.html18
-rw-r--r--layout/reftests/bugs/315920-18g.html18
-rw-r--r--layout/reftests/bugs/315920-18h.html14
-rw-r--r--layout/reftests/bugs/315920-18i.html14
-rw-r--r--layout/reftests/bugs/315920-19-ref.html8
-rw-r--r--layout/reftests/bugs/315920-19.html19
-rw-r--r--layout/reftests/bugs/315920-1a.html17
-rw-r--r--layout/reftests/bugs/315920-1b.html17
-rw-r--r--layout/reftests/bugs/315920-1c.html10
-rw-r--r--layout/reftests/bugs/315920-1d.html10
-rw-r--r--layout/reftests/bugs/315920-2-ref.html14
-rw-r--r--layout/reftests/bugs/315920-20-ref.svg13
-rw-r--r--layout/reftests/bugs/315920-20-style.css2
-rw-r--r--layout/reftests/bugs/315920-20.svg30
-rw-r--r--layout/reftests/bugs/315920-21-ref.svg13
-rw-r--r--layout/reftests/bugs/315920-21-style.css2
-rw-r--r--layout/reftests/bugs/315920-21.svg29
-rw-r--r--layout/reftests/bugs/315920-22-ref.html18
-rw-r--r--layout/reftests/bugs/315920-22.html22
-rw-r--r--layout/reftests/bugs/315920-23-ref.html18
-rw-r--r--layout/reftests/bugs/315920-23.html22
-rw-r--r--layout/reftests/bugs/315920-24-ref.html12
-rw-r--r--layout/reftests/bugs/315920-24.html17
-rw-r--r--layout/reftests/bugs/315920-25-ref.html14
-rw-r--r--layout/reftests/bugs/315920-25.html23
-rw-r--r--layout/reftests/bugs/315920-26-ref.html19
-rw-r--r--layout/reftests/bugs/315920-26.html23
-rw-r--r--layout/reftests/bugs/315920-27-ref.html19
-rw-r--r--layout/reftests/bugs/315920-27.html22
-rw-r--r--layout/reftests/bugs/315920-28-ref.html15
-rw-r--r--layout/reftests/bugs/315920-28a.html25
-rw-r--r--layout/reftests/bugs/315920-28b.html25
-rw-r--r--layout/reftests/bugs/315920-28c.html26
-rw-r--r--layout/reftests/bugs/315920-29-ref.html15
-rw-r--r--layout/reftests/bugs/315920-29a.html19
-rw-r--r--layout/reftests/bugs/315920-29b.html19
-rw-r--r--layout/reftests/bugs/315920-2a.html18
-rw-r--r--layout/reftests/bugs/315920-2b.html16
-rw-r--r--layout/reftests/bugs/315920-2c.html18
-rw-r--r--layout/reftests/bugs/315920-3-ref.html8
-rw-r--r--layout/reftests/bugs/315920-30-ref.html22
-rw-r--r--layout/reftests/bugs/315920-30.html27
-rw-r--r--layout/reftests/bugs/315920-3a.html16
-rw-r--r--layout/reftests/bugs/315920-3b.html16
-rw-r--r--layout/reftests/bugs/315920-3c.html16
-rw-r--r--layout/reftests/bugs/315920-3d.html16
-rw-r--r--layout/reftests/bugs/315920-3e.html8
-rw-r--r--layout/reftests/bugs/315920-3f.html8
-rw-r--r--layout/reftests/bugs/315920-4-ref.html11
-rw-r--r--layout/reftests/bugs/315920-4.html22
-rw-r--r--layout/reftests/bugs/315920-5-ref.html11
-rw-r--r--layout/reftests/bugs/315920-5.html19
-rw-r--r--layout/reftests/bugs/315920-6-ref.html14
-rw-r--r--layout/reftests/bugs/315920-6.html17
-rw-r--r--layout/reftests/bugs/315920-7-ref.html11
-rw-r--r--layout/reftests/bugs/315920-7a.html19
-rw-r--r--layout/reftests/bugs/315920-7b.html19
-rw-r--r--layout/reftests/bugs/315920-7c.html18
-rw-r--r--layout/reftests/bugs/315920-8-ref.html11
-rw-r--r--layout/reftests/bugs/315920-8a.html18
-rw-r--r--layout/reftests/bugs/315920-8b.html18
-rw-r--r--layout/reftests/bugs/315920-9-ref.html10
-rw-r--r--layout/reftests/bugs/315920-9.html26
-rw-r--r--layout/reftests/bugs/316057-1-ref.html26
-rw-r--r--layout/reftests/bugs/316057-1.html28
-rw-r--r--layout/reftests/bugs/320979-1-ref.html21
-rw-r--r--layout/reftests/bugs/320979-1.html20
-rw-r--r--layout/reftests/bugs/321402-1.html2
-rw-r--r--layout/reftests/bugs/321402-2.html2
-rw-r--r--layout/reftests/bugs/321402-3-ref.xhtml7
-rw-r--r--layout/reftests/bugs/321402-3.xhtml8
-rw-r--r--layout/reftests/bugs/321402-4-ref.xhtml8
-rw-r--r--layout/reftests/bugs/321402-4.xhtml25
-rw-r--r--layout/reftests/bugs/321402-5-ref.xhtml8
-rw-r--r--layout/reftests/bugs/321402-5.xhtml25
-rw-r--r--layout/reftests/bugs/321402-6-ref.xhtml7
-rw-r--r--layout/reftests/bugs/321402-6.xhtml25
-rw-r--r--layout/reftests/bugs/321738-1-ref.html25
-rw-r--r--layout/reftests/bugs/321738-1.html25
-rw-r--r--layout/reftests/bugs/322461-1-ref.html4
-rw-r--r--layout/reftests/bugs/322461-1.xml22
-rw-r--r--layout/reftests/bugs/323656-1-ref.html44
-rw-r--r--layout/reftests/bugs/323656-1.html56
-rw-r--r--layout/reftests/bugs/323656-2-ref.html29
-rw-r--r--layout/reftests/bugs/323656-2.html39
-rw-r--r--layout/reftests/bugs/323656-3-ref.html53
-rw-r--r--layout/reftests/bugs/323656-3.html84
-rw-r--r--layout/reftests/bugs/323656-4-ref.html14
-rw-r--r--layout/reftests/bugs/323656-4.html31
-rw-r--r--layout/reftests/bugs/323656-5-ref.svg15
-rw-r--r--layout/reftests/bugs/323656-5.svg15
-rw-r--r--layout/reftests/bugs/323656-6-ref.html40
-rw-r--r--layout/reftests/bugs/323656-6.html57
-rw-r--r--layout/reftests/bugs/325292-1-ref.html18
-rw-r--r--layout/reftests/bugs/325292-1.html15
-rw-r--r--layout/reftests/bugs/325486-1-ref.html15
-rw-r--r--layout/reftests/bugs/325486-1.html15
-rw-r--r--layout/reftests/bugs/328111-1-ref.html17
-rw-r--r--layout/reftests/bugs/328111-1.html17
-rw-r--r--layout/reftests/bugs/328829-1-ref.xhtml25
-rw-r--r--layout/reftests/bugs/328829-1.xhtml32
-rw-r--r--layout/reftests/bugs/328829-2-ref.xhtml25
-rw-r--r--layout/reftests/bugs/328829-2.xhtml34
-rw-r--r--layout/reftests/bugs/329359-1-ref.html29
-rw-r--r--layout/reftests/bugs/329359-1.html32
-rw-r--r--layout/reftests/bugs/331809-1-ref.html21
-rw-r--r--layout/reftests/bugs/331809-1.html14
-rw-r--r--layout/reftests/bugs/331809-1.xhtml1
-rw-r--r--layout/reftests/bugs/332360-ltr-ref.html14
-rw-r--r--layout/reftests/bugs/332360-ltr.html14
-rw-r--r--layout/reftests/bugs/332360-ref.html14
-rw-r--r--layout/reftests/bugs/332360-width-ltr.html14
-rw-r--r--layout/reftests/bugs/332360-width.html14
-rw-r--r--layout/reftests/bugs/332360.html14
-rw-r--r--layout/reftests/bugs/332557-1-ref.html9
-rw-r--r--layout/reftests/bugs/332557-1.html9
-rw-r--r--layout/reftests/bugs/332975-1-ref.html14
-rw-r--r--layout/reftests/bugs/332975-1.html14
-rw-r--r--layout/reftests/bugs/333970-1-ref.html28
-rw-r--r--layout/reftests/bugs/333970-1.html28
-rw-r--r--layout/reftests/bugs/334829-1-ref.xhtml6
-rw-r--r--layout/reftests/bugs/334829-1a-shadow.xhtml34
-rw-r--r--layout/reftests/bugs/334829-1b-shadow.xhtml35
-rw-r--r--layout/reftests/bugs/335628-1-ref.html7
-rw-r--r--layout/reftests/bugs/335628-1.html7
-rw-r--r--layout/reftests/bugs/336096-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/336096-1.xhtml12
-rw-r--r--layout/reftests/bugs/336147-1-ref.html11
-rw-r--r--layout/reftests/bugs/336147-1.html14
-rw-r--r--layout/reftests/bugs/336153-1-ref.html12
-rw-r--r--layout/reftests/bugs/336153-1.html13
-rw-r--r--layout/reftests/bugs/338251-p-oh-ref.html10
-rw-r--r--layout/reftests/bugs/338251-p-oh.html10
-rw-r--r--layout/reftests/bugs/338251-p.html10
-rw-r--r--layout/reftests/bugs/338251-pre-oh-ref.html10
-rw-r--r--layout/reftests/bugs/338251-pre-oh.html10
-rw-r--r--layout/reftests/bugs/338251-pre.html10
-rw-r--r--layout/reftests/bugs/339289-1-ref.html7
-rw-r--r--layout/reftests/bugs/339289-1.html12
-rw-r--r--layout/reftests/bugs/341043-1-ref.html18
-rw-r--r--layout/reftests/bugs/341043-1a.html22
-rw-r--r--layout/reftests/bugs/341043-1b.html22
-rw-r--r--layout/reftests/bugs/343538-1-ref.html38
-rw-r--r--layout/reftests/bugs/343538-1.html37
-rw-r--r--layout/reftests/bugs/343540-1-ref.html16
-rw-r--r--layout/reftests/bugs/343540-1.html24
-rw-r--r--layout/reftests/bugs/345267-1-ref.html6
-rw-r--r--layout/reftests/bugs/345267-1a.html6
-rw-r--r--layout/reftests/bugs/345267-1b.html14
-rw-r--r--layout/reftests/bugs/345267-1c.html10
-rw-r--r--layout/reftests/bugs/345267-1d.html10
-rw-r--r--layout/reftests/bugs/346774-1-ref.html10
-rw-r--r--layout/reftests/bugs/346774-1a.html19
-rw-r--r--layout/reftests/bugs/346774-1b.html19
-rw-r--r--layout/reftests/bugs/346774-1c.html17
-rw-r--r--layout/reftests/bugs/347912-1-ref.html14
-rw-r--r--layout/reftests/bugs/347912-1.html40
-rw-r--r--layout/reftests/bugs/348049-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/348049-1.xhtml26
-rw-r--r--layout/reftests/bugs/348516-1-ref.html21
-rw-r--r--layout/reftests/bugs/348516-1.html21
-rw-r--r--layout/reftests/bugs/348516-2-notref.html18
-rw-r--r--layout/reftests/bugs/348516-2-ref.html19
-rw-r--r--layout/reftests/bugs/348516-2.html19
-rw-r--r--layout/reftests/bugs/348516-3-notref.html19
-rw-r--r--layout/reftests/bugs/348516-3.html19
-rw-r--r--layout/reftests/bugs/348597-1.html30
-rw-r--r--layout/reftests/bugs/348597-ref.html23
-rw-r--r--layout/reftests/bugs/348809-1-ref.html11
-rw-r--r--layout/reftests/bugs/348809-1a.html13
-rw-r--r--layout/reftests/bugs/348809-1b.html13
-rw-r--r--layout/reftests/bugs/348809-1c.html17
-rw-r--r--layout/reftests/bugs/348809-1d.html17
-rw-r--r--layout/reftests/bugs/348809-1e.html23
-rw-r--r--layout/reftests/bugs/348809-1f.html17
-rw-r--r--layout/reftests/bugs/348809-2-ref.html18
-rw-r--r--layout/reftests/bugs/348809-2a.html22
-rw-r--r--layout/reftests/bugs/348809-2b.html23
-rw-r--r--layout/reftests/bugs/348809-2c.html23
-rw-r--r--layout/reftests/bugs/348809-2d.html23
-rw-r--r--layout/reftests/bugs/348809-2e.html26
-rw-r--r--layout/reftests/bugs/348809-2f.html27
-rw-r--r--layout/reftests/bugs/348809-2g.html29
-rw-r--r--layout/reftests/bugs/348809-2h.html29
-rw-r--r--layout/reftests/bugs/349695-1-ref.html15
-rw-r--r--layout/reftests/bugs/349695-1a.html17
-rw-r--r--layout/reftests/bugs/349695-1b.html17
-rw-r--r--layout/reftests/bugs/350506-1-ref.html25
-rw-r--r--layout/reftests/bugs/350506-1.html26
-rw-r--r--layout/reftests/bugs/351641-1-ref.html6
-rw-r--r--layout/reftests/bugs/351641-1a.html6
-rw-r--r--layout/reftests/bugs/351641-1b.html6
-rw-r--r--layout/reftests/bugs/351641-2-ref.html4
-rw-r--r--layout/reftests/bugs/351641-2a.html4
-rw-r--r--layout/reftests/bugs/351641-2b.html4
-rw-r--r--layout/reftests/bugs/352980-1-ref.html13
-rw-r--r--layout/reftests/bugs/352980-1a.html17
-rw-r--r--layout/reftests/bugs/352980-1b.html18
-rw-r--r--layout/reftests/bugs/352980-1c.html18
-rw-r--r--layout/reftests/bugs/352980-1d.html17
-rw-r--r--layout/reftests/bugs/352980-1e.html20
-rw-r--r--layout/reftests/bugs/352980-1f.html20
-rw-r--r--layout/reftests/bugs/352980-1g.html20
-rw-r--r--layout/reftests/bugs/352980-1h.html20
-rw-r--r--layout/reftests/bugs/352980-1i.html20
-rw-r--r--layout/reftests/bugs/352980-1j.html20
-rw-r--r--layout/reftests/bugs/352980-1k.html20
-rw-r--r--layout/reftests/bugs/352980-1l.html20
-rw-r--r--layout/reftests/bugs/352980-2-ref.html14
-rw-r--r--layout/reftests/bugs/352980-2a.html18
-rw-r--r--layout/reftests/bugs/352980-2b.html18
-rw-r--r--layout/reftests/bugs/352980-2c.html18
-rw-r--r--layout/reftests/bugs/352980-2d.html18
-rw-r--r--layout/reftests/bugs/352980-2e.html18
-rw-r--r--layout/reftests/bugs/352980-2f.html18
-rw-r--r--layout/reftests/bugs/352980-3-ref.html15
-rw-r--r--layout/reftests/bugs/352980-3a.html19
-rw-r--r--layout/reftests/bugs/352980-3b.html19
-rw-r--r--layout/reftests/bugs/352980-3c.html20
-rw-r--r--layout/reftests/bugs/352980-3d.html20
-rw-r--r--layout/reftests/bugs/352980-3e.html20
-rw-r--r--layout/reftests/bugs/352980-3f.html20
-rw-r--r--layout/reftests/bugs/356774-1-ref.html15
-rw-r--r--layout/reftests/bugs/356774-1.html16
-rw-r--r--layout/reftests/bugs/356775-1-ref.html15
-rw-r--r--layout/reftests/bugs/356775-1.html16
-rw-r--r--layout/reftests/bugs/359869-1-ref.html17
-rw-r--r--layout/reftests/bugs/359869-1.html18
-rw-r--r--layout/reftests/bugs/359903-1-ref.html6
-rw-r--r--layout/reftests/bugs/359903-1.html6
-rw-r--r--layout/reftests/bugs/359903-2-ref.html9
-rw-r--r--layout/reftests/bugs/359903-2.html9
-rw-r--r--layout/reftests/bugs/360065-1-ref.html22
-rw-r--r--layout/reftests/bugs/360065-1.html22
-rw-r--r--layout/reftests/bugs/360746-1-ref.html14
-rw-r--r--layout/reftests/bugs/360746-1.html40
-rw-r--r--layout/reftests/bugs/360757-1-ref.html32
-rw-r--r--layout/reftests/bugs/360757-1a.html32
-rw-r--r--layout/reftests/bugs/360757-1b.html32
-rw-r--r--layout/reftests/bugs/361091-1-ref.html15
-rw-r--r--layout/reftests/bugs/361091-1.html15
-rw-r--r--layout/reftests/bugs/362594-1-quirks-ref.html10
-rw-r--r--layout/reftests/bugs/362594-1-standards-ref.html11
-rw-r--r--layout/reftests/bugs/362594-1a.html10
-rw-r--r--layout/reftests/bugs/362594-1b.html10
-rw-r--r--layout/reftests/bugs/362594-1c.html11
-rw-r--r--layout/reftests/bugs/362594-2-quirks-ref.html10
-rw-r--r--layout/reftests/bugs/362594-2-standards-ref.html11
-rw-r--r--layout/reftests/bugs/362594-2a.html10
-rw-r--r--layout/reftests/bugs/362594-2b.html11
-rw-r--r--layout/reftests/bugs/362594-2c.html11
-rw-r--r--layout/reftests/bugs/362901-1-ref.html26
-rw-r--r--layout/reftests/bugs/362901-1.html35
-rw-r--r--layout/reftests/bugs/363247-1-ref.html15
-rw-r--r--layout/reftests/bugs/363247-1.html20
-rw-r--r--layout/reftests/bugs/363329-1-ref.html13
-rw-r--r--layout/reftests/bugs/363329-1.html13
-rw-r--r--layout/reftests/bugs/363329-2-ref.html13
-rw-r--r--layout/reftests/bugs/363329-2.html13
-rw-r--r--layout/reftests/bugs/363370-1-ref.html11
-rw-r--r--layout/reftests/bugs/363370-1.html32
-rw-r--r--layout/reftests/bugs/363402-1-ref.html19
-rw-r--r--layout/reftests/bugs/363402-1.html25
-rw-r--r--layout/reftests/bugs/363637-1-ref.html60
-rw-r--r--layout/reftests/bugs/363637-1.html60
-rw-r--r--layout/reftests/bugs/363706-1-ref.html18
-rw-r--r--layout/reftests/bugs/363706-1.html18
-rw-r--r--layout/reftests/bugs/363728-1-ref.html24
-rw-r--r--layout/reftests/bugs/363728-1.html24
-rw-r--r--layout/reftests/bugs/363728-2-ref.html28
-rw-r--r--layout/reftests/bugs/363728-2.html29
-rw-r--r--layout/reftests/bugs/363858-1-ref.html27
-rw-r--r--layout/reftests/bugs/363858-1.html29
-rw-r--r--layout/reftests/bugs/363858-2-ref.html28
-rw-r--r--layout/reftests/bugs/363858-2.html30
-rw-r--r--layout/reftests/bugs/363858-3-ref.html31
-rw-r--r--layout/reftests/bugs/363858-3.html34
-rw-r--r--layout/reftests/bugs/363858-4-ref.html32
-rw-r--r--layout/reftests/bugs/363858-4.html35
-rw-r--r--layout/reftests/bugs/363858-5-ref.html22
-rw-r--r--layout/reftests/bugs/363858-5a.html21
-rw-r--r--layout/reftests/bugs/363858-5b.html21
-rw-r--r--layout/reftests/bugs/363858-6-ref.html23
-rw-r--r--layout/reftests/bugs/363858-6a.html22
-rw-r--r--layout/reftests/bugs/363858-6b.html22
-rw-r--r--layout/reftests/bugs/363874-max-width-ref.html19
-rw-r--r--layout/reftests/bugs/363874-max-width.html19
-rw-r--r--layout/reftests/bugs/363874-ref.html15
-rw-r--r--layout/reftests/bugs/363874.html15
-rw-r--r--layout/reftests/bugs/364066-1-ref.html73
-rw-r--r--layout/reftests/bugs/364066-1.html72
-rw-r--r--layout/reftests/bugs/364079-1-ref.html15
-rw-r--r--layout/reftests/bugs/364079-1.html15
-rw-r--r--layout/reftests/bugs/364318-1-ref.xhtml9
-rw-r--r--layout/reftests/bugs/364318-1.xhtml9
-rw-r--r--layout/reftests/bugs/364861-1-ref.html13
-rw-r--r--layout/reftests/bugs/364861-1.html13
-rw-r--r--layout/reftests/bugs/364862-1-ref.html9
-rw-r--r--layout/reftests/bugs/364862-1.html9
-rw-r--r--layout/reftests/bugs/364968-1-ref.html26
-rw-r--r--layout/reftests/bugs/364968-1.xhtml15
-rw-r--r--layout/reftests/bugs/364989-1-ref.html10
-rw-r--r--layout/reftests/bugs/364989-1.html22
-rw-r--r--layout/reftests/bugs/365173-1-ref.html7
-rw-r--r--layout/reftests/bugs/365173-1.html7
-rw-r--r--layout/reftests/bugs/366616-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/366616-1.xhtml17
-rw-r--r--layout/reftests/bugs/367220-1-ref.html45
-rw-r--r--layout/reftests/bugs/367220-1.html59
-rw-r--r--layout/reftests/bugs/367247-l-auto.html28
-rw-r--r--layout/reftests/bugs/367247-l-hidden.html28
-rw-r--r--layout/reftests/bugs/367247-l-scroll.html28
-rw-r--r--layout/reftests/bugs/367247-l-visible.html28
-rw-r--r--layout/reftests/bugs/367247-s-auto.html28
-rw-r--r--layout/reftests/bugs/367247-s-hidden.html28
-rw-r--r--layout/reftests/bugs/367247-s-scroll.html28
-rw-r--r--layout/reftests/bugs/367247-s-visible.html28
-rw-r--r--layout/reftests/bugs/367332-1-ref.html25
-rw-r--r--layout/reftests/bugs/367332-1a.html26
-rw-r--r--layout/reftests/bugs/367332-1b.html26
-rw-r--r--layout/reftests/bugs/367332-1c.html26
-rw-r--r--layout/reftests/bugs/367332-1d.html26
-rw-r--r--layout/reftests/bugs/367332-1e.html26
-rw-r--r--layout/reftests/bugs/367332-1f.html26
-rw-r--r--layout/reftests/bugs/367332-1g.html26
-rw-r--r--layout/reftests/bugs/367375-1-ref.html16
-rw-r--r--layout/reftests/bugs/367375-1.html16
-rw-r--r--layout/reftests/bugs/367375-2-ref.html16
-rw-r--r--layout/reftests/bugs/367375-2.html16
-rw-r--r--layout/reftests/bugs/367489-1-ref.html19
-rw-r--r--layout/reftests/bugs/367489-1.html23
-rw-r--r--layout/reftests/bugs/367504-float-1-ref.html20
-rw-r--r--layout/reftests/bugs/367504-float-1.html20
-rw-r--r--layout/reftests/bugs/367504-margin-1-ref.html20
-rw-r--r--layout/reftests/bugs/367504-margin-1.html20
-rw-r--r--layout/reftests/bugs/367612-1-ref.html10
-rw-r--r--layout/reftests/bugs/367612-1a.html14
-rw-r--r--layout/reftests/bugs/367612-1b.html16
-rw-r--r--layout/reftests/bugs/367612-1c.html18
-rw-r--r--layout/reftests/bugs/367612-1d.html14
-rw-r--r--layout/reftests/bugs/367612-1e.html17
-rw-r--r--layout/reftests/bugs/367612-1f.html20
-rw-r--r--layout/reftests/bugs/367612-1g.html9
-rw-r--r--layout/reftests/bugs/368020-1-ref.html24
-rw-r--r--layout/reftests/bugs/368020-1.html24
-rw-r--r--layout/reftests/bugs/368020-2-ref.html17
-rw-r--r--layout/reftests/bugs/368020-2.html17
-rw-r--r--layout/reftests/bugs/368020-3-ref.html15
-rw-r--r--layout/reftests/bugs/368020-3.html15
-rw-r--r--layout/reftests/bugs/368020-5-ref.html15
-rw-r--r--layout/reftests/bugs/368020-5.html15
-rw-r--r--layout/reftests/bugs/368155-1-ref.xhtml10
-rw-r--r--layout/reftests/bugs/368155-1.xhtml10
-rw-r--r--layout/reftests/bugs/368155-negative-margins-1-ref.html44
-rw-r--r--layout/reftests/bugs/368155-negative-margins-1.html56
-rw-r--r--layout/reftests/bugs/368247-1-ref.html15
-rw-r--r--layout/reftests/bugs/368247-1.html13
-rw-r--r--layout/reftests/bugs/368247-2-ref.html13
-rw-r--r--layout/reftests/bugs/368247-2.html13
-rw-r--r--layout/reftests/bugs/368504-1-ref.html26
-rw-r--r--layout/reftests/bugs/368504-1.html20
-rw-r--r--layout/reftests/bugs/368504-2-ref.html18
-rw-r--r--layout/reftests/bugs/368504-2.html18
-rw-r--r--layout/reftests/bugs/368504-3-ref.html24
-rw-r--r--layout/reftests/bugs/368504-3a.html28
-rw-r--r--layout/reftests/bugs/368504-3b.html28
-rw-r--r--layout/reftests/bugs/368504-4-ref.html100
-rw-r--r--layout/reftests/bugs/368504-4.html122
-rw-r--r--layout/reftests/bugs/368504-5-ref.html100
-rw-r--r--layout/reftests/bugs/368504-5.html99
-rw-r--r--layout/reftests/bugs/368504-6-ref.html16
-rw-r--r--layout/reftests/bugs/368504-6.html19
-rw-r--r--layout/reftests/bugs/368622-1-ref.html19
-rw-r--r--layout/reftests/bugs/368622-1.html21
-rw-r--r--layout/reftests/bugs/368651-1-ref.html25
-rw-r--r--layout/reftests/bugs/368651-1.html35
-rw-r--r--layout/reftests/bugs/369361-1-ref.html24
-rw-r--r--layout/reftests/bugs/369361-1.html25
-rw-r--r--layout/reftests/bugs/369361-2-ref.html25
-rw-r--r--layout/reftests/bugs/369361-2.html27
-rw-r--r--layout/reftests/bugs/369882-ref.xhtml9
-rw-r--r--layout/reftests/bugs/369882.xhtml10
-rw-r--r--layout/reftests/bugs/369975-1.html21
-rw-r--r--layout/reftests/bugs/370353-1-ref.html26
-rw-r--r--layout/reftests/bugs/370353-1.html26
-rw-r--r--layout/reftests/bugs/370422-1-ref.html16
-rw-r--r--layout/reftests/bugs/370422-1.html16
-rw-r--r--layout/reftests/bugs/370525-1-notref.html18
-rw-r--r--layout/reftests/bugs/370525-1-ref.html18
-rw-r--r--layout/reftests/bugs/370525-1.html18
-rw-r--r--layout/reftests/bugs/370525-2-notref.html17
-rw-r--r--layout/reftests/bugs/370525-2-ref.html17
-rw-r--r--layout/reftests/bugs/370525-2.html17
-rw-r--r--layout/reftests/bugs/370525-rowspan-1a-ref.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-1a.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-1b-ref.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-1b.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-1c-ref.html23
-rw-r--r--layout/reftests/bugs/370525-rowspan-1c.html23
-rw-r--r--layout/reftests/bugs/370525-rowspan-2a-ref.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-2a.html28
-rw-r--r--layout/reftests/bugs/370525-rowspan-2b-ref.html24
-rw-r--r--layout/reftests/bugs/370525-rowspan-2b.html24
-rw-r--r--layout/reftests/bugs/370525-rowspan-3-ref.html26
-rw-r--r--layout/reftests/bugs/370525-rowspan-3.html26
-rw-r--r--layout/reftests/bugs/370525-rowspan-4-ref.html26
-rw-r--r--layout/reftests/bugs/370525-rowspan-4.html26
-rw-r--r--layout/reftests/bugs/370525-sib-ref.html18
-rw-r--r--layout/reftests/bugs/370525-sib.html18
-rw-r--r--layout/reftests/bugs/370525-style.css13
-rw-r--r--layout/reftests/bugs/370586-1-ref.xhtml12
-rw-r--r--layout/reftests/bugs/370586-1.xhtml12
-rw-r--r--layout/reftests/bugs/370629-1-ref.html1
-rw-r--r--layout/reftests/bugs/370629-1.html1
-rw-r--r--layout/reftests/bugs/370629-2-ref.html1
-rw-r--r--layout/reftests/bugs/370629-2.html1
-rw-r--r--layout/reftests/bugs/371043-1-ref.html9
-rw-r--r--layout/reftests/bugs/371043-1.html13
-rw-r--r--layout/reftests/bugs/371354-1-ref.html25
-rw-r--r--layout/reftests/bugs/371354-1.html25
-rw-r--r--layout/reftests/bugs/371483-1.html11
-rw-r--r--layout/reftests/bugs/371561-1-ref.html12
-rw-r--r--layout/reftests/bugs/371561-1.html14
-rw-r--r--layout/reftests/bugs/371681-1.xhtml12
-rw-r--r--layout/reftests/bugs/371925-1-ref.html14
-rw-r--r--layout/reftests/bugs/371925-1a.html22
-rw-r--r--layout/reftests/bugs/371925-1b.html23
-rw-r--r--layout/reftests/bugs/372037-1-ref.html25
-rw-r--r--layout/reftests/bugs/372037-1.html25
-rw-r--r--layout/reftests/bugs/372062-1-ref.html8
-rw-r--r--layout/reftests/bugs/372062-1.html8
-rw-r--r--layout/reftests/bugs/372063-1-ref.html115
-rw-r--r--layout/reftests/bugs/372063-1.html147
-rw-r--r--layout/reftests/bugs/372553-1-ref.html25
-rw-r--r--layout/reftests/bugs/372553-1.html31
-rw-r--r--layout/reftests/bugs/372632-1-ref.html13
-rw-r--r--layout/reftests/bugs/372632-1.html18
-rw-r--r--layout/reftests/bugs/372768-1-ref.html10
-rw-r--r--layout/reftests/bugs/372768-1.html14
-rw-r--r--layout/reftests/bugs/373295-1-ref.html8
-rw-r--r--layout/reftests/bugs/373295-1.html13
-rw-r--r--layout/reftests/bugs/373298-1-ref.html3
-rw-r--r--layout/reftests/bugs/373298-1.html7
-rw-r--r--layout/reftests/bugs/373381-1-ref.html3
-rw-r--r--layout/reftests/bugs/373381-1.html3
-rw-r--r--layout/reftests/bugs/373381-2-ref.html3
-rw-r--r--layout/reftests/bugs/373381-2.html3
-rw-r--r--layout/reftests/bugs/373381-3-ref.html3
-rw-r--r--layout/reftests/bugs/373381-3.html3
-rw-r--r--layout/reftests/bugs/373381-4-ref.html3
-rw-r--r--layout/reftests/bugs/373381-4.html3
-rw-r--r--layout/reftests/bugs/373383-1-ref.html16
-rw-r--r--layout/reftests/bugs/373383-1.html24
-rw-r--r--layout/reftests/bugs/373433-1-ref.html5
-rw-r--r--layout/reftests/bugs/373433-1.html6
-rw-r--r--layout/reftests/bugs/374038-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/374038-1.xhtml7
-rw-r--r--layout/reftests/bugs/374038-2-ref.xhtml7
-rw-r--r--layout/reftests/bugs/374038-2.xhtml7
-rw-r--r--layout/reftests/bugs/374927-1-ref.html26
-rw-r--r--layout/reftests/bugs/374927-1.html29
-rw-r--r--layout/reftests/bugs/375508-1-ref.html4
-rw-r--r--layout/reftests/bugs/375508-1.html4
-rw-r--r--layout/reftests/bugs/375716-1-ref.html18
-rw-r--r--layout/reftests/bugs/375716-1.html25
-rw-r--r--layout/reftests/bugs/375827-1-ref.html9
-rw-r--r--layout/reftests/bugs/375827-1.html9
-rw-r--r--layout/reftests/bugs/376375-1-ref.html7
-rw-r--r--layout/reftests/bugs/376375-1.html7
-rw-r--r--layout/reftests/bugs/376484-1-ref.html10
-rw-r--r--layout/reftests/bugs/376484-1.html19
-rw-r--r--layout/reftests/bugs/376532-1-ref.html19
-rw-r--r--layout/reftests/bugs/376532-1.html21
-rw-r--r--layout/reftests/bugs/376532-2-ref.html20
-rw-r--r--layout/reftests/bugs/376532-2.html20
-rw-r--r--layout/reftests/bugs/376532-3-ref.html20
-rw-r--r--layout/reftests/bugs/376532-3.html20
-rw-r--r--layout/reftests/bugs/377603-1-ref.html24
-rw-r--r--layout/reftests/bugs/377603-1.html27
-rw-r--r--layout/reftests/bugs/377918-ref.html6
-rw-r--r--layout/reftests/bugs/377918.html6
-rw-r--r--layout/reftests/bugs/378535-1-ref.html19
-rw-r--r--layout/reftests/bugs/378535-1.html34
-rw-r--r--layout/reftests/bugs/378933-1-ref.html53
-rw-r--r--layout/reftests/bugs/378933-1.html46
-rw-r--r--layout/reftests/bugs/378935-1-ref.html42
-rw-r--r--layout/reftests/bugs/378935-1.html39
-rw-r--r--layout/reftests/bugs/378937-1-ref.html41
-rw-r--r--layout/reftests/bugs/378937-1.html38
-rw-r--r--layout/reftests/bugs/379178-html-ref.html25
-rw-r--r--layout/reftests/bugs/379178-html.html31
-rw-r--r--layout/reftests/bugs/379178-svg-ref.svg21
-rw-r--r--layout/reftests/bugs/379178-svg.svg22
-rw-r--r--layout/reftests/bugs/379178-xhtml-ref.xhtml26
-rw-r--r--layout/reftests/bugs/379178-xhtml.xhtml32
-rw-r--r--layout/reftests/bugs/379316-1-ref.html23
-rw-r--r--layout/reftests/bugs/379316-1.html23
-rw-r--r--layout/reftests/bugs/379316-2-ref.html6
-rw-r--r--layout/reftests/bugs/379316-2.html6
-rw-r--r--layout/reftests/bugs/379328-1-ref.html11
-rw-r--r--layout/reftests/bugs/379328-1.html11
-rw-r--r--layout/reftests/bugs/379349-1-ref.xhtml51
-rw-r--r--layout/reftests/bugs/379349-1a.xhtml50
-rw-r--r--layout/reftests/bugs/379349-1b.xhtml66
-rw-r--r--layout/reftests/bugs/379349-1c.xhtml68
-rw-r--r--layout/reftests/bugs/379349-2-ref.xhtml63
-rw-r--r--layout/reftests/bugs/379349-2a.xhtml85
-rw-r--r--layout/reftests/bugs/379349-2b.xhtml92
-rw-r--r--layout/reftests/bugs/379349-3-ref.xhtml52
-rw-r--r--layout/reftests/bugs/379349-3a.xhtml63
-rw-r--r--layout/reftests/bugs/379349-3b.xhtml65
-rw-r--r--layout/reftests/bugs/379361-1-ref.html16
-rw-r--r--layout/reftests/bugs/379361-1.html16
-rw-r--r--layout/reftests/bugs/379361-2-ref.html16
-rw-r--r--layout/reftests/bugs/379361-2.html16
-rw-r--r--layout/reftests/bugs/379361-3-ref.html123
-rw-r--r--layout/reftests/bugs/379361-3.html123
-rw-r--r--layout/reftests/bugs/379461-1.html16
-rw-r--r--layout/reftests/bugs/379461-1.xhtml16
-rw-r--r--layout/reftests/bugs/379461-2.html16
-rw-r--r--layout/reftests/bugs/379461-2.xhtml16
-rw-r--r--layout/reftests/bugs/379461-3-container-blank.html1
-rw-r--r--layout/reftests/bugs/379461-3-container-html.html1
-rw-r--r--layout/reftests/bugs/379461-3-container-xhtml.html1
-rw-r--r--layout/reftests/bugs/379461-3.html14
-rw-r--r--layout/reftests/bugs/379461-3.xhtml14
-rw-r--r--layout/reftests/bugs/380004-1-ref.html8
-rw-r--r--layout/reftests/bugs/380004-1.html18
-rw-r--r--layout/reftests/bugs/380004-iframe.html9
-rw-r--r--layout/reftests/bugs/380227-1-ref.html8
-rw-r--r--layout/reftests/bugs/380227-1.html17
-rw-r--r--layout/reftests/bugs/380227-iframe.html9
-rw-r--r--layout/reftests/bugs/380825-1-ref.html9
-rw-r--r--layout/reftests/bugs/380825-1.html9
-rw-r--r--layout/reftests/bugs/380842-1-ref.html46
-rw-r--r--layout/reftests/bugs/380842-1.html32
-rw-r--r--layout/reftests/bugs/381130-1-ref.html10
-rw-r--r--layout/reftests/bugs/381130-1.html10
-rw-r--r--layout/reftests/bugs/381507-1-ref.html8
-rw-r--r--layout/reftests/bugs/381507-1.html18
-rw-r--r--layout/reftests/bugs/381507-iframe.html16
-rw-r--r--layout/reftests/bugs/381746-1-framea.html1
-rw-r--r--layout/reftests/bugs/381746-1-frameb.html1
-rw-r--r--layout/reftests/bugs/381746-1-ref.html15
-rw-r--r--layout/reftests/bugs/381746-1.html23
-rw-r--r--layout/reftests/bugs/382600-1-ref.html7
-rw-r--r--layout/reftests/bugs/382600-1.html12
-rw-r--r--layout/reftests/bugs/382916-1-ref.html9
-rw-r--r--layout/reftests/bugs/382916-1.html9
-rw-r--r--layout/reftests/bugs/383035-1.html18
-rw-r--r--layout/reftests/bugs/383035-2.html14
-rw-r--r--layout/reftests/bugs/383488-1-ref.html28
-rw-r--r--layout/reftests/bugs/383488-1.html53
-rw-r--r--layout/reftests/bugs/383551-1-ref.html6
-rw-r--r--layout/reftests/bugs/383551-1.html6
-rw-r--r--layout/reftests/bugs/383883-1-ref.html10
-rw-r--r--layout/reftests/bugs/383883-1.html10
-rw-r--r--layout/reftests/bugs/383883-2-ref.html18
-rw-r--r--layout/reftests/bugs/383883-2.html18
-rw-r--r--layout/reftests/bugs/383883-3-ref.html9
-rw-r--r--layout/reftests/bugs/383883-3.html9
-rw-r--r--layout/reftests/bugs/383883-4-ref.html17
-rw-r--r--layout/reftests/bugs/383883-4.html17
-rw-r--r--layout/reftests/bugs/383884-1-ref.html9
-rw-r--r--layout/reftests/bugs/383884-1.html9
-rw-r--r--layout/reftests/bugs/383885-1-ref.html7
-rw-r--r--layout/reftests/bugs/383885-1.html7
-rw-r--r--layout/reftests/bugs/384322-1-ref.html55
-rw-r--r--layout/reftests/bugs/384322-1.html55
-rw-r--r--layout/reftests/bugs/384576-1-ref.html15
-rw-r--r--layout/reftests/bugs/384576-1.html16
-rw-r--r--layout/reftests/bugs/384762-1.html1
-rw-r--r--layout/reftests/bugs/384876-1-ref.html37
-rw-r--r--layout/reftests/bugs/384876-1.html41
-rw-r--r--layout/reftests/bugs/385533-1.html16
-rw-r--r--layout/reftests/bugs/385569-1-ref.html19
-rw-r--r--layout/reftests/bugs/385569-1a.html27
-rw-r--r--layout/reftests/bugs/385569-1b.html27
-rw-r--r--layout/reftests/bugs/385607-1-ref.html7
-rw-r--r--layout/reftests/bugs/385607-1.html16
-rw-r--r--layout/reftests/bugs/385823-1-ref.html11
-rw-r--r--layout/reftests/bugs/385823-1.html11
-rw-r--r--layout/reftests/bugs/385823-2-ref.html9
-rw-r--r--layout/reftests/bugs/385823-2a.html9
-rw-r--r--layout/reftests/bugs/385823-2b.html14
-rw-r--r--layout/reftests/bugs/385823-2c.html15
-rw-r--r--layout/reftests/bugs/385870-1-ref.html51
-rw-r--r--layout/reftests/bugs/385870-1.html55
-rw-r--r--layout/reftests/bugs/385870-2-ref.html51
-rw-r--r--layout/reftests/bugs/385870-2.html55
-rw-r--r--layout/reftests/bugs/386014-1-ref.html12
-rw-r--r--layout/reftests/bugs/386014-1a.html25
-rw-r--r--layout/reftests/bugs/386014-1b.html26
-rw-r--r--layout/reftests/bugs/386014-1c.html13
-rw-r--r--layout/reftests/bugs/386065-1-ref.html17
-rw-r--r--layout/reftests/bugs/386065-1.html17
-rw-r--r--layout/reftests/bugs/386065-2.html12
-rw-r--r--layout/reftests/bugs/386147-1-ref.html6
-rw-r--r--layout/reftests/bugs/386147-1.html6
-rw-r--r--layout/reftests/bugs/386310-1-ref.html6
-rw-r--r--layout/reftests/bugs/386310-1a.html9
-rw-r--r--layout/reftests/bugs/386310-1b-shadow.html23
-rw-r--r--layout/reftests/bugs/386310-1c-shadow.html23
-rw-r--r--layout/reftests/bugs/386310-1d-shadow.html25
-rw-r--r--layout/reftests/bugs/386310-script.js12
-rw-r--r--layout/reftests/bugs/386401-1-ref.html31
-rw-r--r--layout/reftests/bugs/386401-1.html45
-rw-r--r--layout/reftests/bugs/386401-2-ref.html32
-rw-r--r--layout/reftests/bugs/386401-2.html48
-rw-r--r--layout/reftests/bugs/386401-3-ref.html40
-rw-r--r--layout/reftests/bugs/386401-3.html53
-rw-r--r--layout/reftests/bugs/386470-1-ref.html7
-rw-r--r--layout/reftests/bugs/386470-1a.html7
-rw-r--r--layout/reftests/bugs/386470-1b.html7
-rw-r--r--layout/reftests/bugs/386470-1c.html7
-rw-r--r--layout/reftests/bugs/386920-1-ref.html6
-rw-r--r--layout/reftests/bugs/386920-1.html6
-rw-r--r--layout/reftests/bugs/387201-1-ref.html21
-rw-r--r--layout/reftests/bugs/387201-1.html21
-rw-r--r--layout/reftests/bugs/387201-2.html18
-rw-r--r--layout/reftests/bugs/387201-3.html15
-rw-r--r--layout/reftests/bugs/387227-1-ref.html8
-rw-r--r--layout/reftests/bugs/387227-1.html16
-rw-r--r--layout/reftests/bugs/387227-2-ref.html7
-rw-r--r--layout/reftests/bugs/387227-2.html16
-rw-r--r--layout/reftests/bugs/387344-1-ref.html17
-rw-r--r--layout/reftests/bugs/387344-1.html19
-rw-r--r--layout/reftests/bugs/387876-1-ref.html16
-rw-r--r--layout/reftests/bugs/387876-1.html22
-rw-r--r--layout/reftests/bugs/387876-2-ref.html13
-rw-r--r--layout/reftests/bugs/387876-2.html19
-rw-r--r--layout/reftests/bugs/387876-3-ref.html10
-rw-r--r--layout/reftests/bugs/387876-3a.html19
-rw-r--r--layout/reftests/bugs/387876-3b.html28
-rw-r--r--layout/reftests/bugs/388026-1-ref.html4
-rw-r--r--layout/reftests/bugs/388026-1.html4
-rw-r--r--layout/reftests/bugs/389074-1-ref.html8
-rw-r--r--layout/reftests/bugs/389074-1.html7
-rw-r--r--layout/reftests/bugs/389224-1-ref.html7
-rw-r--r--layout/reftests/bugs/389224-1.html16
-rw-r--r--layout/reftests/bugs/389224-2.html16
-rw-r--r--layout/reftests/bugs/389468-1-ref.html20
-rw-r--r--layout/reftests/bugs/389468-1.html28
-rw-r--r--layout/reftests/bugs/389623-1-ref.html25
-rw-r--r--layout/reftests/bugs/389623-1.html25
-rw-r--r--layout/reftests/bugs/389636-1.html31
-rw-r--r--layout/reftests/bugs/389924-1-ref.html7
-rw-r--r--layout/reftests/bugs/389924-1a.html20
-rw-r--r--layout/reftests/bugs/389924-1b.html21
-rw-r--r--layout/reftests/bugs/390318-1-ref.html9
-rw-r--r--layout/reftests/bugs/390318-1a.html9
-rw-r--r--layout/reftests/bugs/390318-1b.html9
-rw-r--r--layout/reftests/bugs/390318-1c.html9
-rw-r--r--layout/reftests/bugs/390318-1d.html9
-rw-r--r--layout/reftests/bugs/390318-1e.html9
-rw-r--r--layout/reftests/bugs/390318-1f.html9
-rw-r--r--layout/reftests/bugs/391045-ref.html19
-rw-r--r--layout/reftests/bugs/391045.html16
-rw-r--r--layout/reftests/bugs/391140-1-ref.html13
-rw-r--r--layout/reftests/bugs/391140-1.html7
-rw-r--r--layout/reftests/bugs/391412-1-ref.html8
-rw-r--r--layout/reftests/bugs/391412-1a.html11
-rw-r--r--layout/reftests/bugs/391412-1b.html11
-rw-r--r--layout/reftests/bugs/391909-1-ref.html14
-rw-r--r--layout/reftests/bugs/391909-1.html8
-rw-r--r--layout/reftests/bugs/391979-ref.html20
-rw-r--r--layout/reftests/bugs/391979.html38
-rw-r--r--layout/reftests/bugs/391994-1-ref.html9
-rw-r--r--layout/reftests/bugs/391994-1.html13
-rw-r--r--layout/reftests/bugs/392047-ref.html20
-rw-r--r--layout/reftests/bugs/392047.html21
-rw-r--r--layout/reftests/bugs/392435-1-ref.html23
-rw-r--r--layout/reftests/bugs/392435-1.html23
-rw-r--r--layout/reftests/bugs/393330-1-ref.html31
-rw-r--r--layout/reftests/bugs/393330-1.html32
-rw-r--r--layout/reftests/bugs/393490-1-ref.html16
-rw-r--r--layout/reftests/bugs/393490-1.html20
-rw-r--r--layout/reftests/bugs/393517-1.xhtml18
-rw-r--r--layout/reftests/bugs/393649-1-ref.html17
-rw-r--r--layout/reftests/bugs/393649-1.html18
-rw-r--r--layout/reftests/bugs/393655-1-ref.html10
-rw-r--r--layout/reftests/bugs/393655-1.html18
-rw-r--r--layout/reftests/bugs/393655-2-ref.html10
-rw-r--r--layout/reftests/bugs/393655-2.html18
-rw-r--r--layout/reftests/bugs/393655-3-ref.html9
-rw-r--r--layout/reftests/bugs/393655-3.html17
-rw-r--r--layout/reftests/bugs/393655-4-ref.html9
-rw-r--r--layout/reftests/bugs/393655-4.html17
-rw-r--r--layout/reftests/bugs/393655-5-ref.html9
-rw-r--r--layout/reftests/bugs/393655-5.html17
-rw-r--r--layout/reftests/bugs/393671-1-ref.html9
-rw-r--r--layout/reftests/bugs/393671-1.html21
-rw-r--r--layout/reftests/bugs/393671-2-ref.html9
-rw-r--r--layout/reftests/bugs/393671-2.html21
-rw-r--r--layout/reftests/bugs/393671-3-ref.html9
-rw-r--r--layout/reftests/bugs/393671-3.html21
-rw-r--r--layout/reftests/bugs/394111-1.html18
-rw-r--r--layout/reftests/bugs/394534-1-ref.html7
-rw-r--r--layout/reftests/bugs/394534-1.html8
-rw-r--r--layout/reftests/bugs/395107-1-ref.html13
-rw-r--r--layout/reftests/bugs/395107-1.html20
-rw-r--r--layout/reftests/bugs/395107-2-ref.html13
-rw-r--r--layout/reftests/bugs/395107-2.html20
-rw-r--r--layout/reftests/bugs/395107-3-ref.html9
-rw-r--r--layout/reftests/bugs/395107-3.html10
-rw-r--r--layout/reftests/bugs/395107-4-ref.html9
-rw-r--r--layout/reftests/bugs/395107-4.html10
-rw-r--r--layout/reftests/bugs/395107-5-ref.html9
-rw-r--r--layout/reftests/bugs/395107-5.html10
-rw-r--r--layout/reftests/bugs/395130-1-ref.html11
-rw-r--r--layout/reftests/bugs/395130-1.html14
-rw-r--r--layout/reftests/bugs/395130-2-ref.html14
-rw-r--r--layout/reftests/bugs/395130-2.html15
-rw-r--r--layout/reftests/bugs/395390-1-ref.html5
-rw-r--r--layout/reftests/bugs/395390-1.html14
-rw-r--r--layout/reftests/bugs/397428-1-ref.html6
-rw-r--r--layout/reftests/bugs/397428-1.html8
-rw-r--r--layout/reftests/bugs/397844-1-ref.xhtml13
-rw-r--r--layout/reftests/bugs/397844-1.xhtml13
-rw-r--r--layout/reftests/bugs/398092-1-ref.html18
-rw-r--r--layout/reftests/bugs/398092-1.html18
-rw-r--r--layout/reftests/bugs/398101-1-ref.html13
-rw-r--r--layout/reftests/bugs/398101-1.html22
-rw-r--r--layout/reftests/bugs/398144-1-ref.html9
-rw-r--r--layout/reftests/bugs/398144-1.html10
-rw-r--r--layout/reftests/bugs/398682-1-ref.html17
-rw-r--r--layout/reftests/bugs/398682-1.html62
-rw-r--r--layout/reftests/bugs/398797-1-ref.html12
-rw-r--r--layout/reftests/bugs/398797-1a.html11
-rw-r--r--layout/reftests/bugs/398797-1b.html11
-rw-r--r--layout/reftests/bugs/398797-1c.html11
-rw-r--r--layout/reftests/bugs/398797-1d.html11
-rw-r--r--layout/reftests/bugs/398797-style.css13
-rw-r--r--layout/reftests/bugs/399209-1-ref.html15
-rw-r--r--layout/reftests/bugs/399209-1.html25
-rw-r--r--layout/reftests/bugs/399209-2-ref.html15
-rw-r--r--layout/reftests/bugs/399209-2.html25
-rw-r--r--layout/reftests/bugs/399258-1-ref.html6
-rw-r--r--layout/reftests/bugs/399258-1.html9
-rw-r--r--layout/reftests/bugs/399384-1-ref.html16
-rw-r--r--layout/reftests/bugs/399384-1.html21
-rw-r--r--layout/reftests/bugs/399636-quirks-css.html23
-rw-r--r--layout/reftests/bugs/399636-quirks-html.html20
-rw-r--r--layout/reftests/bugs/399636-quirks-ref.html22
-rw-r--r--layout/reftests/bugs/399636-standards-css.html25
-rw-r--r--layout/reftests/bugs/399636-standards-html.html22
-rw-r--r--layout/reftests/bugs/399636-standards-ref.html24
-rw-r--r--layout/reftests/bugs/400081-1.html5
-rw-r--r--layout/reftests/bugs/400171-1-ref.html15
-rw-r--r--layout/reftests/bugs/400171-1a.html23
-rw-r--r--layout/reftests/bugs/400171-1b.html22
-rw-r--r--layout/reftests/bugs/400171-1c.html24
-rw-r--r--layout/reftests/bugs/400171-2-ref.html15
-rw-r--r--layout/reftests/bugs/400171-2a.html23
-rw-r--r--layout/reftests/bugs/400171-2b.html22
-rw-r--r--layout/reftests/bugs/400171-2c.html24
-rw-r--r--layout/reftests/bugs/400421-1-ref.html5
-rw-r--r--layout/reftests/bugs/400421-1.html20
-rw-r--r--layout/reftests/bugs/400813-1-ref.html7
-rw-r--r--layout/reftests/bugs/400813-1.html7
-rw-r--r--layout/reftests/bugs/400826-1-ref.html7
-rw-r--r--layout/reftests/bugs/400826-1.html14
-rw-r--r--layout/reftests/bugs/401121-1-ref.html11
-rw-r--r--layout/reftests/bugs/401121-1.html12
-rw-r--r--layout/reftests/bugs/401121-2-ref.html13
-rw-r--r--layout/reftests/bugs/401121-2.html15
-rw-r--r--layout/reftests/bugs/401361-frame.html7
-rw-r--r--layout/reftests/bugs/401946-1.xhtml4
-rw-r--r--layout/reftests/bugs/402338-1-ref.html12
-rw-r--r--layout/reftests/bugs/402338-1.html12
-rw-r--r--layout/reftests/bugs/402567-1-ref.html19
-rw-r--r--layout/reftests/bugs/402567-1.html19
-rw-r--r--layout/reftests/bugs/402567-2-ref.html20
-rw-r--r--layout/reftests/bugs/402567-2.html16
-rw-r--r--layout/reftests/bugs/402567-3-ref.html25
-rw-r--r--layout/reftests/bugs/402567-3.html19
-rw-r--r--layout/reftests/bugs/402567-4-ref.html26
-rw-r--r--layout/reftests/bugs/402567-4.html20
-rw-r--r--layout/reftests/bugs/402629-1-iframe.html26
-rw-r--r--layout/reftests/bugs/402629-1-ref.html7
-rw-r--r--layout/reftests/bugs/402629-1.html17
-rw-r--r--layout/reftests/bugs/402629-2-iframe.html21
-rw-r--r--layout/reftests/bugs/402629-2-ref.html7
-rw-r--r--layout/reftests/bugs/402629-2.html17
-rw-r--r--layout/reftests/bugs/402629-3-iframe.html22
-rw-r--r--layout/reftests/bugs/402629-3-ref.html7
-rw-r--r--layout/reftests/bugs/402629-3.html17
-rw-r--r--layout/reftests/bugs/402807-1-ref.html21
-rw-r--r--layout/reftests/bugs/402807-1.html21
-rw-r--r--layout/reftests/bugs/402940-1-ref.html19
-rw-r--r--layout/reftests/bugs/402940-1.html19
-rw-r--r--layout/reftests/bugs/402940-1b.html20
-rw-r--r--layout/reftests/bugs/402940-2-notref.html19
-rw-r--r--layout/reftests/bugs/402940-2.html19
-rw-r--r--layout/reftests/bugs/402940-3-notref.html19
-rw-r--r--layout/reftests/bugs/402940-3.html19
-rw-r--r--layout/reftests/bugs/402950-1-ref.html15
-rw-r--r--layout/reftests/bugs/402950-1.html21
-rw-r--r--layout/reftests/bugs/403129-1-ref.html8
-rw-r--r--layout/reftests/bugs/403129-1.html8
-rw-r--r--layout/reftests/bugs/403129-2-ref.html8
-rw-r--r--layout/reftests/bugs/403129-2.html8
-rw-r--r--layout/reftests/bugs/403129-3-ref.html8
-rw-r--r--layout/reftests/bugs/403129-3.html8
-rw-r--r--layout/reftests/bugs/403129-4-ref.html8
-rw-r--r--layout/reftests/bugs/403129-4.html8
-rw-r--r--layout/reftests/bugs/403134-1-ref.html8
-rw-r--r--layout/reftests/bugs/403134-1.html16
-rw-r--r--layout/reftests/bugs/403181-1-ref.xml10
-rw-r--r--layout/reftests/bugs/403181-1.xml12
-rw-r--r--layout/reftests/bugs/403249-1-ref.html20
-rw-r--r--layout/reftests/bugs/403249-1a.html27
-rw-r--r--layout/reftests/bugs/403249-1b.html27
-rw-r--r--layout/reftests/bugs/403249-2-ref.html16
-rw-r--r--layout/reftests/bugs/403249-2a.html27
-rw-r--r--layout/reftests/bugs/403249-2b.html27
-rw-r--r--layout/reftests/bugs/403328-1-ref.html45
-rw-r--r--layout/reftests/bugs/403328-1.html115
-rw-r--r--layout/reftests/bugs/403426-1-ref.html8
-rw-r--r--layout/reftests/bugs/403426-1.html9
-rw-r--r--layout/reftests/bugs/403455-1-ref.html12
-rw-r--r--layout/reftests/bugs/403455-1.html14
-rw-r--r--layout/reftests/bugs/403505-1-ref.xhtml1
-rw-r--r--layout/reftests/bugs/403505-1.xml13
-rw-r--r--layout/reftests/bugs/403519-1-ref.html15
-rw-r--r--layout/reftests/bugs/403519-1.html15
-rw-r--r--layout/reftests/bugs/403519-2-ref.html29
-rw-r--r--layout/reftests/bugs/403519-2.html29
-rw-r--r--layout/reftests/bugs/403656-1-ref.html14
-rw-r--r--layout/reftests/bugs/403656-1.html19
-rw-r--r--layout/reftests/bugs/403656-2-ref.html16
-rw-r--r--layout/reftests/bugs/403656-2.html21
-rw-r--r--layout/reftests/bugs/403656-3-ref.html17
-rw-r--r--layout/reftests/bugs/403656-3.html22
-rw-r--r--layout/reftests/bugs/403656-4-ref.html16
-rw-r--r--layout/reftests/bugs/403656-4.html21
-rw-r--r--layout/reftests/bugs/403656-5-ref.html16
-rw-r--r--layout/reftests/bugs/403656-5.html21
-rw-r--r--layout/reftests/bugs/403657-1-ref.html10
-rw-r--r--layout/reftests/bugs/403657-1.html10
-rw-r--r--layout/reftests/bugs/404030-1-notref.html27
-rw-r--r--layout/reftests/bugs/404030-1-notref2.html29
-rw-r--r--layout/reftests/bugs/404030-1-ref.html27
-rw-r--r--layout/reftests/bugs/404030-1.html27
-rw-r--r--layout/reftests/bugs/404123-1-ref.html10
-rw-r--r--layout/reftests/bugs/404123-1.html9
-rw-r--r--layout/reftests/bugs/404123-2-ref.html10
-rw-r--r--layout/reftests/bugs/404123-2.html9
-rw-r--r--layout/reftests/bugs/404123-3-ref.html10
-rw-r--r--layout/reftests/bugs/404123-3.html12
-rw-r--r--layout/reftests/bugs/404149-1-ref.xhtml19
-rw-r--r--layout/reftests/bugs/404149-1.xhtml19
-rw-r--r--layout/reftests/bugs/404180-1-ref.html6
-rw-r--r--layout/reftests/bugs/404180-1.html6
-rw-r--r--layout/reftests/bugs/404301-1-ref.html25
-rw-r--r--layout/reftests/bugs/404301-1.html32
-rw-r--r--layout/reftests/bugs/404309-1-ref.html20
-rw-r--r--layout/reftests/bugs/404309-1a.html27
-rw-r--r--layout/reftests/bugs/404309-1b.html27
-rw-r--r--layout/reftests/bugs/404553-1-ref.html1
-rw-r--r--layout/reftests/bugs/404553-1.html1
-rw-r--r--layout/reftests/bugs/404666-1-ref.html19
-rw-r--r--layout/reftests/bugs/404666-1.html25
-rw-r--r--layout/reftests/bugs/404666-2-ref.html15
-rw-r--r--layout/reftests/bugs/404666-2.html26
-rw-r--r--layout/reftests/bugs/405305-1-ref.html9
-rw-r--r--layout/reftests/bugs/405305-1.html9
-rw-r--r--layout/reftests/bugs/405380-1-ref.html7
-rw-r--r--layout/reftests/bugs/405380-1.html8
-rw-r--r--layout/reftests/bugs/405517-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/405517-1.xhtml15
-rw-r--r--layout/reftests/bugs/405577-1-ref.html32
-rw-r--r--layout/reftests/bugs/405577-1.html32
-rw-r--r--layout/reftests/bugs/405584-1-ref.html5
-rw-r--r--layout/reftests/bugs/405584-1.html12
-rw-r--r--layout/reftests/bugs/405952-1-ref.html42
-rw-r--r--layout/reftests/bugs/405952-1.html48
-rw-r--r--layout/reftests/bugs/40596-1-ref.html16
-rw-r--r--layout/reftests/bugs/40596-1a.html16
-rw-r--r--layout/reftests/bugs/40596-1b.html16
-rw-r--r--layout/reftests/bugs/40596-1c.html18
-rw-r--r--layout/reftests/bugs/40596-1d.html18
-rw-r--r--layout/reftests/bugs/40596-1e.html17
-rw-r--r--layout/reftests/bugs/40596-1f.html17
-rw-r--r--layout/reftests/bugs/40596-1g.html18
-rw-r--r--layout/reftests/bugs/40596-1h.html18
-rw-r--r--layout/reftests/bugs/40596-1i.html18
-rw-r--r--layout/reftests/bugs/40596-1j.html18
-rw-r--r--layout/reftests/bugs/406484-1-ref.html14
-rw-r--r--layout/reftests/bugs/406484-1.html20
-rw-r--r--layout/reftests/bugs/406568-1-ref.html11
-rw-r--r--layout/reftests/bugs/406568-1.html13
-rw-r--r--layout/reftests/bugs/407016-1-a.html9
-rw-r--r--layout/reftests/bugs/407016-1-b.html9
-rw-r--r--layout/reftests/bugs/407016-1-ref.html7
-rw-r--r--layout/reftests/bugs/407078-1-ref.html21
-rw-r--r--layout/reftests/bugs/407078-1.html22
-rw-r--r--layout/reftests/bugs/407095-1-ref.html9
-rw-r--r--layout/reftests/bugs/407095-1.html9
-rw-r--r--layout/reftests/bugs/407111-1-ref.html10
-rw-r--r--layout/reftests/bugs/407111-1.html10
-rw-r--r--layout/reftests/bugs/407227-1-ref.html13
-rw-r--r--layout/reftests/bugs/407227-1.html13
-rw-r--r--layout/reftests/bugs/407243-1-ref.html67
-rw-r--r--layout/reftests/bugs/407243-1.html73
-rw-r--r--layout/reftests/bugs/407419-1-ref.html10
-rw-r--r--layout/reftests/bugs/407419-1.html10
-rw-r--r--layout/reftests/bugs/407937-1-ref.html5
-rw-r--r--layout/reftests/bugs/407937-1.html5
-rw-r--r--layout/reftests/bugs/408493-1.html16
-rw-r--r--layout/reftests/bugs/408493-2-ref.html14
-rw-r--r--layout/reftests/bugs/408493-2.html16
-rw-r--r--layout/reftests/bugs/408656-1-ref.html16
-rw-r--r--layout/reftests/bugs/408656-1a.html22
-rw-r--r--layout/reftests/bugs/408656-1b.html25
-rw-r--r--layout/reftests/bugs/408656-1c.html21
-rw-r--r--layout/reftests/bugs/408782-1-ref.html9
-rw-r--r--layout/reftests/bugs/408782-1a.html9
-rw-r--r--layout/reftests/bugs/408782-1b.html9
-rw-r--r--layout/reftests/bugs/408782-2-ref.html5
-rw-r--r--layout/reftests/bugs/408782-2a.html5
-rw-r--r--layout/reftests/bugs/408782-2b.html9
-rw-r--r--layout/reftests/bugs/409084-1-ref.html15
-rw-r--r--layout/reftests/bugs/409084-1a.html20
-rw-r--r--layout/reftests/bugs/409084-1b.html21
-rw-r--r--layout/reftests/bugs/409659-1-ref.html6
-rw-r--r--layout/reftests/bugs/409659-1a.html7
-rw-r--r--layout/reftests/bugs/409659-1b.html6
-rw-r--r--layout/reftests/bugs/409659-1c.html6
-rw-r--r--layout/reftests/bugs/409659-1d.html9
-rw-r--r--layout/reftests/bugs/410621-1-ref.html71
-rw-r--r--layout/reftests/bugs/410621-1.html71
-rw-r--r--layout/reftests/bugs/411059-1-ref.html42
-rw-r--r--layout/reftests/bugs/411059-1.html44
-rw-r--r--layout/reftests/bugs/411334-1-ref.xml7
-rw-r--r--layout/reftests/bugs/411334-1.xml7
-rw-r--r--layout/reftests/bugs/411585-1-ref.html7
-rw-r--r--layout/reftests/bugs/411585-1.html7
-rw-r--r--layout/reftests/bugs/411585-2-ref.html7
-rw-r--r--layout/reftests/bugs/411585-2.html9
-rw-r--r--layout/reftests/bugs/411585-3-ref.html7
-rw-r--r--layout/reftests/bugs/411585-3.html9
-rw-r--r--layout/reftests/bugs/411792-1-ref.html6
-rw-r--r--layout/reftests/bugs/411792-1.html7
-rw-r--r--layout/reftests/bugs/412093-1-ref.html49
-rw-r--r--layout/reftests/bugs/412093-1.html30
-rw-r--r--layout/reftests/bugs/412352-1-ref.html9
-rw-r--r--layout/reftests/bugs/412352-1.html14
-rw-r--r--layout/reftests/bugs/412352-2-ref.html9
-rw-r--r--layout/reftests/bugs/412352-2.html14
-rw-r--r--layout/reftests/bugs/412607-1-ref.html27
-rw-r--r--layout/reftests/bugs/412607-1a.html27
-rw-r--r--layout/reftests/bugs/412607-1b.html27
-rw-r--r--layout/reftests/bugs/412679-1-ref.html51
-rw-r--r--layout/reftests/bugs/412679-1.html55
-rw-r--r--layout/reftests/bugs/412679-2-ref.html51
-rw-r--r--layout/reftests/bugs/412679-2.html55
-rw-r--r--layout/reftests/bugs/413027-2-ref.html12
-rw-r--r--layout/reftests/bugs/413027-2.html12
-rw-r--r--layout/reftests/bugs/413027-3-ref.html10
-rw-r--r--layout/reftests/bugs/413027-3.html10
-rw-r--r--layout/reftests/bugs/413286-1-ref.html89
-rw-r--r--layout/reftests/bugs/413286-1a.html108
-rw-r--r--layout/reftests/bugs/413286-1b.html108
-rw-r--r--layout/reftests/bugs/413286-1c.html108
-rw-r--r--layout/reftests/bugs/413286-2-ref.html66
-rw-r--r--layout/reftests/bugs/413286-2a.html67
-rw-r--r--layout/reftests/bugs/413286-2b.html68
-rw-r--r--layout/reftests/bugs/413286-2c.html67
-rw-r--r--layout/reftests/bugs/413286-3-ref.html66
-rw-r--r--layout/reftests/bugs/413286-3.html67
-rw-r--r--layout/reftests/bugs/413286-4-ref.html66
-rw-r--r--layout/reftests/bugs/413286-4a.html66
-rw-r--r--layout/reftests/bugs/413286-4b.html70
-rw-r--r--layout/reftests/bugs/413286-5-ref.html68
-rw-r--r--layout/reftests/bugs/413286-5.html68
-rw-r--r--layout/reftests/bugs/413286-6-ref.html48
-rw-r--r--layout/reftests/bugs/413286-6.html51
-rw-r--r--layout/reftests/bugs/413292-1-ref.html11
-rw-r--r--layout/reftests/bugs/413292-1.html49
-rw-r--r--layout/reftests/bugs/413361-1-ref.html13
-rw-r--r--layout/reftests/bugs/413361-1.html15
-rw-r--r--layout/reftests/bugs/413840-background-unchanged-ref.html36
-rw-r--r--layout/reftests/bugs/413840-background-unchanged.html38
-rw-r--r--layout/reftests/bugs/413840-bullet-first-line-ref.html20
-rw-r--r--layout/reftests/bugs/413840-bullet-first-line.html19
-rw-r--r--layout/reftests/bugs/413840-ltr-offsets-ref.html30
-rw-r--r--layout/reftests/bugs/413840-ltr-offsets.html38
-rw-r--r--layout/reftests/bugs/413840-pushed-line-bullet-ref.html22
-rw-r--r--layout/reftests/bugs/413840-pushed-line-bullet.html23
-rw-r--r--layout/reftests/bugs/413840-rtl-offsets-ref.html31
-rw-r--r--layout/reftests/bugs/413840-rtl-offsets.html39
-rw-r--r--layout/reftests/bugs/413982-ref.html10
-rw-r--r--layout/reftests/bugs/413982.html25
-rw-r--r--layout/reftests/bugs/414638-ref.html27
-rw-r--r--layout/reftests/bugs/414638.html33
-rw-r--r--layout/reftests/bugs/414851-1-ref.html15
-rw-r--r--layout/reftests/bugs/414851-1.html15
-rw-r--r--layout/reftests/bugs/416106-1-ref.xhtml19
-rw-r--r--layout/reftests/bugs/416106-1.xhtml56
-rw-r--r--layout/reftests/bugs/416752-1-ref.html15
-rw-r--r--layout/reftests/bugs/416752-1.html17
-rw-r--r--layout/reftests/bugs/417178-1-ref.html14
-rw-r--r--layout/reftests/bugs/417178-1.html14
-rw-r--r--layout/reftests/bugs/417246-1-ref.html13
-rw-r--r--layout/reftests/bugs/417246-1.html14
-rw-r--r--layout/reftests/bugs/417676-ref.html18
-rw-r--r--layout/reftests/bugs/417676.html9
-rw-r--r--layout/reftests/bugs/418574-1-ref.html25
-rw-r--r--layout/reftests/bugs/418574-1.html25
-rw-r--r--layout/reftests/bugs/418574-2-ref.html23
-rw-r--r--layout/reftests/bugs/418574-2.html23
-rw-r--r--layout/reftests/bugs/418766-1-ref.html5
-rw-r--r--layout/reftests/bugs/418766-1a.html16
-rw-r--r--layout/reftests/bugs/418766-1b.html6
-rw-r--r--layout/reftests/bugs/419060-ref.html34
-rw-r--r--layout/reftests/bugs/419060.html38
-rw-r--r--layout/reftests/bugs/419285-1-ref.html7
-rw-r--r--layout/reftests/bugs/419285-1.html12
-rw-r--r--layout/reftests/bugs/419531-1-ref.html14
-rw-r--r--layout/reftests/bugs/419531-1.html18
-rw-r--r--layout/reftests/bugs/420069-1-ref.html47
-rw-r--r--layout/reftests/bugs/420069-1.html56
-rw-r--r--layout/reftests/bugs/420069-2-ref.html47
-rw-r--r--layout/reftests/bugs/420069-2.html56
-rw-r--r--layout/reftests/bugs/420351-1-ref.html17
-rw-r--r--layout/reftests/bugs/420351-1.html19
-rw-r--r--layout/reftests/bugs/421069-ref.html163
-rw-r--r--layout/reftests/bugs/421069-ref2.html191
-rw-r--r--layout/reftests/bugs/421069.html163
-rw-r--r--layout/reftests/bugs/421203-1-ref.html6
-rw-r--r--layout/reftests/bugs/421203-1.xhtml4
-rw-r--r--layout/reftests/bugs/421203-2.xhtml4
-rw-r--r--layout/reftests/bugs/421203-3.xhtml7
-rw-r--r--layout/reftests/bugs/421203-4.xhtml24
-rw-r--r--layout/reftests/bugs/421203-5.xhtml23
-rw-r--r--layout/reftests/bugs/421203-6.xhtml23
-rw-r--r--layout/reftests/bugs/421234-1-ref.html7
-rw-r--r--layout/reftests/bugs/421234-1.html7
-rw-r--r--layout/reftests/bugs/421239-1-ref.html12
-rw-r--r--layout/reftests/bugs/421239-1.html20
-rw-r--r--layout/reftests/bugs/421239-2-ref.html12
-rw-r--r--layout/reftests/bugs/421239-2.html20
-rw-r--r--layout/reftests/bugs/421419-1-ref.html14
-rw-r--r--layout/reftests/bugs/421419-1.html14
-rw-r--r--layout/reftests/bugs/421436-1-ref.html11
-rw-r--r--layout/reftests/bugs/421436-1a.html7
-rw-r--r--layout/reftests/bugs/421436-1b.html6
-rw-r--r--layout/reftests/bugs/421632-1-ref.html52
-rw-r--r--layout/reftests/bugs/421632-1.html66
-rw-r--r--layout/reftests/bugs/421710-1.html226
-rw-r--r--layout/reftests/bugs/421885-1-ref.xml27
-rw-r--r--layout/reftests/bugs/421885-1.xml33
-rw-r--r--layout/reftests/bugs/421955-1-ref.html7
-rw-r--r--layout/reftests/bugs/421955-1.html9
-rw-r--r--layout/reftests/bugs/422249-1-ref.html20
-rw-r--r--layout/reftests/bugs/422249-1.html18
-rw-r--r--layout/reftests/bugs/422394-1-ref.html6
-rw-r--r--layout/reftests/bugs/422394-1.html6
-rw-r--r--layout/reftests/bugs/422678-1-ref.html12
-rw-r--r--layout/reftests/bugs/422678-1.html12
-rw-r--r--layout/reftests/bugs/423130-1-ref.html14
-rw-r--r--layout/reftests/bugs/423130-1.html21
-rw-r--r--layout/reftests/bugs/423385-1-ref.html11
-rw-r--r--layout/reftests/bugs/423385-1.html16
-rw-r--r--layout/reftests/bugs/423599-1-ref.html11
-rw-r--r--layout/reftests/bugs/423599-1.html14
-rw-r--r--layout/reftests/bugs/423676-1-ref.html20
-rw-r--r--layout/reftests/bugs/423676-1.html23
-rw-r--r--layout/reftests/bugs/423823-1-ref.html10
-rw-r--r--layout/reftests/bugs/423823-1.html16
-rw-r--r--layout/reftests/bugs/424074-1-ref.xhtml11
-rw-r--r--layout/reftests/bugs/424074-1-ref2.xhtml11
-rw-r--r--layout/reftests/bugs/424074-1-ref3.xhtml11
-rw-r--r--layout/reftests/bugs/424074-1.xhtml7
-rw-r--r--layout/reftests/bugs/424236-1-ref.html19
-rw-r--r--layout/reftests/bugs/424236-1.html20
-rw-r--r--layout/reftests/bugs/424236-10-ref.html18
-rw-r--r--layout/reftests/bugs/424236-10.html20
-rw-r--r--layout/reftests/bugs/424236-11.html23
-rw-r--r--layout/reftests/bugs/424236-2-ref.html22
-rw-r--r--layout/reftests/bugs/424236-2.html20
-rw-r--r--layout/reftests/bugs/424236-3-ref.html22
-rw-r--r--layout/reftests/bugs/424236-3.html21
-rw-r--r--layout/reftests/bugs/424236-4-ref.html21
-rw-r--r--layout/reftests/bugs/424236-4.html21
-rw-r--r--layout/reftests/bugs/424236-5-ref.html22
-rw-r--r--layout/reftests/bugs/424236-5.html23
-rw-r--r--layout/reftests/bugs/424236-6-ref.html23
-rw-r--r--layout/reftests/bugs/424236-6.html21
-rw-r--r--layout/reftests/bugs/424236-7-ref.html21
-rw-r--r--layout/reftests/bugs/424236-7.html20
-rw-r--r--layout/reftests/bugs/424236-8-ref.html25
-rw-r--r--layout/reftests/bugs/424236-8.html23
-rw-r--r--layout/reftests/bugs/424236-9-ref.html25
-rw-r--r--layout/reftests/bugs/424236-9.html24
-rw-r--r--layout/reftests/bugs/424434-1-ref.html10
-rw-r--r--layout/reftests/bugs/424434-1.html10
-rw-r--r--layout/reftests/bugs/424465-1-ref.html35
-rw-r--r--layout/reftests/bugs/424465-1.html52
-rw-r--r--layout/reftests/bugs/424631-1-ref.html10
-rw-r--r--layout/reftests/bugs/424631-1.html10
-rw-r--r--layout/reftests/bugs/424710-1-ref.html5
-rw-r--r--layout/reftests/bugs/424710-1.html6
-rw-r--r--layout/reftests/bugs/424766-1-ref.html29
-rw-r--r--layout/reftests/bugs/424766-1.html45
-rw-r--r--layout/reftests/bugs/425972-1-ref.html14
-rw-r--r--layout/reftests/bugs/425972-1.html15
-rw-r--r--layout/reftests/bugs/425972-2-ref.html14
-rw-r--r--layout/reftests/bugs/425972-2.html15
-rw-r--r--layout/reftests/bugs/426629-1-ref.html18
-rw-r--r--layout/reftests/bugs/426629-1.html19
-rw-r--r--layout/reftests/bugs/427017-1.xhtml13
-rw-r--r--layout/reftests/bugs/427129-image.html213
-rw-r--r--layout/reftests/bugs/427129-ref.html148
-rw-r--r--layout/reftests/bugs/427129-scrollframe.html214
-rw-r--r--layout/reftests/bugs/427129-table-caption-ref.html174
-rw-r--r--layout/reftests/bugs/427129-table-caption.html248
-rw-r--r--layout/reftests/bugs/427129-table.html216
-rw-r--r--layout/reftests/bugs/427370-1-ref.html155
-rw-r--r--layout/reftests/bugs/427370-1.html155
-rw-r--r--layout/reftests/bugs/427730-1-ref.html5
-rw-r--r--layout/reftests/bugs/427730-1.html5
-rw-r--r--layout/reftests/bugs/428278-iframe.html10
-rw-r--r--layout/reftests/bugs/428278-ref.html9
-rw-r--r--layout/reftests/bugs/428278.html18
-rw-r--r--layout/reftests/bugs/428423-1-ref.html10
-rw-r--r--layout/reftests/bugs/428423-1a.html18
-rw-r--r--layout/reftests/bugs/428423-1b.html17
-rw-r--r--layout/reftests/bugs/428521-1-ref.html28
-rw-r--r--layout/reftests/bugs/428521-1a.html28
-rw-r--r--layout/reftests/bugs/428521-1b.html28
-rw-r--r--layout/reftests/bugs/428521-1c.html28
-rw-r--r--layout/reftests/bugs/428810-1-ltr-insets-ref.html10
-rw-r--r--layout/reftests/bugs/428810-1-ltr-ref.html11
-rw-r--r--layout/reftests/bugs/428810-1-rtl-insets-ref.html11
-rw-r--r--layout/reftests/bugs/428810-1-rtl-ref.html11
-rw-r--r--layout/reftests/bugs/428810-1a-ltr-insets.html12
-rw-r--r--layout/reftests/bugs/428810-1a-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-1a-rtl-insets.html13
-rw-r--r--layout/reftests/bugs/428810-1a-rtl.html13
-rw-r--r--layout/reftests/bugs/428810-1b-ltr-insets.html12
-rw-r--r--layout/reftests/bugs/428810-1b-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-1b-rtl-insets.html13
-rw-r--r--layout/reftests/bugs/428810-1b-rtl.html13
-rw-r--r--layout/reftests/bugs/428810-1c-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-1c-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-1c-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-1c-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-1d-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-1d-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-1d-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-1d-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-2-ltr-insets-ref.html10
-rw-r--r--layout/reftests/bugs/428810-2-ltr-ref.html11
-rw-r--r--layout/reftests/bugs/428810-2-rtl-insets-ref.html11
-rw-r--r--layout/reftests/bugs/428810-2-rtl-ref.html11
-rw-r--r--layout/reftests/bugs/428810-2a-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-2a-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-2a-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-2a-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-2b-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-2b-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-2b-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-2b-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-2e-ltr-insets.html14
-rw-r--r--layout/reftests/bugs/428810-2e-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-2e-rtl-insets.html15
-rw-r--r--layout/reftests/bugs/428810-2e-rtl.html15
-rw-r--r--layout/reftests/bugs/428810-2f-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-2f-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-2f-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-2f-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-3-ltr-insets-ref.html10
-rw-r--r--layout/reftests/bugs/428810-3-ltr-ref.html11
-rw-r--r--layout/reftests/bugs/428810-3-rtl-insets-ref.html11
-rw-r--r--layout/reftests/bugs/428810-3-rtl-ref.html11
-rw-r--r--layout/reftests/bugs/428810-3a-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-3a-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-3a-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-3a-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-3b-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-3b-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-3b-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-3b-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-3e-ltr-insets.html14
-rw-r--r--layout/reftests/bugs/428810-3e-ltr.html14
-rw-r--r--layout/reftests/bugs/428810-3e-rtl-insets.html15
-rw-r--r--layout/reftests/bugs/428810-3e-rtl.html15
-rw-r--r--layout/reftests/bugs/428810-3f-ltr-insets.html13
-rw-r--r--layout/reftests/bugs/428810-3f-ltr.html13
-rw-r--r--layout/reftests/bugs/428810-3f-rtl-insets.html14
-rw-r--r--layout/reftests/bugs/428810-3f-rtl.html14
-rw-r--r--layout/reftests/bugs/428810-empty-ltr-insets-ref.html11
-rw-r--r--layout/reftests/bugs/428810-empty-ltr-ref.html11
-rw-r--r--layout/reftests/bugs/428810-empty-rtl-insets-ref.html12
-rw-r--r--layout/reftests/bugs/428810-empty-rtl-ref.html12
-rw-r--r--layout/reftests/bugs/430412-1-ref.html28
-rw-r--r--layout/reftests/bugs/430412-1.html28
-rw-r--r--layout/reftests/bugs/430813-1-ref.html19
-rw-r--r--layout/reftests/bugs/430813-1.html20
-rw-r--r--layout/reftests/bugs/430813-2-ref.html19
-rw-r--r--layout/reftests/bugs/430813-2.html20
-rw-r--r--layout/reftests/bugs/430813-3-ref.html14
-rw-r--r--layout/reftests/bugs/430813-3.html15
-rw-r--r--layout/reftests/bugs/431341-1-ref.html12
-rw-r--r--layout/reftests/bugs/431341-1.html13
-rw-r--r--layout/reftests/bugs/431341-2-ref.html12
-rw-r--r--layout/reftests/bugs/431341-2.html12
-rw-r--r--layout/reftests/bugs/431520-1-ref.html7
-rw-r--r--layout/reftests/bugs/431520-1.html10
-rw-r--r--layout/reftests/bugs/431948-1-ref.html12
-rw-r--r--layout/reftests/bugs/431948-1.html31
-rw-r--r--layout/reftests/bugs/433640-1-ref.html49
-rw-r--r--layout/reftests/bugs/433640-1.html52
-rw-r--r--layout/reftests/bugs/433700-ref.html95
-rw-r--r--layout/reftests/bugs/433700.html88
-rw-r--r--layout/reftests/bugs/436356-1-ref.html1
-rw-r--r--layout/reftests/bugs/436356-1.html13
-rw-r--r--layout/reftests/bugs/436356-2-ref.html2
-rw-r--r--layout/reftests/bugs/436356-2.html14
-rw-r--r--layout/reftests/bugs/438537-1-ref.html10
-rw-r--r--layout/reftests/bugs/438537-1.html18
-rw-r--r--layout/reftests/bugs/438981-1.xhtml11
-rw-r--r--layout/reftests/bugs/438987-1-ref.html6
-rw-r--r--layout/reftests/bugs/438987-1.html7
-rw-r--r--layout/reftests/bugs/438987-2-ref.html6
-rw-r--r--layout/reftests/bugs/438987-2a.html5
-rw-r--r--layout/reftests/bugs/438987-2b.html5
-rw-r--r--layout/reftests/bugs/438987-2c.html5
-rw-r--r--layout/reftests/bugs/439004-1-ref.html6
-rw-r--r--layout/reftests/bugs/439004-1.html6
-rw-r--r--layout/reftests/bugs/439639-1-ref.html25
-rw-r--r--layout/reftests/bugs/439639-1.html33
-rw-r--r--layout/reftests/bugs/439910-ref.html16
-rw-r--r--layout/reftests/bugs/439910.html16
-rw-r--r--layout/reftests/bugs/440112-ref.html21
-rw-r--r--layout/reftests/bugs/440112.html20
-rw-r--r--layout/reftests/bugs/440149-1-ref.html13
-rw-r--r--layout/reftests/bugs/440149-1.html13
-rw-r--r--layout/reftests/bugs/441259-1-ref.html11
-rw-r--r--layout/reftests/bugs/441259-1.html12
-rw-r--r--layout/reftests/bugs/441259-2-ref.html7
-rw-r--r--layout/reftests/bugs/441259-2.html7
-rw-r--r--layout/reftests/bugs/442542-1-ref.html4
-rw-r--r--layout/reftests/bugs/442542-1.html4
-rw-r--r--layout/reftests/bugs/442542-subframe.html8
-rw-r--r--layout/reftests/bugs/444015-1-ref.html9
-rw-r--r--layout/reftests/bugs/444015-1.html9
-rw-r--r--layout/reftests/bugs/444375-1-ref.html14
-rw-r--r--layout/reftests/bugs/444375-1.html16
-rw-r--r--layout/reftests/bugs/444928-1-ref.html17
-rw-r--r--layout/reftests/bugs/444928-1.html17
-rw-r--r--layout/reftests/bugs/444928-2-ref.html18
-rw-r--r--layout/reftests/bugs/444928-2.html17
-rw-r--r--layout/reftests/bugs/444928-3-ref.html18
-rw-r--r--layout/reftests/bugs/444928-3.html17
-rw-r--r--layout/reftests/bugs/445004-1-ref.html4
-rw-r--r--layout/reftests/bugs/445004-1.html31
-rw-r--r--layout/reftests/bugs/445142-1-ref.html147
-rw-r--r--layout/reftests/bugs/445142-1a.html149
-rw-r--r--layout/reftests/bugs/445142-1b.html187
-rw-r--r--layout/reftests/bugs/445142-1c.html155
-rw-r--r--layout/reftests/bugs/445142-2-ref.html148
-rw-r--r--layout/reftests/bugs/445142-2a.html150
-rw-r--r--layout/reftests/bugs/445142-2b.html188
-rw-r--r--layout/reftests/bugs/446100-1a.html19
-rw-r--r--layout/reftests/bugs/446100-1b.html19
-rw-r--r--layout/reftests/bugs/446100-1c.html19
-rw-r--r--layout/reftests/bugs/446100-1d.html19
-rw-r--r--layout/reftests/bugs/446100-1e.html19
-rw-r--r--layout/reftests/bugs/446100-1f.html19
-rw-r--r--layout/reftests/bugs/446100-1g.html19
-rw-r--r--layout/reftests/bugs/446100-1h.html19
-rw-r--r--layout/reftests/bugs/447749-1-ref.html15
-rw-r--r--layout/reftests/bugs/447749-1.html24
-rw-r--r--layout/reftests/bugs/448193-ref.html18
-rw-r--r--layout/reftests/bugs/448193.html18
-rw-r--r--layout/reftests/bugs/449171-1.html16
-rw-r--r--layout/reftests/bugs/449171-ref.html12
-rw-r--r--layout/reftests/bugs/449362-1-ref.html43
-rw-r--r--layout/reftests/bugs/449362-1.html74
-rw-r--r--layout/reftests/bugs/449519-1-ref.html6
-rw-r--r--layout/reftests/bugs/449519-1.html6
-rw-r--r--layout/reftests/bugs/450670-1-ref.html5
-rw-r--r--layout/reftests/bugs/450670-1.html6
-rw-r--r--layout/reftests/bugs/451168-1-ref.html6
-rw-r--r--layout/reftests/bugs/451168-1.html11
-rw-r--r--layout/reftests/bugs/451876-1-ref.html30
-rw-r--r--layout/reftests/bugs/451876-1.html30
-rw-r--r--layout/reftests/bugs/451876-2-ref.html31
-rw-r--r--layout/reftests/bugs/451876-2.html31
-rw-r--r--layout/reftests/bugs/452915-1-ref.html7
-rw-r--r--layout/reftests/bugs/452915-1.html7
-rw-r--r--layout/reftests/bugs/452964-1-ref.html21
-rw-r--r--layout/reftests/bugs/452964-1.html20
-rw-r--r--layout/reftests/bugs/454361.html6
-rw-r--r--layout/reftests/bugs/455105-1.html28
-rw-r--r--layout/reftests/bugs/455105-2.html31
-rw-r--r--layout/reftests/bugs/455105-ref.html17
-rw-r--r--layout/reftests/bugs/455171-5-ref.html6
-rw-r--r--layout/reftests/bugs/455171-5.html9
-rw-r--r--layout/reftests/bugs/455280-1-ref.xhtml10
-rw-r--r--layout/reftests/bugs/455280-1.xhtml16
-rw-r--r--layout/reftests/bugs/455826-1-ref.html6
-rw-r--r--layout/reftests/bugs/455826-1.html4
-rw-r--r--layout/reftests/bugs/456147-ref.html42
-rw-r--r--layout/reftests/bugs/456147.css27
-rw-r--r--layout/reftests/bugs/456147.xhtml13
-rw-r--r--layout/reftests/bugs/456219-1-mask-wArA.pngbin0 -> 165 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wArB.pngbin0 -> 265 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wArC.pngbin0 -> 354 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wArD.pngbin0 -> 433 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wArE.pngbin0 -> 461 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wBrA.pngbin0 -> 175 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wBrB.pngbin0 -> 240 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wBrC.pngbin0 -> 350 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wBrD.pngbin0 -> 440 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wBrE.pngbin0 -> 531 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wCrA.pngbin0 -> 169 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wCrB.pngbin0 -> 235 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wCrC.pngbin0 -> 341 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wCrD.pngbin0 -> 413 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wCrE.pngbin0 -> 413 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wDrA.pngbin0 -> 177 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wDrB.pngbin0 -> 263 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wDrC.pngbin0 -> 392 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wDrD.pngbin0 -> 492 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wDrE.pngbin0 -> 970 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wErA.pngbin0 -> 171 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wErB.pngbin0 -> 272 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wErC.pngbin0 -> 383 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wErD.pngbin0 -> 485 bytes
-rw-r--r--layout/reftests/bugs/456219-1-mask-wErE.pngbin0 -> 526 bytes
-rw-r--r--layout/reftests/bugs/456219-1-ref.html80
-rw-r--r--layout/reftests/bugs/456219-1a.html81
-rw-r--r--layout/reftests/bugs/456219-1b.html81
-rw-r--r--layout/reftests/bugs/456219-1c.html81
-rw-r--r--layout/reftests/bugs/456219-2-mask.pngbin0 -> 580 bytes
-rw-r--r--layout/reftests/bugs/456219-2-ref.html31
-rw-r--r--layout/reftests/bugs/456219-2.html30
-rw-r--r--layout/reftests/bugs/456330-1-ref.pngbin0 -> 153 bytes
-rw-r--r--layout/reftests/bugs/456330-1.gifbin0 -> 62 bytes
-rw-r--r--layout/reftests/bugs/456484-1-ref.html19
-rw-r--r--layout/reftests/bugs/456484-1.html19
-rw-r--r--layout/reftests/bugs/457398-1-ref.html11
-rw-r--r--layout/reftests/bugs/457398-1.html11
-rw-r--r--layout/reftests/bugs/457398-2-ref.html11
-rw-r--r--layout/reftests/bugs/457398-2.html11
-rw-r--r--layout/reftests/bugs/458296-1-ref.html10
-rw-r--r--layout/reftests/bugs/458296-1a.html8
-rw-r--r--layout/reftests/bugs/458296-1b.html8
-rw-r--r--layout/reftests/bugs/458296-1c.html10
-rw-r--r--layout/reftests/bugs/458296-1d.html8
-rw-r--r--layout/reftests/bugs/458487-1-ref.html7
-rw-r--r--layout/reftests/bugs/458487-1a.html5
-rw-r--r--layout/reftests/bugs/458487-1b.html5
-rw-r--r--layout/reftests/bugs/458487-1c.html4
-rw-r--r--layout/reftests/bugs/458487-1d.html4
-rw-r--r--layout/reftests/bugs/458487-1e.html5
-rw-r--r--layout/reftests/bugs/458487-1f.html5
-rw-r--r--layout/reftests/bugs/458487-1g.html5
-rw-r--r--layout/reftests/bugs/458487-1h.html5
-rw-r--r--layout/reftests/bugs/458487-2-ref.html11
-rw-r--r--layout/reftests/bugs/458487-2.html11
-rw-r--r--layout/reftests/bugs/458487-3-iframe.html6
-rw-r--r--layout/reftests/bugs/458487-3-ref.html6
-rw-r--r--layout/reftests/bugs/458487-3.html6
-rw-r--r--layout/reftests/bugs/458487-4-ref.html3
-rw-r--r--layout/reftests/bugs/458487-4a.html5
-rw-r--r--layout/reftests/bugs/458487-4b.html5
-rw-r--r--layout/reftests/bugs/458487-4c.html6
-rw-r--r--layout/reftests/bugs/458487-5-ref.html9
-rw-r--r--layout/reftests/bugs/458487-5a.html9
-rw-r--r--layout/reftests/bugs/458487-5b.html9
-rw-r--r--layout/reftests/bugs/459443-1-ref.html6
-rw-r--r--layout/reftests/bugs/459443-1.html38
-rw-r--r--layout/reftests/bugs/459613-1-ref.html6
-rw-r--r--layout/reftests/bugs/459613-1.html6
-rw-r--r--layout/reftests/bugs/460012-1-ref.html6
-rw-r--r--layout/reftests/bugs/460012-1.html16
-rw-r--r--layout/reftests/bugs/461266-1-ref.html17
-rw-r--r--layout/reftests/bugs/461266-1.html20
-rw-r--r--layout/reftests/bugs/461512-1-ref.html68
-rw-r--r--layout/reftests/bugs/461512-1.html59
-rw-r--r--layout/reftests/bugs/462844-1.html10
-rw-r--r--layout/reftests/bugs/462844-2.html10
-rw-r--r--layout/reftests/bugs/462844-3.html10
-rw-r--r--layout/reftests/bugs/462844-4.html10
-rw-r--r--layout/reftests/bugs/462844-ref.html5
-rw-r--r--layout/reftests/bugs/463204-1-ref.html17
-rw-r--r--layout/reftests/bugs/463204-1.html19
-rw-r--r--layout/reftests/bugs/463217-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/463217-1.xhtml4
-rw-r--r--layout/reftests/bugs/463952-1-ref.html6
-rw-r--r--layout/reftests/bugs/463952-1.html11
-rw-r--r--layout/reftests/bugs/464811-1-ref.html7
-rw-r--r--layout/reftests/bugs/464811-1.html7
-rw-r--r--layout/reftests/bugs/465574-1-ref.html26
-rw-r--r--layout/reftests/bugs/465574-1.html19
-rw-r--r--layout/reftests/bugs/466258-1-ref.html11
-rw-r--r--layout/reftests/bugs/466258-1.html8
-rw-r--r--layout/reftests/bugs/466395-1-ref.html2
-rw-r--r--layout/reftests/bugs/466395-1.html8
-rw-r--r--layout/reftests/bugs/466395-2-ref.html3
-rw-r--r--layout/reftests/bugs/466395-2.html9
-rw-r--r--layout/reftests/bugs/467084-1-ref.html19
-rw-r--r--layout/reftests/bugs/467084-1.html19
-rw-r--r--layout/reftests/bugs/467084-2-ref.html10
-rw-r--r--layout/reftests/bugs/467084-2.html10
-rw-r--r--layout/reftests/bugs/467444-1-ref.html29
-rw-r--r--layout/reftests/bugs/467444-1.html30
-rw-r--r--layout/reftests/bugs/467460-1-ref.html13
-rw-r--r--layout/reftests/bugs/467460-1.html21
-rw-r--r--layout/reftests/bugs/468473-1-ref.xhtml10
-rw-r--r--layout/reftests/bugs/468473-1.xhtml10
-rw-r--r--layout/reftests/bugs/471356-1-ref.html11
-rw-r--r--layout/reftests/bugs/471356-1.html23
-rw-r--r--layout/reftests/bugs/472500-1-ref.xhtml3
-rw-r--r--layout/reftests/bugs/472500-1.xhtml4
-rw-r--r--layout/reftests/bugs/472769-1-ref.html15
-rw-r--r--layout/reftests/bugs/472769-1a.html14
-rw-r--r--layout/reftests/bugs/472769-1b.html15
-rw-r--r--layout/reftests/bugs/472769-2-ref.html36
-rw-r--r--layout/reftests/bugs/472769-2.html36
-rw-r--r--layout/reftests/bugs/472769-3-ref.html35
-rw-r--r--layout/reftests/bugs/472769-3.html35
-rw-r--r--layout/reftests/bugs/473847-1-ref.xhtml8
-rw-r--r--layout/reftests/bugs/473847-1.xhtml8
-rw-r--r--layout/reftests/bugs/474417-1-ref.html11
-rw-r--r--layout/reftests/bugs/474417-1.html11
-rw-r--r--layout/reftests/bugs/474472-1-ref.html6
-rw-r--r--layout/reftests/bugs/474472-1.html25
-rw-r--r--layout/reftests/bugs/475986-1-ref.html8
-rw-r--r--layout/reftests/bugs/475986-1a.html8
-rw-r--r--layout/reftests/bugs/475986-1b.html8
-rw-r--r--layout/reftests/bugs/475986-1c.html8
-rw-r--r--layout/reftests/bugs/475986-1d.html8
-rw-r--r--layout/reftests/bugs/475986-1e.html8
-rw-r--r--layout/reftests/bugs/475986-1f.html8
-rw-r--r--layout/reftests/bugs/475986-2-ref.html8
-rw-r--r--layout/reftests/bugs/475986-2a.html8
-rw-r--r--layout/reftests/bugs/475986-2b.html8
-rw-r--r--layout/reftests/bugs/475986-2c.html8
-rw-r--r--layout/reftests/bugs/475986-2d.html8
-rw-r--r--layout/reftests/bugs/475986-2e.html8
-rw-r--r--layout/reftests/bugs/475986-2f.html8
-rw-r--r--layout/reftests/bugs/475986-3-ref.html8
-rw-r--r--layout/reftests/bugs/475986-3a.html8
-rw-r--r--layout/reftests/bugs/475986-3b.html8
-rw-r--r--layout/reftests/bugs/475986-4-ref.html22
-rw-r--r--layout/reftests/bugs/475986-4.html22
-rw-r--r--layout/reftests/bugs/476063-1-ref.html17
-rw-r--r--layout/reftests/bugs/476063-1.html46
-rw-r--r--layout/reftests/bugs/476063-2-ref.html23
-rw-r--r--layout/reftests/bugs/476063-2.html30
-rw-r--r--layout/reftests/bugs/476063-3-ref.html9
-rw-r--r--layout/reftests/bugs/476063-3.html9
-rw-r--r--layout/reftests/bugs/476063-4-ref.xhtml14
-rw-r--r--layout/reftests/bugs/476063-4.xhtml14
-rw-r--r--layout/reftests/bugs/476357-1-ref.html8
-rw-r--r--layout/reftests/bugs/476357-1.html16
-rw-r--r--layout/reftests/bugs/476598-1-ref.html16
-rw-r--r--layout/reftests/bugs/476598-1-ref2.html15
-rw-r--r--layout/reftests/bugs/476598-1a.html16
-rw-r--r--layout/reftests/bugs/476598-1b.html20
-rw-r--r--layout/reftests/bugs/476856-1-ref.html19
-rw-r--r--layout/reftests/bugs/476856-1.html29
-rw-r--r--layout/reftests/bugs/478377-1-ref.xhtml20
-rw-r--r--layout/reftests/bugs/478377-1.xhtml21
-rw-r--r--layout/reftests/bugs/478614-1-ref.html16
-rw-r--r--layout/reftests/bugs/478614-1.html16
-rw-r--r--layout/reftests/bugs/478614-2.html16
-rw-r--r--layout/reftests/bugs/478614-3-ref.html16
-rw-r--r--layout/reftests/bugs/478614-3.html16
-rw-r--r--layout/reftests/bugs/478614-4-ref.html16
-rw-r--r--layout/reftests/bugs/478614-4.html16
-rw-r--r--layout/reftests/bugs/478614-5-ref.html16
-rw-r--r--layout/reftests/bugs/478614-5.html16
-rw-r--r--layout/reftests/bugs/478811-1-ref.html10
-rw-r--r--layout/reftests/bugs/478811-1.html21
-rw-r--r--layout/reftests/bugs/478811-2-ref.html12
-rw-r--r--layout/reftests/bugs/478811-2.html22
-rw-r--r--layout/reftests/bugs/478811-3-ref.html12
-rw-r--r--layout/reftests/bugs/478811-3.html22
-rw-r--r--layout/reftests/bugs/478811-4-ref.html12
-rw-r--r--layout/reftests/bugs/478811-4.html22
-rw-r--r--layout/reftests/bugs/478956-1-ref.html17
-rw-r--r--layout/reftests/bugs/478956-1a.html16
-rw-r--r--layout/reftests/bugs/478956-1b.html16
-rw-r--r--layout/reftests/bugs/480880-1-ref.html5
-rw-r--r--layout/reftests/bugs/480880-1a.html19
-rw-r--r--layout/reftests/bugs/480880-1b.html16
-rw-r--r--layout/reftests/bugs/480880-1c.html13
-rw-r--r--layout/reftests/bugs/480880-1d.html19
-rw-r--r--layout/reftests/bugs/480880-1e.html16
-rw-r--r--layout/reftests/bugs/480880-2a.html14
-rw-r--r--layout/reftests/bugs/480880-2b.html14
-rw-r--r--layout/reftests/bugs/480880-2c.html13
-rw-r--r--layout/reftests/bugs/481024-1-ref.html6
-rw-r--r--layout/reftests/bugs/481024-1a.html6
-rw-r--r--layout/reftests/bugs/481024-1b.html6
-rw-r--r--layout/reftests/bugs/481024-1c.html6
-rw-r--r--layout/reftests/bugs/481024-1d.html6
-rw-r--r--layout/reftests/bugs/481024-1e.html6
-rw-r--r--layout/reftests/bugs/481948-1-ref.html13
-rw-r--r--layout/reftests/bugs/481948-1.html15
-rw-r--r--layout/reftests/bugs/481948-2-ref.html20
-rw-r--r--layout/reftests/bugs/481948-2.html24
-rw-r--r--layout/reftests/bugs/481948-3-ref.html17
-rw-r--r--layout/reftests/bugs/481948-3.html22
-rw-r--r--layout/reftests/bugs/482398-1-ref.html4
-rw-r--r--layout/reftests/bugs/482398-1.html25
-rw-r--r--layout/reftests/bugs/482592-1-ref.html6
-rw-r--r--layout/reftests/bugs/482592-1a-shadow.xhtml30
-rw-r--r--layout/reftests/bugs/482592-1b-shadow.xhtml29
-rw-r--r--layout/reftests/bugs/482659-1-ref.html4
-rw-r--r--layout/reftests/bugs/482659-1a.html17
-rw-r--r--layout/reftests/bugs/482659-1b.html17
-rw-r--r--layout/reftests/bugs/482659-1c.html26
-rw-r--r--layout/reftests/bugs/482659-1d.html26
-rw-r--r--layout/reftests/bugs/483565-ref.xhtml15
-rw-r--r--layout/reftests/bugs/483565.xhtml15
-rw-r--r--layout/reftests/bugs/484256-1-ref.html12
-rw-r--r--layout/reftests/bugs/484256-1.html12
-rw-r--r--layout/reftests/bugs/484256-2.html13
-rw-r--r--layout/reftests/bugs/485012-1-ref.html12
-rw-r--r--layout/reftests/bugs/485012-1.html16
-rw-r--r--layout/reftests/bugs/485275-1-ref.html7
-rw-r--r--layout/reftests/bugs/485275-1.html7
-rw-r--r--layout/reftests/bugs/485275-1.svg7
-rw-r--r--layout/reftests/bugs/486052-1-ref.html12
-rw-r--r--layout/reftests/bugs/486052-1.html23
-rw-r--r--layout/reftests/bugs/486052-2-ref.html6
-rw-r--r--layout/reftests/bugs/486052-2a.html17
-rw-r--r--layout/reftests/bugs/486052-2b.html17
-rw-r--r--layout/reftests/bugs/486052-2c.html17
-rw-r--r--layout/reftests/bugs/486052-2d.html6
-rw-r--r--layout/reftests/bugs/486052-2e.html17
-rw-r--r--layout/reftests/bugs/486052-2f.html17
-rw-r--r--layout/reftests/bugs/486052-2g.html17
-rw-r--r--layout/reftests/bugs/486065-1-ref.html15
-rw-r--r--layout/reftests/bugs/486065-1.html16
-rw-r--r--layout/reftests/bugs/487539-1.html45
-rw-r--r--layout/reftests/bugs/488390-1-ref.html4
-rw-r--r--layout/reftests/bugs/488390-1.html22
-rw-r--r--layout/reftests/bugs/488649-1-ref.html9
-rw-r--r--layout/reftests/bugs/488649-1.html10
-rw-r--r--layout/reftests/bugs/488685-1-ref.html9
-rw-r--r--layout/reftests/bugs/488685-1.html7
-rw-r--r--layout/reftests/bugs/488692-1-ref.html6
-rw-r--r--layout/reftests/bugs/488692-1.html11
-rw-r--r--layout/reftests/bugs/489868-1-ref.svg5
-rw-r--r--layout/reftests/bugs/489868-1.svg34
-rw-r--r--layout/reftests/bugs/490173-2-ref.html11
-rw-r--r--layout/reftests/bugs/490173-2.html11
-rw-r--r--layout/reftests/bugs/490176-1-ref.html18
-rw-r--r--layout/reftests/bugs/490176-1.html31
-rw-r--r--layout/reftests/bugs/490177-1-ref.svg18
-rw-r--r--layout/reftests/bugs/490177-1.svg27
-rw-r--r--layout/reftests/bugs/490182-1-ref.html14
-rw-r--r--layout/reftests/bugs/490182-1a.html31
-rw-r--r--layout/reftests/bugs/490182-1b.html28
-rw-r--r--layout/reftests/bugs/491180-1-ref.html5
-rw-r--r--layout/reftests/bugs/491180-1.html5
-rw-r--r--layout/reftests/bugs/491180-2-ref.html4
-rw-r--r--layout/reftests/bugs/491180-2.html3
-rw-r--r--layout/reftests/bugs/491323-1-ref.xhtml15
-rw-r--r--layout/reftests/bugs/491323-1.xhtml23
-rw-r--r--layout/reftests/bugs/492661-1-ref.html24
-rw-r--r--layout/reftests/bugs/492661-1.html34
-rw-r--r--layout/reftests/bugs/493968-1-ref.html10
-rw-r--r--layout/reftests/bugs/493968-1.html20
-rw-r--r--layout/reftests/bugs/494667-1-ref.html6
-rw-r--r--layout/reftests/bugs/494667-1.html26
-rw-r--r--layout/reftests/bugs/494667-2-ref.html6
-rw-r--r--layout/reftests/bugs/494667-2.html27
-rw-r--r--layout/reftests/bugs/495274-1-ref.html9
-rw-r--r--layout/reftests/bugs/495274-1.html15
-rw-r--r--layout/reftests/bugs/495385-1-ref.html9
-rw-r--r--layout/reftests/bugs/495385-1a.html21
-rw-r--r--layout/reftests/bugs/495385-1b.html11
-rw-r--r--layout/reftests/bugs/495385-1c.html6
-rw-r--r--layout/reftests/bugs/495385-1d.html6
-rw-r--r--layout/reftests/bugs/495385-1e.html14
-rw-r--r--layout/reftests/bugs/495385-1f.html14
-rw-r--r--layout/reftests/bugs/495385-2-ref.html15
-rw-r--r--layout/reftests/bugs/495385-2a.html30
-rw-r--r--layout/reftests/bugs/495385-2b.html36
-rw-r--r--layout/reftests/bugs/495385-2c.html36
-rw-r--r--layout/reftests/bugs/495385-2d.html28
-rw-r--r--layout/reftests/bugs/495385-2e.html30
-rw-r--r--layout/reftests/bugs/495385-2g.html30
-rw-r--r--layout/reftests/bugs/495385-2h.html19
-rw-r--r--layout/reftests/bugs/495385-2i.html31
-rw-r--r--layout/reftests/bugs/495385-3-ref.html4
-rw-r--r--layout/reftests/bugs/495385-3.html14
-rw-r--r--layout/reftests/bugs/495385-4-ref.html12
-rw-r--r--layout/reftests/bugs/495385-4.html27
-rw-r--r--layout/reftests/bugs/495385-5-ref.html19
-rw-r--r--layout/reftests/bugs/495385-5.html36
-rw-r--r--layout/reftests/bugs/496032-1-ref.html12
-rw-r--r--layout/reftests/bugs/496032-1.html13
-rw-r--r--layout/reftests/bugs/496840-1-ref.html7
-rw-r--r--layout/reftests/bugs/496840-1.html18
-rw-r--r--layout/reftests/bugs/501037-ref.html12
-rw-r--r--layout/reftests/bugs/501037.html12
-rw-r--r--layout/reftests/bugs/501257-1-ref.html8
-rw-r--r--layout/reftests/bugs/501257-1-ref.xhtml7
-rw-r--r--layout/reftests/bugs/501257-1.xhtml18
-rw-r--r--layout/reftests/bugs/501257-1a.html16
-rw-r--r--layout/reftests/bugs/501257-1b.html17
-rw-r--r--layout/reftests/bugs/501627-1-ref.html7
-rw-r--r--layout/reftests/bugs/501627-1.html7
-rw-r--r--layout/reftests/bugs/502288-1-ref.html8
-rw-r--r--layout/reftests/bugs/502288-1.html17
-rw-r--r--layout/reftests/bugs/502447-1-ref.html6
-rw-r--r--layout/reftests/bugs/502447-1.html9
-rw-r--r--layout/reftests/bugs/502447-2-ref.html2
-rw-r--r--layout/reftests/bugs/502447-2.html8
-rw-r--r--layout/reftests/bugs/502795-1-ref.html18
-rw-r--r--layout/reftests/bugs/502795-1.html21
-rw-r--r--layout/reftests/bugs/502942-1-ref.html6
-rw-r--r--layout/reftests/bugs/502942-1.html6
-rw-r--r--layout/reftests/bugs/503364-1-ref.html11
-rw-r--r--layout/reftests/bugs/503364-1a.html21
-rw-r--r--layout/reftests/bugs/503364-1b.html20
-rw-r--r--layout/reftests/bugs/503531-1-ref.html23
-rw-r--r--layout/reftests/bugs/503531-1.html25
-rw-r--r--layout/reftests/bugs/504032-1-ref.html9
-rw-r--r--layout/reftests/bugs/504032-1.html19
-rw-r--r--layout/reftests/bugs/505743-1.html25
-rw-r--r--layout/reftests/bugs/50630-1-ref.html22
-rw-r--r--layout/reftests/bugs/50630-1a.html25
-rw-r--r--layout/reftests/bugs/50630-1b.html25
-rw-r--r--layout/reftests/bugs/50630-1c.html25
-rw-r--r--layout/reftests/bugs/50630-2-ref.html17
-rw-r--r--layout/reftests/bugs/50630-2.html17
-rw-r--r--layout/reftests/bugs/50630-3-ref.html13
-rw-r--r--layout/reftests/bugs/50630-3.html17
-rw-r--r--layout/reftests/bugs/50630-4-ref.html11
-rw-r--r--layout/reftests/bugs/50630-4-ref2.html13
-rw-r--r--layout/reftests/bugs/50630-4.html16
-rw-r--r--layout/reftests/bugs/50630-5-ref.html25
-rw-r--r--layout/reftests/bugs/50630-5.html24
-rw-r--r--layout/reftests/bugs/506481-1-ref.html6
-rw-r--r--layout/reftests/bugs/506481-1.html6
-rw-r--r--layout/reftests/bugs/507187-1-ref.html2
-rw-r--r--layout/reftests/bugs/507187-1.html1
-rw-r--r--layout/reftests/bugs/507487-1-ref.html7
-rw-r--r--layout/reftests/bugs/507487-1.html32
-rw-r--r--layout/reftests/bugs/507487-2-ref.xhtml11
-rw-r--r--layout/reftests/bugs/507487-2.xhtml32
-rw-r--r--layout/reftests/bugs/507762-1-ref.html7
-rw-r--r--layout/reftests/bugs/507762-1.html23
-rw-r--r--layout/reftests/bugs/507762-2-ref.html7
-rw-r--r--layout/reftests/bugs/507762-2.html22
-rw-r--r--layout/reftests/bugs/507762-3.html23
-rw-r--r--layout/reftests/bugs/507762-4.html22
-rw-r--r--layout/reftests/bugs/508919-1-ref.xhtml10
-rw-r--r--layout/reftests/bugs/508919-1.xhtml19
-rw-r--r--layout/reftests/bugs/509155-1-ref.xhtml10
-rw-r--r--layout/reftests/bugs/509155-1.xhtml19
-rw-r--r--layout/reftests/bugs/512410-ref.html17
-rw-r--r--layout/reftests/bugs/512410.html10
-rw-r--r--layout/reftests/bugs/512631-1-ref.html25
-rw-r--r--layout/reftests/bugs/512631-1.html25
-rw-r--r--layout/reftests/bugs/513153-1-ref.html9
-rw-r--r--layout/reftests/bugs/513153-1a.html28
-rw-r--r--layout/reftests/bugs/513153-1b.html28
-rw-r--r--layout/reftests/bugs/513153-2-ref.html9
-rw-r--r--layout/reftests/bugs/513153-2a.html28
-rw-r--r--layout/reftests/bugs/513153-2b.html28
-rw-r--r--layout/reftests/bugs/513318-1-ref.xhtml5
-rw-r--r--layout/reftests/bugs/513318-1.xhtml51
-rw-r--r--layout/reftests/bugs/513318-2-ref.xhtml9
-rw-r--r--layout/reftests/bugs/513318-2.xhtml9
-rw-r--r--layout/reftests/bugs/514917-1-ref.html20
-rw-r--r--layout/reftests/bugs/514917-1.html26
-rw-r--r--layout/reftests/bugs/518172-1a.html24
-rw-r--r--layout/reftests/bugs/518172-1b.html24
-rw-r--r--layout/reftests/bugs/518172-2a.html25
-rw-r--r--layout/reftests/bugs/518172-2b.html25
-rw-r--r--layout/reftests/bugs/518172-a-ref.html14
-rw-r--r--layout/reftests/bugs/518172-b-ref.html17
-rw-r--r--layout/reftests/bugs/520421-1-ref.html6
-rw-r--r--layout/reftests/bugs/520421-1.html23
-rw-r--r--layout/reftests/bugs/520563-1-ref.xhtml6
-rw-r--r--layout/reftests/bugs/520563-1.xhtml14
-rw-r--r--layout/reftests/bugs/521525-1-ref.html7
-rw-r--r--layout/reftests/bugs/521525-1.html7
-rw-r--r--layout/reftests/bugs/521525-2-ref.html7
-rw-r--r--layout/reftests/bugs/521525-2.html7
-rw-r--r--layout/reftests/bugs/521539-1-ref.html5
-rw-r--r--layout/reftests/bugs/521539-1.html5
-rw-r--r--layout/reftests/bugs/521542-1-ref.xhtml18
-rw-r--r--layout/reftests/bugs/521542-1.xhtml18
-rw-r--r--layout/reftests/bugs/521602-ref.html4
-rw-r--r--layout/reftests/bugs/521602.html5
-rw-r--r--layout/reftests/bugs/521685-1-ref.html13
-rw-r--r--layout/reftests/bugs/521685-1.html16
-rw-r--r--layout/reftests/bugs/522632-1-ref.html12
-rw-r--r--layout/reftests/bugs/522632-1.html12
-rw-r--r--layout/reftests/bugs/523096-1-ref.html36
-rw-r--r--layout/reftests/bugs/523096-1.html43
-rw-r--r--layout/reftests/bugs/523468-1-ref.html8
-rw-r--r--layout/reftests/bugs/523468-1.html10
-rw-r--r--layout/reftests/bugs/524175-1-ref.html4
-rw-r--r--layout/reftests/bugs/524175-1.html8
-rw-r--r--layout/reftests/bugs/526463-1-ref.html12
-rw-r--r--layout/reftests/bugs/526463-1.html20
-rw-r--r--layout/reftests/bugs/527464-1.html1
-rw-r--r--layout/reftests/bugs/527464-ref.html1
-rw-r--r--layout/reftests/bugs/528038-1-ref.html4
-rw-r--r--layout/reftests/bugs/528038-1a.html12
-rw-r--r--layout/reftests/bugs/528038-1b.html12
-rw-r--r--layout/reftests/bugs/528038-1c.html12
-rw-r--r--layout/reftests/bugs/528038-1d.html12
-rw-r--r--layout/reftests/bugs/528038-1e.html12
-rw-r--r--layout/reftests/bugs/528038-1f.html12
-rw-r--r--layout/reftests/bugs/528038-2-ref.html4
-rw-r--r--layout/reftests/bugs/528038-2.html12
-rw-r--r--layout/reftests/bugs/530686-1-ref.html16
-rw-r--r--layout/reftests/bugs/530686-1.html34
-rw-r--r--layout/reftests/bugs/531200-1-ref.html38
-rw-r--r--layout/reftests/bugs/531200-1.html38
-rw-r--r--layout/reftests/bugs/531371-1-ref.html3
-rw-r--r--layout/reftests/bugs/531371-1.html5
-rw-r--r--layout/reftests/bugs/534526-1-ref.html6
-rw-r--r--layout/reftests/bugs/534526-1a.html12
-rw-r--r--layout/reftests/bugs/534526-1b.html12
-rw-r--r--layout/reftests/bugs/534804-1-ref.html21
-rw-r--r--layout/reftests/bugs/534804-1.html45
-rw-r--r--layout/reftests/bugs/534808-1-ref.html20
-rw-r--r--layout/reftests/bugs/534808-1.html20
-rw-r--r--layout/reftests/bugs/534808-2-ref.html22
-rw-r--r--layout/reftests/bugs/534808-2.html22
-rw-r--r--layout/reftests/bugs/534919-1-ref.html17
-rw-r--r--layout/reftests/bugs/534919-1.html17
-rw-r--r--layout/reftests/bugs/536061-ref.html53
-rw-r--r--layout/reftests/bugs/536061.html54
-rw-r--r--layout/reftests/bugs/537471-1-ref.html6
-rw-r--r--layout/reftests/bugs/537471-1.html6
-rw-r--r--layout/reftests/bugs/537507-1-frame.xhtml1
-rw-r--r--layout/reftests/bugs/537507-1-ref.xhtml8
-rw-r--r--layout/reftests/bugs/537507-1.xhtml8
-rw-r--r--layout/reftests/bugs/537507-2-frame.xhtml1
-rw-r--r--layout/reftests/bugs/537507-2-ref.html5
-rw-r--r--layout/reftests/bugs/537507-2.html5
-rw-r--r--layout/reftests/bugs/538909-1-ref.html17
-rw-r--r--layout/reftests/bugs/538909-1.html16
-rw-r--r--layout/reftests/bugs/538935-1-ref.html16
-rw-r--r--layout/reftests/bugs/538935-1.html16
-rw-r--r--layout/reftests/bugs/539226-1.html17
-rw-r--r--layout/reftests/bugs/539323-1-ref.html12
-rw-r--r--layout/reftests/bugs/539323-1.html10
-rw-r--r--layout/reftests/bugs/539323-2-ref.html12
-rw-r--r--layout/reftests/bugs/539323-2.html10
-rw-r--r--layout/reftests/bugs/539323-3-ref.html12
-rw-r--r--layout/reftests/bugs/539323-3.html10
-rw-r--r--layout/reftests/bugs/539880-1-dynamic.html58
-rw-r--r--layout/reftests/bugs/539880-1-ref.html38
-rw-r--r--layout/reftests/bugs/539880-1.html38
-rw-r--r--layout/reftests/bugs/539949-1-ref.html10
-rw-r--r--layout/reftests/bugs/539949-1.html10
-rw-r--r--layout/reftests/bugs/541382-1-ref.html8
-rw-r--r--layout/reftests/bugs/541382-1.html8
-rw-r--r--layout/reftests/bugs/542116-1-ref.html19
-rw-r--r--layout/reftests/bugs/542116-1.html19
-rw-r--r--layout/reftests/bugs/542116-2-ref.html19
-rw-r--r--layout/reftests/bugs/542116-2.html19
-rw-r--r--layout/reftests/bugs/542116-3-ref.html19
-rw-r--r--layout/reftests/bugs/542116-3.html19
-rw-r--r--layout/reftests/bugs/542317-1-ref.html1
-rw-r--r--layout/reftests/bugs/542317-1.html1
-rw-r--r--layout/reftests/bugs/542620-1-ref.html11
-rw-r--r--layout/reftests/bugs/542620-1.html13
-rw-r--r--layout/reftests/bugs/545049-1-ref.html9
-rw-r--r--layout/reftests/bugs/545049-1.html16
-rw-r--r--layout/reftests/bugs/546033-1-ref.html8
-rw-r--r--layout/reftests/bugs/546033-1.html14
-rw-r--r--layout/reftests/bugs/549184-1-ref.html6
-rw-r--r--layout/reftests/bugs/549184-1.html6
-rw-r--r--layout/reftests/bugs/550325-1-ref.html4
-rw-r--r--layout/reftests/bugs/550325-1.html4
-rw-r--r--layout/reftests/bugs/550325-2.html6
-rw-r--r--layout/reftests/bugs/550325-3.html4
-rw-r--r--layout/reftests/bugs/550716-1-ref.html6
-rw-r--r--layout/reftests/bugs/550716-1.html6
-rw-r--r--layout/reftests/bugs/550882-1-ref.html6
-rw-r--r--layout/reftests/bugs/550882-1.html8
-rw-r--r--layout/reftests/bugs/550882-2-ref.html2
-rw-r--r--layout/reftests/bugs/550882-2.html8
-rw-r--r--layout/reftests/bugs/551463-1-ref.html34
-rw-r--r--layout/reftests/bugs/551463-1.html39
-rw-r--r--layout/reftests/bugs/551699-1-ref.html13
-rw-r--r--layout/reftests/bugs/551699-1.html13
-rw-r--r--layout/reftests/bugs/552334-1-ref.html15
-rw-r--r--layout/reftests/bugs/552334-1.html26
-rw-r--r--layout/reftests/bugs/553571-1-notref.html6
-rw-r--r--layout/reftests/bugs/553571-1.html6
-rw-r--r--layout/reftests/bugs/555388-1-ref.html27
-rw-r--r--layout/reftests/bugs/555388-1.html33
-rw-r--r--layout/reftests/bugs/556661-1-ref.html24
-rw-r--r--layout/reftests/bugs/556661-1.html63
-rw-r--r--layout/reftests/bugs/557087-1.html16
-rw-r--r--layout/reftests/bugs/557087-2.html17
-rw-r--r--layout/reftests/bugs/557087-ref.html16
-rw-r--r--layout/reftests/bugs/557736-1-ref.html9
-rw-r--r--layout/reftests/bugs/557736-1.html11
-rw-r--r--layout/reftests/bugs/558011-1-ref.xhtml14
-rw-r--r--layout/reftests/bugs/558011-1.xhtml14
-rw-r--r--layout/reftests/bugs/559284-1-ref.html12
-rw-r--r--layout/reftests/bugs/559284-1.html11
-rw-r--r--layout/reftests/bugs/561981-1-ref.html7
-rw-r--r--layout/reftests/bugs/561981-1.html16
-rw-r--r--layout/reftests/bugs/561981-2-ref.html7
-rw-r--r--layout/reftests/bugs/561981-2.html16
-rw-r--r--layout/reftests/bugs/561981-3-ref.html7
-rw-r--r--layout/reftests/bugs/561981-3.html16
-rw-r--r--layout/reftests/bugs/561981-4-ref.html7
-rw-r--r--layout/reftests/bugs/561981-4.html16
-rw-r--r--layout/reftests/bugs/561981-5-ref.html7
-rw-r--r--layout/reftests/bugs/561981-5.html12
-rw-r--r--layout/reftests/bugs/561981-6-ref.html7
-rw-r--r--layout/reftests/bugs/561981-6.html12
-rw-r--r--layout/reftests/bugs/561981-7-ref.html7
-rw-r--r--layout/reftests/bugs/561981-7.html12
-rw-r--r--layout/reftests/bugs/561981-8-ref.html7
-rw-r--r--layout/reftests/bugs/561981-8.html12
-rw-r--r--layout/reftests/bugs/562835-1.html14
-rw-r--r--layout/reftests/bugs/562835-2.html30
-rw-r--r--layout/reftests/bugs/562835-ref.html15
-rw-r--r--layout/reftests/bugs/563584-1-ref.html24
-rw-r--r--layout/reftests/bugs/563584-1.html24
-rw-r--r--layout/reftests/bugs/563584-10-ref.html7
-rw-r--r--layout/reftests/bugs/563584-10a.html13
-rw-r--r--layout/reftests/bugs/563584-10b.html13
-rw-r--r--layout/reftests/bugs/563584-11-ref.html6
-rw-r--r--layout/reftests/bugs/563584-11.html8
-rw-r--r--layout/reftests/bugs/563584-2-ref.html25
-rw-r--r--layout/reftests/bugs/563584-2.html26
-rw-r--r--layout/reftests/bugs/563584-3-ref.html24
-rw-r--r--layout/reftests/bugs/563584-3.html24
-rw-r--r--layout/reftests/bugs/563584-4-ref.html24
-rw-r--r--layout/reftests/bugs/563584-4.html26
-rw-r--r--layout/reftests/bugs/563584-5-ref.html8
-rw-r--r--layout/reftests/bugs/563584-5.html9
-rw-r--r--layout/reftests/bugs/563584-6-columns-ref.html8
-rw-r--r--layout/reftests/bugs/563584-6-columns.html9
-rw-r--r--layout/reftests/bugs/563584-6-printing-ref.html18
-rw-r--r--layout/reftests/bugs/563584-6-printing.html9
-rw-r--r--layout/reftests/bugs/563584-7-ref.html16
-rw-r--r--layout/reftests/bugs/563584-7.html5
-rw-r--r--layout/reftests/bugs/563584-8a-ref.html8
-rw-r--r--layout/reftests/bugs/563584-8a.html9
-rw-r--r--layout/reftests/bugs/563584-8b-ref.html13
-rw-r--r--layout/reftests/bugs/563584-8b.html10
-rw-r--r--layout/reftests/bugs/563584-8c-ref.html9
-rw-r--r--layout/reftests/bugs/563584-8c.html10
-rw-r--r--layout/reftests/bugs/563584-8d-ref.html10
-rw-r--r--layout/reftests/bugs/563584-8d.html11
-rw-r--r--layout/reftests/bugs/563584-9a-ref.html4
-rw-r--r--layout/reftests/bugs/563584-9a.html6
-rw-r--r--layout/reftests/bugs/563584-9b-ref.html4
-rw-r--r--layout/reftests/bugs/563584-9b.html7
-rw-r--r--layout/reftests/bugs/563584-9c.html12
-rw-r--r--layout/reftests/bugs/563584-9cd-ref.html6
-rw-r--r--layout/reftests/bugs/563584-9d.html14
-rw-r--r--layout/reftests/bugs/563884-1-ref.html11
-rw-r--r--layout/reftests/bugs/563884-1.html16
-rw-r--r--layout/reftests/bugs/564002-1-ref.html9
-rw-r--r--layout/reftests/bugs/564002-1.html9
-rw-r--r--layout/reftests/bugs/564054-1-ref.html22
-rw-r--r--layout/reftests/bugs/564054-1.html33
-rw-r--r--layout/reftests/bugs/564991-1-ref.html6
-rw-r--r--layout/reftests/bugs/564991-1.html15
-rw-r--r--layout/reftests/bugs/565819-1.html17
-rw-r--r--layout/reftests/bugs/565819-2.html18
-rw-r--r--layout/reftests/bugs/565819-ref.html6
-rw-r--r--layout/reftests/bugs/568441-ref.html6
-rw-r--r--layout/reftests/bugs/568441.html14
-rw-r--r--layout/reftests/bugs/569006-1-ref.html6
-rw-r--r--layout/reftests/bugs/569006-1.html10
-rw-r--r--layout/reftests/bugs/571281-1-ref.html17
-rw-r--r--layout/reftests/bugs/571281-1a.html18
-rw-r--r--layout/reftests/bugs/571281-1b.html18
-rw-r--r--layout/reftests/bugs/571281-1c.html19
-rw-r--r--layout/reftests/bugs/571347-1-ref.html6
-rw-r--r--layout/reftests/bugs/571347-1a.html10
-rw-r--r--layout/reftests/bugs/571347-1b.html10
-rw-r--r--layout/reftests/bugs/571347-2-ref.html6
-rw-r--r--layout/reftests/bugs/571347-2a.html10
-rw-r--r--layout/reftests/bugs/571347-2b.html10
-rw-r--r--layout/reftests/bugs/571347-2c.html10
-rw-r--r--layout/reftests/bugs/571347-2d.html10
-rw-r--r--layout/reftests/bugs/571347-3-ref.html6
-rw-r--r--layout/reftests/bugs/571347-3.html11
-rw-r--r--layout/reftests/bugs/572598-1.html26
-rw-r--r--layout/reftests/bugs/572598-ref.html8
-rw-r--r--layout/reftests/bugs/574898-1.html18
-rw-r--r--layout/reftests/bugs/574898-ref.html6
-rw-r--r--layout/reftests/bugs/574907-1-ref.html9
-rw-r--r--layout/reftests/bugs/574907-1.html9
-rw-r--r--layout/reftests/bugs/574907-2-ref.html9
-rw-r--r--layout/reftests/bugs/574907-2.html9
-rw-r--r--layout/reftests/bugs/574907-3-notref.html9
-rw-r--r--layout/reftests/bugs/574907-3.html9
-rw-r--r--layout/reftests/bugs/577838-1-ref.html24
-rw-r--r--layout/reftests/bugs/577838-1.html25
-rw-r--r--layout/reftests/bugs/577838-2-ref.html25
-rw-r--r--layout/reftests/bugs/577838-2.html25
-rw-r--r--layout/reftests/bugs/579323-1-ref.html30
-rw-r--r--layout/reftests/bugs/579323-1.html40
-rw-r--r--layout/reftests/bugs/579349-1-ref.html7
-rw-r--r--layout/reftests/bugs/579349-1.html13
-rw-r--r--layout/reftests/bugs/579655-1-ref.html16
-rw-r--r--layout/reftests/bugs/579655-1.html16
-rw-r--r--layout/reftests/bugs/579808-1-ref.html7
-rw-r--r--layout/reftests/bugs/579985-1-ref.html6
-rw-r--r--layout/reftests/bugs/579985-1.html16
-rw-r--r--layout/reftests/bugs/580863-1-ref.html14
-rw-r--r--layout/reftests/bugs/580863-1.html14
-rw-r--r--layout/reftests/bugs/581317-1-ref.html20
-rw-r--r--layout/reftests/bugs/581317-1.html37
-rw-r--r--layout/reftests/bugs/581579-1-ref.html5
-rw-r--r--layout/reftests/bugs/581579-1.html8
-rw-r--r--layout/reftests/bugs/582037-1-ref.html3
-rw-r--r--layout/reftests/bugs/582037-1a.html12
-rw-r--r--layout/reftests/bugs/582037-1b.html12
-rw-r--r--layout/reftests/bugs/582037-2-ref.html7
-rw-r--r--layout/reftests/bugs/582037-2a.html11
-rw-r--r--layout/reftests/bugs/582037-2b.html11
-rw-r--r--layout/reftests/bugs/582146-1.html6
-rw-r--r--layout/reftests/bugs/582476-1-helper.html6
-rw-r--r--layout/reftests/bugs/582476-1-ref-helper.html6
-rw-r--r--layout/reftests/bugs/582476-1-ref.svg30
-rw-r--r--layout/reftests/bugs/582476-1.svg37
-rw-r--r--layout/reftests/bugs/584400-dash-length-ref.svg16
-rw-r--r--layout/reftests/bugs/584400-dash-length.svg25
-rw-r--r--layout/reftests/bugs/584699-1-ref.html6
-rw-r--r--layout/reftests/bugs/584699-1.html16
-rw-r--r--layout/reftests/bugs/585598-2-ref.xhtml6
-rw-r--r--layout/reftests/bugs/585598-2.xhtml6
-rw-r--r--layout/reftests/bugs/586400-1-ref.html15
-rw-r--r--layout/reftests/bugs/586400-1.html22
-rw-r--r--layout/reftests/bugs/586683-1-ref.html20
-rw-r--r--layout/reftests/bugs/586683-1.html20
-rw-r--r--layout/reftests/bugs/589615-1-ref.html11
-rw-r--r--layout/reftests/bugs/589615-1a.xhtml5
-rw-r--r--layout/reftests/bugs/589615-1b.html6
-rw-r--r--layout/reftests/bugs/589672-1-ref.html9
-rw-r--r--layout/reftests/bugs/589672-1.html13
-rw-r--r--layout/reftests/bugs/589682-1-notref.html18
-rw-r--r--layout/reftests/bugs/589682-1.html18
-rw-r--r--layout/reftests/bugs/593243-1-ref.html17
-rw-r--r--layout/reftests/bugs/593243-1.html49
-rw-r--r--layout/reftests/bugs/593243-2-ref.html18
-rw-r--r--layout/reftests/bugs/593243-2.html49
-rw-r--r--layout/reftests/bugs/593544-1-ref.html14
-rw-r--r--layout/reftests/bugs/593544-1.html14
-rw-r--r--layout/reftests/bugs/594333-1-ref.html17
-rw-r--r--layout/reftests/bugs/594333-1.html30
-rw-r--r--layout/reftests/bugs/594624-1-ref.html32
-rw-r--r--layout/reftests/bugs/594624-1.html41
-rw-r--r--layout/reftests/bugs/594737-1-ref.html9
-rw-r--r--layout/reftests/bugs/594737-1.html9
-rw-r--r--layout/reftests/bugs/597721-1-ref.html8
-rw-r--r--layout/reftests/bugs/597721-1.html4
-rw-r--r--layout/reftests/bugs/598726-1-ref.html6
-rw-r--r--layout/reftests/bugs/598726-1.html47
-rw-r--r--layout/reftests/bugs/599113-1-ref.html6
-rw-r--r--layout/reftests/bugs/599113-1.html29
-rw-r--r--layout/reftests/bugs/599882-1-ref.html18
-rw-r--r--layout/reftests/bugs/599882-1a.html21
-rw-r--r--layout/reftests/bugs/599882-1b.html21
-rw-r--r--layout/reftests/bugs/599882-2-ref.html9
-rw-r--r--layout/reftests/bugs/599882-2.html19
-rw-r--r--layout/reftests/bugs/600045-1-ref.html2
-rw-r--r--layout/reftests/bugs/600045-1.html13
-rw-r--r--layout/reftests/bugs/600803-1-ref.html18
-rw-r--r--layout/reftests/bugs/600803-1.html18
-rw-r--r--layout/reftests/bugs/600974-1-ref.html93
-rw-r--r--layout/reftests/bugs/600974-1.html15
-rw-r--r--layout/reftests/bugs/600974-2.html94
-rw-r--r--layout/reftests/bugs/600974-3.htmlbin0 -> 11352 bytes
-rw-r--r--layout/reftests/bugs/602200-1-ref.html6
-rw-r--r--layout/reftests/bugs/602200-1.html12
-rw-r--r--layout/reftests/bugs/602200-2-ref.html7
-rw-r--r--layout/reftests/bugs/602200-2.html16
-rw-r--r--layout/reftests/bugs/602200-3-ref.html6
-rw-r--r--layout/reftests/bugs/602200-3.html15
-rw-r--r--layout/reftests/bugs/602200-4-ref.html10
-rw-r--r--layout/reftests/bugs/602200-4.html15
-rw-r--r--layout/reftests/bugs/603423-1-ref.html7
-rw-r--r--layout/reftests/bugs/603423-1.html7
-rw-r--r--layout/reftests/bugs/604737-ref.html10
-rw-r--r--layout/reftests/bugs/604737.html14
-rw-r--r--layout/reftests/bugs/605138-1-ref.html17
-rw-r--r--layout/reftests/bugs/605138-1.html15
-rw-r--r--layout/reftests/bugs/605157-1-ref.xhtml8
-rw-r--r--layout/reftests/bugs/605157-1.xhtml12
-rw-r--r--layout/reftests/bugs/607267-1-ref.html2
-rw-r--r--layout/reftests/bugs/607267-1.html2
-rw-r--r--layout/reftests/bugs/608636-1-ref.html16
-rw-r--r--layout/reftests/bugs/608636-1.html19
-rw-r--r--layout/reftests/bugs/608756-1-ref.html4
-rw-r--r--layout/reftests/bugs/608756-1a.html10
-rw-r--r--layout/reftests/bugs/608756-1b.html10
-rw-r--r--layout/reftests/bugs/608756-2-ref.html9
-rw-r--r--layout/reftests/bugs/608756-2.html10
-rw-r--r--layout/reftests/bugs/609272-1-ref.html4
-rw-r--r--layout/reftests/bugs/609272-1.html4
-rw-r--r--layout/reftests/bugs/613433-1-ref.html21
-rw-r--r--layout/reftests/bugs/613433-1.html22
-rw-r--r--layout/reftests/bugs/613433-2-ref.html23
-rw-r--r--layout/reftests/bugs/613433-2.html22
-rw-r--r--layout/reftests/bugs/613433-3-ref.html21
-rw-r--r--layout/reftests/bugs/613433-3.html22
-rw-r--r--layout/reftests/bugs/614272-1-ref.svg4
-rw-r--r--layout/reftests/bugs/614272-1.svg44
-rw-r--r--layout/reftests/bugs/615121-1-ref.html22
-rw-r--r--layout/reftests/bugs/615121-1.html24
-rw-r--r--layout/reftests/bugs/615121-2-notref.html22
-rw-r--r--layout/reftests/bugs/615121-2.html24
-rw-r--r--layout/reftests/bugs/617242-1-ref.html8
-rw-r--r--layout/reftests/bugs/617242-1.html11
-rw-r--r--layout/reftests/bugs/618071-notref.html15
-rw-r--r--layout/reftests/bugs/618071.html17
-rw-r--r--layout/reftests/bugs/619117-1-ref.html21
-rw-r--r--layout/reftests/bugs/619117-1.html32
-rw-r--r--layout/reftests/bugs/619511-1-ref.html19
-rw-r--r--layout/reftests/bugs/619511-1.html19
-rw-r--r--layout/reftests/bugs/621253-1-externalFilter.html20
-rw-r--r--layout/reftests/bugs/621253-1-internalFilter.html20
-rw-r--r--layout/reftests/bugs/621253-1-ref.html6
-rw-r--r--layout/reftests/bugs/621253-2-externalFilter.html20
-rw-r--r--layout/reftests/bugs/621253-2-internalFilter.html20
-rw-r--r--layout/reftests/bugs/621253-2-ref.html6
-rw-r--r--layout/reftests/bugs/621253-helper-externalFilter.xhtml14
-rw-r--r--layout/reftests/bugs/621253-helper-internalFilter.xhtml30
-rw-r--r--layout/reftests/bugs/621918-1-ref.svg10
-rw-r--r--layout/reftests/bugs/621918-1.svg11
-rw-r--r--layout/reftests/bugs/621918-2-ref.svg17
-rw-r--r--layout/reftests/bugs/621918-2.svg20
-rw-r--r--layout/reftests/bugs/622585-1-ref.html15
-rw-r--r--layout/reftests/bugs/622585-1.html17
-rw-r--r--layout/reftests/bugs/625409-1-ref.html8
-rw-r--r--layout/reftests/bugs/625409-1.html6
-rw-r--r--layout/reftests/bugs/627393-1.html13
-rw-r--r--layout/reftests/bugs/630835-1.html42
-rw-r--r--layout/reftests/bugs/631352-1-ref.html6
-rw-r--r--layout/reftests/bugs/631352-1.html11
-rw-r--r--layout/reftests/bugs/632781-normalsize.html26
-rw-r--r--layout/reftests/bugs/632781-ref.html13
-rw-r--r--layout/reftests/bugs/632781-verybig.html27
-rw-r--r--layout/reftests/bugs/633344-1-ref.html34
-rw-r--r--layout/reftests/bugs/633344-1.html37
-rw-r--r--layout/reftests/bugs/634232-1-ref.html30
-rw-r--r--layout/reftests/bugs/634232-1.html31
-rw-r--r--layout/reftests/bugs/635302-1-ref.html27
-rw-r--r--layout/reftests/bugs/635302-1.html38
-rw-r--r--layout/reftests/bugs/635373-1-ref.html29
-rw-r--r--layout/reftests/bugs/635373-1.html29
-rw-r--r--layout/reftests/bugs/635373-2-ref.html30
-rw-r--r--layout/reftests/bugs/635373-2.html29
-rw-r--r--layout/reftests/bugs/635373-3-ref.html30
-rw-r--r--layout/reftests/bugs/635373-3.html29
-rw-r--r--layout/reftests/bugs/635639-1-ref.html16
-rw-r--r--layout/reftests/bugs/635639-1.html16
-rw-r--r--layout/reftests/bugs/635639-2-ref.html16
-rw-r--r--layout/reftests/bugs/635639-2.html16
-rw-r--r--layout/reftests/bugs/637597-1-ref.html37
-rw-r--r--layout/reftests/bugs/637597-1.html49
-rw-r--r--layout/reftests/bugs/637852-1-ref.html16
-rw-r--r--layout/reftests/bugs/637852-1.html16
-rw-r--r--layout/reftests/bugs/637852-2-ref.html8
-rw-r--r--layout/reftests/bugs/637852-2.html14
-rw-r--r--layout/reftests/bugs/637852-3-ref.html11
-rw-r--r--layout/reftests/bugs/637852-3.html19
-rw-r--r--layout/reftests/bugs/641770-1-ref.html6
-rw-r--r--layout/reftests/bugs/641770-1.html7
-rw-r--r--layout/reftests/bugs/641856-1-ref.html18
-rw-r--r--layout/reftests/bugs/641856-1.html19
-rw-r--r--layout/reftests/bugs/645491-1-ref.html6
-rw-r--r--layout/reftests/bugs/645491-1.html12
-rw-r--r--layout/reftests/bugs/645647-1-ref.html5
-rw-r--r--layout/reftests/bugs/645647-1.html9
-rw-r--r--layout/reftests/bugs/645647-2-ref.html27
-rw-r--r--layout/reftests/bugs/645647-2.html28
-rw-r--r--layout/reftests/bugs/645768-1-ref.html8
-rw-r--r--layout/reftests/bugs/645768-1.html12
-rw-r--r--layout/reftests/bugs/647-1-ref.html22
-rw-r--r--layout/reftests/bugs/647-1.html22
-rw-r--r--layout/reftests/bugs/650228-1-ref.html7
-rw-r--r--layout/reftests/bugs/650228-1.html20
-rw-r--r--layout/reftests/bugs/652301-1-ref.html7
-rw-r--r--layout/reftests/bugs/652301-1a.html7
-rw-r--r--layout/reftests/bugs/652301-1b.html8
-rw-r--r--layout/reftests/bugs/652775-1-ref.html6
-rw-r--r--layout/reftests/bugs/652775-1.html6
-rw-r--r--layout/reftests/bugs/652991-1-ref.html11
-rw-r--r--layout/reftests/bugs/652991-1a.html26
-rw-r--r--layout/reftests/bugs/652991-1b.html26
-rw-r--r--layout/reftests/bugs/652991-2-ref.html12
-rw-r--r--layout/reftests/bugs/652991-2.html26
-rw-r--r--layout/reftests/bugs/652991-3-ref.html11
-rw-r--r--layout/reftests/bugs/652991-3.html26
-rw-r--r--layout/reftests/bugs/652991-4-ref.html11
-rw-r--r--layout/reftests/bugs/652991-4.html25
-rw-r--r--layout/reftests/bugs/653930-1-iframe.html7
-rw-r--r--layout/reftests/bugs/653930-1-ref.html8
-rw-r--r--layout/reftests/bugs/653930-1.html21
-rw-r--r--layout/reftests/bugs/654057-1-ref.html24
-rw-r--r--layout/reftests/bugs/654057-1.html24
-rw-r--r--layout/reftests/bugs/654950-1-ref.html10
-rw-r--r--layout/reftests/bugs/654950-1.html17
-rw-r--r--layout/reftests/bugs/655549-1-ref.html8
-rw-r--r--layout/reftests/bugs/655549-1.html12
-rw-r--r--layout/reftests/bugs/655836-1-ref.html21
-rw-r--r--layout/reftests/bugs/655836-1.html23
-rw-r--r--layout/reftests/bugs/656875.html12
-rw-r--r--layout/reftests/bugs/658952-ref.html8
-rw-r--r--layout/reftests/bugs/658952.html8
-rw-r--r--layout/reftests/bugs/660682-1-ref.html8
-rw-r--r--layout/reftests/bugs/660682-1.html10
-rw-r--r--layout/reftests/bugs/664127-1-ref.xhtml22
-rw-r--r--layout/reftests/bugs/664127-1.css11
-rw-r--r--layout/reftests/bugs/664127-1.xhtml22
-rw-r--r--layout/reftests/bugs/665597-1-ref.html24
-rw-r--r--layout/reftests/bugs/665597-1.html21
-rw-r--r--layout/reftests/bugs/665597-2-ref.html17
-rw-r--r--layout/reftests/bugs/665597-2.html17
-rw-r--r--layout/reftests/bugs/667079-1-ref.html4
-rw-r--r--layout/reftests/bugs/667079-1.html5
-rw-r--r--layout/reftests/bugs/668319-1.xhtml20
-rw-r--r--layout/reftests/bugs/669015-1-notref.xhtml3
-rw-r--r--layout/reftests/bugs/669015-1.xhtml3
-rw-r--r--layout/reftests/bugs/670442-1-ref.html40
-rw-r--r--layout/reftests/bugs/670442-1.html41
-rw-r--r--layout/reftests/bugs/670467-1-ref.html10
-rw-r--r--layout/reftests/bugs/670467-1.html14
-rw-r--r--layout/reftests/bugs/670467-2-ref.html6
-rw-r--r--layout/reftests/bugs/670467-2.html11
-rw-r--r--layout/reftests/bugs/67752-1-ref.html15
-rw-r--r--layout/reftests/bugs/67752-1.html23
-rw-r--r--layout/reftests/bugs/67752-2-ref.html15
-rw-r--r--layout/reftests/bugs/67752-2.html23
-rw-r--r--layout/reftests/bugs/68061-1-ref.xml15
-rw-r--r--layout/reftests/bugs/68061-1.xml13
-rw-r--r--layout/reftests/bugs/68061-2-ref.xml21
-rw-r--r--layout/reftests/bugs/68061-2.xml19
-rw-r--r--layout/reftests/bugs/690164-1-ref.html10
-rw-r--r--layout/reftests/bugs/690164-1.html12
-rw-r--r--layout/reftests/bugs/690643-1-ref.html22
-rw-r--r--layout/reftests/bugs/690643-1.html24
-rw-r--r--layout/reftests/bugs/691087-1-ref.html41
-rw-r--r--layout/reftests/bugs/691087-1.html45
-rw-r--r--layout/reftests/bugs/691571-1-ref.html18
-rw-r--r--layout/reftests/bugs/691571-1.html24
-rw-r--r--layout/reftests/bugs/696307-1-ref.html5
-rw-r--r--layout/reftests/bugs/696307-1.html4
-rw-r--r--layout/reftests/bugs/696739-1-ref.html22
-rw-r--r--layout/reftests/bugs/696739-1.html22
-rw-r--r--layout/reftests/bugs/703186-1-ref.html23
-rw-r--r--layout/reftests/bugs/703186-1.html25
-rw-r--r--layout/reftests/bugs/703186-2-ref.html29
-rw-r--r--layout/reftests/bugs/703186-2.html31
-rw-r--r--layout/reftests/bugs/711359-1-ref.html13
-rw-r--r--layout/reftests/bugs/711359-1.html32
-rw-r--r--layout/reftests/bugs/712130-1-ref.html5
-rw-r--r--layout/reftests/bugs/712130-1.html5
-rw-r--r--layout/reftests/bugs/712130-2-ref.html3
-rw-r--r--layout/reftests/bugs/712130-2.html4
-rw-r--r--layout/reftests/bugs/712849-1-ref.html31
-rw-r--r--layout/reftests/bugs/712849-1.html39
-rw-r--r--layout/reftests/bugs/713856-dynamic.html15
-rw-r--r--layout/reftests/bugs/713856-ref.html9
-rw-r--r--layout/reftests/bugs/713856-static.html9
-rw-r--r--layout/reftests/bugs/714519-1-as.html13
-rw-r--r--layout/reftests/bugs/714519-1-q.html12
-rw-r--r--layout/reftests/bugs/714519-1-ref.html12
-rw-r--r--layout/reftests/bugs/714519-2-as.html9
-rw-r--r--layout/reftests/bugs/714519-2-q.html8
-rw-r--r--layout/reftests/bugs/714519-2-ref.html8
-rw-r--r--layout/reftests/bugs/718521-ref.html47
-rw-r--r--layout/reftests/bugs/718521.html52
-rw-r--r--layout/reftests/bugs/720987-ref.html5
-rw-r--r--layout/reftests/bugs/720987.html29
-rw-r--r--layout/reftests/bugs/722888-1-ref.html11
-rw-r--r--layout/reftests/bugs/722888-1.html21
-rw-r--r--layout/reftests/bugs/722923-1-ref.html18
-rw-r--r--layout/reftests/bugs/722923-1.html20
-rw-r--r--layout/reftests/bugs/723484-1-ref.html6
-rw-r--r--layout/reftests/bugs/723484-1.html13
-rw-r--r--layout/reftests/bugs/728983-1-ref.html21
-rw-r--r--layout/reftests/bugs/728983-1.html23
-rw-r--r--layout/reftests/bugs/729143-1-ref.html18
-rw-r--r--layout/reftests/bugs/729143-1.html18
-rw-r--r--layout/reftests/bugs/731521-1-ref.html3
-rw-r--r--layout/reftests/bugs/731521-1.html4
-rw-r--r--layout/reftests/bugs/731726-1-ref.html13
-rw-r--r--layout/reftests/bugs/731726-1.html17
-rw-r--r--layout/reftests/bugs/735481-1-ref.html10
-rw-r--r--layout/reftests/bugs/735481-1.html12
-rw-r--r--layout/reftests/bugs/745934-1-ref.html18
-rw-r--r--layout/reftests/bugs/745934-1.html24
-rw-r--r--layout/reftests/bugs/748692-1-ref.html9
-rw-r--r--layout/reftests/bugs/748692-1a.html13
-rw-r--r--layout/reftests/bugs/748692-1b.html13
-rw-r--r--layout/reftests/bugs/748803-1-ref.html8
-rw-r--r--layout/reftests/bugs/748803-1.html8
-rw-r--r--layout/reftests/bugs/750551-1-ref.html14
-rw-r--r--layout/reftests/bugs/750551-1.html15
-rw-r--r--layout/reftests/bugs/751012-1-ref.html37
-rw-r--r--layout/reftests/bugs/751012-1a.html37
-rw-r--r--layout/reftests/bugs/751012-1b.html41
-rw-r--r--layout/reftests/bugs/753329-1.html16
-rw-r--r--layout/reftests/bugs/758561-1-ref.html1
-rw-r--r--layout/reftests/bugs/758561-1.html1
-rw-r--r--layout/reftests/bugs/759036-1-ref.html24
-rw-r--r--layout/reftests/bugs/759036-1.html25
-rw-r--r--layout/reftests/bugs/759036-2-ref.html17
-rw-r--r--layout/reftests/bugs/759036-2.html16
-rw-r--r--layout/reftests/bugs/76331-1-ref.html64
-rw-r--r--layout/reftests/bugs/76331-1.html69
-rw-r--r--layout/reftests/bugs/776265-1-ref.html18
-rw-r--r--layout/reftests/bugs/776265-1a.html19
-rw-r--r--layout/reftests/bugs/776265-1b.html19
-rw-r--r--layout/reftests/bugs/776265-1c.html19
-rw-r--r--layout/reftests/bugs/776265-1d.html19
-rw-r--r--layout/reftests/bugs/776265-2-ref.html17
-rw-r--r--layout/reftests/bugs/776265-2a.html18
-rw-r--r--layout/reftests/bugs/776265-2b.html18
-rw-r--r--layout/reftests/bugs/776265-2c.html18
-rw-r--r--layout/reftests/bugs/776265-2d.html18
-rw-r--r--layout/reftests/bugs/776443-1-ref.html7
-rw-r--r--layout/reftests/bugs/776443-1.html6
-rw-r--r--layout/reftests/bugs/776443-2-ref.html6
-rw-r--r--layout/reftests/bugs/776443-2.html6
-rw-r--r--layout/reftests/bugs/786254-1-ref.html4
-rw-r--r--layout/reftests/bugs/786254-1.html5
-rw-r--r--layout/reftests/bugs/787947-1-ref.html4
-rw-r--r--layout/reftests/bugs/787947-1.html4
-rw-r--r--layout/reftests/bugs/796847-1-ref.svg8
-rw-r--r--layout/reftests/bugs/796847-1.svg25
-rw-r--r--layout/reftests/bugs/797797-1-ref.html6
-rw-r--r--layout/reftests/bugs/797797-1.html6
-rw-r--r--layout/reftests/bugs/797797-2-ref.html7
-rw-r--r--layout/reftests/bugs/797797-2.html7
-rw-r--r--layout/reftests/bugs/801994-1-ref.html4
-rw-r--r--layout/reftests/bugs/801994-1.html4
-rw-r--r--layout/reftests/bugs/804323-1-ref.html19
-rw-r--r--layout/reftests/bugs/804323-1.html25
-rw-r--r--layout/reftests/bugs/811301-1-ref.html6
-rw-r--r--layout/reftests/bugs/811301-1.html11
-rw-r--r--layout/reftests/bugs/812824-1-ref.html3
-rw-r--r--layout/reftests/bugs/812824-1.html5
-rw-r--r--layout/reftests/bugs/814677-ref.html35
-rw-r--r--layout/reftests/bugs/814677.html34
-rw-r--r--layout/reftests/bugs/814952-1-ref.html10
-rw-r--r--layout/reftests/bugs/814952-1.html15
-rw-r--r--layout/reftests/bugs/815030-1-ref.html5
-rw-r--r--layout/reftests/bugs/815030-1.html13
-rw-r--r--layout/reftests/bugs/815593-1-ref.html6
-rw-r--r--layout/reftests/bugs/815593-1.html15
-rw-r--r--layout/reftests/bugs/816359-1-ref.html2
-rw-r--r--layout/reftests/bugs/816359-1.html5
-rw-r--r--layout/reftests/bugs/816458-1-ref.html8
-rw-r--r--layout/reftests/bugs/816458-1.html15
-rw-r--r--layout/reftests/bugs/816876-1-ref.xhtml47
-rw-r--r--layout/reftests/bugs/816876-1.xhtml47
-rw-r--r--layout/reftests/bugs/816876-2-ref.xhtml20
-rw-r--r--layout/reftests/bugs/816876-2a.xhtml20
-rw-r--r--layout/reftests/bugs/816876-2b.xhtml21
-rw-r--r--layout/reftests/bugs/816948-1-ref.html6
-rw-r--r--layout/reftests/bugs/816948-1.html16
-rw-r--r--layout/reftests/bugs/816948-iframe.html3
-rw-r--r--layout/reftests/bugs/817019-1.html33
-rw-r--r--layout/reftests/bugs/818276-1-ref.html6
-rw-r--r--layout/reftests/bugs/818276-1.html14
-rw-r--r--layout/reftests/bugs/81947-1.html17
-rw-r--r--layout/reftests/bugs/81947-ref.html17
-rw-r--r--layout/reftests/bugs/825999-ref.html83
-rw-r--r--layout/reftests/bugs/825999.html83
-rw-r--r--layout/reftests/bugs/82711-1-ref.html15
-rw-r--r--layout/reftests/bugs/82711-1.html8
-rw-r--r--layout/reftests/bugs/82711-2-ref.html15
-rw-r--r--layout/reftests/bugs/82711-2.html8
-rw-r--r--layout/reftests/bugs/82711-3-ref.html15
-rw-r--r--layout/reftests/bugs/82711-3.html15
-rw-r--r--layout/reftests/bugs/827577-1-ref.html7
-rw-r--r--layout/reftests/bugs/827577-1a.html11
-rw-r--r--layout/reftests/bugs/827577-1b.html18
-rw-r--r--layout/reftests/bugs/827577-2.html11
-rw-r--r--layout/reftests/bugs/827799-1.html8
-rw-r--r--layout/reftests/bugs/828146-1-ref.html6
-rw-r--r--layout/reftests/bugs/828146-1.html14
-rw-r--r--layout/reftests/bugs/829958-ref.html27
-rw-r--r--layout/reftests/bugs/829958.html32
-rw-r--r--layout/reftests/bugs/836844-1-ref.html12
-rw-r--r--layout/reftests/bugs/836844-1.html22
-rw-r--r--layout/reftests/bugs/841192-1-ref.html6
-rw-r--r--layout/reftests/bugs/841192-1.html5
-rw-r--r--layout/reftests/bugs/84400-1-ref.html156
-rw-r--r--layout/reftests/bugs/84400-1.html179
-rw-r--r--layout/reftests/bugs/84400-2-ref.html66
-rw-r--r--layout/reftests/bugs/84400-2.html69
-rw-r--r--layout/reftests/bugs/844178-ref.html32
-rw-r--r--layout/reftests/bugs/844178.html40
-rw-r--r--layout/reftests/bugs/846144-1-ref.html24
-rw-r--r--layout/reftests/bugs/846144-1.html24
-rw-r--r--layout/reftests/bugs/847850-1-ref.html25
-rw-r--r--layout/reftests/bugs/847850-1.html25
-rw-r--r--layout/reftests/bugs/848421-1-ref.html14
-rw-r--r--layout/reftests/bugs/848421-1.html14
-rw-r--r--layout/reftests/bugs/849407-1-ref.html27
-rw-r--r--layout/reftests/bugs/849407-1.html28
-rw-r--r--layout/reftests/bugs/849996-1-ref.html23
-rw-r--r--layout/reftests/bugs/849996-1.html27
-rw-r--r--layout/reftests/bugs/858803-1-frame.xhtml2
-rw-r--r--layout/reftests/bugs/858803-1-ref.html6
-rw-r--r--layout/reftests/bugs/858803-1.html7
-rw-r--r--layout/reftests/bugs/860242-1-ref.html46
-rw-r--r--layout/reftests/bugs/860242-1.html47
-rw-r--r--layout/reftests/bugs/860370-notref.html4
-rw-r--r--layout/reftests/bugs/860370.html4
-rw-r--r--layout/reftests/bugs/871338-1-ref.html1
-rw-r--r--layout/reftests/bugs/871338-1.html1
-rw-r--r--layout/reftests/bugs/872254-1-ref.html21
-rw-r--r--layout/reftests/bugs/872254-1.html71
-rw-r--r--layout/reftests/bugs/883568-1-ref.html14
-rw-r--r--layout/reftests/bugs/883568-1.html28
-rw-r--r--layout/reftests/bugs/883987-1-ref.html4
-rw-r--r--layout/reftests/bugs/883987-1a.html8
-rw-r--r--layout/reftests/bugs/883987-1b.html7
-rw-r--r--layout/reftests/bugs/883987-1c.html7
-rw-r--r--layout/reftests/bugs/883987-1d.html8
-rw-r--r--layout/reftests/bugs/883987-1e.html8
-rw-r--r--layout/reftests/bugs/883987-1f.html7
-rw-r--r--layout/reftests/bugs/890495-1-ref.html8
-rw-r--r--layout/reftests/bugs/890495-1.html17
-rw-r--r--layout/reftests/bugs/894931-1-ref.html8
-rw-r--r--layout/reftests/bugs/894931-1.html15
-rw-r--r--layout/reftests/bugs/897491-1-ref.html7
-rw-r--r--layout/reftests/bugs/897491-1.html15
-rw-r--r--layout/reftests/bugs/897491-2-ref.html7
-rw-r--r--layout/reftests/bugs/897491-2.html15
-rw-r--r--layout/reftests/bugs/902330-1-ref.html24
-rw-r--r--layout/reftests/bugs/902330-1.html33
-rw-r--r--layout/reftests/bugs/906199-1-ref.html32
-rw-r--r--layout/reftests/bugs/906199-1.html33
-rw-r--r--layout/reftests/bugs/921716-1-ref.html11
-rw-r--r--layout/reftests/bugs/921716-1.html17
-rw-r--r--layout/reftests/bugs/926155-1-ref.html8
-rw-r--r--layout/reftests/bugs/926155-1.html18
-rw-r--r--layout/reftests/bugs/928607-1-ref.html8
-rw-r--r--layout/reftests/bugs/928607-1.html15
-rw-r--r--layout/reftests/bugs/931464-1-ref.html6
-rw-r--r--layout/reftests/bugs/931464-1.html17
-rw-r--r--layout/reftests/bugs/931853-quirks-ref.html23
-rw-r--r--layout/reftests/bugs/931853-quirks.html22
-rw-r--r--layout/reftests/bugs/931853-ref.html24
-rw-r--r--layout/reftests/bugs/931853.html23
-rw-r--r--layout/reftests/bugs/933264-1-ref.html71
-rw-r--r--layout/reftests/bugs/933264-1.html78
-rw-r--r--layout/reftests/bugs/935056-1-ref.html11
-rw-r--r--layout/reftests/bugs/935056-1.html10
-rw-r--r--layout/reftests/bugs/936670-1-ref.svg6
-rw-r--r--layout/reftests/bugs/936670-1.svg6
-rw-r--r--layout/reftests/bugs/941940-1-ref.html7
-rw-r--r--layout/reftests/bugs/941940-1.html7
-rw-r--r--layout/reftests/bugs/942017-ref.html63
-rw-r--r--layout/reftests/bugs/942017.html65
-rw-r--r--layout/reftests/bugs/942672-1-ref.html6
-rw-r--r--layout/reftests/bugs/942672-1.html6
-rw-r--r--layout/reftests/bugs/944291-1-ref.html31
-rw-r--r--layout/reftests/bugs/944291-1.html37
-rw-r--r--layout/reftests/bugs/9458-basic-1-ref.html11
-rw-r--r--layout/reftests/bugs/9458-basic-1.html19
-rw-r--r--layout/reftests/bugs/9458-height-1-ref.html14
-rw-r--r--layout/reftests/bugs/9458-height-1.html16
-rw-r--r--layout/reftests/bugs/9458-height-2-ref.html14
-rw-r--r--layout/reftests/bugs/9458-height-2.html16
-rw-r--r--layout/reftests/bugs/9458-valign-1-ref.html13
-rw-r--r--layout/reftests/bugs/9458-valign-1.html22
-rw-r--r--layout/reftests/bugs/9458-valign-2-ref.html18
-rw-r--r--layout/reftests/bugs/9458-valign-2.html23
-rw-r--r--layout/reftests/bugs/9458-width-1-ref.html15
-rw-r--r--layout/reftests/bugs/9458-width-1a.html17
-rw-r--r--layout/reftests/bugs/9458-width-1b.html17
-rw-r--r--layout/reftests/bugs/9458-width-2-ref.html15
-rw-r--r--layout/reftests/bugs/9458-width-2a.html18
-rw-r--r--layout/reftests/bugs/9458-width-2b.html18
-rw-r--r--layout/reftests/bugs/9458-zorder-1.html18
-rw-r--r--layout/reftests/bugs/9458-zorder-2.html19
-rw-r--r--layout/reftests/bugs/9458-zorder-3.html19
-rw-r--r--layout/reftests/bugs/9458-zorder-4.html18
-rw-r--r--layout/reftests/bugs/9458-zorder-5.html19
-rw-r--r--layout/reftests/bugs/9458-zorder-ref-inline-block.html14
-rw-r--r--layout/reftests/bugs/9458-zorder-ref-inline.html14
-rw-r--r--layout/reftests/bugs/9458-zorder-ref.html14
-rw-r--r--layout/reftests/bugs/950436-1-ref.html5
-rw-r--r--layout/reftests/bugs/950436-1.html7
-rw-r--r--layout/reftests/bugs/950436-1.pngbin0 -> 201 bytes
-rw-r--r--layout/reftests/bugs/953334-win32-clipping-ref.html22
-rw-r--r--layout/reftests/bugs/953334-win32-clipping.html22
-rw-r--r--layout/reftests/bugs/956513-1-ref.svg10
-rw-r--r--layout/reftests/bugs/956513-1.svg10
-rw-r--r--layout/reftests/bugs/957770-1-ref.svg10
-rw-r--r--layout/reftests/bugs/957770-1.svg12
-rw-r--r--layout/reftests/bugs/960277-1-ref.html8
-rw-r--r--layout/reftests/bugs/960277-1.html14
-rw-r--r--layout/reftests/bugs/961887-1-ref.html23
-rw-r--r--layout/reftests/bugs/961887-1.html30
-rw-r--r--layout/reftests/bugs/961887-2-ref.html24
-rw-r--r--layout/reftests/bugs/961887-2.html32
-rw-r--r--layout/reftests/bugs/961887-3-ref.html16
-rw-r--r--layout/reftests/bugs/961887-3.html51
-rw-r--r--layout/reftests/bugs/966510-1-ref.html12
-rw-r--r--layout/reftests/bugs/966510-1.html12
-rw-r--r--layout/reftests/bugs/966510-2-ref.html10
-rw-r--r--layout/reftests/bugs/966510-2.html12
-rw-r--r--layout/reftests/bugs/966992-1-ref.html69
-rw-r--r--layout/reftests/bugs/966992-1.html64
-rw-r--r--layout/reftests/bugs/97777-1-ref.html13
-rw-r--r--layout/reftests/bugs/97777-1.html13
-rw-r--r--layout/reftests/bugs/97777-2-ref.html23
-rw-r--r--layout/reftests/bugs/97777-2.html22
-rw-r--r--layout/reftests/bugs/978911-1-ref.svg8
-rw-r--r--layout/reftests/bugs/978911-1.svg15
-rw-r--r--layout/reftests/bugs/98223-1-ref.html27
-rw-r--r--layout/reftests/bugs/98223-1.html29
-rw-r--r--layout/reftests/bugs/98223-2-ref.html26
-rw-r--r--layout/reftests/bugs/98223-2.html28
-rw-r--r--layout/reftests/bugs/983084-1-ref.html6
-rw-r--r--layout/reftests/bugs/983084-1.html17
-rw-r--r--layout/reftests/bugs/983084-2-ref.html6
-rw-r--r--layout/reftests/bugs/983084-2.html24
-rw-r--r--layout/reftests/bugs/983084-3.html24
-rw-r--r--layout/reftests/bugs/983691-1.html21
-rw-r--r--layout/reftests/bugs/983691-ref.html18
-rw-r--r--layout/reftests/bugs/983985-1-ref.html19
-rw-r--r--layout/reftests/bugs/983985-1.html19
-rw-r--r--layout/reftests/bugs/983985-2-ref.html28
-rw-r--r--layout/reftests/bugs/983985-2.html28
-rw-r--r--layout/reftests/bugs/985303-1-ref.html34
-rw-r--r--layout/reftests/bugs/985303-1a.html38
-rw-r--r--layout/reftests/bugs/985303-1b.html40
-rw-r--r--layout/reftests/bugs/987680-1-ref.html20
-rw-r--r--layout/reftests/bugs/987680-1.html19
-rw-r--r--layout/reftests/bugs/991046-1-ref.html29
-rw-r--r--layout/reftests/bugs/991046-1.html30
-rw-r--r--layout/reftests/bugs/992447-ref.html28
-rw-r--r--layout/reftests/bugs/992447.html28
-rw-r--r--layout/reftests/bugs/99850-1-ref.html12
-rw-r--r--layout/reftests/bugs/99850-1a.html21
-rw-r--r--layout/reftests/bugs/99850-1b.html27
-rw-r--r--layout/reftests/bugs/99850-1c.html12
-rw-r--r--layout/reftests/bugs/99850-1d.html20
-rw-r--r--layout/reftests/bugs/LongHyphenTest.woff2bin0 -> 668 bytes
-rw-r--r--layout/reftests/bugs/blob-fallback-clip-ref.html29
-rw-r--r--layout/reftests/bugs/blob-fallback-clip.html36
-rw-r--r--layout/reftests/bugs/blue-600x58.pngbin0 -> 271 bytes
-rw-r--r--layout/reftests/bugs/bug1472465-1-ref.html45
-rw-r--r--layout/reftests/bugs/bug1472465-1.html68
-rw-r--r--layout/reftests/bugs/checkmark.gifbin0 -> 76 bytes
-rw-r--r--layout/reftests/bugs/mozilla-banner-opacity.gifbin0 -> 4333 bytes
-rw-r--r--layout/reftests/bugs/mozilla-banner.gifbin0 -> 4500 bytes
-rw-r--r--layout/reftests/bugs/passinner.pngbin0 -> 563 bytes
-rw-r--r--layout/reftests/bugs/passouter.pngbin0 -> 1036 bytes
-rw-r--r--layout/reftests/bugs/pinwheel_logo.svg12
-rw-r--r--layout/reftests/bugs/reftest.list2166
-rw-r--r--layout/reftests/bugs/repeatable-diagonal-gradient.pngbin0 -> 14520 bytes
-rw-r--r--layout/reftests/bugs/solidblue.pngbin0 -> 135 bytes
-rw-r--r--layout/reftests/bugs/solidblue2.pngbin0 -> 69 bytes
-rw-r--r--layout/reftests/bugs/square-left-right-32x32.pngbin0 -> 158 bytes
-rw-r--r--layout/reftests/bugs/square-outline-32x32.pngbin0 -> 96 bytes
-rw-r--r--layout/reftests/bugs/square-top-bottom-32x32.pngbin0 -> 161 bytes
-rw-r--r--layout/reftests/bugs/subdir/445004-ref-subframe.html8
-rw-r--r--layout/reftests/bugs/subdir/445004-ref-subsubframe.html1
-rw-r--r--layout/reftests/bugs/subdir/445004-subframe.html35
-rw-r--r--layout/reftests/bugs/subdir/passinner.pngbin0 -> 1036 bytes
-rw-r--r--layout/reftests/bugs/subdir/passouter.pngbin0 -> 563 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-1.pngbin0 -> 957 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-10.pngbin0 -> 1775 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-11.pngbin0 -> 1357 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-12.pngbin0 -> 1744 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-13.pngbin0 -> 1357 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-14.pngbin0 -> 1018 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-15.pngbin0 -> 1025 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-16.pngbin0 -> 1018 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-17.pngbin0 -> 1026 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-18.pngbin0 -> 1073 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-19.pngbin0 -> 1074 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-2.pngbin0 -> 1175 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-3.pngbin0 -> 1144 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-4.pngbin0 -> 1018 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-5.pngbin0 -> 1026 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-6.pngbin0 -> 1175 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-7.pngbin0 -> 1276 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-8.pngbin0 -> 1018 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max-9.pngbin0 -> 1025 bytes
-rw-r--r--layout/reftests/bugs/support/replaced-min-max.pngbin0 -> 1083 bytes
3665 files changed, 80146 insertions, 0 deletions
diff --git a/layout/reftests/bugs/1003425-1-ref.html b/layout/reftests/bugs/1003425-1-ref.html
new file mode 100644
index 0000000000..31cdbb86bf
--- /dev/null
+++ b/layout/reftests/bugs/1003425-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<style>
+div {
+ width: 500px;
+ height: 500px;
+ box-shadow: 0 0 40px #000;
+}
+</style>
+<div id="d"></div>
+
diff --git a/layout/reftests/bugs/1003425-1.html b/layout/reftests/bugs/1003425-1.html
new file mode 100644
index 0000000000..0428d5df72
--- /dev/null
+++ b/layout/reftests/bugs/1003425-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+div {
+ width: 500px;
+ height: 500px;
+ opacity: 0.5;
+ box-shadow: 0 0 40px #000;
+}
+</style>
+<div id="d"></div>
+<script>
+function doTest() {
+ document.getElementById("d").style.opacity = 1;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
diff --git a/layout/reftests/bugs/1003425-2-ref.html b/layout/reftests/bugs/1003425-2-ref.html
new file mode 100644
index 0000000000..3e6624ce31
--- /dev/null
+++ b/layout/reftests/bugs/1003425-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<style>
+div {
+ width: 500px;
+ height: 500px;
+ background-color: lime;
+}
+</style>
+<div id="d"></div>
+
diff --git a/layout/reftests/bugs/1003425-2.html b/layout/reftests/bugs/1003425-2.html
new file mode 100644
index 0000000000..ee25ca1ab3
--- /dev/null
+++ b/layout/reftests/bugs/1003425-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+div {
+ width: 500px;
+ height: 500px;
+ opacity: 0.5;
+ background-color: lime;
+}
+</style>
+<div id="d"></div>
+<script>
+function doTest() {
+ document.getElementById("d").style.opacity = 1;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
diff --git a/layout/reftests/bugs/10036-1-ref.html b/layout/reftests/bugs/10036-1-ref.html
new file mode 100644
index 0000000000..30de2ef3d4
--- /dev/null
+++ b/layout/reftests/bugs/10036-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table border="1" style="width:100px; height:100px; empty-cells:show;">
+ <tr><td bgcolor="lime"></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/10036-1.html b/layout/reftests/bugs/10036-1.html
new file mode 100644
index 0000000000..fc4994972a
--- /dev/null
+++ b/layout/reftests/bugs/10036-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table border="1" style="width:100px; height:100px; empty-cells:hide;">
+ <tr><td bgcolor="lime"><br></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1005405-1-ref.html b/layout/reftests/bugs/1005405-1-ref.html
new file mode 100644
index 0000000000..eebc9027f5
--- /dev/null
+++ b/layout/reftests/bugs/1005405-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table id="thetable" width="150" style="top: 0px; position: relative;">
+ <tbody id="thebody">
+ <tr>
+ <td>Hello</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1005405-1.html b/layout/reftests/bugs/1005405-1.html
new file mode 100644
index 0000000000..7787efcf7d
--- /dev/null
+++ b/layout/reftests/bugs/1005405-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <table id="thetable" width="150" style="top: -100px; position: relative;">
+ <tbody id="thebody">
+ <tr>
+ <td>Hello</td>
+ </tr>
+ </tbody>
+ </table>
+ <script>
+ function doTest() {
+ document.getElementById("thetable").style.top="0px";
+ document.documentElement.className = "";
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/100x80-white-rect-top-right.png b/layout/reftests/bugs/100x80-white-rect-top-right.png
new file mode 100644
index 0000000000..e0dab5064f
--- /dev/null
+++ b/layout/reftests/bugs/100x80-white-rect-top-right.png
Binary files differ
diff --git a/layout/reftests/bugs/1012640-1-ref.html b/layout/reftests/bugs/1012640-1-ref.html
new file mode 100644
index 0000000000..3a197b1608
--- /dev/null
+++ b/layout/reftests/bugs/1012640-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>white-space: nowrap; regressed in Firefox 29</title>
+<style>
+.tagcloud { width: 30em; padding: 1px; font-family: monospace; border: 1px solid blue; }
+.tagcloud > li { display: inline; white-space: nowrap; }
+.tagcloud > li.weight_1 { font-style: italic; }
+.tagcloud > li.weight_5 { font-size: 150%; }
+</style>
+</head>
+<body>
+<ul class="tagcloud">
+<li class="weight_1">short string</li>
+<li class="weight_1">short string</li>
+<li class="weight_1">short string</li>
+<li class="weight_5">why doesn't this move to the next line?</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1012640-1.html b/layout/reftests/bugs/1012640-1.html
new file mode 100644
index 0000000000..adf899bd42
--- /dev/null
+++ b/layout/reftests/bugs/1012640-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>white-space: nowrap; regressed in Firefox 29</title>
+<style>
+.tagcloud { width: 30em; padding: 1px; font-family: monospace; border: 1px solid blue; }
+.tagcloud > li { display: inline; white-space: nowrap; }
+.tagcloud > li.weight_1 { font-style: italic; }
+.tagcloud > li.weight_5 { font-size: 150%; }
+</style>
+</head>
+<body>
+<ul class="tagcloud">
+<li class="weight_1">short string </li>
+<li class="weight_1">short string </li>
+<li class="weight_1">short string </li>
+<li class="weight_5">why doesn't this move to the next line? </li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1013054-1-ref.html b/layout/reftests/bugs/1013054-1-ref.html
new file mode 100644
index 0000000000..db0fc0bc25
--- /dev/null
+++ b/layout/reftests/bugs/1013054-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html>
+<body style="transform:translateY(10px);">
+ <span style="padding:2px; background:yellow">&nbsp;&nbsp;&nbsp;&nbsp;</span>
diff --git a/layout/reftests/bugs/1013054-1.html b/layout/reftests/bugs/1013054-1.html
new file mode 100644
index 0000000000..1d76ef0ab0
--- /dev/null
+++ b/layout/reftests/bugs/1013054-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body style="transform:translateY(50px);">
+ <span style="padding:2px; background:yellow">&nbsp;&nbsp;&nbsp;&nbsp;</span>
+<script>
+console.log(document.body.getBoundingClientRect());
+document.body.style.transform = "translateY(30px)";
+function doTest() {
+ document.body.style.transform = "translateY(10px)";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
diff --git a/layout/reftests/bugs/1018522-1-ref.html b/layout/reftests/bugs/1018522-1-ref.html
new file mode 100644
index 0000000000..b5d1fb9ae9
--- /dev/null
+++ b/layout/reftests/bugs/1018522-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<title>Test that opacity changes on layers make the Compositor repaint the right area</title>
+
+<style>
+
+#box {
+ width: 100px;
+ height: 100px;
+ border: 10px solid black;
+ opacity: 1;
+ will-change: opacity;
+}
+
+#box.halfTransparent {
+ opacity: 0.5;
+}
+
+</style>
+
+<div id="box" class="halfTransparent"></div>
diff --git a/layout/reftests/bugs/1018522-1.html b/layout/reftests/bugs/1018522-1.html
new file mode 100644
index 0000000000..f918afa93f
--- /dev/null
+++ b/layout/reftests/bugs/1018522-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<title>Test that opacity changes on layers make the Compositor repaint the right area</title>
+
+<style>
+
+#box {
+ width: 100px;
+ height: 100px;
+ border: 10px solid black;
+ opacity: 1;
+ will-change: opacity;
+}
+
+#box.halfTransparent {
+ opacity: 0.5;
+}
+
+</style>
+
+<div id="box"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function (e) {
+ document.getElementById("box").className = "halfTransparent";
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/10209-1.html b/layout/reftests/bugs/10209-1.html
new file mode 100644
index 0000000000..ca169fb023
--- /dev/null
+++ b/layout/reftests/bugs/10209-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+* {
+ font-family: Ahem;
+}
+</style>
+<body style="font-size: 100px; line-height: 1">
+ <div style="position: relative; display: inline; color: white">x
+ <table style="height: 50%; position: absolute; width: 50px; background: green; top: 0; left: 0">
+ </table>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/10209-2.html b/layout/reftests/bugs/10209-2.html
new file mode 100644
index 0000000000..65af40eaec
--- /dev/null
+++ b/layout/reftests/bugs/10209-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+* {
+ font-family: Ahem;
+}
+</style>
+<body style="font-size: 100px">
+ <div style="position: relative; height:100px;">
+ <table style="height: 50%; position: absolute; width: 50px; background: green">
+ </table>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/10209-3-ref.html b/layout/reftests/bugs/10209-3-ref.html
new file mode 100644
index 0000000000..6f16cba6d6
--- /dev/null
+++ b/layout/reftests/bugs/10209-3-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+* {
+ font-family: Ahem;
+}
+</style>
+<body style="margin: 0">
+ <div style="width: 100px; height: 100px; background: green">
+ </div>
+</body>
diff --git a/layout/reftests/bugs/10209-3.html b/layout/reftests/bugs/10209-3.html
new file mode 100644
index 0000000000..b4bc59ddd1
--- /dev/null
+++ b/layout/reftests/bugs/10209-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+* {
+ font-family: Ahem;
+}
+</style>
+<body style="position: relative; display: inline; border-right: 1px solid black; font-size: 100px; line-height: 100px; margin: 0">
+ <table style="position: absolute; width: 100px; height: 100%; top: 0; left: 0; background: green"></table>
+</body>
diff --git a/layout/reftests/bugs/10209-ref.html b/layout/reftests/bugs/10209-ref.html
new file mode 100644
index 0000000000..042326c0ad
--- /dev/null
+++ b/layout/reftests/bugs/10209-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+* {
+ font-family: Ahem;
+}
+</style>
+<body>
+ <div style="width: 50px; height: 50px; background: green">
+ </div>
+</body>
diff --git a/layout/reftests/bugs/1021564-1.html b/layout/reftests/bugs/1021564-1.html
new file mode 100644
index 0000000000..21e5a879d9
--- /dev/null
+++ b/layout/reftests/bugs/1021564-1.html
@@ -0,0 +1,46 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>When the filtered element's BBox relative to the page changes, the filtered element needs to be invalidated</title>
+
+<style>
+
+#spacer {
+ height: 100px;
+}
+
+#filtered {
+ width: 100px;
+ height: 100px;
+ background-color: lime;
+ filter: url(#filter);
+}
+
+</style>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="objectBoundingBox"
+ x="0%" y="0%" width="100%" height="100%"
+ color-interpolation-filters="sRGB">
+ <feMerge><feMergeNode/></feMerge>
+ </filter>
+ </defs>
+</svg>
+
+<div id="spacer"></div>
+
+<div id="filtered"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function () {
+ document.getElementById("spacer").style.height = "50px";
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/1021564-2.html b/layout/reftests/bugs/1021564-2.html
new file mode 100644
index 0000000000..f30b9aef7d
--- /dev/null
+++ b/layout/reftests/bugs/1021564-2.html
@@ -0,0 +1,45 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>When the filtered element's BBox relative to the page changes, the filtered element needs to be invalidated</title>
+
+<style>
+
+#spacer {
+ height: 100px;
+}
+
+#filtered {
+ width: 100px;
+ height: 100px;
+ filter: url(#filter);
+}
+
+</style>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="objectBoundingBox"
+ x="0%" y="0%" width="100%" height="100%"
+ color-interpolation-filters="sRGB">
+ <feFlood flood-color="lime"/>
+ </filter>
+ </defs>
+</svg>
+
+<div id="spacer"></div>
+
+<div id="filtered"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function () {
+ document.getElementById("spacer").style.height = "50px";
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/1021564-3.html b/layout/reftests/bugs/1021564-3.html
new file mode 100644
index 0000000000..0d64728649
--- /dev/null
+++ b/layout/reftests/bugs/1021564-3.html
@@ -0,0 +1,46 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>When the filtered element's BBox relative to the page changes, the filtered element needs to be invalidated</title>
+
+<style>
+
+#spacer {
+ height: 100px;
+}
+
+#filtered {
+ width: 100px;
+ height: 100px;
+ background-color: lime;
+ filter: url(#filter);
+}
+
+</style>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="userSpaceOnUse"
+ x="0" y="0" width="100" height="100"
+ color-interpolation-filters="sRGB">
+ <feMerge><feMergeNode/></feMerge>
+ </filter>
+ </defs>
+</svg>
+
+<div id="spacer"></div>
+
+<div id="filtered"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function () {
+ document.getElementById("spacer").style.height = "50px";
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/1021564-4.html b/layout/reftests/bugs/1021564-4.html
new file mode 100644
index 0000000000..831c8bd914
--- /dev/null
+++ b/layout/reftests/bugs/1021564-4.html
@@ -0,0 +1,45 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>When the filtered element's BBox relative to the page changes, the filtered element needs to be invalidated</title>
+
+<style>
+
+#spacer {
+ height: 100px;
+}
+
+#filtered {
+ width: 100px;
+ height: 100px;
+ filter: url(#filter);
+}
+
+</style>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="userSpaceOnUse"
+ x="0" y="0" width="100" height="100"
+ color-interpolation-filters="sRGB">
+ <feFlood flood-color="lime"/>
+ </filter>
+ </defs>
+</svg>
+
+<div id="spacer"></div>
+
+<div id="filtered"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function () {
+ document.getElementById("spacer").style.height = "50px";
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/1021564-ref.html b/layout/reftests/bugs/1021564-ref.html
new file mode 100644
index 0000000000..0ae0a20dc7
--- /dev/null
+++ b/layout/reftests/bugs/1021564-ref.html
@@ -0,0 +1,28 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>When the filtered element's BBox relative to the page changes, the filtered element needs to be invalidated</title>
+
+<style>
+
+#spacer {
+ height: 50px;
+}
+
+#filtered {
+ width: 100px;
+ height: 100px;
+ background-color: lime;
+}
+
+</style>
+
+<svg height="0"></svg>
+
+<div id="spacer"></div>
+
+<div id="filtered"></div>
diff --git a/layout/reftests/bugs/1022481-1-ref.html b/layout/reftests/bugs/1022481-1-ref.html
new file mode 100644
index 0000000000..256791bb16
--- /dev/null
+++ b/layout/reftests/bugs/1022481-1-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Simple generics test</title>
+<meta charset="UTF-8">
+<style>
+
+body {
+ margin: 20px;
+}
+
+p {
+ margin: 0;
+ line-height: 1.2;
+ font-size: 25px;
+}
+
+</style>
+
+</head>
+<body>
+<p>default font</p>
+<p style="font-family: serif">serif</p>
+<p style="font-family: sans-serif">sans-serif</p>
+<p style="font-family: monospace">monospace</p>
+<p style="font-family: monospace">-moz-fixed</p>
+<p style="font-family: serif">unknown, serif</p>
+<p style="font-family: sans-serif">unknown, sans-serif</p>
+<p style="font-family: monospace">unknown, monospace</p>
+<p style="font-family: monospace">unknown, -moz-fixed</p>
+<p style="font-family: serif">unknown, serif, monospace</p>
+<p style="font-family: sans-serif">unknown, sans-serif, -moz-fixed</p>
+<p style="font-family: monospace">unknown, monospace, serif</p>
+<p style="font-family: monospace">unknown, -moz-fixed, sans-serif</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1022481-1.html b/layout/reftests/bugs/1022481-1.html
new file mode 100644
index 0000000000..e9fe216a76
--- /dev/null
+++ b/layout/reftests/bugs/1022481-1.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Simple generics test</title>
+<meta charset="UTF-8">
+<style>
+
+body {
+ margin: 20px;
+}
+
+p {
+ margin: 0;
+ line-height: 1.2;
+ font-size: 25px;
+}
+
+</style>
+
+</head>
+<body>
+<p>default font</p>
+<p style="font-family: serif">serif</p>
+<p style="font-family: sans-serif">sans-serif</p>
+<p style="font-family: monospace">monospace</p>
+<p style="font-family: -moz-fixed">-moz-fixed</p>
+<p style="font-family: unknown, serif">unknown, serif</p>
+<p style="font-family: unknown, sans-serif">unknown, sans-serif</p>
+<p style="font-family: unknown, monospace">unknown, monospace</p>
+<p style="font-family: unknown, -moz-fixed">unknown, -moz-fixed</p>
+<p style="font-family: unknown, serif, monospace">unknown, serif, monospace</p>
+<p style="font-family: unknown, sans-serif, -moz-fixed">unknown, sans-serif, -moz-fixed</p>
+<p style="font-family: unknown, monospace, serif">unknown, monospace, serif</p>
+<p style="font-family: unknown, -moz-fixed, sans-serif">unknown, -moz-fixed, sans-serif</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1022612-1-ref.html b/layout/reftests/bugs/1022612-1-ref.html
new file mode 100644
index 0000000000..ffe8398e03
--- /dev/null
+++ b/layout/reftests/bugs/1022612-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<div style="width:400px;">
+ <span style="opacity:0.5;">
+ <span style="position:relative; display:inline-block; width:400px; height:200px;"></span>
+ <span style="position:relative; top:-300px; display:inline-block; background:lime; width:400px; height:400px;"></span>
+ </span>
+</div>
diff --git a/layout/reftests/bugs/1022612-1.html b/layout/reftests/bugs/1022612-1.html
new file mode 100644
index 0000000000..1d32971217
--- /dev/null
+++ b/layout/reftests/bugs/1022612-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<div style="width:400px;">
+ <span style="opacity:0.5;">
+ <span style="position:relative; display:inline-block; background:red; width:400px; height:200px;"></span>
+ <span style="position:relative; top:-300px; display:inline-block; background:lime; width:400px; height:400px;"></span>
+ </span>
+</div>
diff --git a/layout/reftests/bugs/1024473-1-ref.html b/layout/reftests/bugs/1024473-1-ref.html
new file mode 100644
index 0000000000..4eb3e5eb32
--- /dev/null
+++ b/layout/reftests/bugs/1024473-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<title>Mask layer on canvas layer needs to update even if canvas wasn't dirtied</title>
+</style>
+<canvas id="canvas" height="100" width="200" style="border-radius: 40px;"></canvas>
+<script>
+var canvas = document.getElementById("canvas");
+var cx = canvas.getContext("2d");
+cx.fillStyle="lime";
+cx.fillRect(0, 0, 200, 100);
+</script>
diff --git a/layout/reftests/bugs/1024473-1.html b/layout/reftests/bugs/1024473-1.html
new file mode 100644
index 0000000000..e6f2b9a0fb
--- /dev/null
+++ b/layout/reftests/bugs/1024473-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<title>Mask layer on canvas layer needs to update even if canvas wasn't dirtied</title>
+</style>
+<canvas id="canvas" height="100" width="200" style="border-radius: 20px;"></canvas>
+<script>
+var canvas = document.getElementById("canvas");
+var cx = canvas.getContext("2d");
+cx.fillStyle="lime";
+cx.fillRect(0, 0, 200, 100);
+
+window.addEventListener("MozReftestInvalidate", function() {
+ canvas.style.borderRadius = "40px";
+ document.documentElement.removeAttribute("class");
+});
+</script>
diff --git a/layout/reftests/bugs/1025914-1-ref.html b/layout/reftests/bugs/1025914-1-ref.html
new file mode 100644
index 0000000000..75610b730c
--- /dev/null
+++ b/layout/reftests/bugs/1025914-1-ref.html
@@ -0,0 +1,44 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Make sure that scrolling #scrolledBox into view paints the scrolled strip even while #coveringFixedBar covers that strip</title>
+
+<style>
+
+html {
+ overflow: hidden;
+}
+
+body {
+ margin: 0;
+}
+
+#coveringFixedBar {
+ position: absolute;
+ left: 10px;
+ top: 0;
+ width: 380px;
+ height: 20px;
+ background: blue;
+ z-index: 100;
+}
+
+#scrolledBox {
+ position: relative;
+ margin: 0 100px;
+ opacity: 0.9;
+ width: 200px;
+ height: 200px;
+ background: lime;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="coveringFixedBar"></div>
+
+<div id="scrolledBox"></div>
diff --git a/layout/reftests/bugs/1025914-1.html b/layout/reftests/bugs/1025914-1.html
new file mode 100644
index 0000000000..8f6380c4c4
--- /dev/null
+++ b/layout/reftests/bugs/1025914-1.html
@@ -0,0 +1,59 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Make sure that scrolling #scrolledBox into view paints the scrolled strip even while #coveringFixedBar covers that strip</title>
+
+<style>
+
+html {
+ overflow: hidden;
+}
+
+body {
+ margin: 0;
+ height: 2000px;
+}
+
+#coveringFixedBar {
+ position: fixed;
+ left: 10px;
+ top: 0;
+ width: 380px;
+ height: 20px;
+ background: blue;
+ z-index: 100;
+}
+
+#scrolledBox {
+ position: relative;
+ margin: 0 100px;
+ opacity: 0.9;
+ width: 200px;
+ height: 200px;
+ background: lime;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="coveringFixedBar"></div>
+
+<div id="scrolledBox"></div>
+
+<script>
+
+document.documentElement.scrollTop = 40;
+
+window.addEventListener("MozReftestInvalidate", function () {
+ document.documentElement.scrollTop = 20;
+ window.requestAnimationFrame(function () {
+ document.documentElement.scrollTop = 0;
+ document.documentElement.removeAttribute("class");
+ });
+});
+
+</script>
diff --git a/layout/reftests/bugs/1035091-2.html b/layout/reftests/bugs/1035091-2.html
new file mode 100644
index 0000000000..b647a16238
--- /dev/null
+++ b/layout/reftests/bugs/1035091-2.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<style>
+div { color: green; }
+@-moz-document url-prefix(foo) {
+ div { color: red; }
+}
+</style>
+<div>Should be green</div>
diff --git a/layout/reftests/bugs/1035091-ref.html b/layout/reftests/bugs/1035091-ref.html
new file mode 100644
index 0000000000..5dc9b3d272
--- /dev/null
+++ b/layout/reftests/bugs/1035091-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<div style="color: green;">Should be green</div>
diff --git a/layout/reftests/bugs/1042104-1-ref.html b/layout/reftests/bugs/1042104-1-ref.html
new file mode 100644
index 0000000000..ee30aeb622
--- /dev/null
+++ b/layout/reftests/bugs/1042104-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#container {
+ height: 500px;
+ width: 500px;
+ position: relative;
+ overflow: hidden;
+}
+#panel {
+ position:absolute;
+ height: 100%;
+ width: 100%;
+ top: 0;
+ left: 0;
+ transform: translateX(0);
+ background-color: yellow;
+}
+</style>
+</head>
+<body>
+<div id="container">
+ <div id="panel">
+ <div style="width:300px; height:50px; background:blue;"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1042104-1.html b/layout/reftests/bugs/1042104-1.html
new file mode 100644
index 0000000000..82b5985f34
--- /dev/null
+++ b/layout/reftests/bugs/1042104-1.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+#container {
+ height: 500px;
+ width: 500px;
+ position: relative;
+ overflow: hidden;
+}
+#panel {
+ position:absolute;
+ height: 100%;
+ width: 100%;
+ top: 0;
+ left: 0;
+ transform: translateX(-500px);
+ background-color: yellow;
+}
+#tog {
+ position: absolute;
+ height: 50px;
+ width: 50px;
+ left: 0;
+ bottom: 0;
+ background-color: black;
+}
+</style>
+</head>
+<body>
+<div id="container">
+ <div id="panel">
+ <div style="width:300px; height:50px; background:blue;"></div>
+ </div>
+</div>
+<div id="tog"></div>
+<script>
+console.log(panel.getBoundingClientRect());
+panel.style.transform = "translateX(-450px)";
+console.log(panel.getBoundingClientRect());
+panel.style.transform = "translateX(-400px)";
+function doTest() {
+ panel.style.transform = "translateX(0)";
+ tog.style.visibility = "hidden";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
diff --git a/layout/reftests/bugs/1043537-1-ref.html b/layout/reftests/bugs/1043537-1-ref.html
new file mode 100644
index 0000000000..2cbe050b38
--- /dev/null
+++ b/layout/reftests/bugs/1043537-1-ref.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<meta charset="utf-8" />
+<title>Reference #1 for bug #1043537</title>
+<style>
+div {
+ width: 200px;
+ height: 200px;
+ background: yellow;
+}
+
+div:before {
+ content: '';
+ background: hotpink;
+ display: block;
+ width: 40px;
+ height: 40px;
+ overflow: hidden;
+}
+</style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1043537-1.html b/layout/reftests/bugs/1043537-1.html
new file mode 100644
index 0000000000..286237ceda
--- /dev/null
+++ b/layout/reftests/bugs/1043537-1.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<meta charset="utf-8" />
+<title>Test #1 for bug #1043537</title>
+<style>
+div {
+ width: 200px;
+ height: 200px;
+ background: yellow;
+}
+
+div:before {
+ content: '';
+ background: hotpink;
+ display: block;
+ width: 40px;
+ height: 40px;
+ overflow: hidden;
+ resize: both;
+}
+</style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1044198-1-ref.html b/layout/reftests/bugs/1044198-1-ref.html
new file mode 100644
index 0000000000..730bf24237
--- /dev/null
+++ b/layout/reftests/bugs/1044198-1-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252">
+<style>
+.wrapper{
+ direction: rtl;
+ border: 1px solid black;
+ display: inline-block;
+}
+.panel{
+ display: inline-block;
+ width: 50px;
+ height: 20px;
+}
+.olive {
+ border: 3px dotted olive;
+}
+.blue {
+ border: 3px dotted blue;
+}
+.purple {
+ border: 3px dotted purple;
+}
+.negMargin {
+ margin-left: -30px;
+}
+.posMargin {
+ margin-left: 30px;
+}
+.forceLTR {
+ direction: ltr;
+}
+</style>
+</head>
+<body>
+ <div class="wrapper">
+ <div class="panel olive"></div
+ ><div class="panel blue posMargin"></div
+ ><div class="panel purple"></div>
+ </div>
+ <br><br>
+ <div class="wrapper">
+ <div class="panel olive"></div
+ ><div class="panel blue negMargin"></div
+ ><div class="panel purple"></div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1044198-1.html b/layout/reftests/bugs/1044198-1.html
new file mode 100644
index 0000000000..afd07400c7
--- /dev/null
+++ b/layout/reftests/bugs/1044198-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252">
+<style>
+.wrapper{
+ direction: rtl;
+ border: 1px solid black;
+ display: inline-block;
+}
+.panel{
+ display: inline-block;
+ width: 50px;
+ height: 20px;
+}
+.olive {
+ border: 3px dotted olive;
+}
+.blue {
+ border: 3px dotted blue;
+}
+.purple {
+ border: 3px dotted purple;
+}
+.negMargin {
+ margin-left: -30px;
+}
+.posMargin {
+ margin-left: 30px;
+}
+.forceLTR {
+ direction: ltr;
+}
+</style>
+</head>
+<body>
+ <div class="wrapper">
+ <div class="panel olive"></div
+ ><div class="panel blue forceLTR posMargin"></div
+ ><div class="panel purple"></div>
+ </div>
+ <br><br>
+ <div class="wrapper">
+ <div class="panel olive"></div
+ ><div class="panel blue forceLTR negMargin"></div
+ ><div class="panel purple"></div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1049499-1-ref.html b/layout/reftests/bugs/1049499-1-ref.html
new file mode 100644
index 0000000000..4d591ea7de
--- /dev/null
+++ b/layout/reftests/bugs/1049499-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Choose the correct gradient repeat count even when there's a non-identity pattern matrix</title>
+
+<style>
+
+html {
+ overflow: hidden;
+}
+
+div {
+ width: 30px;
+ height: 40px;
+ background-image: repeating-linear-gradient(-36.8698976deg, blue, blue 5px, lime 5px, lime 10px);
+}
+
+</style>
+
+<div></div>
diff --git a/layout/reftests/bugs/1049499-1.html b/layout/reftests/bugs/1049499-1.html
new file mode 100644
index 0000000000..e2b23ceba3
--- /dev/null
+++ b/layout/reftests/bugs/1049499-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Choose the correct gradient repeat count even when there's a non-identity pattern matrix</title>
+
+<style>
+
+html {
+ overflow: hidden;
+}
+
+div {
+ box-sizing: border-box;
+ width: 240px;
+ height: 320px;
+
+ /* Scale a 240x320 gradient down by a factor of 8 into a 30x40 border image. */
+ /* 240x320 gives a diagonal of 400px, so we should get 5 repetitions of a 80px long gradient. */
+ /* tan(36.8698976deg) == 240 / 320 */
+ border-left: 30px solid;
+ border-top: 40px solid;
+ border-image: repeating-linear-gradient(-36.8698976deg, blue, blue 40px, lime 40px, lime 80px);
+}
+
+</style>
+
+<div></div>
diff --git a/layout/reftests/bugs/105-1-ref.html b/layout/reftests/bugs/105-1-ref.html
new file mode 100644
index 0000000000..fc2df77d63
--- /dev/null
+++ b/layout/reftests/bugs/105-1-ref.html
@@ -0,0 +1,8 @@
+<body bgcolor=white>
+<table bgcolor=blue cellpadding=0>
+<tr><td bgcolor=yellow>
+<table>
+<tr><td>hello
+</table>
+</table>
+</body>
diff --git a/layout/reftests/bugs/105-1.html b/layout/reftests/bugs/105-1.html
new file mode 100644
index 0000000000..864d7e60a8
--- /dev/null
+++ b/layout/reftests/bugs/105-1.html
@@ -0,0 +1,8 @@
+<body bgcolor=white>
+<table bgcolor=blue cellpadding=0>
+<tr><td>
+<table bgcolor=yellow>
+<tr><td>hello
+</table>
+</table>
+</body>
diff --git a/layout/reftests/bugs/105030-1-ref.html b/layout/reftests/bugs/105030-1-ref.html
new file mode 100644
index 0000000000..cc8a99eae5
--- /dev/null
+++ b/layout/reftests/bugs/105030-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 105030 Reference</title>
+</head>
+<body>
+<table style="border: solid 1px">
+ <tr><td>
+ <table>
+ <tr><td>Inner Table <img src="solidblue.png" alt="">
+ </td></tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/105030-1.html b/layout/reftests/bugs/105030-1.html
new file mode 100644
index 0000000000..ff9eacf22a
--- /dev/null
+++ b/layout/reftests/bugs/105030-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 105030</title>
+</head>
+<body>
+<table style="border: solid 1px">
+ <tr><td>
+ <table align="left">
+ <tr><td id="cell">Inner Table </td></tr>
+ </table>
+ </td></tr>
+</table>
+<script type="text/javascript">
+ function loadImage() {
+ document.body.offsetWidth
+ var img = document.createElement("img");
+ img.src = "solidblue.png";
+ img.alt = "";
+ targetCell = document.getElementById("cell");
+ targetCell.appendChild(img);
+ }
+ loadImage();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1050493-1-ref.html b/layout/reftests/bugs/1050493-1-ref.html
new file mode 100644
index 0000000000..b9cbafd5c5
--- /dev/null
+++ b/layout/reftests/bugs/1050493-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<title>Test for bug 1050493</title>
+
+<style>
+body {
+ position: relative;
+}
+#box {
+ width: 50px;
+ height: 50px;
+ background-color: red;
+ position: absolute;
+}
+</style>
+
+<div style="left: 5.556750627747686px; top: 0.5041006554218519px;" id="box"></div>
diff --git a/layout/reftests/bugs/1050493-1.html b/layout/reftests/bugs/1050493-1.html
new file mode 100644
index 0000000000..321cf0d6c5
--- /dev/null
+++ b/layout/reftests/bugs/1050493-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Test for bug 1050493</title>
+
+<style>
+body {
+ position: relative;
+}
+#box {
+ width: 50px;
+ height: 50px;
+ background-color: red;
+ position: absolute;
+}
+</style>
+
+<div style="left: 0; top: 0;" id="box"></div>
+
+<script>
+var positions = [
+ { x: 4.6260797642782014, y: 0.46260797642782014 },
+ { x: 5.0304173163526205, y: 0.4878118314685598 },
+ { x: 5.0304173163526205, y: 0.5041006554218519 },
+ { x: 5.556750627747686, y: 0.5041006554218519 }];
+var s = document.getElementById('box').style,
+ i = 0;
+function f() {
+ if (i < positions.length) {
+ s.left = positions[i].x + "px";
+ s.top = positions[i].y + "px";
+ i++;
+ requestAnimationFrame(f);
+ } else {
+ document.documentElement.className = "";
+ }
+}
+window.addEventListener("MozReftestInvalidate", function () {
+ f();
+});
+</script>
diff --git a/layout/reftests/bugs/1050788-1.html b/layout/reftests/bugs/1050788-1.html
new file mode 100644
index 0000000000..c67f7bf40d
--- /dev/null
+++ b/layout/reftests/bugs/1050788-1.html
@@ -0,0 +1,34 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function doTest() {
+ var c = document.getElementById('c');
+ var ctx = c.getContext('2d');
+
+ ctx.transform(1, 0, 0, 1, 0.5, 0.5);
+
+ ctx.moveTo(0,0);
+ ctx.lineTo(100,0);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(0,100);
+ ctx.closePath();
+
+ ctx.moveTo(0,0);
+ ctx.lineTo(100,0);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(0,100);
+ ctx.closePath();
+
+ ctx.clip('evenodd');
+
+ ctx.fillStyle = 'red';
+ ctx.fillRect(0,0,400,400);
+
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</head>
+<body onload="doTest()">
+ <canvas id="c" width="400" height="400"></canvas>
+</body>
+</body></html>
diff --git a/layout/reftests/bugs/1053035-1-flex.html b/layout/reftests/bugs/1053035-1-flex.html
new file mode 100644
index 0000000000..5ab6b8fcd0
--- /dev/null
+++ b/layout/reftests/bugs/1053035-1-flex.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ display: flex;
+ background: yellow;
+ overflow: scroll;
+ border: 1px solid black;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1053035-1-grid.html b/layout/reftests/bugs/1053035-1-grid.html
new file mode 100644
index 0000000000..4d01c3ff7f
--- /dev/null
+++ b/layout/reftests/bugs/1053035-1-grid.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ display: grid;
+ background: yellow;
+ overflow: scroll;
+ border: 1px solid black;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1053035-1-ref.html b/layout/reftests/bugs/1053035-1-ref.html
new file mode 100644
index 0000000000..27e1ec066b
--- /dev/null
+++ b/layout/reftests/bugs/1053035-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ display: block;
+ background: yellow;
+ overflow: scroll;
+ border: 1px solid black;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1059167-1-ref.html b/layout/reftests/bugs/1059167-1-ref.html
new file mode 100644
index 0000000000..74404ce94e
--- /dev/null
+++ b/layout/reftests/bugs/1059167-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>bug 1059167</title>
+ <style type="text/css">
+ body {
+ width: 200px;
+ height: 200px;
+ border: 1px solid black;
+ }
+
+ .item {
+ width: 100px;
+ margin-left: 80px;
+ padding: 1rem;
+ background: red;
+ box-sizing: border-box;
+ }
+
+ p {
+ background: blue;
+ }
+ </style>
+</head>
+<body>
+ <div class="item"><p>Content</p></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1059167-1.html b/layout/reftests/bugs/1059167-1.html
new file mode 100644
index 0000000000..f2a6210cd4
--- /dev/null
+++ b/layout/reftests/bugs/1059167-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>bug 1059167</title>
+ <style type="text/css">
+ body {
+ width: 200px;
+ height: 200px;
+ border: 1px solid black;
+ }
+
+ .item {
+ width: 100px;
+ margin-right: 20px;
+ padding: 1rem;
+ background: red;
+ box-sizing: border-box;
+ float:right;
+ }
+
+ p {
+ background: blue;
+ }
+ </style>
+</head>
+<body>
+ <div class="item"><p>Content</p></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1059498-1-ref.html b/layout/reftests/bugs/1059498-1-ref.html
new file mode 100644
index 0000000000..f7ece299c5
--- /dev/null
+++ b/layout/reftests/bugs/1059498-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+#result {
+ width: 100px;
+ height: 30px;
+ background-color: lime;
+}
+
+</style>
+
+<div id="result"></div>
diff --git a/layout/reftests/bugs/1059498-1.html b/layout/reftests/bugs/1059498-1.html
new file mode 100644
index 0000000000..4e3930bdbd
--- /dev/null
+++ b/layout/reftests/bugs/1059498-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+#filtered {
+ margin-top: -110px;
+ width: 100px;
+ height: 100px;
+ background-color: white;
+ filter: url(#filter);
+}
+
+</style>
+
+<div id="filtered"></div>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="objectBoundingBox"
+ x="0%" y="0%" width="100%" height="200%"
+ color-interpolation-filters="sRGB">
+ <feDropShadow stdDeviation="0" dx="0" dy="40" flood-color="lime"/>
+ </filter>
+ </defs>
+</svg>
diff --git a/layout/reftests/bugs/1059498-2.html b/layout/reftests/bugs/1059498-2.html
new file mode 100644
index 0000000000..f0bddaec92
--- /dev/null
+++ b/layout/reftests/bugs/1059498-2.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+#filtered {
+ margin-top: -110px;
+ margin-left: -10px;
+ width: 100px;
+ height: 100px;
+ background-color: white;
+ filter: url(#filter);
+}
+
+#transformed {
+ transform: translateX(10px);
+ width: 200px;
+}
+
+</style>
+
+<div id="transformed">
+ <div id="filtered"></div>
+</div>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="objectBoundingBox"
+ x="0%" y="0%" width="100%" height="200%"
+ color-interpolation-filters="sRGB">
+ <feDropShadow stdDeviation="0" dx="0" dy="40" flood-color="lime"/>
+ </filter>
+ </defs>
+</svg>
diff --git a/layout/reftests/bugs/1059498-3.html b/layout/reftests/bugs/1059498-3.html
new file mode 100644
index 0000000000..e287f53f65
--- /dev/null
+++ b/layout/reftests/bugs/1059498-3.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+#filtered {
+ margin-top: -150px;
+ margin-left: -10px;
+ width: 100px;
+ height: 100px;
+ background-color: white;
+ filter: url(#filter);
+ transform: translateY(40px);
+}
+
+#transformed {
+ transform: translateX(10px);
+ width: 200px;
+}
+
+</style>
+
+<div id="transformed">
+ <div id="filtered"></div>
+</div>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" filterUnits="objectBoundingBox"
+ x="0%" y="0%" width="100%" height="200%"
+ color-interpolation-filters="sRGB">
+ <feDropShadow stdDeviation="0" dx="0" dy="40" flood-color="lime"/>
+ </filter>
+ </defs>
+</svg>
diff --git a/layout/reftests/bugs/1062108-1-ref.html b/layout/reftests/bugs/1062108-1-ref.html
new file mode 100644
index 0000000000..8a45e122c5
--- /dev/null
+++ b/layout/reftests/bugs/1062108-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 1062108</title>
+<style>
+body {
+ font-family: "Droid Sans Mono", Monaco, monospace;
+ font-weight: bold;
+}
+</style>
+</head>
+<body>
+10 spaces: &quot;<span style="color:transparent">xxxxxxxxxx</span>&quot;
+</body>
+</html>
diff --git a/layout/reftests/bugs/1062108-1.html b/layout/reftests/bugs/1062108-1.html
new file mode 100644
index 0000000000..1f6b8f99fa
--- /dev/null
+++ b/layout/reftests/bugs/1062108-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 1062108</title>
+<style>
+body {
+ font-family: "Droid Sans Mono", Monaco, monospace;
+ font-weight: bold;
+}
+</style>
+</head>
+<body>
+10 spaces: &quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;
+</body>
+</html>
diff --git a/layout/reftests/bugs/1062792-1-ref.html b/layout/reftests/bugs/1062792-1-ref.html
new file mode 100644
index 0000000000..d7bceec3e6
--- /dev/null
+++ b/layout/reftests/bugs/1062792-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait" style="overflow: hidden;">
+<head>
+ <script>
+ function scroll() {
+ document.getElementById("thediv").scrollTop = 400;
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</head>
+<body onload="scroll();" style="overflow: hidden;">
+ <div style="background: white; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+ <div style="background: yellow; height: 10%;"></div>
+ <div style="overflow: scroll; height: 90%;"
+ id="thediv">
+ <div style="background: purple; height: 4000px;"><div style="height: 500px; width: 100px; background: orange;"></div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1062792-1.html b/layout/reftests/bugs/1062792-1.html
new file mode 100644
index 0000000000..bba1791877
--- /dev/null
+++ b/layout/reftests/bugs/1062792-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll class="reftest-wait" style="overflow: hidden;">
+<head>
+ <script>
+ function scroll() {
+ document.getElementById("thediv").scrollTop = 400;
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</head>
+<body onload="scroll();" style="overflow: hidden;">
+ <div style="background: white; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+ <div style="background: yellow; height: 10%;"></div>
+ <div reftest-displayport-x="0" reftest-displayport-y="-300"
+ reftest-displayport-w="800" reftest-displayport-h="2000"
+ style="overflow: scroll; height: 90%;"
+ id="thediv">
+ <div style="background: purple; height: 4000px;"><div style="height: 500px; width: 100px; background: orange;"></div></div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1066554-1-ref.html b/layout/reftests/bugs/1066554-1-ref.html
new file mode 100644
index 0000000000..53af2f3202
--- /dev/null
+++ b/layout/reftests/bugs/1066554-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<title>Test for bug 1066554 - Shadow DOM loads SVG stylesheets as needed</title>
+<body>
+ <svg width="50px" height="10px">
+ <switch>
+ <foreignObject width="50px" height="50px">
+ <div style="width: 100px; height: 10px; background: red;"></div>
+ </foreignObject>
+ </switch>
+ </svg>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1066554-1.html b/layout/reftests/bugs/1066554-1.html
new file mode 100644
index 0000000000..8b23a5988b
--- /dev/null
+++ b/layout/reftests/bugs/1066554-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Test for bug 1066554 - Shadow DOM loads SVG stylesheets as needed</title>
+<body>
+ <div id="x"></div>
+ <script>
+ function insertShadowSVG() {
+ var x = document.getElementById("x");
+ x.attachShadow({ mode: "open" });
+ x.shadowRoot.innerHTML =
+ '<svg width="50px" height="10px"> \
+ <switch> \
+ <foreignObject width="50px" height="50px"> \
+ <div style="width: 100px; height: 10px; background: red;"></div> \
+ </foreignObject> \
+ </switch> \
+ </svg>';
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", insertShadowSVG);
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1069716-1-ref.html b/layout/reftests/bugs/1069716-1-ref.html
new file mode 100644
index 0000000000..e2ed8da169
--- /dev/null
+++ b/layout/reftests/bugs/1069716-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf8">
+<style type="text/css">
+ @counter-style triangle { symbols: b; }
+ @counter-style disc { system: extends triangle; }
+</style>
+</head>
+<body>
+ <ul><li>&lt;---That should be a 'b' character.
diff --git a/layout/reftests/bugs/1069716-1.html b/layout/reftests/bugs/1069716-1.html
new file mode 100644
index 0000000000..2615a1f01e
--- /dev/null
+++ b/layout/reftests/bugs/1069716-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf8">
+<script>
+ function go() {
+ var styleNode = document.createElement("style");
+ styleNode.textContent =
+ "@counter-style triangle { symbols: b; } \n" +
+ "@counter-style disc { system: extends triangle; } \n";
+
+ // NOTE: The bug goes away if you remove this trivial rule:
+ styleNode.textContent += "ul {}";
+
+ document.getElementsByTagName("head")[0].appendChild(styleNode);
+ }
+</script>
+</head>
+<body onload="go()">
+ <ul><li>&lt;---That should be a 'b' character.
diff --git a/layout/reftests/bugs/1078262-1.html b/layout/reftests/bugs/1078262-1.html
new file mode 100644
index 0000000000..eb3e06719b
--- /dev/null
+++ b/layout/reftests/bugs/1078262-1.html
@@ -0,0 +1,34 @@
+<!-- Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1078262</title>
+
+<style>
+#outer {
+ perspective: 10000px;
+ width: 200px;
+ height: 4000px;
+ margin-top: -3800px;
+ background: red;
+ box-shadow: inset 0 0 0 2px white;
+}
+#inner {
+ width: 200px;
+ height: 4000px;
+ background: white;
+ box-sizing: border-box;
+ border: 1px solid white;
+ transform-origin: 50% 100% 0;
+ animation: active-rotation 5s linear infinite;
+}
+@keyframes active-rotation {
+ from { transform: rotateX(10.01deg); }
+ to { transform: rotateX(10.00deg); }
+}
+</style>
+
+<div id="outer">
+ <div id="inner"></div>
+</div>
diff --git a/layout/reftests/bugs/1081072-1-ref.html b/layout/reftests/bugs/1081072-1-ref.html
new file mode 100644
index 0000000000..672084911a
--- /dev/null
+++ b/layout/reftests/bugs/1081072-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .container {
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="container">
+ <div>T</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1081072-1.html b/layout/reftests/bugs/1081072-1.html
new file mode 100644
index 0000000000..59b1a83549
--- /dev/null
+++ b/layout/reftests/bugs/1081072-1.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <!-- NOTE: This bug was triggered by scrollbar opacity-fading, so this
+ testcase needs to be loaded with this pref...
+ layout.testing.overlay-scrollbars.always-visible
+ ...set to *false* in order to have a chance to trigger the bug.
+
+ We don't have to worry about this producing any screenshots of
+ unpredictable partially-faded-scrollbars in our reftest snapshot,
+ because our scrollbars don't actually paint here, since the
+ scrollable element has "overflow:auto" and doesn't overflow
+ (because it's auto-sized to fit its content). -->
+ <style>
+ .container {
+ display: flex;
+ overflow-y: auto;
+ border: 1px solid black;
+ }
+ </style>
+ <script type='text/javascript'>
+ window.addEventListener("MozReftestInvalidate", startTest);
+
+ function startTest() {
+ // NOTE: setTimeout in tests is evil, but it's necessary here -- we need
+ // to wait until the scrollbars have finished fading, and there's no
+ // event we can listen for to signal that, AFAIK. Fortunately, there
+ // shouldn't be *visible* scrollbars in this testcase, so even if our
+ // setTimeout fires too early/late, the test will still pass. (So, there
+ // shouldn't be spurious failures; any failures that happen will be real.)
+ setTimeout(endTest, 800);
+ }
+
+ function endTest() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</head>
+<body>
+ <div class="container">
+ <div>T</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1081185-1-ref.html b/layout/reftests/bugs/1081185-1-ref.html
new file mode 100644
index 0000000000..44f12dc2a0
--- /dev/null
+++ b/layout/reftests/bugs/1081185-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ margin-top:100px;
+ opacity:0.5;
+}
+
+.container {
+ width: 120px;
+ height: 120px;
+ perspective: 100px;
+}
+
+.bottom {
+ width: 120px;
+ height: 120px;
+ position: absolute;
+ background-color: rgba(255,0,255,1);
+ transform: translateZ(60px) translateY(120px) rotateX(-90deg);
+ transform-origin: left top;
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div class="bottom"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1081185-1.html b/layout/reftests/bugs/1081185-1.html
new file mode 100644
index 0000000000..36b7b76966
--- /dev/null
+++ b/layout/reftests/bugs/1081185-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ margin-top:100px;
+ opacity:0.5;
+}
+
+.container {
+ width: 120px;
+ height: 120px;
+ perspective: 100px;
+ transform-style: preserve-3d;
+}
+
+.bottom {
+ width: 120px;
+ height: 120px;
+ position: absolute;
+ background-color: rgba(255,0,255,1);
+ transform: translateZ(60px) translateY(120px) rotateX(-90deg);
+ transform-origin: left top;
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div class="bottom"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/109735-1-ref.html b/layout/reftests/bugs/109735-1-ref.html
new file mode 100644
index 0000000000..85e08d5bc1
--- /dev/null
+++ b/layout/reftests/bugs/109735-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=x-sjis">
+ <title>x-sjis overlap</title>
+ </head>
+ <body>
+This is some regular old text
+This is some text in an anchor
+ </body>
+</html>
diff --git a/layout/reftests/bugs/109735-1.html b/layout/reftests/bugs/109735-1.html
new file mode 100644
index 0000000000..55f227d9f2
--- /dev/null
+++ b/layout/reftests/bugs/109735-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=x-sjis">
+ <title>x-sjis overlap</title>
+ </head>
+ <body>
+This is some regular old text
+<a>This is some text in an anchor</a>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1097437-1-ref.html b/layout/reftests/bugs/1097437-1-ref.html
new file mode 100644
index 0000000000..1317f162bf
--- /dev/null
+++ b/layout/reftests/bugs/1097437-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<style>
+body { background-color: white; }
+#outer
+{
+ width: 100px; height: 100px;
+ padding: 1px;
+ background-color: black;
+}
+#inner
+{
+ width: 100px; height:100px;
+ background-color: white;
+}
+</style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/1097437-1.html b/layout/reftests/bugs/1097437-1.html
new file mode 100644
index 0000000000..953213cb5d
--- /dev/null
+++ b/layout/reftests/bugs/1097437-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+body { background-color: white; }
+#outer
+{
+ width: 100px; height: 100px;
+ border: 1px solid black;
+}
+</style>
+</head>
+<body>
+<div id="outer"></div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/1098266-1-ref.html b/layout/reftests/bugs/1098266-1-ref.html
new file mode 100644
index 0000000000..dfde561df2
--- /dev/null
+++ b/layout/reftests/bugs/1098266-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="position: absolute; transform-style: preserve-3d; transform: perspective(600px) scale(0.166667); opacity:0.3">
+ <div style="position: absolute; background: yellow; width:900px; height:100px; transform: translate3d(0, 3000px, 0px) rotateZ(90deg) scale(5); transform-style: preserve-3d;">
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1098266-1.html b/layout/reftests/bugs/1098266-1.html
new file mode 100644
index 0000000000..2261f8ed0d
--- /dev/null
+++ b/layout/reftests/bugs/1098266-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="position: absolute; transform-style: preserve-3d; transform: perspective(600px) scale(0.166667); ">
+ <div style="position: absolute; background: yellow; width:900px; height:100px; transform: translate3d(0, 3000px, 0px) rotateZ(90deg) scale(5); transform-style: preserve-3d; opacity:0.3">
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1103258-1-ref.html b/layout/reftests/bugs/1103258-1-ref.html
new file mode 100644
index 0000000000..96d79e14fa
--- /dev/null
+++ b/layout/reftests/bugs/1103258-1-ref.html
@@ -0,0 +1,13 @@
+<style>
+#d1 {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ will-change: transform;
+ width: 64px;
+ height: 64px;
+ background: red;
+}
+</style>
+<div id="d1">
+</div>
diff --git a/layout/reftests/bugs/1103258-1.html b/layout/reftests/bugs/1103258-1.html
new file mode 100644
index 0000000000..7e16b110e0
--- /dev/null
+++ b/layout/reftests/bugs/1103258-1.html
@@ -0,0 +1,37 @@
+<style>
+#d1 {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ will-change: transform;
+ width: 64px;
+ height: 64px;
+ background: red;
+}
+#d2 {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ will-change: opacity;
+ opacity: 0.5;
+ width: 32px;
+ height: 32px;
+ background:blue;
+}
+#d3 {
+ will-change: transform;
+}
+#d4 {
+ will-change: transform;
+}
+</style>
+<div id="d2">
+ <div id="d3">
+ sadf
+ </div>
+ <div id="d4">
+ sdf
+ </div>
+</div>
+<div id="d1">
+</div>
diff --git a/layout/reftests/bugs/1105137-1-ref.html b/layout/reftests/bugs/1105137-1-ref.html
new file mode 100644
index 0000000000..f28110cac0
--- /dev/null
+++ b/layout/reftests/bugs/1105137-1-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+*.float {
+ float: right;
+ margin-left: 1em;
+}
+
+p {
+ direction:rtl;
+}
+ </style>
+ </head>
+ <body>
+ <div dir="rtl">
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <div class="float">
+ <img src="foo" width="240" height="180">
+ </div>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla </p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1105137-1.html b/layout/reftests/bugs/1105137-1.html
new file mode 100644
index 0000000000..f9eb38a78a
--- /dev/null
+++ b/layout/reftests/bugs/1105137-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+*.float {
+ float: right;
+ margin-left: 1em;
+}
+
+p {
+ direction:rtl;
+}
+ </style>
+ </head>
+ <body>
+ <div dir="ltr">
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <div class="float">
+ <img src="foo" width="240" height="180" dir="rtl">
+ </div>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla </p>
+ <p>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
+ bla bla bla </p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1111753-1.html b/layout/reftests/bugs/1111753-1.html
new file mode 100644
index 0000000000..2b5f267fe2
--- /dev/null
+++ b/layout/reftests/bugs/1111753-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+#d2 {
+ opacity:0;
+ transition:all 0.2s;
+ position:absolute;
+}
+#d2.active {
+ opacity:1;
+}
+#image {
+ position:fixed;
+ width:100%;
+ height:100%;
+ background:blue;
+ left:0;
+ top:0;
+}
+</style>
+</head>
+<body>
+ <div id="d2" class="active">
+ <div id="image"></div>
+ <h2>ABCDEFG</h2>
+ </div>
+<script>
+function doTest() {
+ d2.addEventListener("transitionend", function() {
+ document.documentElement.removeAttribute("class");
+ });
+ d2.classList.toggle("active");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1114526-1-ref.html b/layout/reftests/bugs/1114526-1-ref.html
new file mode 100644
index 0000000000..eaca3f49fd
--- /dev/null
+++ b/layout/reftests/bugs/1114526-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1114526-1.gif b/layout/reftests/bugs/1114526-1.gif
new file mode 100644
index 0000000000..137ed6d804
--- /dev/null
+++ b/layout/reftests/bugs/1114526-1.gif
Binary files differ
diff --git a/layout/reftests/bugs/1114526-1.html b/layout/reftests/bugs/1114526-1.html
new file mode 100644
index 0000000000..abadec0792
--- /dev/null
+++ b/layout/reftests/bugs/1114526-1.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+var startPaintCount = 0;
+function doTest() {
+ startPaintCount = window.windowUtils.paintCount;
+ document.querySelector('#src').style.visibility='visible';
+ document.querySelector('#dest').style.visibility='visible';
+ setTimeout(check, 200);
+}
+var calls = 0;
+function check() {
+ calls++;
+ if ((window.windowUtils.paintCount - startPaintCount) > 3) {
+ finishSuccess();
+ return;
+ }
+ if (calls > 10) {
+ finishFail();
+ return;
+ }
+ setTimeout(check, 200);
+}
+function finishSuccess() {
+ cleanup();
+ document.documentElement.className = "";
+}
+function finishFail() {
+ cleanup();
+ document.body.appendChild(document.createTextNode("FAIL FAIL FAIL"));
+ document.documentElement.className = "";
+}
+function cleanup() {
+ var src = document.getElementById("src");
+ var dest = document.getElementById("dest");
+ src.remove();
+ dest.remove();
+}
+</script>
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+}
+
+#src {
+ background-image: url('1114526-1.gif');
+ top: -500px;
+ visibility: hidden;
+}
+
+#dest {
+ background-image: -moz-element(#src);
+ top: 100px;
+ visibility: hidden;
+}
+</style>
+</head>
+<body>
+ <div id="src"></div>
+ <div id="dest"></div>
+<script>
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1116480-1-fakeitalic-overflow-ref.html b/layout/reftests/bugs/1116480-1-fakeitalic-overflow-ref.html
new file mode 100644
index 0000000000..fc85134c54
--- /dev/null
+++ b/layout/reftests/bugs/1116480-1-fakeitalic-overflow-ref.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+ }
+
+ body {
+ font-family: test;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>aI&#x301;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1116480-1-fakeitalic-overflow.html b/layout/reftests/bugs/1116480-1-fakeitalic-overflow.html
new file mode 100644
index 0000000000..0b48da3b4a
--- /dev/null
+++ b/layout/reftests/bugs/1116480-1-fakeitalic-overflow.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+ }
+
+ body {
+ font-family: test;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>a&#x202e;I&#x301;&#x202c;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1119117-1-ref.html b/layout/reftests/bugs/1119117-1-ref.html
new file mode 100644
index 0000000000..b33ff7ff03
--- /dev/null
+++ b/layout/reftests/bugs/1119117-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#image {
+ position:fixed;
+ opacity:0.50196078431;
+ left:0;
+ top:0;
+ width:100%;
+ height:100%;
+ background:blue;
+}
+</style>
+</head>
+<body>
+ <div id="image"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1119117-1a.html b/layout/reftests/bugs/1119117-1a.html
new file mode 100644
index 0000000000..4615141050
--- /dev/null
+++ b/layout/reftests/bugs/1119117-1a.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#d1 {
+ overflow:hidden;
+ height:0;
+}
+#d2 {
+ opacity:0.50196078431;
+}
+#d3 {
+ position:absolute;
+ left:0;
+ top:0;
+ width:100%;
+ height:100%;
+ background:blue;
+}
+</style>
+</head>
+<body>
+<div id="d1">
+ <div id="d2">
+ <div id="d3"></div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1119117-1b.html b/layout/reftests/bugs/1119117-1b.html
new file mode 100644
index 0000000000..86befd1c6b
--- /dev/null
+++ b/layout/reftests/bugs/1119117-1b.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#d1 {
+ overflow:hidden;
+ height:0;
+}
+#d2 {
+ opacity:0.50196078431;
+}
+#image {
+ position:fixed;
+ left:0;
+ top:0;
+ width:100%;
+ height:100%;
+ background:blue;
+}
+</style>
+</head>
+<body>
+ <div id="d1">
+ <div id="d2" class="active">
+ <div id="image"></div>
+ <h2>ABCDEFG</h2>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1120431-1-ref.html b/layout/reftests/bugs/1120431-1-ref.html
new file mode 100644
index 0000000000..079cf80131
--- /dev/null
+++ b/layout/reftests/bugs/1120431-1-ref.html
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <style>
+ .container-ext {
+ padding-left: 180px;
+ padding-right: 180px;
+ }
+
+ .headline {
+ line-height: 30px;
+ text-shadow: 1px 1px rgba(255, 255, 255, 0.3);
+ }
+
+ ul {
+ list-style: none;
+ }
+
+ .headline-left {
+ left: 30px;
+ }
+
+ .headline-right {
+ top: 20px !important;
+ /*bottom:370px !important;*/
+ right: 20px;
+ }
+
+ .headline-active {
+ position: fixed;
+ top: 100px;
+ }
+
+ .list-author:before,
+ .list-author:after {
+ content: "\200e";
+ display: table;
+ }
+ .list-author:after {
+ clear: both;
+ }
+
+ .list-author-vocal {
+ float: left;
+ margin-right: 10px;
+ }
+
+ .ff { position: fixed; }
+ </style>
+ </head>
+ <body>
+ <div class="container-ext">
+
+ <div class="headline headline-left headline-active">
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ A
+ </li>
+ <li class="list-author-vocal">
+ B
+ </li>
+ <li class="list-author-vocal">
+ C
+ </li>
+ <li class="list-author-vocal">
+ D
+ </li>
+ <li class="list-author-vocal">
+ E
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ F
+ </li>
+ <li class="list-author-vocal">
+ G
+ </li>
+ <li class="list-author-vocal">
+ H
+ </li>
+ <li class="list-author-vocal">
+ I
+ </li>
+ <li class="list-author-vocal">
+ J
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ K
+ </li>
+ <li class="list-author-vocal">
+ L
+ </li>
+ <li class="list-author-vocal">
+ M
+ </li>
+ <li class="list-author-vocal">
+ N
+ </li>
+ <li class="list-author-vocal">
+ O
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal active">
+ P
+ </li>
+ <li class="list-author-vocal">
+ R
+ </li>
+ <li class="list-author-vocal">
+ S
+ </li>
+ <li class="list-author-vocal">
+ T
+ </li>
+ <li class="list-author-vocal">
+ V
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ W
+ </li>
+ <li class="list-author-vocal">
+ Y
+ </li>
+ <li class="list-author-vocal">
+ Z
+ </li>
+ </ul>
+<div class="ff" style="left: 69px; top: 115px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 145px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 161px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 191px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 237px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 253px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 283px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 299px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 329px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 345px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 352px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 382px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 412px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 442px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 465px; width: 3px; height: 3px; background: blue;"></div>
+
+ <ul class="list-author">
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ </ul>
+ </div> <!-- headline headline-left headline-active -->
+
+ <div style="position:relative;">
+ <div style="height: 4000px; background: red;">
+ </div>
+ </div>
+ </div> <!-- container-ext -->
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1120431-1.html b/layout/reftests/bugs/1120431-1.html
new file mode 100644
index 0000000000..36deaa7af0
--- /dev/null
+++ b/layout/reftests/bugs/1120431-1.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <style>
+ .container-ext {
+ padding-left: 180px;
+ padding-right: 180px;
+ }
+
+ .headline {
+ line-height: 30px;
+ text-shadow: 1px 1px rgba(255, 255, 255, 0.3);
+ }
+
+ ul {
+ list-style: none;
+ }
+
+ .headline-left {
+ left: 30px;
+ }
+
+ .headline-right {
+ top: 20px !important;
+ /*bottom:370px !important;*/
+ right: 20px;
+ }
+
+ .headline-active {
+ position: fixed;
+ top: 100px;
+ }
+
+ .list-author:before,
+ .list-author:after {
+ content: "\200e";
+ display: table;
+ }
+ .list-author:after {
+ clear: both;
+ }
+
+ .list-author-vocal {
+ float: left;
+ margin-right: 10px;
+ }
+
+ .ff { position: fixed; }
+ </style>
+ </head>
+ <body>
+ <div class="container-ext">
+
+ <div class="headline headline-left headline-active">
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ A
+ </li>
+ <li class="list-author-vocal">
+ B
+ </li>
+ <li class="list-author-vocal">
+ C
+ </li>
+ <li class="list-author-vocal">
+ D
+ </li>
+ <li class="list-author-vocal">
+ E
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ F
+ </li>
+ <li class="list-author-vocal">
+ G
+ </li>
+ <li class="list-author-vocal">
+ H
+ </li>
+ <li class="list-author-vocal">
+ I
+ </li>
+ <li class="list-author-vocal">
+ J
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ K
+ </li>
+ <li class="list-author-vocal">
+ L
+ </li>
+ <li class="list-author-vocal">
+ M
+ </li>
+ <li class="list-author-vocal">
+ N
+ </li>
+ <li class="list-author-vocal">
+ O
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal active">
+ P
+ </li>
+ <li class="list-author-vocal">
+ R
+ </li>
+ <li class="list-author-vocal">
+ S
+ </li>
+ <li class="list-author-vocal">
+ T
+ </li>
+ <li class="list-author-vocal">
+ V
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ W
+ </li>
+ <li class="list-author-vocal">
+ Y
+ </li>
+ <li class="list-author-vocal">
+ Z
+ </li>
+ </ul>
+<div class="ff" style="left: 69px; top: 115px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 145px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 161px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 191px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 237px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 253px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 283px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 299px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 329px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 345px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 352px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 382px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 412px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 442px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 465px; width: 3px; height: 3px; background: blue;"></div>
+
+ <ul class="list-author">
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ </ul>
+ </div> <!-- headline headline-left headline-active -->
+ <div class="headline headline-right headline-active">
+ ­<!--&#x200e;f--><div style="width: 2px; height: 2px; background: white;"></div>
+ </div>
+
+ <div style="position:relative;">
+ <div style="height: 4000px; background: red;">
+ </div>
+ </div>
+ </div> <!-- container-ext -->
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1120431-2-ref.html b/layout/reftests/bugs/1120431-2-ref.html
new file mode 100644
index 0000000000..567eb471de
--- /dev/null
+++ b/layout/reftests/bugs/1120431-2-ref.html
@@ -0,0 +1,204 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <style>
+ .container-ext {
+ padding-left: 180px;
+ padding-right: 180px;
+ }
+
+ .headline {
+ line-height: 30px;
+ text-shadow: 1px 1px rgba(255, 255, 255, 0.3);
+ }
+
+ ul {
+ list-style: none;
+ }
+
+ .headline-left {
+ left: 30px;
+ }
+
+ .headline-right {
+ top: 20px !important;
+ /*bottom:370px !important;*/
+ right: 20px;
+ }
+
+ .headline-active {
+ position: fixed;
+ top: 100px;
+ }
+
+ .list-author:before,
+ .list-author:after {
+ content: "\200e";
+ display: table;
+ }
+ .list-author:after {
+ clear: both;
+ }
+
+ .list-author-vocal {
+ float: left;
+ margin-right: 10px;
+ }
+
+ .ff { position: fixed; }
+ </style>
+ </head>
+ <body>
+ <div class="container-ext">
+
+ <div class="headline headline-left headline-active">
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ A
+ </li>
+ <li class="list-author-vocal">
+ B
+ </li>
+ <li class="list-author-vocal">
+ C
+ </li>
+ <li class="list-author-vocal">
+ D
+ </li>
+ <li class="list-author-vocal">
+ E
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ F
+ </li>
+ <li class="list-author-vocal">
+ G
+ </li>
+ <li class="list-author-vocal">
+ H
+ </li>
+ <li class="list-author-vocal">
+ I
+ </li>
+ <li class="list-author-vocal">
+ J
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ K
+ </li>
+ <li class="list-author-vocal">
+ L
+ </li>
+ <li class="list-author-vocal">
+ M
+ </li>
+ <li class="list-author-vocal">
+ N
+ </li>
+ <li class="list-author-vocal">
+ O
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal active">
+ P
+ </li>
+ <li class="list-author-vocal">
+ R
+ </li>
+ <li class="list-author-vocal">
+ S
+ </li>
+ <li class="list-author-vocal">
+ T
+ </li>
+ <li class="list-author-vocal">
+ V
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ W
+ </li>
+ <li class="list-author-vocal">
+ Y
+ </li>
+ <li class="list-author-vocal">
+ Z
+ </li>
+ </ul>
+<div class="ff" style="left: 69px; top: 115px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 145px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 161px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 191px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 237px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 253px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 283px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 299px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 329px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 345px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 352px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 382px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 412px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 442px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 465px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 469px; width: 3px; height: 3px; background: blue;"></div><!-- only needed after whitespace opt -->
+<div class="ff" style="left: 69px; top: 473px; width: 3px; height: 3px; background: blue;"></div><!-- only needed after whitespace opt -->
+
+ <ul class="list-author">
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ </ul>
+ </div> <!-- headline headline-left headline-active -->
+
+ <div style="position:relative;">
+ <div style="height: 4000px; background: red;">
+ </div>
+ </div>
+ </div> <!-- container-ext -->
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1120431-2.html b/layout/reftests/bugs/1120431-2.html
new file mode 100644
index 0000000000..01ea4076c2
--- /dev/null
+++ b/layout/reftests/bugs/1120431-2.html
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <style>
+ .container-ext {
+ padding-left: 180px;
+ padding-right: 180px;
+ }
+
+ .headline {
+ line-height: 30px;
+ text-shadow: 1px 1px rgba(255, 255, 255, 0.3);
+ }
+
+ ul {
+ list-style: none;
+ }
+
+ .headline-left {
+ left: 30px;
+ }
+
+ .headline-right {
+ top: 20px !important;
+ /*bottom:370px !important;*/
+ right: 20px;
+ }
+
+ .headline-active {
+ position: fixed;
+ top: 100px;
+ }
+
+ .list-author:before,
+ .list-author:after {
+ content: "\200e";
+ display: table;
+ }
+ .list-author:after {
+ clear: both;
+ }
+
+ .list-author-vocal {
+ float: left;
+ margin-right: 10px;
+ }
+
+ .ff { position: fixed; }
+ </style>
+ </head>
+ <body>
+ <div class="container-ext">
+
+ <div class="headline headline-left headline-active">
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ A
+ </li>
+ <li class="list-author-vocal">
+ B
+ </li>
+ <li class="list-author-vocal">
+ C
+ </li>
+ <li class="list-author-vocal">
+ D
+ </li>
+ <li class="list-author-vocal">
+ E
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ F
+ </li>
+ <li class="list-author-vocal">
+ G
+ </li>
+ <li class="list-author-vocal">
+ H
+ </li>
+ <li class="list-author-vocal">
+ I
+ </li>
+ <li class="list-author-vocal">
+ J
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ K
+ </li>
+ <li class="list-author-vocal">
+ L
+ </li>
+ <li class="list-author-vocal">
+ M
+ </li>
+ <li class="list-author-vocal">
+ N
+ </li>
+ <li class="list-author-vocal">
+ O
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal active">
+ P
+ </li>
+ <li class="list-author-vocal">
+ R
+ </li>
+ <li class="list-author-vocal">
+ S
+ </li>
+ <li class="list-author-vocal">
+ T
+ </li>
+ <li class="list-author-vocal">
+ V
+ </li>
+ </ul>
+ <ul class="list-author">
+ <li class="list-author-vocal">
+ W
+ </li>
+ <li class="list-author-vocal">
+ Y
+ </li>
+ <li class="list-author-vocal">
+ Z
+ </li>
+ </ul>
+<div class="ff" style="left: 69px; top: 115px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 173px; top: 115px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 145px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 161px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 162px; top: 161px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 191px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 177px; top: 207px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 237px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 253px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 168px; top: 253px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 283px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 299px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 135px; top: 299px; width: 4px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 329px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 345px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 352px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 382px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 412px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 68px; top: 442px; width: 41px; height: 19px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 465px; width: 3px; height: 3px; background: blue;"></div>
+<div class="ff" style="left: 69px; top: 469px; width: 3px; height: 3px; background: blue;"></div><!-- only needed after whitespace opt -->
+<div class="ff" style="left: 69px; top: 473px; width: 3px; height: 3px; background: blue;"></div><!-- only needed after whitespace opt -->
+
+ <ul class="list-author">
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ <li>
+ Word
+ </li>
+ </ul>
+ </div> <!-- headline headline-left headline-active -->
+ <div class="headline headline-right headline-active">
+ ­<!--&#x200e;f--><div style="width: 2px; height: 2px; background: white;"></div>
+ </div>
+
+ <div style="position:relative;">
+ <div style="height: 4000px; background: red;">
+ </div>
+ </div>
+ </div> <!-- container-ext -->
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1121748-1-ref.html b/layout/reftests/bugs/1121748-1-ref.html
new file mode 100644
index 0000000000..cb14610700
--- /dev/null
+++ b/layout/reftests/bugs/1121748-1-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Bug 1121748-1</title>
+ <meta charset=utf-8>
+ <style>
+ html { width: 25%; }
+ ul {
+ margin: 0;
+ padding: 0;
+ border: 1px solid green;
+ }
+ ul li {
+ position: relative;
+ margin: 2px 10px;
+ background: #eee;
+ display: block;
+ }
+ </style>
+ <script>
+ function test() {
+ document.body.dir = 'rtl';
+ }
+ </script>
+</head>
+<body onload="test()">
+ <ul>
+ <li> item #1 </li>
+ <li> item #2 </li>
+ <li> item #3 </li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1121748-1.html b/layout/reftests/bugs/1121748-1.html
new file mode 100644
index 0000000000..85c81a5636
--- /dev/null
+++ b/layout/reftests/bugs/1121748-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Bug 1121748-1</title>
+ <meta charset=utf-8>
+ <style>
+ html { width: 25%; }
+ ul {
+ margin: 0;
+ padding: 0;
+ border: 1px solid green;
+ }
+ ul li {
+ position: relative;
+ margin: 2px 10px;
+ background: #eee;
+ display: block;
+ }
+ ul li[hidden] {
+ display: none;
+ }
+ </style>
+ <script>
+ function test() {
+ document.body.dir = 'rtl';
+ document.querySelector('#test').offsetHeight;
+ document.querySelector('#test').hidden = false;
+ }
+ </script>
+</head>
+<body onload="test()">
+ <ul>
+ <li id="test" hidden> item #1 </li>
+ <li> item #2 </li>
+ <li> item #3 </li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1121748-2-ref.html b/layout/reftests/bugs/1121748-2-ref.html
new file mode 100644
index 0000000000..782bafaf4e
--- /dev/null
+++ b/layout/reftests/bugs/1121748-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ border: 1px solid gray;
+}
+img {
+ direction: rtl;
+}
+.statusbar {
+ height: 26px;
+ background: #eef;
+}
+#test1 {
+ border: 1px solid red;
+}
+#test2 {
+ border: 1px solid green;
+}
+</style>
+</head>
+<body onload="test1()">
+<div>
+ <div class="statusbar">
+ <img src="bar" id="test2"><img src="foo" id="test1">
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1121748-2.html b/layout/reftests/bugs/1121748-2.html
new file mode 100644
index 0000000000..1fa31215de
--- /dev/null
+++ b/layout/reftests/bugs/1121748-2.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ border: 1px solid gray;
+}
+.statusbar {
+ height: 26px;
+ background: #eef;
+ display: flex;
+ justify-content: flex-end;
+}
+#test1 {
+ border: 1px solid red;
+}
+#test2 {
+ border: 1px solid green;
+}
+</style>
+<script>
+function test1() {
+ document.querySelector('#test1').hidden = false;
+ document.querySelector('#test2').hidden = false;
+}
+</script>
+</head>
+<body onload="test1()">
+<div dir="rtl">
+ <div class="statusbar">
+ <img src="foo" id="test1" hidden>
+ <img src="bar" id="test2" hidden>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1127107-1-ref.html b/layout/reftests/bugs/1127107-1-ref.html
new file mode 100644
index 0000000000..15eefedb76
--- /dev/null
+++ b/layout/reftests/bugs/1127107-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div.test {
+ /* Author expects this to prevent wrapping, and may add
+ "overflow:hidden;text-overflow:ellipsis" for nice effect: */
+ white-space: nowrap;
+
+ width: 200px;
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="test">
+ Does this text wrap? Does this text wrap? Does this text wrap?
+ Does this text wrap?
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127107-1a-nowrap.html b/layout/reftests/bugs/1127107-1a-nowrap.html
new file mode 100644
index 0000000000..0dcf27d0a1
--- /dev/null
+++ b/layout/reftests/bugs/1127107-1a-nowrap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div.test {
+ /* Author expects this to prevent wrapping, and may add
+ "overflow:hidden;text-overflow:ellipsis" for nice effect: */
+ white-space: nowrap;
+
+ /* BUT these (combined) seem to allow wrapping: */
+ -ms-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+ word-break: break-all;
+
+ width: 200px;
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="test">
+ Does this text wrap? Does this text wrap? Does this text wrap?
+ Does this text wrap?
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127107-1b-pre.html b/layout/reftests/bugs/1127107-1b-pre.html
new file mode 100644
index 0000000000..334ce24b21
--- /dev/null
+++ b/layout/reftests/bugs/1127107-1b-pre.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div.test {
+ /* Author expects this to prevent wrapping, and may add
+ "overflow:hidden;text-overflow:ellipsis" for nice effect: */
+ white-space: pre;
+
+ /* BUT these (combined) seem to allow wrapping: */
+ -ms-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+ word-break: break-all;
+
+ width: 200px;
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="test">Does this text wrap? Does this text wrap? Does this text wrap? Does this text wrap?</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127107-2-capitalize-ref.html b/layout/reftests/bugs/1127107-2-capitalize-ref.html
new file mode 100644
index 0000000000..89856c81c0
--- /dev/null
+++ b/layout/reftests/bugs/1127107-2-capitalize-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div.test {
+ /* Author expects this to prevent wrapping, and may add
+ "overflow:hidden;text-overflow:ellipsis" for nice effect: */
+ white-space: nowrap;
+
+ width: 200px;
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="test">
+ Does This Text Wrap? Does This Text Wrap? Does This Text Wrap?
+ Does This Text Wrap?
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127107-2-capitalize.html b/layout/reftests/bugs/1127107-2-capitalize.html
new file mode 100644
index 0000000000..a0ed3f9700
--- /dev/null
+++ b/layout/reftests/bugs/1127107-2-capitalize.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div.test {
+ /* Author expects this to prevent wrapping, and may add
+ "overflow:hidden;text-overflow:ellipsis" for nice effect: */
+ white-space: nowrap;
+
+ /* BUT these (combined) seem to allow wrapping: */
+ text-transform: capitalize;
+ word-break: break-all;
+
+ width: 200px;
+ border: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+ <div class="test">
+ Does this text wrap? Does this text wrap? Does this text wrap?
+ Does this text wrap?
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127679-1a-inline-flex-relpos.html b/layout/reftests/bugs/1127679-1a-inline-flex-relpos.html
new file mode 100644
index 0000000000..9c95e98a1a
--- /dev/null
+++ b/layout/reftests/bugs/1127679-1a-inline-flex-relpos.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<style>
+div {
+ border: 1px solid blue;
+ padding: 5px;
+}
+span {
+ margin: 0 15px;
+ border: 1px solid green;
+ position: relative;
+ top: 5px;
+ left: 10px;
+}
+</style>
+<body>
+<!-- the dir attributes on the spans here should not affect their positioning -->
+<div style="display: inline-flex;"><span dir=rtl>foo</span><span dir=ltr>bar</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1127679-1b-inline-flex-relpos.html b/layout/reftests/bugs/1127679-1b-inline-flex-relpos.html
new file mode 100644
index 0000000000..8cdf14b57c
--- /dev/null
+++ b/layout/reftests/bugs/1127679-1b-inline-flex-relpos.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<style>
+div {
+ border: 1px solid blue;
+ padding: 5px;
+}
+span {
+ margin: 0 15px;
+ border: 1px solid green;
+ position: relative;
+ top: 5px;
+ left: 10px;
+}
+</style>
+<body>
+<!-- the dir attributes on the spans here should not affect their positioning -->
+<div style="display: inline-flex;"><span dir=ltr>foo</span><span dir=rtl>bar</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1128354-1-ref.html b/layout/reftests/bugs/1128354-1-ref.html
new file mode 100644
index 0000000000..e2f9759dab
--- /dev/null
+++ b/layout/reftests/bugs/1128354-1-ref.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ .flexVert {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .flexIntermediateHoriz {
+ display: flex;
+ }
+
+ .flexInnerHoriz {
+ display: flex;
+ /* In this reference case, we make the inner elements be auto-height
+ * and aligned to the main-axis start side ("align-self:flex-start").
+ * That's how the corresponding piece of the testcase should render,
+ * given its "height: [unresolvable percent]" and implicit
+ * "align-self: stretch". */
+ align-self: flex-start;
+ background: pink;
+ }
+ .height50pct {
+ align-self: flex-start;
+ background: brown;
+ }
+ .height0pct {
+ align-self: flex-start;
+ background: yellow;
+ }
+ .spacer {
+ background: lightblue;
+ height: 200px;
+ width: 50px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="flexVert">
+ <div class="flexIntermediateHoriz">
+ <div class="flexInnerHoriz">text</div>
+ <div class="height50pct">fifty</div>
+ <div class="height0pct">zero</div>
+ <div class="spacer"></div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1128354-1.html b/layout/reftests/bugs/1128354-1.html
new file mode 100644
index 0000000000..7c6dc87272
--- /dev/null
+++ b/layout/reftests/bugs/1128354-1.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ .flexVert {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .flexIntermediateHoriz {
+ display: flex;
+ }
+
+ .flexInnerHoriz {
+ display: flex;
+ /* This percent should not be resolvable, because our parent's
+ * height is indefinite (because our parent is a flex item with an
+ * indefinite flex basis, in an indefinite-main-sized flex container).
+ * So we just end up with our content height.
+ */
+ height: 100%;
+ background: pink;
+ }
+ .height50pct {
+ /* This percent should not be resolvable, for the same reason as above.
+ */
+ height: 50%;
+ background: brown;
+ }
+ .height0pct {
+ /* This percent should not be resolvable, for the same reason as above.
+ */
+ height: 0%;
+ background: yellow;
+ }
+ .spacer {
+ background: lightblue;
+ height: 200px;
+ width: 50px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="flexVert">
+ <div class="flexIntermediateHoriz">
+ <div class="flexInnerHoriz">text</div>
+ <div class="height50pct">fifty</div>
+ <div class="height0pct">zero</div>
+ <div class="spacer"></div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1130231-1-button-padding-rtl-ref.html b/layout/reftests/bugs/1130231-1-button-padding-rtl-ref.html
new file mode 100644
index 0000000000..29dbf5d0b6
--- /dev/null
+++ b/layout/reftests/bugs/1130231-1-button-padding-rtl-ref.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Bug 1130231</title>
+ <style type="text/css">
+ div {
+ width: 300px;
+ height: 50px;
+ border: 1px solid blue;
+ margin: 10px;
+ padding: 2px;
+ }
+ .inner {
+ padding-left: 100px;
+ padding-right: 50px;
+ border: 5px solid black;
+ border-left: 20px solid red;
+ border-right: 10px solid green;
+ }
+ </style>
+</head>
+<html>
+<body>
+<div dir=rtl style="text-align:left">
+ <button class="inner">|button|</button>
+</div>
+<div style="text-align:right">
+ <button class="inner">|button|</button>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1130231-1-button-padding-rtl.html b/layout/reftests/bugs/1130231-1-button-padding-rtl.html
new file mode 100644
index 0000000000..2783af0548
--- /dev/null
+++ b/layout/reftests/bugs/1130231-1-button-padding-rtl.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Bug 1130231</title>
+ <style type="text/css">
+ div {
+ width: 300px;
+ height: 50px;
+ border: 1px solid blue;
+ margin: 10px;
+ padding: 2px;
+ }
+ .inner {
+ padding-left: 100px;
+ padding-right: 50px;
+ border: 5px solid black;
+ border-left: 20px solid red;
+ border-right: 10px solid green;
+ }
+ </style>
+</head>
+<html>
+<body>
+<div>
+ <button class="inner">|button|</button>
+</div>
+<div dir=rtl>
+ <button class="inner">|button|</button>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1130231-2-button-padding-rtl-ref.html b/layout/reftests/bugs/1130231-2-button-padding-rtl-ref.html
new file mode 100644
index 0000000000..2b7b24c661
--- /dev/null
+++ b/layout/reftests/bugs/1130231-2-button-padding-rtl-ref.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Bug 1130231</title>
+ <style type="text/css">
+ div {
+ width: 300px;
+ height: 50px;
+ border: 1px solid blue;
+ margin: 10px;
+ padding: 2px;
+ }
+ .inner {
+ padding-left: 100px;
+ padding-right: 50px;
+ border: 5px solid black;
+ border-left: 20px solid red;
+ border-right: 10px solid green;
+ }
+ .right {
+ padding-right: 100px;
+ padding-left: 50px;
+ }
+ </style>
+</head>
+<html>
+<body>
+<div>
+ <button class="inner">|button|</button>
+</div>
+<div style="text-align:right">
+ <button class="inner right">|button|</button>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1130231-2-button-padding-rtl.html b/layout/reftests/bugs/1130231-2-button-padding-rtl.html
new file mode 100644
index 0000000000..4050d2383a
--- /dev/null
+++ b/layout/reftests/bugs/1130231-2-button-padding-rtl.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Bug 1130231</title>
+ <style type="text/css">
+ div {
+ width: 300px;
+ height: 50px;
+ border: 1px solid blue;
+ margin: 10px;
+ padding: 2px;
+ }
+ .inner {
+ padding-inline-start: 100px;
+ padding-inline-end: 50px;
+ border: 5px solid black;
+ border-left: 20px solid red;
+ border-right: 10px solid green;
+ }
+ </style>
+</head>
+<html>
+<body>
+<div>
+ <button class="inner">|button|</button>
+</div>
+<div dir=rtl>
+ <button class="inner">|button|</button>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1133905-1-h-rtl.html b/layout/reftests/bugs/1133905-1-h-rtl.html
new file mode 100644
index 0000000000..bc53a95cad
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-h.html b/layout/reftests/bugs/1133905-1-h.html
new file mode 100644
index 0000000000..b7d476e3af
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-rtl.html b/layout/reftests/bugs/1133905-1-rtl.html
new file mode 100644
index 0000000000..d3b3e64371
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-v-rtl.html b/layout/reftests/bugs/1133905-1-v-rtl.html
new file mode 100644
index 0000000000..1ebb54b4cf
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 8228px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-v.html b/layout/reftests/bugs/1133905-1-v.html
new file mode 100644
index 0000000000..ab19f5663f
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+</head>
+<body>
+<div style="height: 8228px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-vh-rtl.html b/layout/reftests/bugs/1133905-1-vh-rtl.html
new file mode 100644
index 0000000000..3a7a68a3fd
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-vh-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.25">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 80000px; width: 36000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1-vh.html b/layout/reftests/bugs/1133905-1-vh.html
new file mode 100644
index 0000000000..7da1ff68f6
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.25">
+</head>
+<body>
+<div style="height: 80000px; width: 36000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-1.html b/layout/reftests/bugs/1133905-1.html
new file mode 100644
index 0000000000..d8c8044631
--- /dev/null
+++ b/layout/reftests/bugs/1133905-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=325">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-h-rtl.html b/layout/reftests/bugs/1133905-2-h-rtl.html
new file mode 100644
index 0000000000..1065e88e03
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=225">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-h.html b/layout/reftests/bugs/1133905-2-h.html
new file mode 100644
index 0000000000..2adabe6cf8
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=225">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-rtl.html b/layout/reftests/bugs/1133905-2-rtl.html
new file mode 100644
index 0000000000..94e12fa70b
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=225">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-v-rtl.html b/layout/reftests/bugs/1133905-2-v-rtl.html
new file mode 100644
index 0000000000..4752999f79
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=125">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 4787px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-v.html b/layout/reftests/bugs/1133905-2-v.html
new file mode 100644
index 0000000000..036b449565
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=125">
+</head>
+<body>
+<div style="height: 4787px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-vh-rtl.html b/layout/reftests/bugs/1133905-2-vh-rtl.html
new file mode 100644
index 0000000000..93aa778d33
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-vh-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.5">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 40000px; width: 18000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2-vh.html b/layout/reftests/bugs/1133905-2-vh.html
new file mode 100644
index 0000000000..6a8fd759e6
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.5">
+</head>
+<body>
+<div style="height: 40000px; width: 18000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-2.html b/layout/reftests/bugs/1133905-2.html
new file mode 100644
index 0000000000..471501d7e3
--- /dev/null
+++ b/layout/reftests/bugs/1133905-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=225">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-h-rtl.html b/layout/reftests/bugs/1133905-3-h-rtl.html
new file mode 100644
index 0000000000..ca60b948bb
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-h.html b/layout/reftests/bugs/1133905-3-h.html
new file mode 100644
index 0000000000..82d8583942
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-rtl.html b/layout/reftests/bugs/1133905-3-rtl.html
new file mode 100644
index 0000000000..8d4976e69f
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-v-rtl.html b/layout/reftests/bugs/1133905-3-v-rtl.html
new file mode 100644
index 0000000000..ef03d4ea9e
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 13972px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-v.html b/layout/reftests/bugs/1133905-3-v.html
new file mode 100644
index 0000000000..4a9b03df16
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+</head>
+<body>
+<div style="height: 13972px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-vh-rtl.html b/layout/reftests/bugs/1133905-3-vh-rtl.html
new file mode 100644
index 0000000000..74941cc74f
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-vh-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.75">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 26667px; width: 12000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3-vh.html b/layout/reftests/bugs/1133905-3-vh.html
new file mode 100644
index 0000000000..e420bc0ad9
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=0.75">
+</head>
+<body>
+<div style="height: 26667px; width: 12000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-3.html b/layout/reftests/bugs/1133905-3.html
new file mode 100644
index 0000000000..244f0a505d
--- /dev/null
+++ b/layout/reftests/bugs/1133905-3.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=525">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-h-rtl.html b/layout/reftests/bugs/1133905-4-h-rtl.html
new file mode 100644
index 0000000000..ca2609c989
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-h.html b/layout/reftests/bugs/1133905-4-h.html
new file mode 100644
index 0000000000..1de1436259
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-rtl.html b/layout/reftests/bugs/1133905-4-rtl.html
new file mode 100644
index 0000000000..badae3b37e
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-v-rtl.html b/layout/reftests/bugs/1133905-4-v-rtl.html
new file mode 100644
index 0000000000..b3264e4acf
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 20000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-v.html b/layout/reftests/bugs/1133905-4-v.html
new file mode 100644
index 0000000000..00100b7db8
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+<div style="height: 20000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-vh-rtl.html b/layout/reftests/bugs/1133905-4-vh-rtl.html
new file mode 100644
index 0000000000..7bd79bab4f
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-vh-rtl.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<meta name="viewport" content="initial-scale=1.25">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 16000px; width: 7200px;"></div>
+<script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ // The zooming due to the initial-scale will not preserve the default
+ // scroll position (top right corner) for an RTL scroll frame, so
+ // scroll to it explicitly.
+ window.scrollTo(scrollMaxX, 0);
+ document.documentElement.className = "";
+ });
+</script>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4-vh.html b/layout/reftests/bugs/1133905-4-vh.html
new file mode 100644
index 0000000000..25a2b77417
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=1.25">
+</head>
+<body>
+<div style="height: 16000px; width: 7200px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-4.html b/layout/reftests/bugs/1133905-4.html
new file mode 100644
index 0000000000..f4f1398077
--- /dev/null
+++ b/layout/reftests/bugs/1133905-4.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-h-rtl.html b/layout/reftests/bugs/1133905-5-h-rtl.html
new file mode 100644
index 0000000000..494456d7df
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-h.html b/layout/reftests/bugs/1133905-5-h.html
new file mode 100644
index 0000000000..a5199516d3
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-rtl.html b/layout/reftests/bugs/1133905-5-rtl.html
new file mode 100644
index 0000000000..5125d8d13a
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-v-rtl.html b/layout/reftests/bugs/1133905-5-v-rtl.html
new file mode 100644
index 0000000000..b4cb88f3be
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 26117px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-v.html b/layout/reftests/bugs/1133905-5-v.html
new file mode 100644
index 0000000000..fdacf664f8
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+</head>
+<body>
+<div style="height: 26117px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-vh-rtl.html b/layout/reftests/bugs/1133905-5-vh-rtl.html
new file mode 100644
index 0000000000..216e261236
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-vh-rtl.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<meta name="viewport" content="initial-scale=1.5">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 13333px; width: 6000px;"></div>
+<script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ // The zooming due to the initial-scale will not preserve the default
+ // scroll position (top right corner) for an RTL scroll frame, so
+ // scroll to it explicitly.
+ window.scrollTo(scrollMaxX, 0);
+ document.documentElement.className = "";
+ });
+</script>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5-vh.html b/layout/reftests/bugs/1133905-5-vh.html
new file mode 100644
index 0000000000..c9a468be49
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=1.5">
+</head>
+<body>
+<div style="height: 13333px; width: 6000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-5.html b/layout/reftests/bugs/1133905-5.html
new file mode 100644
index 0000000000..5b8c41983a
--- /dev/null
+++ b/layout/reftests/bugs/1133905-5.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=925">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-h-rtl.html b/layout/reftests/bugs/1133905-6-h-rtl.html
new file mode 100644
index 0000000000..a391dfb54a
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-h.html b/layout/reftests/bugs/1133905-6-h.html
new file mode 100644
index 0000000000..4d097f9e49
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-rtl.html b/layout/reftests/bugs/1133905-6-rtl.html
new file mode 100644
index 0000000000..60babfcf40
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-v-rtl.html b/layout/reftests/bugs/1133905-6-v-rtl.html
new file mode 100644
index 0000000000..e7b477aaa5
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 37412px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-v.html b/layout/reftests/bugs/1133905-6-v.html
new file mode 100644
index 0000000000..56398e3c29
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+</head>
+<body>
+<div style="height: 37412px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-vh-rtl.html b/layout/reftests/bugs/1133905-6-vh-rtl.html
new file mode 100644
index 0000000000..412f7ece4d
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-vh-rtl.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<meta name="viewport" content="initial-scale=2.0">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 10000px; width: 4500px;"></div>
+<script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ // The zooming due to the initial-scale will not preserve the default
+ // scroll position (top right corner) for an RTL scroll frame, so
+ // scroll to it explicitly.
+ window.scrollTo(scrollMaxX, 0);
+ document.documentElement.className = "";
+ });
+</script>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6-vh.html b/layout/reftests/bugs/1133905-6-vh.html
new file mode 100644
index 0000000000..c4bfbaaf10
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=2.0">
+</head>
+<body>
+<div style="height: 10000px; width: 4500px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-6.html b/layout/reftests/bugs/1133905-6.html
new file mode 100644
index 0000000000..867e9b0828
--- /dev/null
+++ b/layout/reftests/bugs/1133905-6.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=1325">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-h-rtl.html b/layout/reftests/bugs/1133905-ref-h-rtl.html
new file mode 100644
index 0000000000..ca2609c989
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-h-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-h.html b/layout/reftests/bugs/1133905-ref-h.html
new file mode 100644
index 0000000000..1de1436259
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-h.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+<div style="width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-rtl.html b/layout/reftests/bugs/1133905-ref-rtl.html
new file mode 100644
index 0000000000..badae3b37e
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-rtl.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-v-rtl.html b/layout/reftests/bugs/1133905-ref-v-rtl.html
new file mode 100644
index 0000000000..b3264e4acf
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-v-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 20000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-v.html b/layout/reftests/bugs/1133905-ref-v.html
new file mode 100644
index 0000000000..00100b7db8
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-v.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+<div style="height: 20000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-vh-rtl.html b/layout/reftests/bugs/1133905-ref-vh-rtl.html
new file mode 100644
index 0000000000..ebb02aa939
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-vh-rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=1.0">
+<style> html { direction: rtl; } </style>
+</head>
+<body>
+<div style="height: 20000px; width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref-vh.html b/layout/reftests/bugs/1133905-ref-vh.html
new file mode 100644
index 0000000000..0b71ec3620
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref-vh.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="initial-scale=1">
+</head>
+<body>
+<div style="height: 20000px; width: 9000px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1133905-ref.html b/layout/reftests/bugs/1133905-ref.html
new file mode 100644
index 0000000000..f4f1398077
--- /dev/null
+++ b/layout/reftests/bugs/1133905-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta name="viewport" content="width=725">
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1149304-1-transform-change-ref.html b/layout/reftests/bugs/1149304-1-transform-change-ref.html
new file mode 100644
index 0000000000..52214ac420
--- /dev/null
+++ b/layout/reftests/bugs/1149304-1-transform-change-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<style>
+ body { transform:translateY(10px); white-space: pre; }
+ p { margin: 0; }
+ span { padding: 2px; color: red; background: blue; }
+</style>
+</head>
+<body><p> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> &nbsp; &nbsp; </p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1149304-1-transform-change.html b/layout/reftests/bugs/1149304-1-transform-change.html
new file mode 100644
index 0000000000..7eb2e5dcd2
--- /dev/null
+++ b/layout/reftests/bugs/1149304-1-transform-change.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<style>
+ body { transform:translateY(100px); white-space: pre; }
+ p { margin: 0; }
+ span { padding: 2px; color: red; background: blue; }
+</style>
+<script>
+function test(n) {
+ document.body.style.transform = "translateY(" + n + "px)";
+ if (n > 10) {
+ setTimeout("test(" + (n - 10) + ")", 0);
+ } else {
+ document.documentElement.removeAttribute("class");
+ }
+}
+</script>
+</head>
+<body onload="test(100)"><p> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> &nbsp; &nbsp; </p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1151145-1-ref.html b/layout/reftests/bugs/1151145-1-ref.html
new file mode 100644
index 0000000000..239b416d55
--- /dev/null
+++ b/layout/reftests/bugs/1151145-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<title>Reference for test for bug 1151145</title>
+
+<div style="height: 300px"></div>
+
+<div style="width: 33em; border: solid white; transform: translate(100px) rotate(20deg);"></div>
+
+<div style="height: 1000px"></div>
+
diff --git a/layout/reftests/bugs/1151145-1.html b/layout/reftests/bugs/1151145-1.html
new file mode 100644
index 0000000000..a5f0617019
--- /dev/null
+++ b/layout/reftests/bugs/1151145-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<title>Test for bug 1151145</title>
+
+<div style="height: 300px"></div>
+
+<div style="width: 33em; border: solid white; transform: translate(100px) rotate(20deg);"></div>
+
+<div style="height: 1000px"></div>
+
+<script>
+
+function doTest() {
+ document.documentElement.scrollTop = 0;
+ document.documentElement.removeAttribute("class");
+}
+
+document.documentElement.scrollTop = 255;
+window.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
diff --git a/layout/reftests/bugs/1151306-1-ref.html b/layout/reftests/bugs/1151306-1-ref.html
new file mode 100644
index 0000000000..06889060c8
--- /dev/null
+++ b/layout/reftests/bugs/1151306-1-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>The div should have a white filling.</title>
+
+<style>
+
+html, body {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ background-color: white;
+}
+
+body {
+ padding: 10px;
+}
+
+div {
+ width: 50px;
+ height: 50px;
+ box-sizing: border-box;
+ border: 1px solid black;
+}
+
+</style>
+
+<div></div>
diff --git a/layout/reftests/bugs/1151306-1.html b/layout/reftests/bugs/1151306-1.html
new file mode 100644
index 0000000000..c23fc9ce30
--- /dev/null
+++ b/layout/reftests/bugs/1151306-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>The div shouldn't pull the html element's background color through the body background. There should be no red on this page.</title>
+
+<style>
+
+html, body {
+ margin: 0;
+ padding: 0;
+ height: 100%;
+}
+
+html {
+ background-color: red;
+}
+
+body {
+ transform: translateX(0.1px);
+ background-color: white;
+ box-sizing: border-box;
+ padding: 10px;
+}
+
+div {
+ position: relative;
+ width: 50px;
+ height: 50px;
+ box-sizing: border-box;
+ border: 1px solid black;
+ animation: leftFrom0To100 steps(1,end) 20000s alternate infinite;
+}
+
+@keyframes leftFrom0To100 {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+
+</style>
+
+<div></div>
diff --git a/layout/reftests/bugs/1153845-1-ref.html b/layout/reftests/bugs/1153845-1-ref.html
new file mode 100644
index 0000000000..fcf6221c95
--- /dev/null
+++ b/layout/reftests/bugs/1153845-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>There should be a 200x200 lime square on this page.</title>
+
+<style>
+
+svg {
+ width: 200px;
+ height: 200px;
+ background-color: lime;
+}
+
+</style>
+
+<svg></svg>
diff --git a/layout/reftests/bugs/1153845-1.html b/layout/reftests/bugs/1153845-1.html
new file mode 100644
index 0000000000..aeacbe08fc
--- /dev/null
+++ b/layout/reftests/bugs/1153845-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>There should be a 200x200 lime square on this page.</title>
+
+<style>
+
+svg {
+ width: 200px;
+ height: 200px;
+ background-color: lime;
+ filter: brightness(100%);
+}
+
+</style>
+
+<svg></svg>
diff --git a/layout/reftests/bugs/1155828-1-ref.html b/layout/reftests/bugs/1155828-1-ref.html
new file mode 100644
index 0000000000..66bfea56c4
--- /dev/null
+++ b/layout/reftests/bugs/1155828-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style type="text/css">
+#rear {
+ width: 500px;
+ height: 1500px;
+ box-shadow: 0 0 71px #667;
+ display: block;
+}
+</style>
+<script>
+document.documentElement.scrollTop = 0;
+
+function doTest() {
+ document.documentElement.scrollTop = 108;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<div id="rear"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1155828-1.html b/layout/reftests/bugs/1155828-1.html
new file mode 100644
index 0000000000..8eaefd2b2d
--- /dev/null
+++ b/layout/reftests/bugs/1155828-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Scrolling shouldn't cause gaps in the shadow</title>
+<style type="text/css">
+#rear {
+ width: 500px;
+ height: 1500px;
+ box-shadow: 0 0 71px #667;
+ display: block;
+}
+</style>
+
+<div id="rear"></div>
+
+<script>
+
+function doTest() {
+ document.documentElement.scrollTop = 108;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+
+document.documentElement.scrollTop = 112;
+
+</script>
diff --git a/layout/reftests/bugs/1156129-1-ref.html b/layout/reftests/bugs/1156129-1-ref.html
new file mode 100644
index 0000000000..461fea3538
--- /dev/null
+++ b/layout/reftests/bugs/1156129-1-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<title>The bounds calculation for border display items needs to take the border radius into account</title>
+
+<style>
+
+div {
+ margin: 10px;
+ height: 100px;
+ width: 100px;
+ box-sizing: border-box;
+ border-radius: 50px;
+}
+
+#one {
+ border-top: 10px solid blue;
+}
+
+#two {
+ border-top: 1px solid blue;
+ opacity: 0.5;
+ border-bottom: 1px solid white;
+}
+
+#three {
+ border-top: 1px solid blue;
+ mix-blend-mode: overlay;
+ border-bottom: 1px solid white;
+}
+
+</style>
+
+<div id="one"></div>
+<div id="two"></div>
+<div id="three"></div>
diff --git a/layout/reftests/bugs/1156129-1.html b/layout/reftests/bugs/1156129-1.html
new file mode 100644
index 0000000000..58f82fe4f5
--- /dev/null
+++ b/layout/reftests/bugs/1156129-1.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>The bounds calculation for border display items needs to take the border radius into account</title>
+
+<style>
+
+div {
+ margin: 10px;
+ height: 100px;
+ width: 100px;
+ box-sizing: border-box;
+ border-radius: 50px;
+}
+
+#one {
+ border-top: 30px solid blue;
+}
+
+#two {
+ border-top: 1px solid blue;
+ opacity: 0.5;
+}
+
+#three {
+ border-top: 1px solid blue;
+ mix-blend-mode: overlay;
+}
+
+</style>
+
+<div id="one"></div>
+<div id="two"></div>
+<div id="three"></div>
+
+<script>
+
+window.addEventListener("MozReftestInvalidate", function (e) {
+ document.getElementById("one").style.borderTopWidth = "10px";
+
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
diff --git a/layout/reftests/bugs/1157127-1-ref.html b/layout/reftests/bugs/1157127-1-ref.html
new file mode 100644
index 0000000000..9b03f139b7
--- /dev/null
+++ b/layout/reftests/bugs/1157127-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<body>
+ <script>
+ var ifr = document.createElement("iframe");
+ ifr.src = "1157127-subframe.xml";
+ document.body.appendChild(ifr);
+
+ var doc = ifr.contentDocument;
+ var div = doc.createElement("div");
+ div.style.resize = "both";
+ div.style.overflow = "scroll";
+ doc.body.appendChild(div);
+ div.offsetWidth;
+ </script>
+</body>
diff --git a/layout/reftests/bugs/1157127-1.html b/layout/reftests/bugs/1157127-1.html
new file mode 100644
index 0000000000..b1104c74ee
--- /dev/null
+++ b/layout/reftests/bugs/1157127-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<body>
+ <script>
+ document.domain = document.domain;
+ var ifr = document.createElement("iframe");
+ ifr.src = "1157127-subframe.xml";
+ document.body.appendChild(ifr);
+
+ var doc = ifr.contentDocument;
+ var div = doc.createElement("div");
+ div.style.resize = "both";
+ div.style.overflow = "scroll";
+ doc.body.appendChild(div);
+ div.offsetWidth;
+ </script>
+</body>
diff --git a/layout/reftests/bugs/1157127-subframe.xml b/layout/reftests/bugs/1157127-subframe.xml
new file mode 100644
index 0000000000..f3f286eafc
--- /dev/null
+++ b/layout/reftests/bugs/1157127-subframe.xml
@@ -0,0 +1 @@
+<root/>
diff --git a/layout/reftests/bugs/116882-1-ref.html b/layout/reftests/bugs/116882-1-ref.html
new file mode 100644
index 0000000000..3c56813326
--- /dev/null
+++ b/layout/reftests/bugs/116882-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/REC-html401-19991224/strict.dtd">
+<html>
+ <head>
+ <title>Shift_JIS illegal sequences</title>
+ <meta HTTP-equiv="content-type" content="text/html; charset=shift_jis">
+ </head>
+ <body>
+ <p>&#xfffd;&#xfffd;&#xfffd;&#xfffd; &#xfffd;!&#xfffd;"&#xfffd;#&#xfffd;$&#xfffd;%&#xfffd;&amp;&#xfffd;'&#xfffd;(&#xfffd;)&#xfffd;*&#xfffd;+&#xfffd;,&#xfffd;-&#xfffd;.&#xfffd;/&#xfffd;0&#xfffd;1&#xfffd;2&#xfffd;3&#xfffd;4&#xfffd;5&#xfffd;6&#xfffd;7&#xfffd;8&#xfffd;9&#xfffd;:&#xfffd;;&#xfffd;&lt;&#xfffd;=&#xfffd;&gt;&#xfffd;?&#xfffd;</p>
+ <!-- See bug https://bugzilla.mozilla.org/show_bug.cgi?id=747762 for the discussion to overturn bug https://bugzilla.mozilla.org/show_bug.cgi?id=116882 -->
+ </body>
+</html>
diff --git a/layout/reftests/bugs/116882-1.html b/layout/reftests/bugs/116882-1.html
new file mode 100644
index 0000000000..8af8ad97d2
--- /dev/null
+++ b/layout/reftests/bugs/116882-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/REC-html401-19991224/strict.dtd">
+<html>
+ <head>
+ <title>Shift_JIS illegal sequences</title>
+ <meta HTTP-equiv="content-type" content="text/html; charset=shift_jis">
+ </head>
+ <body>
+ <p>ýþÿ !"#$%&'()*+,-./0123456789:;<=>?†¦</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1169331-1-ref.html b/layout/reftests/bugs/1169331-1-ref.html
new file mode 100644
index 0000000000..dce4740c60
--- /dev/null
+++ b/layout/reftests/bugs/1169331-1-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Rotated buffer with mask</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.outer {
+ padding: 50px;
+}
+
+.scrollbox {
+ width: 200px;
+ height: 200px;
+ overflow: auto;
+}
+
+.scrolled {
+ box-sizing: border-box;
+ border: 1px solid transparent;
+ height: 200px;
+}
+
+</style>
+
+<div class="outer">
+
+ <div class="scrollbox">
+ <div class="scrolled" style="background-color: blue;"></div>
+ <div class="scrolled" style="background-color: lime;"></div>
+ </div>
+
+</div>
+
+<script>
+
+var scrollbox = document.querySelector(".scrollbox");
+
+scrollbox.scrollTop = 199;
+
+</script>
+
diff --git a/layout/reftests/bugs/1169331-1.html b/layout/reftests/bugs/1169331-1.html
new file mode 100644
index 0000000000..319091ffbb
--- /dev/null
+++ b/layout/reftests/bugs/1169331-1.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Rotated buffer with mask</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.outer {
+ overflow: hidden;
+ border-radius: 10px;
+ padding: 50px;
+}
+
+.scrollbox {
+ width: 200px;
+ height: 200px;
+ overflow: auto;
+}
+
+.scrolled {
+ box-sizing: border-box;
+ border: 1px solid transparent;
+ height: 200px;
+}
+
+</style>
+
+<div class="outer">
+
+ <div class="scrollbox">
+ <div class="scrolled" style="background-color: blue;"></div>
+ <div class="scrolled" style="background-color: lime;"></div>
+ </div>
+
+</div>
+
+<script>
+
+var scrollbox = document.querySelector(".scrollbox");
+
+scrollbox.scrollTop = 1;
+scrollbox.scrollTop = 0;
+
+window.addEventListener("MozReftestInvalidate", function (e) {
+ scrollbox.scrollTop = 199;
+ document.documentElement.removeAttribute("class");
+});
+
+</script>
+
diff --git a/layout/reftests/bugs/1174332-1-ref.html b/layout/reftests/bugs/1174332-1-ref.html
new file mode 100644
index 0000000000..40e25c5122
--- /dev/null
+++ b/layout/reftests/bugs/1174332-1-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Testcase for filters on canvas</title>
+
+<style>
+
+#checkbox {
+ filter: url(#filter);
+}
+
+</style>
+
+<svg style="display: block; height: 0;">
+
+ <defs>
+ <filter id="filter" color-interpolation-filters="sRGB" x="-100%" y="-100%" width="300%" height="300%">
+ <feMorphology operator="dilate" radius="5" in="SourceAlpha" result="mask"/>
+ <feFlood flood-color="blue"/>
+ <feComposite operator="in" in2="mask"/>
+ <feMerge>
+ <feMergeNode/>
+ <feMergeNode in="SourceGraphic"/>
+ </feMerge>
+ </filter>
+ </defs>
+
+</svg>
+
+<input type="checkbox" id="checkbox">
+
+<script>
+
+document.getElementById("checkbox").focus();
+
+</script>
diff --git a/layout/reftests/bugs/1174332-1.html b/layout/reftests/bugs/1174332-1.html
new file mode 100644
index 0000000000..212d398ef7
--- /dev/null
+++ b/layout/reftests/bugs/1174332-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Testcase for filters on canvas</title>
+
+<style>
+
+#checkbox {
+ box-shadow: 0 0 0 5px blue;
+}
+
+</style>
+
+<input type="checkbox" id="checkbox">
+
+<script>
+
+document.getElementById("checkbox").focus();
+
+</script>
diff --git a/layout/reftests/bugs/1179078-1-ref.html b/layout/reftests/bugs/1179078-1-ref.html
new file mode 100644
index 0000000000..43851b345e
--- /dev/null
+++ b/layout/reftests/bugs/1179078-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+p {
+ border: 2px solid transparent;
+ border-image: linear-gradient(to right, orange, blue) 1 1;
+}
+</style>
+<p>This paragraph must have an orange/blue gradient border.</p>
diff --git a/layout/reftests/bugs/1179078-1.html b/layout/reftests/bugs/1179078-1.html
new file mode 100644
index 0000000000..fbda9a3705
--- /dev/null
+++ b/layout/reftests/bugs/1179078-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+p {
+ border: 2px solid transparent;
+ border-image: linear-gradient(to right, orange, blue) 1 1;
+ border-image: linear-gradient(to right, garbage) 1 1;
+}
+</style>
+<p>This paragraph must have an orange/blue gradient border.</p>
diff --git a/layout/reftests/bugs/1179288-1-ref.html b/layout/reftests/bugs/1179288-1-ref.html
new file mode 100644
index 0000000000..501d31c58f
--- /dev/null
+++ b/layout/reftests/bugs/1179288-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<body>
+<div style="position:absolute; left:0; top:0; width:100px; height:100px; background:lime"></div>
diff --git a/layout/reftests/bugs/1179288-1.html b/layout/reftests/bugs/1179288-1.html
new file mode 100644
index 0000000000..75728c4423
--- /dev/null
+++ b/layout/reftests/bugs/1179288-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<body>
+<div style="position:fixed; left:0; top:0">
+ <div style="position:absolute; z-index:2; left:0; top:0; width:100px; height:100px; background:red"></div>
+</div>
+<div style="position:absolute; z-index:1; left:0; top:0; width:100px; height:100px; background:lime"></div>
diff --git a/layout/reftests/bugs/1185266-1-ref.svg b/layout/reftests/bugs/1185266-1-ref.svg
new file mode 100644
index 0000000000..e1eaeb0b29
--- /dev/null
+++ b/layout/reftests/bugs/1185266-1-ref.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <style>
+ text { fill: url(#green); }
+ </style>
+ <linearGradient id="green">
+ <stop stop-color="green"/>
+ </linearGradient>
+ <text x="10" y="20">This text must be green.</text>
+</svg>
diff --git a/layout/reftests/bugs/1185266-1.svg b/layout/reftests/bugs/1185266-1.svg
new file mode 100644
index 0000000000..fb90ea2d38
--- /dev/null
+++ b/layout/reftests/bugs/1185266-1.svg
@@ -0,0 +1,23 @@
+<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait">
+ <style>
+ g { fill: url(#red); }
+ g.x { fill: url(#green); }
+ </style>
+ <linearGradient id="red">
+ <stop stop-color="red"/>
+ </linearGradient>
+ <linearGradient id="green">
+ <stop stop-color="green"/>
+ </linearGradient>
+ <g>
+ <text x="10" y="20">This text must be green.</text>
+ </g>
+ <script>
+ function run() {
+ var g = document.querySelector("g");
+ g.setAttribute("class", "x");
+ document.documentElement.removeAttribute("class");
+ }
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+</svg>
diff --git a/layout/reftests/bugs/1190635-1-ref.html b/layout/reftests/bugs/1190635-1-ref.html
new file mode 100644
index 0000000000..a42e82b0c6
--- /dev/null
+++ b/layout/reftests/bugs/1190635-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<body style="width:500px; border:2px solid black;">
+<div style="width:300px; height:300px; background:yellow; float:left;"></div>
+<div style="width:300px; height:400px;">
+ <span style="display:inline-block; outline:3px solid cyan">
+ <span style="display:inline-block; width:300px; height:100px; outline:5px solid red" id="d"></span>
+ </span>
+</div>
+</body>
diff --git a/layout/reftests/bugs/1190635-1.html b/layout/reftests/bugs/1190635-1.html
new file mode 100644
index 0000000000..c215543df6
--- /dev/null
+++ b/layout/reftests/bugs/1190635-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body style="width:500px; border:2px solid black;">
+<div style="width:300px; height:300px; background:yellow; float:left;"></div>
+<div style="width:300px; height:400px;">
+ <span style="display:inline-block; outline:3px solid cyan">
+ <span style="display:inline-block; width:0; height:0; outline:5px solid red" id="d"></span>
+ </span>
+</div>
+<script>
+window.addEventListener("MozReftestInvalidate", function() {
+ d.style.width = "300px";
+ d.style.height = "100px";
+ document.documentElement.removeAttribute("class");
+});
+</script>
+</body>
diff --git a/layout/reftests/bugs/1200611-1-ref.html b/layout/reftests/bugs/1200611-1-ref.html
new file mode 100644
index 0000000000..58e31396e2
--- /dev/null
+++ b/layout/reftests/bugs/1200611-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference: Make sure the ImageLayer is sized correctly when using object-fit</title>
+
+<style type="text/css">
+
+.clip {
+ display: inline-block;
+ overflow: hidden;
+}
+
+img {
+ will-change: transform;
+ margin: -64px 0;
+ display: block;
+}
+
+</style>
+
+<span class="clip">
+ <img src="repeatable-diagonal-gradient.png">
+</span>
diff --git a/layout/reftests/bugs/1200611-1.html b/layout/reftests/bugs/1200611-1.html
new file mode 100644
index 0000000000..c27a9debd8
--- /dev/null
+++ b/layout/reftests/bugs/1200611-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Make sure the ImageLayer is sized correctly when using object-fit</title>
+
+<style type="text/css">
+
+img {
+ object-fit: cover;
+ width: 256px;
+ height: 128px;
+ will-change: transform;
+}
+
+</style>
+
+<img src="repeatable-diagonal-gradient.png">
diff --git a/layout/reftests/bugs/1202512-1-ref.html b/layout/reftests/bugs/1202512-1-ref.html
new file mode 100644
index 0000000000..e182a9b5da
--- /dev/null
+++ b/layout/reftests/bugs/1202512-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p><span><i>hello</i></span></p>
diff --git a/layout/reftests/bugs/1202512-1.html b/layout/reftests/bugs/1202512-1.html
new file mode 100644
index 0000000000..3fe93aa10e
--- /dev/null
+++ b/layout/reftests/bugs/1202512-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<style>
+.x .y { background-color: red; }
+</style>
+<p class=x><span><i class=y>hello</i></span></p>
+<script>
+addEventListener("MozReftestInvalidate", function() {
+ document.querySelector("p").classList.toggle("x");
+ document.querySelector("i").classList.toggle("y");
+ document.documentElement.className = "";
+}, false);
+</script>
diff --git a/layout/reftests/bugs/1202512-2-ref.html b/layout/reftests/bugs/1202512-2-ref.html
new file mode 100644
index 0000000000..c0d5c8ebe2
--- /dev/null
+++ b/layout/reftests/bugs/1202512-2-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p><span><input required value=hello></input></span></p>
diff --git a/layout/reftests/bugs/1202512-2.html b/layout/reftests/bugs/1202512-2.html
new file mode 100644
index 0000000000..44a4125f8e
--- /dev/null
+++ b/layout/reftests/bugs/1202512-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<style>
+.x input:required { color: red; }
+</style>
+<p class=x><span><input required value=hello></input></span></p>
+<script>
+addEventListener("MozReftestInvalidate", function() {
+ document.querySelector("p").classList.toggle("x");
+ document.querySelector("input").required = false;
+ document.documentElement.className = "";
+}, false);
+</script>
diff --git a/layout/reftests/bugs/1207326-1.html b/layout/reftests/bugs/1207326-1.html
new file mode 100644
index 0000000000..91dfc0eb1d
--- /dev/null
+++ b/layout/reftests/bugs/1207326-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Testcase for bug 1207326</title>
+ <style>
+ .wrap1 {
+ position: absolute;
+ width: 600px;
+ height: 600px;
+ transform: perspective(500px) rotateY(6deg) scale(0.7, 0.7);
+ overflow: hidden;
+ }
+ .wrap2 {
+ position: relative;
+ margin-top: -300px;
+ margin-left: -300px;
+ }
+ .inner {
+ position: relative;
+ height: 100%;
+ background-color: purple;
+ will-change: transform;
+ }
+ .main {
+ overflow: hidden;
+ height: 100px;
+ width: 100px;
+ }
+ </style>
+</head>
+<body>
+ <div class="main">
+ <div class="wrap2">
+ <div class="wrap1">
+ <div class="inner">
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-1-ref.html b/layout/reftests/bugs/120834-1-ref.html
new file mode 100644
index 0000000000..37a46764db
--- /dev/null
+++ b/layout/reftests/bugs/120834-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+</style>
+
+<body>
+<span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-1a.html b/layout/reftests/bugs/120834-1a.html
new file mode 100644
index 0000000000..4a151edf30
--- /dev/null
+++ b/layout/reftests/bugs/120834-1a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+
+<body>
+<input checked="checked" id="foo"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2-ref.html b/layout/reftests/bugs/120834-2-ref.html
new file mode 100644
index 0000000000..5d6a911534
--- /dev/null
+++ b/layout/reftests/bugs/120834-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+</style>
+
+<body>
+<span>There should be no red</span>
+<span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2a.html b/layout/reftests/bugs/120834-2a.html
new file mode 100644
index 0000000000..9231678da7
--- /dev/null
+++ b/layout/reftests/bugs/120834-2a.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+input { display: none }
+</style>
+
+<body>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<input type="radio" checked="checked" id="foo"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2b.html b/layout/reftests/bugs/120834-2b.html
new file mode 100644
index 0000000000..aa348066ed
--- /dev/null
+++ b/layout/reftests/bugs/120834-2b.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").setAttribute("type", "checkbox");
+ document.getElementById("bar").setAttribute("type", "radio")'>
+<input checked="checked" id="foo"><span>There should be no red</span>
+<input checked="checked" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2c.html b/layout/reftests/bugs/120834-2c.html
new file mode 100644
index 0000000000..42b16ecf38
--- /dev/null
+++ b/layout/reftests/bugs/120834-2c.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").removeAttribute("checked");
+ document.getElementById("bar").removeAttribute("checked");'>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<input type="radio" checked="checked" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2d.html b/layout/reftests/bugs/120834-2d.html
new file mode 100644
index 0000000000..8650e8200c
--- /dev/null
+++ b/layout/reftests/bugs/120834-2d.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").removeAttribute("type");
+ document.getElementById("bar").removeAttribute("type");'>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<input type="radio" checked="checked" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2e.html b/layout/reftests/bugs/120834-2e.html
new file mode 100644
index 0000000000..652cf77a35
--- /dev/null
+++ b/layout/reftests/bugs/120834-2e.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").setAttribute("checked", "checked");
+ document.getElementById("bar").setAttribute("checked", "checked");'>
+<input type="checkbox" id="foo"><span>There should be no red</span>
+<input type="radio" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2f.html b/layout/reftests/bugs/120834-2f.html
new file mode 100644
index 0000000000..a70306b85f
--- /dev/null
+++ b/layout/reftests/bugs/120834-2f.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+[checked] + span { color: green }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").setAttribute("checked", "checked");
+ document.getElementById("bar").setAttribute("checked", "checked");'>
+<input type="checkbox" id="foo"><span>There should be no red</span>
+<input type="radio" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2g.html b/layout/reftests/bugs/120834-2g.html
new file mode 100644
index 0000000000..3bd53b1efe
--- /dev/null
+++ b/layout/reftests/bugs/120834-2g.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+[checked] + span { color: red ! important }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").checked = true;
+ document.getElementById("bar").checked = true;'>
+<input type="checkbox" id="foo"><span>There should be no red</span>
+<input type="radio" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2h.html b/layout/reftests/bugs/120834-2h.html
new file mode 100644
index 0000000000..01e24d4822
--- /dev/null
+++ b/layout/reftests/bugs/120834-2h.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").checked = false;
+ document.getElementById("bar").checked = false;'>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<input type="radio" checked="checked" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2i.html b/layout/reftests/bugs/120834-2i.html
new file mode 100644
index 0000000000..45f954ff06
--- /dev/null
+++ b/layout/reftests/bugs/120834-2i.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+[checked]:checked + span { color: green }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").setAttribute("checked", "checked");
+ document.getElementById("bar").setAttribute("checked", "checked");'>
+<input type="checkbox" id="foo"><span>There should be no red</span>
+<input type="radio" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/120834-2j.html b/layout/reftests/bugs/120834-2j.html
new file mode 100644
index 0000000000..1e00474108
--- /dev/null
+++ b/layout/reftests/bugs/120834-2j.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+[checked]:checked + span { color: red }
+input { display: none }
+</style>
+
+<body onload='document.getElementById("foo").removeAttribute("checked");
+ document.getElementById("bar").removeAttribute("checked");'>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<input type="radio" checked="checked" id="bar"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1209603-1-ref.html b/layout/reftests/bugs/1209603-1-ref.html
new file mode 100644
index 0000000000..a2eacedbc6
--- /dev/null
+++ b/layout/reftests/bugs/1209603-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 1209603</title>
+<style>
+
+p {
+ margin: 1em 0;
+}
+
+</style>
+
+<p style="font-size: 40px">Should be 40px font size.</p>
+
+<p style="font-size: 20px">Should be 20px font size.</p>
diff --git a/layout/reftests/bugs/1209603-1.html b/layout/reftests/bugs/1209603-1.html
new file mode 100644
index 0000000000..2d606f1377
--- /dev/null
+++ b/layout/reftests/bugs/1209603-1.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 1209603</title>
+<style>
+
+p {
+ font-size: 2em;
+
+ /* ensure font-size dependency in the margin struct; this is also in
+ the UA style sheet, but repeated here for clarity */
+ margin: 1em 0;
+}
+
+</style>
+
+<div style="font-size: 20px"><p id="a">Should be 40px font size.</p></div>
+
+<script>
+
+var a = document.getElementById("a");
+
+// force computation of the margin struct on A (caching in rule tree)
+getComputedStyle(a, "").marginTop;
+
+</script>
+
+<!-- will dynamically change font-size to 10px later;
+ also needs to be different from 20px now to avoid sibling-sharing -->
+<div style="font-size: 30px"><p id="b">Should be 20px font size.</p></div>
+
+<script>
+// Note that A and B share rule nodes, and note that the margin struct
+// has been conditionally (on font size) cached on their shared rule node.
+var b = document.getElementById("b");
+
+// force ComputedStyle construction and computation of the font struct on
+// B's parent
+getComputedStyle(b.parentNode, "").fontSize;
+
+// force ComputedStyle construction (and computation of the color
+// struct) on B, but not the margin struct or font struct
+getComputedStyle(b, "").color;
+
+// restyle B and flush
+b.parentNode.style.fontSize = "10px";
+getComputedStyle(b, "").marginTop;
+// This flush will call CalcStyleDifference on B, which will find no
+// cached font struct on the old context, but which will find a
+// cached margin struct on the rule node.
+
+</script>
diff --git a/layout/reftests/bugs/1209994-1-ref.html b/layout/reftests/bugs/1209994-1-ref.html
new file mode 100644
index 0000000000..1b6f7cdd46
--- /dev/null
+++ b/layout/reftests/bugs/1209994-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: auto;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible fieldset below:
+<div>
+ <fieldset id="f">This is fieldset</fieldset>
+</div>
+
diff --git a/layout/reftests/bugs/1209994-1.html b/layout/reftests/bugs/1209994-1.html
new file mode 100644
index 0000000000..d362c00872
--- /dev/null
+++ b/layout/reftests/bugs/1209994-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: 0;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible fieldset below:
+<div>
+ <fieldset id="f">This is fieldset</fieldset>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
diff --git a/layout/reftests/bugs/1209994-2-ref.html b/layout/reftests/bugs/1209994-2-ref.html
new file mode 100644
index 0000000000..8858616b69
--- /dev/null
+++ b/layout/reftests/bugs/1209994-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: auto;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible button below:
+<div>
+ <button id="f">This is button</button>
+</div>
+
diff --git a/layout/reftests/bugs/1209994-2.html b/layout/reftests/bugs/1209994-2.html
new file mode 100644
index 0000000000..485b0fe585
--- /dev/null
+++ b/layout/reftests/bugs/1209994-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: 0;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible button below:
+<div>
+ <button id="f">This is button</button>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
diff --git a/layout/reftests/bugs/1209994-3-ref.html b/layout/reftests/bugs/1209994-3-ref.html
new file mode 100644
index 0000000000..bd219e03ae
--- /dev/null
+++ b/layout/reftests/bugs/1209994-3-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: auto;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible table below:
+<div>
+ <table id="f">This is a table</table>
+</div>
+
diff --git a/layout/reftests/bugs/1209994-3.html b/layout/reftests/bugs/1209994-3.html
new file mode 100644
index 0000000000..94df02fabb
--- /dev/null
+++ b/layout/reftests/bugs/1209994-3.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: 0;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible table below:
+<div>
+ <table id="f">This is a table</table>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
diff --git a/layout/reftests/bugs/1209994-4-ref.html b/layout/reftests/bugs/1209994-4-ref.html
new file mode 100644
index 0000000000..2f15740fc1
--- /dev/null
+++ b/layout/reftests/bugs/1209994-4-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: auto;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible select below:
+<div>
+ <select id="f"><option>This is a select</option></select>
+</div>
+
diff --git a/layout/reftests/bugs/1209994-4.html b/layout/reftests/bugs/1209994-4.html
new file mode 100644
index 0000000000..95e2d062fa
--- /dev/null
+++ b/layout/reftests/bugs/1209994-4.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+ height: 240px;
+}
+#f {
+ height: 0;
+ overflow: hidden;
+ padding: 0;
+ border: none;
+}
+</style>
+There should be a visible select below:
+<div>
+ <select id="f"><option>This is a select</option></select>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
diff --git a/layout/reftests/bugs/1219985-1.html b/layout/reftests/bugs/1219985-1.html
new file mode 100644
index 0000000000..da68e0cbb9
--- /dev/null
+++ b/layout/reftests/bugs/1219985-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Basic transparent rendering</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: true });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+
+</script>
diff --git a/layout/reftests/bugs/1219985-2.html b/layout/reftests/bugs/1219985-2.html
new file mode 100644
index 0000000000..f807a7db00
--- /dev/null
+++ b/layout/reftests/bugs/1219985-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Setting the canvas size should clear the canvas</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: true });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+c.width = 200;
+
+</script>
diff --git a/layout/reftests/bugs/1219985-3.html b/layout/reftests/bugs/1219985-3.html
new file mode 100644
index 0000000000..e2368bc76f
--- /dev/null
+++ b/layout/reftests/bugs/1219985-3.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Basic rendering into a non-alpha canvas</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+
+</script>
diff --git a/layout/reftests/bugs/1219985-4.html b/layout/reftests/bugs/1219985-4.html
new file mode 100644
index 0000000000..fbdacec528
--- /dev/null
+++ b/layout/reftests/bugs/1219985-4.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Setting the canvas size on a non-alpha should clear the canvas to opaque black</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+c.width = 200;
+
+</script>
diff --git a/layout/reftests/bugs/1219985-5.html b/layout/reftests/bugs/1219985-5.html
new file mode 100644
index 0000000000..c00651d18e
--- /dev/null
+++ b/layout/reftests/bugs/1219985-5.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Only the context attributes from the first getContext call should be respected.</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: true });
+ctx = c.getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+
+</script>
diff --git a/layout/reftests/bugs/1219985-6.html b/layout/reftests/bugs/1219985-6.html
new file mode 100644
index 0000000000..d759758549
--- /dev/null
+++ b/layout/reftests/bugs/1219985-6.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: moz-opaque should have the same effect as alpha:false</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200" moz-opaque="true"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: true });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+
+</script>
diff --git a/layout/reftests/bugs/1219985-7.html b/layout/reftests/bugs/1219985-7.html
new file mode 100644
index 0000000000..bef8e0f1ee
--- /dev/null
+++ b/layout/reftests/bugs/1219985-7.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Unsetting moz-opaque should clear the canvas</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200" moz-opaque="true"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: true });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+c.removeAttribute("moz-opaque");
+
+</script>
diff --git a/layout/reftests/bugs/1219985-8.html b/layout/reftests/bugs/1219985-8.html
new file mode 100644
index 0000000000..9747ec6d56
--- /dev/null
+++ b/layout/reftests/bugs/1219985-8.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Unsetting moz-opaque should clear the canvas even if the canvas has been created with alpha:false, and the canvas should stay opaque.</title>
+
+<div style="width: 200px; height: 200px; background-color: red;">
+ <canvas id="c" width="200" height="200" moz-opaque="true"></canvas>
+</div>
+
+<script>
+
+var c = document.getElementById('c');
+var ctx = c.getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 50, 100, 100);
+c.removeAttribute("moz-opaque");
+
+</script>
diff --git a/layout/reftests/bugs/1219985-ref-opaque-clear.html b/layout/reftests/bugs/1219985-ref-opaque-clear.html
new file mode 100644
index 0000000000..6bc9a43705
--- /dev/null
+++ b/layout/reftests/bugs/1219985-ref-opaque-clear.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Reference for an opaque canvas with nothing rendered in it</title>
+
+<div style="width: 200px; height: 200px; background: black"></div>
diff --git a/layout/reftests/bugs/1219985-ref-opaque-with-rendering.html b/layout/reftests/bugs/1219985-ref-opaque-with-rendering.html
new file mode 100644
index 0000000000..a1915c77a6
--- /dev/null
+++ b/layout/reftests/bugs/1219985-ref-opaque-with-rendering.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Reference for an opaque canvas with a green square rendered in it</title>
+
+<div style="width: 200px; height: 200px; background: black; display: flex;">
+ <div style="width: 100px; height: 100px; margin: auto; background: green;"></div>
+</div>
diff --git a/layout/reftests/bugs/1219985-ref-transparent-clear.html b/layout/reftests/bugs/1219985-ref-transparent-clear.html
new file mode 100644
index 0000000000..98290efbbb
--- /dev/null
+++ b/layout/reftests/bugs/1219985-ref-transparent-clear.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Reference for a regular (non-opaque) canvas with nothing rendered in it. The red background behind the canvas is visible.</title>
+
+<div style="width: 200px; height: 200px; background: red"></div>
diff --git a/layout/reftests/bugs/1219985-ref-transparent-with-rendering.html b/layout/reftests/bugs/1219985-ref-transparent-with-rendering.html
new file mode 100644
index 0000000000..a5205c90f2
--- /dev/null
+++ b/layout/reftests/bugs/1219985-ref-transparent-with-rendering.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1219985: Reference for a regular (non-opaque) canvas with a green square rendered in it. The red background behind the canvas is visible.</title>
+
+<div style="width: 200px; height: 200px; background: red; display: flex;">
+ <div style="width: 100px; height: 100px; margin: auto; background: green;"></div>
+</div>
diff --git a/layout/reftests/bugs/1222226-1-ref.html b/layout/reftests/bugs/1222226-1-ref.html
new file mode 100644
index 0000000000..4158c70e10
--- /dev/null
+++ b/layout/reftests/bugs/1222226-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+.red { color: red; }
+</style>
+<div>
+ <span id="s1">test</span><br />
+ <span id="s2" class=red>test</span><br />
+ <span id="s3" class=red>test</span><br />
+ <span id="s4">test</span><br />
+</div>
diff --git a/layout/reftests/bugs/1222226-1.html b/layout/reftests/bugs/1222226-1.html
new file mode 100644
index 0000000000..62af257953
--- /dev/null
+++ b/layout/reftests/bugs/1222226-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<style>
+.red { color: red; }
+</style>
+<script>
+document.onreadystatechange = function() {
+ if (document.readyState == "complete") {
+ var arr = ["s2","s3"];
+ arr.forEach(function(n) {
+ document.getElementById(n).className = "red";
+ });
+ }
+};
+</script>
+<div>
+ <span id="s1">test</span><br />
+ <span id="s2">test</span><br />
+ <span id="s3">test</span><br />
+ <span id="s4">test</span><br />
+</div>
diff --git a/layout/reftests/bugs/1226278-ref.html b/layout/reftests/bugs/1226278-ref.html
new file mode 100644
index 0000000000..a1b29f4284
--- /dev/null
+++ b/layout/reftests/bugs/1226278-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 1226278</title>
+ <style type="text/css">
+
+fieldset {
+ overflow: hidden;
+ padding: 20px;
+ background: url(data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=) content-box;
+ height: 20px;
+}
+
+div { margin-top:20px; height:40px; background:red; }
+ </style>
+</head>
+<body>
+
+<pre>There should be no red areas.</pre>
+
+<fieldset><legend>LEGEND</legend></fieldset>
+<fieldset></fieldset>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1226278.html b/layout/reftests/bugs/1226278.html
new file mode 100644
index 0000000000..939c79a2e3
--- /dev/null
+++ b/layout/reftests/bugs/1226278.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 1226278</title>
+ <style type="text/css">
+
+fieldset {
+ overflow-clip-box: content-box;
+ overflow: hidden;
+ padding: 20px;
+ background: url(data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=) content-box;
+ height: 20px;
+}
+
+div { margin-top:20px; height:40px; background:red; }
+ </style>
+</head>
+<body>
+
+<pre>There should be no red areas.</pre>
+
+<fieldset><legend>LEGEND</legend><div>FAIL</div></fieldset>
+<fieldset><div>FAIL</div></fieldset>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1230466.html b/layout/reftests/bugs/1230466.html
new file mode 100644
index 0000000000..46cf0627f8
--- /dev/null
+++ b/layout/reftests/bugs/1230466.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <script>
+ var b = document.createElement("body");
+ b.style.overflow = "scroll";
+ var h = document.documentElement;
+ h.insertBefore(b, h.firstChild);
+ b.offsetWidth;
+ b.remove();
+ </script>
+</html>
diff --git a/layout/reftests/bugs/1238243-1-notref.html b/layout/reftests/bugs/1238243-1-notref.html
new file mode 100644
index 0000000000..b8ec756bed
--- /dev/null
+++ b/layout/reftests/bugs/1238243-1-notref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+span {
+ font-family: Malgun Gothic, sans-serif;
+ font-size: 32px;
+ line-height: 64px;
+ background-color: black;
+}
+</style>
+</head>
+<body>
+<span>&#xac00;&#xac01;</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1238243-1.html b/layout/reftests/bugs/1238243-1.html
new file mode 100644
index 0000000000..5fc7f2433d
--- /dev/null
+++ b/layout/reftests/bugs/1238243-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+span {
+ font-family: Malgun Gothic, sans-serif;
+ font-size: 32px;
+ line-height: 64px;
+ background-color: black;
+}
+</style>
+</head>
+<body>
+<!-- cluster beginning with U+115f *should* add width to the span -->
+<span>&#xac00;&#x115f;&#x1161;&#x11a8;&#xac01;</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1238243-2-ref.html b/layout/reftests/bugs/1238243-2-ref.html
new file mode 100644
index 0000000000..0259181b0e
--- /dev/null
+++ b/layout/reftests/bugs/1238243-2-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+span {
+ font-family: Malgun Gothic, sans-serif;
+ font-size: 32px;
+ line-height: 64px;
+}
+</style>
+</head>
+<body>
+<span>ab</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1238243-2.html b/layout/reftests/bugs/1238243-2.html
new file mode 100644
index 0000000000..e551675cc8
--- /dev/null
+++ b/layout/reftests/bugs/1238243-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+span {
+ font-family: Malgun Gothic, sans-serif;
+ font-size: 32px;
+ line-height: 64px;
+}
+</style>
+</head>
+<body>
+<!-- stray U+115f should be invisible and not contribute any space -->
+<span>a&#x115f;b</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1239564-ref.html b/layout/reftests/bugs/1239564-ref.html
new file mode 100644
index 0000000000..cd15383adc
--- /dev/null
+++ b/layout/reftests/bugs/1239564-ref.html
@@ -0,0 +1,21 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 1239564</title>
+<style>
+#circle {
+ border-radius: 300px;
+ height: 80px;
+ width: 80px;
+ background-color: red;
+ margin: auto;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top:0;
+ bottom: 0;
+ transform: translateZ(1px) scale(3);
+}
+</style>
+<body>
+<div id="circle"></div>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/1239564.html b/layout/reftests/bugs/1239564.html
new file mode 100644
index 0000000000..37f0900094
--- /dev/null
+++ b/layout/reftests/bugs/1239564.html
@@ -0,0 +1,29 @@
+<html class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 1239564</title>
+<style>
+#circle {
+ border-radius: 300px;
+ height: 80px;
+ width: 80px;
+ background-color: red;
+ margin: auto;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top:0;
+ bottom: 0;
+ will-change: transform;
+}
+</style>
+<body>
+<div id="circle"></div>
+<script>
+var c = document.getElementById('circle');
+function doTest() {
+ c.style.transform = "translateZ(1px) scale(3)";
+ document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/1241631-1-ref.html b/layout/reftests/bugs/1241631-1-ref.html
new file mode 100644
index 0000000000..6b8eb6b0fa
--- /dev/null
+++ b/layout/reftests/bugs/1241631-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<meta charset=utf-8>
+<div id=result>Does my innerText have spaces?</div>
+<div id=source style="width:1px;word-break:break-all">Does my innerText have spaces?</div>
diff --git a/layout/reftests/bugs/1241631-1.html b/layout/reftests/bugs/1241631-1.html
new file mode 100644
index 0000000000..0bac64584c
--- /dev/null
+++ b/layout/reftests/bugs/1241631-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<meta charset=utf-8>
+<div id=result></div>
+<div id=source style="width:1px;word-break:break-all">Does my innerText have spaces?</div>
+<script>
+document.getElementById("result").textContent =
+ document.getElementById("source").innerText;
+document.documentElement.className = "";
+</script>
diff --git a/layout/reftests/bugs/1242172-1-ref.html b/layout/reftests/bugs/1242172-1-ref.html
new file mode 100644
index 0000000000..376ee8fd3b
--- /dev/null
+++ b/layout/reftests/bugs/1242172-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<iframe src="1242172-1-subdoc.html" style="width:800px; height:200px; border:1px solid black"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1242172-1-subdoc.html b/layout/reftests/bugs/1242172-1-subdoc.html
new file mode 100644
index 0000000000..97a34e5092
--- /dev/null
+++ b/layout/reftests/bugs/1242172-1-subdoc.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html style="overflow:hidden">
+<body>
+<div style='position:absolute; height:100%; display:flex; flex-direction:row'>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1242172-1.html b/layout/reftests/bugs/1242172-1.html
new file mode 100644
index 0000000000..069ccba45f
--- /dev/null
+++ b/layout/reftests/bugs/1242172-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body onload="doTest()">
+<iframe id="f" src="1242172-1-subdoc.html" style="width:800px; height:100px; border:1px solid black"></iframe>
+<script>
+function doTest() {
+ f.contentDocument.body.offsetTop;
+ f.style.height = "200px";
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1242172-2-ref.html b/layout/reftests/bugs/1242172-2-ref.html
new file mode 100644
index 0000000000..f6f1c766ce
--- /dev/null
+++ b/layout/reftests/bugs/1242172-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<!-- The test forces scrollbars to appear. Using overflow:scroll here avoids the
+ iterative overflow:auto reflow logic. -->
+<html style="overflow:scroll">
+<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
+<body>
+<div style='position:absolute; height:100%; display:flex; flex-direction:row'>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1242172-2.html b/layout/reftests/bugs/1242172-2.html
new file mode 100644
index 0000000000..1e5ee66f15
--- /dev/null
+++ b/layout/reftests/bugs/1242172-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
+<body>
+<div style='position:absolute; height:100%; display:flex; flex-direction:row'>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+ <div style="height:100%"><img src="repeatable-diagonal-gradient.png" style='height:100%'></img></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1242781-ref.html b/layout/reftests/bugs/1242781-ref.html
new file mode 100644
index 0000000000..d1b0fb13eb
--- /dev/null
+++ b/layout/reftests/bugs/1242781-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+ <body>
+ <p style="display:inline-block">some&nbsp;<span>te<br/>xt</span></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1242781.html b/layout/reftests/bugs/1242781.html
new file mode 100644
index 0000000000..c7cff3519d
--- /dev/null
+++ b/layout/reftests/bugs/1242781.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+ <body>
+ <p style="display:inline-block">some <span>te<br/>xt</span></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/124903-1-ref.html b/layout/reftests/bugs/124903-1-ref.html
new file mode 100644
index 0000000000..83e823c173
--- /dev/null
+++ b/layout/reftests/bugs/124903-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 124903 Reference</title>
+</head>
+<body>
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="100"><img src="solidblue.png" alt="" width="100"></td>
+ <td>This text should all be on one</td>
+ <td width="50%">&nbsp;line</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/124903-1.html b/layout/reftests/bugs/124903-1.html
new file mode 100644
index 0000000000..b153ecef32
--- /dev/null
+++ b/layout/reftests/bugs/124903-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 124903</title>
+</head>
+<body>
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="99"><img src="solidblue.png" alt="" width="100"></td>
+ <td>This text should all be on one</td>
+ <td width="50%">&nbsp;line</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1260543-1-ref.html b/layout/reftests/bugs/1260543-1-ref.html
new file mode 100644
index 0000000000..05162ea2e9
--- /dev/null
+++ b/layout/reftests/bugs/1260543-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<style>
+#outer {
+ font-size: 52px;
+ color: green;
+}
+</style>
+<p>Test passes if the block below is green.</p>
+<div id="outer"><span id="inner">&#x2588;</span></div>
diff --git a/layout/reftests/bugs/1260543-1.html b/layout/reftests/bugs/1260543-1.html
new file mode 100644
index 0000000000..15e12f1cca
--- /dev/null
+++ b/layout/reftests/bugs/1260543-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+#outer {
+ font-size: 52px;
+ transition: all 100s step-start;
+ color: transparent;
+}
+#outer.red {
+ color: red;
+}
+#outer.red > #inner {
+ color: green;
+}
+</style>
+<!--
+This is testing that -webkit-text-fill-color should inherit currentcolor
+keyword value, rather than the computed value of color (used value of
+-webkit-text-fill-color) from the transition.
+-->
+<p>Test passes if the block below is green.</p>
+<div id="outer"><span id="inner">&#x2588;</span></div>
+<script>
+window.addEventListener("load", () => {
+ // Wait for the second frame to ensure that we will
+ // actually start the transition.
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ let outer = document.getElementById("outer");
+ outer.className = "red";
+ document.documentElement.className = "";
+ });
+ });
+});
+</script>
diff --git a/layout/reftests/bugs/1263845-ref.html b/layout/reftests/bugs/1263845-ref.html
new file mode 100644
index 0000000000..65c67a95a7
--- /dev/null
+++ b/layout/reftests/bugs/1263845-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<div id="wrap" style="background: yellow">
+ <table style="height: 100%; background: purple">
+ <tr>
+ <td>
+ This is some text
+ </td>
+ </tr>
+ </table>
+</div>
diff --git a/layout/reftests/bugs/1263845.html b/layout/reftests/bugs/1263845.html
new file mode 100644
index 0000000000..3bc9c28b99
--- /dev/null
+++ b/layout/reftests/bugs/1263845.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<div id="wrap" style="height: 200px; background: yellow">
+ <table style="height: 100%; background: purple">
+ <tr>
+ <td>
+ This is some text
+ </td>
+ </tr>
+ </table>
+</div>
+<script>
+ // Make sure we do a layout at the 200px height.
+ document.body.offsetWidth;
+ document.getElementById("wrap").style.height = "";
+</script>
diff --git a/layout/reftests/bugs/1271714-1-ref.html b/layout/reftests/bugs/1271714-1-ref.html
new file mode 100644
index 0000000000..a019365d48
--- /dev/null
+++ b/layout/reftests/bugs/1271714-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+
+<title>Reference for bug 1271714: .fixed should have a yellow background</title>
+
+<style type="text/css">
+
+.fixed {
+ border: 1px solid black;
+ height: 50px;
+ width: 200px;
+ background: yellow;
+}
+
+</style>
+
+<div class="fixed"></div>
diff --git a/layout/reftests/bugs/1271714-1.html b/layout/reftests/bugs/1271714-1.html
new file mode 100644
index 0000000000..8bce820cf5
--- /dev/null
+++ b/layout/reftests/bugs/1271714-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+
+<title>Bug 1271714: Hit testing should be able to find the .fixed element</title>
+
+<style type="text/css">
+
+.positionedClip {
+ position: relative;
+ z-index: 1;
+ overflow: hidden;
+}
+
+.relative {
+ position: relative;
+ z-index: 1;
+}
+
+.fixed {
+ position: fixed;
+ border: 1px solid black;
+ height: 50px;
+ width: 200px;
+}
+
+</style>
+
+<div class="positionedClip">
+ <div class="relative">
+ <div class="fixed"></div>
+ </div>
+</div>
+
+<script>
+
+document.elementFromPoint(100, 30).style.backgroundColor = "yellow";
+
+</script>
diff --git a/layout/reftests/bugs/1272997-1-ref.html b/layout/reftests/bugs/1272997-1-ref.html
new file mode 100644
index 0000000000..1465dbf1f7
--- /dev/null
+++ b/layout/reftests/bugs/1272997-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <iframe id="test" style="width:350px;"
+ src="data:text/html,
+ <html>
+ <style>
+ html { writing-mode:vertical-rl; }
+ div { writing-mode:initial; position:absolute;
+ right:0; padding:5px; }
+ </style>
+ <div>This text should NOT be cut off</div>">
+ </iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1272997-1.html b/layout/reftests/bugs/1272997-1.html
new file mode 100644
index 0000000000..fee818bccc
--- /dev/null
+++ b/layout/reftests/bugs/1272997-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function test() {
+ var elem = document.getElementById("test");
+ elem.style.width = "350px";
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <iframe id="test" style="width:400px;"
+ src="data:text/html,
+ <html>
+ <style>
+ html { writing-mode:vertical-rl; }
+ div { writing-mode:initial; position:absolute;
+ right:0; padding:5px; }
+ </style>
+ <div>This text should NOT be cut off</div>">
+ </iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1273154-1-ref.html b/layout/reftests/bugs/1273154-1-ref.html
new file mode 100644
index 0000000000..2c595903db
--- /dev/null
+++ b/layout/reftests/bugs/1273154-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body {
+ /* Force a large line-height so that we don't get a positioning
+ discrepancy on the test span depending on which font's metrics
+ are used in line-height computation. */
+ font: 64px/2 serif;
+ }
+ span {
+ font-family: "Mongolian Baiti", "Times New Roman", serif;
+ font-size: 32px;
+ }
+ </style>
+ </head>
+ <body>
+ <span>&#x1833;&#x1820;&#x1837;&#x1822;&#x182C;&#x1822;&#x1828;&#x202F;&#x1824;</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1273154-1.html b/layout/reftests/bugs/1273154-1.html
new file mode 100644
index 0000000000..5ccc5eee62
--- /dev/null
+++ b/layout/reftests/bugs/1273154-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body {
+ /* Force a large line-height so that we don't get a positioning
+ discrepancy on the test span depending on which font's metrics
+ are used in line-height computation. */
+ font: 64px/2 serif;
+ }
+ span {
+ /* Times does NOT support Mongolian characters, so the entire text
+ should be rendered as a single Mongolian Baiti run, including
+ the U+202F which _is_ available in Times. */
+ font-family: "Times New Roman", "Mongolian Baiti", serif;
+ font-size: 32px;
+ }
+ </style>
+ </head>
+ <body>
+ <span>&#x1833;&#x1820;&#x1837;&#x1822;&#x182C;&#x1822;&#x1828;&#x202F;&#x1824;</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1273154-2-ref.html b/layout/reftests/bugs/1273154-2-ref.html
new file mode 100644
index 0000000000..d68ce92d6a
--- /dev/null
+++ b/layout/reftests/bugs/1273154-2-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body {
+ /* Force a large line-height so that we don't get a positioning
+ discrepancy on the test span depending on which font's metrics
+ are used in line-height computation. */
+ font: 64px/2 serif;
+ }
+ span {
+ font-family: "Mongolian Baiti", "Times New Roman", serif;
+ font-size: 32px;
+ }
+ </style>
+ </head>
+ <body>
+ <span>&#x202F;&#x1824;&#x1828;</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1273154-2.html b/layout/reftests/bugs/1273154-2.html
new file mode 100644
index 0000000000..dba75e5095
--- /dev/null
+++ b/layout/reftests/bugs/1273154-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body {
+ /* Force a large line-height so that we don't get a positioning
+ discrepancy on the test span depending on which font's metrics
+ are used in line-height computation. */
+ font: 64px/2 serif;
+ }
+ span {
+ /* Times does NOT support Mongolian characters, so the entire text
+ should be rendered as a single Mongolian Baiti run, including
+ the initial U+202F, even though it _is_ available in Times. */
+ font-family: "Times New Roman", "Mongolian Baiti", serif;
+ font-size: 32px;
+ }
+ </style>
+ </head>
+ <body>
+ <span>&#x202F;&#x1824;&#x1828;</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1274368-1-ref.html b/layout/reftests/bugs/1274368-1-ref.html
new file mode 100644
index 0000000000..d748600644
--- /dev/null
+++ b/layout/reftests/bugs/1274368-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<style>
+textarea {
+ width: 100px;
+ height: 150px;
+ margin: 10px;
+ padding: 0;
+}
+</style>
+<textarea style="direction:ltr"></textarea>
+<textarea style="direction:rtl"></textarea>
+<textarea style="direction:ltr"></textarea>
+<textarea style="direction:rtl"></textarea>
diff --git a/layout/reftests/bugs/1274368-1.html b/layout/reftests/bugs/1274368-1.html
new file mode 100644
index 0000000000..9b4deb36f4
--- /dev/null
+++ b/layout/reftests/bugs/1274368-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<style>
+textarea {
+ width: 100px;
+ height: 150px;
+ margin: 10px;
+ padding: 0;
+}
+</style>
+<textarea style="writing-mode:vertical-lr"></textarea>
+<textarea style="writing-mode:vertical-rl"></textarea>
+<textarea style="writing-mode:sideways-lr"></textarea>
+<textarea style="writing-mode:sideways-rl"></textarea>
diff --git a/layout/reftests/bugs/1275411-1-ref.html b/layout/reftests/bugs/1275411-1-ref.html
new file mode 100644
index 0000000000..97f06d431b
--- /dev/null
+++ b/layout/reftests/bugs/1275411-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+</head>
+<body>
+ <div style="overflow: hidden; width:50px;height:50px;">
+ <div style="position: fixed;">
+ <div style="position: fixed;">
+ <div style="width: 100px; height: 50px; background: red;"></div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1275411-1.html b/layout/reftests/bugs/1275411-1.html
new file mode 100644
index 0000000000..15daf80720
--- /dev/null
+++ b/layout/reftests/bugs/1275411-1.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+</head>
+<body>
+ <div style="overflow: hidden;">
+ <div style="position: fixed;">
+ <div style="position: fixed;">
+ <div style="width: 100px; height: 50px; background: red;"></div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1276161-1-notref.html b/layout/reftests/bugs/1276161-1-notref.html
new file mode 100644
index 0000000000..8c61642671
--- /dev/null
+++ b/layout/reftests/bugs/1276161-1-notref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Not-Reference for test for bug 1276161 - dashed lines in canvas should look different from solid lines</title>
+
+<canvas id="canvas"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+canvas.width = 200;
+canvas.height = 200;
+
+var ctxx = canvas.getContext('2d');
+ctxx.strokeStyle = 'black';
+// Draw a solid line
+ctxx.moveTo(10, 10);
+ctxx.lineWidth = 2;
+ctxx.lineTo(30, 30);
+ctxx.stroke();
+ctxx.restore();
+
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1276161-1a.html b/layout/reftests/bugs/1276161-1a.html
new file mode 100644
index 0000000000..2bdd65708c
--- /dev/null
+++ b/layout/reftests/bugs/1276161-1a.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1276161 - dashed lines in canvas should look different from solid lines</title>
+
+<canvas id="canvas"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+canvas.width = 200;
+canvas.height = 200;
+
+var ctxx = canvas.getContext('2d');
+ctxx.strokeStyle = 'black';
+ctxx.setLineDash([2,4]);
+ctxx.moveTo(10, 10);
+ctxx.lineWidth = 2;
+ctxx.lineTo(30, 30);
+ctxx.stroke();
+ctxx.restore();
+
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1276161-1b.html b/layout/reftests/bugs/1276161-1b.html
new file mode 100644
index 0000000000..68a14a09c6
--- /dev/null
+++ b/layout/reftests/bugs/1276161-1b.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test for bug 1276161 - dashed lines in canvas should look different from solid lines</title>
+
+<canvas id="canvas"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+canvas.width = 200;
+canvas.height = 200;
+
+var ctxx = canvas.getContext('2d');
+ctxx.strokeStyle = 'black';
+ctxx.setLineDash([2,3]);
+ctxx.moveTo(10, 10);
+ctxx.lineWidth = 2;
+ctxx.lineTo(30, 30);
+ctxx.stroke();
+ctxx.restore();
+
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1288255-ref.html b/layout/reftests/bugs/1288255-ref.html
new file mode 100644
index 0000000000..3fc8693c85
--- /dev/null
+++ b/layout/reftests/bugs/1288255-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Bug 1288255 - Wrong line breaking due to cached hyphen width</title>
+ <style>
+ @font-face {
+ font-family: LongHyphenTest;
+ src: url(LongHyphenTest.woff2);
+ }
+ #test {
+ font: 16px/2 LongHyphenTest;
+ width: 14em;
+ border: 1px solid blue;
+ }
+ </style>
+</head>
+<body>
+ <p>Test passes if there are two lines each has three rectangles:</p>
+ <div id="test">
+ XXX XXX XXX<br>XXX XXX XXX
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1288255.html b/layout/reftests/bugs/1288255.html
new file mode 100644
index 0000000000..81fd856cac
--- /dev/null
+++ b/layout/reftests/bugs/1288255.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<head>
+ <meta charset="UTF-8">
+ <title>Bug 1288255 - Wrong line breaking due to cached hyphen width</title>
+ <style id="font" media="not all">
+ @font-face {
+ font-family: LongHyphenTest;
+ src: url(LongHyphenTest.woff2);
+ }
+ </style>
+ <style>
+ #test {
+ font: 16px/2 LongHyphenTest;
+ width: 14em;
+ border: 1px solid blue;
+ }
+ </style>
+</head>
+<body onload="load_font()">
+ <p>Test passes if there are two lines each has three rectangles:</p>
+ <div id="test">
+ <span>XXX XXX</span> XXX X&shy;XX XXX XXX
+ </div>
+ <script>
+ function load_font() {
+ document.getElementById("font").media = "";
+ document.fonts.load("16px LongHyphenTest").then(() => {
+ document.documentElement.className = "";
+ });
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/128896-ref.html b/layout/reftests/bugs/128896-ref.html
new file mode 100644
index 0000000000..fa7ffd486e
--- /dev/null
+++ b/layout/reftests/bugs/128896-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Test CSS files with non-ascii characters</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { color: yellow; background-color: blue }
+ </style>
+ </head>
+ <body>
+ <p>The text in this page should be yellow on a blue background</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/128896-style.css b/layout/reftests/bugs/128896-style.css
new file mode 100644
index 0000000000..327e7a626e
--- /dev/null
+++ b/layout/reftests/bugs/128896-style.css
@@ -0,0 +1,4 @@
+/* This CSS file contains non-ASCII text with no @charset
+ * Håkan Waara
+ */
+body { color: yellow; background-color: blue }
diff --git a/layout/reftests/bugs/128896.html b/layout/reftests/bugs/128896.html
new file mode 100644
index 0000000000..dd1ee64223
--- /dev/null
+++ b/layout/reftests/bugs/128896.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Test CSS files with non-ascii characters</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" href="128896-style.css" type="text/css">
+ </head>
+ <body>
+ <p>The text in this page should be yellow on a blue background</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/1291528-ref.html b/layout/reftests/bugs/1291528-ref.html
new file mode 100644
index 0000000000..477bb03a3b
--- /dev/null
+++ b/layout/reftests/bugs/1291528-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ <!--
+ This CSS will hit the non-optimised linear gradient painting path, since
+ the dirty rect of div.inner will be the same as the destination rect,
+ making cellContainsFill true in PaintGradient() and skipping the optimised
+ path.
+ -->
+ <style type="text/css">
+ div.outer {
+ border: 2px solid grey;
+ padding: 0;
+ height: 18.5px;
+ width: 100px;
+ }
+
+ div.inner {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ height: 18.5px;
+ width: 100px;
+ background: linear-gradient(to top, red, blue);
+ }
+ </style>
+ </head>
+ <body>
+ <div class="outer">
+ <div class="inner">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1291528.html b/layout/reftests/bugs/1291528.html
new file mode 100644
index 0000000000..14e4993a72
--- /dev/null
+++ b/layout/reftests/bugs/1291528.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ <!--
+ This test makes sure that linear gradient painting paths agree around
+ non-pixel aligned dimensions: namely, the direct path which draws the
+ linear gradient repeatedly; and the optimised path which converts the
+ original gradient into a repeating gradient and fills the whole
+ destination in one go.
+
+ This CSS will hit the optimised linear gradient painting path, since the
+ dirty rect will be the size of the whole box (including border), but the
+ destination is only the size of the rect within the border.
+ -->
+ <style type="text/css">
+ div {
+ border: 2px solid grey;
+ background: linear-gradient(to top, red, blue);
+ height: 18.5px;
+ width: 100px;
+ }
+ </style>
+ </head>
+ <body>
+ <div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1294102-1-ref.html b/layout/reftests/bugs/1294102-1-ref.html
new file mode 100644
index 0000000000..75867fcca2
--- /dev/null
+++ b/layout/reftests/bugs/1294102-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input type="button" style="position: absolute; top: 10.1px; left: 10px; width: 90px; height: 26.3px;" value="M">
+</body>
+</html>
diff --git a/layout/reftests/bugs/1294102-1.html b/layout/reftests/bugs/1294102-1.html
new file mode 100644
index 0000000000..9f437afaa7
--- /dev/null
+++ b/layout/reftests/bugs/1294102-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input type="button" style="position: absolute; top: 10.3px; left: 10px; width: 90px; height: 26.3px;" value="M">
+</body>
+</html>
diff --git a/layout/reftests/bugs/1295466-1-ref.xhtml b/layout/reftests/bugs/1295466-1-ref.xhtml
new file mode 100644
index 0000000000..815813c51e
--- /dev/null
+++ b/layout/reftests/bugs/1295466-1-ref.xhtml
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Reference: Min/Max Height and Width Constraints on Replaced Elements with Box-Sizing</title>
+ <link href="http://fantasai.inkedblade.net/contact" title="Elika J. Etemad" rel="author"></link>
+ <link href="mailto:sjohnson@mozilla.com" title="Scott Johnson" rel="author"></link>
+ <meta content="image" name="flags"></meta>
+ <!--
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-css3-ui-20120117/#box-sizing">
+ -->
+ <style type="text/css">
+ p {
+ display: inline-block;
+ background-color: white;
+ margin: 0px 0px;
+ padding: 0px 0px;
+ }
+
+ .with-padding {
+ padding: 5px 5px;
+ }
+
+ #img {
+ width: 75px;
+ height: 75px;
+ }
+ </style>
+ </head>
+ <body>
+ <div>All rectangles should be the same size.</div>
+ <p><img class="with-padding" src="support/replaced-min-max.png" alt="FAIL" title="Test 0"></img></p>
+ <p><img id="img" class="with-padding" title="Test 1" alt="FAIL" src="support/replaced-min-max-1.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 2" alt="FAIL" src="support/replaced-min-max-2.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 3" alt="FAIL" src="support/replaced-min-max-3.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 4" alt="FAIL" src="support/replaced-min-max-4.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 5" alt="FAIL" src="support/replaced-min-max-5.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 6" alt="FAIL" src="support/replaced-min-max-6.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 7" alt="FAIL" src="support/replaced-min-max-7.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 8" alt="FAIL" src="support/replaced-min-max-8.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 9" alt="FAIL" src="support/replaced-min-max-9.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 10" alt="FAIL" src="support/replaced-min-max-10.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 11" alt="FAIL" src="support/replaced-min-max-11.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 12" alt="FAIL" src="support/replaced-min-max-12.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 13" alt="FAIL" src="support/replaced-min-max-13.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 14" alt="FAIL" src="support/replaced-min-max-14.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 15" alt="FAIL" src="support/replaced-min-max-15.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 16" alt="FAIL" src="support/replaced-min-max-16.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 17" alt="FAIL" src="support/replaced-min-max-17.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 18" alt="FAIL" src="support/replaced-min-max-18.png"></img></p>
+ <p><img id="img" class="with-padding" title="Test 19" alt="FAIL" src="support/replaced-min-max-19.png"></img></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1295466-1.xhtml b/layout/reftests/bugs/1295466-1.xhtml
new file mode 100644
index 0000000000..66f49bb68d
--- /dev/null
+++ b/layout/reftests/bugs/1295466-1.xhtml
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS Test: Min/Max Height and Width Constraints on Replaced Elements with Box-Sizing</title>
+ <link href="http://fantasai.inkedblade.net/contact" title="Elika J. Etemad" rel="author"></link>
+ <link href="mailto:sjohnson@mozilla.com" title="Scott Johnson" rel="author"></link>
+ <link rel="help" href="http://www.w3.org/TR/css3-ui/#box-sizing" />
+ <link rel="match" href="box-sizing-replaced-001-ref.xht" />
+ <meta content="image" name="flags"></meta>
+ <meta name="assert" content="All images should be sized at 75px x 75px, with 5px of padding around each." />
+ <!--
+ This test is derived from replaced-min-max-001, part of the W3C CSS 2.1
+ test suite.
+ -->
+ <style type="text/css">
+ p {
+ display: inline-block;
+ background-color: white;
+ padding: 0px 0px;
+ margin: 0px 0px;
+ }
+
+ .with-padding {
+ padding: 5px 5px;
+ box-sizing: border-box;
+ }
+
+ #img1 {
+ min-width: 70px;
+ max-width: 115px;
+ min-height: 55px;
+ max-height: 130px;
+ }
+
+ #img2 {
+ max-width: 85px;
+ min-height: 70px;
+ }
+
+ #img3 {
+ max-width: 85px;
+ min-height: 85px;
+ }
+
+ #img4 {
+ min-width: 85px;
+ max-height: 110px;
+ }
+
+ #img5 {
+ min-width: 85px;
+ max-height: 85px;
+ }
+
+ #img6 {
+ min-width: 70px;
+ max-height: 85px;
+ }
+
+ #img7 {
+ min-width: 85px;
+ max-height: 85px;
+ }
+
+ #img8 {
+ max-width: 110px;
+ min-height: 85px;
+ }
+
+ #img9 {
+ max-width: 85px;
+ min-height: 85px;
+ }
+
+ #img10 {
+ min-width: 85px;
+ max-width: 160px;
+ max-height: 85px;
+ }
+
+ #img11 {
+ min-width: 35px;
+ max-width: 235px;
+ max-height: 85px;
+ }
+
+ #img12 {
+ max-width: 85px;
+ min-height: 85px;
+ max-height: 160px;
+ }
+
+ #img13 {
+ max-width: 85px;
+ min-height: 35px;
+ max-height: 235px;
+ }
+
+ #img14 {
+ min-width: 60px;
+ max-width: 110px;
+ min-height: 85px;
+ }
+
+ #img15 {
+ min-width: 65px;
+ max-width: 85px;
+ min-height: 85px;
+ }
+
+ #img16 {
+ min-width: 85px;
+ min-height: 60px;
+ max-height: 110px;
+ }
+
+ #img17 {
+ min-width: 85px;
+ min-height: 65px;
+ max-height: 85px;
+ }
+
+ #img18 {
+ min-width: 85px;
+ max-height: 85px;
+ }
+
+ #img19 {
+ max-width: 85px;
+ min-height: 85px;
+ }
+ </style>
+ </head>
+ <script>
+ /* This test is a copy of the original w3c-submitted test at
+ * w3c-css/submitted/ui3/box-sizing-replaced-001.xht.
+ * We need this copy so that we can use non-standard MozReftestInvalidate here
+ * without hindering the w3c testsuite.
+ * Without MozReftestInvalidate, for img5 the right 1/3rd of the element
+ * simply isn't painted.
+ * This copy can be removed (along with the fuzzy annotation in the original
+ * test) when we've fixed the underlying issue i.e. Bug 1316772.
+ */
+ window.addEventListener("MozReftestInvalidate", endTest);
+
+ function endTest() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ <body>
+ <div>All rectangles should be the same size.</div>
+ <p><img id="img0" class="with-padding" src="support/replaced-min-max.png" alt="FAIL" title="Test 0"></img></p>
+ <p><img id="img1" class="with-padding" title="Test 1" alt="FAIL" src="support/replaced-min-max-1.png"></img></p>
+ <p><img id="img2" class="with-padding" title="Test 2" alt="FAIL" src="support/replaced-min-max-2.png"></img></p>
+ <p><img id="img3" class="with-padding" title="Test 3" alt="FAIL" src="support/replaced-min-max-3.png"></img></p>
+ <p><img id="img4" class="with-padding" title="Test 4" alt="FAIL" src="support/replaced-min-max-4.png"></img></p>
+ <p><img id="img5" class="with-padding" title="Test 5" alt="FAIL" src="support/replaced-min-max-5.png"></img></p>
+ <p><img id="img6" class="with-padding" title="Test 6" alt="FAIL" src="support/replaced-min-max-6.png"></img></p>
+ <p><img id="img7" class="with-padding" title="Test 7" alt="FAIL" src="support/replaced-min-max-7.png"></img></p>
+ <p><img id="img8" class="with-padding" title="Test 8" alt="FAIL" src="support/replaced-min-max-8.png"></img></p>
+ <p><img id="img9" class="with-padding" title="Test 9" alt="FAIL" src="support/replaced-min-max-9.png"></img></p>
+ <p><img id="img10" class="with-padding" title="Test 10" alt="FAIL" src="support/replaced-min-max-10.png"></img></p>
+ <p><img id="img11" class="with-padding" title="Test 11" alt="FAIL" src="support/replaced-min-max-11.png"></img></p>
+ <p><img id="img12" class="with-padding" title="Test 12" alt="FAIL" src="support/replaced-min-max-12.png"></img></p>
+ <p><img id="img13" class="with-padding" title="Test 13" alt="FAIL" src="support/replaced-min-max-13.png"></img></p>
+ <p><img id="img14" class="with-padding" title="Test 14" alt="FAIL" src="support/replaced-min-max-14.png"></img></p>
+ <p><img id="img15" class="with-padding" title="Test 15" alt="FAIL" src="support/replaced-min-max-15.png"></img></p>
+ <p><img id="img16" class="with-padding" title="Test 16" alt="FAIL" src="support/replaced-min-max-16.png"></img></p>
+ <p><img id="img17" class="with-padding" title="Test 17" alt="FAIL" src="support/replaced-min-max-17.png"></img></p>
+ <p><img id="img18" class="with-padding" title="Test 18" alt="FAIL" src="support/replaced-min-max-18.png"></img></p>
+ <p><img id="img19" class="with-padding" title="Test 19" alt="FAIL" src="support/replaced-min-max-19.png"></img></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/130767-1-ref.html b/layout/reftests/bugs/130767-1-ref.html
new file mode 100644
index 0000000000..51912007fb
--- /dev/null
+++ b/layout/reftests/bugs/130767-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 130767 Reference</title>
+</head>
+<body style="padding: 2%">
+<table style="background-color: blue; height: 3em; box-sizing: border-box; width: 100%;"><tr><td>&nbsp;</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/130767-1.html b/layout/reftests/bugs/130767-1.html
new file mode 100644
index 0000000000..22826436a3
--- /dev/null
+++ b/layout/reftests/bugs/130767-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 130767</title>
+</head>
+<body style="padding: 2%">
+<div style="background-color: blue; height: 3em">&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1313772-ref.xhtml b/layout/reftests/bugs/1313772-ref.xhtml
new file mode 100644
index 0000000000..64204a68a7
--- /dev/null
+++ b/layout/reftests/bugs/1313772-ref.xhtml
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Reference: Min/Max Height and Width Constraints on Replaced Elements with Box-Sizing</title>
+ <link href="http://fantasai.inkedblade.net/contact" title="Elika J. Etemad" rel="author"></link>
+ <link href="mailto:sjohnson@mozilla.com" title="Scott Johnson" rel="author"></link>
+ <meta content="image" name="flags"></meta>
+ <!--
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-css3-ui-20120117/#box-sizing">
+ -->
+ <style type="text/css">
+ p {
+ display: inline-block;
+ background-color: white;
+ margin: 0px 0px;
+ padding: 0px 0px;
+ }
+
+ .with-borderpadding {
+ padding: 5px 5px;
+ border: 5px solid blue;
+ }
+
+ #img {
+ width: 75px;
+ height: 75px;
+ }
+ </style>
+ </head>
+ <body>
+ <div>All rectangles should be the same size.</div>
+ <p><img class="with-borderpadding" src="support/replaced-min-max.png" alt="FAIL" title="Test 0"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 1" alt="FAIL" src="support/replaced-min-max-1.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 2" alt="FAIL" src="support/replaced-min-max-2.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 3" alt="FAIL" src="support/replaced-min-max-3.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 4" alt="FAIL" src="support/replaced-min-max-4.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 5" alt="FAIL" src="support/replaced-min-max-5.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 6" alt="FAIL" src="support/replaced-min-max-6.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 7" alt="FAIL" src="support/replaced-min-max-7.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 8" alt="FAIL" src="support/replaced-min-max-8.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 9" alt="FAIL" src="support/replaced-min-max-9.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 10" alt="FAIL" src="support/replaced-min-max-10.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 11" alt="FAIL" src="support/replaced-min-max-11.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 12" alt="FAIL" src="support/replaced-min-max-12.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 13" alt="FAIL" src="support/replaced-min-max-13.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 14" alt="FAIL" src="support/replaced-min-max-14.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 15" alt="FAIL" src="support/replaced-min-max-15.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 16" alt="FAIL" src="support/replaced-min-max-16.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 17" alt="FAIL" src="support/replaced-min-max-17.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 18" alt="FAIL" src="support/replaced-min-max-18.png"></img></p>
+ <p><img id="img" class="with-borderpadding" title="Test 19" alt="FAIL" src="support/replaced-min-max-19.png"></img></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1313772.xhtml b/layout/reftests/bugs/1313772.xhtml
new file mode 100644
index 0000000000..5f0f044d9a
--- /dev/null
+++ b/layout/reftests/bugs/1313772.xhtml
@@ -0,0 +1,174 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS Test: Min/Max Height and Width Constraints on Replaced Elements with Box-Sizing</title>
+ <link href="http://fantasai.inkedblade.net/contact" title="Elika J. Etemad" rel="author"></link>
+ <link href="mailto:sjohnson@mozilla.com" title="Scott Johnson" rel="author"></link>
+ <link rel="help" href="http://www.w3.org/TR/css3-ui/#box-sizing" />
+ <link rel="match" href="box-sizing-replaced-002-ref.xht" />
+ <meta content="image" name="flags"></meta>
+ <meta name="assert" content="All images should be sized at 75px x 75px, with 5px of padding and 5px of blue border around each." />
+ <!--
+ This test is derived from replaced-min-max-001, part of the W3C CSS 2.1
+ test suite.
+ -->
+ <style type="text/css">
+ p {
+ display: inline-block;
+ background-color: white;
+ padding: 0px 0px;
+ margin: 0px 0px;
+ }
+
+ .with-borderpadding {
+ padding: 5px 5px;
+ border: 5px solid blue;
+ box-sizing: border-box;
+ }
+
+ #img1 {
+ min-width: 80px;
+ max-width: 125px;
+ min-height: 65px;
+ max-height: 140px;
+ }
+
+ #img2 {
+ max-width: 95px;
+ min-height: 80px;
+ }
+
+ #img3 {
+ max-width: 95px;
+ min-height: 95px;
+ }
+
+ #img4 {
+ min-width: 95px;
+ max-height: 120px;
+ }
+
+ #img5 {
+ min-width: 95px;
+ max-height: 95px;
+ }
+
+ #img6 {
+ min-width: 80px;
+ max-height: 95px;
+ }
+
+ #img7 {
+ min-width: 95px;
+ max-height: 95px;
+ }
+
+ #img8 {
+ max-width: 120px;
+ min-height: 95px;
+ }
+
+ #img9 {
+ max-width: 95px;
+ min-height: 95px;
+ }
+
+ #img10 {
+ min-width: 95px;
+ max-width: 170px;
+ max-height: 95px;
+ }
+
+ #img11 {
+ min-width: 45px;
+ max-width: 245px;
+ max-height: 95px;
+ }
+
+ #img12 {
+ max-width: 95px;
+ min-height: 95px;
+ max-height: 170px;
+ }
+
+ #img13 {
+ max-width: 95px;
+ min-height: 45px;
+ max-height: 245px;
+ }
+
+ #img14 {
+ min-width: 70px;
+ max-width: 120px;
+ min-height: 95px;
+ }
+
+ #img15 {
+ min-width: 75px;
+ max-width: 95px;
+ min-height: 95px;
+ }
+
+ #img16 {
+ min-width: 95px;
+ min-height: 70px;
+ max-height: 120px;
+ }
+
+ #img17 {
+ min-width: 95px;
+ min-height: 75px;
+ max-height: 95px;
+ }
+
+ #img18 {
+ min-width: 95px;
+ max-height: 95px;
+ }
+
+ #img19 {
+ max-width: 95px;
+ min-height: 95px;
+ }
+ </style>
+ </head>
+ <script>
+ /* This test is a copy of the original w3c-submitted test at
+ * w3c-css/submitted/ui3/box-sizing-replaced-002.xht.
+ * We need this copy so that we can use non-standard MozReftestInvalidate here
+ * without hindering the w3c testsuite.
+ * Without MozReftestInvalidate, for img3 the right half of the element
+ * simply isn't painted.
+ * This copy can be removed (along with the fuzzy annotation in the original
+ * test) when we've fixed the underlying issue i.e. Bug 1316772.
+ */
+ window.addEventListener("MozReftestInvalidate", endTest);
+
+ function endTest() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ <body>
+ <div>All rectangles should be the same size.</div>
+ <p><img id="img0" class="with-borderpadding" src="support/replaced-min-max.png" alt="FAIL" title="Test 0"></img></p>
+ <p><img id="img1" class="with-borderpadding" title="Test 1" alt="FAIL" src="support/replaced-min-max-1.png"></img></p>
+ <p><img id="img2" class="with-borderpadding" title="Test 2" alt="FAIL" src="support/replaced-min-max-2.png"></img></p>
+ <p><img id="img3" class="with-borderpadding" title="Test 3" alt="FAIL" src="support/replaced-min-max-3.png"></img></p>
+ <p><img id="img4" class="with-borderpadding" title="Test 4" alt="FAIL" src="support/replaced-min-max-4.png"></img></p>
+ <p><img id="img5" class="with-borderpadding" title="Test 5" alt="FAIL" src="support/replaced-min-max-5.png"></img></p>
+ <p><img id="img6" class="with-borderpadding" title="Test 6" alt="FAIL" src="support/replaced-min-max-6.png"></img></p>
+ <p><img id="img7" class="with-borderpadding" title="Test 7" alt="FAIL" src="support/replaced-min-max-7.png"></img></p>
+ <p><img id="img8" class="with-borderpadding" title="Test 8" alt="FAIL" src="support/replaced-min-max-8.png"></img></p>
+ <p><img id="img9" class="with-borderpadding" title="Test 9" alt="FAIL" src="support/replaced-min-max-9.png"></img></p>
+ <p><img id="img10" class="with-borderpadding" title="Test 10" alt="FAIL" src="support/replaced-min-max-10.png"></img></p>
+ <p><img id="img11" class="with-borderpadding" title="Test 11" alt="FAIL" src="support/replaced-min-max-11.png"></img></p>
+ <p><img id="img12" class="with-borderpadding" title="Test 12" alt="FAIL" src="support/replaced-min-max-12.png"></img></p>
+ <p><img id="img13" class="with-borderpadding" title="Test 13" alt="FAIL" src="support/replaced-min-max-13.png"></img></p>
+ <p><img id="img14" class="with-borderpadding" title="Test 14" alt="FAIL" src="support/replaced-min-max-14.png"></img></p>
+ <p><img id="img15" class="with-borderpadding" title="Test 15" alt="FAIL" src="support/replaced-min-max-15.png"></img></p>
+ <p><img id="img16" class="with-borderpadding" title="Test 16" alt="FAIL" src="support/replaced-min-max-16.png"></img></p>
+ <p><img id="img17" class="with-borderpadding" title="Test 17" alt="FAIL" src="support/replaced-min-max-17.png"></img></p>
+ <p><img id="img18" class="with-borderpadding" title="Test 18" alt="FAIL" src="support/replaced-min-max-18.png"></img></p>
+ <p><img id="img19" class="with-borderpadding" title="Test 19" alt="FAIL" src="support/replaced-min-max-19.png"></img></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1315113-1-ref.html b/layout/reftests/bugs/1315113-1-ref.html
new file mode 100644
index 0000000000..bd5905dff6
--- /dev/null
+++ b/layout/reftests/bugs/1315113-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html reftest-zoom="2">
+<meta charset="utf-8">
+<title>Reference for test for bug 1315113: Gradient in border image</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#box {
+ width: 200px;
+ border: 80px solid transparent;
+ padding: 20px;
+ background: linear-gradient(red, blue);
+ background-origin: border-box;
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/1315113-1.html b/layout/reftests/bugs/1315113-1.html
new file mode 100644
index 0000000000..179f281d6e
--- /dev/null
+++ b/layout/reftests/bugs/1315113-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html reftest-zoom="2">
+<meta charset="utf-8">
+<title>Test for bug 1315113: Gradient in border image</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#box {
+ width: 200px;
+ border: 100px solid;
+ border-image-source: linear-gradient(red, blue);
+ border-image-slice: 40% 40% fill;
+ border-image-width: 80px 80px;
+ border-image-repeat: round stretch;
+ background-color: black;
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/1315113-2-ref.html b/layout/reftests/bugs/1315113-2-ref.html
new file mode 100644
index 0000000000..b7f95f921a
--- /dev/null
+++ b/layout/reftests/bugs/1315113-2-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html reftest-zoom="0.5">
+<meta charset="utf-8">
+<title>Reference for test for bug 1315113: Gradient in border image</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#box {
+ width: 200px;
+ border: 80px solid transparent;
+ padding: 20px;
+ background: linear-gradient(red, blue);
+ background-origin: border-box;
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/1315113-2.html b/layout/reftests/bugs/1315113-2.html
new file mode 100644
index 0000000000..37f3b53df0
--- /dev/null
+++ b/layout/reftests/bugs/1315113-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html reftest-zoom="0.5">
+<meta charset="utf-8">
+<title>Test for bug 1315113: Gradient in border image</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#box {
+ width: 200px;
+ border: 100px solid;
+ border-image-source: linear-gradient(red, blue);
+ border-image-slice: 40% 40% fill;
+ border-image-width: 80px 80px;
+ border-image-repeat: round stretch;
+ background-color: black;
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/1315632-1-ref.html b/layout/reftests/bugs/1315632-1-ref.html
new file mode 100644
index 0000000000..4bc32232a9
--- /dev/null
+++ b/layout/reftests/bugs/1315632-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+.y { color: green; }
+</style>
+<div class=y>hello</div>
diff --git a/layout/reftests/bugs/1315632-1.html b/layout/reftests/bugs/1315632-1.html
new file mode 100644
index 0000000000..c69699b35a
--- /dev/null
+++ b/layout/reftests/bugs/1315632-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+.x { position: absolute; color: red; }
+.y { color: green; }
+</style>
+<div class=x>hello</div>
+<script>
+document.body.offsetHeight;
+document.querySelector(".x").className = "y";
+document.body.offsetHeight;
+</script>
diff --git a/layout/reftests/bugs/1316719-1-ref.html b/layout/reftests/bugs/1316719-1-ref.html
new file mode 100644
index 0000000000..13078e112a
--- /dev/null
+++ b/layout/reftests/bugs/1316719-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>reference: 0.8 opacity green circle</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+div {
+ margin: 100px 200px;
+ width: 200px;
+ height: 200px;
+ background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 200 200"><circle cx="100" cy="100" r="100" fill="green" fill-opacity="0.8"/></svg>');
+}
+
+</style>
+
+<div></div>
diff --git a/layout/reftests/bugs/1316719-1a.html b/layout/reftests/bugs/1316719-1a.html
new file mode 100644
index 0000000000..eaefed654a
--- /dev/null
+++ b/layout/reftests/bugs/1316719-1a.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>mask-image with scale transform</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#transform {
+ width: 10px;
+ height: 10px;
+ transform: scale(20);
+ transform-origin: top left;
+ padding: 5px 10px;
+}
+
+#opacity {
+ opacity: 0.8;
+}
+
+#mask {
+ width: 10px;
+ height: 10px;
+ background: green;
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 10 10"><circle cx="5" cy="5" r="5" fill="black"/></svg>');
+}
+
+#activator {
+ border: 1px solid transparent;
+ will-change: transform;
+}
+
+</style>
+
+<div id="transform">
+ <div id="opacity">
+ <div id="mask">
+ <div id="activator"></div>
+ </div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1316719-1b.html b/layout/reftests/bugs/1316719-1b.html
new file mode 100644
index 0000000000..b6e056e86b
--- /dev/null
+++ b/layout/reftests/bugs/1316719-1b.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>mask-image with scale transform</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#transform {
+ width: 10px;
+ height: 10px;
+ transform: scale(20);
+ transform-origin: top left;
+ padding: 5px 10px;
+}
+
+#opacity {
+ opacity: 0.8;
+}
+
+#mask {
+ width: 10px;
+ height: 10px;
+ background: green;
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 10 10"><circle cx="5" cy="5" r="5" fill="black"/></svg>');
+}
+
+</style>
+
+<div id="transform">
+ <div id="opacity">
+ <div id="mask"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1316719-1c.html b/layout/reftests/bugs/1316719-1c.html
new file mode 100644
index 0000000000..32d00265e1
--- /dev/null
+++ b/layout/reftests/bugs/1316719-1c.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>mask-image with scale transform</title>
+<style>
+
+body {
+ margin: 0;
+}
+
+#transform {
+ width: 10px;
+ height: 10px;
+ transform: scale(20);
+ transform-origin: top left;
+ padding: 5px 10px;
+}
+
+#mask {
+ width: 10px;
+ height: 10px;
+ background: green;
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 10 10"><circle cx="5" cy="5" r="5" fill="black" fill-opacity="0.8"/></svg>');
+}
+
+</style>
+
+<div id="transform">
+ <div id="mask"></div>
+</div>
diff --git a/layout/reftests/bugs/1318769-1-ref.html b/layout/reftests/bugs/1318769-1-ref.html
new file mode 100644
index 0000000000..6ab48a12df
--- /dev/null
+++ b/layout/reftests/bugs/1318769-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body {
+ width: 64px;
+ height: 64px;
+ font-size: 32px;
+ background: white;
+ color: white;
+}
+</style>
+</head>
+<body>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1318769-1.html b/layout/reftests/bugs/1318769-1.html
new file mode 100644
index 0000000000..103c01e85a
--- /dev/null
+++ b/layout/reftests/bugs/1318769-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body {
+ width: 64px;
+ height: 64px;
+ font-size: 32px;
+ background: white;
+ color: white;
+}
+</style>
+</head>
+<body>
+&#x1f4a9;
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/1322512-1-ref.html b/layout/reftests/bugs/1322512-1-ref.html
new file mode 100644
index 0000000000..ad6343c44f
--- /dev/null
+++ b/layout/reftests/bugs/1322512-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<audio controls></audio>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1322512-1.html b/layout/reftests/bugs/1322512-1.html
new file mode 100644
index 0000000000..a886a02c09
--- /dev/null
+++ b/layout/reftests/bugs/1322512-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<audio controls style="writing-mode: vertical-lr"></audio>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1330051-ref.svg b/layout/reftests/bugs/1330051-ref.svg
new file mode 100644
index 0000000000..78aa47e79f
--- /dev/null
+++ b/layout/reftests/bugs/1330051-ref.svg
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" class="reftest-wait">
+ <foreignObject width="500" height="500">
+ <iframe xmlns="http://www.w3.org/1999/xhtml"
+ srcdoc="A test">
+ </iframe>
+ </foreignObject>
+ <script>
+ frames[0].onload = function() {
+ var doc = frames[0].document;
+ let el = doc.createElement('div');
+ el.innerHTML = "This should remain green";
+ el.style.color = "green";
+ doc.body.appendChild(el);
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/1330051.svg b/layout/reftests/bugs/1330051.svg
new file mode 100644
index 0000000000..90965e9301
--- /dev/null
+++ b/layout/reftests/bugs/1330051.svg
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" class="reftest-wait">
+ <foreignObject width="500" height="500">
+ <iframe xmlns="http://www.w3.org/1999/xhtml"
+ srcdoc="A test">
+ </iframe>
+ <div xmlns="http://www.w3.org/1999/xhtml"
+ style="color: green" id="myDiv">This should remain green</div>
+ </foreignObject>
+ <script>
+ let el = document.getElementById('myDiv');
+ frames[0].onload = function() {
+ var doc = frames[0].document;
+ doc.body.appendChild(el);
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/1336591-1-ref.html b/layout/reftests/bugs/1336591-1-ref.html
new file mode 100644
index 0000000000..43900e182a
--- /dev/null
+++ b/layout/reftests/bugs/1336591-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en-us">
+ <head>
+ <meta charset="utf-8" />
+ </head>
+ <body>
+ <canvas id="pdf" width="200" height="200"></canvas>
+ <script>
+ const canvas = document.getElementById("pdf");
+ const ctx = canvas.getContext("2d");
+
+ ctx.transform(6.4, 0, 0, -6.4, 30, 60);
+
+ var gradient = ctx.createRadialGradient(10, 10, 10, 20, 20, 40);
+ gradient.addColorStop(0, '#FF0000');
+ gradient.addColorStop(1, '#00FF00');
+
+ ctx.fillStyle = gradient;
+ ctx.fillRect(-1.78583, -16.46929, 23.21575, 24.20787);
+ </script>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/1336591-1.html b/layout/reftests/bugs/1336591-1.html
new file mode 100644
index 0000000000..f7fcbb182b
--- /dev/null
+++ b/layout/reftests/bugs/1336591-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en-us">
+ <head>
+ <meta charset="utf-8" />
+ </head>
+ <body>
+ <canvas id="pdf" width="200" height="200"></canvas>
+ <script>
+ const canvas = document.getElementById("pdf");
+ const ctx = canvas.getContext("2d");
+
+ ctx.transform(6.4, 0, 0, -6.4, 30, 60);
+
+ ctx.beginPath();
+ ctx.moveTo(3.34488, -15.90236);
+ ctx.lineTo(22.36535, -2.94803);
+ ctx.lineTo(13.01102, 7.14331);
+ ctx.lineTo(1.33228, 0.34016);
+ ctx.lineTo(5.10236, -7.08661);
+ ctx.lineTo(-1.38898, -9.41102);
+ ctx.lineTo(1.24724, -15.10866);
+ ctx.closePath();
+ ctx.clip("evenodd");
+
+ var gradient = ctx.createRadialGradient(10, 10, 10, 20, 20, 40);
+ gradient.addColorStop(0, '#FF0000');
+ gradient.addColorStop(1, '#00FF00');
+
+ ctx.fillStyle = gradient;
+ ctx.fillRect(-1.78583, -16.46929, 23.21575, 24.20787);
+ </script>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/134706-1-left-scrollframe-ref.html b/layout/reftests/bugs/134706-1-left-scrollframe-ref.html
new file mode 100644
index 0000000000..f95c00b34a
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-left-scrollframe-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:yellow; width: 200px; height: 50px">
+ <div style="background:purple; width: 150px; height: 50px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-left-scrollframe.html b/layout/reftests/bugs/134706-1-left-scrollframe.html
new file mode 100644
index 0000000000..847ecc4586
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-left-scrollframe.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-left-table-ref.html b/layout/reftests/bugs/134706-1-left-table-ref.html
new file mode 100644
index 0000000000..e55422b8c7
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-left-table-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:purple; width: 150px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-left-table.html b/layout/reftests/bugs/134706-1-left-table.html
new file mode 100644
index 0000000000..08d0f312f0
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-left-table.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-right-scrollframe-ref.html b/layout/reftests/bugs/134706-1-right-scrollframe-ref.html
new file mode 100644
index 0000000000..f0a742fe85
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-right-scrollframe-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:yellow; width: 200px; height: 50px">
+ <div style="background:purple; width: 150px; height: 50px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-right-scrollframe.html b/layout/reftests/bugs/134706-1-right-scrollframe.html
new file mode 100644
index 0000000000..2e3361a991
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-right-scrollframe.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-right-table-ref.html b/layout/reftests/bugs/134706-1-right-table-ref.html
new file mode 100644
index 0000000000..25781bfb88
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-right-table-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:purple; width: 150px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-1-right-table.html b/layout/reftests/bugs/134706-1-right-table.html
new file mode 100644
index 0000000000..e7db405120
--- /dev/null
+++ b/layout/reftests/bugs/134706-1-right-table.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-left-ref.html b/layout/reftests/bugs/134706-2-left-ref.html
new file mode 100644
index 0000000000..e5b8073a1e
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-left-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:yellow; width: 200px; height: 100px">
+ <div style="background:purple; width: 150px; height: 100px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-left-scrollframe.html b/layout/reftests/bugs/134706-2-left-scrollframe.html
new file mode 100644
index 0000000000..dd98337bf8
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-left-scrollframe.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-left-table.html b/layout/reftests/bugs/134706-2-left-table.html
new file mode 100644
index 0000000000..a188e1617d
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-left-table.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-right-ref.html b/layout/reftests/bugs/134706-2-right-ref.html
new file mode 100644
index 0000000000..45edb26294
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-right-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:yellow; width: 200px; height: 100px">
+ <div style="background:purple; width: 150px; height: 100px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-right-scrollframe.html b/layout/reftests/bugs/134706-2-right-scrollframe.html
new file mode 100644
index 0000000000..2c3b1b889f
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-right-scrollframe.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-2-right-table.html b/layout/reftests/bugs/134706-2-right-table.html
new file mode 100644
index 0000000000..56fcea3fd9
--- /dev/null
+++ b/layout/reftests/bugs/134706-2-right-table.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ <span style="width: 150px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-left-scrollframe-ref.html b/layout/reftests/bugs/134706-3-left-scrollframe-ref.html
new file mode 100644
index 0000000000..1cd208f19d
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-left-scrollframe-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:purple; width: 200px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-left-scrollframe.html b/layout/reftests/bugs/134706-3-left-scrollframe.html
new file mode 100644
index 0000000000..64a865eeaa
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-left-scrollframe.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 250px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-left-table-ref.html b/layout/reftests/bugs/134706-3-left-table-ref.html
new file mode 100644
index 0000000000..fec45e6daf
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-left-table-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 150px; background: aqua">
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; clear:left; background:purple; width: 250px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-left-table.html b/layout/reftests/bugs/134706-3-left-table.html
new file mode 100644
index 0000000000..fcc79fef12
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-left-table.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:left; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 250px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-right-scrollframe-ref.html b/layout/reftests/bugs/134706-3-right-scrollframe-ref.html
new file mode 100644
index 0000000000..0c74b79669
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-right-scrollframe-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: aqua">
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; background:purple; width: 200px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-right-scrollframe.html b/layout/reftests/bugs/134706-3-right-scrollframe.html
new file mode 100644
index 0000000000..8bb7420fd7
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-right-scrollframe.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <div style="overflow: hidden; background: yellow">
+ <span style="width: 250px; height: 50px; background: purple"></span>
+ </div>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-right-table-ref.html b/layout/reftests/bugs/134706-3-right-table-ref.html
new file mode 100644
index 0000000000..14c60c7500
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-right-table-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 150px; background: aqua">
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+ <div style="float:left; clear:right; background:purple; width: 250px; height: 50px"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-3-right-table.html b/layout/reftests/bugs/134706-3-right-table.html
new file mode 100644
index 0000000000..579de72f8e
--- /dev/null
+++ b/layout/reftests/bugs/134706-3-right-table.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ span { display: inline-block; vertical-align: bottom; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+
+ <div style="float:right; background:blue; width: 100px; height: 100px"></div>
+
+ <table style="background: yellow"><tr><td>
+ <span style="width: 250px; height: 50px; background: purple"></span>
+ </td></tr></table>
+
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-4-ref.html b/layout/reftests/bugs/134706-4-ref.html
new file mode 100644
index 0000000000..f19d07756e
--- /dev/null
+++ b/layout/reftests/bugs/134706-4-ref.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 150px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 150px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 150px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 150px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 100px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 100px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 100px; height: 10px; background: purple"></div>
+</div>
+
+<div style="width: 300px; height: 20px; background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="float:left; width: 100px; height: 10px; background: purple"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-4.html b/layout/reftests/bugs/134706-4.html
new file mode 100644
index 0000000000..198209c403
--- /dev/null
+++ b/layout/reftests/bugs/134706-4.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <table style="background: yellow"><tr><td>
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <table style="background: yellow"><tr><td>
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <table style="background: yellow"><tr><td>
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <table style="background: yellow"><tr><td>
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="overflow: hidden; background: yellow">
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="overflow: hidden; background: yellow">
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:left; background:silver; width: 100px; height: 6px"></div>
+ <div style="overflow: hidden; background: yellow">
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 100px; height: 20px"></div>
+ <div style="float:right; background:silver; width: 100px; height: 6px"></div>
+ <div style="overflow: hidden; background: yellow">
+ <div style="width: 150px; height: 10px; background: purple"></div>
+ </div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-5-ref.html b/layout/reftests/bugs/134706-5-ref.html
new file mode 100644
index 0000000000..f7fd7b9959
--- /dev/null
+++ b/layout/reftests/bugs/134706-5-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 10px; }
+
+ </style>
+</head>
+<body>
+
+<div style="width: 300px; height: 40px;background: aqua">
+ <div style="float:left; background:blue; width: 200px; height: 20px"></div>
+ <div style="float:left; clear: left; background: yellow; width: 150px; height: 20px">50%</div>
+</div>
+
+<div style="width: 300px; height: 40px;background: aqua">
+ <div style="float:right; background:blue; width: 200px; height: 20px"></div>
+ <div style="float:left; clear: right; background: yellow; width: 150px; height: 20px">50%</div>
+</div>
+
+<div style="width: 300px; height: 40px;background: aqua">
+ <div style="float:left; background:blue; width: 200px; height: 20px"></div>
+ <div style="float:left; clear: left; background: yellow; width: 150px; height: 20px">50%</div>
+</div>
+
+<div style="width: 300px; height: 40px;background: aqua">
+ <div style="float:right; background:blue; width: 200px; height: 20px"></div>
+ <div style="float:left; clear: right; background: yellow; width: 150px; height: 20px">50%</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-5.html b/layout/reftests/bugs/134706-5.html
new file mode 100644
index 0000000000..1e03e8bd54
--- /dev/null
+++ b/layout/reftests/bugs/134706-5.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 10px; }
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; vertical-align: top; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 200px; height: 20px"></div>
+ <table style="background: yellow" width="50%" height="20"><tr><td>50%</td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 200px; height: 20px"></div>
+ <table style="background: yellow" width="50%" height="20"><tr><td>50%</td></tr></table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; background:blue; width: 200px; height: 20px"></div>
+ <div style="overflow:hidden; background: yellow; width: 50%; height: 20px;">50%</div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:right; background:blue; width: 200px; height: 20px"></div>
+ <div style="overflow:hidden; background: yellow; width: 50%; height: 20px;">50%</div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-6-ref.html b/layout/reftests/bugs/134706-6-ref.html
new file mode 100644
index 0000000000..7b5afc5b01
--- /dev/null
+++ b/layout/reftests/bugs/134706-6-ref.html
@@ -0,0 +1,178 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+
+ table { margin: 0; border-spacing: 0; }
+ caption, td, th { padding: 0; vertical-align: top; text-align: left; }
+
+ .capref { background: yellow; }
+ .tabref { background: purple; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+
+ <div class="capref" style="float:right; height: 30px; width: 100px; margin-right: 130px;">Caption</div>
+
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+
+ <div class="tabref" style="float:right; clear: right; height: 30px; width: 230px;">Cell</div>
+
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+
+ <div class="capref" style="float:right; height: 30px; width: 190px;">Caption</div>
+
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+
+ <div class="tabref" style="float:right; clear: right; height: 30px; width: 100px; margin-right: 90px;">Cell</div>
+
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+
+ <div class="tabref" style="float:right; clear: right; height: 30px; width: 227px;margin-right:3px;">Cell</div>
+
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+
+ <div class="capref" style="float:right; clear: right; height: 30px; width: 100px;margin-right:130px;">Caption</div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+
+ <div class="tabref" style="float:right; clear: right; height: 30px; width: 100px; margin-right:95px;">Cell</div>
+
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+
+ <div class="capref" style="float:right; clear: right; height: 30px; width: 192px; margin-right:3px;">Caption</div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-6.html b/layout/reftests/bugs/134706-6.html
new file mode 100644
index 0000000000..3f5cfd2833
--- /dev/null
+++ b/layout/reftests/bugs/134706-6.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+
+ table { margin: 0; border-spacing: 0; }
+ caption, td, th { padding: 0; vertical-align: top; text-align: left; }
+
+ table table caption { background: yellow; }
+ table table { background: purple; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+ <table>
+ <caption style="caption-side: top; height:30px; width: 100px;">Caption</caption>
+ <tr><td><div style="height: 30px; width: 230px">Cell</div></td></tr>
+ </table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+ <table>
+ <caption style="caption-side: top; height:30px; width: 190px;">Caption</caption>
+ <tr><td><div style="height: 30px; width: 100px">Cell</div></td></tr>
+ </table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+ <table>
+ <caption style="caption-side: bottom; height:30px; width: 100px;">Caption</caption>
+ <tr><td><div style="height: 30px; width: 227px">Cell</div></td></tr>
+ </table>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+ <table>
+ <caption style="caption-side: bottom; height:30px; width: 192px;">Caption</caption>
+ <tr><td><div style="height: 30px; width: 100px">Cell</div></td></tr>
+ </table>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-6b-ref.html b/layout/reftests/bugs/134706-6b-ref.html
new file mode 100644
index 0000000000..d18740c2f8
--- /dev/null
+++ b/layout/reftests/bugs/134706-6b-ref.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+
+ table { margin: 0; border-spacing: 0; }
+ caption, td, th { padding: 0; vertical-align: top; text-align: left; }
+
+ .capref { background: yellow; }
+ .tabref { background: purple; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+
+ <div style="float: right; width: 192px; height: 30px; margin-right: 3px;"
+ ><div class="capref" style="display: inline-block; vertical-align: top; height: 30px; width: 90px;">Caption</div
+ ><div class="tabref" style="display: inline-block; vertical-align: top; height: 30px; width: 102px;">Cell</div
+ ></div>
+
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-6c-ref.html b/layout/reftests/bugs/134706-6c-ref.html
new file mode 100644
index 0000000000..c516526490
--- /dev/null
+++ b/layout/reftests/bugs/134706-6c-ref.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+
+ table { margin: 0; border-spacing: 0; }
+ caption, td, th { padding: 0; vertical-align: top; text-align: left; }
+
+ .capref { background: yellow; }
+ .tabref { background: purple; }
+
+ </style>
+</head>
+<body>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float:left; clear:left; background:blue; width:150px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:145px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:140px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:135px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:130px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:125px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:120px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:115px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:110px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:105px; height:1px"></div>
+
+ <div style="float: right; width: 192px; height: 30px; margin-right: 3px;"
+ ><div class="tabref" style="display: inline-block; vertical-align: top; height: 30px; width: 102px;">Cell</div
+ ><div class="capref" style="display: inline-block; vertical-align: top; height: 30px; width: 90px;">Caption</div
+ ></div>
+
+ <div style="float:left; clear:left; background:blue; width:100px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:95px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:90px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:85px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:80px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:75px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:70px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:65px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:60px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:55px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:50px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:45px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:40px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:35px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:30px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:25px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:20px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:15px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:10px; height:1px"></div>
+ <div style="float:left; clear:left; background:blue; width:5px; height:1px"></div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-7-ref.html b/layout/reftests/bugs/134706-7-ref.html
new file mode 100644
index 0000000000..5f87f3ab8a
--- /dev/null
+++ b/layout/reftests/bugs/134706-7-ref.html
@@ -0,0 +1,111 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; vertical-align: top; }
+
+ </style>
+</head>
+<body>
+
+<!-- 6px margin between (from top, from bottom, from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow; margin-top: 1px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow; margin-top: 1px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow; margin-top: 1px;"></div>
+</td></tr></table>
+
+<!-- 5px margin between (from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<!-- 4px margin between (from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<!-- negative margin between -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="float: left; clear: left; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/134706-7.html b/layout/reftests/bugs/134706-7.html
new file mode 100644
index 0000000000..875ea8fa82
--- /dev/null
+++ b/layout/reftests/bugs/134706-7.html
@@ -0,0 +1,114 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>CSS 2.1 Test Suite: Test for flow around floats</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+ <meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+ <meta name="flags" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { margin: 0; border-spacing: 0; }
+ td, th { padding: 0; vertical-align: top; }
+
+ </style>
+</head>
+<body>
+
+<!-- 6px margin between (from top, from bottom, from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 6px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 6px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 6px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 6px;"></div>
+</td></tr></table>
+
+<!-- 5px margin between (from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 5px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 5px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 10px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: -5px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -5px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 10px;"></div>
+</td></tr></table>
+
+<!-- 4px margin between (from both) -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 4px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 4px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -1px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 5px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -1px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 5px;"></div>
+</td></tr></table>
+
+<!-- negative margin between -->
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -4px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: 0px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: 0px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: -4px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -4px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: -1px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -1px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: -4px;"></div>
+</td></tr></table>
+
+<table width="300" style="background: aqua"><tr><td>
+ <div style="float: left; height: 10px; width: 150px; background: blue"></div>
+ <div style="height: 5px; background: purple; margin-bottom: -4px;"></div>
+ <div style="overflow: hidden; width: 200px; height: 5px; background: yellow; margin-top: -4px;"></div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1348481-1.html b/layout/reftests/bugs/1348481-1.html
new file mode 100644
index 0000000000..fae677e1f5
--- /dev/null
+++ b/layout/reftests/bugs/1348481-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<link id="target" rel="stylesheet" href="data:text/css,">
+<link rel="stylesheet" href="data:text/css,div { color: green }">
+<link rel="stylesheet" href="data:text/css,">
+<div>This should be green</div>
+<script>
+ onload = function() {
+ var link = document.createElement("link");
+ link.rel = "stylesheet";
+ link.href = "data:text/css,div { color: red; }";
+ link.title = "turnitred";
+ var target = document.getElementById("target");
+ target.parentNode.insertBefore(link, target);
+ }
+</script>
diff --git a/layout/reftests/bugs/1348481-2.html b/layout/reftests/bugs/1348481-2.html
new file mode 100644
index 0000000000..4d197d6a0f
--- /dev/null
+++ b/layout/reftests/bugs/1348481-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,div { color: green }">
+<link rel="stylesheet" href="data:text/css,div { color: green }">
+<div>This should be green</div>
+<script>
+ onload = function() {
+ var links = document.getElementsByTagName("link");
+ links[0].remove();
+ }
+</script>
diff --git a/layout/reftests/bugs/1348481-ref.html b/layout/reftests/bugs/1348481-ref.html
new file mode 100644
index 0000000000..cd4a755bb7
--- /dev/null
+++ b/layout/reftests/bugs/1348481-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+div {
+ color: green;
+}
+</style>
+<div>This should be green</div>
diff --git a/layout/reftests/bugs/1351924-1-ref.html b/layout/reftests/bugs/1351924-1-ref.html
new file mode 100644
index 0000000000..b97e8b686f
--- /dev/null
+++ b/layout/reftests/bugs/1351924-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 1351924</title>
+<meta charset="UTF-8">
+</head>
+<body>
+ <div id="outer" style="background-color: red; height: auto;">
+ <div style="height: 50%; background-color: blue;">
+ <div style="height: 100%; background-color: green; display: inline-block; vertical-align: top;">Green</div>
+ <div style="height: 100px; background-color: yellow; display: inline-block; vertical-align: top;">Yellow</div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1351924-1.html b/layout/reftests/bugs/1351924-1.html
new file mode 100644
index 0000000000..aba0c9bbab
--- /dev/null
+++ b/layout/reftests/bugs/1351924-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 1351924</title>
+<meta charset="UTF-8">
+</head>
+<body>
+ <div id="outer" style="background-color: red; height: 200px;">
+ <div style="height: 50%; background-color: blue;">
+ <div style="height: 100%; background-color: green; display: inline-block; vertical-align: top;">Green</div>
+ <div style="height: 100px; background-color: yellow; display: inline-block; vertical-align: top;">Yellow</div>
+ </div>
+ </div>
+ <script>
+ let d = document.getElementById("outer");
+ d.offsetHeight; // flush layout
+ d.style.height = "auto";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1351924-2-ref.html b/layout/reftests/bugs/1351924-2-ref.html
new file mode 100644
index 0000000000..c2586a4328
--- /dev/null
+++ b/layout/reftests/bugs/1351924-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 1351924</title>
+<meta charset="UTF-8">
+</head>
+<body>
+ <div id="outer" style="background-color: red; height: 200px;">
+ <div style="height: 50%; background-color: blue;">
+ <div style="height: 100%; background-color: green; display: inline-block; vertical-align: top;">Green</div>
+ <div style="height: 100px; background-color: yellow; display: inline-block; vertical-align: top;">Yellow</div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1351924-2.html b/layout/reftests/bugs/1351924-2.html
new file mode 100644
index 0000000000..033ade6c4c
--- /dev/null
+++ b/layout/reftests/bugs/1351924-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 1351924</title>
+<meta charset="UTF-8">
+</head>
+<body>
+ <div id="outer" style="background-color: red; height: auto;">
+ <div style="height: 50%; background-color: blue;">
+ <div style="height: 100%; background-color: green; display: inline-block; vertical-align: top;">Green</div>
+ <div style="height: 100px; background-color: yellow; display: inline-block; vertical-align: top;">Yellow</div>
+ </div>
+ </div>
+ <script>
+ let d = document.getElementById("outer");
+ d.offsetHeight; // flush layout
+ d.style.height = "200px";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1352306-1-ref.html b/layout/reftests/bugs/1352306-1-ref.html
new file mode 100644
index 0000000000..d4aed1733e
--- /dev/null
+++ b/layout/reftests/bugs/1352306-1-ref.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<div id="container" ng-cloak>
+ Should show up
+</div>
diff --git a/layout/reftests/bugs/1352306-1.html b/layout/reftests/bugs/1352306-1.html
new file mode 100644
index 0000000000..69e1c3c059
--- /dev/null
+++ b/layout/reftests/bugs/1352306-1.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<div id="container" ng-cloak>
+ Should show up
+</div>
+<style>
+[ng-cloak] {
+ display:none !important;
+}
+</style>
+<script>
+document.body.offsetTop;
+</script>
+<style>
+.ng-foo {
+ color: red;
+}
+</style>
+<script>
+container.removeAttribute("ng-cloak");
+</script>
diff --git a/layout/reftests/bugs/1352464-1-ref.html b/layout/reftests/bugs/1352464-1-ref.html
new file mode 100644
index 0000000000..34f033e03c
--- /dev/null
+++ b/layout/reftests/bugs/1352464-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ td::before { content: "Test"; display: inline-block; border: 3px solid black }
+</style>
+<table>
+ <tr>
+ <td style="width: 300px"></td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1352464-1.html b/layout/reftests/bugs/1352464-1.html
new file mode 100644
index 0000000000..5968392a26
--- /dev/null
+++ b/layout/reftests/bugs/1352464-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ td::before { content: "Test"; display: inline-block; border: 3px solid black }
+</style>
+<table>
+ <tr>
+ <td width="300"></td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1358375-1.html b/layout/reftests/bugs/1358375-1.html
new file mode 100644
index 0000000000..4087973d41
--- /dev/null
+++ b/layout/reftests/bugs/1358375-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.color = 'orange';
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1358375-2.html b/layout/reftests/bugs/1358375-2.html
new file mode 100644
index 0000000000..c7be35dd25
--- /dev/null
+++ b/layout/reftests/bugs/1358375-2.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { color: orange; }
+#x { color: green; }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.setProperty('color', 'orange', 'important');
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1358375-3.html b/layout/reftests/bugs/1358375-3.html
new file mode 100644
index 0000000000..55fe031f9e
--- /dev/null
+++ b/layout/reftests/bugs/1358375-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+#x { }
+#x { color: green; }
+ </style>
+ </head>
+ <body onload="getComputedStyle(document.getElementById('x')).color;
+ document.styleSheets[0].cssRules[0].style.setProperty('color', 'orange', 'important');
+ document.documentElement.removeAttribute('class');">
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1358375-ref.html b/layout/reftests/bugs/1358375-ref.html
new file mode 100644
index 0000000000..2f0536e9d4
--- /dev/null
+++ b/layout/reftests/bugs/1358375-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+#x { color: orange; }
+ </style>
+ </head>
+ <body>
+ <div id="x"><span>I should be orange</span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1364280-1-ref.html b/layout/reftests/bugs/1364280-1-ref.html
new file mode 100644
index 0000000000..d50d8250e2
--- /dev/null
+++ b/layout/reftests/bugs/1364280-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ div { color: green; }
+</style>
+<body dir="ltr">
+ <div>
+ This should be green.
+ </div>
+</body>
diff --git a/layout/reftests/bugs/1364280-1.html b/layout/reftests/bugs/1364280-1.html
new file mode 100644
index 0000000000..6573787fd9
--- /dev/null
+++ b/layout/reftests/bugs/1364280-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<style>
+ div { color: red; }
+ div:dir(ltr) { color: green }
+</style>
+<body dir="rtl"
+ onload="window.oldColor = getComputedStyle(document.querySelector('div')).color;
+ document.body.dir = 'ltr'">
+ <div>
+ This should be green.
+ </div>
+</body>
diff --git a/layout/reftests/bugs/1364280-2-ref.html b/layout/reftests/bugs/1364280-2-ref.html
new file mode 100644
index 0000000000..5d481ce30c
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+ span { color: green }
+</style>
+<body dir="rtl">
+ <div dir=""></div>
+ <span>This should be green</span>
+</body>
diff --git a/layout/reftests/bugs/1364280-2a.html b/layout/reftests/bugs/1364280-2a.html
new file mode 100644
index 0000000000..7fde4e0b79
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ span { color: red; }
+ div:dir(rtl) + span { color: green; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+ <div dir="auto"></div>
+ <span>This should be green</span>
+</body>
diff --git a/layout/reftests/bugs/1364280-2b.html b/layout/reftests/bugs/1364280-2b.html
new file mode 100644
index 0000000000..8d8d8f48ec
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ span { color: green; }
+ div:not(:dir(rtl)) + span { color: red; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+ <div dir="auto"></div>
+ <span>This should be green</span>
+</body>
diff --git a/layout/reftests/bugs/1364280-2c.html b/layout/reftests/bugs/1364280-2c.html
new file mode 100644
index 0000000000..db8a2f2d80
--- /dev/null
+++ b/layout/reftests/bugs/1364280-2c.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ span { color: green; }
+ div[dir="auto"]:dir(ltr) + span { color: red; }
+</style>
+<body dir="rtl" onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; document.querySelector('[dir=auto]').setAttribute('dir', '')">
+ <div dir="auto"></div>
+ <span>This should be green</span>
+</body>
diff --git a/layout/reftests/bugs/1364360-1-ref.html b/layout/reftests/bugs/1364360-1-ref.html
new file mode 100644
index 0000000000..17fc280db3
--- /dev/null
+++ b/layout/reftests/bugs/1364360-1-ref.html
@@ -0,0 +1,15 @@
+<!-- Quirks mode on purpose -->
+<html>
+ <body style="margin: 0; padding: 0; border: none;"></body>
+ <script>
+ var html = document.documentElement;
+ var div = document.createElement("div");
+ div.style.height = "4000px";
+ html.appendChild(div);
+ html.appendChild(document.createTextNode("text"));
+ div = document.createElement("div");
+ div.style.height = "4000px";
+ html.appendChild(div);
+ document.body.scrollTop = 4000;
+ </script>
+</html>
diff --git a/layout/reftests/bugs/1364360-1.html b/layout/reftests/bugs/1364360-1.html
new file mode 100644
index 0000000000..20f8e18363
--- /dev/null
+++ b/layout/reftests/bugs/1364360-1.html
@@ -0,0 +1,15 @@
+<!-- Quirks mode on purpose -->
+<html>
+ <body style="display:none;"></body>
+ <script>
+ var html = document.documentElement;
+ var div = document.createElement("div");
+ div.style.height = "4000px";
+ html.appendChild(div);
+ html.appendChild(document.createTextNode("text"));
+ div = document.createElement("div");
+ div.style.height = "4000px";
+ html.appendChild(div);
+ document.body.scrollTop = 4000;
+ </script>
+</html>
diff --git a/layout/reftests/bugs/1365159-1-ref.html b/layout/reftests/bugs/1365159-1-ref.html
new file mode 100644
index 0000000000..2e57a292c3
--- /dev/null
+++ b/layout/reftests/bugs/1365159-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<table border="0">
+ <tr><td>There should be</td></tr>
+ <tr><td>no borders visible</td></tr>
+</table>
diff --git a/layout/reftests/bugs/1365159-1.html b/layout/reftests/bugs/1365159-1.html
new file mode 100644
index 0000000000..b7583ffeb3
--- /dev/null
+++ b/layout/reftests/bugs/1365159-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<table border="1">
+ <tr><td>There should be</td></tr>
+ <tr><td>no borders visible</td></tr>
+</table>
+<script>
+ onload = function() { document.querySelector("table").border = "0"; }
+</script>
diff --git a/layout/reftests/bugs/1365162-1-ref.html b/layout/reftests/bugs/1365162-1-ref.html
new file mode 100644
index 0000000000..140cda7606
--- /dev/null
+++ b/layout/reftests/bugs/1365162-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+p { color: green; }
+</style>
+<div lang="zh">
+ <div>
+ <p>This text should be green.</p>
+ </div>
+</div>
+<p>This text should be green.</p>
diff --git a/layout/reftests/bugs/1365162-1.html b/layout/reftests/bugs/1365162-1.html
new file mode 100644
index 0000000000..cf285f2001
--- /dev/null
+++ b/layout/reftests/bugs/1365162-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+p { color: red; }
+p:lang(zh) { color: green; }
+div:lang(zh) + p { color: green; }
+</style>
+<body onload="document.querySelector('div').lang = 'zh'">
+<div lang="en">
+ <div>
+ <p>This text should be green.</p>
+ </div>
+</div>
+<p>This text should be green.</p>
diff --git a/layout/reftests/bugs/1366144-ref.html b/layout/reftests/bugs/1366144-ref.html
new file mode 100644
index 0000000000..3631e25a46
--- /dev/null
+++ b/layout/reftests/bugs/1366144-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+ div::after { color: green; content: "Bar"; }
+</style>
+<div></div>
diff --git a/layout/reftests/bugs/1366144.html b/layout/reftests/bugs/1366144.html
new file mode 100644
index 0000000000..744c668ef6
--- /dev/null
+++ b/layout/reftests/bugs/1366144.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+ div::after { color: green }
+ div.foo::after { content: "Bar" }
+</style>
+<div></div>
+<script>
+ onload = function() {
+ document.querySelector('div').classList.add('foo');
+ }
+</script>
diff --git a/layout/reftests/bugs/1367592-1-ref.html b/layout/reftests/bugs/1367592-1-ref.html
new file mode 100644
index 0000000000..1bf26e077a
--- /dev/null
+++ b/layout/reftests/bugs/1367592-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+:root { font-size: 32px; }
+body { font-size: 16px; }
+.y { width: 1rem; height: 1rem; background-color: blue; }
+</style>
+<div><div class=y></div></div>
diff --git a/layout/reftests/bugs/1367592-1.html b/layout/reftests/bugs/1367592-1.html
new file mode 100644
index 0000000000..99bbe9eb1f
--- /dev/null
+++ b/layout/reftests/bugs/1367592-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+:root { font-size: 16px; }
+.x:root { font-size: 32px; }
+body { font-size: 16px; }
+.y { width: 1rem; height: 1rem; background-color: blue; }
+</style>
+<body onload="document.body.offsetWidth; document.documentElement.className = 'x';">
+<div><div class=y></div></div>
diff --git a/layout/reftests/bugs/1368113-1-ref.html b/layout/reftests/bugs/1368113-1-ref.html
new file mode 100644
index 0000000000..e0e5a125ea
--- /dev/null
+++ b/layout/reftests/bugs/1368113-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+ input::placeholder { color: green; }
+</style>
+<input type="number" placeholder="This should be green">
diff --git a/layout/reftests/bugs/1368113-1.html b/layout/reftests/bugs/1368113-1.html
new file mode 100644
index 0000000000..8ee25cab07
--- /dev/null
+++ b/layout/reftests/bugs/1368113-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+ input::placeholder { color: red; }
+ input.green::placeholder { color: green; }
+</style>
+<input type="number" placeholder="This should be green">
+<script>
+ var i = document.querySelector("input");
+ var s = getComputedStyle(i, "::placeholder");
+ // Make sure we've computed the old color.
+ var oldColor = s.color;
+ i.className = "green";
+</script>
diff --git a/layout/reftests/bugs/1369584-1-ref.html b/layout/reftests/bugs/1369584-1-ref.html
new file mode 100644
index 0000000000..b3a3dc620f
--- /dev/null
+++ b/layout/reftests/bugs/1369584-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+ span { color: green; }
+</style>
+<div>
+ <span>This should be green</span>
+</div>
diff --git a/layout/reftests/bugs/1369584-1a.html b/layout/reftests/bugs/1369584-1a.html
new file mode 100644
index 0000000000..80f5114c6f
--- /dev/null
+++ b/layout/reftests/bugs/1369584-1a.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+ span { color: red; }
+ #foo span { color: green }
+</style>
+<div>
+ <span></span>
+</div>
+<div id="foo">
+ <span>This should be green</span>
+</div>
diff --git a/layout/reftests/bugs/1369584-1b.html b/layout/reftests/bugs/1369584-1b.html
new file mode 100644
index 0000000000..c65de3ffaa
--- /dev/null
+++ b/layout/reftests/bugs/1369584-1b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+ span { color: green; }
+ #foo span { color: red; }
+</style>
+<div id="foo">
+ <span></span>
+</div>
+<div>
+ <!-- Trigger a style sharing cache miss and Bloom filter update, in a way that
+ will add an style sharing cache entry our second span can't match -->
+ <div></div>
+</div>
+<div>
+ <span>This should be green</span>
+</div>
diff --git a/layout/reftests/bugs/1369954-1-ref.xhtml b/layout/reftests/bugs/1369954-1-ref.xhtml
new file mode 100644
index 0000000000..3f0a108cf4
--- /dev/null
+++ b/layout/reftests/bugs/1369954-1-ref.xhtml
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ p > span { color: green; }
+ b { color: purple }
+ </style>
+ </head>
+ <body>
+ <div>
+ <span>This should not be green</span>
+ <p>
+ <span>This should be green</span><br/>
+ <b>This should be purple</b>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1369954-1.xhtml b/layout/reftests/bugs/1369954-1.xhtml
new file mode 100644
index 0000000000..81085f8b75
--- /dev/null
+++ b/layout/reftests/bugs/1369954-1.xhtml
@@ -0,0 +1,33 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ div > span { color: green; }
+ p > span { color: red !important; }
+ p { color: purple }
+ </style>
+ <script>
+ customElements.define("custom-div", class extends HTMLDivElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+
+ let style = document.createElement("style");
+ style.textContent = "p > span { color: red; } p { color: purple }";
+ let span = document.createElement("span");
+ span.textContent = "This should not be green";
+ let p = document.createElement("p");
+ p.append(document.createElement("slot"));
+ this.shadowRoot.append(style, span, p);
+ }
+ }, {
+ extends: "div",
+ });
+ </script>
+ </head>
+ <body>
+ <div is="custom-div">
+ <span>This should be green</span><br/>
+ <b>This should be purple</b>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1369985-1-ref.html b/layout/reftests/bugs/1369985-1-ref.html
new file mode 100644
index 0000000000..6ed0f72607
--- /dev/null
+++ b/layout/reftests/bugs/1369985-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+body {
+ padding: 0;
+ margin: 0;
+ font-size: 2px;
+ line-height: 1;
+}
+p {
+ padding: 0;
+ margin: 0;
+}
+</style>
+<body>
+<script>
+ let x = '<p>' + '\u2588'.repeat(100) + '</p>';
+ for (let i = 0; i < 99; i++) {
+ document.write(x)
+ }
+ document.write('<p>ã‚\nã‚</p>');
+ for (let i = 0; i < 300; i++) {
+ document.write(x)
+ }
+</script>
diff --git a/layout/reftests/bugs/1369985-1.html b/layout/reftests/bugs/1369985-1.html
new file mode 100644
index 0000000000..1c9cadde46
--- /dev/null
+++ b/layout/reftests/bugs/1369985-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+body {
+ padding: 0;
+ margin: 0;
+ font-size: 2px;
+ line-height: 1;
+}
+</style>
+<body>
+<script>
+ // This is the constant in nsTextFrame.cpp of the number of lines
+ // which a text run can be built up to.
+ const NUM_LINES_TO_BUILD_TEXT_RUNS = 200;
+ // Since the font-size is small, we need lots of blocks so that it can
+ // be seen clearer whether difference is fuzzy or real failure.
+ let x = '\u2588'.repeat(100) + '<br>';
+ for (let i = 0; i < NUM_LINES_TO_BUILD_TEXT_RUNS / 2 - 1; i++) {
+ document.write(x)
+ }
+ // We want this piece to be in whatever place inside the first
+ // NUM_LINES_TO_BUILD_TEXT_RUNS lines.
+ document.write('ã‚\nã‚<br>');
+ // And we want another NUM_LINES_TO_BUILD_TEXT_RUNS lines to check.
+ for (let i = 0; i < NUM_LINES_TO_BUILD_TEXT_RUNS * 1.5; i++) {
+ document.write(x)
+ }
+</script>
diff --git a/layout/reftests/bugs/1371130-ref.xhtml b/layout/reftests/bugs/1371130-ref.xhtml
new file mode 100644
index 0000000000..81df6e51b5
--- /dev/null
+++ b/layout/reftests/bugs/1371130-ref.xhtml
@@ -0,0 +1,29 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <script>
+ customElements.define("custom-div", class extends HTMLDivElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+
+ let p = document.createElement("p");
+ p.append(document.createElement("slot"));
+ let span = document.createElement("span");
+ span.textContent = "This should not be green.";
+ this.shadowRoot.append(p, span);
+ }
+ }, {
+ extends: "div",
+ });
+ </script>
+ <style>
+ span { color: red; }
+ div > span { color: green; }
+ </style>
+ </head>
+ <body>
+ <div is="custom-div">
+ <span>This should be green.</span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1371130.xhtml b/layout/reftests/bugs/1371130.xhtml
new file mode 100644
index 0000000000..b8166e4b1c
--- /dev/null
+++ b/layout/reftests/bugs/1371130.xhtml
@@ -0,0 +1,29 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <script>
+ customElements.define("custom-div", class extends HTMLDivElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+
+ let p = document.createElement("p");
+ p.append(document.createElement("slot"));
+ let span = document.createElement("span");
+ span.textContent = "This should not be green.";
+ this.shadowRoot.append(p, span);
+ }
+ }, {
+ extends: "div",
+ });
+ </script>
+ <style>
+ span { color: red; }
+ div.x > span { color: green; }
+ </style>
+ </head>
+ <body onload="document.body.offsetTop; document.querySelector('div').className = 'x'">
+ <div is="custom-div">
+ <span>This should be green.</span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1372041-ref.html b/layout/reftests/bugs/1372041-ref.html
new file mode 100644
index 0000000000..1d37ffd076
--- /dev/null
+++ b/layout/reftests/bugs/1372041-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+Shouldn't be red.
diff --git a/layout/reftests/bugs/1372041.css b/layout/reftests/bugs/1372041.css
new file mode 100644
index 0000000000..c3997d3a27
--- /dev/null
+++ b/layout/reftests/bugs/1372041.css
@@ -0,0 +1 @@
+* { color: red }
diff --git a/layout/reftests/bugs/1372041.html b/layout/reftests/bugs/1372041.html
new file mode 100644
index 0000000000..98347d4c1b
--- /dev/null
+++ b/layout/reftests/bugs/1372041.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<link rel="stylesheet" media="print" href="1372041.css">
+Shouldn't be red.
diff --git a/layout/reftests/bugs/1374062-ref.html b/layout/reftests/bugs/1374062-ref.html
new file mode 100644
index 0000000000..e8b74a077a
--- /dev/null
+++ b/layout/reftests/bugs/1374062-ref.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>CSS Test reference</title>
+<style>
+ div { color: green; font-size: 10px; }
+</style>
+<div>
+ Should be green, and have a 10px font-size.
+</div>
diff --git a/layout/reftests/bugs/1374062.html b/layout/reftests/bugs/1374062.html
new file mode 100644
index 0000000000..33c53b2729
--- /dev/null
+++ b/layout/reftests/bugs/1374062.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>
+ Test for bug 1374062: We don't update the root font-size just because the
+ element has no parent element.
+</title>
+<style>
+ :root { font-size: 5px; }
+ [restyled] { color: green; font-size: 2rem; }
+</style>
+<div>
+ Should be green, and have a 10px font-size.
+</div>
+<script>
+ getComputedStyle(document.createElement('div')).color;
+ document.querySelector('div').setAttribute("restyled", "");
+</script>
diff --git a/layout/reftests/bugs/1375315-1-ref.html b/layout/reftests/bugs/1375315-1-ref.html
new file mode 100644
index 0000000000..b216c7dd4a
--- /dev/null
+++ b/layout/reftests/bugs/1375315-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<ul>
+ <li style="overflow: hidden; list-style-position: inside; color: green">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-1.html b/layout/reftests/bugs/1375315-1.html
new file mode 100644
index 0000000000..9fc5e427c8
--- /dev/null
+++ b/layout/reftests/bugs/1375315-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("li").style.color = "green";
+ }
+</script>
+<ul>
+ <li style="overflow: hidden; list-style-position: inside; color: red">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-10-ref.html b/layout/reftests/bugs/1375315-10-ref.html
new file mode 100644
index 0000000000..c20ec6f128
--- /dev/null
+++ b/layout/reftests/bugs/1375315-10-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<button style="display: list-item; color: green">
+ Bullet should be green.
+</button>
diff --git a/layout/reftests/bugs/1375315-10.html b/layout/reftests/bugs/1375315-10.html
new file mode 100644
index 0000000000..5c2d7cb87f
--- /dev/null
+++ b/layout/reftests/bugs/1375315-10.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("button").style.color = "green";
+ }
+</script>
+<button style="display: list-item; color: red">
+ Bullet should be green.
+</button>
diff --git a/layout/reftests/bugs/1375315-11-ref.html b/layout/reftests/bugs/1375315-11-ref.html
new file mode 100644
index 0000000000..f9f095a087
--- /dev/null
+++ b/layout/reftests/bugs/1375315-11-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<select style="display: list-item; list-style-position: inside; color: green">
+ <option>Bullets should be green</option>
+</select>
diff --git a/layout/reftests/bugs/1375315-11.html b/layout/reftests/bugs/1375315-11.html
new file mode 100644
index 0000000000..6a5cc680a6
--- /dev/null
+++ b/layout/reftests/bugs/1375315-11.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("select").style.color = "green";
+ }
+</script>
+<select style="display: list-item; list-style-position: inside; color: red">
+ <option>Bullets should be green</option>
+</select>
diff --git a/layout/reftests/bugs/1375315-12-ref.html b/layout/reftests/bugs/1375315-12-ref.html
new file mode 100644
index 0000000000..1ad5e52f9c
--- /dev/null
+++ b/layout/reftests/bugs/1375315-12-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<select multiple
+ style="display: list-item; list-style-position: inside; color: green">
+ <option>Bullet should be green</option>
+</select>
diff --git a/layout/reftests/bugs/1375315-12.html b/layout/reftests/bugs/1375315-12.html
new file mode 100644
index 0000000000..b54b0a6a1a
--- /dev/null
+++ b/layout/reftests/bugs/1375315-12.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("select").style.color = "green";
+ }
+</script>
+<select multiple
+ style="display: list-item; list-style-position: inside; color: red">
+ <option>Bullet should be green</option>
+</select>
diff --git a/layout/reftests/bugs/1375315-2-ref.html b/layout/reftests/bugs/1375315-2-ref.html
new file mode 100644
index 0000000000..ef0edae2e4
--- /dev/null
+++ b/layout/reftests/bugs/1375315-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<ul>
+ <li style="column-count: 2; width: 50px; list-style-position: inside; color: green">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-2.html b/layout/reftests/bugs/1375315-2.html
new file mode 100644
index 0000000000..6ed35961fd
--- /dev/null
+++ b/layout/reftests/bugs/1375315-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("li").style.color = "green";
+ }
+</script>
+<ul>
+ <li style="column-count: 2; width: 50px; list-style-position: inside; color: red">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-3-ref.html b/layout/reftests/bugs/1375315-3-ref.html
new file mode 100644
index 0000000000..97c5418ddb
--- /dev/null
+++ b/layout/reftests/bugs/1375315-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<ul>
+ <li style="column-count: 2; width: 50px; color: green">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-3.html b/layout/reftests/bugs/1375315-3.html
new file mode 100644
index 0000000000..021f9336a6
--- /dev/null
+++ b/layout/reftests/bugs/1375315-3.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("li").style.color = "green";
+ }
+</script>
+<ul>
+ <li style="column-count: 2; width: 50px; color: red">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-4-ref.html b/layout/reftests/bugs/1375315-4-ref.html
new file mode 100644
index 0000000000..97c5418ddb
--- /dev/null
+++ b/layout/reftests/bugs/1375315-4-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<ul>
+ <li style="column-count: 2; width: 50px; color: green">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-4.html b/layout/reftests/bugs/1375315-4.html
new file mode 100644
index 0000000000..021f9336a6
--- /dev/null
+++ b/layout/reftests/bugs/1375315-4.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("li").style.color = "green";
+ }
+</script>
+<ul>
+ <li style="column-count: 2; width: 50px; color: red">
+ Bullet should be green.
+ </li>
+</ul>
diff --git a/layout/reftests/bugs/1375315-5-ref.html b/layout/reftests/bugs/1375315-5-ref.html
new file mode 100644
index 0000000000..3990197182
--- /dev/null
+++ b/layout/reftests/bugs/1375315-5-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<details open
+ style="display: list-item; padding: 40px; margin: 40px; color: green">
+ Bullet should be green.
+</details>
diff --git a/layout/reftests/bugs/1375315-5.html b/layout/reftests/bugs/1375315-5.html
new file mode 100644
index 0000000000..fe5e0de5cd
--- /dev/null
+++ b/layout/reftests/bugs/1375315-5.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("details").style.color = "green";
+ }
+</script>
+<details open
+ style="display: list-item; padding: 40px; margin: 40px; color: red">
+ Bullet should be green.
+</details>
diff --git a/layout/reftests/bugs/1375315-6-ref.html b/layout/reftests/bugs/1375315-6-ref.html
new file mode 100644
index 0000000000..5e039354f9
--- /dev/null
+++ b/layout/reftests/bugs/1375315-6-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<details open
+ style="display: list-item; list-style-position: inside; color: green">
+ Bullet should be green.
+</details>
diff --git a/layout/reftests/bugs/1375315-6.html b/layout/reftests/bugs/1375315-6.html
new file mode 100644
index 0000000000..8fa1b418b0
--- /dev/null
+++ b/layout/reftests/bugs/1375315-6.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("details").style.color = "green";
+ }
+</script>
+<details open
+ style="display: list-item; list-style-position: inside; color: red">
+ Bullet should be green.
+</details>
diff --git a/layout/reftests/bugs/1375315-7-ref.html b/layout/reftests/bugs/1375315-7-ref.html
new file mode 100644
index 0000000000..bc2a7d83d4
--- /dev/null
+++ b/layout/reftests/bugs/1375315-7-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<fieldset>
+ <legend style="display: list-item; color: green">Bullet should be green</legend>
+</fieldset>
diff --git a/layout/reftests/bugs/1375315-7.html b/layout/reftests/bugs/1375315-7.html
new file mode 100644
index 0000000000..34ec338d16
--- /dev/null
+++ b/layout/reftests/bugs/1375315-7.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("legend").style.color = "green";
+ }
+</script>
+<fieldset>
+ <legend style="display: list-item; color: red">Bullet should be green</legend>
+</fieldset>
diff --git a/layout/reftests/bugs/1375315-8-ref.html b/layout/reftests/bugs/1375315-8-ref.html
new file mode 100644
index 0000000000..36752162c5
--- /dev/null
+++ b/layout/reftests/bugs/1375315-8-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<fieldset style="display: list-item; margin: 40px; color: green">
+ Bullet should be green
+</fieldset>
diff --git a/layout/reftests/bugs/1375315-8.html b/layout/reftests/bugs/1375315-8.html
new file mode 100644
index 0000000000..8b8ec1bd72
--- /dev/null
+++ b/layout/reftests/bugs/1375315-8.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("fieldset").style.color = "green";
+ }
+</script>
+<fieldset style="display: list-item; margin: 40px; color: red">
+ Bullet should be green
+</fieldset>
diff --git a/layout/reftests/bugs/1375315-9-ref.html b/layout/reftests/bugs/1375315-9-ref.html
new file mode 100644
index 0000000000..4ee2a8fdca
--- /dev/null
+++ b/layout/reftests/bugs/1375315-9-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<fieldset style="display: list-item; column-count: 2; width: 100px; color: green">
+ Bullet should be green
+</fieldset>
diff --git a/layout/reftests/bugs/1375315-9.html b/layout/reftests/bugs/1375315-9.html
new file mode 100644
index 0000000000..ff93e1eb26
--- /dev/null
+++ b/layout/reftests/bugs/1375315-9.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var height = document.body.offsetHeight; // Flush layout
+ document.querySelector("fieldset").style.color = "green";
+ }
+</script>
+<fieldset style="display: list-item; column-count: 2; width: 100px; color: red">
+ Bullet should be green
+</fieldset>
diff --git a/layout/reftests/bugs/1375674-ref.html b/layout/reftests/bugs/1375674-ref.html
new file mode 100644
index 0000000000..006dd424da
--- /dev/null
+++ b/layout/reftests/bugs/1375674-ref.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>CSS test reference</title>
+<style>
+ .contents {
+ will-change: opacity;
+ color: green;
+ }
+</style>
+<div class="contents">
+ Should be green.
+</div>
diff --git a/layout/reftests/bugs/1375674.html b/layout/reftests/bugs/1375674.html
new file mode 100644
index 0000000000..2d5d7fa77b
--- /dev/null
+++ b/layout/reftests/bugs/1375674.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<title>
+ Reftest for bug 1375674: display: contents changes were assumed handled
+ incorrectly
+</title>
+<style>
+ .contents { color: red; display: contents; }
+ .contents.restyled { will-change: opacity; color: green; }
+</style>
+<div class="contents">
+ Should be green.
+</div>
+<script>
+onload = () => {
+ document.body.offsetTop;
+ document.querySelector('.contents').classList.add('restyled');
+}
+</script>
diff --git a/layout/reftests/bugs/1376092-ref.html b/layout/reftests/bugs/1376092-ref.html
new file mode 100644
index 0000000000..4b263f1ad2
--- /dev/null
+++ b/layout/reftests/bugs/1376092-ref.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<style>
+* { color: green }
+</style>
+Should be green.
diff --git a/layout/reftests/bugs/1376092.css b/layout/reftests/bugs/1376092.css
new file mode 100644
index 0000000000..7f11fbbca9
--- /dev/null
+++ b/layout/reftests/bugs/1376092.css
@@ -0,0 +1 @@
+* { color: green }
diff --git a/layout/reftests/bugs/1376092.html b/layout/reftests/bugs/1376092.html
new file mode 100644
index 0000000000..f975497b96
--- /dev/null
+++ b/layout/reftests/bugs/1376092.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html class="reftest-wait">
+<link rel="woof" href="1376092.css">
+<script>
+let link = document.querySelector('link');
+link.onload = function() {
+ link.media = "";
+ document.documentElement.className = "";
+}
+link.media = "only x";
+link.rel = "stylesheet";
+</script>
+Should be green.
+</html>
diff --git a/layout/reftests/bugs/1377447-1-ref.html b/layout/reftests/bugs/1377447-1-ref.html
new file mode 100644
index 0000000000..919ac05704
--- /dev/null
+++ b/layout/reftests/bugs/1377447-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
diff --git a/layout/reftests/bugs/1377447-1.html b/layout/reftests/bugs/1377447-1.html
new file mode 100644
index 0000000000..b026938de5
--- /dev/null
+++ b/layout/reftests/bugs/1377447-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<link rel="stylesheet" href="nothing">
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
diff --git a/layout/reftests/bugs/1377447-2.html b/layout/reftests/bugs/1377447-2.html
new file mode 100644
index 0000000000..4606e5c95a
--- /dev/null
+++ b/layout/reftests/bugs/1377447-2.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html>
+<input type="text">
diff --git a/layout/reftests/bugs/1379041-ref.html b/layout/reftests/bugs/1379041-ref.html
new file mode 100644
index 0000000000..83d71efc1f
--- /dev/null
+++ b/layout/reftests/bugs/1379041-ref.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<html style="font-size: 8px">
+<div style="font-size: 2rem; color: black;">Should be 16px black text.</div>
+</html>
diff --git a/layout/reftests/bugs/1379041.html b/layout/reftests/bugs/1379041.html
new file mode 100644
index 0000000000..29e73340eb
--- /dev/null
+++ b/layout/reftests/bugs/1379041.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html style="font-size: 8px">
+<div style="font-size: 2rem">Should be 16px black text.</div>
+<script>
+window.onload = function() {
+ let div = document.querySelector('div');
+ window.getDefaultComputedStyle(div).color;
+ div.style.color = "black";
+}
+</script>
+</html>
diff --git a/layout/reftests/bugs/1379696-ref.html b/layout/reftests/bugs/1379696-ref.html
new file mode 100644
index 0000000000..fc47335fb4
--- /dev/null
+++ b/layout/reftests/bugs/1379696-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+ .bar:before {
+ content:'SHOULD NOT BE ORANGE'
+ }
+ .foo:before {
+ content:'SHOULD BE ORANGE'
+ }
+ .foo:before {
+ background-color: orange;
+ }
+</style>
+<div class="bar"></div>
+<div class="foo"></div>
diff --git a/layout/reftests/bugs/1379696.html b/layout/reftests/bugs/1379696.html
new file mode 100644
index 0000000000..065aec519e
--- /dev/null
+++ b/layout/reftests/bugs/1379696.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+ .bar:before {
+ content:'SHOULD NOT BE ORANGE'
+ }
+ .foo:before {
+ content:'SHOULD BE ORANGE'
+ }
+ :-moz-any(.foo):before {
+ background-color: orange;
+ }
+</style>
+<div class="bar"></div>
+<div class="foo"></div>
diff --git a/layout/reftests/bugs/1380224-1-ref.html b/layout/reftests/bugs/1380224-1-ref.html
new file mode 100644
index 0000000000..bd39590c26
--- /dev/null
+++ b/layout/reftests/bugs/1380224-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+p { color: green; }
+</style>
+<p>This text should be green.</p>
diff --git a/layout/reftests/bugs/1380224-1.html b/layout/reftests/bugs/1380224-1.html
new file mode 100644
index 0000000000..3257137906
--- /dev/null
+++ b/layout/reftests/bugs/1380224-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+p { color: var(--color); }
+</style>
+<body style="--color: red" onload="run()">
+<p>This text should be green.</p>
+<script>
+function run() {
+ document.body.style.setProperty("--color", "green");
+}
+</script>
diff --git a/layout/reftests/bugs/1381821-ref.html b/layout/reftests/bugs/1381821-ref.html
new file mode 100644
index 0000000000..36dba0b7e4
--- /dev/null
+++ b/layout/reftests/bugs/1381821-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+div { color: green; }
+.red > span { color: red; }
+</style>
+<div><span></span></div>
+<div><span>This text should be green.</span></div>
diff --git a/layout/reftests/bugs/1381821.html b/layout/reftests/bugs/1381821.html
new file mode 100644
index 0000000000..a9af7b4354
--- /dev/null
+++ b/layout/reftests/bugs/1381821.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+div { color: green; }
+.red > span { color: red; }
+</style>
+<div id="first"><span></span></div>
+<div id="second"><span>This text should be green.</span></div>
+<script>
+getComputedStyle(second.firstChild).color;
+getComputedStyle(first.firstChild).color;
+second.className = "red";
+getComputedStyle(second.firstChild).color;
+first.className = "red";
+second.className = "";
+getComputedStyle(second.firstChild).color;
+</script>
diff --git a/layout/reftests/bugs/1384065-ref.html b/layout/reftests/bugs/1384065-ref.html
new file mode 100644
index 0000000000..8ff1ac2199
--- /dev/null
+++ b/layout/reftests/bugs/1384065-ref.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<style>
+div {
+ display: block;
+}
+div::before {
+ content: "Should appear";
+}
+</style>
+<div></div>
diff --git a/layout/reftests/bugs/1384065.html b/layout/reftests/bugs/1384065.html
new file mode 100644
index 0000000000..8f31ba6e1e
--- /dev/null
+++ b/layout/reftests/bugs/1384065.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<style>
+div {
+ display: none;
+}
+div::before {
+ content: "Should appear";
+}
+</style>
+<div></div>
+<script>
+ document.documentElement.offsetTop;
+ document.querySelector('div').style.display = "block";
+</script>
diff --git a/layout/reftests/bugs/1384275-1-ref.html b/layout/reftests/bugs/1384275-1-ref.html
new file mode 100644
index 0000000000..bd39590c26
--- /dev/null
+++ b/layout/reftests/bugs/1384275-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+p { color: green; }
+</style>
+<p>This text should be green.</p>
diff --git a/layout/reftests/bugs/1384275-1.html b/layout/reftests/bugs/1384275-1.html
new file mode 100644
index 0000000000..a5b12b9991
--- /dev/null
+++ b/layout/reftests/bugs/1384275-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+p { color: red; }
+@import url(https://example.invalid/a.css);
+@supports (color: green) {
+ p { color: green; }
+}
+</style>
+<p>This text should be green.</p>
diff --git a/layout/reftests/bugs/139550-1-ref.html b/layout/reftests/bugs/139550-1-ref.html
new file mode 100644
index 0000000000..4e92a54bfa
--- /dev/null
+++ b/layout/reftests/bugs/139550-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 139550 Reference</title>
+</head>
+<body>
+<div style="position: absolute">
+ <table>
+ <tr><td bgcolor="black"><font color="white">text</font></td></tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/139550-1a.html b/layout/reftests/bugs/139550-1a.html
new file mode 100644
index 0000000000..fc860b6b99
--- /dev/null
+++ b/layout/reftests/bugs/139550-1a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 139550</title>
+</head>
+<body>
+<div style="position: absolute">
+ <table width="50%">
+ <tr><td bgcolor="black"><font color="white">text</font></td></tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/139550-1b.html b/layout/reftests/bugs/139550-1b.html
new file mode 100644
index 0000000000..4d1fce508c
--- /dev/null
+++ b/layout/reftests/bugs/139550-1b.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 139550</title>
+</head>
+<body>
+<div style="position: absolute">
+ <table width="50%" align="center">
+ <tr><td bgcolor="black"><font color="white">text</font></td></tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1395650-1-ref.html b/layout/reftests/bugs/1395650-1-ref.html
new file mode 100644
index 0000000000..a3c22b280e
--- /dev/null
+++ b/layout/reftests/bugs/1395650-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<table>
+ <tr><td>This text should be visible</td></tr>
+</table>
diff --git a/layout/reftests/bugs/1395650-1.html b/layout/reftests/bugs/1395650-1.html
new file mode 100644
index 0000000000..1ad68348b3
--- /dev/null
+++ b/layout/reftests/bugs/1395650-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<table style="visibility: collapse">
+ <tbody style="visibility: visible">
+ <tr><td>This text should be visible</td></tr>
+ </tbody>
+</table>
diff --git a/layout/reftests/bugs/1398500-1-ref.html b/layout/reftests/bugs/1398500-1-ref.html
new file mode 100644
index 0000000000..de97671c25
--- /dev/null
+++ b/layout/reftests/bugs/1398500-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { overflow: scroll; border: 1px solid green; }
+ </style>
+ </head>
+ <body>
+ This element should not have scrollbars!
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1398500-1.html b/layout/reftests/bugs/1398500-1.html
new file mode 100644
index 0000000000..0ba98ba5d5
--- /dev/null
+++ b/layout/reftests/bugs/1398500-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { overflow: scroll; border: 1px solid green; }
+ </style>
+ <script>
+ onload = function() {
+ var newBody = document.createElement("body");
+ newBody.textContent = "This element should not have scrollbars!";
+ document.documentElement.appendChild(newBody);
+ window.nooptimize = newBody.offsetWidth;
+ document.body.remove();
+ }
+ </script>
+ </head>
+ <body>
+ First body
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1401317-ref.html b/layout/reftests/bugs/1401317-ref.html
new file mode 100644
index 0000000000..395eab87d2
--- /dev/null
+++ b/layout/reftests/bugs/1401317-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.foo::marker { color: red }
+.foo { color: black; }
+</style>
+</head>
+<body>
+ <ul>
+ <li class="foo">one</li>
+ <li>two</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1401317.html b/layout/reftests/bugs/1401317.html
new file mode 100644
index 0000000000..82e17a8a2f
--- /dev/null
+++ b/layout/reftests/bugs/1401317.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.foo::marker { color: red }
+</style>
+</head>
+<body>
+ <ul>
+ <li class="foo">one</li>
+ <li>two</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1401992-ref.html b/layout/reftests/bugs/1401992-ref.html
new file mode 100644
index 0000000000..8fb36196cf
--- /dev/null
+++ b/layout/reftests/bugs/1401992-ref.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<html>
+<head>
+<style>
+video {
+ width: 100px;
+ height: 100px;
+ border: 10px solid purple;
+}
+fieldset {
+ border: 10px solid blue;
+ border-color: green;
+}
+</style>
+<script>
+</script>
+</head>
+<body>
+<fieldset><video id="x" style="visibility:hidden"></video></fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1401992.html b/layout/reftests/bugs/1401992.html
new file mode 100644
index 0000000000..f48f563a01
--- /dev/null
+++ b/layout/reftests/bugs/1401992.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+<style>
+video {
+ width: 100px;
+ height: 100px;
+ border: 10px solid purple;
+}
+fieldset {
+ border: 10px solid blue;
+}
+fieldset:valid {
+ border-color: green;
+}
+fieldset:invalid {
+ border-color: red;
+}
+</style>
+<script>
+window.onload = function() {
+ let v = document.getElementById("x");
+ v.currentTime = -128;
+ v.controls = !v.controls;
+}
+</script>
+</head>
+<body>
+<!-- Native anonymous content shouldn't affect fieldset validity -->
+<fieldset><video id="x" style="visibility:hidden"></video></fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1404057-noref.html b/layout/reftests/bugs/1404057-noref.html
new file mode 100644
index 0000000000..dc734b6b1f
--- /dev/null
+++ b/layout/reftests/bugs/1404057-noref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+ div {
+ height: 2em;
+ }
+</style>
+<body>
+ <div lang="ja">令</div>
+ <div lang="ja">令</div>
+ <div lang="ja">令</div>
+</body>
diff --git a/layout/reftests/bugs/1404057-ref.html b/layout/reftests/bugs/1404057-ref.html
new file mode 100644
index 0000000000..3c06958591
--- /dev/null
+++ b/layout/reftests/bugs/1404057-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+ div {
+ height: 2em;
+ }
+</style>
+<body>
+ <div lang="zh-CN">令</div>
+ <div lang="ja">令</div>
+ <div lang="ja">令</div>
+</body>
diff --git a/layout/reftests/bugs/1404057.html b/layout/reftests/bugs/1404057.html
new file mode 100644
index 0000000000..3a9e3af26a
--- /dev/null
+++ b/layout/reftests/bugs/1404057.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+ div {
+ height: 2em;
+ }
+</style>
+<body lang="zh-CN">
+ <div>令</div>
+ <div lang="ja">令</div>
+ <div><div lang="ja" style="all: inherit">令</div></div>
+</body>
diff --git a/layout/reftests/bugs/1405878-1-ref.xml b/layout/reftests/bugs/1405878-1-ref.xml
new file mode 100644
index 0000000000..6d1dd199b4
--- /dev/null
+++ b/layout/reftests/bugs/1405878-1-ref.xml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <select>
+ <script>document.documentElement.offsetHeight</script>
+ <option>Hello there</option>
+ <script>document.documentElement.offsetHeight</script>
+ </select>
+</html>
diff --git a/layout/reftests/bugs/1405878-1.xml b/layout/reftests/bugs/1405878-1.xml
new file mode 100644
index 0000000000..3915711b11
--- /dev/null
+++ b/layout/reftests/bugs/1405878-1.xml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <select>
+ <script>document.documentElement.offsetHeight</script>
+ <option>Hello there</option>
+ </select>
+</html>
diff --git a/layout/reftests/bugs/1406179-ref.html b/layout/reftests/bugs/1406179-ref.html
new file mode 100644
index 0000000000..2818238e23
--- /dev/null
+++ b/layout/reftests/bugs/1406179-ref.html
@@ -0,0 +1,4 @@
+<div>
+ <!-- dummy filter to disable subpixel-aa -->
+ <div style="filter: hue-rotate(360deg);">hallo</div>
+</div>
diff --git a/layout/reftests/bugs/1406179.html b/layout/reftests/bugs/1406179.html
new file mode 100644
index 0000000000..49ced346d6
--- /dev/null
+++ b/layout/reftests/bugs/1406179.html
@@ -0,0 +1,3 @@
+<div style="perspective:1000px">
+ <div style="transform-style: preserve-3d">hallo</div>
+</div>
diff --git a/layout/reftests/bugs/1406183-1-ref.html b/layout/reftests/bugs/1406183-1-ref.html
new file mode 100644
index 0000000000..a7a225b34d
--- /dev/null
+++ b/layout/reftests/bugs/1406183-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<title>Reference for bug 1406183: ImageLayer inside inactive BasicLayerManager for fallback nsDisplayFilters is drawn at the wrong position</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.outer {
+ margin-left: 100px;
+ margin-top: 50px;
+ width: 200px;
+ height: 200px;
+}
+
+</style>
+
+<div class="outer">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAFklEQVQImWMwjWhCQwxECoW3oCHihAB0LyYv5/oAHwAAAABJRU5ErkJggg==">
+</div>
diff --git a/layout/reftests/bugs/1406183-1.html b/layout/reftests/bugs/1406183-1.html
new file mode 100644
index 0000000000..4da777ed0f
--- /dev/null
+++ b/layout/reftests/bugs/1406183-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<title>Testcase for bug 1406183: ImageLayer inside inactive BasicLayerManager for fallback nsDisplayFilters is drawn at the wrong position</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.outer {
+ margin-left: 100px;
+ margin-top: 50px;
+ width: 200px;
+ height: 200px;
+}
+
+.filter {
+ height: 200px;
+ filter: hue-rotate(0deg);
+}
+
+</style>
+
+<div class="outer">
+ <div class="filter">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAFklEQVQImWMwjWhCQwxECoW3oCHihAB0LyYv5/oAHwAAAABJRU5ErkJggg==">
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1410028-ref.html b/layout/reftests/bugs/1410028-ref.html
new file mode 100644
index 0000000000..77d4a59090
--- /dev/null
+++ b/layout/reftests/bugs/1410028-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<div style="background-color: blue; width: 100px; height: 100px; padding: 10px"></div>
diff --git a/layout/reftests/bugs/1410028.html b/layout/reftests/bugs/1410028.html
new file mode 100644
index 0000000000..6bbf137182
--- /dev/null
+++ b/layout/reftests/bugs/1410028.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<div></div>
+<script>
+let setStyle = (el, props) => {
+ for (prop in props)
+ el.style.setProperty(prop, props[prop]);
+};
+
+setStyle(document.querySelector('div'), {
+ all: 'initial',
+ 'background-color': 'blue',
+ display: 'block',
+ width: '100px',
+ height: '100px',
+ padding: '10px'
+});
+</script>
diff --git a/layout/reftests/bugs/1412375-ref.html b/layout/reftests/bugs/1412375-ref.html
new file mode 100644
index 0000000000..6589ec8020
--- /dev/null
+++ b/layout/reftests/bugs/1412375-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Masks need to cause grouping / intermediate surfaces</title>
+<style>
+
+.outer {
+ filter: opacity(50%);
+}
+
+.box {
+ width: 100px;
+ height: 100px;
+}
+
+.one {
+ background: green;
+}
+
+.another {
+ background: blue;
+ margin-top: -50px;
+ margin-left: 50px;
+}
+
+</style>
+
+<div class="outer">
+ <div class="one box"></div>
+ <div class="another box"></div>
+</div>
diff --git a/layout/reftests/bugs/1412375.html b/layout/reftests/bugs/1412375.html
new file mode 100644
index 0000000000..caeacfd169
--- /dev/null
+++ b/layout/reftests/bugs/1412375.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Masks need to cause grouping / intermediate surfaces</title>
+<style>
+
+.outer {
+ /* should give similar results to opacity: 0.5 */
+ mask: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
+}
+
+.box {
+ width: 100px;
+ height: 100px;
+}
+
+.one {
+ background: green;
+}
+
+.another {
+ background: blue;
+ margin-top: -50px;
+ margin-left: 50px;
+}
+
+</style>
+
+<div class="outer">
+ <div class="one box"></div>
+ <div class="another box"></div>
+</div>
diff --git a/layout/reftests/bugs/1415987-1-ref.html b/layout/reftests/bugs/1415987-1-ref.html
new file mode 100644
index 0000000000..d55547afe4
--- /dev/null
+++ b/layout/reftests/bugs/1415987-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+
+#pt {
+ scale: 12;
+}
+
+#pp {
+ scale: 12;
+}
+
+ </style>
+</head>
+<body>
+ <div>
+ <svg width="600px" height="600px">
+
+ <text id="pp" x="10" y="16" font-size="12">some text</text>
+ <text id="pt" x="10" y="16" font-size="12">some text</text>
+ <rect fill="#DAD6CC" width="600" height="100"></rect>
+ <rect fill="#DAD6CC" width="120" height="400"></rect>
+
+ </svg>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1415987-1.html b/layout/reftests/bugs/1415987-1.html
new file mode 100644
index 0000000000..bd4974e85e
--- /dev/null
+++ b/layout/reftests/bugs/1415987-1.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+
+#pt {
+ scale: 12;
+}
+
+#pp {
+ /*animation: flyR 1s infinite;*/
+ animation-iteration-count: infinite;
+ animation-duration: 1s;
+ animation-name: flyR;
+ animation-timing-function: steps(2, end)
+}
+
+@keyframes flyR {
+ from {
+ scale: 0.51;
+ }
+
+ 1% {
+ scale: 12;
+ }
+
+
+ 50% {
+ scale: 12;
+ }
+
+ to {
+ scale: 12;
+ }
+}
+
+ </style>
+</head>
+<body>
+ <div>
+ <svg width="600px" height="600px">
+
+ <text id="pp" x="10" y="16" font-size="12">some text</text>
+ <text id="pt" x="10" y="16" font-size="12">some text</text>
+ <rect fill="#DAD6CC" width="600" height="100"></rect>
+ <rect fill="#DAD6CC" width="120" height="400"></rect>
+
+ </svg>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1419820-1-ref.html b/layout/reftests/bugs/1419820-1-ref.html
new file mode 100644
index 0000000000..070ce888f3
--- /dev/null
+++ b/layout/reftests/bugs/1419820-1-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<html>
+<div>
+ <div style="width:100px; height:100px; background-color:green"></div>
+</html>
+
diff --git a/layout/reftests/bugs/1419820-1.html b/layout/reftests/bugs/1419820-1.html
new file mode 100644
index 0000000000..560d0c1160
--- /dev/null
+++ b/layout/reftests/bugs/1419820-1.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+<body>
+<style>
+body
+{
+ transform-style: preserve-3d;
+}
+.absolute
+{
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ transform: translateX(0%);
+ background-color: red;
+}
+.relative
+{
+ position: relative;
+ background-color: green;
+ width: 100px;
+ height: 100px;
+}
+</style>
+ <div>
+ <div class="absolute"></div>
+ <div class="relative"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1420946-1-ref.html b/layout/reftests/bugs/1420946-1-ref.html
new file mode 100644
index 0000000000..d6c5d0200f
--- /dev/null
+++ b/layout/reftests/bugs/1420946-1-ref.html
@@ -0,0 +1,4 @@
+<!-- ~*quirks mode*~ -->
+<div></div>
+<p style="color: green">should be green
+<p>should be unstyled
diff --git a/layout/reftests/bugs/1420946-1.html b/layout/reftests/bugs/1420946-1.html
new file mode 100644
index 0000000000..65fe09aa86
--- /dev/null
+++ b/layout/reftests/bugs/1420946-1.html
@@ -0,0 +1,9 @@
+<!-- ~*quirks mode*~ -->
+<style>
+#lolquirky {
+ color: green;
+}
+</style>
+<div></div>
+<p id="lolQuirky">should be green
+<p>should be unstyled
diff --git a/layout/reftests/bugs/142233-1-ref.html b/layout/reftests/bugs/142233-1-ref.html
new file mode 100644
index 0000000000..a8de7a3636
--- /dev/null
+++ b/layout/reftests/bugs/142233-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>Testcase for bug 142233</title>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-8">
+</head>
+<body>
+<!-- In Mozilla 1.0, LTR (English) letters typed into the input field below
+ will appear in reverse (RTL) order, but they should be in LTR order -->
+<input dir="ltr" style="text-align: left" value="abc">
+</body>
+</html>
diff --git a/layout/reftests/bugs/142233-1.html b/layout/reftests/bugs/142233-1.html
new file mode 100644
index 0000000000..f3b2a84e58
--- /dev/null
+++ b/layout/reftests/bugs/142233-1.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>Testcase for bug 142233</title>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-8">
+</head>
+<body>
+<!-- In Mozilla 1.0, LTR (English) letters typed into the input field below
+ will appear in reverse (RTL) order, but they should be in LTR order -->
+<input dir="rtl" style="text-align: left" value="abc">
+</body>
+</html>
diff --git a/layout/reftests/bugs/1422393-ref.html b/layout/reftests/bugs/1422393-ref.html
new file mode 100644
index 0000000000..8660e2ec7a
--- /dev/null
+++ b/layout/reftests/bugs/1422393-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Table border-collapse borders are too opaque and overlap in the corners</title>
+
+<style>
+
+table {
+ margin: 50px;
+ border-spacing: 0px;
+}
+
+td {
+ border: 10px solid rgba(0, 0, 0, 0.2);
+ width: 50px;
+ height: 50px;
+}
+
+</style>
+
+<table><tr><td></td></tr></table>
diff --git a/layout/reftests/bugs/1422393.html b/layout/reftests/bugs/1422393.html
new file mode 100644
index 0000000000..c9c7308282
--- /dev/null
+++ b/layout/reftests/bugs/1422393.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Table border-collapse borders are too opaque and overlap in the corners</title>
+
+<style>
+
+table {
+ margin: 50px;
+ border-collapse: collapse;
+ border-spacing: 0px;
+}
+
+td {
+ border: 10px solid rgba(0, 0, 0, 0.2);
+ width: 50px;
+ height: 50px;
+}
+
+</style>
+
+<table><tr><td></td></tr></table>
diff --git a/layout/reftests/bugs/1424177-ref.html b/layout/reftests/bugs/1424177-ref.html
new file mode 100644
index 0000000000..fb058b71f7
--- /dev/null
+++ b/layout/reftests/bugs/1424177-ref.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <style>
+ #sel {
+ left: 10px;
+ width: 101px;
+ position: absolute;
+ }
+ </style>
+ </head>
+ <body>
+ <select id="sel"></select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1424177.html b/layout/reftests/bugs/1424177.html
new file mode 100644
index 0000000000..8fcaabeb3d
--- /dev/null
+++ b/layout/reftests/bugs/1424177.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <style>
+ #sel {
+ left: 10.4px;
+ width: 100.4px;
+ position: absolute;
+ }
+ </style>
+ </head>
+ <body>
+ <select id="sel"></select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1424680-ref.html b/layout/reftests/bugs/1424680-ref.html
new file mode 100644
index 0000000000..01f3982b61
--- /dev/null
+++ b/layout/reftests/bugs/1424680-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var floater = document.createElement("span");
+ floater.style.cssFloat = "right";
+ floater.appendChild(document.createTextNode("float"));
+
+ document.getElementById("s").appendChild(floater);
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<span><span id="s"><div></div></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1424680.html b/layout/reftests/bugs/1424680.html
new file mode 100644
index 0000000000..2569a75ac0
--- /dev/null
+++ b/layout/reftests/bugs/1424680.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var floater = document.createElement("span");
+ floater.style.cssFloat = "right";
+ floater.appendChild(document.createTextNode("float"));
+
+ document.getElementById("s").appendChild(floater);
+}
+</script>
+</head>
+
+<body onload="boom();">
+ <span><span><div style="display: contents" id="s"><div></div></div></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1424798-1.html b/layout/reftests/bugs/1424798-1.html
new file mode 100644
index 0000000000..37f7e8edfc
--- /dev/null
+++ b/layout/reftests/bugs/1424798-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<title>Animation between 1-argument and 2-argument transforms should work</title>
+<style>
+#box {
+ transform: translate(0%);
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
+@keyframes anim {
+ from { transform: translate(0%); }
+ to { transform: translate(0%, 100px); }
+}
+#box {
+animation: anim 100s linear -50s paused;
+}
+</style>
+
+<div id="box">
+</div>
diff --git a/layout/reftests/bugs/1424798-ref.html b/layout/reftests/bugs/1424798-ref.html
new file mode 100644
index 0000000000..7b064425b5
--- /dev/null
+++ b/layout/reftests/bugs/1424798-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<title>Animation between 1-argument and 2-argument transforms should work</title>
+<style>
+
+#box {
+ transform: translate(0%, 50px);
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
+
+
+</style>
+
+<div id="box">
+</div>
diff --git a/layout/reftests/bugs/1425243-1-ref.html b/layout/reftests/bugs/1425243-1-ref.html
new file mode 100644
index 0000000000..c11e9cee98
--- /dev/null
+++ b/layout/reftests/bugs/1425243-1-ref.html
@@ -0,0 +1,21 @@
+<style>
+.logo {
+ display: flex;
+ align-items: center;
+ background-color: #4a4a4a;
+ mask: url(pinwheel_logo.svg) center center/contain no-repeat;
+ width: 60px;
+ height: 60px;
+}
+.logo .background {
+ background-image: linear-gradient(red, green);
+ width: 65px;
+ height: 65px;
+ background-size: cover;
+ background-position: 50%;
+ transform: rotate(270deg);
+}
+</style>
+<a class="logo">
+ <span class="background"></span>
+</a>
diff --git a/layout/reftests/bugs/1425243-1.html b/layout/reftests/bugs/1425243-1.html
new file mode 100644
index 0000000000..c1f99540a8
--- /dev/null
+++ b/layout/reftests/bugs/1425243-1.html
@@ -0,0 +1,41 @@
+<html class="reftest-wait">
+<style>
+.logo {
+ display: flex;
+ align-items: center;
+ background-color: #4a4a4a;
+ mask: url(pinwheel_logo.svg) center center/contain no-repeat;
+ width: 60px;
+ height: 60px;
+}
+.logo .background {
+ background-image: linear-gradient(red, green);
+ width: 65px;
+ height: 65px;
+ background-size: cover;
+ background-position: 50%;
+ will-change: transform;
+}
+</style>
+<a class="logo">
+ <span class="background"></span>
+</a>
+<script>
+function doTest() {
+ var i = 0;
+ var e = document.getElementsByClassName("background")[0];
+ var rotator = function() {
+ var rotation = i / 60;
+ e.style.transform = "rotate(" + rotation + "turn)";
+ if (i < 45) {
+ i += 1;
+ window.requestAnimationFrame(rotator);
+ } else {
+ document.documentElement.removeAttribute("class");
+ }
+ };
+ window.requestAnimationFrame(rotator);
+};
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
diff --git a/layout/reftests/bugs/1425243-2-ref.html b/layout/reftests/bugs/1425243-2-ref.html
new file mode 100644
index 0000000000..bda1271243
--- /dev/null
+++ b/layout/reftests/bugs/1425243-2-ref.html
@@ -0,0 +1,8 @@
+<body style="margin:0">
+ <div style="opacity:0.9">
+ <div style="background:blue;height:200px;width:200px;margin:100px;border-radius:100px">
+ </div>
+ <div style="margin:0 100px;">
+ </div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/1425243-2.html b/layout/reftests/bugs/1425243-2.html
new file mode 100644
index 0000000000..7fb33e4aad
--- /dev/null
+++ b/layout/reftests/bugs/1425243-2.html
@@ -0,0 +1,8 @@
+<body style="margin:0">
+ <div style="opacity:0.9">
+ <div style="will-change:transform;background:blue;height:200px;width:200px;margin:100px;border-radius:100px">
+ </div>
+ <div style="border:1px solid transparent;margin:0 100px;">
+ </div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/1430869-ref.html b/layout/reftests/bugs/1430869-ref.html
new file mode 100644
index 0000000000..cc7defbb52
--- /dev/null
+++ b/layout/reftests/bugs/1430869-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="UTF-8">
+ <title>Webrender table caption + border-collapse test</title>
+ <style>
+ table, th, td {
+ border: 1px solid;
+ border-collapse: collapse;
+ }
+ </style>
+</head>
+<body>
+
+<div>
+<span>A<br>B</span>
+<table>
+<tbody><tr>
+<td>row 1</td>
+</tr>
+<tr>
+<td>row 2</td>
+</tr>
+<tr>
+<td>row 3</td>
+</tr>
+<tr>
+<td>row 4</td>
+</tr>
+<tr>
+<td>row 5</td>
+</tr>
+</tbody></table>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/1430869.html b/layout/reftests/bugs/1430869.html
new file mode 100644
index 0000000000..13842fe323
--- /dev/null
+++ b/layout/reftests/bugs/1430869.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="UTF-8">
+ <title>Webrender table caption + border-collapse test</title>
+ <style>
+ table, th, td {
+ border: 1px solid;
+ border-collapse: collapse;
+ }
+ caption {
+ text-align: left;
+ }
+ </style>
+</head>
+<body>
+
+<div>
+<table>
+<caption>A<br>B</caption>
+<tbody><tr>
+<td>row 1</td>
+</tr>
+<tr>
+<td>row 2</td>
+</tr>
+<tr>
+<td>row 3</td>
+</tr>
+<tr>
+<td>row 4</td>
+</tr>
+<tr>
+<td>row 5</td>
+</tr>
+</tbody></table>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/1432541-ref.html b/layout/reftests/bugs/1432541-ref.html
new file mode 100644
index 0000000000..dc7ab3ea0c
--- /dev/null
+++ b/layout/reftests/bugs/1432541-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+.tile-wrapper{overflow:hidden;}
+.tile-wrapper img{position:relative;}
+.tile-33{width:300%;height:300%}
+</style>
+</head>
+<body>
+ <table>
+ <tr>
+ <td><div><div class="tile-wrapper" style="width: 126px; height: 126px"><img class="tile-33" src="repeatable-diagonal-gradient.png" style="top:0%; left: 0%"></div></div></td>
+ </tr>
+ <tr>
+ <td><div><div class="tile-wrapper" style="width: 126px; height: 126px"><img class="tile-33" src="repeatable-diagonal-gradient.png" style="top:-100%; left: 0%"></div></div></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1432541.html b/layout/reftests/bugs/1432541.html
new file mode 100644
index 0000000000..2744c9e75a
--- /dev/null
+++ b/layout/reftests/bugs/1432541.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+.tile-wrapper{transform:scale(1.0);}
+.tile-wrapper{overflow:hidden;}
+.tile-wrapper img{position:relative;}
+.tile-33{width:300%;height:300%}
+</style>
+</head>
+<body>
+ <table>
+ <tr>
+ <td><div><div class="tile-wrapper" style="width: 126px; height: 126px"><img class="tile-33" src="repeatable-diagonal-gradient.png" style="top:0%; left: 0%"></div></div></td>
+ </tr>
+ <tr>
+ <td><div><div class="tile-wrapper" style="width: 126px; height: 126px"><img class="tile-33" src="repeatable-diagonal-gradient.png" style="top:-100%; left: 0%"></div></div></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/144004-1-ref.html b/layout/reftests/bugs/144004-1-ref.html
new file mode 100644
index 0000000000..28c12ee1fe
--- /dev/null
+++ b/layout/reftests/bugs/144004-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html style="margin: 0; padding: 0; border: 0">
+ <head>
+ <script>
+ function test() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("text"));
+ document.documentElement.appendChild(div);
+ }
+ </script>
+ </head>
+ <body style="margin: 0; padding: 0; border: 0">
+ <script>
+ document.body.offsetWidth;
+ test();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/144004-1.html b/layout/reftests/bugs/144004-1.html
new file mode 100644
index 0000000000..7fd91392d8
--- /dev/null
+++ b/layout/reftests/bugs/144004-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html style="display: inline; margin: 0; padding: 0; border: 0">
+ <head>
+ <script>
+ function test() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("text"));
+ document.documentElement.appendChild(div);
+ }
+ </script>
+ </head>
+ <body style="display: inline; margin: 0; padding: 0; border: 0">
+ <script>
+ document.body.offsetWidth;
+ test();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/144004-2-ref.html b/layout/reftests/bugs/144004-2-ref.html
new file mode 100644
index 0000000000..cde03344a5
--- /dev/null
+++ b/layout/reftests/bugs/144004-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function test() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("text"));
+ document.body.appendChild(div);
+ }
+ </script>
+ </head>
+ <body style="margin: 0; padding: 0; border: 0">
+ <script>
+ document.body.offsetWidth;
+ test();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/144004-2.html b/layout/reftests/bugs/144004-2.html
new file mode 100644
index 0000000000..6ba48bb8b4
--- /dev/null
+++ b/layout/reftests/bugs/144004-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function test() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("text"));
+ document.body.appendChild(div);
+ }
+ </script>
+ </head>
+ <body style="display: inline; margin: 0; padding: 0; border: 0">
+ <script>
+ document.body.offsetWidth;
+ test();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/144004-3-ref.html b/layout/reftests/bugs/144004-3-ref.html
new file mode 100644
index 0000000000..59b0d2a7c7
--- /dev/null
+++ b/layout/reftests/bugs/144004-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body style="margin: 0; padding: 0; border: 2px solid black">
+ Text
+ </body>
+</html>
diff --git a/layout/reftests/bugs/144004-3.html b/layout/reftests/bugs/144004-3.html
new file mode 100644
index 0000000000..0a324a1392
--- /dev/null
+++ b/layout/reftests/bugs/144004-3.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body style="display: inline; margin: 0; padding: 0; border: 2px solid black">
+ Text
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1446470.html b/layout/reftests/bugs/1446470.html
new file mode 100644
index 0000000000..e6dc4bc2bf
--- /dev/null
+++ b/layout/reftests/bugs/1446470.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<style>
+div { color: red; }
+@-moz-document url-prefix() {
+ div { color: green; }
+}
+</style>
+<div>Should be green</div>
diff --git a/layout/reftests/bugs/1456111-1.html b/layout/reftests/bugs/1456111-1.html
new file mode 100644
index 0000000000..7908942d3b
--- /dev/null
+++ b/layout/reftests/bugs/1456111-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html reftest-zoom="0.9" class="reftest-wait">
+<meta charset="utf-8">
+<body>
+ <div id="transformed" style="width:200px; height:200px; background-color:red; transform:scale(2)"></div>
+</body>
+<script>
+ function doTest() {
+ document.getElementById("transformed").style.transform = "scale(0)";
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
diff --git a/layout/reftests/bugs/1466008-ref.html b/layout/reftests/bugs/1466008-ref.html
new file mode 100644
index 0000000000..7655e88d9f
--- /dev/null
+++ b/layout/reftests/bugs/1466008-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<div style="position: absolute; left: 0; top: 0; width: 100px; height: 100px; background: green;"></div>
diff --git a/layout/reftests/bugs/1466008.html b/layout/reftests/bugs/1466008.html
new file mode 100644
index 0000000000..4757bf5f47
--- /dev/null
+++ b/layout/reftests/bugs/1466008.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<div style="height: 100px"></div>
+<div style="will-change: backdrop-filter;">
+ <div style="position: absolute; top: 0; left: 0; width: 100px; height: 100px; background: green"></div>
+</div>
diff --git a/layout/reftests/bugs/1466638-1-ref.html b/layout/reftests/bugs/1466638-1-ref.html
new file mode 100644
index 0000000000..9fbfa62cdc
--- /dev/null
+++ b/layout/reftests/bugs/1466638-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<style>
+@keyframes holdBackgroundPosition {
+ from,to { background-position-x: 50%; }
+}
+#test {
+ height: 100px;
+ width: 100px;
+ background-repeat: no-repeat;
+ background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==); /* a 25x25 px red box */
+ animation: holdBackgroundPosition 100s infinite;
+}
+#wrapper {
+ opacity: 0.5;
+}
+</style>
+<div id="wrapper">
+<div id="test"></div>
+</div>
diff --git a/layout/reftests/bugs/1466638-1.html b/layout/reftests/bugs/1466638-1.html
new file mode 100644
index 0000000000..f0d0f6023b
--- /dev/null
+++ b/layout/reftests/bugs/1466638-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<style>
+@keyframes holdBackgroundPosition {
+ from,to { background-position-x: 50%; }
+}
+#test {
+ height: 100px;
+ width: 100px;
+ background-repeat: no-repeat;
+ background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==); /* a 25x25 px red box */
+ animation: holdBackgroundPosition 100s infinite;
+}
+#wrapper {
+ filter: opacity(0.5);
+}
+</style>
+<div id="wrapper">
+<div id="test"></div>
+</div>
diff --git a/layout/reftests/bugs/1475971-1-ref.html b/layout/reftests/bugs/1475971-1-ref.html
new file mode 100644
index 0000000000..220bc71cc3
--- /dev/null
+++ b/layout/reftests/bugs/1475971-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<style>
+div {
+ width: 200px;
+ height: 200px;
+}
+</style>
+
+<div style="position:fixed;">
+ <div style="transform:translateX(50px);">
+ <div id="resize" style="background-color:blue; width: 300px">
+ </div>
+ </div>
+</div>
+</html>
diff --git a/layout/reftests/bugs/1475971-1.html b/layout/reftests/bugs/1475971-1.html
new file mode 100644
index 0000000000..b3b5e681f2
--- /dev/null
+++ b/layout/reftests/bugs/1475971-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+div {
+ width: 200px;
+ height: 200px;
+}
+</style>
+
+<div style="position:fixed;">
+ <div style="transform:translateX(50px);">
+ <div id="resize" style="background-color:blue;">
+ </div>
+ </div>
+</div>
+
+<script>
+ function doTest() {
+ document.getElementById("resize").style.width = "300px";
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
diff --git a/layout/reftests/bugs/1483649-1-ref.xhtml b/layout/reftests/bugs/1483649-1-ref.xhtml
new file mode 100644
index 0000000000..e428895b77
--- /dev/null
+++ b/layout/reftests/bugs/1483649-1-ref.xhtml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE window>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<style type="text/css" xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
+#container {
+ position: relative;
+ left: 500px;
+ display: inline;
+}
+
+#first {
+ position: relative;
+ top: 0px;
+ left: 0px;
+ width: 100px;
+ height: 100px;
+ transform: scaleX(-1);
+ background: red;
+}
+
+#second {
+ position: relative;
+ top: 50px;
+ left: -100px;
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+}
+
+#transformed {
+ width: 50px;
+ height: 50px;
+ transform: scaleX(-1)
+}
+]]></style>
+
+<box id="container">
+ <box id="first"></box>
+ <box id="second">
+ <image id="transformed"/>
+ </box>
+</box>
+</window>
diff --git a/layout/reftests/bugs/1483649-1.xhtml b/layout/reftests/bugs/1483649-1.xhtml
new file mode 100644
index 0000000000..2d4542db6f
--- /dev/null
+++ b/layout/reftests/bugs/1483649-1.xhtml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!DOCTYPE window>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<style type="text/css" xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
+#container {
+ position: relative;
+ left: 500px;
+ display: inline;
+}
+
+#first {
+ position: relative;
+ top: 0px;
+ left: 0px;
+ width: 100px;
+ height: 100px;
+ transform: scaleX(-1);
+ background: red;
+}
+
+#second {
+ position: relative;
+ top: 50px;
+ left: -100px;
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+}
+
+@keyframes transform-animation {
+ from {
+ transform: scaleX(-1);
+ }
+ to {
+ transform: scaleX(-1);
+ }
+}
+
+#transformed {
+ width: 50px;
+ height: 50px;
+ animation-name: transform-animation;
+ animation-fill-mode: forwards;
+}
+
+]]></style>
+
+<box id="container">
+ <box id="first"></box>
+ <box id="second">
+ <image id="transformed"/>
+ </box>
+</box>
+</window>
diff --git a/layout/reftests/bugs/1483946-ref.html b/layout/reftests/bugs/1483946-ref.html
new file mode 100644
index 0000000000..1ed6570fa3
--- /dev/null
+++ b/layout/reftests/bugs/1483946-ref.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<div style="width: 100px; height: 100px; overflow-y: auto;">
+ <div style="width: 200px; height: 200px; background: green"></div>
+</div>
diff --git a/layout/reftests/bugs/1483946.html b/layout/reftests/bugs/1483946.html
new file mode 100644
index 0000000000..79b0945198
--- /dev/null
+++ b/layout/reftests/bugs/1483946.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<div style="width: 100px; height: 100px; overflow-y: auto; contain: layout;">
+ <div style="width: 200px; height: 200px; background: green"></div>
+</div>
diff --git a/layout/reftests/bugs/1488155-ref.html b/layout/reftests/bugs/1488155-ref.html
new file mode 100644
index 0000000000..90ad29d07b
--- /dev/null
+++ b/layout/reftests/bugs/1488155-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<style>
+ :link {
+ color: green;
+ }
+</style>
+<a href>Should be green</a>
diff --git a/layout/reftests/bugs/1488155.html b/layout/reftests/bugs/1488155.html
new file mode 100644
index 0000000000..30e2cbf51d
--- /dev/null
+++ b/layout/reftests/bugs/1488155.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html class="reftest-wait">
+<style>
+ :link {
+ color: green;
+ }
+</style>
+<a id="target">Should be green</a>
+<script>
+window.addEventListener("MozReftestInvalidate", function() {
+ target.setAttribute("href", "");
+ document.documentElement.className = "";
+});
+</script>
diff --git a/layout/reftests/bugs/1492660-1-ref.html b/layout/reftests/bugs/1492660-1-ref.html
new file mode 100644
index 0000000000..2d6ca292bf
--- /dev/null
+++ b/layout/reftests/bugs/1492660-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<svg width="300" height="200" viewBox="0 0 30 30">
+ <defs>
+ <filter id="f" x="0" y="0" width="100%" height="100%">
+ <feTurbulence baseFrequency="0 3"/>
+ </filter>
+ <clipPath id="c">
+ <rect width="30" height="30"/>
+ </clipPath>
+ </defs>
+ <rect width="30" height="30" filter="url(#f)" clip-path="url(#c)"/>
+</svg>
diff --git a/layout/reftests/bugs/1492660-1.html b/layout/reftests/bugs/1492660-1.html
new file mode 100644
index 0000000000..cf2625f814
--- /dev/null
+++ b/layout/reftests/bugs/1492660-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<svg width="300" height="200" viewBox="0 0 30 30">
+ <defs>
+ <filter id="f" x="-20%" y="-10%" width="140%" height="140%">
+ <feTurbulence baseFrequency="0 3"/>
+ </filter>
+ <clipPath id="c">
+ <rect width="30" height="30"/>
+ </clipPath>
+ </defs>
+ <rect width="30" height="30" filter="url(#f)" clip-path="url(#c)"/>
+</svg>
diff --git a/layout/reftests/bugs/1499386-ref.html b/layout/reftests/bugs/1499386-ref.html
new file mode 100644
index 0000000000..30475270df
--- /dev/null
+++ b/layout/reftests/bugs/1499386-ref.html
@@ -0,0 +1,3 @@
+<style>
+ :root { background: green }
+</style>
diff --git a/layout/reftests/bugs/1499386.html b/layout/reftests/bugs/1499386.html
new file mode 100644
index 0000000000..e84642a79f
--- /dev/null
+++ b/layout/reftests/bugs/1499386.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<style>
+ @supports selector(div) {
+ :root { background: green }
+ }
+</style>
diff --git a/layout/reftests/bugs/1503662-ref.html b/layout/reftests/bugs/1503662-ref.html
new file mode 100644
index 0000000000..d383a71cb4
--- /dev/null
+++ b/layout/reftests/bugs/1503662-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<div style="font: 32px monospace;">
+ the quick brown fox <br>
+ jumps over the lazy <br>
+ dog
+</div>
diff --git a/layout/reftests/bugs/1503662.html b/layout/reftests/bugs/1503662.html
new file mode 100644
index 0000000000..76196ecca7
--- /dev/null
+++ b/layout/reftests/bugs/1503662.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<!-- NOTE: this testcase will be loaded with a minimum-size preference applied -->
+<div style="font: 5px monospace; width: 20ch;">
+ the quick brown fox jumps over the lazy dog
+</div>
diff --git a/layout/reftests/bugs/1509425-1-ref.html b/layout/reftests/bugs/1509425-1-ref.html
new file mode 100644
index 0000000000..cc2ee20dcb
--- /dev/null
+++ b/layout/reftests/bugs/1509425-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+
+<title>Reference for bug 1271714: should say PASS</title>
+
+<p>PASS</p>
diff --git a/layout/reftests/bugs/1509425-1.html b/layout/reftests/bugs/1509425-1.html
new file mode 100644
index 0000000000..5d6e0e9e28
--- /dev/null
+++ b/layout/reftests/bugs/1509425-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+
+<title>Bug 1271714: Hit testing should be able to find the .opacityFilter element</title>
+
+<style type="text/css">
+
+#opacityFilter {
+ border: 1px solid black;
+ height: 200px;
+ width: 200px;
+ filter: opacity(0);
+}
+
+</style>
+
+<p id="output">FAIL</p>
+
+<div id="opacityFilter"></div>
+
+<script>
+
+if (document.elementFromPoint(100, 100).id == "opacityFilter") {
+ document.getElementById("output").textContent = "PASS";
+}
+
+</script>
diff --git a/layout/reftests/bugs/1511570-ref.html b/layout/reftests/bugs/1511570-ref.html
new file mode 100644
index 0000000000..cae97c4575
--- /dev/null
+++ b/layout/reftests/bugs/1511570-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<meta http-equiv="Content-Language" content="zh-CN">
+<p style="font-family: sans-serif">Some test in the default font for zh-CN.
diff --git a/layout/reftests/bugs/1511570.html b/layout/reftests/bugs/1511570.html
new file mode 100644
index 0000000000..fc6753edbd
--- /dev/null
+++ b/layout/reftests/bugs/1511570.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<p lang="zh-CN" style="font-family: sans-serif">Some test in the default font for zh-CN.
diff --git a/layout/reftests/bugs/1513423-1-ref.html b/layout/reftests/bugs/1513423-1-ref.html
new file mode 100644
index 0000000000..56ce295742
--- /dev/null
+++ b/layout/reftests/bugs/1513423-1-ref.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+ }
+
+ body {
+ font-family: test;
+ line-height: 2;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>aI&#x301;&#x302;&#x303;&#x304;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1513423-1.html b/layout/reftests/bugs/1513423-1.html
new file mode 100644
index 0000000000..fdfe8967ff
--- /dev/null
+++ b/layout/reftests/bugs/1513423-1.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+ }
+
+ body {
+ font-family: test;
+ line-height: 2;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>a&#x202e;I&#x301;&#x302;&#x303;&#x304;&#x202c;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1513423-2-ref.html b/layout/reftests/bugs/1513423-2-ref.html
new file mode 100644
index 0000000000..babafe500c
--- /dev/null
+++ b/layout/reftests/bugs/1513423-2-ref.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+ }
+
+ body {
+ font-family: test;
+ line-height: 2;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>aI&#x323;&#x324;&#x325;&#x326;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1513423-2.html b/layout/reftests/bugs/1513423-2.html
new file mode 100644
index 0000000000..fca554d391
--- /dev/null
+++ b/layout/reftests/bugs/1513423-2.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <meta name='viewport' content='initial-scale=1' />
+ <style>
+ @font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+ }
+
+ body {
+ font-family: test;
+ line-height: 2;
+ }
+
+ .container {
+ padding: 1rem 0 0.3rem;
+ }
+
+ .placeholder {
+ font-style: italic;
+ position: absolute;
+ font-size: 8em;
+ }
+ </style>
+ </head>
+ <body>
+ <div class='container'>
+ <div class='placeholder'>a&#x202e;I&#x323;&#x324;&#x325;&#x326;&#x202c;z
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1513423-3-ref.html b/layout/reftests/bugs/1513423-3-ref.html
new file mode 100644
index 0000000000..ec31af28c0
--- /dev/null
+++ b/layout/reftests/bugs/1513423-3-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: awami;
+ src: url(../fonts/sil/AwamiNastaliq-Regular.woff);
+}
+div {
+ font: 36px/3 awami;
+ text-align: center;
+}
+</style>
+Both lines should be the same, with no clipping of either green or blue glyphs:
+<div dir=rtl>
+<p style="color:blue"><span style="color:green">دیکھتی</span> کنسلٹنٹس</p>
+<p style="color:green">دیکھتی <span style="color:blue">کنسلٹنٹس</span></p>
diff --git a/layout/reftests/bugs/1513423-3.html b/layout/reftests/bugs/1513423-3.html
new file mode 100644
index 0000000000..6df25fb4fd
--- /dev/null
+++ b/layout/reftests/bugs/1513423-3.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: awami;
+ src: url(../fonts/sil/AwamiNastaliq-Regular.woff);
+}
+div {
+ font: 36px/3 awami;
+ text-align: center;
+}
+</style>
+Both lines should be the same, with no clipping of either green or blue glyphs:
+<div dir=rtl>
+<p style="color:green">دیکھتی <span style="color:blue">کنسلٹنٹس</span></p>
+<p style="color:blue"><span style="color:green">دیکھتی</span> کنسلٹنٹس</p>
diff --git a/layout/reftests/bugs/1517385-ref.html b/layout/reftests/bugs/1517385-ref.html
new file mode 100644
index 0000000000..fce545dab2
--- /dev/null
+++ b/layout/reftests/bugs/1517385-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <meta charset="utf-8">
+
+ <style>
+ #content {
+ position: absolute;
+ font-size: 20px;
+ width: 20px;
+ top: 0;
+ right: 0;
+ }
+ </style>
+
+ <body>
+ <div id="content">A</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1517385.html b/layout/reftests/bugs/1517385.html
new file mode 100644
index 0000000000..958de7695f
--- /dev/null
+++ b/layout/reftests/bugs/1517385.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <meta charset="utf-8">
+ <title>Bug 1517385: Test AccessibleCaret doesn't occupied space when its appearance is Appearance::None.</title>
+
+ <style>
+ #content {
+ position: absolute;
+ font-size: 20px;
+ width: 20px;
+ top: 0;
+ right: 0;
+ }
+ </style>
+
+ <script>
+ function runTest() {
+ let sel = window.getSelection();
+ let content = document.getElementById("content");
+ sel.selectAllChildren(content);
+ sel.removeAllRanges();
+ }
+ </script>
+
+ <body onload="runTest()">
+ <div id="content">A</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1529992-1-ref.html b/layout/reftests/bugs/1529992-1-ref.html
new file mode 100644
index 0000000000..4fbbbe1cf7
--- /dev/null
+++ b/layout/reftests/bugs/1529992-1-ref.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+body {
+ font-size: 60px;
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div {
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+#shadow1 {
+ top: -30px;
+ left: -60px;
+}
+#shadow2 {
+ top: 100px;
+ left: -60px;
+}
+#shadow3 {
+ top: -30px;
+ left: 100px;
+}
+#shadow4 {
+ top: 200px;
+ left: -60px;
+}
+#shadow5 {
+ top: -30px;
+ left: 250px;
+}
+#shadow1-ref {
+ top: 20px;
+ left: 20px;
+}
+#shadow2-ref {
+ color: transparent;
+ text-shadow: 0px 0px 10px black;
+ top: 150px;
+ left: 20px;
+}
+#shadow3-ref {
+ color: transparent;
+ text-shadow: 0px 0px 10px black;
+ top: 20px;
+ left: 180px;
+}
+#shadow4-ref {
+ color: transparent;
+ top: 205px;
+ left: -40px;
+ text-shadow: 0px 0px 10px black;
+}
+#shadow5-ref {
+ color: transparent;
+ top: -25px;
+ left: 270px;
+ text-shadow: 0px 0px 10px black;
+}
+</style>
+</head><body>
+ <div id="shadow1-ref">hello</div>
+ <div id="shadow2-ref">hello</div>
+ <div id="shadow3-ref">hello</div>
+ <div id="shadow4-ref">hello</div>
+ <div id="shadow5-ref">hello</div>
+ <div id="shadow1">hello</div>
+ <div id="shadow2">hello</div>
+ <div id="shadow3">hello</div>
+ <div id="shadow4">hello&nbsp;&nbsp;</div>
+ <div id="shadow5">hello&nbsp;&nbsp;</div>
+</body></html>
diff --git a/layout/reftests/bugs/1529992-1.html b/layout/reftests/bugs/1529992-1.html
new file mode 100644
index 0000000000..d54c243ac6
--- /dev/null
+++ b/layout/reftests/bugs/1529992-1.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+
+<!--
+This is a bunch of tests that verify we properly handle weird corner cases
+in shadow bounding boxes.
+
+Problem 1: parts of text that are seemingly hidden (as in overflow:hidden)
+may actually be visible in shadows, because they include an offset. We can
+mess this up in two ways:
+
+ 1a. we completely culled a glyph from existence for being out of view
+
+ 1b. we have all the glyphs but are clipping parts out in the shadow
+
+Problem 2: shadows that are defined by the ::selection pseudo-class are
+trapped inside the local selection rect of the item. This means they
+*can and should* sometimes get weirdly clipped (shadow6 and shadow7 in
+version 2 of this test). Also just more generally selections take a bunch
+of special paths in text styling so they are included to make sure both
+paths are tested.
+
+We messed all of these up for webrender because it handles shadows in a very
+different way from non-webrender.
+
+The selection-box is inherently implementation-specific, so I apologize in
+advanced if this test breaks when you tweak how selections work. Hopefully
+only shadow6 needs to be tweaked?
+-->
+
+<html class="reftest-wait"><head>
+<script type="text/javascript">
+function onload() {
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+
+ document.documentElement.className = '';
+}
+</script>
+<style>
+body {
+ font-size: 60px;
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div {
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div::selection {
+ /* hide all selection boxes for convenience */
+ background-color: transparent;
+}
+#shadow1 {
+ text-shadow: 80px 50px 0px;
+ top: -30px;
+ left: -60px;
+}
+#shadow2 {
+ text-shadow: 80px 50px 10px;
+ top: 100px;
+ left: -60px;
+}
+#shadow3 {
+ text-shadow: 80px 50px 10px;
+ top: -30px;
+ left: 100px;
+}
+#shadow4 {
+ top: 200px;
+ left: -60px;
+}
+#shadow4::selection {
+ text-shadow: 20px 5px 10px;
+}
+#shadow5 {
+ top: -30px;
+ left: 250px;
+}
+#shadow5::selection {
+ text-shadow: 20px 5px 10px;
+}
+</style>
+</head><body id="selectMe" onload="onload()">
+ <div id="shadow1">hello</div>
+ <div id="shadow2">hello</div>
+ <div id="shadow3">hello</div>
+ <div id="shadow4">hello&nbsp;&nbsp;</div>
+ <div id="shadow5">hello&nbsp;&nbsp;</div>
+</body></html>
diff --git a/layout/reftests/bugs/1529992-2-ref.html b/layout/reftests/bugs/1529992-2-ref.html
new file mode 100644
index 0000000000..5fc36a61c2
--- /dev/null
+++ b/layout/reftests/bugs/1529992-2-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+body {
+ font-size: 60px;
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div {
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+#shadow6 {
+ color: transparent;
+}
+#shadow7 {
+ color: transparent;
+}
+#shadow6-ref {
+ color: green;
+ top: 200px;
+ left: 230px;
+}
+#shadow7-ref {
+ color: transparent;
+ top: 200px;
+ left: 530px;
+ text-shadow: 0px 0px 5px green;
+}
+</style>
+</head><body>
+ <div id="shadow6-ref">hello</div>
+ <div id="shadow7-ref">hello</div>
+ <div id="shadow6">hello&nbsp;i</div>
+ <div id="shadow7">hello&nbsp;i</div>
+</body></html>
diff --git a/layout/reftests/bugs/1529992-2.html b/layout/reftests/bugs/1529992-2.html
new file mode 100644
index 0000000000..19876e7f65
--- /dev/null
+++ b/layout/reftests/bugs/1529992-2.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+
+<!--
+see version 1 of this test for details
+-->
+
+<html class="reftest-wait"><head>
+<script type="text/javascript">
+function onload() {
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+
+ document.documentElement.className = '';
+}
+</script>
+<style>
+body {
+ font-size: 60px;
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div {
+ position: absolute;
+ margin: 0px;
+ padding: 0px;
+}
+div::selection {
+ /* hide all selection boxes for convenience */
+ background-color: transparent;
+}
+#shadow6 {
+ top: 200px;
+ left: 200px;
+}
+#shadow6::selection {
+ color: transparent;
+ text-shadow: 30px 0px 0px green;
+}
+#shadow7 {
+ top: 200px;
+ left: 500px;
+}
+#shadow7::selection {
+ color: transparent;
+ text-shadow: 30px 0px 5px green;
+}
+</style>
+</head><body id="selectMe" onload="onload()">
+ <div id="shadow6">hello&nbsp;i</div>
+ <div id="shadow7">hello&nbsp;i</div>
+</body></html>
diff --git a/layout/reftests/bugs/1535040-1-ref.html b/layout/reftests/bugs/1535040-1-ref.html
new file mode 100644
index 0000000000..fe99e1399e
--- /dev/null
+++ b/layout/reftests/bugs/1535040-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+ <svg width="400" height="300">
+ <rect id="rect" width="100" height="100" fill="green" x="0" y="0"/>
+ </svg>
+</html>
diff --git a/layout/reftests/bugs/1535040-1.html b/layout/reftests/bugs/1535040-1.html
new file mode 100644
index 0000000000..5e0908e082
--- /dev/null
+++ b/layout/reftests/bugs/1535040-1.html
@@ -0,0 +1,19 @@
+<html class="reftest-wait">
+ <svg width="400" height="300">
+ <text id="text" opacity="1" x="0" y="150" fill="black">
+ This text should disappear
+ </text>
+ <rect id="rect" width="100" height="100" fill="green" x="0" y="0"/>
+ </svg>
+
+ <script>
+ function doTest() {
+ var elt = document.getElementById("text");
+ elt.setAttribute("opacity", 0);
+ document.documentElement.removeAttribute("class");
+ }
+
+ window.addEventListener("MozReftestInvalidate", doTest, false);
+ setTimeout(doTest, 5000);
+ </script>
+</html>
diff --git a/layout/reftests/bugs/1544895-ref.html b/layout/reftests/bugs/1544895-ref.html
new file mode 100644
index 0000000000..243f7fef4b
--- /dev/null
+++ b/layout/reftests/bugs/1544895-ref.html
@@ -0,0 +1,42 @@
+<html reftest-async-scroll>
+<head>
+<style>
+body {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+}
+.header {
+ background-color: white;
+ flex: none;
+}
+.content {
+ flex: auto;
+ overflow-y: scroll;
+}
+.inner-content {
+ height: 2000px;
+}
+.shadowy {
+ text-shadow: 0px 0px 1px green;
+}
+.hidden {
+ visibility: hidden;
+}
+</style>
+</head>
+<body>
+<div class="header"> Wow, This is a Great Header! </div>
+<div class="content"
+ reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1075"
+ reftest-async-scroll-y="75">
+ <div class="inner-content">
+ <p class="hidden">Wow, This is Great Hidden Content!</p>
+ <p class="hidden">Wow, This is Great Hidden Content!</p>
+ <p>Wow, This is Great Visible Content!</p>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1544895.html b/layout/reftests/bugs/1544895.html
new file mode 100644
index 0000000000..b19f286036
--- /dev/null
+++ b/layout/reftests/bugs/1544895.html
@@ -0,0 +1,39 @@
+<html reftest-async-scroll>
+<head>
+<style>
+body {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+}
+.header {
+ background-color: white;
+ flex: none;
+}
+.content {
+ flex: auto;
+ overflow-y: scroll;
+}
+.inner-content {
+ height: 2000px;
+}
+.shadowy {
+ text-shadow: 0px 0px 1px green;
+}
+</style>
+</head>
+<body>
+<div class="header"> Wow, This is a Great Header! </div>
+<div class="content"
+ reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1075"
+ reftest-async-scroll-y="75">
+ <div class="inner-content">
+ <p>Wow, This is Great Content!</p>
+ <p class="shadowy">Wow, This is Great Shadowy Content!</p>
+ <p>Wow, This is Great Visible Content!</p>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1545360-1-ref.xhtml b/layout/reftests/bugs/1545360-1-ref.xhtml
new file mode 100644
index 0000000000..71ed6a06e4
--- /dev/null
+++ b/layout/reftests/bugs/1545360-1-ref.xhtml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<style>
+ .container {
+ display: flex;
+ flex-direction: column;
+ outline: 1px solid black;
+ }
+ .item {
+ border: 0px solid pink;
+ box-sizing: content-box;
+ }
+ .withBorderTop {
+ border-top-width: 20px;
+ }
+</style>
+<body>
+ <div class="container">
+ <xul:toolbarpaletteitem
+ class="item withBorderTop">abc</xul:toolbarpaletteitem>
+ <xul:toolbarpaletteitem
+ class="item">def</xul:toolbarpaletteitem>
+ <xul:toolbarpaletteitem
+ class="item">ghi</xul:toolbarpaletteitem>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1545360-1.xhtml b/layout/reftests/bugs/1545360-1.xhtml
new file mode 100644
index 0000000000..2f2299e66f
--- /dev/null
+++ b/layout/reftests/bugs/1545360-1.xhtml
@@ -0,0 +1,35 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ class="reftest-wait">
+<style>
+ .container {
+ display: flex;
+ flex-direction: column;
+ outline: 1px solid black;
+ }
+ .item {
+ border: 0px solid pink;
+ box-sizing: content-box;
+ }
+ .withBorderTop {
+ border-top-width: 20px;
+ }
+</style>
+<script>
+ function doTest() {
+ tweakMe.classList.add('withBorderTop');
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+<body>
+ <div class="container">
+ <xul:toolbarpaletteitem
+ class="item" id="tweakMe">abc</xul:toolbarpaletteitem>
+ <xul:toolbarpaletteitem
+ class="item">def</xul:toolbarpaletteitem>
+ <xul:toolbarpaletteitem
+ class="item">ghi</xul:toolbarpaletteitem>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1546856-1.html b/layout/reftests/bugs/1546856-1.html
new file mode 100644
index 0000000000..1a50349899
--- /dev/null
+++ b/layout/reftests/bugs/1546856-1.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html class="reftest-wait"
+ reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1500">
+<meta charset="utf-8">
+<title>Test for bug 1546856: When the first painted item in a layer is removed, invalidation takes the wrong last paint offset because it hasn't initialized the last paint offset for that layer yet for this paint</title>
+<style>
+html {
+ background: linear-gradient(white, white) 0 0 / 100vw 100vh no-repeat fixed;
+}
+
+body {
+ height: 4000px;
+ padding: 200px 0;
+}
+
+div {
+ width: 600px;
+ height: 200px;
+ box-sizing: border-box;
+ margin-bottom: -200px;
+}
+
+#main.fill {
+ background-color: rgba(255, 0, 0, 0.9);
+}
+
+#main.ownLayer {
+ will-change: opacity;
+}
+
+#layerBoundsMaintainer {
+ position: relative;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="main"></div>
+<div id="layerBoundsMaintainer"></div>
+
+<script>
+
+const mainElement = document.querySelector('#main');
+
+document.scrollingElement.scrollTop = 0;
+document.addEventListener('MozReftestInvalidate', () => {
+ requestAnimationFrame(() => {
+ document.scrollingElement.scrollTop = 200;
+ mainElement.className = 'fill';
+ requestAnimationFrame(() => {
+ mainElement.className = 'fill ownLayer';
+ requestAnimationFrame(() => {
+ mainElement.className = '';
+ document.documentElement.className = '';
+ });
+ });
+ });
+});
+
+</script>
diff --git a/layout/reftests/bugs/1546856-2.html b/layout/reftests/bugs/1546856-2.html
new file mode 100644
index 0000000000..7065dcb69e
--- /dev/null
+++ b/layout/reftests/bugs/1546856-2.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html class="reftest-wait"
+ reftest-async-scroll
+ reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1500">
+<meta charset="utf-8">
+<title>Test for bug 1546856: Make sure that mLastPaintOffset for removed items is correct</title>
+<style>
+html {
+ background: linear-gradient(white, white) 0 0 / 100vw 100vh no-repeat fixed;
+}
+
+body {
+ height: 4000px;
+ padding: 200px 0;
+}
+
+div {
+ width: 600px;
+ height: 200px;
+ box-sizing: border-box;
+ margin-bottom: -200px;
+}
+
+#main.fill {
+ background-color: rgba(255, 0, 0, 0.9);
+}
+
+#main.ownLayer {
+ will-change: opacity;
+}
+
+#layerBoundsMaintainer {
+ position: relative;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="main" class="fill"></div>
+<div id="layerBoundsMaintainer"></div>
+
+<script>
+
+const mainElement = document.querySelector('#main');
+
+document.scrollingElement.scrollTop = 0;
+document.addEventListener('MozReftestInvalidate', () => {
+ requestAnimationFrame(() => {
+ document.scrollingElement.scrollTop = 200;
+ mainElement.className = '';
+ document.documentElement.className = '';
+ });
+});
+
+</script>
diff --git a/layout/reftests/bugs/1546856-ref.html b/layout/reftests/bugs/1546856-ref.html
new file mode 100644
index 0000000000..e0aadecced
--- /dev/null
+++ b/layout/reftests/bugs/1546856-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference for bug 1546856: When the first painted item in a layer is removed, invalidation takes the wrong last paint offset because it hasn't initialized the last paint offset for that layer yet for this paint</title>
+<style>
+body {
+ height: 4000px;
+ padding: 200px 0;
+}
+
+div {
+ width: 600px;
+ height: 200px;
+ box-sizing: border-box;
+ border: 1px solid black;
+}
+
+</style>
+
+<div></div>
+
+<script>
+document.scrollingElement.scrollTop = 200;
+</script>
diff --git a/layout/reftests/bugs/1547759-1-ref.html b/layout/reftests/bugs/1547759-1-ref.html
new file mode 100644
index 0000000000..67e9d69626
--- /dev/null
+++ b/layout/reftests/bugs/1547759-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html dir="rtl">
+<meta charset="utf-8" />
+<title>Testcase, bug 1547759</title>
+
+<style>
+ html { overflow: hidden }
+</style>
+
+<table>
+ <tr style="background: #f66">
+ <td>A</td>
+ <td>B</td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1547759-1.html b/layout/reftests/bugs/1547759-1.html
new file mode 100644
index 0000000000..c822340ce7
--- /dev/null
+++ b/layout/reftests/bugs/1547759-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html dir="rtl">
+<meta charset="utf-8" />
+<title>Testcase, bug 1547759</title>
+
+<style>
+ html { overflow: hidden }
+</style>
+
+<table>
+ <tr style="background: #f66">
+ <td style="position: relative">A</td>
+ <td>B</td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1548809-ref.html b/layout/reftests/bugs/1548809-ref.html
new file mode 100644
index 0000000000..6abb578aa3
--- /dev/null
+++ b/layout/reftests/bugs/1548809-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<style>
+ span { outline: 1px dotted black }
+</style>
+<span>A</span>
+<div></div>
+<span>B</span>
diff --git a/layout/reftests/bugs/1548809.html b/layout/reftests/bugs/1548809.html
new file mode 100644
index 0000000000..525fd4ab8a
--- /dev/null
+++ b/layout/reftests/bugs/1548809.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<span style="outline: 1px dotted black">
+ A
+ <div></div>
+ B
+</span>
diff --git a/layout/reftests/bugs/1551040.html b/layout/reftests/bugs/1551040.html
new file mode 100644
index 0000000000..92a4b062f4
--- /dev/null
+++ b/layout/reftests/bugs/1551040.html
@@ -0,0 +1 @@
+<iframe src="1551040.txt"></iframe>
diff --git a/layout/reftests/bugs/1551040.txt b/layout/reftests/bugs/1551040.txt
new file mode 100644
index 0000000000..d0e3340077
--- /dev/null
+++ b/layout/reftests/bugs/1551040.txt
@@ -0,0 +1 @@
+Foobar
diff --git a/layout/reftests/bugs/1552789-1.html b/layout/reftests/bugs/1552789-1.html
new file mode 100644
index 0000000000..d43610aa83
--- /dev/null
+++ b/layout/reftests/bugs/1552789-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="utf-8">
+ <style>
+ .outer {
+ display: inline;
+ position: relative;
+ }
+
+ .inner {
+ position: absolute;
+ top: 100%;
+ }
+ </style>
+</head>
+
+<body>
+ <div class="outer">
+ <div>You can see me.</div>
+ <div class="inner">But you can't see me!</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1552789-ref-1.html b/layout/reftests/bugs/1552789-ref-1.html
new file mode 100644
index 0000000000..6369246f5e
--- /dev/null
+++ b/layout/reftests/bugs/1552789-ref-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="utf-8">
+ <style>
+ .outer {
+ display: inline;
+ position: relative;
+ }
+ </style>
+</head>
+
+<body>
+ <div class="outer">
+ <div>You can see me.</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1553571-1-ref.html b/layout/reftests/bugs/1553571-1-ref.html
new file mode 100644
index 0000000000..c42f310a11
--- /dev/null
+++ b/layout/reftests/bugs/1553571-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+<div id="a" style="width: 1px; height: 1px; position: absolute; left: 200px; top: 200px; transform: scale(256.1);">
+ <img style="width: 1px; height: 1px;" src="repeatable-diagonal-gradient.png">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1553571-1.html b/layout/reftests/bugs/1553571-1.html
new file mode 100644
index 0000000000..abb2c6ae5b
--- /dev/null
+++ b/layout/reftests/bugs/1553571-1.html
@@ -0,0 +1,34 @@
+<!-- reftest-wait because it takes at least two changes of the transform style before it becomes active -->
+<html class='reftest-wait'>
+<head>
+<script>
+var changesLeft = 10;
+function go() {
+ window.setTimeout(changeit, 0);
+}
+
+function changeit() {
+ var a = document.getElementById("a");
+ a.style.transform = 'scale(' + (256.1 + Math.random()*0.01) + ')';
+
+ if (changesLeft > 0) {
+ --changesLeft;
+ window.setTimeout(changeit, 50);
+ }
+ if (changesLeft == 0) {
+ // 75-100ms is the timeout for expirty from the active layer tracker.
+ // Increase the time between transform tweaks to 74ms to give the reftest the best
+ // chance of running the mozafterpaint handler and checking that there are no more
+ // paints pending so it can finish.
+ window.setTimeout(changeit, 74);
+ document.documentElement.classList.remove("reftest-wait");
+ }
+}
+</script>
+</head>
+<body onload="go();">
+<div id="a" style="width: 1px; height: 1px; position: absolute; left: 200px; top: 200px;">
+ <img style="width: 1px; height: 1px;" src="repeatable-diagonal-gradient.png">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1553571-2-ref.html b/layout/reftests/bugs/1553571-2-ref.html
new file mode 100644
index 0000000000..ba4e47bc2c
--- /dev/null
+++ b/layout/reftests/bugs/1553571-2-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+<div id="a" style="width: 1px; height: 1px; position: absolute; left: 200px; top: 200px; transform: scale(256.1) rotate(1deg);">
+ <img style="width: 1px; height: 1px;" src="repeatable-diagonal-gradient.png">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1553571-2.html b/layout/reftests/bugs/1553571-2.html
new file mode 100644
index 0000000000..0b844745c0
--- /dev/null
+++ b/layout/reftests/bugs/1553571-2.html
@@ -0,0 +1,34 @@
+<!-- reftest-wait because it takes at least two changes of the transform style before it becomes active -->
+<html class='reftest-wait'>
+<head>
+<script>
+var changesLeft = 10;
+function go() {
+ window.setTimeout(changeit, 0);
+}
+
+function changeit() {
+ var a = document.getElementById("a");
+ a.style.transform = 'scale(' + (256.1 + Math.random()*0.01) + ') rotate(1deg)';
+
+ if (changesLeft > 0) {
+ --changesLeft;
+ window.setTimeout(changeit, 50);
+ }
+ if (changesLeft == 0) {
+ // 75-100ms is the timeout for expirty from the active layer tracker.
+ // Increase the time between transform tweaks to 74ms to give the reftest the best
+ // chance of running the mozafterpaint handler and checking that there are no more
+ // paints pending so it can finish.
+ window.setTimeout(changeit, 74);
+ document.documentElement.classList.remove("reftest-wait");
+ }
+}
+</script>
+</head>
+<body onload="go();">
+<div id="a" style="width: 1px; height: 1px; position: absolute; left: 200px; top: 200px;">
+ <img style="width: 1px; height: 1px;" src="repeatable-diagonal-gradient.png">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1558937-1-ref.html b/layout/reftests/bugs/1558937-1-ref.html
new file mode 100644
index 0000000000..6a7e880785
--- /dev/null
+++ b/layout/reftests/bugs/1558937-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="height:400px;"></div>
+<div style="height:1000px">
+ <div style="width:100px; height:100px; background:black;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1558937-1.html b/layout/reftests/bugs/1558937-1.html
new file mode 100644
index 0000000000..4f5c8e0cad
--- /dev/null
+++ b/layout/reftests/bugs/1558937-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="height:400px;"></div>
+<div style="height:1000px; clip-path:border-box">
+ <div style="position:absolute; top:0; left:0; width:100px; height:100px; background:black;"></div>
+ <div style="width:100px; height:100px; background:black;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1562733-rotated-nastaliq-1-ref.html b/layout/reftests/bugs/1562733-rotated-nastaliq-1-ref.html
new file mode 100644
index 0000000000..2a2298240c
--- /dev/null
+++ b/layout/reftests/bugs/1562733-rotated-nastaliq-1-ref.html
@@ -0,0 +1,14 @@
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: noto-nastaliq;
+ src: url(../fonts/NotoNastaliqUrdu-Regular.ttf);
+}
+body { font: 40px/200px noto-nastaliq; }
+div { text-align: center; margin: 10px; border: 1px solid gray;
+ width: 200px; height: 200px; float: left; }
+.v1 { transform: rotate(90deg); }
+</style>
+
+<div>نوٹو نستعلیق</div>
+<div class="v1">نوٹو نستعلیق</div>
diff --git a/layout/reftests/bugs/1562733-rotated-nastaliq-1.html b/layout/reftests/bugs/1562733-rotated-nastaliq-1.html
new file mode 100644
index 0000000000..d52281799c
--- /dev/null
+++ b/layout/reftests/bugs/1562733-rotated-nastaliq-1.html
@@ -0,0 +1,14 @@
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: noto-nastaliq;
+ src: url(../fonts/NotoNastaliqUrdu-Regular.ttf);
+}
+body { font: 40px/200px noto-nastaliq; }
+div { text-align: center; margin: 10px; border: 1px solid gray;
+ width: 200px; height: 200px; float: left; }
+.v1 { writing-mode: sideways-rl; }
+</style>
+
+<div>نوٹو نستعلیق</div>
+<div class="v1">نوٹو نستعلیق</div>
diff --git a/layout/reftests/bugs/1562733-rotated-nastaliq-2-ref.html b/layout/reftests/bugs/1562733-rotated-nastaliq-2-ref.html
new file mode 100644
index 0000000000..cc8f943901
--- /dev/null
+++ b/layout/reftests/bugs/1562733-rotated-nastaliq-2-ref.html
@@ -0,0 +1,14 @@
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: noto-nastaliq;
+ src: url(../fonts/NotoNastaliqUrdu-Regular.ttf);
+}
+body { font: 40px/200px noto-nastaliq; }
+div { text-align: center; margin: 10px; border: 1px solid gray;
+ width: 200px; height: 200px; float: left; }
+.v2 { transform: rotate(-90deg); }
+</style>
+
+<div>نوٹو نستعلیق</div>
+<div class="v2">نوٹو نستعلیق</div>
diff --git a/layout/reftests/bugs/1562733-rotated-nastaliq-2.html b/layout/reftests/bugs/1562733-rotated-nastaliq-2.html
new file mode 100644
index 0000000000..c8577c6ea5
--- /dev/null
+++ b/layout/reftests/bugs/1562733-rotated-nastaliq-2.html
@@ -0,0 +1,14 @@
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: noto-nastaliq;
+ src: url(../fonts/NotoNastaliqUrdu-Regular.ttf);
+}
+body { font: 40px/200px noto-nastaliq; }
+div { text-align: center; margin: 10px; border: 1px solid gray;
+ width: 200px; height: 200px; float: left; }
+.v2 { writing-mode: sideways-lr; }
+</style>
+
+<div>نوٹو نستعلیق</div>
+<div class="v2">نوٹو نستعلیق</div>
diff --git a/layout/reftests/bugs/1563484-notref.html b/layout/reftests/bugs/1563484-notref.html
new file mode 100644
index 0000000000..225b1e5417
--- /dev/null
+++ b/layout/reftests/bugs/1563484-notref.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<div style="font: message-box">
+ System font text.
+</div>
diff --git a/layout/reftests/bugs/1563484-ref.html b/layout/reftests/bugs/1563484-ref.html
new file mode 100644
index 0000000000..eb7744c637
--- /dev/null
+++ b/layout/reftests/bugs/1563484-ref.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<div style="font: message-box">
+ System font text.
+</div>
+<script>
+ let el = document.querySelector("div");
+ el.style.fontSize = (2 * parseFloat(getComputedStyle(el).fontSize)) + "px";
+</script>
diff --git a/layout/reftests/bugs/1563484.html b/layout/reftests/bugs/1563484.html
new file mode 100644
index 0000000000..88d9dc0453
--- /dev/null
+++ b/layout/reftests/bugs/1563484.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<html reftest-text-zoom="2">
+<div style="font: message-box">
+ System font text.
+</div>
diff --git a/layout/reftests/bugs/1565129.txt b/layout/reftests/bugs/1565129.txt
new file mode 100644
index 0000000000..189370daa9
--- /dev/null
+++ b/layout/reftests/bugs/1565129.txt
@@ -0,0 +1 @@
+Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text. Some very very long text.
diff --git a/layout/reftests/bugs/1576553-1-ref.html b/layout/reftests/bugs/1576553-1-ref.html
new file mode 100644
index 0000000000..eb58e6cece
--- /dev/null
+++ b/layout/reftests/bugs/1576553-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+}
+#test {
+ font: 100px test, serif;
+ -webkit-text-fill-color: transparent;
+ -webkit-text-stroke-color: blue;
+ -webkit-text-stroke-width: 2px;
+}
+</style>
+<body>
+<div id="test">office</div>
diff --git a/layout/reftests/bugs/1576553-1.html b/layout/reftests/bugs/1576553-1.html
new file mode 100644
index 0000000000..370ff2a408
--- /dev/null
+++ b/layout/reftests/bugs/1576553-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/sil/CharisSIL-R.ttf);
+}
+#test {
+ font: 100px test, serif;
+ -webkit-text-fill-color: transparent;
+ -webkit-text-stroke-color: blue;
+ -webkit-text-stroke-width: 2px;
+}
+::selection {
+ background: transparent;
+ color: blue;
+}
+</style>
+<script>
+function doTest() {
+ let div = document.getElementById("test");
+ let range = document.createRange();
+ range.setStart(div.firstChild, 2);
+ range.setEnd(div.firstChild, 3);
+ window.getSelection().addRange(range);
+ document.documentElement.removeAttribute("class");
+}
+</script>
+<body onload="doTest()">
+<div id="test">office</div>
diff --git a/layout/reftests/bugs/1577566-1-ref.html b/layout/reftests/bugs/1577566-1-ref.html
new file mode 100644
index 0000000000..9c7dda1d56
--- /dev/null
+++ b/layout/reftests/bugs/1577566-1-ref.html
@@ -0,0 +1,20 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Bug 1577566, reference: The alpha channel should be clamped at the right time so that it doesn't bright colors.</title>
+
+<style>
+
+#box {
+ width: 100px;
+ height: 100px;
+ background-color: rgb(0, 204, 0); /* 0, 0.8, 0 */
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/1577566-1.html b/layout/reftests/bugs/1577566-1.html
new file mode 100644
index 0000000000..3b8f0421ad
--- /dev/null
+++ b/layout/reftests/bugs/1577566-1.html
@@ -0,0 +1,33 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Bug 1577566: The alpha channel should be clamped at the right time so that it doesn't bright colors.</title>
+
+<style>
+
+#box {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ filter: url(#filter);
+}
+
+</style>
+
+<div id="box"></div>
+
+<svg height="0">
+ <defs>
+ <filter id="filter" color-interpolation-filters="sRGB">
+ <feColorMatrix type="matrix"
+ values="0 0 0 0 0
+ 0 0 0 0 0.8
+ 0 0 0 0 0
+ 0 0 0 2 0"/>
+ </filter>
+ </defs>
+</svg>
diff --git a/layout/reftests/bugs/1579953-2-ref.html b/layout/reftests/bugs/1579953-2-ref.html
new file mode 100644
index 0000000000..2ea92dc439
--- /dev/null
+++ b/layout/reftests/bugs/1579953-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+details::first-line { color: green; }
+* { column-count: 1 }
+</style>
+
+<body>
+<table id="b"><tbody></tbody></table>
+<details id="a" open>
+<summary hidden></summary>
+This is the details</details>
diff --git a/layout/reftests/bugs/1579953-2.html b/layout/reftests/bugs/1579953-2.html
new file mode 100644
index 0000000000..b4af7bdbe9
--- /dev/null
+++ b/layout/reftests/bugs/1579953-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+details::first-line { color: green; }
+* { column-count: 1 }
+</style>
+<script>
+function go() {
+ a.appendChild(document.createTextNode("details"))
+ b.createTBody()
+}
+</script>
+<body onload=go()>
+<table id="b"></table>
+<details id="a" open>
+<summary hidden></summary>
+This is the </details><!-- The entire line "This is ..." should be green. -->
diff --git a/layout/reftests/bugs/1580534-ref.html b/layout/reftests/bugs/1580534-ref.html
new file mode 100644
index 0000000000..383c7f5df8
--- /dev/null
+++ b/layout/reftests/bugs/1580534-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:10px; height:10px; background:black; border:1px solid red; position:absolute; top:0px; transform: translate(1px);"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1580534.html b/layout/reftests/bugs/1580534.html
new file mode 100644
index 0000000000..7e6290de71
--- /dev/null
+++ b/layout/reftests/bugs/1580534.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:translate(0.4px); position:absolute; top:0px;">
+ <canvas style="margin-left:0.4px; border:1px solid red; display:block" width="10" height="10" id="c"></canvas>
+</div>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext('2d');
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, c.width, c.height);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1588954-ref.html b/layout/reftests/bugs/1588954-ref.html
new file mode 100644
index 0000000000..ebd728d5ea
--- /dev/null
+++ b/layout/reftests/bugs/1588954-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+#multicol {
+ font: 16px/1 sans-serif;
+ height: 10px;
+ column-width: 30px;
+ column-fill: auto;
+ border: 1px solid gray;
+}
+.box {
+ writing-mode: vertical-rl;
+ width: 10px;
+ height: 20px;
+ border: 1px solid blue;
+}
+</style>
+
+<div id="multicol">
+ <span>a</span>
+ <main class="box"></main>
+</div>
diff --git a/layout/reftests/bugs/1588954.html b/layout/reftests/bugs/1588954.html
new file mode 100644
index 0000000000..e4ef6b6a0e
--- /dev/null
+++ b/layout/reftests/bugs/1588954.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+#multicol {
+ font: 16px/1 sans-serif;
+ max-height: 10px; /* Bound column height without using a fixed height. */
+ column-width: 30px;
+ column-fill: auto;
+ border: 1px solid gray;
+}
+.box {
+ writing-mode: vertical-rl;
+ width: 10px;
+ height: 20px;
+ border: 1px solid blue;
+}
+</style>
+
+<div id="multicol">
+ <span>a</span>
+ <main class="box"></main>
+</div>
diff --git a/layout/reftests/bugs/1595199-1-ref.html b/layout/reftests/bugs/1595199-1-ref.html
new file mode 100644
index 0000000000..dff66336e0
--- /dev/null
+++ b/layout/reftests/bugs/1595199-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<meta charset=UTF-8>
+<title>Testcase reference, bug 1595199</title>
+<style>
+ #outer {
+ background: fuchsia;
+ height: 100px;
+ }
+
+ #inner {
+ background: blue;
+ height: 100px;
+ width: 50%;
+ }
+</style>
+
+<div id="outer">
+ <div id="inner">
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1595199-1.html b/layout/reftests/bugs/1595199-1.html
new file mode 100644
index 0000000000..ab57557aa8
--- /dev/null
+++ b/layout/reftests/bugs/1595199-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>
+<meta charset=UTF-8>
+<title>Testcase, bug 1595199</title>
+<style>
+ #outer {
+ background: red;
+ overflow: hidden;
+ }
+
+ #wrapper1 {
+ background: red;
+ height: 100%;
+ }
+
+ #wrapper2 {
+ background: fuchsia;
+ height: 100%;
+ }
+
+ #inner {
+ background: blue;
+ height: 100px;
+ width: 50%;
+ }
+</style>
+
+<div id="outer" style="height: 50px">
+ <div id="wrapper1">
+ <div id="wrapper2">
+ <div id="inner">
+ </div>
+ </div>
+ </div>
+</div>
+
+<script>
+ window.addEventListener("load", function load_handler() {
+ document.getElementById("wrapper2").offsetHeight; // flush layout
+ document.getElementById("outer").style.height = "auto";
+ });
+</script>
diff --git a/layout/reftests/bugs/1599841-1-ref.html b/layout/reftests/bugs/1599841-1-ref.html
new file mode 100644
index 0000000000..23f2b5c9e3
--- /dev/null
+++ b/layout/reftests/bugs/1599841-1-ref.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
+ <style>
+ @font-face {
+ font-family: "NotoNastaliqUrduWeb";
+ src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
+ }
+
+ p {
+ margin-right: 40px;
+ text-align: right;
+ }
+
+ ul {
+ font-family: "NotoNastaliqUrduWeb", sans-serif;
+ list-style: none;
+ }
+
+ ul.ref li::before {
+ content: "\0602";
+ background: blue;
+ color: white;
+ }
+
+ ul.ref.green li::before {
+ background: green;
+ color: transparent;
+ }
+ </style>
+</head>
+
+<body>
+ <p>The width of the green bar should match the blue reference block:</p>
+
+ <ul class="ref" lang="ur" dir="rtl">
+ <li></li>
+ </ul>
+
+ <ul class="ref green" lang="ur" dir="rtl">
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1599841-1.html b/layout/reftests/bugs/1599841-1.html
new file mode 100644
index 0000000000..5582789e9a
--- /dev/null
+++ b/layout/reftests/bugs/1599841-1.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
+ <style>
+ @font-face {
+ font-family: "NotoNastaliqUrduWeb";
+ src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
+ }
+
+ p {
+ margin-right: 40px;
+ text-align: right;
+ }
+
+ ul {
+ font-family: "NotoNastaliqUrduWeb", sans-serif;
+ counter-reset: c;
+ list-style: none;
+ }
+
+ ul.test li::before {
+ content: "\0602" counter(c, arabic-indic);
+ counter-increment: c;
+ background: green;
+ color: transparent; /* hide the glyphs to avoid Windows antialiasing
+ artifacts; we only care about the width */
+ }
+
+ ul.ref li::before {
+ content: "\0602";
+ background: blue;
+ color: white;
+ }
+ </style>
+</head>
+
+<body>
+ <p>The width of the green bar should match the blue reference block:</p>
+
+ <ul class="ref" lang="ur" dir="rtl">
+ <li></li>
+ </ul>
+
+ <ul class="test" lang="ur" dir="rtl">
+ <!-- list item numbers 1-9 should *not* add any width -->
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1599841-2-notref.html b/layout/reftests/bugs/1599841-2-notref.html
new file mode 100644
index 0000000000..bec8959bbe
--- /dev/null
+++ b/layout/reftests/bugs/1599841-2-notref.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
+ <style>
+ @font-face {
+ font-family: "NotoNastaliqUrduWeb";
+ src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
+ }
+
+ p {
+ margin-right: 40px;
+ text-align: right;
+ }
+
+ ul {
+ font-family: "NotoNastaliqUrduWeb", sans-serif;
+ list-style: none;
+ }
+
+ ul.ref li::before {
+ content: "\0602";
+ background: blue;
+ color: white;
+ }
+
+ ul.ref.green li::before {
+ background: green;
+ color: transparent;
+ }
+ </style>
+</head>
+
+<body>
+ <p>The width of the green bar should <b>increase</b> half-way down:</p>
+
+ <ul class="ref" lang="ur" dir="rtl">
+ <li></li>
+ </ul>
+
+ <ul class="ref green" lang="ur" dir="rtl">
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1599841-2.html b/layout/reftests/bugs/1599841-2.html
new file mode 100644
index 0000000000..17596cf8ca
--- /dev/null
+++ b/layout/reftests/bugs/1599841-2.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
+ <style>
+ @font-face {
+ font-family: "NotoNastaliqUrduWeb";
+ src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
+ }
+
+ p {
+ margin-right: 40px;
+ text-align: right;
+ }
+
+ ul {
+ font-family: "NotoNastaliqUrduWeb", sans-serif;
+ counter-reset: c 7;
+ list-style: none;
+ }
+
+ ul.test li::before {
+ content: "\0602" counter(c, arabic-indic);
+ counter-increment: c;
+ background: green;
+ color: transparent; /* hide the glyphs to avoid Windows antialiasing
+ artifacts; we only care about the width */
+ }
+
+ ul.ref li::before {
+ content: "\0602";
+ background: blue;
+ color: white;
+ }
+ </style>
+</head>
+
+<body>
+ <p>The width of the green bar should <b>increase</b> half-way down:</p>
+
+ <ul class="ref" lang="ur" dir="rtl">
+ <li></li>
+ </ul>
+
+ <ul class="test" lang="ur" dir="rtl">
+ <li></li>
+ <li></li>
+ <!-- list item numbers 10-11 *should* make the subtending mark wider -->
+ <li></li>
+ <li></li>
+ </ul>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1606130-ref.html b/layout/reftests/bugs/1606130-ref.html
new file mode 100644
index 0000000000..a22bcbd673
--- /dev/null
+++ b/layout/reftests/bugs/1606130-ref.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<style>
+ :root, body {
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ }
+ body {
+ display: -moz-box;
+ }
+</style>
+<body></body>
diff --git a/layout/reftests/bugs/1606130.html b/layout/reftests/bugs/1606130.html
new file mode 100644
index 0000000000..d34935be1d
--- /dev/null
+++ b/layout/reftests/bugs/1606130.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<style>
+ :root, body {
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ }
+</style>
+<body></body>
diff --git a/layout/reftests/bugs/1608124-1-ref.html b/layout/reftests/bugs/1608124-1-ref.html
new file mode 100644
index 0000000000..60e00afb16
--- /dev/null
+++ b/layout/reftests/bugs/1608124-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+div { font-size: 24px; margin: 1em; }
+.a { font-family: "Times New Roman", serif; }
+.b { font-family: "Arial", sans-serif; }
+</style>
+<div class=a>This should NOT use the SF NS Text font</div>
+<div class=b>This should NOT use the LastResort font</div>
diff --git a/layout/reftests/bugs/1608124-1.html b/layout/reftests/bugs/1608124-1.html
new file mode 100644
index 0000000000..6ca7935cb1
--- /dev/null
+++ b/layout/reftests/bugs/1608124-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+div { font-size: 24px; margin: 1em; }
+.a { font-family: ".SF NS Text", "Times New Roman", serif; }
+.b { font-family: ".LastResort", "Arial", sans-serif; }
+</style>
+<div class=a>This should NOT use the SF NS Text font</div>
+<div class=b>This should NOT use the LastResort font</div>
diff --git a/layout/reftests/bugs/1608124-2-notref.html b/layout/reftests/bugs/1608124-2-notref.html
new file mode 100644
index 0000000000..4119754407
--- /dev/null
+++ b/layout/reftests/bugs/1608124-2-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+.a { font-family: serif; font-size: 24px; }
+</style>
+<div class=a>This should NOT use the default serif font</div>
diff --git a/layout/reftests/bugs/1608124-2.html b/layout/reftests/bugs/1608124-2.html
new file mode 100644
index 0000000000..e1d66a48ce
--- /dev/null
+++ b/layout/reftests/bugs/1608124-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+.a { font-family: -apple-system, serif; font-size: 24px; }
+</style>
+<div class=a>This should NOT use the default serif font</div>
diff --git a/layout/reftests/bugs/1613380-ref.html b/layout/reftests/bugs/1613380-ref.html
new file mode 100644
index 0000000000..d3c696f575
--- /dev/null
+++ b/layout/reftests/bugs/1613380-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+.item { background: pink; margin-top: auto}
+</style>
+<div style="display:flex; flex-direction: column;
+ height: 100px; border: 1px solid black">
+ <div class="item">This text should be bottom-aligned</div>
+</div>
diff --git a/layout/reftests/bugs/1613380.html b/layout/reftests/bugs/1613380.html
new file mode 100644
index 0000000000..78dfc054b9
--- /dev/null
+++ b/layout/reftests/bugs/1613380.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+.item { background: pink; margin-top: auto}
+.strut {
+ visibility: collapse;
+ margin-left: auto; /* This should have no effect (but it does!) */
+}
+</style>
+<div style="display:flex; flex-direction: column;
+ height: 100px; border: 1px solid black">
+ <div class="item">This text should be bottom-aligned</div>
+ <div class="strut"></div>
+</div>
diff --git a/layout/reftests/bugs/1614788-1-ref.svg b/layout/reftests/bugs/1614788-1-ref.svg
new file mode 100644
index 0000000000..dbdaebaec8
--- /dev/null
+++ b/layout/reftests/bugs/1614788-1-ref.svg
@@ -0,0 +1,58 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="830" height="520.9100000000001">
+ <rect width="830" height="520.9100000000001" rx="5" ry="5"></rect>
+ <svg height="455.91" viewBox="0 0 2 1" width="800" x="15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="50">
+ <style>
+ .h {
+ fill: rgb(152, 195, 121);
+ }
+
+ .q {
+ fill: rgb(255, 99, 54)
+ }
+ </style>
+ <g font-size="1.67">
+ <rect height="45.591" width="80"></rect>
+ <g class="s">
+ <svg x="0" y="0" width="19760">
+ <svg x="0">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="80">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="160">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="240">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="320">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="400">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+
+ </svg>
+ </g>
+ </g>
+ </svg>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/1614788-1.svg b/layout/reftests/bugs/1614788-1.svg
new file mode 100644
index 0000000000..5345a4007c
--- /dev/null
+++ b/layout/reftests/bugs/1614788-1.svg
@@ -0,0 +1,83 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="830" height="520.9100000000001">
+ <rect width="830" height="520.9100000000001" rx="5" ry="5"></rect>
+ <svg height="455.91" viewBox="0 0 2 1" width="800" x="15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="50">
+ <style>
+ .h {
+ fill: rgb(152, 195, 121);
+ }
+
+ .q {
+ fill: rgb(255, 99, 54)
+ }
+
+ .s {
+ animation-duration: 4s;
+ animation-iteration-count: infinite;
+ animation-name: r;
+ animation-timing-function: steps(1, end)
+ }
+
+ @keyframes r {
+ 0% {
+ transform: translateX(-80px)
+ }
+ 25% {
+ transform: translateX(-160px)
+ }
+ 50% {
+ transform: translateX(-240px)
+ }
+ 75% {
+ transform: translateX(-320px)
+ }
+ 100% {
+ transform: translateX(-400px)
+ }
+ }
+ </style>
+ <g font-size="1.67">
+ <rect height="45.591" width="80"></rect>
+ <g class="s">
+ <svg x="0" y="0" width="19760">
+ <svg x="0">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="80">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="160">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="240">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="320">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+ <svg x="400">
+ <rect height="20" width="80" x="0" y="0" class="p"></rect>
+ <circle r="0.333" cx="1.5" cy="0.666" class="q"></circle>
+ <text x="0.166" y="0.166" class="h" font-size="0.2">some text</text>
+ <image x="0.166" y="0.333" width="0.833" height="0.833" xlink:href="repeatable-diagonal-gradient.png"></image>
+ </svg>
+
+ </svg>
+ </g>
+ </g>
+ </svg>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/1617515-1-ref.html b/layout/reftests/bugs/1617515-1-ref.html
new file mode 100644
index 0000000000..2e9bcfc8ea
--- /dev/null
+++ b/layout/reftests/bugs/1617515-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<div style="font: 32px sans-serif">
+<u>aa🔥<span></span>aaag-j-q-y</u>
diff --git a/layout/reftests/bugs/1617515-1.html b/layout/reftests/bugs/1617515-1.html
new file mode 100644
index 0000000000..c9ad7bb91d
--- /dev/null
+++ b/layout/reftests/bugs/1617515-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<div style="font: 32px sans-serif">
+<u>aa🔥aaag-j-q-y</u>
diff --git a/layout/reftests/bugs/1624118-ref.html b/layout/reftests/bugs/1624118-ref.html
new file mode 100644
index 0000000000..3c10ed7406
--- /dev/null
+++ b/layout/reftests/bugs/1624118-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<object type="image/svg+xml" data="243519-8.svg"></object>
diff --git a/layout/reftests/bugs/1624118.html b/layout/reftests/bugs/1624118.html
new file mode 100644
index 0000000000..a6b4a1465a
--- /dev/null
+++ b/layout/reftests/bugs/1624118.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html class="reftest-wait">
+<script>
+ let loadedOnce = false;
+ function objectLoaded() {
+ let firstTime = !loadedOnce;
+ loadedOnce = true;
+ let object = document.querySelector("object");
+ if (!firstTime) {
+ document.documentElement.className = "";
+ return;
+ }
+ // The svgs used in this test are arbitrary, but should obviously match the
+ // reference and should be different from each other.
+ object.data = "243519-8.svg";
+ }
+</script>
+<object onload="objectLoaded()" type="image/svg+xml" data="315920-20.svg"></object>
diff --git a/layout/reftests/bugs/1626259-1-ref.html b/layout/reftests/bugs/1626259-1-ref.html
new file mode 100644
index 0000000000..e3c4973da8
--- /dev/null
+++ b/layout/reftests/bugs/1626259-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ #scale {
+ width: 200px;
+ height: 200px;
+ }
+ </style>
+</head>
+<body>
+ <div id="outer">
+ <div id="inner">
+ <img id="scale" src="repeatable-diagonal-gradient.png">
+ </div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1626259-1.html b/layout/reftests/bugs/1626259-1.html
new file mode 100644
index 0000000000..2771e58dc2
--- /dev/null
+++ b/layout/reftests/bugs/1626259-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ #outer {
+ transform: scale(0.01);
+ transform-style: preserve-3d;
+ }
+
+ #inner {
+ transform: scale(100);
+ }
+
+ #scale {
+ width: 200px;
+ height: 200px;
+ }
+ </style>
+</head>
+<body>
+ <div id="outer">
+ <div id="inner">
+ <img id="scale" src="repeatable-diagonal-gradient.png">
+ </div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1626259-2-ref.html b/layout/reftests/bugs/1626259-2-ref.html
new file mode 100644
index 0000000000..e3c4973da8
--- /dev/null
+++ b/layout/reftests/bugs/1626259-2-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ #scale {
+ width: 200px;
+ height: 200px;
+ }
+ </style>
+</head>
+<body>
+ <div id="outer">
+ <div id="inner">
+ <img id="scale" src="repeatable-diagonal-gradient.png">
+ </div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/1626259-2.html b/layout/reftests/bugs/1626259-2.html
new file mode 100644
index 0000000000..ec1b530785
--- /dev/null
+++ b/layout/reftests/bugs/1626259-2.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ #outer {
+ transform: scale(0.01);
+ transform-style: preserve-3d;
+ }
+
+ #inner {
+ transform: scale(100);
+ }
+
+ #scale {
+ width: 200px;
+ height: 200px;
+ animation: flyR 5s infinite;
+ }
+
+ @keyframes flyR {
+ from {
+ transform: scale(1);
+ }
+
+ to {
+ transform: scale(1.000000001);
+ }
+ }
+
+ </style>
+</head>
+<body>
+ <div id="outer">
+ <div id="inner">
+ <img id="scale" src="repeatable-diagonal-gradient.png">
+ </div>
+ </div>
+</body></html>
diff --git a/layout/reftests/bugs/163504-1-inner.html b/layout/reftests/bugs/163504-1-inner.html
new file mode 100644
index 0000000000..602ce848b2
--- /dev/null
+++ b/layout/reftests/bugs/163504-1-inner.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+div { height: 3%; }
+img { image-rendering: -moz-crisp-edges; }
+</style>
+</head>
+<body>
+
+<div><img src="blue-600x58.png" width="100" style="height: 50%"></div>
+<div><img src="blue-600x58.png" width="2" style="min-height: 50%"></div>
+<div><img src="blue-600x58.png" width="100" style="max-height: 50%"></div>
+
+<div><span style="position:relative; top: 30%">text</span></div>
+<div><span style="position:relative; bottom: 30%">text</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-1-ref.html b/layout/reftests/bugs/163504-1-ref.html
new file mode 100644
index 0000000000..2bb2c3c1a6
--- /dev/null
+++ b/layout/reftests/bugs/163504-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+</head>
+<body>
+<iframe style="height: 750px" src="163504-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-1a.html b/layout/reftests/bugs/163504-1a.html
new file mode 100644
index 0000000000..a8db85184e
--- /dev/null
+++ b/layout/reftests/bugs/163504-1a.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.height = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="height: 1000px" id="toresize" src="163504-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-1b.html b/layout/reftests/bugs/163504-1b.html
new file mode 100644
index 0000000000..3a372c4cb9
--- /dev/null
+++ b/layout/reftests/bugs/163504-1b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.height = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="height: 500px" id="toresize" src="163504-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-2-inner.html b/layout/reftests/bugs/163504-2-inner.html
new file mode 100644
index 0000000000..e77cb44ddb
--- /dev/null
+++ b/layout/reftests/bugs/163504-2-inner.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+div { height: 3%; }
+img { image-rendering: -moz-crisp-edges; }
+</style>
+</head>
+<body>
+
+<div><span><img src="blue-600x58.png" width="100" style="height: 50%"></span></div>
+<div><span><img src="blue-600x58.png" width="2" style="min-height: 50%"></span></div>
+<div><span><img src="blue-600x58.png" width="100" style="max-height: 50%"></span></div>
+
+<div><span><span style="position:relative; top: 30%">text</span></span></div>
+<div><span><span style="position:relative; bottom: 30%">text</span></span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-2-ref.html b/layout/reftests/bugs/163504-2-ref.html
new file mode 100644
index 0000000000..07858dcd33
--- /dev/null
+++ b/layout/reftests/bugs/163504-2-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+</head>
+<body>
+<iframe style="height: 750px" src="163504-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-2a.html b/layout/reftests/bugs/163504-2a.html
new file mode 100644
index 0000000000..e562faa424
--- /dev/null
+++ b/layout/reftests/bugs/163504-2a.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.height = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="height: 1000px" id="toresize" src="163504-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/163504-2b.html b/layout/reftests/bugs/163504-2b.html
new file mode 100644
index 0000000000..37f529412b
--- /dev/null
+++ b/layout/reftests/bugs/163504-2b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block height</title>
+<style type="text/css">
+html, body { height: 100%; }
+iframe { width: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.height = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="height: 500px" id="toresize" src="163504-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1641769-1-ref.html b/layout/reftests/bugs/1641769-1-ref.html
new file mode 100644
index 0000000000..f8bd907c1c
--- /dev/null
+++ b/layout/reftests/bugs/1641769-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+ <meta charset="UTF-8">
+</head>
+<body>
+ <style>
+ .filter {
+ filter: drop-shadow(10px 10px 10px rgba(0, 0, 0, 1));
+ }
+ .child {
+ box-shadow: 10px 10px 10px 10px rgba(0, 0, 0, 1);
+ background-color: green;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+ <div class="filter">
+ <div>
+ <div class="child">
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1641769-1.html b/layout/reftests/bugs/1641769-1.html
new file mode 100644
index 0000000000..7cc2cd10df
--- /dev/null
+++ b/layout/reftests/bugs/1641769-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+ <meta charset="UTF-8">
+</head>
+<body>
+ <style>
+ .filter {
+ filter: drop-shadow(10px 10px 10px rgba(0, 0, 0, 1));
+ }
+
+ .perspective {
+ perspective: 1000px;
+ }
+
+ .child {
+ box-shadow: 10px 10px 10px 10px rgba(0, 0, 0, 1);
+ will-change: transform;
+ background-color: green;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+ <div class="filter">
+ <div class="perspective">
+ <div class="child">
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1642583-1-ref.html b/layout/reftests/bugs/1642583-1-ref.html
new file mode 100644
index 0000000000..5b756ca9f1
--- /dev/null
+++ b/layout/reftests/bugs/1642583-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en-us">
+ <head>
+ <meta charset="utf-8" />
+ </head>
+ <body>
+ <canvas id="pdf" width="200" height="200"></canvas>
+ <script>
+ const canvas = document.getElementById("pdf");
+ const ctx = canvas.getContext("2d");
+
+ ctx.transform(6.4, 0, 0, -6.4, 30, 60);
+
+ ctx.globalCompositeOperation = "darken";
+
+ ctx.fillStyle = "#36b64b";
+ ctx.fillRect(-1.78583, -16.46929, 23.21575, 24.20787);
+ </script>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/1642583-1.html b/layout/reftests/bugs/1642583-1.html
new file mode 100644
index 0000000000..817556e37e
--- /dev/null
+++ b/layout/reftests/bugs/1642583-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en-us">
+ <head>
+ <meta charset="utf-8" />
+ </head>
+ <body>
+ <canvas id="pdf" width="200" height="200"></canvas>
+ <script>
+ const canvas = document.getElementById("pdf");
+ const ctx = canvas.getContext("2d");
+
+ ctx.transform(6.4, 0, 0, -6.4, 30, 60);
+
+ ctx.globalCompositeOperation = "darken";
+
+ ctx.beginPath();
+ ctx.moveTo(3.34488, -15.90236);
+ ctx.lineTo(22.36535, -2.94803);
+ ctx.lineTo(13.01102, 7.14331);
+ ctx.lineTo(1.33228, 0.34016);
+ ctx.lineTo(5.10236, -7.08661);
+ ctx.lineTo(-1.38898, -9.41102);
+ ctx.lineTo(1.24724, -15.10866);
+ ctx.closePath();
+ ctx.clip("evenodd");
+
+ ctx.fillStyle = "#36b64b";
+ ctx.fillRect(-1.78583, -16.46929, 23.21575, 24.20787);
+ </script>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/1642603-1-ref.html b/layout/reftests/bugs/1642603-1-ref.html
new file mode 100644
index 0000000000..5e0ee42b59
--- /dev/null
+++ b/layout/reftests/bugs/1642603-1-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Reference: Bug 1642603 - scrollIntoView() should work on empty rects, even inside transforms</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.container {
+ overflow: auto;
+ perspective: 5px;
+ border: 1px solid black;
+ width: 300px;
+ height: 300px;
+}
+
+.absoluteElement {
+ transform: translateX(0);
+}
+
+.spacer {
+ height: 500px;
+}
+
+.zeroSizeBox {
+ margin-left: 30px;
+ width: 0;
+ height: 20px;
+}
+
+</style>
+
+<div class="container">
+ <div class="absoluteElement">
+ <div class="spacer"></div>
+ <p>This text should be visible.</p>
+ <div class="zeroSizeBox"></div>
+ </div>
+</div>
+
+<script>
+document.querySelector('.container').scrollTop = 1000; // scroll to the end
+</script>
diff --git a/layout/reftests/bugs/1642603-1.html b/layout/reftests/bugs/1642603-1.html
new file mode 100644
index 0000000000..b81aef8dd2
--- /dev/null
+++ b/layout/reftests/bugs/1642603-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Bug 1642603 - scrollIntoView() should work on empty rects, even inside transforms</title>
+
+<style>
+
+body {
+ margin: 0;
+}
+
+.container {
+ overflow: auto;
+ perspective: 5px;
+ border: 1px solid black;
+ width: 300px;
+ height: 300px;
+}
+
+.absoluteElement {
+ transform: translateX(0);
+}
+
+.spacer {
+ height: 500px;
+}
+
+.zeroSizeBox {
+ margin-left: 30px;
+ width: 0;
+ height: 20px;
+}
+
+</style>
+
+<div class="container">
+ <div class="absoluteElement">
+ <div class="spacer"></div>
+ <p>This text should be visible.</p>
+ <div class="zeroSizeBox"></div>
+ </div>
+</div>
+
+<script>
+document.querySelector('.container').scrollTop = 0;
+document.querySelector('.zeroSizeBox').scrollIntoView();
+</script>
diff --git a/layout/reftests/bugs/1645549-2-ref.html b/layout/reftests/bugs/1645549-2-ref.html
new file mode 100644
index 0000000000..c860095d4a
--- /dev/null
+++ b/layout/reftests/bugs/1645549-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+#flex {
+ display: flex;
+ flex-flow: column;
+}
+main {
+ column-width: 100px;
+}
+</style>
+
+<main>
+ <div id="flex"><div>before</div><div>after</div></div>
+</main>
diff --git a/layout/reftests/bugs/1645549-2.html b/layout/reftests/bugs/1645549-2.html
new file mode 100644
index 0000000000..e66e9240cd
--- /dev/null
+++ b/layout/reftests/bugs/1645549-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<style>
+#flex {
+ display: flex;
+ flex-flow: column;
+}
+main {
+ column-width: 100px;
+}
+</style>
+
+<!-- "after" is wrapped in an anonymous flex item. -->
+<main>
+ <div id="flex"><div>before</div>after</div>
+</main>
diff --git a/layout/reftests/bugs/1648282-1-ref.html b/layout/reftests/bugs/1648282-1-ref.html
new file mode 100644
index 0000000000..686e5bc6e4
--- /dev/null
+++ b/layout/reftests/bugs/1648282-1-ref.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ - You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<html reftest-async-scroll>
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="UTF-8">
+ <style>
+ * {
+ margin: 0px;
+ padding: 0px;
+ }
+
+ .scrolled {
+ height: 400px;
+ opacity: 0.9;
+ background: linear-gradient(white, green);
+ will-change: transform;
+ }
+
+ .body {
+ width: 500px;
+ height: 200px;
+ overflow: hidden scroll;
+ background-color: red;
+ }
+ </style>
+ <title>Bug 1648282</title>
+</head>
+
+<body>
+ <div class="body" reftest-async-scroll-x="0" reftest-async-scroll-y="50">
+ <div class="scrolled">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1648282-1a.html b/layout/reftests/bugs/1648282-1a.html
new file mode 100644
index 0000000000..124f9b3449
--- /dev/null
+++ b/layout/reftests/bugs/1648282-1a.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ - You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<html reftest-async-scroll>
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="UTF-8">
+ <style>
+ * {
+ margin: 0px;
+ padding: 0px;
+ }
+
+ .scrolled {
+ height: 400px;
+ opacity: 0.9;
+ background: linear-gradient(white, green);
+ }
+
+ .body {
+ width: 500px;
+ height: 200px;
+ overflow: hidden scroll;
+ background-color: red;
+ }
+
+ .pixel {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ }
+ </style>
+ <title>Bug 1648282</title>
+</head>
+
+<body>
+ <div class="body" reftest-async-scroll-x="0" reftest-async-scroll-y="50">
+ <div class="scrolled">
+ <div class="pixel" style="visibility: hidden;"></div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1648282-1b.html b/layout/reftests/bugs/1648282-1b.html
new file mode 100644
index 0000000000..73ec83859c
--- /dev/null
+++ b/layout/reftests/bugs/1648282-1b.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ - You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<html reftest-async-scroll>
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <meta charset="UTF-8">
+ <style>
+ * {
+ margin: 0px;
+ padding: 0px;
+ }
+
+ .scrolled {
+ height: 400px;
+ opacity: 0.9;
+ background: linear-gradient(white, green);
+ }
+
+ .body {
+ width: 500px;
+ height: 200px;
+ overflow: hidden scroll;
+ background-color: red;
+ }
+
+ .pixel {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ }
+ </style>
+ <title>Bug 1648282</title>
+</head>
+
+<body>
+ <div class="body" reftest-async-scroll-x="0" reftest-async-scroll-y="50">
+ <div class="scrolled">
+ <div class="pixel" style="visibility: visible;"></div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1672137-1-notref.html b/layout/reftests/bugs/1672137-1-notref.html
new file mode 100644
index 0000000000..9ddc196895
--- /dev/null
+++ b/layout/reftests/bugs/1672137-1-notref.html
@@ -0,0 +1,10 @@
+<!-- We want to test that the presence of the resizer affects the area used
+ for the scrollbar. So we use a div to block where the resizer might go
+ and then make sure that the part above that, the part where the scroll
+ thumb is looks different with vs without the resizer. -->
+<html>
+ <body>
+ <textarea style="resize: none; position: absolute; top:10px; left:10px; height: 100px; width: 175px;">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text some more text some more text</textarea>
+ <div style="position: absolute; background: white; width: 35px; height: 35px; top: 85px; left: 160px;"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1672137-1.html b/layout/reftests/bugs/1672137-1.html
new file mode 100644
index 0000000000..20b35df746
--- /dev/null
+++ b/layout/reftests/bugs/1672137-1.html
@@ -0,0 +1,10 @@
+<!-- We want to test that the presence of the resizer affects the area used
+ for the scrollbar. So we use a div to block where the resizer might go
+ and then make sure that the part above that, the part where the scroll
+ thumb is looks different with vs without the resizer. -->
+<html>
+ <body>
+ <textarea style="position: absolute; top:10px; left:10px; height: 100px; width: 175px;">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text some more text some more text</textarea>
+ <div style="position: absolute; background: white; width: 35px; height: 35px; top: 85px; left: 160px;"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/1673677-1-ref.html b/layout/reftests/bugs/1673677-1-ref.html
new file mode 100644
index 0000000000..589b64fe2d
--- /dev/null
+++ b/layout/reftests/bugs/1673677-1-ref.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference case for bug 1673677</title>
+<style>
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.table-nested-cell {
+ /* Explicitly specify inner size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+.inner-table {
+ contain: layout;
+}
+</style>
+<table>
+ <tr>
+ <td class="table-nested-cell">
+ <table class="inner-table" style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
+<table style="writing-mode: vertical-lr;">
+ <tr>
+ <td class="table-nested-cell">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
+<table style="writing-mode: vertical-rl;">
+ <tr>
+ <td class="table-nested-cell">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1673677-1.html b/layout/reftests/bugs/1673677-1.html
new file mode 100644
index 0000000000..60db7eec57
--- /dev/null
+++ b/layout/reftests/bugs/1673677-1.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Testcase for bug 1673677</title>
+<style>
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.table-nested-cell {
+ /* Explicitly specify inner size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+</style>
+<table>
+ <tr>
+ <td class="table-nested-cell">
+ <table style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
+<table style="writing-mode: vertical-lr;">
+ <tr>
+ <td class="table-nested-cell">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
+<table style="writing-mode: vertical-rl;">
+ <tr>
+ <td class="table-nested-cell">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </td>
+ <td><div class="filler"></div></td>
+ </tr>
+</table>
diff --git a/layout/reftests/bugs/1673677-2-ref.html b/layout/reftests/bugs/1673677-2-ref.html
new file mode 100644
index 0000000000..8089b53dc1
--- /dev/null
+++ b/layout/reftests/bugs/1673677-2-ref.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference case for bug 1673677</title>
+<style>
+.flex {
+ display: flex;
+ align-items: baseline;
+ border: 1px solid;
+ margin-bottom: 5px;
+ width: fit-content;
+}
+.wrapper {
+ /* Explicitly specify size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+.inner-table {
+ contain: layout;
+}
+</style>
+<div class="flex">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="flex" style="writing-mode: vertical-lr;">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="flex" style="writing-mode: vertical-rl;">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
diff --git a/layout/reftests/bugs/1673677-2.html b/layout/reftests/bugs/1673677-2.html
new file mode 100644
index 0000000000..9001618ee3
--- /dev/null
+++ b/layout/reftests/bugs/1673677-2.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Testcase for bug 1673677</title>
+<style>
+.flex {
+ display: flex;
+ align-items: baseline;
+ border: 1px solid;
+ margin-bottom: 5px;
+ width: fit-content;
+}
+.wrapper {
+ /* Explicitly specify size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+</style>
+<div class="flex">
+ <div class="wrapper">
+ <table style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="flex" style="writing-mode: vertical-lr;">
+ <div class="wrapper">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="flex" style="writing-mode: vertical-rl;">
+ <div class="wrapper">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
diff --git a/layout/reftests/bugs/1673677-3-ref.html b/layout/reftests/bugs/1673677-3-ref.html
new file mode 100644
index 0000000000..610fd5ce13
--- /dev/null
+++ b/layout/reftests/bugs/1673677-3-ref.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference case for bug 1673677</title>
+<style>
+.grid {
+ display: grid;
+ align-items: baseline;
+ border: 1px solid;
+ margin-bottom: 5px;
+ grid-template-columns: auto auto;
+ width: fit-content;
+}
+.wrapper {
+ /* Explicitly specify size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+.inner-table {
+ contain: layout;
+}
+</style>
+<div class="grid">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="grid" style="writing-mode: vertical-lr;">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="grid" style="writing-mode: vertical-rl;">
+ <div class="wrapper">
+ <table class="inner-table" style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
diff --git a/layout/reftests/bugs/1673677-3.html b/layout/reftests/bugs/1673677-3.html
new file mode 100644
index 0000000000..337c2e199b
--- /dev/null
+++ b/layout/reftests/bugs/1673677-3.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Testcase for bug 1673677</title>
+<style>
+.grid {
+ display: grid;
+ align-items: baseline;
+ border: 1px solid;
+ margin-bottom: 5px;
+ grid-template-columns: auto auto;
+ width: fit-content;
+}
+.wrapper {
+ /* Explicitly specify size, due to bug 1166120 */
+ inline-size: 125px;
+ block-size: 100px;
+}
+table, tr, td {
+ border: 1px solid;
+ border-width: 2px 2px 4px 4px;
+ padding: 3px 3px 6px 6px;
+ margin: 8px 8px 12px 12px;
+ border-spacing: 0;
+}
+td {
+ vertical-align: baseline;
+ line-height: 0;
+}
+.filler-nested-table {
+ inline-size: 50px;
+ block-size: 75px;
+ background: purple;
+ display: inline-block;
+}
+.filler {
+ inline-size: 40px;
+ block-size: 30px;
+ background: pink;
+ display: inline-block;
+}
+</style>
+<div class="grid">
+ <div class="wrapper">
+ <table style="writing-mode: vertical-lr;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="grid" style="writing-mode: vertical-lr;">
+ <div class="wrapper">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
+<div class="grid" style="writing-mode: vertical-rl;">
+ <div class="wrapper">
+ <table style="writing-mode: horizontal-tb;">
+ <tr><td><div class="filler-nested-table"></div></td></tr>
+ </table>
+ </div>
+ <div><div class="filler"></div></div>
+</div>
diff --git a/layout/reftests/bugs/167496-1-ref.html b/layout/reftests/bugs/167496-1-ref.html
new file mode 100644
index 0000000000..b2f3748b9b
--- /dev/null
+++ b/layout/reftests/bugs/167496-1-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>table border/css test</title>
+ <style type="text/css">
+<!--
+table {
+ border: 1px solid blue;
+ border-collapse: collapse;
+}
+
+th {
+ border: 1px outset silver;
+}
+
+td {
+ border: 1px outset silver;
+}
+-->
+ </style>
+</head>
+<body>
+
+
+<table>
+ <tbody>
+ <tr>
+ <th>Table-header</th>
+ <th>Table-header</th>
+ <th>Table-header</th>
+ </tr>
+ <tr>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ </tr>
+ <tr>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/167496-1.html b/layout/reftests/bugs/167496-1.html
new file mode 100644
index 0000000000..e27ca0ec55
--- /dev/null
+++ b/layout/reftests/bugs/167496-1.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>table border/css test</title>
+ <style type="text/css">
+<!--
+table {
+ border: 1px solid blue;
+ border-collapse: collapse;
+}
+
+th {
+ border: 1px outset silver;
+}
+
+td {
+ border: 1px outset silver;
+}
+-->
+ </style>
+</head>
+<body>
+
+<table border="1">
+ <tbody>
+ <tr>
+ <th>Table-header</th>
+ <th>Table-header</th>
+ <th>Table-header</th>
+ </tr>
+ <tr>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ </tr>
+ <tr>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ <td>Table-data</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1686729-1-ref.html b/layout/reftests/bugs/1686729-1-ref.html
new file mode 100644
index 0000000000..505448f83b
--- /dev/null
+++ b/layout/reftests/bugs/1686729-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px; background-color: green;">
+</div>
+
diff --git a/layout/reftests/bugs/1686729-1.html b/layout/reftests/bugs/1686729-1.html
new file mode 100644
index 0000000000..fddbbf0900
--- /dev/null
+++ b/layout/reftests/bugs/1686729-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px; background-color: red; overflow: hidden; transform: scaleY(-1);">
+ <canvas id="c" width="200" height="200"></canvas>
+</div>
+
+<script>
+var ctx = document.getElementById('c').getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(0, 0, 200, 200);
+</script>
diff --git a/layout/reftests/bugs/1688004.xhtml b/layout/reftests/bugs/1688004.xhtml
new file mode 100644
index 0000000000..b67c18b7fe
--- /dev/null
+++ b/layout/reftests/bugs/1688004.xhtml
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml" scrolling="false" class="reftest-wait">
+ <body>
+ <dialog>ABC</dialog>
+ <script><![CDATA[
+ document.querySelector("dialog").showModal();
+ document.documentElement.className = "";
+ ]]></script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/169749-1-ref.html b/layout/reftests/bugs/169749-1-ref.html
new file mode 100644
index 0000000000..38a665abfe
--- /dev/null
+++ b/layout/reftests/bugs/169749-1-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html><head>
+ <style type="text/css">
+ p { margin: 0px; }
+ ul { border: 2px solid blue; }
+ li { border: 5px solid transparent } /* prevent margin collapsing */
+ .test1
+ li
+ { margin-bottom: 30px; }
+ .test2
+ li
+ { margin-top: 30px; }
+ .test3
+ li
+ { margin-top: 30px; margin-bottom: 30px; }
+ .test4
+ li
+ { margin-top: 20px; margin-bottom: 10px; }
+ .test5
+ li
+ { margin-top: -10px; margin-bottom: 10px; }
+ </style>
+</head>
+<body>
+<ul class="test1"><li><p>P (30px bottom margin)</p></li></ul>
+
+<ul class="test2"><li><p>P (30px top margin)</p></li></ul>
+
+<ul class="test3"><li><p>P (30px top+bottom margin)</p></li></ul>
+
+<ul class="test4"><li><p>P (20px top and 10px bottom margin)</p></li></ul>
+
+<ul class="test5"><li><p>P (-10px top and 10px bottom margin)</p></li></ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/169749-1.html b/layout/reftests/bugs/169749-1.html
new file mode 100644
index 0000000000..2f24ef5f4c
--- /dev/null
+++ b/layout/reftests/bugs/169749-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html><head>
+ <style type="text/css">
+ p { margin: 0px; }
+ ul { border: 2px solid blue; }
+ li { border: 5px solid transparent } /* prevent margin collapsing */
+ .test1
+ p
+ { margin-bottom: 30px; }
+ .test2
+ p
+ { margin-top: 30px; }
+ .test3
+ p
+ { margin-top: 30px; margin-bottom: 30px; }
+ .test4
+ p
+ { margin-top: 20px; margin-bottom: 10px; }
+ .test5
+ p
+ { margin-top: -10px; margin-bottom: 10px; }
+ </style>
+</head>
+<body>
+<ul class="test1"><li><p>P (30px bottom margin)</p></li></ul>
+
+<ul class="test2"><li><p>P (30px top margin)</p></li></ul>
+
+<ul class="test3"><li><p>P (30px top+bottom margin)</p></li></ul>
+
+<ul class="test4"><li><p>P (20px top and 10px bottom margin)</p></li></ul>
+
+<ul class="test5"><li><p>P (-10px top and 10px bottom margin)</p></li></ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-1-ref.html b/layout/reftests/bugs/1714763-1-ref.html
new file mode 100644
index 0000000000..43bb3f09b6
--- /dev/null
+++ b/layout/reftests/bugs/1714763-1-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:2.1;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+#theimg {
+ width: 100px;
+ height: 100px;
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <img id="theimg" src="repeatable-diagonal-gradient.png">
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-1.html b/layout/reftests/bugs/1714763-1.html
new file mode 100644
index 0000000000..a9c277b6b4
--- /dev/null
+++ b/layout/reftests/bugs/1714763-1.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 2.1; }
+ 100% { scale: 2.1; }
+}
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:0.05;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+#theimg {
+ width: 100px;
+ height: 100px;
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <img id="theimg" src="repeatable-diagonal-gradient.png">
+ </div>
+</div>
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-2-ref.html b/layout/reftests/bugs/1714763-2-ref.html
new file mode 100644
index 0000000000..686f00e869
--- /dev/null
+++ b/layout/reftests/bugs/1714763-2-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:2.1;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+#theimg {
+ width: 100px;
+ height: 100px;
+ clip-path: polygon(0 0,100% 0,50% 100%);
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <img id="theimg" src="repeatable-diagonal-gradient.png">
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-2.html b/layout/reftests/bugs/1714763-2.html
new file mode 100644
index 0000000000..b3a5e659b2
--- /dev/null
+++ b/layout/reftests/bugs/1714763-2.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 2.1; }
+ 100% { scale: 2.1; }
+}
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:0.05;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+#theimg {
+ width: 100px;
+ height: 100px;
+ clip-path: polygon(0 0,100% 0,50% 100%);
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <img id="theimg" src="repeatable-diagonal-gradient.png">
+ </div>
+</div>
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-3-ref.html b/layout/reftests/bugs/1714763-3-ref.html
new file mode 100644
index 0000000000..cfe4071304
--- /dev/null
+++ b/layout/reftests/bugs/1714763-3-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:1.9;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <svg width="100" height="100">
+ <g id="g">
+ <circle cx="100" cy="100" r="40" style="fill: rgb(200, 20, 20);"></circle>
+ </g>
+ </svg>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/1714763-3.html b/layout/reftests/bugs/1714763-3.html
new file mode 100644
index 0000000000..9dca10094f
--- /dev/null
+++ b/layout/reftests/bugs/1714763-3.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 1.9; }
+ 100% { scale: 1.9; }
+}
+#target {
+ position: absolute;
+ left:100px;
+ top:100px;
+ scale:0.05;
+}
+#rotate {
+ transform: rotate(180deg);
+ transform-origin: 50% 50%;
+}
+</style>
+<body>
+<div id="target">
+ <div id="rotate">
+ <svg width="100" height="100">
+ <g id="g">
+ <circle cx="100" cy="100" r="40" style="fill: rgb(200, 20, 20);"></circle>
+ </g>
+ </svg>
+ </div>
+</div>
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/172073-1-ref.html b/layout/reftests/bugs/172073-1-ref.html
new file mode 100644
index 0000000000..9c72c1677f
--- /dev/null
+++ b/layout/reftests/bugs/172073-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<body>
+<UL>
+ <LI><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+ <LI><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+ <LI><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+</UL>
+</body>
+</html>
diff --git a/layout/reftests/bugs/172073-1.html b/layout/reftests/bugs/172073-1.html
new file mode 100644
index 0000000000..309d5773ed
--- /dev/null
+++ b/layout/reftests/bugs/172073-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<body>
+<UL>
+ <LI><DIV></DIV><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+ <LI><DIV></DIV><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+ <LI><DIV></DIV><A HREF="http://www.mozilla.org/">Mozilla.org</A></LI>
+</UL>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1721223-1-notref.html b/layout/reftests/bugs/1721223-1-notref.html
new file mode 100644
index 0000000000..773480d4dd
--- /dev/null
+++ b/layout/reftests/bugs/1721223-1-notref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<style>
+div {
+ background: black;
+ height: 2em;
+ margin: 1em;
+ float: left;
+}
+</style>
+
+<p>The two blocks should NOT be the same width:</p>
+
+<div>&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;</div>
+
+<div>&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;</div>
diff --git a/layout/reftests/bugs/1721223-1.html b/layout/reftests/bugs/1721223-1.html
new file mode 100644
index 0000000000..826270b101
--- /dev/null
+++ b/layout/reftests/bugs/1721223-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<style>
+div {
+ background: black;
+ height: 2em;
+ margin: 1em;
+ float: left;
+}
+</style>
+
+<!-- U+209B (subscript 's') is present in the macOS system font, so it should not render
+ with the width of the hexbox produced by the U+FDD0 noncharacter. -->
+
+<p>The two blocks should NOT be the same width:</p>
+
+<div>&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;&#xfdd0;</div> <!-- noncharacter (renders hexbox) -->
+
+<div>&#x209b;&#x209b;&#x209b;&#x209b;&#x209b;</div> <!-- subscript letter s -->
diff --git a/layout/reftests/bugs/1726663-1-ref.html b/layout/reftests/bugs/1726663-1-ref.html
new file mode 100644
index 0000000000..47ae160770
--- /dev/null
+++ b/layout/reftests/bugs/1726663-1-ref.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+<body>
+ <div style="width:0px; position:fixed">
+ <div style="position:fixed; width:400px; height:400px; background-color:red"></div>
+ <div style="left: 200px; top: 200px; position:fixed; width:400px; height:400px; background-color:blue"></div>
+ </div>
+<body>
+</html>
+
diff --git a/layout/reftests/bugs/1726663-1.html b/layout/reftests/bugs/1726663-1.html
new file mode 100644
index 0000000000..2b5edd5e2d
--- /dev/null
+++ b/layout/reftests/bugs/1726663-1.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+<body>
+ <div style="width:0px; position:fixed">
+ <div style="width: 0px; position: relative; z-index: 2">
+ <div style="position:fixed; width:400px; height:400px; background-color:red"></div>
+ <div style="left: 200px; top: 200px; position:fixed; width:400px; height:400px; background-color:blue"></div>
+ </div>
+ </div>
+<body>
+</html>
+
diff --git a/layout/reftests/bugs/1727016-1-ref.html b/layout/reftests/bugs/1727016-1-ref.html
new file mode 100644
index 0000000000..8c1cf96e0d
--- /dev/null
+++ b/layout/reftests/bugs/1727016-1-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html reftest-async-scroll reftest-async-scroll-y="100">
+ <head>
+ <style>
+
+.mask--6 .mask__clip-path{
+ /* clip-path:url(#notfound) */
+}
+
+.mask--6 .mask__container{
+ padding-top:117%
+}
+.mask__container{
+ position:relative
+}
+.mask__clip-path{
+ background:blue;
+ position:absolute;
+ width: 100px;
+ height: 200px;
+}
+ </style>
+
+ </head>
+ <body>
+
+ <div style="height: 1vh;"></div>
+
+ <div class="mask--6" style="max-width: 500px;">
+ <div class="mask__container">
+ <i class="mask__clip-path"></i>
+ </div>
+ </div>
+
+ <div style="height: 4000vh;"></div>
diff --git a/layout/reftests/bugs/1727016-1.html b/layout/reftests/bugs/1727016-1.html
new file mode 100644
index 0000000000..e6ad3b1385
--- /dev/null
+++ b/layout/reftests/bugs/1727016-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html reftest-async-scroll reftest-async-scroll-y="100">
+ <head>
+ <style>
+
+.mask--6 .mask__clip-path{
+ clip-path:url(#notfound)
+}
+
+.mask--6 .mask__container{
+ padding-top:117%
+}
+.mask__container{
+ position:relative
+}
+.mask__clip-path{
+ background:blue;
+ position:absolute;
+ width: 100px;
+ height: 200px;
+}
+ </style>
+
+ </head>
+ <body>
+
+ <div style="height: 1vh;"></div>
+
+ <div class="mask--6" style="max-width: 500px;">
+ <div class="mask__container">
+ <i class="mask__clip-path"></i>
+ </div>
+ </div>
+
+ <div style="height: 4000vh;"></div>
diff --git a/layout/reftests/bugs/1727172-1-ref.html b/layout/reftests/bugs/1727172-1-ref.html
new file mode 100644
index 0000000000..d806d8a6e5
--- /dev/null
+++ b/layout/reftests/bugs/1727172-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:white;">
+<div style="width:56px; height:40px; position:relative; left:142px; top:100px; background:black;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1727172-1.xhtml b/layout/reftests/bugs/1727172-1.xhtml
new file mode 100644
index 0000000000..c67da3c570
--- /dev/null
+++ b/layout/reftests/bugs/1727172-1.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1">
+<!-- use an empty g to force filters.svg to load before onload -->
+<use xlink:href="../filters.svg#empty" />
+<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<body style="background:white;">
+<video src="../webm-video/black140x100.webm" style="width:340px; height:40px; position:relative; top:100px;"></video>
+</body>
+</html>
+</foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/1730314-1-ref.html b/layout/reftests/bugs/1730314-1-ref.html
new file mode 100644
index 0000000000..8e98293d55
--- /dev/null
+++ b/layout/reftests/bugs/1730314-1-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<html>
+<body>
+ <div>&#9989;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1730314-1.html b/layout/reftests/bugs/1730314-1.html
new file mode 100644
index 0000000000..9138a7a1a5
--- /dev/null
+++ b/layout/reftests/bugs/1730314-1.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<html>
+<body>
+ <div style="opacity: 0.5;">&#9989;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1735265-1-ref.html b/layout/reftests/bugs/1735265-1-ref.html
new file mode 100644
index 0000000000..9a7b488c33
--- /dev/null
+++ b/layout/reftests/bugs/1735265-1-ref.html
@@ -0,0 +1,36 @@
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <title>Test for bug 1735265</title>
+ <style>
+ table {
+ width: 500px;
+ }
+
+ th {
+ background-color: green;
+ }
+
+ div {
+ width: 300px;
+ overflow: hidden;
+ }
+ </style>
+</head>
+
+<body>
+ <div>
+ <table>
+ <colgroup></colgroup>
+ <tr>
+ <th style="filter: hue-rotate(0);">foo</th>
+ </tr>
+ <tr>
+ <th style="will-change: transform;">bar</th>
+ </tr>
+ </table>
+ </div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1735265-1.html b/layout/reftests/bugs/1735265-1.html
new file mode 100644
index 0000000000..9d4fe5046d
--- /dev/null
+++ b/layout/reftests/bugs/1735265-1.html
@@ -0,0 +1,40 @@
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <title>Test for bug 1735265</title>
+ <style>
+ table {
+ width: 500px;
+ }
+
+ th {
+ background-color: green;
+ }
+
+ colgroup {
+ background-color: red;
+ }
+
+ div {
+ width: 300px;
+ overflow: hidden;
+ }
+ </style>
+</head>
+
+<body>
+ <div>
+ <table>
+ <colgroup></colgroup>
+ <tr>
+ <th style="filter: hue-rotate(0);">foo</th>
+ </tr>
+ <tr>
+ <th style="will-change: transform;">bar</th>
+ </tr>
+ </table>
+ </div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1738700-1-ref.html b/layout/reftests/bugs/1738700-1-ref.html
new file mode 100644
index 0000000000..08fc813818
--- /dev/null
+++ b/layout/reftests/bugs/1738700-1-ref.html
@@ -0,0 +1,40 @@
+<html>
+ <head>
+ <meta charset=UTF-8>
+ <title>“Amiri Quran Colored†test</title>
+ <style>
+ @font-face {
+ font-family: AmiriMonochrome;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuran.otf');
+ }
+ .test {
+ direction: rtl;
+ text-align: justify;
+ text-align-last: center;
+ font-size: 40px;
+ margin: 1em;
+ position: absolute;
+ }
+ .monochrome {
+ font-family: AmiriMonochrome;
+ -webkit-text-stroke: 3px black;
+ }
+ </style>
+ </head>
+ <div>The colored Arabic text should be exactly covered by (thicker) black text:</div>
+ <div class="test monochrome">
+ <p>
+ ï·½ ÛÙ¡
+ <br>
+ٱلۡحَمۡد٠لÙلَّه٠رَبّ٠ٱلۡعَـٰلَمÙینَ ÛÙ¢
+ٱلرَّحۡمَـٰن٠ٱلرَّحÙیم٠ÛÙ£
+مَـٰلÙك٠یَوۡم٠ٱلدّÙین٠ÛÙ¤
+Ø¥Ùیَّاكَ نَعۡبÙد٠وَإÙیَّاكَ نَسۡتَعÙین٠ÛÙ¥
+ٱهۡدÙنَا ٱلصّÙرَ ٰطَ ٱلۡمÙسۡتَقÙیمَ ÛÙ¦
+صÙرَ ٰطَ ٱلَّذÙینَ أَنۡعَمۡتَ عَلَیۡهÙÙ…Û¡ غَیۡر٠ٱلۡمَغۡضÙوب٠عَلَیۡهÙÙ…Û¡ وَلَا ٱلضَّاۤلّÙینَ ÛÙ§
+ </p>
+ </div>
+</html>
+
diff --git a/layout/reftests/bugs/1738700-1.html b/layout/reftests/bugs/1738700-1.html
new file mode 100644
index 0000000000..5759b4b534
--- /dev/null
+++ b/layout/reftests/bugs/1738700-1.html
@@ -0,0 +1,62 @@
+<html>
+ <head>
+ <meta charset=UTF-8>
+ <title>“Amiri Quran Colored†test</title>
+ <style>
+ @font-face {
+ font-family: AmiriColored;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuranColored.otf');
+ }
+ @font-face {
+ font-family: AmiriMonochrome;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuran.otf');
+ }
+ .test {
+ direction: rtl;
+ text-align: justify;
+ text-align-last: center;
+ font-size: 40px;
+ margin: 1em;
+ position: absolute;
+ }
+ .colored {
+ font-family: AmiriColored;
+ }
+ .monochrome {
+ font-family: AmiriMonochrome;
+ /* Add some stroke to hide antialiased edges of the colored glyphs */
+ -webkit-text-stroke: 3px black;
+ }
+ </style>
+ </head>
+ <div>The colored Arabic text should be exactly covered by (thicker) black text:</div>
+ <div class="test colored">
+ <p>
+ ï·½ ÛÙ¡
+ <br>
+ٱلۡحَمۡد٠لÙلَّه٠رَبّ٠ٱلۡعَـٰلَمÙینَ ÛÙ¢
+ٱلرَّحۡمَـٰن٠ٱلرَّحÙیم٠ÛÙ£
+مَـٰلÙك٠یَوۡم٠ٱلدّÙین٠ÛÙ¤
+Ø¥Ùیَّاكَ نَعۡبÙد٠وَإÙیَّاكَ نَسۡتَعÙین٠ÛÙ¥
+ٱهۡدÙنَا ٱلصّÙرَ ٰطَ ٱلۡمÙسۡتَقÙیمَ ÛÙ¦
+صÙرَ ٰطَ ٱلَّذÙینَ أَنۡعَمۡتَ عَلَیۡهÙÙ…Û¡ غَیۡر٠ٱلۡمَغۡضÙوب٠عَلَیۡهÙÙ…Û¡ وَلَا ٱلضَّاۤلّÙینَ ÛÙ§
+ </p>
+ </div>
+ <div class="test monochrome">
+ <p>
+ ï·½ ÛÙ¡
+ <br>
+ٱلۡحَمۡد٠لÙلَّه٠رَبّ٠ٱلۡعَـٰلَمÙینَ ÛÙ¢
+ٱلرَّحۡمَـٰن٠ٱلرَّحÙیم٠ÛÙ£
+مَـٰلÙك٠یَوۡم٠ٱلدّÙین٠ÛÙ¤
+Ø¥Ùیَّاكَ نَعۡبÙد٠وَإÙیَّاكَ نَسۡتَعÙین٠ÛÙ¥
+ٱهۡدÙنَا ٱلصّÙرَ ٰطَ ٱلۡمÙسۡتَقÙیمَ ÛÙ¦
+صÙرَ ٰطَ ٱلَّذÙینَ أَنۡعَمۡتَ عَلَیۡهÙÙ…Û¡ غَیۡر٠ٱلۡمَغۡضÙوب٠عَلَیۡهÙÙ…Û¡ وَلَا ٱلضَّاۤلّÙینَ ÛÙ§
+ </p>
+ </div>
+</html>
+
diff --git a/layout/reftests/bugs/1743533-1-helper.html b/layout/reftests/bugs/1743533-1-helper.html
new file mode 100644
index 0000000000..abfc2d735f
--- /dev/null
+++ b/layout/reftests/bugs/1743533-1-helper.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<style>
+:root { color-adjust: exact }
+html { background: green; }
+</style>
+</head>
+<body>
+<!-- just need some content with large height, use text because bg colors don't print by default -->
+<script>
+for (let i = 0; i < 1000; i++) {
+ document.body.appendChild(document.createTextNode("content"));
+ document.body.appendChild(document.createElement("br"));
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1743533-1-notref.html b/layout/reftests/bugs/1743533-1-notref.html
new file mode 100644
index 0000000000..cff933ee18
--- /dev/null
+++ b/layout/reftests/bugs/1743533-1-notref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html><html class="reftest-paged">
+<style>html{font-size:12pt}</style>
+<iframe style="height: 1000vh"></iframe>
+</html>
diff --git a/layout/reftests/bugs/1743533-1.html b/layout/reftests/bugs/1743533-1.html
new file mode 100644
index 0000000000..9d4764b349
--- /dev/null
+++ b/layout/reftests/bugs/1743533-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html><html class="reftest-paged">
+<style>html{font-size:12pt}</style>
+<!-- http example.org uri makes this an oop if with fission -->
+<iframe style="height: 1000vh" src="http://example.org/1743533-1-helper.html"></iframe>
+</html>
+
+<!--
+Some notes about this test.
+To reproduce the problem we just need an oop iframe that spans multiple pages,
+and some content in it that also spans multiple pages. I used text instead
+of a background color because background colors don't show up by default in
+print preview. We're using page mode here and not print preview, so that is
+not technically required here.
+
+We'd like to compare an oop iframe and an in process iframe with the same
+content to make sure they are the same. But some idiosyncracies with scrollbars
+in paged mode cause the rendering not to be exactly the same. Since paged mode
+is just for testing, and printing doesn't have scrollbars, it doesn't seem
+worth digging too much into it.
+
+We compare an iframe with content in it, to a blank iframe, and then we use a
+high minimum accepted number of pixels differing in the fuzz. This then makes
+sure the two documents differ by enough pixels.
+
+Note why we couldn't use other test types:
+
+I tried to write this as a wpt print reftest, it did not reproduce the bug.
+I'm not sure what wpt reftests use to simulate printing, but I suspect it
+is not similar enough to our print preview to trigger the bug.
+
+I tried to add this as a test to layout/base/tests/chrome/test_printpreview.xhtml
+but that is not feasible because that test runs as part of the mochitest-chrome
+suite, which I'm told doesn't even run in e10s mode, and definitely does not get
+run with fission, which is required to reproduce the bug.
+-->
diff --git a/layout/reftests/bugs/1743533-2.html b/layout/reftests/bugs/1743533-2.html
new file mode 100644
index 0000000000..e096506586
--- /dev/null
+++ b/layout/reftests/bugs/1743533-2.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html><html class="reftest-paged">
+<style>html{font-size:12pt}</style>
+<iframe style="height: 1000vh" src="1743533-1-helper.html"></iframe>
+</html>
diff --git a/layout/reftests/bugs/1743560-1-ref.html b/layout/reftests/bugs/1743560-1-ref.html
new file mode 100644
index 0000000000..1c3d568b53
--- /dev/null
+++ b/layout/reftests/bugs/1743560-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<div style="font-size: 2em">BRAILLE PATTERN BLANK should appear blank:
+[<span style="color:transparent">&#x2800;</span>]</div>
diff --git a/layout/reftests/bugs/1743560-1.html b/layout/reftests/bugs/1743560-1.html
new file mode 100644
index 0000000000..1379c23f08
--- /dev/null
+++ b/layout/reftests/bugs/1743560-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<div style="font-size: 2em">BRAILLE PATTERN BLANK should appear blank:
+[&#x2800;]</div>
diff --git a/layout/reftests/bugs/1743851-1-ref.html b/layout/reftests/bugs/1743851-1-ref.html
new file mode 100644
index 0000000000..07a9d22d25
--- /dev/null
+++ b/layout/reftests/bugs/1743851-1-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <script>
+
+ const spriteSheet = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALBAMAAACEzBAKAAAAFVBMVEUAAADMr3z///8PDw9AQEC/v7/w8PCtfkxVAAAAA3RSTlMAAAD6dsTeAAAAQ0lEQVQIWy3IQRGAIAAEwJ1zCEAFLEAUK5iPClaggj9rMH7Y57prrR0pOJB1kU58OIldsSt2BQVHaIN3Rnt4p2SwJj863A7yxMyt/AAAAABJRU5ErkJggg=='
+
+ const loadImage = (src) => {
+ return new Promise((resolve, reject) => {
+ var img = new Image()
+ img.onload = () => resolve(img)
+ img.onerror = () => reject(false)
+ img.src = src
+ })
+ }
+
+ let cursorImage
+
+ function drawTestImage(canvasID, alphaValue) {
+ const ctx = document.getElementById(canvasID).getContext("2d", { alpha: alphaValue })
+
+ ctx.fillStyle = "#808080" // For contrast
+ ctx.fillRect(0, 0, 30, 30)
+
+ createImageBitmap(cursorImage, 0, 0, 8, 11, { premultiplyAlpha: "none" }).then(image => {
+ ctx.drawImage(image, 10, 10)
+ })
+ }
+
+ window.addEventListener("DOMContentLoaded", () => {
+ loadImage(spriteSheet).then(img => {
+ cursorImage = img
+ drawTestImage("c1", true)
+ })
+ })
+
+ </script>
+ </head>
+ <body>
+ <canvas id="c1" width="30" height="30"></canvas>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/1743851-1.html b/layout/reftests/bugs/1743851-1.html
new file mode 100644
index 0000000000..b2fe31dd2d
--- /dev/null
+++ b/layout/reftests/bugs/1743851-1.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <script>
+
+ const spriteSheet = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALBAMAAACEzBAKAAAAFVBMVEUAAADMr3z///8PDw9AQEC/v7/w8PCtfkxVAAAAA3RSTlMAAAD6dsTeAAAAQ0lEQVQIWy3IQRGAIAAEwJ1zCEAFLEAUK5iPClaggj9rMH7Y57prrR0pOJB1kU58OIldsSt2BQVHaIN3Rnt4p2SwJj863A7yxMyt/AAAAABJRU5ErkJggg=='
+
+ const loadImage = (src) => {
+ return new Promise((resolve, reject) => {
+ var img = new Image()
+ img.onload = () => resolve(img)
+ img.onerror = () => reject(false)
+ img.src = src
+ })
+ }
+
+ let cursorImage
+
+ function drawTestImage(canvasID, alphaValue) {
+ const ctx = document.getElementById(canvasID).getContext("2d", { alpha: alphaValue })
+
+ ctx.fillStyle = "#808080" // For contrast
+ ctx.fillRect(0, 0, 30, 30)
+
+ createImageBitmap(cursorImage, 0, 0, 8, 11, { premultiplyAlpha: "none" }).then(image => {
+ ctx.drawImage(image, 10, 10)
+ })
+ }
+
+ window.addEventListener("DOMContentLoaded", () => {
+ loadImage(spriteSheet).then(img => {
+ cursorImage = img
+ drawTestImage("c0", false)
+ })
+ })
+
+ </script>
+ </head>
+ <body>
+ <canvas id="c0" width="30" height="30"></canvas>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/1744468-1-downscaled.png b/layout/reftests/bugs/1744468-1-downscaled.png
new file mode 100644
index 0000000000..c59f2c6784
--- /dev/null
+++ b/layout/reftests/bugs/1744468-1-downscaled.png
Binary files differ
diff --git a/layout/reftests/bugs/1744468-1-ref.html b/layout/reftests/bugs/1744468-1-ref.html
new file mode 100644
index 0000000000..adf2059cd0
--- /dev/null
+++ b/layout/reftests/bugs/1744468-1-ref.html
@@ -0,0 +1 @@
+<img src="1744468-1-downscaled.png">
diff --git a/layout/reftests/bugs/1744468-1.html b/layout/reftests/bugs/1744468-1.html
new file mode 100644
index 0000000000..8e48d8abf8
--- /dev/null
+++ b/layout/reftests/bugs/1744468-1.html
@@ -0,0 +1 @@
+<img src="1744468-1.png" style="width: 100px">
diff --git a/layout/reftests/bugs/1744468-1.png b/layout/reftests/bugs/1744468-1.png
new file mode 100644
index 0000000000..5bfab3854b
--- /dev/null
+++ b/layout/reftests/bugs/1744468-1.png
Binary files differ
diff --git a/layout/reftests/bugs/1747272-1-ref.html b/layout/reftests/bugs/1747272-1-ref.html
new file mode 100644
index 0000000000..ea9252267e
--- /dev/null
+++ b/layout/reftests/bugs/1747272-1-ref.html
@@ -0,0 +1,37 @@
+<html>
+ <head>
+ <meta charset=UTF-8>
+ <title>“Amiri Quran Colored†test</title>
+ <style>
+ @font-face {
+ font-family: AmiriMonochrome;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuran.otf');
+ }
+ .test {
+ float: left;
+ direction: rtl;
+ font-size: 330px;
+ line-height: 0;
+ margin: 10px;
+ padding: 0 50px;
+ background: blue;
+ color: blue;
+ }
+ .monochrome {
+ font-family: AmiriMonochrome;
+ }
+ </style>
+ </head>
+ <div>The Arabic glyphs should NOT be visible against the blue background in either box:</div>
+ <div class="test monochrome">
+ <p>اردو
+ </p>
+ </div>
+ <div class="test monochrome">
+ <p>اردو
+ </p>
+ </div>
+</html>
+
diff --git a/layout/reftests/bugs/1747272-1.html b/layout/reftests/bugs/1747272-1.html
new file mode 100644
index 0000000000..79f3c6007d
--- /dev/null
+++ b/layout/reftests/bugs/1747272-1.html
@@ -0,0 +1,46 @@
+<html>
+ <head>
+ <meta charset=UTF-8>
+ <title>“Amiri Quran Colored†test</title>
+ <style>
+ @font-face {
+ font-family: AmiriColored;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuranColored.otf');
+ }
+ @font-face {
+ font-family: AmiriMonochrome;
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/AmiriQuran.otf');
+ }
+ .test {
+ float: left;
+ direction: rtl;
+ font-size: 330px;
+ line-height: 0;
+ margin: 10px;
+ padding: 0 50px;
+ background: blue;
+ color: blue;
+ }
+ .colored {
+ font-family: AmiriColored;
+ }
+ .monochrome {
+ font-family: AmiriMonochrome;
+ }
+ </style>
+ </head>
+ <div>The Arabic glyphs should NOT be visible against the blue background in either box:</div>
+ <div class="test colored">
+ <p>اردو
+ </p>
+ </div>
+ <div class="test monochrome">
+ <p>اردو
+ </p>
+ </div>
+</html>
+
diff --git a/layout/reftests/bugs/1750146-1-ref.html b/layout/reftests/bugs/1750146-1-ref.html
new file mode 100644
index 0000000000..b0737ff72f
--- /dev/null
+++ b/layout/reftests/bugs/1750146-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px;">
+ <canvas id="c" width="100" height="100"></canvas>
+</div>
+
+<script>
+var ctx = document.getElementById('c').getContext('2d', { alpha: false });
+ctx.fillStyle = 'red';
+ctx.fillRect(0, 0, 50, 100);
+ctx.fillStyle = 'green';
+ctx.fillRect(50, 0, 50, 100);
+</script>
diff --git a/layout/reftests/bugs/1750146-1.html b/layout/reftests/bugs/1750146-1.html
new file mode 100644
index 0000000000..8e7d5b1bf3
--- /dev/null
+++ b/layout/reftests/bugs/1750146-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px; transform: scaleX(-1);">
+ <canvas id="c" width="100" height="100"></canvas>
+</div>
+
+<script>
+var ctx = document.getElementById('c').getContext('2d', { alpha: false });
+ctx.fillStyle = 'green';
+ctx.fillRect(0, 0, 50, 100);
+ctx.fillStyle = 'red';
+ctx.fillRect(50, 0, 50, 100);
+</script>
diff --git a/layout/reftests/bugs/175190-1-ref.html b/layout/reftests/bugs/175190-1-ref.html
new file mode 100644
index 0000000000..9caadd2ccd
--- /dev/null
+++ b/layout/reftests/bugs/175190-1-ref.html
@@ -0,0 +1,40 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Test Page</title>
+<style type="text/css">
+<!--
+td{
+ background-color: rgb(140,140,140);
+}
+-->
+</style>
+</head>
+<body>
+<table cellpadding=0 cellspacing=0 border=0 width=150>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+</table>
+<table cellpadding=0 cellspacing=0 border=0 width=150>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+</table>
+<table cellpadding=0 cellspacing=0 border=0>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+<tr><td><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></td></tr>
+</table>
+<hr>
+</body>
+</html>
diff --git a/layout/reftests/bugs/175190-1.html b/layout/reftests/bugs/175190-1.html
new file mode 100644
index 0000000000..2f7568c74b
--- /dev/null
+++ b/layout/reftests/bugs/175190-1.html
@@ -0,0 +1,41 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Test Page</title>
+<style type="text/css">
+<!--
+.nav {
+ display:block;
+ background-color: rgb(140,140,140);
+}
+-->
+</style>
+</head>
+<body>
+<table cellpadding=0 cellspacing=0 border=0 width=150>
+<tr><td class="nav"><a href="a.htm"><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+<tr><td class="nav"><a href="a.htm"><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+</table>
+<table cellpadding=0 cellspacing=0 border=0 width=150>
+<tr><td><a href="a.htm" class="nav"><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+<tr><td><a href="a.htm" class="nav"><img width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+</table>
+<table cellpadding=0 cellspacing=0 border=0 width=150>
+<tr><td><a href="a.htm"><img class="nav" width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+<tr><td><a href="a.htm"><img class="nav" width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
+ border=0></a></td></tr>
+</table>
+<hr>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1769082-1-ref.html b/layout/reftests/bugs/1769082-1-ref.html
new file mode 100644
index 0000000000..db9531d1a5
--- /dev/null
+++ b/layout/reftests/bugs/1769082-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px;">
+ <canvas id="c" width="100" height="100"></canvas>
+</div>
+
+<script>
+var ctx = document.getElementById('c').getContext('2d');
+var grd = ctx.createLinearGradient(0, 0, 100, 0);
+grd.addColorStop(0, 'black');
+grd.addColorStop(1, 'white');
+ctx.fillStyle = grd;
+ctx.fillRect(0, 0, 100, 100);
+
+ctx.globalAlpha = 0.8;
+ctx.fillStyle = 'white';
+ctx.fillRect(0, 0, 100, 100);
+</script>
diff --git a/layout/reftests/bugs/1769082-1.html b/layout/reftests/bugs/1769082-1.html
new file mode 100644
index 0000000000..fd5c847f9e
--- /dev/null
+++ b/layout/reftests/bugs/1769082-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<div style="width: 100px; height: 100px;">
+ <canvas id="c" width="100" height="100"></canvas>
+</div>
+
+<script>
+var ctx = document.getElementById('c').getContext('2d');
+var grd = ctx.createLinearGradient(0, 0, 100, 0);
+grd.addColorStop(0, 'black');
+grd.addColorStop(1, 'white');
+ctx.fillStyle = grd;
+ctx.fillRect(0, 0, 100, 100);
+
+ctx.globalCompositeOperation = 'luminosity';
+ctx.globalAlpha = 0.8;
+ctx.fillStyle = 'white';
+ctx.fillRect(0, 0, 100, 100);
+</script>
diff --git a/layout/reftests/bugs/1773484-ref.html b/layout/reftests/bugs/1773484-ref.html
new file mode 100644
index 0000000000..e5fee16a4a
--- /dev/null
+++ b/layout/reftests/bugs/1773484-ref.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<html>
+ <div style="font-size: 20vw">Some text</div>
+</html>
diff --git a/layout/reftests/bugs/1773484.html b/layout/reftests/bugs/1773484.html
new file mode 100644
index 0000000000..17915b4f13
--- /dev/null
+++ b/layout/reftests/bugs/1773484.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<html reftest-text-zoom="2">
+ <div style="font-size: 10vw">Some text</div>
+</html>
diff --git a/layout/reftests/bugs/1773633-full-zoom.html b/layout/reftests/bugs/1773633-full-zoom.html
new file mode 100644
index 0000000000..67547611d8
--- /dev/null
+++ b/layout/reftests/bugs/1773633-full-zoom.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<html reftest-zoom="1.5">
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ background-color: purple;
+ }
+</style>
+<div>Box with text</div>
diff --git a/layout/reftests/bugs/1773633-text-zoom.html b/layout/reftests/bugs/1773633-text-zoom.html
new file mode 100644
index 0000000000..15535dd738
--- /dev/null
+++ b/layout/reftests/bugs/1773633-text-zoom.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<html reftest-text-zoom="1.5">
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ background-color: purple;
+ }
+</style>
+<div>Box with text</div>
diff --git a/layout/reftests/bugs/1773633.html b/layout/reftests/bugs/1773633.html
new file mode 100644
index 0000000000..95c8478b27
--- /dev/null
+++ b/layout/reftests/bugs/1773633.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ background-color: purple;
+ }
+</style>
+<div>Box with text</div>
diff --git a/layout/reftests/bugs/1777135-ref.html b/layout/reftests/bugs/1777135-ref.html
new file mode 100644
index 0000000000..a01432cb68
--- /dev/null
+++ b/layout/reftests/bugs/1777135-ref.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<style>
+:root {
+ color-scheme: dark;
+}
+</style>
+Here's a tall div, to generate a scrollbar:
+<div style="height:200vh"></div>
diff --git a/layout/reftests/bugs/1777135.html b/layout/reftests/bugs/1777135.html
new file mode 100644
index 0000000000..7ca5c45917
--- /dev/null
+++ b/layout/reftests/bugs/1777135.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<style>
+:root {
+ color-scheme: dark;
+ background-color: Canvas;
+}
+</style>
+Here's a tall div, to generate a scrollbar:
+<div style="height:200vh"></div>
diff --git a/layout/reftests/bugs/1778834-ref.html b/layout/reftests/bugs/1778834-ref.html
new file mode 100644
index 0000000000..f6abb3793a
--- /dev/null
+++ b/layout/reftests/bugs/1778834-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ background-color: #0060df;
+ }
+</style>
+<div></div>
diff --git a/layout/reftests/bugs/1778834.html b/layout/reftests/bugs/1778834.html
new file mode 100644
index 0000000000..43c7ff09c0
--- /dev/null
+++ b/layout/reftests/bugs/1778834.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>AccentColor without native accent</title>
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ background-color: AccentColor;
+ }
+</style>
+<div></div>
diff --git a/layout/reftests/bugs/1780191-1-ref.svg b/layout/reftests/bugs/1780191-1-ref.svg
new file mode 100644
index 0000000000..3a010b42b7
--- /dev/null
+++ b/layout/reftests/bugs/1780191-1-ref.svg
@@ -0,0 +1,36 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="315px" height="445px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <svg viewBox="0 0 21000 29700" id="thetarget">
+<style>
+ rect {
+ fill: rgb(187,187,187);
+ }
+</style>
+<script>
+// <![CDATA[
+function insertRect(x,y,w,h) {
+ const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+ rect.setAttribute("x", x.toString());
+ rect.setAttribute("y", y.toString());
+ rect.setAttribute("height", h.toString());
+ rect.setAttribute("width", w.toString());
+ document.getElementById("thetarget").appendChild(rect);
+}
+function place() {
+ let baseleft = 2000;
+ let basetop = 2000;
+ let width = 60;
+ let height = 539;
+ let coldiff = 120;
+ let rowdiff = 600;
+ for (let row = 0; row <= 60; row++) {
+ insertRect(baseleft, basetop + rowdiff*row, 34200, height);
+ }
+}
+
+place();
+// ]]>
+</script>
+
+ </svg>
+</svg>
diff --git a/layout/reftests/bugs/1780191-1.svg b/layout/reftests/bugs/1780191-1.svg
new file mode 100644
index 0000000000..6413b72611
--- /dev/null
+++ b/layout/reftests/bugs/1780191-1.svg
@@ -0,0 +1,33 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="315px" height="445px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <svg viewBox="0 0 21000 29700" id="thetarget">
+<script>
+// <![CDATA[
+function insertRect(x,y,w,h) {
+ const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+ rect.setAttribute("x", x.toString());
+ rect.setAttribute("y", y.toString());
+ rect.setAttribute("height", h.toString());
+ rect.setAttribute("width", w.toString());
+ document.getElementById("thetarget").appendChild(rect);
+}
+function place() {
+ let baseleft = 2000;
+ let basetop = 2000;
+ let width = 18;
+ let height = 539;
+ let coldiff = 66;
+ let rowdiff = 600;
+ for (let row = 0; row <= 60; row++) {
+ for (let col = 0; col <= 360; col++) {
+ insertRect(baseleft + col*coldiff + row, basetop + rowdiff*row, width, height);
+ }
+ }
+}
+place();
+// ]]>
+</script>
+
+
+ </svg>
+</svg>
diff --git a/layout/reftests/bugs/1787127-ref.html b/layout/reftests/bugs/1787127-ref.html
new file mode 100644
index 0000000000..2bbc1788c7
--- /dev/null
+++ b/layout/reftests/bugs/1787127-ref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<style>:root { background-color: teal }</style>
diff --git a/layout/reftests/bugs/1787127.html b/layout/reftests/bugs/1787127.html
new file mode 100644
index 0000000000..5a8c074bdb
--- /dev/null
+++ b/layout/reftests/bugs/1787127.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<style>:root { background-color: teal }</style>
+<iframe frameborder=0></iframe>
diff --git a/layout/reftests/bugs/1792643-1-ref.html b/layout/reftests/bugs/1792643-1-ref.html
new file mode 100644
index 0000000000..444853c341
--- /dev/null
+++ b/layout/reftests/bugs/1792643-1-ref.html
@@ -0,0 +1,36 @@
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <title>Test for bug 1792643</title>
+ <style>
+ table {
+ width: 500px;
+ }
+
+ th {
+ background-color: green;
+ }
+
+ div {
+ width: 300px;
+ overflow: hidden;
+ }
+ </style>
+</head>
+
+<body>
+ <div>
+ <table>
+ <colgroup></colgroup>
+ <tr style="filter: hue-rotate(0);">
+ <th>foo</th>
+ </tr>
+ <tr style="will-change: transform;">
+ <th>bar</th>
+ </tr>
+ </table>
+ </div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/1792643-1.html b/layout/reftests/bugs/1792643-1.html
new file mode 100644
index 0000000000..8391f64fd1
--- /dev/null
+++ b/layout/reftests/bugs/1792643-1.html
@@ -0,0 +1,40 @@
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <title>Test for bug 1792643</title>
+ <style>
+ table {
+ width: 500px;
+ }
+
+ th {
+ background-color: green;
+ }
+
+ colgroup {
+ background-color: red;
+ }
+
+ div {
+ width: 300px;
+ overflow: hidden;
+ }
+ </style>
+</head>
+
+<body>
+ <div>
+ <table>
+ <colgroup></colgroup>
+ <tr style="filter: hue-rotate(0);">
+ <th>foo</th>
+ </tr>
+ <tr style="will-change: transform;">
+ <th>bar</th>
+ </tr>
+ </table>
+ </div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/179596-1a-ref.html b/layout/reftests/bugs/179596-1a-ref.html
new file mode 100644
index 0000000000..2401c97da2
--- /dev/null
+++ b/layout/reftests/bugs/179596-1a-ref.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <title>bug 179596</title>
+ </head>
+ <body>
+ <OL>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ </OL>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/179596-1a.html b/layout/reftests/bugs/179596-1a.html
new file mode 100644
index 0000000000..fbc460a918
--- /dev/null
+++ b/layout/reftests/bugs/179596-1a.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <title>bug 179596</title>
+ </head>
+ <body>
+ <OL>
+ <LI></LI>
+ <LI></LI>
+ <LI></LI>
+ <LI></LI>
+ </OL>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/179596-1b-ref.html b/layout/reftests/bugs/179596-1b-ref.html
new file mode 100644
index 0000000000..a90d07beb0
--- /dev/null
+++ b/layout/reftests/bugs/179596-1b-ref.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <title>bug 179596</title>
+ </head>
+ <body>
+ <UL>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ <LI><span style="visibility:hidden">Hello</span></LI>
+ </UL>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/179596-1b.html b/layout/reftests/bugs/179596-1b.html
new file mode 100644
index 0000000000..6f1f4e1dce
--- /dev/null
+++ b/layout/reftests/bugs/179596-1b.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <title>bug 179596</title>
+ </head>
+ <body>
+ <UL>
+ <LI></LI>
+ <LI></LI>
+ <LI></LI>
+ <LI></LI>
+ </UL>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/179596-2-ref.html b/layout/reftests/bugs/179596-2-ref.html
new file mode 100644
index 0000000000..34b101f8f6
--- /dev/null
+++ b/layout/reftests/bugs/179596-2-ref.html
@@ -0,0 +1,7 @@
+<title>line-height quirk should be based on display (bug 179596)</title>
+<ul style="margin: 0 0 0 3em; padding: 0">
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+</ul>
diff --git a/layout/reftests/bugs/179596-2-ref2.html b/layout/reftests/bugs/179596-2-ref2.html
new file mode 100644
index 0000000000..781e44d449
--- /dev/null
+++ b/layout/reftests/bugs/179596-2-ref2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>line-height quirk should be based on display (bug 179596)</title>
+<div style="margin: 0 0 0 3em; padding: 0">
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+</div>
diff --git a/layout/reftests/bugs/179596-2-ref3.html b/layout/reftests/bugs/179596-2-ref3.html
new file mode 100644
index 0000000000..b56cd21889
--- /dev/null
+++ b/layout/reftests/bugs/179596-2-ref3.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>line-height quirk should be based on display (bug 179596)</title>
+<ul style="margin: 0 0 0 3em; padding: 0">
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+ <li><span style="font-size:70%">hello</span></li>
+</ul>
diff --git a/layout/reftests/bugs/179596-2.html b/layout/reftests/bugs/179596-2.html
new file mode 100644
index 0000000000..7fb1bd427a
--- /dev/null
+++ b/layout/reftests/bugs/179596-2.html
@@ -0,0 +1,7 @@
+<title>line-height quirk should be based on display (bug 179596)</title>
+<div style="margin: 0 0 0 3em; padding: 0">
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+ <div style="display:list-item"><span style="font-size:70%">hello</span></div>
+</div>
diff --git a/layout/reftests/bugs/1798297-1-notref.html b/layout/reftests/bugs/1798297-1-notref.html
new file mode 100644
index 0000000000..ffe2242410
--- /dev/null
+++ b/layout/reftests/bugs/1798297-1-notref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="ja">
+<head>
+<meta charset="UTF-8" />
+<title>Coordination of kern and palt features for CJK kerning</title>
+<style>
+.test {
+ font-family: "Yu Gothic UI";
+ font-size: 3em;
+ font-feature-settings: "kern" 1, "palt" 1; /* should render differently from testcase */
+}
+</style>
+<body>
+<p>Enabling font-kerning:normal should NOT apply 'palt' for the Yu Gothic UI font</p>
+<div class=test>幻塔 イラストコンテスト 開催</div>
+</body>
+</head>
diff --git a/layout/reftests/bugs/1798297-1-ref.html b/layout/reftests/bugs/1798297-1-ref.html
new file mode 100644
index 0000000000..2c85730a28
--- /dev/null
+++ b/layout/reftests/bugs/1798297-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="ja">
+<head>
+<meta charset="UTF-8" />
+<title>Coordination of kern and palt features for CJK kerning</title>
+<style>
+.test {
+ font-family: "Yu Gothic UI";
+ font-size: 3em;
+ font-kerning: none; /* should render the same as testcase with 'normal' */
+}
+</style>
+<body>
+<p>Enabling font-kerning:normal should NOT apply 'palt' for the Yu Gothic UI font</p>
+<div class=test>幻塔 イラストコンテスト 開催</div>
+</body>
+</head>
diff --git a/layout/reftests/bugs/1798297-1.html b/layout/reftests/bugs/1798297-1.html
new file mode 100644
index 0000000000..e495ba38bb
--- /dev/null
+++ b/layout/reftests/bugs/1798297-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="ja">
+<head>
+<meta charset="UTF-8" />
+<title>Coordination of kern and palt features for CJK kerning</title>
+<style>
+.test {
+ font-family: "Yu Gothic UI";
+ font-size: 3em;
+ font-kerning: normal;
+}
+</style>
+<body>
+<p>Enabling font-kerning:normal should NOT apply 'palt' for the Yu Gothic UI font</p>
+<div class=test>幻塔 イラストコンテスト 開催</div>
+</body>
+</head>
diff --git a/layout/reftests/bugs/1799425-1-ref.html b/layout/reftests/bugs/1799425-1-ref.html
new file mode 100644
index 0000000000..ab11cc9710
--- /dev/null
+++ b/layout/reftests/bugs/1799425-1-ref.html
@@ -0,0 +1,21 @@
+<style>
+body,
+html {
+ background-color: white;
+}
+.wrapper {
+ mix-blend-mode: difference;
+}
+.text {
+ color: white;
+}
+</style>
+<div class="wrapper">
+ <div class="text">This text should always be black
+ </div>
+</div>
+
+<div id="video">
+ <div>Hover here to make video disappear</div>
+ <iframe srcdoc="<div style='width: 100px; height: 100px; background: blue;'></div>">
+</div> \ No newline at end of file
diff --git a/layout/reftests/bugs/1799425-1.html b/layout/reftests/bugs/1799425-1.html
new file mode 100644
index 0000000000..3ddf10196c
--- /dev/null
+++ b/layout/reftests/bugs/1799425-1.html
@@ -0,0 +1,26 @@
+<style>
+body,
+html {
+ background-color: white;
+}
+.wrapper {
+ mix-blend-mode: difference;
+}
+.text {
+ color: white;
+}
+</style>
+<div class="wrapper">
+ <div class="text">This text should always be black
+ </div>
+</div>
+
+<div id="video">
+ <div>Hover here to make video disappear</div>
+ <iframe srcdoc="<style>
+ html, body {
+ background: white;
+ }
+ </style>
+<div style='width: 100px; height: 100px; background: blue;'></div>">
+</div> \ No newline at end of file
diff --git a/layout/reftests/bugs/1800437-1-ref.html b/layout/reftests/bugs/1800437-1-ref.html
new file mode 100644
index 0000000000..311f560d4c
--- /dev/null
+++ b/layout/reftests/bugs/1800437-1-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+.test {
+ width: 10em; /* Script below will adjust this. */
+}
+#measure {
+ color: transparent;
+ border: 1px solid transparent;
+ display: inline-block;
+}
+p {
+ border: 1px solid gray;
+ margin: 10px;
+ font: 100px/1.5 serif;
+ white-space: nowrap;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ direction: rtl;
+}
+</style>
+<div>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x2026;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x2026;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x2026;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x2026;</p>
+<p id=measure>&#x1f310;</p>
+</div>
+<script>
+/* Set width of the "test" elements to ensure it can fit 4 globe glyphs,
+ plus half a glyph of extra space. */
+measure = document.getElementById("measure");
+globeWidth = window.getComputedStyle(measure).width.replace("px", "");
+document.styleSheets[0].cssRules[0].style.width = 4.5 * globeWidth + "px";
+</script>
diff --git a/layout/reftests/bugs/1800437-1.html b/layout/reftests/bugs/1800437-1.html
new file mode 100644
index 0000000000..3ec340c5e6
--- /dev/null
+++ b/layout/reftests/bugs/1800437-1.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+.test {
+ width: 10em; /* Script below will adjust this. */
+}
+#measure {
+ color: transparent;
+ border: 1px solid transparent;
+ display: inline-block;
+}
+p {
+ border: 1px solid gray;
+ margin: 10px;
+ font: 100px/1.5 serif;
+ white-space: nowrap;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ direction: rtl;
+}
+</style>
+<div>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p class=test>&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;&#x1f310;</p>
+<p id=measure>&#x1f310;</p>
+</div>
+<script>
+/* Set width of the "test" elements to ensure it can fit 4 globe glyphs,
+ plus half a glyph of extra space. */
+measure = document.getElementById("measure");
+globeWidth = window.getComputedStyle(measure).width.replace("px", "");
+document.styleSheets[0].cssRules[0].style.width = 4.5 * globeWidth + "px";
+</script>
diff --git a/layout/reftests/bugs/180085-1-ref.html b/layout/reftests/bugs/180085-1-ref.html
new file mode 100644
index 0000000000..d07a67f7f1
--- /dev/null
+++ b/layout/reftests/bugs/180085-1-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .none { -moz-appearance: none; }
+ input, button { width: 1.5em; padding: 0; font-size: 14px; }
+</style>
+</head>
+<body>
+ <input class="none" type="button" value="M"><br>
+ <input class="none" type="button" value="M"><br>
+
+ <input class="none" type="button" value="Long Text"><br>
+ <input class="none" type="button" value="Long Text"><br>
+
+ <input type="button" value="M"><br>
+ <input type="button" value="M"><br>
+
+ <input type="button" value="Long Text"><br>
+ <input type="button" value="Long Text"><br>
+
+ <button class="none" type="button">M</button><br>
+ <button class="none" type="button">M</button><br>
+
+ <button class="none" type="button">Long Text</button><br>
+ <button class="none" type="button">Long Text</button><br>
+
+ <button type="button">M</button><br>
+ <button type="button">M</button><br>
+
+ <button type="button">Long Text</button><br>
+ <button type="button">Long Text</button><br>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/180085-1.html b/layout/reftests/bugs/180085-1.html
new file mode 100644
index 0000000000..1c22030a5b
--- /dev/null
+++ b/layout/reftests/bugs/180085-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .none { -moz-appearance: none; }
+ input, button { width: 1.5em; padding-top: 0; padding-bottom: 0; font-size: 14px; }
+</style>
+</head>
+<body>
+ <input class="none" type="button" value="M"><br>
+ <input class="none" type="button" style="padding: 0 0.2em;" value="M"><br>
+
+ <input class="none" type="button" value="Long Text"><br>
+ <input class="none" type="button" style="padding: 0 0.2em;" value="Long Text"><br>
+
+ <input type="button" value="M"><br>
+ <input type="button" style="padding: 0 0.2em;" value="M"><br>
+
+ <input type="button" value="Long Text"><br>
+ <input type="button" style="padding: 0 0.2em;" value="Long Text"><br>
+
+ <button class="none" type="button">M</button><br>
+ <button class="none" type="button" style="padding: 0 0.2em;" >M</button><br>
+
+ <button class="none" type="button">Long Text</button><br>
+ <button class="none" type="button" style="padding: 0 0.2em;">Long Text</button><br>
+
+ <button type="button">M</button><br>
+ <button type="button" style="padding: 0 0.2em;">M</button><br>
+
+ <button type="button">Long Text</button><br>
+ <button type="button" style="padding: 0 0.2em;" >Long Text</button><br>
+</body>
+</html>
diff --git a/layout/reftests/bugs/180085-2-ref.html b/layout/reftests/bugs/180085-2-ref.html
new file mode 100644
index 0000000000..48e106b089
--- /dev/null
+++ b/layout/reftests/bugs/180085-2-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .none { -moz-appearance: none; }
+ input, button { width: 1.5em; padding: 0; font-size: 12px }
+</style>
+</head>
+<body>
+ <input class="none" type="button" value="M"><br>
+ <input class="none" type="button" value="M"><br>
+
+ <input class="none" type="button" value="Long Text"><br>
+ <input class="none" type="button" value="Long Text"><br>
+
+ <input type="button" value="M"><br>
+ <input type="button" value="M"><br>
+
+ <input type="button" value="Long Text"><br>
+ <input type="button" value="Long Text"><br>
+
+ <button class="none" type="button">M</button><br>
+ <button class="none" type="button">M</button><br>
+
+ <button class="none" type="button">Long Text</button><br>
+ <button class="none" type="button">Long Text</button><br>
+
+ <button type="button">M</button><br>
+ <button type="button">M</button><br>
+
+ <button type="button">Long Text</button><br>
+ <button type="button">Long Text</button><br>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/180085-2.html b/layout/reftests/bugs/180085-2.html
new file mode 100644
index 0000000000..66d3be296a
--- /dev/null
+++ b/layout/reftests/bugs/180085-2.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .none { -moz-appearance: none; }
+ input, button { width: 1.5em; padding-top: 0; padding-bottom: 0; font-size: 12px }
+</style>
+</head>
+<body>
+ <input class="none" type="button" value="M"><br>
+ <input class="none" type="button" style="padding: 0 0.2em;" value="M"><br>
+
+ <input class="none" type="button" value="Long Text"><br>
+ <input class="none" type="button" style="padding: 0 0.2em;" value="Long Text"><br>
+
+ <input type="button" value="M"><br>
+ <input type="button" style="padding: 0 0.2em;" value="M"><br>
+
+ <input type="button" value="Long Text"><br>
+ <input type="button" style="padding: 0 0.2em;" value="Long Text"><br>
+
+ <button class="none" type="button">M</button><br>
+ <button class="none" type="button" style="padding: 0 0.2em;" >M</button><br>
+
+ <button class="none" type="button">Long Text</button><br>
+ <button class="none" type="button" style="padding: 0 0.2em;">Long Text</button><br>
+
+ <button type="button">M</button><br>
+ <button type="button" style="padding: 0 0.2em;">M</button><br>
+
+ <button type="button">Long Text</button><br>
+ <button type="button" style="padding: 0 0.2em;" >Long Text</button><br>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1803999-1-ref.html b/layout/reftests/bugs/1803999-1-ref.html
new file mode 100644
index 0000000000..6c41d5c2bb
--- /dev/null
+++ b/layout/reftests/bugs/1803999-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+div {
+ margin: 10px;
+ width: 2ic;
+ height: 1ic;
+ background: blue;
+ /* Examples of Windows and macOS fonts that include vertical metrics: */
+ font: 20px Yu Gothic, Yu Mincho, SimSun, Meiryo, Hiragino Sans, STSong, sans-serif;
+}
+</style>
+<p>Both blocks should be the same size:</p>
+<div></div>
+<div></div>
diff --git a/layout/reftests/bugs/1803999-1.html b/layout/reftests/bugs/1803999-1.html
new file mode 100644
index 0000000000..eb6fbb5999
--- /dev/null
+++ b/layout/reftests/bugs/1803999-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ margin: 10px;
+ width: 2ic;
+ height: 1ic;
+ background: blue;
+ /* Examples of Windows and macOS fonts that include vertical metrics: */
+ font: 20px Yu Gothic, Yu Mincho, SimSun, Meiryo, Hiragino Sans, STSong, sans-serif;
+}
+#test {
+ writing-mode: vertical-rl;
+}
+</style>
+<p>Both blocks should be the same size:</p>
+<div></div>
+<div id=test></div>
diff --git a/layout/reftests/bugs/1804872-1-ref.html b/layout/reftests/bugs/1804872-1-ref.html
new file mode 100644
index 0000000000..d2947bf475
--- /dev/null
+++ b/layout/reftests/bugs/1804872-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-color: green;
+ scale:2;
+}
+</style>
+<img id="target" src="repeatable-diagonal-gradient.png">
+</html>
diff --git a/layout/reftests/bugs/1804872-1.html b/layout/reftests/bugs/1804872-1.html
new file mode 100644
index 0000000000..d3ae36ee96
--- /dev/null
+++ b/layout/reftests/bugs/1804872-1.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 2.0; }
+ 100% { scale: 2.0; }
+}
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-color: green;
+ scale:0.1;
+}
+</style>
+<img id="target" src="repeatable-diagonal-gradient.png">
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</html>
diff --git a/layout/reftests/bugs/1804872-2-ref.html b/layout/reftests/bugs/1804872-2-ref.html
new file mode 100644
index 0000000000..d13087343a
--- /dev/null
+++ b/layout/reftests/bugs/1804872-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-color: green;
+ scale:2;
+}
+</style>
+<img id="target" src="pinwheel_logo.svg">
+</html>
diff --git a/layout/reftests/bugs/1804872-2.html b/layout/reftests/bugs/1804872-2.html
new file mode 100644
index 0000000000..6801b8fb5a
--- /dev/null
+++ b/layout/reftests/bugs/1804872-2.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 2.0; }
+ 100% { scale: 2.0; }
+}
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-color: green;
+ scale:0.1;
+}
+</style>
+<img id="target" src="pinwheel_logo.svg">
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</html>
diff --git a/layout/reftests/bugs/1804872-3-ref.html b/layout/reftests/bugs/1804872-3-ref.html
new file mode 100644
index 0000000000..d69fe27404
--- /dev/null
+++ b/layout/reftests/bugs/1804872-3-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-color: green;
+ background-image: url(pinwheel_logo.svg);
+ background-size: 200px 200px;
+ background-position: -50px -50px;
+ scale:2;
+}
+</style>
+<div id="target">
+</html>
diff --git a/layout/reftests/bugs/1804872-3.html b/layout/reftests/bugs/1804872-3.html
new file mode 100644
index 0000000000..33ad3e1c69
--- /dev/null
+++ b/layout/reftests/bugs/1804872-3.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<style>
+html {
+ /* Suppress scrollbars to avoid periodical unthrottling for transform */
+ /* animations on the compositor. */
+ overflow: hidden;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+@keyframes anim {
+ 0% { scale: 2.0; }
+ 100% { scale: 2.0; }
+}
+
+#target {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ background-image: url(pinwheel_logo.svg);
+ background-size: 200px 200px;
+ background-position: -50px -50px;
+ background-color: green;
+ scale:0.1;
+}
+</style>
+<div id="target">
+
+
+<script>
+document.addEventListener('MozReftestInvalidate', () => {
+ // Set a bit longer animation delay to avoid painting the initial animation
+ // style on the main thread.
+ target.style.animation = "anim 100s 1s";
+ target.addEventListener("animationstart", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</html>
diff --git a/layout/reftests/bugs/1814047-ref.html b/layout/reftests/bugs/1814047-ref.html
new file mode 100644
index 0000000000..0d8204ae73
--- /dev/null
+++ b/layout/reftests/bugs/1814047-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<html class="reftest-paged">
+ <button style="color: black; background: transparent;">Something</button>
diff --git a/layout/reftests/bugs/1814047.html b/layout/reftests/bugs/1814047.html
new file mode 100644
index 0000000000..819d4a7bdc
--- /dev/null
+++ b/layout/reftests/bugs/1814047.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<html class="reftest-paged" reftest-paged-backgrounds="false">
+ <button style="color: white; background: black;">Something</button>
diff --git a/layout/reftests/bugs/1814628-1-ref.html b/layout/reftests/bugs/1814628-1-ref.html
new file mode 100644
index 0000000000..a756d01294
--- /dev/null
+++ b/layout/reftests/bugs/1814628-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div style="position: absolute; width: 100px; height: 10px; background: red;"></div>
+<div style="position: absolute; width: 6px; height: 6px; background: green;"></div>
diff --git a/layout/reftests/bugs/1814628-1.html b/layout/reftests/bugs/1814628-1.html
new file mode 100644
index 0000000000..273e6269e1
--- /dev/null
+++ b/layout/reftests/bugs/1814628-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="position: absolute; width: 100px; height: 10px; background: red;"></div>
+<div style="position: absolute; width: 6px; height: 6px; background: green;"></div>
+<div style="position: absolute; width: 100px; height: 10px; border-radius: 100% 0; background: red;"></div>
diff --git a/layout/reftests/bugs/1818412-1-ref.html b/layout/reftests/bugs/1818412-1-ref.html
new file mode 100644
index 0000000000..d5c0a08286
--- /dev/null
+++ b/layout/reftests/bugs/1818412-1-ref.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<meta charset=UTF-8>
+<style>
+@font-face{
+ font-family:Ahem;
+ src:url(../fonts/Ahem.ttf);
+}
+body{
+ margin:0;
+}
+span{
+ display:block;
+}
+span div{
+ position:absolute;
+ width:200px;
+ height:100px;
+ overflow:hidden;
+}
+div.up{
+ background:pink;
+}
+div.down{
+ top:100px;
+ background:yellow;
+}
+div.text{
+ position:absolute;
+ height:200px;
+ font:160px/1.2 Ahem;
+ padding-left:20px;
+}
+</style>
+<body>
+ <span>
+ <div class="up"></div>
+ <div class="down"></div>
+ <div class="text">A</div>
+ </span>
+</body>
diff --git a/layout/reftests/bugs/1818412-1.html b/layout/reftests/bugs/1818412-1.html
new file mode 100644
index 0000000000..f90bfc27cd
--- /dev/null
+++ b/layout/reftests/bugs/1818412-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<meta charset=UTF-8>
+<style>
+@font-face{
+ font-family:Ahem;
+ src:url(../fonts/Ahem.ttf);
+}
+body{
+ margin:0;
+}
+span{
+ display:block;
+}
+span div{
+ position:absolute;
+ width:200px;
+ height:100px;
+ overflow:hidden;
+}
+div.up{
+ background:pink;
+}
+div.down{
+ top:100px;
+ background:yellow;
+}
+div.text{
+ position:absolute;
+ height:200px;
+ font:160px/1.2 Ahem;
+ padding-left:20px;
+}
+div.down div.text{
+ bottom:0px;
+}
+</style>
+<body>
+ <span>
+ <div class="up">
+ <div class="text">A</div>
+ </div>
+ <div class="down">
+ <div class="text">A</div>
+ </div>
+ </span>
+</body>
diff --git a/layout/reftests/bugs/18217-basic-1-ref.html b/layout/reftests/bugs/18217-basic-1-ref.html
new file mode 100644
index 0000000000..a1bda60391
--- /dev/null
+++ b/layout/reftests/bugs/18217-basic-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+</head>
+<body>
+<p>abc</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-basic-1.html b/layout/reftests/bugs/18217-basic-1.html
new file mode 100644
index 0000000000..c24fb5ea3b
--- /dev/null
+++ b/layout/reftests/bugs/18217-basic-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-table' is the baseline of the first row of the table." />
+<meta name="flags" content="" />
+<style type="text/css">
+span { display: inline-table; }
+</style>
+</head>
+<body>
+<p>a<span>b</span>c</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-basic-2-ref.html b/layout/reftests/bugs/18217-basic-2-ref.html
new file mode 100644
index 0000000000..111bfba4ae
--- /dev/null
+++ b/layout/reftests/bugs/18217-basic-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+</head>
+<body>
+<p>abcde</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-basic-2a.html b/layout/reftests/bugs/18217-basic-2a.html
new file mode 100644
index 0000000000..3476600773
--- /dev/null
+++ b/layout/reftests/bugs/18217-basic-2a.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-table' is the baseline of the first row of the table." />
+<meta name="flags" content="" />
+<style type="text/css">
+span { display: inline-table; }
+span > span { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<p>a<span>bcd<span>x</span></span>e</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-basic-2b.html b/layout/reftests/bugs/18217-basic-2b.html
new file mode 100644
index 0000000000..111082d0ed
--- /dev/null
+++ b/layout/reftests/bugs/18217-basic-2b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-table' is the baseline of the first row of the table." />
+<meta name="flags" content="" />
+<style type="text/css">
+span > span { display: table-cell; }
+span > span > span { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<p><span>a<span>bcd<span>x</span></span>e</span></p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-height-1-ref.html b/layout/reftests/bugs/18217-height-1-ref.html
new file mode 100644
index 0000000000..de20961594
--- /dev/null
+++ b/layout/reftests/bugs/18217-height-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { display: table; width: 10em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>Test<br>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-height-1.html b/layout/reftests/bugs/18217-height-1.html
new file mode 100644
index 0000000000..eddb0e54a8
--- /dev/null
+++ b/layout/reftests/bugs/18217-height-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'height: auto' on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<meta name="flags" content="" />
+<style type="text/css">
+div { display: inline-table; width: 10em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>Test<br>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-height-2-ref.html b/layout/reftests/bugs/18217-height-2-ref.html
new file mode 100644
index 0000000000..5ec7e64717
--- /dev/null
+++ b/layout/reftests/bugs/18217-height-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { display: table; height: 5em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-height-2.html b/layout/reftests/bugs/18217-height-2.html
new file mode 100644
index 0000000000..99d1635c25
--- /dev/null
+++ b/layout/reftests/bugs/18217-height-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'height: &lt;length;&gt;' on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<meta name="flags" content="" />
+<style type="text/css">
+div { display: inline-table; height: 5em; vertical-align: baseline; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-valign-1-ref.html b/layout/reftests/bugs/18217-valign-1-ref.html
new file mode 100644
index 0000000000..ebd7b9a5c8
--- /dev/null
+++ b/layout/reftests/bugs/18217-valign-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+span#table { display: inline-table; }
+span#rowgroup { display: table-row-group; }
+span#row { display: table-row; }
+span#cell { display: table-cell; }
+span#table, span#rowgroup, span#row, span#cell {
+ border: 4px solid white;
+ margin: 3px 0;
+ border-width: 4px 0;
+ padding: 9px 0;
+ border-spacing: 0 5px;
+}
+span#block { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<table border><tr><td>
+<p><span id="table"><span id="rowgroup"><span id="row"><span id="cell">abcde<span id="block">x</span></span></span></span></span></p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-valign-1.html b/layout/reftests/bugs/18217-valign-1.html
new file mode 100644
index 0000000000..c51dd612df
--- /dev/null
+++ b/layout/reftests/bugs/18217-valign-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for vertical alignment on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display" />
+<meta name="assert" content="it is a rectangular block that participates in an inline formatting context)." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-table' is the baseline of the first row of the table." />
+<meta name="flags" content="" />
+<style type="text/css">
+span#table { display: inline-table; }
+span#rowgroup { display: table-row-group; }
+span#row { display: table-row; }
+span#cell { display: table-cell; }
+span#table, span#rowgroup, span#row, span#cell {
+ border: 4px solid white;
+ margin: 3px 0;
+ border-width: 4px 0;
+ padding: 9px 0;
+ border-spacing: 0 5px;
+}
+span#block { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<table border><tr><td>
+<p>a<span id="table"><span id="rowgroup"><span id="row"><span id="cell">bcd<span id="block">x</span></span></span></span></span>e</p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-1-ref.html b/layout/reftests/bugs/18217-width-1-ref.html
new file mode 100644
index 0000000000..acd8e0ce97
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: table; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>x<div>This is some text that is wider than 10em but has no words wider than 10em.</div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-1a.html b/layout/reftests/bugs/18217-width-1a.html
new file mode 100644
index 0000000000..1072d641ca
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width' shrink-wrapping on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-table; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>x <div>This is some text that is wider than 10em but has no words wider than 10em.</div> z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-1b.html b/layout/reftests/bugs/18217-width-1b.html
new file mode 100644
index 0000000000..d4ca6f15c1
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width' shrink-wrapping on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-table; background: green; color: white; width: 10em; }
+</style>
+</head>
+<body>
+<div>x <div>This is some text that is wider than 10em but has no words wider than 10em.</div> z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-2-ref.html b/layout/reftests/bugs/18217-width-2-ref.html
new file mode 100644
index 0000000000..0a7540a883
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: table; background: green; color: white; width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div>y</div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-2a.html b/layout/reftests/bugs/18217-width-2a.html
new file mode 100644
index 0000000000..db5b4fbb80
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-2a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width' shrink-wrapping on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-table; background: green; color: white; }
+body > div > div > div { width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div><div>y</div></div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-width-2b.html b/layout/reftests/bugs/18217-width-2b.html
new file mode 100644
index 0000000000..587fed497c
--- /dev/null
+++ b/layout/reftests/bugs/18217-width-2b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width' shrink-wrapping on inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-table; background: green; color: white; width: 20em; }
+body > div > div > div { width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div><div>y</div></div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-1.html b/layout/reftests/bugs/18217-zorder-1.html
new file mode 100644
index 0000000000..8363cec762
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<meta name="flags" content="" />
+<style type="text/css">
+div { width: 2em; height: 2em; }
+span { display:inline-table; vertical-align: top; width: 2em; height: 2em; background: green; }
+div#after { margin-top:-2em; background: red; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;</span></div>
+<div id="after">&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-2.html b/layout/reftests/bugs/18217-zorder-2.html
new file mode 100644
index 0000000000..c988ebf7b1
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<meta name="flags" content="" />
+<style type="text/css">
+div { width: 2em; height: 2em; }
+span { display:inline-table; vertical-align: top; width: 2em; height: 2em; }
+span span { display: block; background: green; }
+div#after { margin-top: -2em; background: red; }
+</style>
+</head>
+<body>
+<div><span><span>&nbsp;</span></span></div>
+<div id="after">&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-3.html b/layout/reftests/bugs/18217-zorder-3.html
new file mode 100644
index 0000000000..6b58626533
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<meta name="flags" content="" />
+<style type="text/css">
+div { height: 1em; }
+div#test > span { display:inline-table; vertical-align: top; height: 1em; background: red; color: red; }
+div#after { margin-top:-1em; }
+div#after > span { display: inline; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div id="test"><span>&nbsp;x&nbsp;</span></div>
+<div id="after"><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-4.html b/layout/reftests/bugs/18217-zorder-4.html
new file mode 100644
index 0000000000..2cef836ab5
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<meta name="flags" content="" />
+<style type="text/css">
+div#test > span { display:inline-table; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+div#before { height: 1em; margin-bottom:-1em; }
+div#before > span { display: inline; vertical-align: top; background: red; color: red; }
+</style>
+</head>
+<body>
+<div id="before"><span>&nbsp;x&nbsp;</span></div>
+<div id="test"><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-5.html b/layout/reftests/bugs/18217-zorder-5.html
new file mode 100644
index 0000000000..dfa0156c6b
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-5.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-table</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<meta name="flags" content="" />
+<style type="text/css">
+div#test > span { display:inline-table; vertical-align: top; }
+div#test > span > span { display: block; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+div#before { height: 1em; margin-bottom:-1em; }
+div#before > span { display: inline; vertical-align: top; background: red; color: red; }
+</style>
+</head>
+<body>
+<div id="before"><span>&nbsp;x&nbsp;</span></div>
+<div id="test"><span><span>&nbsp;x&nbsp;</span></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-ref-inline-table.html b/layout/reftests/bugs/18217-zorder-ref-inline-table.html
new file mode 100644
index 0000000000..d3ccb7617b
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-ref-inline-table.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+span { display: inline-table; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-ref-inline.html b/layout/reftests/bugs/18217-zorder-ref-inline.html
new file mode 100644
index 0000000000..c57ac10eb1
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-ref-inline.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+span { vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/18217-zorder-ref.html b/layout/reftests/bugs/18217-zorder-ref.html
new file mode 100644
index 0000000000..b593d0985a
--- /dev/null
+++ b/layout/reftests/bugs/18217-zorder-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-table test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { display:table; width: 2em; height: 2em; background: green; }
+</style>
+</head>
+<body>
+<div>&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/1827009-1-ref.html b/layout/reftests/bugs/1827009-1-ref.html
new file mode 100644
index 0000000000..a066f3541b
--- /dev/null
+++ b/layout/reftests/bugs/1827009-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<style>
+:root {
+ font-size: 1.2rem;
+}
+body {
+ white-space: pre;
+}
+</style>
+<body>
+aa
+aaaaaaaaaaaaaa
+a aa a
+aaaaaaaaaaaaaa
+a
diff --git a/layout/reftests/bugs/1827009-1.html b/layout/reftests/bugs/1827009-1.html
new file mode 100644
index 0000000000..4a5817bf73
--- /dev/null
+++ b/layout/reftests/bugs/1827009-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+* {
+ white-space: pre-wrap;
+ width: min-content;
+}
+*::first-letter {}
+</style>
+<script>
+ function go() {
+ document.documentElement.style.fontSize = "1.2rem";
+ document.documentElement.classList.remove("reftest-wait");
+ }
+ document.addEventListener('MozReftestInvalidate', go);
+</script>
+<body>
+aa aaaaaaaaaaaaaa a aa a aaaaaaaaaaaaaa a
diff --git a/layout/reftests/bugs/1827337-1-ref.html b/layout/reftests/bugs/1827337-1-ref.html
new file mode 100644
index 0000000000..03952705d6
--- /dev/null
+++ b/layout/reftests/bugs/1827337-1-ref.html
@@ -0,0 +1,2 @@
+<div style="background: yellow; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+</div>
diff --git a/layout/reftests/bugs/1827337-1.html b/layout/reftests/bugs/1827337-1.html
new file mode 100644
index 0000000000..b7d600f9a1
--- /dev/null
+++ b/layout/reftests/bugs/1827337-1.html
@@ -0,0 +1,6 @@
+<div style="overflow: scroll; width: 400px; height: 400px;">
+ <div style="width: 200px; height: 1000vh; background: blue;">
+ </div>
+ <div style="background: yellow; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1828879-1-ref.html b/layout/reftests/bugs/1828879-1-ref.html
new file mode 100644
index 0000000000..c7b3c864dd
--- /dev/null
+++ b/layout/reftests/bugs/1828879-1-ref.html
@@ -0,0 +1,8 @@
+<div style="width: 200px; height: 200px;">
+ <div dir="ltr" style="width: 200px; height: 200px;">
+ <div id="scroller" style="width: 200px; height: 200px; overflow:auto;">
+ <div id="spacer" style="width: 80px; height: 250px;">
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1828879-1.html b/layout/reftests/bugs/1828879-1.html
new file mode 100644
index 0000000000..0fb60906f4
--- /dev/null
+++ b/layout/reftests/bugs/1828879-1.html
@@ -0,0 +1,8 @@
+<div style="transform: scaleX(-1); width: 200px; height: 200px;">
+ <div dir="rtl" style="width: 200px; height: 200px;">
+ <div id="scroller" style="width: 200px; height: 200px; overflow:auto;">
+ <div id="spacer" style="width: 80px; height: 250px;">
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/1834316-1-notref.html b/layout/reftests/bugs/1834316-1-notref.html
new file mode 100644
index 0000000000..a94290cfc1
--- /dev/null
+++ b/layout/reftests/bugs/1834316-1-notref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+div {
+ font: 50px/2 "Noto Sans NKo", serif;
+ height: 3em;
+}
+span {
+ font-family: serif;
+}
+</style>
+<p>The following characters should be rendered with the Noto Sans NKo font:</p>
+<div><span>&#x060C;</span>&nbsp;<span>&#x061B;</span>&nbsp;<span>&#x061F;</span></div>
+<p>This should be <em>different</em> from the default serif rendering:</p>
+<div><span>&#x060C;</span>&nbsp;<span>&#x061B;</span>&nbsp;<span>&#x061F;</span></div>
diff --git a/layout/reftests/bugs/1834316-1.html b/layout/reftests/bugs/1834316-1.html
new file mode 100644
index 0000000000..0ef03f2dc1
--- /dev/null
+++ b/layout/reftests/bugs/1834316-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+div {
+ font: 50px/2 "Noto Sans NKo", serif;
+ height: 3em;
+}
+span {
+ font-family: serif;
+}
+</style>
+<p>The following characters should be rendered with the Noto Sans NKo font:</p>
+<div>&#x060C;&nbsp;&#x061B;&nbsp;&#x061F;</div>
+<p>This should be <em>different</em> from the default serif rendering:</p>
+<div><span>&#x060C;</span>&nbsp;<span>&#x061B;</span>&nbsp;<span>&#x061F;</span></div>
diff --git a/layout/reftests/bugs/1835271-1-ref.html b/layout/reftests/bugs/1835271-1-ref.html
new file mode 100644
index 0000000000..b5c5b97704
--- /dev/null
+++ b/layout/reftests/bugs/1835271-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<!-- A selection of the supplemental Noto fonts that we should expose
+ as part of the "base" collection on macOS -->
+<p style="font-family: Noto Sans Adlam, serif">𞤀𞤤𞤳𞤵𞤤𞤫 ðž¤ðž¤¢ðž¤²ðž¤£ðž¤¢ðž¤´ðž¤¯ðž¤« 𞤂𞤫𞤻𞤮𞤤 𞤃𞤵𞤤𞤵𞤺𞤮𞤤</p>
+<p style="font-family: Noto Sans Buginese, serif">ᨅᨔ ᨕᨘá¨á¨—</p>
+<p style="font-family: Noto Sans Coptic, serif">â²€â²â²‚ⲃⲄⲅⲆⲇⲈⲉⲊⲋⲌâ²â²Žâ²</p>
+<p style="font-family: Noto Sans Egyptian Hieroglyphs, serif">ð“€€ð“€ð“€‚𓀃𓀄𓀅𓀆𓀇𓀈𓀉𓀊𓀋𓀌ð“€ð“€Žð“€</p>
+<p style="font-family: Noto Sans Gothic, serif">ðŒ°ðŒ±ðŒ²ðŒ³ðŒ´ðŒµðŒ¶ðŒ·ðŒ¸ðŒ¹ðŒºðŒ»ðŒ¼ðŒ½ðŒ¾ðŒ¿</p>
+<p style="font-family: Noto Sans Javanese, serif">ꦧꦱꦗꦮ</p>
+<p style="font-family: Noto Sans Limbu, serif">ᤕᤠᤰᤌᤢᤱ á¤á¤ á¤´</p>
+<p style="font-family: Noto Sans Meetei Mayek, serif">ꯃꯩꯇꯩ ꯃꯌꯦꯛ</p>
+<p style="font-family: Noto Sans New Tai Lue, serif">ᦟᦲᧅᦷᦎᦺᦑᦟᦹᧉ</p>
+<p style="font-family: Noto Sans NKo, serif">ß’ßžß</p>
diff --git a/layout/reftests/bugs/1835271-1.html b/layout/reftests/bugs/1835271-1.html
new file mode 100644
index 0000000000..b5c5b97704
--- /dev/null
+++ b/layout/reftests/bugs/1835271-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<!-- A selection of the supplemental Noto fonts that we should expose
+ as part of the "base" collection on macOS -->
+<p style="font-family: Noto Sans Adlam, serif">𞤀𞤤𞤳𞤵𞤤𞤫 ðž¤ðž¤¢ðž¤²ðž¤£ðž¤¢ðž¤´ðž¤¯ðž¤« 𞤂𞤫𞤻𞤮𞤤 𞤃𞤵𞤤𞤵𞤺𞤮𞤤</p>
+<p style="font-family: Noto Sans Buginese, serif">ᨅᨔ ᨕᨘá¨á¨—</p>
+<p style="font-family: Noto Sans Coptic, serif">â²€â²â²‚ⲃⲄⲅⲆⲇⲈⲉⲊⲋⲌâ²â²Žâ²</p>
+<p style="font-family: Noto Sans Egyptian Hieroglyphs, serif">ð“€€ð“€ð“€‚𓀃𓀄𓀅𓀆𓀇𓀈𓀉𓀊𓀋𓀌ð“€ð“€Žð“€</p>
+<p style="font-family: Noto Sans Gothic, serif">ðŒ°ðŒ±ðŒ²ðŒ³ðŒ´ðŒµðŒ¶ðŒ·ðŒ¸ðŒ¹ðŒºðŒ»ðŒ¼ðŒ½ðŒ¾ðŒ¿</p>
+<p style="font-family: Noto Sans Javanese, serif">ꦧꦱꦗꦮ</p>
+<p style="font-family: Noto Sans Limbu, serif">ᤕᤠᤰᤌᤢᤱ á¤á¤ á¤´</p>
+<p style="font-family: Noto Sans Meetei Mayek, serif">ꯃꯩꯇꯩ ꯃꯌꯦꯛ</p>
+<p style="font-family: Noto Sans New Tai Lue, serif">ᦟᦲᧅᦷᦎᦺᦑᦟᦹᧉ</p>
+<p style="font-family: Noto Sans NKo, serif">ß’ßžß</p>
diff --git a/layout/reftests/bugs/1836024-1-notref.html b/layout/reftests/bugs/1836024-1-notref.html
new file mode 100644
index 0000000000..123cfb601b
--- /dev/null
+++ b/layout/reftests/bugs/1836024-1-notref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+@font-face {
+ font-family: devanagari;
+ src: local("Devanagari Sangam MN");
+ size-adjust: 150%;
+}
+p {
+ font-family: Noto Sans Limbu, devanagari, sans-serif;
+ font-size: 32px;
+ line-height: 3;
+}
+span {
+ font-family: devanagari, sans-serif;
+}
+</style>
+
+<div>The double-danda character should NOT fall back to the oversized Devanagari font</div>
+<p>ᤛᤧᤘᤠᤖᤥ᥄ ᤀᤠá¤á¤ á¤±á¤’ᤠ ᤜᤠá¤á¤ á¤±á¤”ᤠᤛᤣ ᤗᤠᤶᤎᤡᤱᤃᤥ ᤗᤠᤶᤎᤰ ᤕᤠᤰᤌᤢᤱá¤á¤ á¤´ ᤖᤧ ᤘᤡá¤á¤¡á¤á¤¡á¤á¤¡á¤•á¤  ᤀᤥ <span>॥</span></p>
diff --git a/layout/reftests/bugs/1836024-1.html b/layout/reftests/bugs/1836024-1.html
new file mode 100644
index 0000000000..e0199cc833
--- /dev/null
+++ b/layout/reftests/bugs/1836024-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+<!-- Create a Devanagari face with extra scaling, to make the difference from the
+ Limbu font more visually obvious if the fallback gets used. -->
+@font-face {
+ font-family: devanagari;
+ src: local("Devanagari Sangam MN"), local("Devanagari MN");
+ size-adjust: 150%;
+}
+p {
+ font-family: Noto Sans Limbu, devanagari, sans-serif;
+ font-size: 32px;
+ line-height: 3;
+}
+</style>
+
+<div>The double-danda character should NOT fall back to the oversized Devanagari font</div>
+<!-- DEVANAGARI DOUBLE DANDA is in the Devanagari block, but is also used in Limbu
+ and does not require script-specific shaping, so should not be masked from the
+ Noto Sans Limbu character map despite the lack of 'deva' shaping support. -->
+<p>ᤛᤧᤘᤠᤖᤥ᥄ ᤀᤠá¤á¤ á¤±á¤’ᤠ ᤜᤠá¤á¤ á¤±á¤”ᤠᤛᤣ ᤗᤠᤶᤎᤡᤱᤃᤥ ᤗᤠᤶᤎᤰ ᤕᤠᤰᤌᤢᤱá¤á¤ á¤´ ᤖᤧ ᤘᤡá¤á¤¡á¤á¤¡á¤á¤¡á¤•á¤  ᤀᤥ ॥</p>
diff --git a/layout/reftests/bugs/1840511-1-ref.html b/layout/reftests/bugs/1840511-1-ref.html
new file mode 100644
index 0000000000..7385e93cfc
--- /dev/null
+++ b/layout/reftests/bugs/1840511-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+ svg {
+ width: 250px;
+ height: 250px;
+ background: green;
+ }
+</style>
+<svg>
+</svg>
diff --git a/layout/reftests/bugs/1840511-1.html b/layout/reftests/bugs/1840511-1.html
new file mode 100644
index 0000000000..b4aa287ee1
--- /dev/null
+++ b/layout/reftests/bugs/1840511-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<style>
+ svg {
+ width: 250px;
+ height: 250px;
+ background: green;
+ }
+</style>
+<svg>
+ <rect x="100" y="-50" width="100" height="100" fill="green"
+ transform="rotate(45)"/>
+</svg>
diff --git a/layout/reftests/bugs/1840511-2.html b/layout/reftests/bugs/1840511-2.html
new file mode 100644
index 0000000000..8b7aa52bcc
--- /dev/null
+++ b/layout/reftests/bugs/1840511-2.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div style="background:green;width:250px;height:250px"></div>
+<div style="background:green;width:100px;height:100px;rotate:45deg;position:absolute;top:50px;left:50px"></div>
diff --git a/layout/reftests/bugs/1840747-1.html b/layout/reftests/bugs/1840747-1.html
new file mode 100644
index 0000000000..1fa1d9c2b3
--- /dev/null
+++ b/layout/reftests/bugs/1840747-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<style>
+ svg {
+ width: 250px;
+ height: 250px;
+ }
+</style>
+<svg>
+ <path d="M 1,2 1,100 99,198 99,100 Z" fill="red"/>
+ <g transform="scale(0.5)">
+ <rect width="200" height="200" fill="white" transform="skewY(45)"/>
+ </g>
+</svg>
+<svg>
+ <path d="M 21,42 21,140 119,238 119,140 Z" fill="red"/>
+ <g transform="skewY(45)">
+ <rect width="100" height="100" fill="white" transform="translate(20 20)"/>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/1841355-1.html b/layout/reftests/bugs/1841355-1.html
new file mode 100644
index 0000000000..1b1e8b6a50
--- /dev/null
+++ b/layout/reftests/bugs/1841355-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- This a simplified form of the WPT css/css-transforms/skew-test1.html -->
+<style>
+ svg {
+ position: absolute;
+ }
+
+ div {
+ width: 150px;
+ height: 150px;
+ background-color: white;
+ }
+
+ .skew_div {
+ transform: skew(30deg,20deg);
+ transform-origin: 0 0;
+ }
+</style>
+</head>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="300" height="300">
+ <polygon points="1,1 149,56 235,203 88,149" style="fill:red"/>
+</svg>
+
+<div class="skew_div"></div>
diff --git a/layout/reftests/bugs/185388-1-ref.html b/layout/reftests/bugs/185388-1-ref.html
new file mode 100644
index 0000000000..e0d47d1d4b
--- /dev/null
+++ b/layout/reftests/bugs/185388-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 185388 Reference</title>
+</head>
+<body>
+<table style="position: absolute; border-collapse: collapse; background: #DDDDDD">
+ <tr><td style="padding: 0px"><table border="1" style="margin-left: auto; margin-right: auto"><tr><th>Text</th></tr></table></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/185388-1.html b/layout/reftests/bugs/185388-1.html
new file mode 100644
index 0000000000..4844b1a927
--- /dev/null
+++ b/layout/reftests/bugs/185388-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 185388</title>
+</head>
+<body>
+<div style="position: absolute; background: #DDDDDD">
+ <table border="1" style="margin-left: auto; margin-right: auto"><tr><th>Text</th></tr></table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/186317-1-ref.html b/layout/reftests/bugs/186317-1-ref.html
new file mode 100644
index 0000000000..7aa1736dbc
--- /dev/null
+++ b/layout/reftests/bugs/186317-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>border crosstalk</title>
+</head>
+<style>
+table.t1 td {border: 1px solid black}
+</style>
+<body >
+
+
+<TABLE style="border-collapse:collapse" class="t1">
+<TR><TD>1</td> <TD>2</td> <TD>3</td></tr>
+</TABLE>
+
+<table border="1">
+<tr><td>1</td><td>2</td></tr>
+<tr><td >3</td><td>4</td></tr>
+</table>
+
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/186317-1.html b/layout/reftests/bugs/186317-1.html
new file mode 100644
index 0000000000..27148f87b7
--- /dev/null
+++ b/layout/reftests/bugs/186317-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>border crosstalk</title>
+</head>
+
+<body >
+
+
+<TABLE border="1" style="border-collapse:collapse">
+<TR><TD>1</td> <TD>2</td> <TD>3</td></tr>
+</TABLE>
+
+<table border="1">
+<tr><td>1</td><td>2</td></tr>
+<tr><td >3</td><td>4</td></tr>
+</table>
+
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/192767-01.xhtml b/layout/reftests/bugs/192767-01.xhtml
new file mode 100644
index 0000000000..59c9bcc177
--- /dev/null
+++ b/layout/reftests/bugs/192767-01.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <div><p></p></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-02.xhtml b/layout/reftests/bugs/192767-02.xhtml
new file mode 100644
index 0000000000..237080d8b7
--- /dev/null
+++ b/layout/reftests/bugs/192767-02.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><p></p></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-03.xhtml b/layout/reftests/bugs/192767-03.xhtml
new file mode 100644
index 0000000000..0c862755cd
--- /dev/null
+++ b/layout/reftests/bugs/192767-03.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><p></p></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-04.xhtml b/layout/reftests/bugs/192767-04.xhtml
new file mode 100644
index 0000000000..6fc0a01663
--- /dev/null
+++ b/layout/reftests/bugs/192767-04.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><xul:hbox></xul:hbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-05.xhtml b/layout/reftests/bugs/192767-05.xhtml
new file mode 100644
index 0000000000..7a929b4237
--- /dev/null
+++ b/layout/reftests/bugs/192767-05.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><xul:vbox></xul:vbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-06.xhtml b/layout/reftests/bugs/192767-06.xhtml
new file mode 100644
index 0000000000..22beb1672b
--- /dev/null
+++ b/layout/reftests/bugs/192767-06.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><xul:hbox></xul:hbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-07.xhtml b/layout/reftests/bugs/192767-07.xhtml
new file mode 100644
index 0000000000..f386b6f1b4
--- /dev/null
+++ b/layout/reftests/bugs/192767-07.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><xul:vbox></xul:vbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-11.xhtml b/layout/reftests/bugs/192767-11.xhtml
new file mode 100644
index 0000000000..b8261de1d7
--- /dev/null
+++ b/layout/reftests/bugs/192767-11.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <div><p dir="rtl"></p></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-12.xhtml b/layout/reftests/bugs/192767-12.xhtml
new file mode 100644
index 0000000000..d97ad9e6a5
--- /dev/null
+++ b/layout/reftests/bugs/192767-12.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><p dir="rtl"></p></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-13.xhtml b/layout/reftests/bugs/192767-13.xhtml
new file mode 100644
index 0000000000..bcd2fc1b3c
--- /dev/null
+++ b/layout/reftests/bugs/192767-13.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><p dir="rtl"></p></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-14.xhtml b/layout/reftests/bugs/192767-14.xhtml
new file mode 100644
index 0000000000..fa7485b5d1
--- /dev/null
+++ b/layout/reftests/bugs/192767-14.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><xul:hbox style="direction: rtl"></xul:hbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-15.xhtml b/layout/reftests/bugs/192767-15.xhtml
new file mode 100644
index 0000000000..b1befc26e9
--- /dev/null
+++ b/layout/reftests/bugs/192767-15.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox><xul:vbox style="direction: rtl"></xul:vbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-16.xhtml b/layout/reftests/bugs/192767-16.xhtml
new file mode 100644
index 0000000000..4c70a23d1e
--- /dev/null
+++ b/layout/reftests/bugs/192767-16.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><xul:hbox style="direction: rtl"></xul:hbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-17.xhtml b/layout/reftests/bugs/192767-17.xhtml
new file mode 100644
index 0000000000..5506b9aaa8
--- /dev/null
+++ b/layout/reftests/bugs/192767-17.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox><xul:vbox style="direction: rtl"></xul:vbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-21.xhtml b/layout/reftests/bugs/192767-21.xhtml
new file mode 100644
index 0000000000..439d6cb555
--- /dev/null
+++ b/layout/reftests/bugs/192767-21.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <div dir="rtl"><p></p></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-22.xhtml b/layout/reftests/bugs/192767-22.xhtml
new file mode 100644
index 0000000000..b99c5e2f4a
--- /dev/null
+++ b/layout/reftests/bugs/192767-22.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><p></p></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-23.xhtml b/layout/reftests/bugs/192767-23.xhtml
new file mode 100644
index 0000000000..6f86cbc193
--- /dev/null
+++ b/layout/reftests/bugs/192767-23.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><p></p></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-24.xhtml b/layout/reftests/bugs/192767-24.xhtml
new file mode 100644
index 0000000000..179560966f
--- /dev/null
+++ b/layout/reftests/bugs/192767-24.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><xul:hbox></xul:hbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-25.xhtml b/layout/reftests/bugs/192767-25.xhtml
new file mode 100644
index 0000000000..de95595438
--- /dev/null
+++ b/layout/reftests/bugs/192767-25.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><xul:vbox></xul:vbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-26.xhtml b/layout/reftests/bugs/192767-26.xhtml
new file mode 100644
index 0000000000..de75d04fa0
--- /dev/null
+++ b/layout/reftests/bugs/192767-26.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><xul:hbox></xul:hbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-27.xhtml b/layout/reftests/bugs/192767-27.xhtml
new file mode 100644
index 0000000000..cd3d889f04
--- /dev/null
+++ b/layout/reftests/bugs/192767-27.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><xul:vbox></xul:vbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-31.xhtml b/layout/reftests/bugs/192767-31.xhtml
new file mode 100644
index 0000000000..e7ff7f79f7
--- /dev/null
+++ b/layout/reftests/bugs/192767-31.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <div dir="rtl"><p dir="ltr"></p></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-32.xhtml b/layout/reftests/bugs/192767-32.xhtml
new file mode 100644
index 0000000000..891fc6e628
--- /dev/null
+++ b/layout/reftests/bugs/192767-32.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><p dir="ltr"></p></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-33.xhtml b/layout/reftests/bugs/192767-33.xhtml
new file mode 100644
index 0000000000..c1c1820efd
--- /dev/null
+++ b/layout/reftests/bugs/192767-33.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><p dir="ltr"></p></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-34.xhtml b/layout/reftests/bugs/192767-34.xhtml
new file mode 100644
index 0000000000..20601b95be
--- /dev/null
+++ b/layout/reftests/bugs/192767-34.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><xul:hbox style="direction: ltr"></xul:hbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-35.xhtml b/layout/reftests/bugs/192767-35.xhtml
new file mode 100644
index 0000000000..817b68a370
--- /dev/null
+++ b/layout/reftests/bugs/192767-35.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:hbox style="direction: rtl"><xul:vbox style="direction: ltr"></xul:vbox></xul:hbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-36.xhtml b/layout/reftests/bugs/192767-36.xhtml
new file mode 100644
index 0000000000..f005908926
--- /dev/null
+++ b/layout/reftests/bugs/192767-36.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><xul:hbox style="direction: ltr"></xul:hbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767-37.xhtml b/layout/reftests/bugs/192767-37.xhtml
new file mode 100644
index 0000000000..1cfa1a4864
--- /dev/null
+++ b/layout/reftests/bugs/192767-37.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <head>
+ <title>Testcases for bug 192767</title>
+ <link rel="stylesheet" type="text/css" href="192767.css"/>
+ </head>
+ <body>
+ <xul:vbox style="direction: rtl"><xul:vbox style="direction: ltr"></xul:vbox></xul:vbox>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/192767.css b/layout/reftests/bugs/192767.css
new file mode 100644
index 0000000000..2f450f0766
--- /dev/null
+++ b/layout/reftests/bugs/192767.css
@@ -0,0 +1,17 @@
+body > *
+{
+ width: 100px;
+ height: 100px;
+ overflow: auto;
+ border: thick solid purple;
+ margin: 10px;
+}
+
+body > * > *
+{
+ margin: 10px;
+ border: medium solid green;
+ background: yellow;
+ width: 200px;
+ height: 200px;
+}
diff --git a/layout/reftests/bugs/192902-1.html b/layout/reftests/bugs/192902-1.html
new file mode 100644
index 0000000000..2c23e874e3
--- /dev/null
+++ b/layout/reftests/bugs/192902-1.html
@@ -0,0 +1,16 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 192902</title>
+</head>
+<body>
+
+
+<table border="1">
+ <tbody><tr>
+ <td nowrap="nowrap" width="0">Sony Ericsson T200</td>
+ <td width="100%">&nbsp;</td>
+ </tr>
+</tbody></table>
+
+
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/192902-ref.html b/layout/reftests/bugs/192902-ref.html
new file mode 100644
index 0000000000..795dc11377
--- /dev/null
+++ b/layout/reftests/bugs/192902-ref.html
@@ -0,0 +1,16 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 192902</title>
+</head>
+<body>
+
+
+<table border="1">
+ <tbody><tr>
+ <td nowrap="nowrap">Sony Ericsson T200</td>
+ <td width="100%">&nbsp;</td>
+ </tr>
+</tbody></table>
+
+
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/200774-1.html b/layout/reftests/bugs/200774-1.html
new file mode 100644
index 0000000000..ec4916ef26
--- /dev/null
+++ b/layout/reftests/bugs/200774-1.html
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="reftest-paged">
+
+<head>
+<title>Fixed DIV, Multipe Page Testcase</title>
+<style type="text/css">
+div.header { position: fixed;
+ width: 100%;
+ height: 1.5em;
+ top: 0;
+ font-style: italic;
+ background-color: white;
+ color: black }
+</style>
+</head>
+
+<body>
+
+<div class="header">I stay on the top of the web page and each printed page.</div>
+
+<h1>Fixed DIV, multiple page testcase</h1>
+
+<hr />
+
+<p>Maybe related to bug 163800?</p>
+
+<p>Similar to 193686 and 197808, but there are <i>no</i> forms involved in this crash.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+<p>Repeating text, to get us onto the next page.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/201215-1-ref.html b/layout/reftests/bugs/201215-1-ref.html
new file mode 100644
index 0000000000..c4d9f1d222
--- /dev/null
+++ b/layout/reftests/bugs/201215-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 201215 Reference</title>
+</head>
+<body>
+<table><tr><td>
+ <div style="background: #DDDDDD; float: left">text text text text text text <img src="solidblue.png" alt=""/></div>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/201215-1.html b/layout/reftests/bugs/201215-1.html
new file mode 100644
index 0000000000..4237165649
--- /dev/null
+++ b/layout/reftests/bugs/201215-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 201215</title>
+</head>
+<body>
+<table><tr><td>
+ <div style="background: #DDDDDD; float: right">text text text text text text <span id="insertHere"></span></div>
+</td></tr></table>
+<script type="text/javascript">
+ function loadImage() {
+ document.body.offsetWidth
+ var img = document.createElement("img");
+ img.src = "solidblue.png";
+ img.alt = "";
+ target = document.getElementById("insertHere");
+ target.appendChild(img);
+ }
+ loadImage();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/201293-1-ref.html b/layout/reftests/bugs/201293-1-ref.html
new file mode 100644
index 0000000000..1e5a39e2f6
--- /dev/null
+++ b/layout/reftests/bugs/201293-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ input, button { width: 16em; }
+ .left { text-align: left; }
+ .right { text-align: right; }
+ .center { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <input type="button" value="input" class="left">
+ </div>
+ <div>
+ <button class="left">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="right">
+ </div>
+ <div>
+ <button class="right">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="center">
+ </div>
+ <div>
+ <button class="center">button</button>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/201293-1a.html b/layout/reftests/bugs/201293-1a.html
new file mode 100644
index 0000000000..0599185bd6
--- /dev/null
+++ b/layout/reftests/bugs/201293-1a.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ input, button { min-width: 16em; }
+ .left { text-align: left; }
+ .right { text-align: right; }
+ .center { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <input type="button" value="input" class="left">
+ </div>
+ <div>
+ <button class="left">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="right">
+ </div>
+ <div>
+ <button class="right">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="center">
+ </div>
+ <div>
+ <button class="center">button</button>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/201293-1b.html b/layout/reftests/bugs/201293-1b.html
new file mode 100644
index 0000000000..ef2f39a1f1
--- /dev/null
+++ b/layout/reftests/bugs/201293-1b.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ input, button { width: 8em; min-width: 16em; }
+ .left { text-align: left; }
+ .right { text-align: right; }
+ .center { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <input type="button" value="input" class="left">
+ </div>
+ <div>
+ <button class="left">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="right">
+ </div>
+ <div>
+ <button class="right">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="center">
+ </div>
+ <div>
+ <button class="center">button</button>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/201293-1c.html b/layout/reftests/bugs/201293-1c.html
new file mode 100644
index 0000000000..100efebf09
--- /dev/null
+++ b/layout/reftests/bugs/201293-1c.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ input, button { width: 32em; max-width: 16em; }
+ .left { text-align: left; }
+ .right { text-align: right; }
+ .center { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <input type="button" value="input" class="left">
+ </div>
+ <div>
+ <button class="left">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="right">
+ </div>
+ <div>
+ <button class="right">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="center">
+ </div>
+ <div>
+ <button class="center">button</button>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/201293-1d.html b/layout/reftests/bugs/201293-1d.html
new file mode 100644
index 0000000000..192eb4db96
--- /dev/null
+++ b/layout/reftests/bugs/201293-1d.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ input, button { min-width: 16em; max-width: 8em; }
+ .left { text-align: left; }
+ .right { text-align: right; }
+ .center { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <input type="button" value="input" class="left">
+ </div>
+ <div>
+ <button class="left">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="right">
+ </div>
+ <div>
+ <button class="right">button</button>
+ </div>
+ <div>
+ <input type="button" value="input" class="center">
+ </div>
+ <div>
+ <button class="center">button</button>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/203727-ref.html b/layout/reftests/bugs/203727-ref.html
new file mode 100644
index 0000000000..1517bbde8e
--- /dev/null
+++ b/layout/reftests/bugs/203727-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 203727</title>
+</head>
+<body>
+
+<ol id="ol">
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+</ol>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/203727.html b/layout/reftests/bugs/203727.html
new file mode 100644
index 0000000000..e279f5d523
--- /dev/null
+++ b/layout/reftests/bugs/203727.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 203727</title>
+</head>
+<body>
+
+<ol id="ol">
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+<li>x</li>
+</ol>
+
+<script>
+ var x = document.body.offsetHeight;
+
+ var ol = document.getElementById('ol');
+ var lis = document.getElementsByTagName('li');
+ var child1 = lis[3];
+ var child2 = lis[4];
+ var child3 = lis[5];
+ ol.removeChild(child1);
+ ol.removeChild(child2);
+ ol.removeChild(child3);
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/206516-1-ref.html b/layout/reftests/bugs/206516-1-ref.html
new file mode 100644
index 0000000000..c5d8f90652
--- /dev/null
+++ b/layout/reftests/bugs/206516-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 206516 Reference</title>
+</head>
+<body>
+<table cellspacing="0"><tr><td style="background-color:green">blah blah</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/206516-1.html b/layout/reftests/bugs/206516-1.html
new file mode 100644
index 0000000000..0fd810005c
--- /dev/null
+++ b/layout/reftests/bugs/206516-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 206516</title>
+</head>
+<body onload="document.getElementById('hiddenRow').style.display='none';">
+<table cellspacing="0" style="background-color:red">
+ <tr><td style="background-color:green">blah blah</td></tr>
+ <tr id="hiddenRow" style="display:block"><td>text text</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/206631-1-ref.html b/layout/reftests/bugs/206631-1-ref.html
new file mode 100644
index 0000000000..826ec4cfec
--- /dev/null
+++ b/layout/reftests/bugs/206631-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ font-size: 16px;
+}
+</style>
+</head>
+<body>
+<p style="border: 1px solid #000;">Test 1</p>
+<p style="border: 3px solid #000;">Test 2</p>
+<p style="border: 4px solid #000;">Test 3</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/206631-1.html b/layout/reftests/bugs/206631-1.html
new file mode 100644
index 0000000000..f29e3470e6
--- /dev/null
+++ b/layout/reftests/bugs/206631-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ font-size: 16px;
+}
+</style>
+</head>
+<body>
+<p style="border: .1em solid #000;">Test 1</p>
+<p style="border: .2em solid #000;">Test 2</p>
+<p style="border: .3em solid #000;">Test 3</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/206802-ref.html b/layout/reftests/bugs/206802-ref.html
new file mode 100644
index 0000000000..21b49dd56e
--- /dev/null
+++ b/layout/reftests/bugs/206802-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Bug 206802</title>
+</head>
+<body>
+<div>ã‚々<br>ã‚々々</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/206802.html b/layout/reftests/bugs/206802.html
new file mode 100644
index 0000000000..71fbebe9a8
--- /dev/null
+++ b/layout/reftests/bugs/206802.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Bug 206802</title>
+</head>
+<body>
+<div style="width: 1px;">ã‚々ã‚々々</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/210094-1-ref.html b/layout/reftests/bugs/210094-1-ref.html
new file mode 100644
index 0000000000..1f39b2522b
--- /dev/null
+++ b/layout/reftests/bugs/210094-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="height: 100px">
+ <legend>This is a test</legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/210094-1a.html b/layout/reftests/bugs/210094-1a.html
new file mode 100644
index 0000000000..3a93644dcb
--- /dev/null
+++ b/layout/reftests/bugs/210094-1a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="min-height: 100px">
+ <legend>This is a test</legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/210094-1b.html b/layout/reftests/bugs/210094-1b.html
new file mode 100644
index 0000000000..00bff2ff3f
--- /dev/null
+++ b/layout/reftests/bugs/210094-1b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="max-height: 100px">
+ <legend>This is a test</legend>
+ <div style="height: 200px">
+ </div>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/210094-1c.html b/layout/reftests/bugs/210094-1c.html
new file mode 100644
index 0000000000..890f9b7311
--- /dev/null
+++ b/layout/reftests/bugs/210094-1c.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="height: 150px">
+ <legend>This is a test</legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/210876-1-ref.html b/layout/reftests/bugs/210876-1-ref.html
new file mode 100644
index 0000000000..63de464728
--- /dev/null
+++ b/layout/reftests/bugs/210876-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>Bug 210876 Reference</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body>
+<fieldset style="float: left; background-color: #DDDDDD; margin-right: 1em; width: 2em">
+ <table border=1>
+ <tr><td></td><td>Col1</td><td>Col2</td></tr>
+ <tr><td>Row1:</td><td>SomeText</td><td>MoreText</td></tr>
+ </table>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/210876-1.html b/layout/reftests/bugs/210876-1.html
new file mode 100644
index 0000000000..136e418dd4
--- /dev/null
+++ b/layout/reftests/bugs/210876-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>Bug 210876</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body>
+<fieldset style="float: left; background-color: #DDDDDD; margin-right: 1em; width: auto">
+ <table border=1>
+ <tr><td></td><td>Col1</td><td>Col2</td></tr>
+ <tr><td>Row1:</td><td>SomeText</td><td>MoreText</td></tr>
+ </table>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/211931-1-ref.html b/layout/reftests/bugs/211931-1-ref.html
new file mode 100644
index 0000000000..cea1440538
--- /dev/null
+++ b/layout/reftests/bugs/211931-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+td { border: 1px solid green; }
+</style>
+</head>
+<table>
+ <tr>
+ <td>A</td>
+ </tr>
+ <tr>
+ <td>B</td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td>The quick brown fox jumps over the lazy wordwrap</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/211931-1.html b/layout/reftests/bugs/211931-1.html
new file mode 100644
index 0000000000..57900fef3a
--- /dev/null
+++ b/layout/reftests/bugs/211931-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+td { border: 1px solid green; }
+</style>
+</head>
+<table>
+ <tr>
+ <td width="50%">A</td>
+ </tr>
+ <tr>
+ <td width="100%">B</td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%">
+ <tr>
+ <td width="100%">The quick brown fox jumps over the lazy wordwrap</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-1-inner.html b/layout/reftests/bugs/212563-1-inner.html
new file mode 100644
index 0000000000..98f93db3ec
--- /dev/null
+++ b/layout/reftests/bugs/212563-1-inner.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<frameset resizable="yes" rows="100%" onload="top.p(1);">
+ <frame src="data:text/html,<body onload=%22top.p(0); var t = top; var d = parent.document; d.write('<body onload=top.p(5);><script>top.p(2);</script>'); t.p(3); t.p(d.documentElement.innerHTML); d.close(); t.p(4); %22>">
+</frameset>
+</html>
diff --git a/layout/reftests/bugs/212563-1-ref-inner.html b/layout/reftests/bugs/212563-1-ref-inner.html
new file mode 100644
index 0000000000..53a7f24295
--- /dev/null
+++ b/layout/reftests/bugs/212563-1-ref-inner.html
@@ -0,0 +1,6 @@
+<html>
+<head>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-1-ref.html b/layout/reftests/bugs/212563-1-ref.html
new file mode 100644
index 0000000000..cc48444c81
--- /dev/null
+++ b/layout/reftests/bugs/212563-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+</head>
+<body>
+<p>This test is designed to pass regardless of who wins the document.write race.</p>
+<iframe src="212563-1-ref-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-1.html b/layout/reftests/bugs/212563-1.html
new file mode 100644
index 0000000000..79b067beba
--- /dev/null
+++ b/layout/reftests/bugs/212563-1.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script type="text/javascript">
+function p(n)
+{
+ dump("Test 212563-1 says: " + n + "\n");
+}
+</script>
+</head>
+<body>
+<p>This test is designed to pass regardless of who wins the document.write race.</p>
+<iframe src="212563-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-2-inner.html b/layout/reftests/bugs/212563-2-inner.html
new file mode 100644
index 0000000000..1e90a37f32
--- /dev/null
+++ b/layout/reftests/bugs/212563-2-inner.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<frameset resizable="yes" rows="100%" onload="parent.changeInnermost(document.getElementById(&quot;innermost&quot;))">
+
+ <frame id="innermost" src="212563-2-innermost-b.html"></frame>
+
+</frameset>
+</html>
diff --git a/layout/reftests/bugs/212563-2-innermost-a.html b/layout/reftests/bugs/212563-2-innermost-a.html
new file mode 100644
index 0000000000..52b5a011c9
--- /dev/null
+++ b/layout/reftests/bugs/212563-2-innermost-a.html
@@ -0,0 +1,13 @@
+<body onload="w(parent.document, top);">
+<font color=blue>new innermost
+<script type="text/javascript">
+function w(md, t)
+{
+ t.p(0);
+ md.write(t.replacementForMiddleFrame);
+ t.p(3);
+ t.p(md.documentElement.innerHTML);
+ md.close();
+ t.p(4);
+}
+</script>
diff --git a/layout/reftests/bugs/212563-2-innermost-b.html b/layout/reftests/bugs/212563-2-innermost-b.html
new file mode 100644
index 0000000000..cb95d8483d
--- /dev/null
+++ b/layout/reftests/bugs/212563-2-innermost-b.html
@@ -0,0 +1 @@
+<font color=red>old innermost
diff --git a/layout/reftests/bugs/212563-2-ref-inner.html b/layout/reftests/bugs/212563-2-ref-inner.html
new file mode 100644
index 0000000000..7c6593c4d5
--- /dev/null
+++ b/layout/reftests/bugs/212563-2-ref-inner.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+replacement for middle frame
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-2-ref.html b/layout/reftests/bugs/212563-2-ref.html
new file mode 100644
index 0000000000..62afeb5548
--- /dev/null
+++ b/layout/reftests/bugs/212563-2-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe src="212563-2-ref-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/212563-2.html b/layout/reftests/bugs/212563-2.html
new file mode 100644
index 0000000000..a3ced55b2c
--- /dev/null
+++ b/layout/reftests/bugs/212563-2.html
@@ -0,0 +1,24 @@
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+
+function p(n)
+{
+ dump("Test 212563-2 says: " + n + "\n");
+}
+
+// Step 1: replace the innermost frame
+function changeInnermost(iframeElement)
+{
+ iframeElement.setAttribute("src", "212563-2-innermost-a.html");
+}
+
+// Step 2: replace the middle iframe (from the new innermost iframe's onload handler)
+var replacementForMiddleFrame = "<body onload=top.p(5);parent.document.documentElement.removeAttribute('class');>replacement for middle frame<script>top.p(2);<\/script><\/body>";
+
+</script>
+</head>
+<body>
+<iframe src="212563-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/213834-1-ref.html b/layout/reftests/bugs/213834-1-ref.html
new file mode 100644
index 0000000000..a7ca2076ef
--- /dev/null
+++ b/layout/reftests/bugs/213834-1-ref.html
@@ -0,0 +1,3 @@
+<title>Bug 213834 reftest - reference</title>
+<pre>
+text text</pre>
diff --git a/layout/reftests/bugs/213834-1.html b/layout/reftests/bugs/213834-1.html
new file mode 100644
index 0000000000..4ccbd14ee1
--- /dev/null
+++ b/layout/reftests/bugs/213834-1.html
@@ -0,0 +1,3 @@
+<title>Bug 213834 reftest - test</title>
+<pre>
+text<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQI12P4DwABAQEAG7buVgAAAABJRU5ErkJggg==" height="4px" width="10px"> text</pre>
diff --git a/layout/reftests/bugs/214077-1-ref.html b/layout/reftests/bugs/214077-1-ref.html
new file mode 100644
index 0000000000..1727179047
--- /dev/null
+++ b/layout/reftests/bugs/214077-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head><style>
+ img { border-color: lime }
+</style></head>
+<body><form>
+<img src="solidblue.png" vspace="20" border="1">
+</form></body></html>
diff --git a/layout/reftests/bugs/214077-1a.html b/layout/reftests/bugs/214077-1a.html
new file mode 100644
index 0000000000..5f3e2724e9
--- /dev/null
+++ b/layout/reftests/bugs/214077-1a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head><style>
+ input { border-color: lime }
+</style></head>
+<body><form>
+<input type="image" src="solidblue.png" vspace="20" border="1">
+</form></body></html>
diff --git a/layout/reftests/bugs/214077-1b.html b/layout/reftests/bugs/214077-1b.html
new file mode 100644
index 0000000000..b2a07734c0
--- /dev/null
+++ b/layout/reftests/bugs/214077-1b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head><style>
+ input { border-color: lime }
+</style></head>
+<body><form>
+<input vspace="20" border="1" src="solidblue.png" type="image">
+</form></body></html>
diff --git a/layout/reftests/bugs/218473-1-ref.html b/layout/reftests/bugs/218473-1-ref.html
new file mode 100644
index 0000000000..5401602b37
--- /dev/null
+++ b/layout/reftests/bugs/218473-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head><title>Testcase for bug 218473</title>
+<style type="text/css">
+.picture {
+ float: left;
+ height: 150px;
+ width: 100px;
+ border: 3px solid blue;
+}
+</style>
+</head>
+<body>
+
+
+<div class="picture"></div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/218473-1.html b/layout/reftests/bugs/218473-1.html
new file mode 100644
index 0000000000..53bbfd5ee0
--- /dev/null
+++ b/layout/reftests/bugs/218473-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head><title>Testcase for bug 218473</title>
+<style type="text/css">
+.picture {
+ float: left;
+ padding-top: 50px;
+ border: 3px solid blue;
+}
+.img {
+ float: left;
+ width: 100px;
+ height: 100px;
+}
+</style>
+</head>
+<body>
+
+
+<div class="picture"><div class="link"><div class="img"></div></div></div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/220165-1-ref.svg b/layout/reftests/bugs/220165-1-ref.svg
new file mode 100644
index 0000000000..4323c70aaa
--- /dev/null
+++ b/layout/reftests/bugs/220165-1-ref.svg
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml" height="500"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ shape-rendering="crispEdges">
+
+ <foreignObject x="200" y="180" width="100" height="50" >
+ <html:button id="x">New text</html:button>
+ </foreignObject>
+
+ <g transform="rotate(10) translate(-100) scale(0.8)">
+ <polygon style="fill:red; fill-opacity:0.5;"
+ points="350, 75 379,161 469,161 397,215
+ 423,301 350,250 277,301 303,215
+ 231,161 321,161" />
+
+ </g>
+
+</svg>
diff --git a/layout/reftests/bugs/220165-1.svg b/layout/reftests/bugs/220165-1.svg
new file mode 100644
index 0000000000..770723fd89
--- /dev/null
+++ b/layout/reftests/bugs/220165-1.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml" height="500"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="document.documentElement.getBoundingClientRect();
+ document.getElementById('x').textContent = 'New text'"
+ shape-rendering="crispEdges">
+
+ <foreignObject x="200" y="180" width="100" height="50" >
+ <html:button id="x">Old long long long text</html:button>
+ </foreignObject>
+
+ <g transform="rotate(10) translate(-100) scale(0.8)">
+ <polygon style="fill:red; fill-opacity:0.5;"
+ points="350, 75 379,161 469,161 397,215
+ 423,301 350,250 277,301 303,215
+ 231,161 321,161" />
+
+ </g>
+
+</svg>
diff --git a/layout/reftests/bugs/223809-1-ref.html b/layout/reftests/bugs/223809-1-ref.html
new file mode 100644
index 0000000000..49c3df7990
--- /dev/null
+++ b/layout/reftests/bugs/223809-1-ref.html
@@ -0,0 +1,17 @@
+<html>
+ <body>
+ <table width="100%" height="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td rowspan="2" bgcolor="red" width="50" height="100%">Ajax</td>
+ <td width="50">PSV</td>
+ <td bgcolor="yellow" width="100%">Feyenoord</td>
+ </tr>
+ <tr><td colspan="2" bgcolor="gray" height="100%">
+ <table width="100%" height="100%">
+ <tr><td height="100%" bgcolor="pink">This
+ one</td></tr>
+ </table>
+ </td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/223809-1.html b/layout/reftests/bugs/223809-1.html
new file mode 100644
index 0000000000..03ed21d30e
--- /dev/null
+++ b/layout/reftests/bugs/223809-1.html
@@ -0,0 +1,19 @@
+<html>
+ <body>
+ <table width="100%" height="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td rowspan="3" bgcolor="red" width="50" height="100%">Ajax</td>
+ <td width="50">PSV</td>
+ <td rowspan="2" bgcolor="yellow" width="100%">Feyenoord</td>
+ </tr>
+ <tr><td></td></tr>
+ <tr><td colspan="2" bgcolor="gray" height="100%">
+ <table width="100%" height="100%">
+ <tr><td height="100%" bgcolor="pink">This
+ one</td></tr>
+ </table>
+ </td></tr>
+ </table>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/228856-1-ref.html b/layout/reftests/bugs/228856-1-ref.html
new file mode 100644
index 0000000000..39da35df4b
--- /dev/null
+++ b/layout/reftests/bugs/228856-1-ref.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html><head>
+<!-- This tests behavior specified in CSS Syntax Level 3,
+ as of the Editor's Draft 19 June 2013:
+ http://dev.w3.org/csswg/css-syntax/ -->
+<title>\0 in CSS</title>
+<style>
+p#a:before { content: "\FFFDx" }
+p#b:before { content: "\FFFDx" }
+p#c:before { content: "\FFFDx" }
+p#d:before { content: "\FFFDx" }
+p#e:before { content: "\FFFDx" }
+p#f:before { content: "\FFFDx" }
+p#g:before { content: "\FFFD x" }
+p#h:before { content: "\FFFD x" }
+p#i:before { content: "\FFFD x" }
+p#j:before { content: "\FFFD x" }
+p#k:before { content: "\FFFD x" }
+p#l:before { content: "\FFFD x" }
+</style>
+</head><body>
+<p id="a">(a)</p>
+<p id="b">(b)</p>
+<p id="c">(c)</p>
+<p id="d">(d)</p>
+<p id="e">(e)</p>
+<p id="f">(f)</p>
+<p id="g">(g)</p>
+<p id="h">(h)</p>
+<p id="i">(i)</p>
+<p id="j">(j)</p>
+<p id="k">(k)</p>
+<p id="l">(l)</p>
+</body></html>
diff --git a/layout/reftests/bugs/228856-1.html b/layout/reftests/bugs/228856-1.html
new file mode 100644
index 0000000000..3efc590c20
--- /dev/null
+++ b/layout/reftests/bugs/228856-1.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html><head>
+<!-- This tests behavior specified in CSS Syntax Level 3,
+ as of the Editor's Draft 19 June 2013:
+ http://dev.w3.org/csswg/css-syntax/ -->
+<title>\0 in CSS</title>
+<style>
+p#a:before { content: "\0x" }
+p#b:before { content: "\00x" }
+p#c:before { content: "\000x" }
+p#d:before { content: "\0000x" }
+p#e:before { content: "\00000x" }
+p#f:before { content: "\000000x" }
+p#g:before { content: "\0 x" }
+p#h:before { content: "\00 x" }
+p#i:before { content: "\000 x" }
+p#j:before { content: "\0000 x" }
+p#k:before { content: "\00000 x" }
+p#l:before { content: "\000000 x" }
+</style>
+</head><body>
+<p id="a">(a)</p>
+<p id="b">(b)</p>
+<p id="c">(c)</p>
+<p id="d">(d)</p>
+<p id="e">(e)</p>
+<p id="f">(f)</p>
+<p id="g">(g)</p>
+<p id="h">(h)</p>
+<p id="i">(i)</p>
+<p id="j">(j)</p>
+<p id="k">(k)</p>
+<p id="l">(l)</p>
+</body></html>
diff --git a/layout/reftests/bugs/228856-2-ref.html b/layout/reftests/bugs/228856-2-ref.html
new file mode 100644
index 0000000000..447296de06
--- /dev/null
+++ b/layout/reftests/bugs/228856-2-ref.html
Binary files differ
diff --git a/layout/reftests/bugs/228856-2-style-1.css b/layout/reftests/bugs/228856-2-style-1.css
new file mode 100644
index 0000000000..bb7e68084b
--- /dev/null
+++ b/layout/reftests/bugs/228856-2-style-1.css
Binary files differ
diff --git a/layout/reftests/bugs/228856-2.html b/layout/reftests/bugs/228856-2.html
new file mode 100644
index 0000000000..b5bd738745
--- /dev/null
+++ b/layout/reftests/bugs/228856-2.html
Binary files differ
diff --git a/layout/reftests/bugs/229591-1-ref.html b/layout/reftests/bugs/229591-1-ref.html
new file mode 100644
index 0000000000..9626df69a3
--- /dev/null
+++ b/layout/reftests/bugs/229591-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<head>
+<style>
+table {border-collapse:collapse}
+td {border: thin solid lime}
+</style>
+</head>
+<html >
+<body style="color:lime">
+<table><tr><td>cell1</td><td>cell2</td></tr>
+ <tr><td>cell3</td><td>cell4</td></tr></table>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/229591-1.html b/layout/reftests/bugs/229591-1.html
new file mode 100644
index 0000000000..3b1f0588d9
--- /dev/null
+++ b/layout/reftests/bugs/229591-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html >
+<body style="color:lime">
+<table rules="all" frame="border" ><tr><td>cell1</td><td>cell2</td></tr>
+ <tr><td>cell3</td><td>cell4</td></tr></table>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/231823-1-ref.html b/layout/reftests/bugs/231823-1-ref.html
new file mode 100644
index 0000000000..de7a445546
--- /dev/null
+++ b/layout/reftests/bugs/231823-1-ref.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body>
+<div style="height:1087px;">
+<div>Location: </div>
+
+<p>
+We are located at 333 West San Carlos Street, Suite 1650, San Jose.
+Our building has a parking garage, and we will validate your parking.
+After you park, as you are walking out of the parking garage, you will
+see a bank of elevators. These elevators only go up and down in the
+garage &#150; they don&#x2019;t connect to the office building. You
+should walk past those elevators, walk out of the garage, walk across a
+courtyard, and into the doors for the main building. There is another
+bank of elevators in that building. Take these elevators to the 16th
+Floor.
+</p>
+
+<p>
+From Highway 280 heading northbound to San Jose: Take the Guadalupe
+Parkway exit, also called Highway 87. This exit splits into a
+northbound and a southbound direction. Take the northbound direction.
+Once on the Guadalupe Parkway take the first exit, which is the Santa
+Clara Street exit. Bear right on Santa Clara Street as you come off
+that exit. The first light you come to is Almaden Blvd. Turn right on
+Almaden. Go down 3 lights to West San Carlos Street. Turn right on
+West San Carlos. The next light you come to is a small street called
+Woz Way. Turn right on Woz. The parking garage for our building is on
+your right. Turn right into the garage. Then follow the directions
+above from the garage to our office.
+</p>
+
+<p>
+From Highway 101 heading southbound to San Jose: Take the Guadalupe
+Parkway exit, also called Highway 87. Stay on the Guadalupe as it
+turns into a surface street and you cross over Hedding and Coleman.
+Once it turns into an expressway again, the second exit is the Park
+Avenue exit. Take this exit. Turn left on Park Avenue. After you
+turn left you will come under the freeway and immediately come to a
+traffic light at a small street called Woz Way. Turn right on Woz
+Way. The parking garage for our building is on your left. Turn left
+into the garage. Then follow the directions above from the garage to
+our office.
+</p>
+
+<p>
+From Highway 101 heading northbound to San Jose: Turn on to Highway
+280 headed north. Then follow directions above for Highway 280 heading
+northbound to San Jose.
+</p>
+
+<p>
+From Highway 880: Take Highway 880 to Highway 280 South, and then
+follow directions above from Highway 280 heading southbound to San
+Jose.
+</p>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/231823-1.html b/layout/reftests/bugs/231823-1.html
new file mode 100644
index 0000000000..651e446f40
--- /dev/null
+++ b/layout/reftests/bugs/231823-1.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body>
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td rowspan="2" valign="top">
+<div>Location: </div>
+
+<p>
+We are located at 333 West San Carlos Street, Suite 1650, San Jose.
+Our building has a parking garage, and we will validate your parking.
+After you park, as you are walking out of the parking garage, you will
+see a bank of elevators. These elevators only go up and down in the
+garage &#150; they don&#x2019;t connect to the office building. You
+should walk past those elevators, walk out of the garage, walk across a
+courtyard, and into the doors for the main building. There is another
+bank of elevators in that building. Take these elevators to the 16th
+Floor.
+</p>
+
+<p>
+From Highway 280 heading northbound to San Jose: Take the Guadalupe
+Parkway exit, also called Highway 87. This exit splits into a
+northbound and a southbound direction. Take the northbound direction.
+Once on the Guadalupe Parkway take the first exit, which is the Santa
+Clara Street exit. Bear right on Santa Clara Street as you come off
+that exit. The first light you come to is Almaden Blvd. Turn right on
+Almaden. Go down 3 lights to West San Carlos Street. Turn right on
+West San Carlos. The next light you come to is a small street called
+Woz Way. Turn right on Woz. The parking garage for our building is on
+your right. Turn right into the garage. Then follow the directions
+above from the garage to our office.
+</p>
+
+<p>
+From Highway 101 heading southbound to San Jose: Take the Guadalupe
+Parkway exit, also called Highway 87. Stay on the Guadalupe as it
+turns into a surface street and you cross over Hedding and Coleman.
+Once it turns into an expressway again, the second exit is the Park
+Avenue exit. Take this exit. Turn left on Park Avenue. After you
+turn left you will come under the freeway and immediately come to a
+traffic light at a small street called Woz Way. Turn right on Woz
+Way. The parking garage for our building is on your left. Turn left
+into the garage. Then follow the directions above from the garage to
+our office.
+</p>
+
+<p>
+From Highway 101 heading northbound to San Jose: Turn on to Highway
+280 headed north. Then follow directions above for Highway 280 heading
+northbound to San Jose.
+</p>
+
+<p>
+From Highway 880: Take Highway 880 to Highway 280 South, and then
+follow directions above from Highway 280 heading southbound to San
+Jose.
+</p>
+ </td>
+
+ </tr>
+ <tr height="1087">
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/232990-1-ref.xhtml b/layout/reftests/bugs/232990-1-ref.xhtml
new file mode 100644
index 0000000000..530f72cdd1
--- /dev/null
+++ b/layout/reftests/bugs/232990-1-ref.xhtml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style type="text/css">
+<![CDATA[
+@namespace pp url("prettyprint");
+pp|expander-box,
+pp|pre-content {
+ display: block;
+}
+
+pp|expander-box[collapsed] > pp|float,
+pp|expander-box[collapsed] > pp|pre-content {
+ display: inline;
+ float: none;
+}
+
+pp|float {
+ float: left;
+}
+ ]]></style>
+ </head>
+
+ <body>
+ <div>
+<pp:content xmlns:pp="prettyprint">
+ <pp:expander-box collapsed="collapsed"><pp:float>-</pp:float>
+ <pp:pre-content>pre</pp:pre-content>
+ </pp:expander-box>
+</pp:content>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/232990-1a.xhtml b/layout/reftests/bugs/232990-1a.xhtml
new file mode 100644
index 0000000000..4845452a96
--- /dev/null
+++ b/layout/reftests/bugs/232990-1a.xhtml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style type="text/css">
+<![CDATA[
+@namespace pp url("prettyprint");
+pp|expander-box,
+pp|pre-content {
+ display: block;
+}
+
+pp|expander-box[collapsed] > pp|float,
+pp|expander-box[collapsed] > pp|pre-content {
+ display: inline;
+ float: none;
+}
+
+pp|float {
+ float: left;
+}
+ ]]></style>
+ <script>
+<![CDATA[
+var target;
+function onLoad() {
+var res = document.evaluate("descendant::pp:expander-box",
+ document.documentElement,
+ function(aPref){return "prettyprint";},
+ 0, null);
+target = res.iterateNext();
+toggle();
+}
+
+function toggle() {
+ target.setAttribute("collapsed", "collapsed");
+}
+ ]]></script>
+ </head>
+
+ <body onload="onLoad()">
+ <div>
+<pp:content xmlns:pp="prettyprint">
+ <pp:expander-box><pp:float>-</pp:float>
+ <pp:pre-content>pre</pp:pre-content>
+ </pp:expander-box>
+</pp:content>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/233094-1-ref.html b/layout/reftests/bugs/233094-1-ref.html
new file mode 100644
index 0000000000..366f1f2ec3
--- /dev/null
+++ b/layout/reftests/bugs/233094-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+
+<table align="center">
+<tr>
+ <td>
+ <div style="float: right">
+ <input type="text" value="This is a test">
+ </div>
+</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/233094-1.html b/layout/reftests/bugs/233094-1.html
new file mode 100644
index 0000000000..c582395e3b
--- /dev/null
+++ b/layout/reftests/bugs/233094-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+
+<table align="center">
+<tr>
+ <td style="float: right">
+ <input type="text" value="This is a test">
+</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/233094-2-ref.html b/layout/reftests/bugs/233094-2-ref.html
new file mode 100644
index 0000000000..e1daacb6b8
--- /dev/null
+++ b/layout/reftests/bugs/233094-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+
+<div style="display: table; margin-left: 100px">
+<div style="display: table-cell">
+ <div style="float: right;">
+ <input type="text" value="This is a test">
+</div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/233094-2a.html b/layout/reftests/bugs/233094-2a.html
new file mode 100644
index 0000000000..7e45b11400
--- /dev/null
+++ b/layout/reftests/bugs/233094-2a.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body onload="var bar = document.createElement('input'); bar.defaultValue='This is a test'; document.getElementById('foo').appendChild(bar)">
+
+<div style="display: table; margin-left: 100px">
+<div style="display: table-row">
+ <div style="float: right;" id="foo">
+</div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/233094-2b.html b/layout/reftests/bugs/233094-2b.html
new file mode 100644
index 0000000000..78a8a3569b
--- /dev/null
+++ b/layout/reftests/bugs/233094-2b.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+
+<div style="display: table; margin-left: 100px">
+<div style="display: table-row">
+ <div style="float: right;">
+ <input type="text" value="This is a test">
+</div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/233094-2c.html b/layout/reftests/bugs/233094-2c.html
new file mode 100644
index 0000000000..37f7b06b22
--- /dev/null
+++ b/layout/reftests/bugs/233094-2c.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<body onload="document.getElementById('foo').style.cssFloat='left'">
+
+<div style="display: table; margin-left: 100px">
+<div style="display: table-row">
+ <div style="display: table-cell" id="foo">
+ <input type="text" value="This is a test">
+</div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/234686-1.gif b/layout/reftests/bugs/234686-1.gif
new file mode 100644
index 0000000000..ed10d8a705
--- /dev/null
+++ b/layout/reftests/bugs/234686-1.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-1.html b/layout/reftests/bugs/234686-1.html
new file mode 100644
index 0000000000..6253198456
--- /dev/null
+++ b/layout/reftests/bugs/234686-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* none
+ *
+ * wmin w wmax
+ * |------------------+------+---------+------> width
+ * hmin h hmax
+ * |-------------+-----------+-----+----------> height
+ *
+ * target: [w, h]
+ */
+
+ #img1 {min-width: 60px;
+ max-width: 105px;
+ min-height: 45px;
+ max-height: 120px;}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-1.gif" alt="" id="img1"></p> <!-- w=75 h=75 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-10.gif b/layout/reftests/bugs/234686-10.gif
new file mode 100644
index 0000000000..4b24f565f3
--- /dev/null
+++ b/layout/reftests/bugs/234686-10.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-10.html b/layout/reftests/bugs/234686-10.html
new file mode 100644
index 0000000000..66f3867f04
--- /dev/null
+++ b/layout/reftests/bugs/234686-10.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w > max-width) and (h > max-height)
+ * (wmin/w > hmax/h) and (wmin/w > hmax/h)
+ *
+ * wmin wmax w
+ * |------------------+------+-------+--------> width
+ * hmax h
+ * |-------------+-------------------+--------> height
+ *
+ * target: [wmin, hmax]
+ */
+
+ #img10 { min-width: 75px; /* 25% */
+ max-width: 150px; /* 50% */
+ max-height: 75px; /* 20% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-10.gif" alt="" id="img10"></p> <!-- w=300 h=375 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-11.gif b/layout/reftests/bugs/234686-11.gif
new file mode 100644
index 0000000000..effaaee27d
--- /dev/null
+++ b/layout/reftests/bugs/234686-11.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-11.html b/layout/reftests/bugs/234686-11.html
new file mode 100644
index 0000000000..7c9f327d73
--- /dev/null
+++ b/layout/reftests/bugs/234686-11.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w > max-width) and (h > max-height)
+ * (wmax/w > hmax/h) and (wmin/w < hmax/h)
+ *
+ * wmin wmax w
+ * |---------+---------------+-------+--------> width
+ * hmax h
+ * |-------------+-------------------+--------> height
+ *
+ * target: [hmax * w/h, hmax]
+ */
+
+ #img11 { min-width: 25px; /* 10% */
+ max-width: 225px; /* 90% */
+ max-height: 75px; /* 30% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-11.gif" alt="" id="img11"></p> <!-- w=250 h=250 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-12.gif b/layout/reftests/bugs/234686-12.gif
new file mode 100644
index 0000000000..c4c8d24f45
--- /dev/null
+++ b/layout/reftests/bugs/234686-12.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-12.html b/layout/reftests/bugs/234686-12.html
new file mode 100644
index 0000000000..66efd89591
--- /dev/null
+++ b/layout/reftests/bugs/234686-12.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w > max-width) and (h > max-height)
+ * (wmax/w < hmax/h) and (wmax/w < hmin/h)
+ *
+ * wmax w
+ * |-------------+-------------------+--------> width
+ * hmin hmax h
+ * |------------------+------+-------+--------> height
+ *
+ * target: [wmax, hmin]
+ */
+
+ #img12 { max-width: 75px; /* 20% */
+ min-height: 75px; /* 25% */
+ max-height: 150px; /* 50% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-12.gif" alt="" id="img12"></p> <!-- w=375 h=300 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-13.gif b/layout/reftests/bugs/234686-13.gif
new file mode 100644
index 0000000000..effaaee27d
--- /dev/null
+++ b/layout/reftests/bugs/234686-13.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-13.html b/layout/reftests/bugs/234686-13.html
new file mode 100644
index 0000000000..75c3acb4b5
--- /dev/null
+++ b/layout/reftests/bugs/234686-13.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w > max-width) and (h > max-width)
+ * (wmax/w < hmax/h) and (wmax/w > hmin/h)
+ *
+ * wmax w
+ * |-------------+-------------------+--------> width
+ * hmin hmax h
+ * |---------+---------------+-------+--------> height
+ *
+ * target: [wmax, wmax * h/w]
+ */
+
+ #img13 { max-width: 75px; /* 30% */
+ min-height: 25px; /* 10% */
+ max-height: 225px; /* 90% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-13.gif" alt="" id="img13"></p> <!-- w=250 h=250 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-14.gif b/layout/reftests/bugs/234686-14.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-14.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-14.html b/layout/reftests/bugs/234686-14.html
new file mode 100644
index 0000000000..f007ccb83b
--- /dev/null
+++ b/layout/reftests/bugs/234686-14.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w < min-width) and (h < min-height)
+ * (wmin/w < hmin/h) and (wmax/w > hmin/h)
+ *
+ * w wmin wmax
+ * |----------+---------+----------+----------> width
+ * h hmin
+ * |----------+-------------+-----------------> height
+ *
+ * target: [hmin * w/h, hmin]
+ */
+
+ #img14 { min-width: 50px; /* 200% */
+ max-width: 100px; /* 400% */
+ min-height: 75px; /* 300% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-14.gif" alt="" id="img14"></p> <!-- w=25 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-15.gif b/layout/reftests/bugs/234686-15.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-15.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-15.html b/layout/reftests/bugs/234686-15.html
new file mode 100644
index 0000000000..d5d561766f
--- /dev/null
+++ b/layout/reftests/bugs/234686-15.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w < min-width) and (h < min-height)
+ * (wmin/w < hmin/h) and (wmax/w < hmin/h)
+ *
+ * w wmin wmax
+ * |----------+---------+----------+----------> width
+ * h hmin
+ * |----------+------------------------+------> height
+ *
+ * target: [wmax, hmin]
+ */
+
+ #img15 { min-width: 55px; /* 110% */
+ max-width: 75px; /* 150% */
+ min-height: 75px; /* 300% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-15.gif" alt="" id="img15"></p> <!-- w=50 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-16.gif b/layout/reftests/bugs/234686-16.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-16.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-16.html b/layout/reftests/bugs/234686-16.html
new file mode 100644
index 0000000000..cd9e50f086
--- /dev/null
+++ b/layout/reftests/bugs/234686-16.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w < min-width) and (h < min-height)
+ * (wmin/w > hmin/h) and (wmin/w < hmax/h)
+ *
+ * w wmin
+ * |----------+-------------+-----------------> width
+ * h hmin hmax
+ * |----------+---------+----------+----------> height
+ *
+ * target: [wmin, wmin * h/w]
+ */
+
+ #img16 { min-width: 75px; /* 300% */
+ min-height: 50px; /* 200% */
+ max-height: 100px; /* 400% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-16.gif" alt="" id="img16"></p> <!-- w=25 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-17.gif b/layout/reftests/bugs/234686-17.gif
new file mode 100644
index 0000000000..b06554621e
--- /dev/null
+++ b/layout/reftests/bugs/234686-17.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-17.html b/layout/reftests/bugs/234686-17.html
new file mode 100644
index 0000000000..bcce100844
--- /dev/null
+++ b/layout/reftests/bugs/234686-17.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w < min-width) and (h < min-height)
+ * (wmin/w > hmin/h) and (wmin/w > hmax/h)
+ * w wmin
+ * |----------+------------------------+------> width
+ * h hmin hmax
+ * |----------+---------+----------+----------> height
+ *
+ * target: [wmin, hmax]
+ */
+
+ #img17 { min-width: 75px; /* 300% */
+ min-height: 55px; /* 110% */
+ max-height: 75px; /* 150% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-17.gif" alt="" id="img17"></p> <!-- w=25 h=50 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-18.gif b/layout/reftests/bugs/234686-18.gif
new file mode 100644
index 0000000000..970a23fb50
--- /dev/null
+++ b/layout/reftests/bugs/234686-18.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-18.html b/layout/reftests/bugs/234686-18.html
new file mode 100644
index 0000000000..53076e38af
--- /dev/null
+++ b/layout/reftests/bugs/234686-18.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w < min-width) and (h > max-height)
+ *
+ * w wmin
+ * |-------------------------+-----+----------> width
+ * hmax h
+ * |------------------+------+----------------> height
+ *
+ * target: [wmin, hmax]
+ */
+
+ #img18 { min-width: 75px; /* 150% */
+ max-height: 75px; /* 75% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-18.gif" alt="" id="img18"></p> <!-- w=50 h=100 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-19.gif b/layout/reftests/bugs/234686-19.gif
new file mode 100644
index 0000000000..b06554621e
--- /dev/null
+++ b/layout/reftests/bugs/234686-19.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-19.html b/layout/reftests/bugs/234686-19.html
new file mode 100644
index 0000000000..ad23c16473
--- /dev/null
+++ b/layout/reftests/bugs/234686-19.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* (w > max-width) and (h < min-height)
+ *
+ * wmax w
+ * |------------------+------+----------------> width
+ * h hmin
+ * |-------------------------+-----+----------> height
+ *
+ * target: [wmax, hmin]
+ */
+
+ #img19 { max-width: 75px; /* 75% */
+ min-height: 75px; /* 150% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-19.gif" alt="" id="img19"></p> <!-- w=100 h=50 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-2.gif b/layout/reftests/bugs/234686-2.gif
new file mode 100644
index 0000000000..98153d4d38
--- /dev/null
+++ b/layout/reftests/bugs/234686-2.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-2.html b/layout/reftests/bugs/234686-2.html
new file mode 100644
index 0000000000..686d24c569
--- /dev/null
+++ b/layout/reftests/bugs/234686-2.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* w > max-width
+ * wmax/w > hmin/h
+ * wmax w
+ * |------------------+------+----------------> width
+ * hmin h
+ * |------------+------------+----------------> height
+ *
+ * target: [wmax, wmax * h/w]
+ */
+
+ #img2 {max-width: 75px; /* 50% */
+ min-height: 60px; /* 40% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-2.gif" alt="" id="img2"></p> <!-- w=150 h=150 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-3.gif b/layout/reftests/bugs/234686-3.gif
new file mode 100644
index 0000000000..98153d4d38
--- /dev/null
+++ b/layout/reftests/bugs/234686-3.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-3.html b/layout/reftests/bugs/234686-3.html
new file mode 100644
index 0000000000..9c676b6b21
--- /dev/null
+++ b/layout/reftests/bugs/234686-3.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* w > max-width
+ * wmax/w < hmin/h
+ *
+ * wmax w
+ * |-------------+-----------+----------------> width
+ * hmin h
+ * |------------------+------+----------------> height
+ *
+ * target: [wmax, hmin]
+ */
+
+ #img3 {max-width: 75px; /* 25% */
+ min-height: 75px; /* 50% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-3.gif" alt="" id="img3"></p> <!-- w=300 h=150 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-4.gif b/layout/reftests/bugs/234686-4.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-4.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-4.html b/layout/reftests/bugs/234686-4.html
new file mode 100644
index 0000000000..e3a8ed46e5
--- /dev/null
+++ b/layout/reftests/bugs/234686-4.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* w < min-width
+ * wmin/w < hmax/h
+ *
+ * w wmin
+ * |-------------+---------+------------------> width
+ * h hmax
+ * |-------------+----------------+-----------> height
+ *
+ * target: [wmin, wmin * h/w]
+ */
+
+ #img4 {min-width: 75px; /* 300% */
+ max-height: 100px; /* 400% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-4.gif" alt="" id="img4"></p> <!-- w=25 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-5.gif b/layout/reftests/bugs/234686-5.gif
new file mode 100644
index 0000000000..b06554621e
--- /dev/null
+++ b/layout/reftests/bugs/234686-5.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-5.html b/layout/reftests/bugs/234686-5.html
new file mode 100644
index 0000000000..4d40d606f0
--- /dev/null
+++ b/layout/reftests/bugs/234686-5.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* w < min-width
+ * wmin/w > hmax/h
+ *
+ * w wmin
+ * |-------------+----------------+-----------> width
+ * h hmax
+ * |-------------+---------+------------------> height
+ *
+ * target: [wmin, hmax]
+ */
+
+ #img5 {min-width: 75px; /* 300% */
+ max-height: 75px; /* 150% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-5.gif" alt="" id="img5"></p> <!-- w=25 h=50 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-6.gif b/layout/reftests/bugs/234686-6.gif
new file mode 100644
index 0000000000..98153d4d38
--- /dev/null
+++ b/layout/reftests/bugs/234686-6.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-6.html b/layout/reftests/bugs/234686-6.html
new file mode 100644
index 0000000000..46ed89d3e3
--- /dev/null
+++ b/layout/reftests/bugs/234686-6.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* h > max-height
+ * wmin/w < hmax/h
+ *
+ * wmin w
+ * |------------+------------+----------------> width
+ * hmax h
+ * |------------------+------+----------------> height
+ *
+ * target: [hmax * w/h, hmax]
+ */
+
+ #img6 {min-width: 60px; /* 40% */
+ max-height: 75px; /* 50% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-6.gif" alt="" id="img6"></p> <!-- w=150 h=150 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-7.gif b/layout/reftests/bugs/234686-7.gif
new file mode 100644
index 0000000000..c4c8d24f45
--- /dev/null
+++ b/layout/reftests/bugs/234686-7.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-7.html b/layout/reftests/bugs/234686-7.html
new file mode 100644
index 0000000000..9116ebdccc
--- /dev/null
+++ b/layout/reftests/bugs/234686-7.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* h > max-height
+ * wmin/w > hmax/h
+ *
+ * wmin w
+ * |------------------+------+----------------> width
+ * hmax h
+ * |-------------+-----------+----------------> height
+ *
+ * target: [wmin, hmax]
+ */
+
+ #img7 {min-width: 75px; /* 50% */
+ max-height: 75px; /* 25% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-7.gif" alt="" id="img7"></p> <!-- w=150 h=300 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-8.gif b/layout/reftests/bugs/234686-8.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-8.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-8.html b/layout/reftests/bugs/234686-8.html
new file mode 100644
index 0000000000..60b07d54b5
--- /dev/null
+++ b/layout/reftests/bugs/234686-8.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* h < min-height
+ * wmax/w > hmin/h
+ *
+ * w wmax
+ * |-------------+----------------+-----------> height
+ * h hmin
+ * |-------------+---------+------------------> width
+ *
+ * target: [hmin * w/h, hmin]
+ */
+
+ #img8 {max-width: 100px; /* 400% */
+ min-height: 75px; /* 300% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-8.gif" alt="" id="img8"></p> <!-- w=25 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-9.gif b/layout/reftests/bugs/234686-9.gif
new file mode 100644
index 0000000000..04cc507d2e
--- /dev/null
+++ b/layout/reftests/bugs/234686-9.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-9.html b/layout/reftests/bugs/234686-9.html
new file mode 100644
index 0000000000..770abcebd3
--- /dev/null
+++ b/layout/reftests/bugs/234686-9.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+ <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ /* w < min-width
+ * wmax/w < hmin/h
+ *
+ * w wmax
+ * |-------------+---------+------------------> width
+ * h hmin
+ * |-------------+----------------+-----------> height
+ *
+ * target: [wmax, hmin]
+ */
+
+ #img9 {max-width: 75px; /* 150% */
+ min-height: 75px; /* 300% */}
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-9.gif" alt="" id="img9"></p> <!-- w=50 h=25 -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234686-ref.gif b/layout/reftests/bugs/234686-ref.gif
new file mode 100644
index 0000000000..ed10d8a705
--- /dev/null
+++ b/layout/reftests/bugs/234686-ref.gif
Binary files differ
diff --git a/layout/reftests/bugs/234686-ref.html b/layout/reftests/bugs/234686-ref.html
new file mode 100644
index 0000000000..eda0b491dc
--- /dev/null
+++ b/layout/reftests/bugs/234686-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!--
+From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
+with permission in
+https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
+-->
+<html lang="en">
+ <head>
+ <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
+ <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
+ <style type="text/css">
+
+ /* Diagrams are scaled so that w and h line up.
+ Image is 75px x 75px; target dimensions will thus be 75px. */
+
+ </style>
+ </head>
+ <body>
+ <p><img src="234686-ref.gif" alt=""></p> <!-- intrinsic dimensions -->
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234964-1-ref.html b/layout/reftests/bugs/234964-1-ref.html
new file mode 100644
index 0000000000..0833305555
--- /dev/null
+++ b/layout/reftests/bugs/234964-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+<form style="height:100%">
+<table height=100% bgcolor=yellow>
+<tr><td><br><br><br><br><br><br><br><br><br><br><br><br>
+<tr height=100%><td><textarea style="height:100%"></textarea>
+<tr><td>Bottom
+</table>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/234964-1.html b/layout/reftests/bugs/234964-1.html
new file mode 100644
index 0000000000..445892af4f
--- /dev/null
+++ b/layout/reftests/bugs/234964-1.html
@@ -0,0 +1,11 @@
+<html>
+<body onload="document.getElementById('test').innerHTML='<br><br><br><br><br><br><br><br><br><br><br><br>'">
+<form style="height:100%">
+<table height=100% bgcolor=yellow>
+<tr><td id="test">Click here
+<tr height=100%><td><textarea style="height:100%"></textarea>
+<tr><td>Bottom
+</table>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/234964-2-ref.html b/layout/reftests/bugs/234964-2-ref.html
new file mode 100644
index 0000000000..d2b375a4f2
--- /dev/null
+++ b/layout/reftests/bugs/234964-2-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <table style="height:400px; background:yellow;">
+ <tr><td id="test"><br><br><br><br><br><br><br><br><br>
+ <tr height=100%><td><div style="height:100%; width:100px; background:blue;"></div>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/234964-2.html b/layout/reftests/bugs/234964-2.html
new file mode 100644
index 0000000000..efb31d6852
--- /dev/null
+++ b/layout/reftests/bugs/234964-2.html
@@ -0,0 +1,8 @@
+<html>
+ <body onload="document.getElementById('test').innerHTML='<br><br><br><br><br><br><br><br><br>'">
+ <table style="height:400px; background:yellow;">
+ <tr><td id="test">
+ <tr height=100%><td><div style="height:100%; width:100px; background:blue;"></div>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/235593-1-ref.html b/layout/reftests/bugs/235593-1-ref.html
new file mode 100644
index 0000000000..ea8139bf96
--- /dev/null
+++ b/layout/reftests/bugs/235593-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 235593 Reference</title>
+</head>
+<body>
+<table>
+ <tr><td>
+ <table><tr><td style="background: #DDDDDD">a a</td><td></td></tr></table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/235593-1.html b/layout/reftests/bugs/235593-1.html
new file mode 100644
index 0000000000..55013e40f6
--- /dev/null
+++ b/layout/reftests/bugs/235593-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 235593</title>
+</head>
+<body>
+<table>
+ <tr><td>
+ <table align="left"><tr><td style="background: #DDDDDD">a a<script type="text/javascript">document.body.offsetWidth;</script></td><td></td></tr></table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/23604-1-ref.html b/layout/reftests/bugs/23604-1-ref.html
new file mode 100644
index 0000000000..536728eec8
--- /dev/null
+++ b/layout/reftests/bugs/23604-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <style type="text/css">
+ body { background: lightblue }
+ p:first-line { font-family: monospace }
+ p:first-letter { font-family: sans-serif }
+ </style>
+ </head>
+ <body>
+ <p style="width: 100px"><span>The first letter of this paragraph should be
+ in sans-serif while the first-line should be in monospace.</span></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/23604-1.html b/layout/reftests/bugs/23604-1.html
new file mode 100644
index 0000000000..14d3cfa704
--- /dev/null
+++ b/layout/reftests/bugs/23604-1.html
@@ -0,0 +1,18 @@
+<html class="reftest-wait">
+ <head>
+ <style type="text/css">
+ p:first-line { font-family: monospace }
+ p:first-letter { font-family: sans-serif }
+ </style>
+ <script>
+ function tweak() {
+ document.body.style.background = 'lightblue';
+ document.documentElement.className = "";
+ }
+ </script>
+ </head>
+ <body onload="tweak();">
+ <p style="width: 100px"><span>The first letter of this paragraph should be
+ in sans-serif while the first-line should be in monospace.</span></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/23604-2-ref.html b/layout/reftests/bugs/23604-2-ref.html
new file mode 100644
index 0000000000..4fae573513
--- /dev/null
+++ b/layout/reftests/bugs/23604-2-ref.html
@@ -0,0 +1,37 @@
+<html>
+<head>
+ <style type="text/css">
+ body {
+ font-family: sans-serif;
+ background: lightblue; }
+
+ .a li:first-letter {
+ font-family: serif;
+ font-weight: bold; }
+
+ .b li:first-letter {
+ color: red; }
+
+ .c li:first-letter {
+ background: red; }
+
+ .d li:first-letter {
+ font-size: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <ul class="a">
+ <li><a>Lorem ipsum dolor sit amet</a></li>
+ </ul>
+ <ul class="b">
+ <li><del>Lorem ipsum dolor sit amet</del></li>
+ </ul>
+ <ul class="c">
+ <li><em>Lorem ipsum dolor sit amet</em></li>
+ </ul>
+ <ul class="d">
+ <li><span>Lorem ipsum dolor sit amet</span></li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/23604-2.html b/layout/reftests/bugs/23604-2.html
new file mode 100644
index 0000000000..ff62d5fc0c
--- /dev/null
+++ b/layout/reftests/bugs/23604-2.html
@@ -0,0 +1,42 @@
+<html class="reftest-wait">
+<head>
+ <style type="text/css">
+ body {
+ font-family: sans-serif; }
+
+ .a li:first-letter {
+ font-family: serif;
+ font-weight: bold; }
+
+ .b li:first-letter {
+ color: red; }
+
+ .c li:first-letter {
+ background: red; }
+
+ .d li:first-letter {
+ font-size: 1.5em; }
+ </style>
+ <script>
+ function tweak() {
+ document.body.style.background = 'lightblue';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+
+<body onload="tweak();">
+ <ul class="a">
+ <li><a>Lorem ipsum dolor sit amet</a></li>
+ </ul>
+ <ul class="b">
+ <li><del>Lorem ipsum dolor sit amet</del></li>
+ </ul>
+ <ul class="c">
+ <li><em>Lorem ipsum dolor sit amet</em></li>
+ </ul>
+ <ul class="d">
+ <li><span>Lorem ipsum dolor sit amet</span></li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/236539-1-ref.html b/layout/reftests/bugs/236539-1-ref.html
new file mode 100644
index 0000000000..50b65d74a1
--- /dev/null
+++ b/layout/reftests/bugs/236539-1-ref.html
@@ -0,0 +1,129 @@
+<html>
+<head>
+<script type="text/javascript">
+var NumLine = 0
+
+function maj(IDLine)
+{
+
+var newtr = document.createElement("tr")
+newtr.setAttribute("id","tr"+IDLine)
+
+
+var newtdselect = document.createElement("td")
+var newselect = document.createElement("select")
+newselect.setAttribute("id","HypothRank_"+IDLine)
+newselect.setAttribute("name","HypothRank_"+IDLine)
+
+for (i=1;i<=IDLine;i++)
+ {
+
+ var newoption = document.createElement("option")
+ newoption.setAttribute("id",i)
+ newoption.setAttribute("class","classoption1")
+ if (i == IDLine)
+ {
+ newoption.setAttribute("selected","selected")
+ }
+ var newtxt = document.createTextNode(i)
+ newoption.appendChild(newtxt)
+
+ newselect.appendChild(newoption)
+ }
+
+if (i>2)
+ {
+ for (j=1;j<=i-2;j++)
+ {
+ var newoption = document.createElement("option")
+ newoption.setAttribute("class","classoption1")
+ newoption.setAttribute("id",IDLine)
+ var newtxt = document.createTextNode(i-1)
+ newoption.appendChild(newtxt)
+ document.getElementById("HypothRank_"+j).appendChild(newoption)
+ }
+ }
+
+newtdselect.appendChild(newselect)
+newtr.appendChild(newtdselect)
+
+document.getElementById('letbody').appendChild(newtr)
+
+NumLine++
+}
+
+
+
+function DeleteLine(IDLine)
+{
+for (i=1;i<=NumLine;i++)
+
+ {
+ if (i != IDLine)
+ {
+ noeud = document.getElementById("HypothRank_"+i)[IDLine-1]
+ document.getElementById("HypothRank_"+i).removeChild(noeud)
+ for (j=0;j<=NumLine-2;j++)
+ {
+ noeud = document.getElementById("HypothRank_"+i)[j]
+
+ k=j+1
+ noeud.setAttribute("id",k)
+
+ if (k == NumLine)
+ {
+ noeud.setAttribute("selected","selected")
+ }
+ depart = 0
+ taille = noeud.firstChild.nodeValue.length
+ document.getElementById("HypothRank_"+i)[j].firstChild.replaceData(depart,taille,j+1)
+ }
+ }
+ }
+
+
+noeud = document.getElementById('tr'+IDLine)
+document.getElementById('letbody').removeChild(noeud)
+
+NumLine--
+
+for (i=IDLine;i<=NumLine;i++)
+ {
+ k=i+1
+ noeud = document.getElementById("tr"+k)
+ noeud.setAttribute("id","tr"+i)
+
+ noeud = document.getElementById("HypothRank_"+k)
+ noeud.setAttribute("id","HypothRank_"+i)
+ noeud.setAttribute("name","HypothRank_"+i)
+
+ noeud = document.getElementById("Hypoth_"+k)
+ noeud.setAttribute("name","Hypoth_"+i)
+ noeud.setAttribute("id","Hypoth_"+i)
+ }
+
+
+}
+
+</script>
+</head>
+
+<body>
+<form>
+ <table border="1" id="latable">
+ <thead></thead>
+ <tfoot></tfoot>
+ <tbody id="letbody"></tbody>
+ </table>
+</form>
+
+<script>
+ document.body.offsetWidth;
+ maj(NumLine+1);
+ document.body.offsetWidth;
+ maj(NumLine+1);
+ document.body.offsetWidth;
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/236539-1.html b/layout/reftests/bugs/236539-1.html
new file mode 100644
index 0000000000..83331415ce
--- /dev/null
+++ b/layout/reftests/bugs/236539-1.html
@@ -0,0 +1,130 @@
+<html>
+<head>
+<script type="text/javascript">
+var NumLine = 0
+
+function maj(IDLine)
+{
+
+var newtr = document.createElement("tr")
+newtr.setAttribute("id","tr"+IDLine)
+
+
+var newtdselect = document.createElement("td")
+var newselect = document.createElement("select")
+newselect.setAttribute("id","HypothRank_"+IDLine)
+newselect.setAttribute("name","HypothRank_"+IDLine)
+
+for (i=1;i<=IDLine;i++)
+ {
+
+ var newoption = document.createElement("option")
+ newoption.setAttribute("id",i)
+ newoption.setAttribute("class","classoption1")
+ if (i == IDLine)
+ {
+ newoption.setAttribute("selected","selected")
+ }
+ var newtxt = document.createTextNode(i)
+ newoption.appendChild(newtxt)
+
+ newselect.appendChild(newoption)
+ }
+
+if (i>2)
+ {
+ for (j=1;j<=i-2;j++)
+ {
+ var newoption = document.createElement("option")
+ newoption.setAttribute("class","classoption1")
+ newoption.setAttribute("id",IDLine)
+ var newtxt = document.createTextNode(i-1)
+ newoption.appendChild(newtxt)
+ document.getElementById("HypothRank_"+j).appendChild(newoption)
+ }
+ }
+
+newtdselect.appendChild(newselect)
+newtr.appendChild(newtdselect)
+
+document.getElementById('letbody').appendChild(newtr)
+
+NumLine++
+}
+
+
+
+function DeleteLine(IDLine)
+{
+for (i=1;i<=NumLine;i++)
+
+ {
+ if (i != IDLine)
+ {
+ noeud = document.getElementById("HypothRank_"+i)[IDLine-1]
+ document.getElementById("HypothRank_"+i).removeChild(noeud)
+ for (j=0;j<=NumLine-2;j++)
+ {
+ noeud = document.getElementById("HypothRank_"+i)[j]
+
+ k=j+1
+ noeud.setAttribute("id",k)
+
+ if (k == NumLine)
+ {
+ noeud.setAttribute("selected","selected")
+ }
+ depart = 0
+ taille = noeud.firstChild.nodeValue.length
+ document.getElementById("HypothRank_"+i)[j].firstChild.replaceData(depart,taille,j+1)
+ }
+ }
+ }
+
+
+noeud = document.getElementById('tr'+IDLine)
+document.getElementById('letbody').removeChild(noeud)
+
+NumLine--
+
+for (i=IDLine;i<=NumLine;i++)
+ {
+ k=i+1
+ noeud = document.getElementById("tr"+k)
+ noeud.setAttribute("id","tr"+i)
+
+ noeud = document.getElementById("HypothRank_"+k)
+ noeud.setAttribute("id","HypothRank_"+i)
+ noeud.setAttribute("name","HypothRank_"+i)
+
+ }
+
+
+}
+
+</script>
+</head>
+
+<body>
+<form>
+ <table border="1" id="latable">
+ <thead></thead>
+ <tfoot></tfoot>
+ <tbody id="letbody"></tbody>
+ </table>
+</form>
+
+<script>
+ document.body.offsetWidth;
+ maj(NumLine+1);
+ document.body.offsetWidth;
+ maj(NumLine+1);
+ document.body.offsetWidth;
+ maj(NumLine+1);
+ document.body.offsetWidth;
+ DeleteLine(2);
+ document.body.offsetWidth;
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/240029-1-ref.html b/layout/reftests/bugs/240029-1-ref.html
new file mode 100644
index 0000000000..dc5ca019e0
--- /dev/null
+++ b/layout/reftests/bugs/240029-1-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+body {
+ font-size: 10px;
+}
+.float {
+ width: 100%;
+ float: left;
+ height: 10px;
+ padding-bottom: 10px;
+}
+table {
+ clear: left;
+}
+</style>
+</head>
+<body>
+<div class="float"></div>
+<br>
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <td>should_be_at_left_edge</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240029-1.html b/layout/reftests/bugs/240029-1.html
new file mode 100644
index 0000000000..7fd60ee9f1
--- /dev/null
+++ b/layout/reftests/bugs/240029-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+body {
+ font-size: 10px;
+}
+.float {
+ width: 100%;
+ float: left;
+ height: 10px;
+ padding-bottom: 10px;
+}
+</style>
+</head>
+<body>
+<div class="float"></div>
+<br>
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <td>should_be_at_left_edge</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240470-1-ref.html b/layout/reftests/bugs/240470-1-ref.html
new file mode 100644
index 0000000000..e56d951133
--- /dev/null
+++ b/layout/reftests/bugs/240470-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<body>
+<html>
+<select id="test" size="8">
+</select>
+<script>
+ var optgroup = document.createElement("optgroup");
+ optgroup.setAttribute('label', 'An optgroup');
+ var option = document.createElement("option");
+ var optionText = document.createTextNode("An option");
+ option.appendChild(optionText);
+ var select = document.getElementById("test");
+
+ optgroup.appendChild(option);
+ select.appendChild(optgroup);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240470-1.html b/layout/reftests/bugs/240470-1.html
new file mode 100644
index 0000000000..307a07376b
--- /dev/null
+++ b/layout/reftests/bugs/240470-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<body>
+<html>
+<select id="test" size="8">
+</select>
+<script>
+ var optgroup = document.createElement("optgroup");
+ optgroup.setAttribute('label', 'An optgroup');
+ var option = document.createElement("option");
+ var optionText = document.createTextNode("An option");
+ option.appendChild(optionText);
+ var select = document.getElementById("test");
+
+ select.appendChild(optgroup);
+ optgroup.appendChild(option);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240933-1-ref.html b/layout/reftests/bugs/240933-1-ref.html
new file mode 100644
index 0000000000..0d727af3a2
--- /dev/null
+++ b/layout/reftests/bugs/240933-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<body onload="setup()">
+<textarea id="ta" dir="rtl">
+
+&#x05d0;a&#x05d1;
+
+</textarea>
+<textarea id="tb">
+
+abc
+
+</textarea>
+
+<div id="coords1"></div>
+<div id="coords2"></div>
+
+<script>
+ function setup() {
+ document.getElementById("coords1").innerHTML = document.getElementById("ta").selectionStart;
+ document.getElementById("coords2").innerHTML = document.getElementById("tb").selectionStart;
+ }
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240933-1.html b/layout/reftests/bugs/240933-1.html
new file mode 100644
index 0000000000..a4a25aede9
--- /dev/null
+++ b/layout/reftests/bugs/240933-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<textarea id="ta" dir="rtl">
+
+&#x05d0;a&#x05d1;
+
+</textarea>
+<textarea id="tb">
+
+abc
+
+</textarea>
+
+<div id="coords1">0</div>
+<div id="coords2">0</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/240933-2-ref.html b/layout/reftests/bugs/240933-2-ref.html
new file mode 100644
index 0000000000..7dbc082a58
--- /dev/null
+++ b/layout/reftests/bugs/240933-2-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body onload="setup()">
+<textarea id="ta" dir="rtl">
+
+&#x05d0;a&#x05d1;
+
+</textarea>
+<textarea id="tb">
+
+abc
+
+</textarea>
+
+<div id="coords1"></div>
+<div id="coords2"></div>
+
+<script>
+ function setup() {
+ document.getElementById("ta").selectionStart = 3;
+ document.getElementById("ta").selectionEnd = 3;
+ document.getElementById("coords1").innerHTML = document.getElementById("ta").selectionStart;
+ document.getElementById("tb").selectionStart = 3;
+ document.getElementById("tb").selectionEnd = 3;
+ document.getElementById("coords2").innerHTML = document.getElementById("tb").selectionStart;
+ }
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/240933-2.html b/layout/reftests/bugs/240933-2.html
new file mode 100644
index 0000000000..0fb9b9d506
--- /dev/null
+++ b/layout/reftests/bugs/240933-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<textarea id="ta" dir="rtl">
+
+&#x05d0;a&#x05d1;
+
+</textarea>
+<textarea id="tb">
+
+abc
+
+</textarea>
+
+<div id="coords1">3</div>
+<div id="coords2">3</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/243266-1-ref.html b/layout/reftests/bugs/243266-1-ref.html
new file mode 100644
index 0000000000..922940859e
--- /dev/null
+++ b/layout/reftests/bugs/243266-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table style="width: 6em; background: yellow">
+ <tr>
+ <td>mmmmmmmm<wbr>mmmmmmmm</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243266-1.html b/layout/reftests/bugs/243266-1.html
new file mode 100644
index 0000000000..e62bbdf0ab
--- /dev/null
+++ b/layout/reftests/bugs/243266-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table style="width: 6em; background: yellow">
+ <tr>
+ <td id="big">mmmmmmmmmmmmmmmm</td>
+ </tr>
+</table>
+<script>
+ document.body.offsetWidth;
+ var big = document.getElementById("big");
+ var r = big.firstChild.splitText(8);
+ big.insertBefore(document.createElement("WBR"), r);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243302-1-ref.html b/layout/reftests/bugs/243302-1-ref.html
new file mode 100644
index 0000000000..54b703fc2f
--- /dev/null
+++ b/layout/reftests/bugs/243302-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 243302 Reference</title>
+</head>
+<body>
+<table>
+ <tr><td width="100%">MMMM MMMM</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243302-1.html b/layout/reftests/bugs/243302-1.html
new file mode 100644
index 0000000000..20b651ea1e
--- /dev/null
+++ b/layout/reftests/bugs/243302-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 243302</title>
+</head>
+<body>
+<table>
+ <tr><td width="100%">MMMM<script type="text/javascript">var v =document.body.offsetHeight;</script> MMMM</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-1-ref.html b/layout/reftests/bugs/243519-1-ref.html
new file mode 100644
index 0000000000..1a031adfd5
--- /dev/null
+++ b/layout/reftests/bugs/243519-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style>
+body { margin:0; }
+.pos { position:absolute; width:100px; height:100px; }
+</style>
+</head>
+<body>
+<div style="height:10000px; margin:0; margin:10px; border:20px solid black; padding:30px;"></div>
+<script>
+window.scrollTo(0,50);
+</script>
+<div class="pos" style="top:0; left:60px; background:yellow;"></div>
+<div class="pos" style="right:0; top:60px; background:orange;"></div>
+<div class="pos" style="bottom:0; left:60px; background:brown;"></div>
+<div class="pos" style="left:0; top:60px; background:pink;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-1.html b/layout/reftests/bugs/243519-1.html
new file mode 100644
index 0000000000..1465f4fa80
--- /dev/null
+++ b/layout/reftests/bugs/243519-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="dom" />
+<style>
+html { margin:10px; border:20px solid black; padding:30px; }
+body { height:10000px; margin:0; }
+div { position:absolute; width:100px; height:100px; }
+</style>
+</head>
+<body>
+<script>
+window.scrollTo(0,50);
+</script>
+<div style="top:0; background:yellow;"></div>
+<div style="right:0; background:orange;"></div>
+<div style="bottom:0; background:brown;"></div>
+<div style="left:0; background:pink;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-2-ref.html b/layout/reftests/bugs/243519-2-ref.html
new file mode 100644
index 0000000000..425289aca2
--- /dev/null
+++ b/layout/reftests/bugs/243519-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style="column-count:2; margin:0;">
+Hello<br>
+Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-2.html b/layout/reftests/bugs/243519-2.html
new file mode 100644
index 0000000000..e1e01c6d35
--- /dev/null
+++ b/layout/reftests/bugs/243519-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html style="column-count:2;">
+<body style="margin:0;">
+Hello<br>
+Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-3-ref.html b/layout/reftests/bugs/243519-3-ref.html
new file mode 100644
index 0000000000..0c7e15b440
--- /dev/null
+++ b/layout/reftests/bugs/243519-3-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head>
+<style>
+body { margin:0; }
+.pos { position:absolute; width:100px; height:100px; }
+</style>
+</head>
+<body>
+<div class="pos" style="top:0; left:60px; border:10px solid yellow;"></div>
+<div class="pos" style="right:0; top:60px; border:10px solid orange;"></div>
+<div class="pos" style="bottom:0; left:60px; border:10px solid brown;"></div>
+<div class="pos" style="left:0; top:60px; border:10px solid pink;"></div>
+<div style="margin:10px; border:20px solid black; padding:30px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-3.html b/layout/reftests/bugs/243519-3.html
new file mode 100644
index 0000000000..df21662976
--- /dev/null
+++ b/layout/reftests/bugs/243519-3.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head>
+<style>
+html { margin:10px; border:20px solid black; padding:30px; }
+body { margin:0; }
+div { position:absolute; width:100px; height:100px; }
+</style>
+</head>
+<body>
+<div style="top:0; border:10px solid yellow;"></div>
+<div style="right:0; border:10px solid orange;"></div>
+<div style="bottom:0; border:10px solid brown;"></div>
+<div style="left:0; border:10px solid pink;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4-ref.html b/layout/reftests/bugs/243519-4-ref.html
new file mode 100644
index 0000000000..c663c6f7e1
--- /dev/null
+++ b/layout/reftests/bugs/243519-4-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html style="background:yellow;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body>
+<div style="position:absolute; top:100px; left:100px; width:100px; height:100px;
+ border:10px solid black;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4a.html b/layout/reftests/bugs/243519-4a.html
new file mode 100644
index 0000000000..764ba3d61b
--- /dev/null
+++ b/layout/reftests/bugs/243519-4a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:absolute; left:100px; top:100px; width:100px; height:100px;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4b.html b/layout/reftests/bugs/243519-4b.html
new file mode 100644
index 0000000000..f8900d0bc5
--- /dev/null
+++ b/layout/reftests/bugs/243519-4b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:fixed; left:100px; top:100px; width:100px; height:100px;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4c.html b/layout/reftests/bugs/243519-4c.html
new file mode 100644
index 0000000000..14acf6c4a6
--- /dev/null
+++ b/layout/reftests/bugs/243519-4c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:absolute; left:100px; top:100px; width:100px; height:100px;
+ background:yellow; border:10px solid black; display:table;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4d.html b/layout/reftests/bugs/243519-4d.html
new file mode 100644
index 0000000000..640e1d71f8
--- /dev/null
+++ b/layout/reftests/bugs/243519-4d.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:fixed; left:100px; top:100px; width:100px; height:100px;
+ background:yellow; border:10px solid black; display:table">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4e.html b/layout/reftests/bugs/243519-4e.html
new file mode 100644
index 0000000000..a1eaea2b3d
--- /dev/null
+++ b/layout/reftests/bugs/243519-4e.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="display:table">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body style="position:absolute; left:100px; top:100px; width:100px; height:100px; border:10px solid black;
+ background:yellow; margin:0">
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-4f.html b/layout/reftests/bugs/243519-4f.html
new file mode 100644
index 0000000000..48d1e85e65
--- /dev/null
+++ b/layout/reftests/bugs/243519-4f.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="display:table">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body style="position:fixed; left:100px; top:100px; width:100px; height:100px; border:10px solid black;
+ background:yellow; margin:0">
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-5-ref.html b/layout/reftests/bugs/243519-5-ref.html
new file mode 100644
index 0000000000..a8ca6430f1
--- /dev/null
+++ b/layout/reftests/bugs/243519-5-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html style="background:yellow;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="margin:0">
+<div style="border:10px solid black; width:100px; height:100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-5a.html b/layout/reftests/bugs/243519-5a.html
new file mode 100644
index 0000000000..63f8a7b8c8
--- /dev/null
+++ b/layout/reftests/bugs/243519-5a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:absolute; width:100px; height:100px;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-5b.html b/layout/reftests/bugs/243519-5b.html
new file mode 100644
index 0000000000..82c2097c0e
--- /dev/null
+++ b/layout/reftests/bugs/243519-5b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:absolute; width:100px; height:100px; display:table;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-5c.html b/layout/reftests/bugs/243519-5c.html
new file mode 100644
index 0000000000..51b1f03ac2
--- /dev/null
+++ b/layout/reftests/bugs/243519-5c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:fixed; width:100px; height:100px;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-5d.html b/layout/reftests/bugs/243519-5d.html
new file mode 100644
index 0000000000..07f72a81ca
--- /dev/null
+++ b/layout/reftests/bugs/243519-5d.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html style="position:fixed; width:100px; height:100px; display:table;
+ background:yellow; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-6-ref.html b/layout/reftests/bugs/243519-6-ref.html
new file mode 100644
index 0000000000..52b8dd3a5c
--- /dev/null
+++ b/layout/reftests/bugs/243519-6-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head>
+<style>
+div { margin:10px; border:20px solid black; padding:30px; height:4in; position:absolute; }
+body { margin:0; }
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-6.html b/layout/reftests/bugs/243519-6.html
new file mode 100644
index 0000000000..ea764eb4fd
--- /dev/null
+++ b/layout/reftests/bugs/243519-6.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head>
+<style>
+html { margin:10px; border:20px solid black; padding:30px; height:4in; position:absolute; }
+body { margin:0; }
+</style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-7-ref.html b/layout/reftests/bugs/243519-7-ref.html
new file mode 100644
index 0000000000..7c7f5b3294
--- /dev/null
+++ b/layout/reftests/bugs/243519-7-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="margin:0;">
+<div style="position:relative; top:100px; left:100px; height:100px; border:10px solid black;">
+ <div style="position:absolute; bottom:0; height:30px; border:10px solid orange;">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-7.html b/layout/reftests/bugs/243519-7.html
new file mode 100644
index 0000000000..bab64890a4
--- /dev/null
+++ b/layout/reftests/bugs/243519-7.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html style="position:relative; top:100px; left:100px; height:100px; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body style="position:absolute; margin:0; bottom:0; height:30px; border:10px solid orange;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-8-ref.svg b/layout/reftests/bugs/243519-8-ref.svg
new file mode 100644
index 0000000000..59c155243d
--- /dev/null
+++ b/layout/reftests/bugs/243519-8-ref.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect fill="lime" x="100" y="100" width="100" height="100"/>
+</svg>
diff --git a/layout/reftests/bugs/243519-8.svg b/layout/reftests/bugs/243519-8.svg
new file mode 100644
index 0000000000..d9bdae23e1
--- /dev/null
+++ b/layout/reftests/bugs/243519-8.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" style="position:absolute; left:100px; top:100px; overflow:hidden;">
+ <rect fill="lime" width="100" height="100"/>
+</svg>
diff --git a/layout/reftests/bugs/243519-9-ref.html b/layout/reftests/bugs/243519-9-ref.html
new file mode 100644
index 0000000000..472c95bcec
--- /dev/null
+++ b/layout/reftests/bugs/243519-9-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="margin:0">
+<div style="position:fixed; width:50%; height:50%; left:50px; top:50px; border:10px solid black;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-9a.html b/layout/reftests/bugs/243519-9a.html
new file mode 100644
index 0000000000..29fc600e94
--- /dev/null
+++ b/layout/reftests/bugs/243519-9a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html style="width:50%; height:50%; margin:50px; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+</html>
diff --git a/layout/reftests/bugs/243519-9b.html b/layout/reftests/bugs/243519-9b.html
new file mode 100644
index 0000000000..8a80a5e1d9
--- /dev/null
+++ b/layout/reftests/bugs/243519-9b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html style="position:absolute; left:50px; top:50px; width:50%; height:50%; border:10px solid black;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+</html>
diff --git a/layout/reftests/bugs/243519-9c.html b/layout/reftests/bugs/243519-9c.html
new file mode 100644
index 0000000000..4b7e9fe06b
--- /dev/null
+++ b/layout/reftests/bugs/243519-9c.html
@@ -0,0 +1,2 @@
+<html style="width:50%; height:50%; margin:50px; border:10px solid black;">
+</html>
diff --git a/layout/reftests/bugs/243519-9d.html b/layout/reftests/bugs/243519-9d.html
new file mode 100644
index 0000000000..6f9c2e6ea3
--- /dev/null
+++ b/layout/reftests/bugs/243519-9d.html
@@ -0,0 +1,2 @@
+<html style="position:absolute; left:50px; top:50px; width:50%; height:50%; border:10px solid black;">
+</html>
diff --git a/layout/reftests/bugs/243519-9e.html b/layout/reftests/bugs/243519-9e.html
new file mode 100644
index 0000000000..e72bc85d49
--- /dev/null
+++ b/layout/reftests/bugs/243519-9e.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body style="position:absolute; width:50%; height:50%; top:50px; left:50px; margin:0; border:10px solid black;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/243519-9f.html b/layout/reftests/bugs/243519-9f.html
new file mode 100644
index 0000000000..be7a471c75
--- /dev/null
+++ b/layout/reftests/bugs/243519-9f.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html style="position:relative; height:50%;">
+<title>CSS 2.1 Test Suite: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." />
+<meta name="flags" content="" />
+<body style="position:absolute; width:50%; top:50px; left:50px; height:100%; margin:0; border:10px solid black;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/244135-1-ref.html b/layout/reftests/bugs/244135-1-ref.html
new file mode 100644
index 0000000000..ba0210554f
--- /dev/null
+++ b/layout/reftests/bugs/244135-1-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>http://bugzilla.mozilla.org/show_bug.cgi?id=244135</title>
+<style type="text/css">
+table { border-collapse: collapse; background-color:#c0c0c0; }
+</style>
+</head>
+<body>
+<table border="1">
+<tbody>
+<tr>
+<td rowspan="4">td rowspan=4</td>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+</tbody>
diff --git a/layout/reftests/bugs/244135-1.html b/layout/reftests/bugs/244135-1.html
new file mode 100644
index 0000000000..e971f41ea6
--- /dev/null
+++ b/layout/reftests/bugs/244135-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>http://bugzilla.mozilla.org/show_bug.cgi?id=244135</title>
+<style type="text/css">
+table { border-collapse: collapse; background-color:#c0c0c0; }
+</style>
+</head>
+<body>
+<table border="1">
+<tbody>
+<tr>
+<td rowspan="4">td rowspan=4</td>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+<script type="text/javascript">var v = document.body.offsetHeight;</script>
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text</td>
+</tr>
+</tbody>
diff --git a/layout/reftests/bugs/244135-2-ref.html b/layout/reftests/bugs/244135-2-ref.html
new file mode 100644
index 0000000000..754c98a8f1
--- /dev/null
+++ b/layout/reftests/bugs/244135-2-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>http://bugzilla.mozilla.org/show_bug.cgi?id=244135</title>
+<style type="text/css">
+table { border-collapse: collapse; }
+</style>
+</head>
+<body>
+<table border="1">
+<tbody>
+<tr>
+ <td>text</td>
+ <td>text</td>
+ <td>text</td>
+ <td>text</td>
+</tr>
+<tr>
+<td rowspan="4">td rowspan=4</td>
+<td>text</td>
+<td>text</td>
+<td>text
+</td>
+</tr>
+<tr>
+<td>text</td>
+
+<td>text</td>
+<td>text
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+
+
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+</td>
+</tr>
+</tbody>
diff --git a/layout/reftests/bugs/244135-2.html b/layout/reftests/bugs/244135-2.html
new file mode 100644
index 0000000000..1352d61985
--- /dev/null
+++ b/layout/reftests/bugs/244135-2.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>http://bugzilla.mozilla.org/show_bug.cgi?id=244135</title>
+<style type="text/css">
+table { border-collapse: collapse; }
+</style>
+</head>
+<body>
+<table border="1">
+<tbody>
+<tr>
+ <td>text</td>
+ <td>text</td>
+ <td>text</td>
+ <td>text</td>
+</tr>
+<tr>
+<td rowspan="4">td rowspan=4</td>
+<td>text</td>
+<td>text</td>
+<td>text
+<script type="text/javascript">var v = document.body.offsetHeight;</script>
+</td>
+</tr>
+<tr>
+<td>text</td>
+
+<td>text</td>
+<td>text
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+
+
+</td>
+</tr>
+<tr>
+<td>text</td>
+<td>text</td>
+<td>text
+</td>
+</tr>
+</tbody>
diff --git a/layout/reftests/bugs/244932-1-ref.html b/layout/reftests/bugs/244932-1-ref.html
new file mode 100644
index 0000000000..8b6cd22168
--- /dev/null
+++ b/layout/reftests/bugs/244932-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 244932 Reference</title>
+</head>
+<body>
+<table style="border-collapse: collapse" cellpadding=0>
+ <tr>
+ <td width="100%" valign="top"><br><hr size="1"></td>
+ <td><div style="width: 20em; height: 4em; border: 2px solid green"></div></td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/244932-1.html b/layout/reftests/bugs/244932-1.html
new file mode 100644
index 0000000000..bacf822056
--- /dev/null
+++ b/layout/reftests/bugs/244932-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 244932</title>
+</head>
+<body>
+<div style="float: right; width: 20em; height: 4em; border: 2px solid green"></div>
+<br><hr size="1">
+</body>
+</html>
diff --git a/layout/reftests/bugs/246669-1-ref.html b/layout/reftests/bugs/246669-1-ref.html
new file mode 100644
index 0000000000..615d527e85
--- /dev/null
+++ b/layout/reftests/bugs/246669-1-ref.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+div div {
+ float: left;
+ width: 200px;
+ border: 2px solid #000;
+}
+</style>
+</head>
+<body>
+<div>
+ <div>First float</div>
+ <div>Second float</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/246669-1.html b/layout/reftests/bugs/246669-1.html
new file mode 100644
index 0000000000..a091deecc3
--- /dev/null
+++ b/layout/reftests/bugs/246669-1.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+div {
+ display: table;
+}
+div div {
+ float: left;
+ width: 200px;
+ border: 2px solid #000;
+}
+</style>
+</head>
+<body>
+<div>
+ <div>First float</div>
+ <script type="text/javascript">b=document.body.offsetHeight;</script>
+ <div>Second float</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/24998-1-ref.html b/layout/reftests/bugs/24998-1-ref.html
new file mode 100644
index 0000000000..d9b6a74fd8
--- /dev/null
+++ b/layout/reftests/bugs/24998-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>border-radius background image clipping (bug 24998)</title>
+ <style type="text/css">
+ div {
+ height: 100px;
+ width: 100px;
+ background-color: #0000ff;
+ }
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/24998-1.html b/layout/reftests/bugs/24998-1.html
new file mode 100644
index 0000000000..6a0ab583bc
--- /dev/null
+++ b/layout/reftests/bugs/24998-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>border-radius background image clipping (bug 24998)</title>
+ <style type="text/css">
+ div {
+ height: 100px;
+ width: 100px;
+ border-radius: 100px;
+ /* this must be bigger than 1x1 */
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACEAIAAACtREYwAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAACAAAAAgBqLH6AAAAAGUlEQVQI12NkYGBg+P+fgYGBgYGBiQEJAAApJQICMg0uAAAAAABJRU5ErkJggg==);
+ }
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/249982-1-ref.html b/layout/reftests/bugs/249982-1-ref.html
new file mode 100644
index 0000000000..485a6813ef
--- /dev/null
+++ b/layout/reftests/bugs/249982-1-ref.html
@@ -0,0 +1,11 @@
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <title>Bug 249982 Reference</title>
+</head>
+<body>
+<div style="font-size: 4em; width: 10em; color: lime; background: green">
+ <span style="color: red; float: right; margin-right: 4em">xx</span>xx
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/249982-1.html b/layout/reftests/bugs/249982-1.html
new file mode 100644
index 0000000000..d9c689d1f4
--- /dev/null
+++ b/layout/reftests/bugs/249982-1.html
@@ -0,0 +1,11 @@
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <title>Bug 249982</title>
+</head>
+<body>
+<div style="font-size: 4em; width: 10em; color: lime; background: green">
+ <span style="color: red; float: right; margin-right: 40%; width: auto">xx</span>xx
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/252920-1-ref.html b/layout/reftests/bugs/252920-1-ref.html
new file mode 100644
index 0000000000..4493404d21
--- /dev/null
+++ b/layout/reftests/bugs/252920-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+</head>
+<body>
+<table><tr><td style="height:50px;border:1px solid black;">
+ <span><a href="#" id="a">Themes</a></span>
+ <span style="vertical-align: middle;">Link and text shifts when it is focussed<br> </span>
+ <span> </span>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/252920-1.html b/layout/reftests/bugs/252920-1.html
new file mode 100644
index 0000000000..e182dc10fd
--- /dev/null
+++ b/layout/reftests/bugs/252920-1.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+</head>
+<body>
+<table><tr><td style="height:50px;border:1px solid black;">
+ <span><a href="#" id="a">Themes</a></span>
+ <span style="vertical-align: middle;">Link and text shifts when it is focussed<br> </span>
+ <span> </span>
+</td></tr></table>
+<script type="text/javascript">
+document.documentElement.offsetHeight;
+document.getElementById("a").style.outline = "1px solid black";
+document.documentElement.offsetHeight;
+document.getElementById("a").style.outline = "";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/253701-1-ref.html b/layout/reftests/bugs/253701-1-ref.html
new file mode 100644
index 0000000000..653c1bfae8
--- /dev/null
+++ b/layout/reftests/bugs/253701-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 253701 Reference</title>
+</head>
+<body>
+<table>
+ <tr>
+ <td width="100">This text should not all be </td>
+ <td>on one line.</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/253701-1.html b/layout/reftests/bugs/253701-1.html
new file mode 100644
index 0000000000..18ec02b054
--- /dev/null
+++ b/layout/reftests/bugs/253701-1.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 253701</title>
+</head>
+<body>
+<table>
+ <tr>
+ <td width="10">This text should not all be </td>
+ <td>on one line.</td>
+ </tr>
+ <tr>
+ <td width="100">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/255820-1-ref.html b/layout/reftests/bugs/255820-1-ref.html
new file mode 100644
index 0000000000..98f550633d
--- /dev/null
+++ b/layout/reftests/bugs/255820-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=us-ascii">
+</head>
+<body>
+ <iframe width="400" height="400" src="data:application/xhtml+xml;charset=us-ascii,<html xmlns='http://www.w3.org/1999/xhtml'><h1>Test</h1></html>"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/255820-1.html b/layout/reftests/bugs/255820-1.html
new file mode 100644
index 0000000000..560083ae21
--- /dev/null
+++ b/layout/reftests/bugs/255820-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=us-ascii">
+</head>
+<body>
+ <iframe width="400" height="400" src="data:application/xhtml+xml;charset=UTF-16LE,<%00h%00t%00m%00l%00 %00x%00m%00l%00n%00s%00=%00'%00h%00t%00t%00p%00:%00/%00/%00w%00w%00w%00.%00w%003%00.%00o%00r%00g%00/%001%009%009%009%00/%00x%00h%00t%00m%00l%00'%00>%00<%00h%001%00>%00T%00e%00s%00t%00<%00/%00h%001%00>%00<%00/%00h%00t%00m%00l%00>%00"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-1-ref.html b/layout/reftests/bugs/256180-1-ref.html
new file mode 100644
index 0000000000..c69c534509
--- /dev/null
+++ b/layout/reftests/bugs/256180-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>1026-deep display: table-cell</title>
+</head>
+<body>
+<h1>1026-element-deep display: table-cell</h1>
+<p>Actual depth (including text leaves): 1027
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-1.html b/layout/reftests/bugs/256180-1.html
new file mode 100644
index 0000000000..82c1bf4bb4
--- /dev/null
+++ b/layout/reftests/bugs/256180-1.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>1026-element-deep display: table-cell</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+function deep() {
+ var t = document.createTextNode("PASS");
+ var div = document.createElement("div");
+ div.appendChild(t);
+ for (var i = 0; i < 1023; i++) {
+ var another = document.createElement("div");
+ another.appendChild(div);
+ div = another;
+ }
+ document.body.appendChild(div);
+ count();
+}
+
+window.addEventListener('DOMContentLoaded', deep, false);
+</script>
+<style>
+ div {
+ display: table-cell;
+ }
+</style>
+</head>
+<body>
+<h1>1026-element-deep display: table-cell</h1>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-2-ref.html b/layout/reftests/bugs/256180-2-ref.html
new file mode 100644
index 0000000000..544d7ef5c2
--- /dev/null
+++ b/layout/reftests/bugs/256180-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>585-deep display: table-cell</title>
+</head>
+<body>
+<h1>585-element-deep display: table-cell</h1>
+<p>Actual depth (including text leaves): 586
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-2.html b/layout/reftests/bugs/256180-2.html
new file mode 100644
index 0000000000..1887379364
--- /dev/null
+++ b/layout/reftests/bugs/256180-2.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>585-element-deep display: table-cell</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+function deep() {
+ var t = document.createTextNode("PASS");
+ var div = document.createElement("div");
+ div.appendChild(t);
+ for (var i = 0; i < 582; i++) {
+ var another = document.createElement("div");
+ another.appendChild(div);
+ div = another;
+ }
+ document.body.appendChild(div);
+ count();
+}
+
+window.addEventListener('DOMContentLoaded', deep, false);
+</script>
+<style>
+ div {
+ display: table-cell;
+ }
+</style>
+</head>
+<body>
+<h1>585-element-deep display: table-cell</h1>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-3-ref.html b/layout/reftests/bugs/256180-3-ref.html
new file mode 100644
index 0000000000..d5bec52117
--- /dev/null
+++ b/layout/reftests/bugs/256180-3-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>1026-deep display: block</title>
+</head>
+<body>
+<h1>1026-element-deep display: block</h1>
+<p>Actual depth (including text leaves): 1027
+<div>PASS</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-3.html b/layout/reftests/bugs/256180-3.html
new file mode 100644
index 0000000000..8b0d6e8c65
--- /dev/null
+++ b/layout/reftests/bugs/256180-3.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>1026-element-deep display: block</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+function deep() {
+ var t = document.createTextNode("PASS");
+ var div = document.createElement("div");
+ div.appendChild(t);
+ for (var i = 0; i < 1023; i++) {
+ var another = document.createElement("div");
+ another.appendChild(div);
+ div = another;
+ }
+ document.body.appendChild(div);
+ count();
+}
+
+window.addEventListener('DOMContentLoaded', deep, false);
+</script>
+</head>
+<body>
+<h1>1026-element-deep display: block</h1>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-4-ref.html b/layout/reftests/bugs/256180-4-ref.html
new file mode 100644
index 0000000000..5b957e3e61
--- /dev/null
+++ b/layout/reftests/bugs/256180-4-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>585-deep display: block</title>
+</head>
+<body>
+<h1>585-element-deep display: block</h1>
+<p>Actual depth (including text leaves): 586
+<div>PASS</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-4.html b/layout/reftests/bugs/256180-4.html
new file mode 100644
index 0000000000..eabe43ada6
--- /dev/null
+++ b/layout/reftests/bugs/256180-4.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>585-element-deep display: block</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+function deep() {
+ var t = document.createTextNode("PASS");
+ var div = document.createElement("div");
+ div.appendChild(t);
+ for (var i = 0; i < 582; i++) {
+ var another = document.createElement("div");
+ another.appendChild(div);
+ div = another;
+ }
+ document.body.appendChild(div);
+ count();
+}
+
+window.addEventListener('DOMContentLoaded', deep, false);
+</script>
+</head>
+<body>
+<h1>585-element-deep display: block</h1>
+</body>
+</html>
diff --git a/layout/reftests/bugs/256180-5-ref.html b/layout/reftests/bugs/256180-5-ref.html
new file mode 100644
index 0000000000..7227bce3ed
--- /dev/null
+++ b/layout/reftests/bugs/256180-5-ref.html
@@ -0,0 +1,2004 @@
+<!DOCTYPE html><meta charset=utf-8><title>&lt;font&gt; with alternating attributes and a character between each tag 4000</title>
+<h1>&lt;font&gt; with alternating attributes and a character between each tag 4000</h1>
+<p>Actual depth (including text leaves): 514</p>
+z<font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x<font color="#000000">
+PASS</font>
diff --git a/layout/reftests/bugs/256180-5.html b/layout/reftests/bugs/256180-5.html
new file mode 100644
index 0000000000..9fffc05dcf
--- /dev/null
+++ b/layout/reftests/bugs/256180-5.html
@@ -0,0 +1,2042 @@
+<!DOCTYPE html><meta charset=utf-8><title>&lt;font&gt; with alternating attributes and a character between each tag 4000</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+window.addEventListener('DOMContentLoaded', count, false);
+</script>
+<h1>&lt;font&gt; with alternating attributes and a character between each tag 4000</h1>z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+z<font color="#FF0000">x<font color="#000000">
+PASS
diff --git a/layout/reftests/bugs/256180-6-ref.html b/layout/reftests/bugs/256180-6-ref.html
new file mode 100644
index 0000000000..e7c01b3e72
--- /dev/null
+++ b/layout/reftests/bugs/256180-6-ref.html
@@ -0,0 +1,2004 @@
+<!DOCTYPE html><meta charset=utf-8><title>&lt;font&gt; with alternating attributes and a character between each tag 4000 in innerHTML inside 20 divs</title>
+<h1>&lt;font&gt; with alternating attributes and a character between each tag 4000 in innerHTML inside 20 divs</h1>
+<p>Actual depth (including text leaves): 535</p>
+z<font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x</font>
+<font color="#000000">z</font><font color="#FF0000">x<font color="#000000">
+PASS</font>
diff --git a/layout/reftests/bugs/256180-6.html b/layout/reftests/bugs/256180-6.html
new file mode 100644
index 0000000000..b8d67316d2
--- /dev/null
+++ b/layout/reftests/bugs/256180-6.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html><meta charset=utf-8><title>&lt;font&gt; with alternating attributes and a character between each tag 4000 in innerHTML inside 20 divs</title>
+<script>
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+function count() {
+ var depth = 0;
+ var deepest = 0;
+ var current = document;
+ var next = null;
+ outer: for (;;) {
+ if ((next = current.firstChild)) {
+ depth++;
+ if (depth > deepest) {
+ deepest = depth;
+ }
+ current = next;
+ continue;
+ }
+ for (;;) {
+ if ((next = current.nextSibling)) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ depth--;
+ if (current == document) {
+ break outer;
+ }
+ }
+ }
+
+ var h1 = document.getElementsByTagName("h1")[0];
+ var p = document.createElement("p");
+ var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
+ p.appendChild(t);
+ h1.parentNode.insertBefore(p, h1.nextSibling);
+}
+
+function insert() {
+ document.getElementById("innermost").innerHTML = 'z<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nz<font color="#FF0000">x<font color="#000000">\nPASS\n';
+ count();
+}
+
+window.addEventListener('DOMContentLoaded', insert, false);
+</script>
+<h1>&lt;font&gt; with alternating attributes and a character between each tag 4000 in innerHTML inside 20 divs</h1>
+<div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div id=innermost></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
diff --git a/layout/reftests/bugs/25888-1l-block.html b/layout/reftests/bugs/25888-1l-block.html
new file mode 100644
index 0000000000..ca8b078ecc
--- /dev/null
+++ b/layout/reftests/bugs/25888-1l-block.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+div { float: left; clear: left; }
+span { display: block; overflow: hidden; width: 200px; height: 50px; background: aqua; margin-right: auto; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 75px;"></div>
+<div style="width: 100px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1l-notref.html b/layout/reftests/bugs/25888-1l-notref.html
new file mode 100644
index 0000000000..24e02ab7e4
--- /dev/null
+++ b/layout/reftests/bugs/25888-1l-notref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: left; }
+div { float: left; clear: left; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 50px;"></div>
+<div style="width: 50px; height: 100px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1l-ref.html b/layout/reftests/bugs/25888-1l-ref.html
new file mode 100644
index 0000000000..521b9844dd
--- /dev/null
+++ b/layout/reftests/bugs/25888-1l-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: left; }
+div { float: left; clear: left; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 50px;"></div>
+<div style="width: 100px; height: 100px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1l.html b/layout/reftests/bugs/25888-1l.html
new file mode 100644
index 0000000000..8a0b7cd628
--- /dev/null
+++ b/layout/reftests/bugs/25888-1l.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: left; }
+div { float: left; clear: left; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 75px;"></div>
+<div style="width: 100px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1r-block.html b/layout/reftests/bugs/25888-1r-block.html
new file mode 100644
index 0000000000..9493272dfc
--- /dev/null
+++ b/layout/reftests/bugs/25888-1r-block.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+div { float: right; clear: right; }
+span { display: block; overflow: hidden; width: 200px; height: 50px; background: aqua; margin-left: auto; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 75px;"></div>
+<div style="width: 100px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1r-notref.html b/layout/reftests/bugs/25888-1r-notref.html
new file mode 100644
index 0000000000..c7d777e4d5
--- /dev/null
+++ b/layout/reftests/bugs/25888-1r-notref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: right; }
+div { float: right; clear: right; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 50px;"></div>
+<div style="width: 50px; height: 100px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1r-ref.html b/layout/reftests/bugs/25888-1r-ref.html
new file mode 100644
index 0000000000..47cb800f49
--- /dev/null
+++ b/layout/reftests/bugs/25888-1r-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: right; }
+div { float: right; clear: right; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 50px;"></div>
+<div style="width: 100px; height: 100px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-1r.html b/layout/reftests/bugs/25888-1r.html
new file mode 100644
index 0000000000..e72db69754
--- /dev/null
+++ b/layout/reftests/bugs/25888-1r.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; text-align: right; }
+div { float: right; clear: right; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="width: 50px; height: 75px;"></div>
+<div style="width: 100px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2l-block.html b/layout/reftests/bugs/25888-2l-block.html
new file mode 100644
index 0000000000..97064984c1
--- /dev/null
+++ b/layout/reftests/bugs/25888-2l-block.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: block; overflow: hidden; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 150px; height: 75px;"></div>
+<div style="float: right; width: 300px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2l-ref.html b/layout/reftests/bugs/25888-2l-ref.html
new file mode 100644
index 0000000000..3c50f1a1ef
--- /dev/null
+++ b/layout/reftests/bugs/25888-2l-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 150px; height: 25px;"></div>
+<span></span>
+<div style="height: 100px"></div>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2l.html b/layout/reftests/bugs/25888-2l.html
new file mode 100644
index 0000000000..78d8468d31
--- /dev/null
+++ b/layout/reftests/bugs/25888-2l.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 150px; height: 75px;"></div>
+<div style="float: right; width: 300px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2r-block.html b/layout/reftests/bugs/25888-2r-block.html
new file mode 100644
index 0000000000..d306c0d3ad
--- /dev/null
+++ b/layout/reftests/bugs/25888-2r-block.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: block; overflow: hidden; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 150px; height: 75px;"></div>
+<div style="float: left; width: 300px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2r-ref.html b/layout/reftests/bugs/25888-2r-ref.html
new file mode 100644
index 0000000000..98bbec4e1e
--- /dev/null
+++ b/layout/reftests/bugs/25888-2r-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 150px; height: 25px;"></div>
+<span></span>
+<div style="height: 100px"></div>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-2r.html b/layout/reftests/bugs/25888-2r.html
new file mode 100644
index 0000000000..3e08ee0fbe
--- /dev/null
+++ b/layout/reftests/bugs/25888-2r.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 200px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 150px; height: 75px;"></div>
+<div style="float: left; width: 300px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3l-block.html b/layout/reftests/bugs/25888-3l-block.html
new file mode 100644
index 0000000000..05ec2bb456
--- /dev/null
+++ b/layout/reftests/bugs/25888-3l-block.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: block; overflow: hidden; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 250px; height: 75px;"></div>
+<div style="float: right; width: 250px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3l-ref.html b/layout/reftests/bugs/25888-3l-ref.html
new file mode 100644
index 0000000000..91323f05ed
--- /dev/null
+++ b/layout/reftests/bugs/25888-3l-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 250px; height: 25px;"></div>
+<span></span>
+<span style="margin-top: 25px; margin-right: 250px"></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3l.html b/layout/reftests/bugs/25888-3l.html
new file mode 100644
index 0000000000..d50f370b4b
--- /dev/null
+++ b/layout/reftests/bugs/25888-3l.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: left; width: 250px; height: 75px;"></div>
+<div style="float: right; width: 250px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3r-block.html b/layout/reftests/bugs/25888-3r-block.html
new file mode 100644
index 0000000000..907287b382
--- /dev/null
+++ b/layout/reftests/bugs/25888-3r-block.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: block; overflow: hidden; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 250px; height: 75px;"></div>
+<div style="float: left; width: 250px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3r-ref.html b/layout/reftests/bugs/25888-3r-ref.html
new file mode 100644
index 0000000000..2dec89782d
--- /dev/null
+++ b/layout/reftests/bugs/25888-3r-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 250px; height: 25px;"></div>
+<span></span>
+<span style="margin-top: 25px; margin-left: 250px"></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/25888-3r.html b/layout/reftests/bugs/25888-3r.html
new file mode 100644
index 0000000000..dd599a84ec
--- /dev/null
+++ b/layout/reftests/bugs/25888-3r.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for wrapping around floats whose top is below the top of what must wrap around them</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" />
+<meta name="assert" content="However, line boxes created next to the float are shortened to make room for the margin box of the float." />
+<meta name="flags" content="" />
+<style type="text/css">
+
+body { width: 400px; border: medium solid; }
+span { display: inline-block; vertical-align: top; width: 100px; height: 50px; background: aqua; }
+
+</style>
+</head>
+<body>
+
+<div style="float: right; width: 250px; height: 75px;"></div>
+<div style="float: left; width: 250px; height: 75px;"></div>
+<span></span>
+<span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/260406-1-ref.html b/layout/reftests/bugs/260406-1-ref.html
new file mode 100644
index 0000000000..f351341a86
--- /dev/null
+++ b/layout/reftests/bugs/260406-1-ref.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<style type="text/css">
+ .forms {display:inline;}
+ .nn2{background-image: url("260406.gif");width:20px;height:18px;}
+</style>
+</head>
+<body>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>P</td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="nn2"></td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/260406-1.html b/layout/reftests/bugs/260406-1.html
new file mode 100644
index 0000000000..497b3278b6
--- /dev/null
+++ b/layout/reftests/bugs/260406-1.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<style type="text/css">
+ .forms {display:inline;}
+ .nn2{background-image: url("260406.gif");width:20px;height:18px;}
+</style>
+</head>
+<body>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="forms">P</td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="nn2"></td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/260406.gif b/layout/reftests/bugs/260406.gif
new file mode 100644
index 0000000000..5d0a77dc55
--- /dev/null
+++ b/layout/reftests/bugs/260406.gif
Binary files differ
diff --git a/layout/reftests/bugs/261826-1-ref.xhtml b/layout/reftests/bugs/261826-1-ref.xhtml
new file mode 100644
index 0000000000..4ec5df5155
--- /dev/null
+++ b/layout/reftests/bugs/261826-1-ref.xhtml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window id="MyWindow"
+ title=""
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ width="800"
+ height="600">
+
+<tabbox>
+ <tabs>
+ <tab label="first"/>
+ <tab label="second"/>
+ <tab label="third"/>
+ <tab label="fourth"/>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <label value="First page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="second page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="third page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="fourth page"/>
+ </tabpanel>
+ </tabpanels>
+</tabbox>
+</window>
diff --git a/layout/reftests/bugs/261826-1.xhtml b/layout/reftests/bugs/261826-1.xhtml
new file mode 100644
index 0000000000..649b2cb6ba
--- /dev/null
+++ b/layout/reftests/bugs/261826-1.xhtml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window id="MyWindow"
+ title=""
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ width="800"
+ height="600"
+ onload="revealTab()">
+
+<script type="application/x-javascript">
+ function revealTab(){
+ document.getElementById("fourthTab").setAttribute("hidden", "false");
+ }
+</script>
+
+<tabbox>
+ <tabs>
+ <tab label="first"/>
+ <tab label="second"/>
+ <tab label="third"/>
+ <tab id="fourthTab" label="fourth" hidden="true"/>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <label value="First page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="second page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="third page"/>
+ </tabpanel>
+ <tabpanel>
+ <label value="fourth page"/>
+ </tabpanel>
+ </tabpanels>
+</tabbox>
+</window>
diff --git a/layout/reftests/bugs/262151-1-ref.html b/layout/reftests/bugs/262151-1-ref.html
new file mode 100644
index 0000000000..c3450685c6
--- /dev/null
+++ b/layout/reftests/bugs/262151-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 262151 Reference</title>
+</head>
+<body style="text-align: right; font-size: 16px;">
+<span>This text should all </span><span>be on one line.</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/262151-1.html b/layout/reftests/bugs/262151-1.html
new file mode 100644
index 0000000000..f47cd25187
--- /dev/null
+++ b/layout/reftests/bugs/262151-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 262151</title>
+ <style type="text/css">table {border-collapse: collapse} td {padding: 0px}</style>
+</head>
+<body style="font-size: 16px;">
+<table width="100%">
+ <tr>
+ <td><div style="width: 20em"></div></td>
+ <td>
+ <table align="right">
+ <tr><td>This text should all <script type="text/javascript">var v = document.body.offsetHeight;</script>be on one line.</td></tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/262998-1-ref.html b/layout/reftests/bugs/262998-1-ref.html
new file mode 100644
index 0000000000..3cebe6f020
--- /dev/null
+++ b/layout/reftests/bugs/262998-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <iframe src="data:text/html,<body style='font-weight: bold; text-align: center'>This is a test</body>"></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/262998-1.html b/layout/reftests/bugs/262998-1.html
new file mode 100644
index 0000000000..79eccd7ff7
--- /dev/null
+++ b/layout/reftests/bugs/262998-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body onload="setTimeout(doTest,0);">
+
+<iframe id="edit" style="display:none;" src=""></iframe>
+
+<script>
+ var x=document.getElementById('edit');
+ function doTest(){
+ x.style.display='block';
+ x.contentDocument.body.innerHTML="This is a test";
+ x.contentDocument.designMode='on';
+ x.contentDocument.execCommand("selectAll", false, "");
+ x.contentDocument.execCommand("bold", false, "");
+ x.contentDocument.execCommand("justifyCenter", false, "");
+ x.contentWindow.getSelection().removeAllRanges();
+ document.documentElement.className = "";
+ }
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/267353-1-ref.html b/layout/reftests/bugs/267353-1-ref.html
new file mode 100644
index 0000000000..53a571eaa4
--- /dev/null
+++ b/layout/reftests/bugs/267353-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 267353 Reference</title>
+ <style type="text/css">table {border-collapse: collapse} td {padding: 0px}</style>
+</head>
+<body>
+<table style="background: #DDDDDD; width: 25em">
+ <tr><td>
+ <table><tr>
+ <td><div style="background: blue; width: 5em">&nbsp;</div></td>
+ <td width="100%" valign="top"><hr size="1"/></td>
+ </tr></table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/267353-1.html b/layout/reftests/bugs/267353-1.html
new file mode 100644
index 0000000000..c6cf17e7af
--- /dev/null
+++ b/layout/reftests/bugs/267353-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 267353</title>
+</head>
+<body>
+<table style="background: #DDDDDD; width: 25em; border-collapse: collapse">
+ <tr><td style="padding: 0px">
+ <div style="float:left; background: blue; width: 5em">&nbsp;</div>
+ <hr align="right" size="1"/>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-1-ref.html b/layout/reftests/bugs/269908-1-ref.html
new file mode 100644
index 0000000000..38cccd6ec8
--- /dev/null
+++ b/layout/reftests/bugs/269908-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<div style="float: left; display: block; padding-left: 0px; padding-right: 0px;">test</div>
+</fieldset>
+<fieldset>
+<div style="float: right; display: block; padding-left: 0px; padding-right: 0px;">test</div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-1.html b/layout/reftests/bugs/269908-1.html
new file mode 100644
index 0000000000..2578eac89a
--- /dev/null
+++ b/layout/reftests/bugs/269908-1.html
@@ -0,0 +1,11 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<legend style="float: left; padding-left: 0px; padding-right: 0px;">test</legend>
+</fieldset>
+<fieldset>
+<legend style="float: right; padding-left: 0px; padding-right: 0px;">test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-2-ref.html b/layout/reftests/bugs/269908-2-ref.html
new file mode 100644
index 0000000000..3a986102eb
--- /dev/null
+++ b/layout/reftests/bugs/269908-2-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset style="position: relative">
+<div style="position: absolute; top 15px; left: 22px; display: block; padding-left: 0px; padding-right: 0px;">test</div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-2.html b/layout/reftests/bugs/269908-2.html
new file mode 100644
index 0000000000..90ceea356d
--- /dev/null
+++ b/layout/reftests/bugs/269908-2.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset style="position: relative">
+<legend style="position: absolute; top 15px; left: 22px; padding-left: 0px; padding-right: 0px;">test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-3-ref.html b/layout/reftests/bugs/269908-3-ref.html
new file mode 100644
index 0000000000..114c58bff6
--- /dev/null
+++ b/layout/reftests/bugs/269908-3-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<div style="position: absolute; top 17px; left: 19px; display: block; padding-left: 0px; padding-right: 0px;">test</div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-3.html b/layout/reftests/bugs/269908-3.html
new file mode 100644
index 0000000000..6d36ac1693
--- /dev/null
+++ b/layout/reftests/bugs/269908-3.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<legend style="position: absolute; top 17px; left: 19px; padding-left: 0px; padding-right: 0px;">test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-4-ref.html b/layout/reftests/bugs/269908-4-ref.html
new file mode 100644
index 0000000000..58f6ccffef
--- /dev/null
+++ b/layout/reftests/bugs/269908-4-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<div style="position: fixed; top 21px; left: 13px; display: block; padding-left: 0px; padding-right: 0px;">test</div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-4.html b/layout/reftests/bugs/269908-4.html
new file mode 100644
index 0000000000..cfa207ac54
--- /dev/null
+++ b/layout/reftests/bugs/269908-4.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<legend style="position: fixed; top 21px; left: 13px; padding-left: 0px; padding-right: 0px;">test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-5-ref.html b/layout/reftests/bugs/269908-5-ref.html
new file mode 100644
index 0000000000..03a7a816d7
--- /dev/null
+++ b/layout/reftests/bugs/269908-5-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<legend>test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/269908-5.html b/layout/reftests/bugs/269908-5.html
new file mode 100644
index 0000000000..a8bf121e5a
--- /dev/null
+++ b/layout/reftests/bugs/269908-5.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<fieldset>
+<legend style="width: auto;">test</legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/271747-1-ref.html b/layout/reftests/bugs/271747-1-ref.html
new file mode 100644
index 0000000000..e30c7d1f56
--- /dev/null
+++ b/layout/reftests/bugs/271747-1-ref.html
@@ -0,0 +1,21 @@
+<html><head>
+<title>Bug 271747 – Width in table cells in bottom row sometimes ignored</title>
+<style>
+td{background-color:green;}
+tr{height:100px;}
+</style>
+</head>
+<body>
+<table cellpadding="0"><tbody>
+<tr>
+ <td></td>
+ <td>
+
+ </td>
+</tr>
+<tr>
+ <td width="100"></td>
+ <td width="500"></td>
+</tr>
+</tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/271747-1a.html b/layout/reftests/bugs/271747-1a.html
new file mode 100644
index 0000000000..3e9668b611
--- /dev/null
+++ b/layout/reftests/bugs/271747-1a.html
@@ -0,0 +1,21 @@
+<html><head>
+<title>Bug 271747 – Width in table cells in bottom row sometimes ignored</title>
+<style>
+td{background-color:green;}
+tr{height:100px;}
+</style>
+</head>
+<body>
+<table cellpadding="0"><tbody>
+<tr>
+ <td></td>
+ <td>
+ <script>var x=document.body.offsetHeight;</script>
+ </td>
+</tr>
+<tr>
+ <td width="100"></td>
+ <td width="500"></td>
+</tr>
+</tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/271747-1b.html b/layout/reftests/bugs/271747-1b.html
new file mode 100644
index 0000000000..db31e8524b
--- /dev/null
+++ b/layout/reftests/bugs/271747-1b.html
@@ -0,0 +1,21 @@
+<html><head>
+<title>Bug 271747 – Width in table cells in bottom row sometimes ignored</title>
+<style>
+td{background-color:green;}
+tr{height:100px;}
+</style>
+</head>
+<body>
+<table cellpadding="0"><tbody>
+<tr>
+ <td width="100"></td>
+ <td width="100">
+ <script>var x=document.body.offsetHeight;</script>
+ </td>
+</tr>
+<tr>
+ <td width="100"></td>
+ <td width="500"></td>
+</tr>
+</tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/272646-1-ref.xhtml b/layout/reftests/bugs/272646-1-ref.xhtml
new file mode 100644
index 0000000000..7113f56417
--- /dev/null
+++ b/layout/reftests/bugs/272646-1-ref.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:nc="http://home.netscape.com/NC-rdf#"
+ title="insertBefore - Weirdness"
+ >
+<tabbox>
+ <tabs>
+ <tab label="foo" />
+ <tab label="new" />
+ <tab label="bar" />
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <vbox>
+ <label value="foo"/>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <vbox>
+ <label value="bar"/>
+ </vbox>
+ </tabpanel>
+ </tabpanels>
+</tabbox>
+</window>
diff --git a/layout/reftests/bugs/272646-1.xhtml b/layout/reftests/bugs/272646-1.xhtml
new file mode 100644
index 0000000000..940166dbb2
--- /dev/null
+++ b/layout/reftests/bugs/272646-1.xhtml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:nc="http://home.netscape.com/NC-rdf#"
+ title="insertBefore - Weirdness"
+ onload="var atab = document.createXULElement('tab'); atab.setAttribute('label','new'); let tabs = document.getElementById('tabs-id'); tabs.insertBefore(atab,tabs.allTabs[tabs.allTabs.length-1]);" >
+<tabbox>
+ <tabs id="tabs-id">
+ <tab label="foo" />
+ <tab label="bar" />
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <vbox>
+ <label value="foo"/>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <vbox>
+ <label value="bar"/>
+ </vbox>
+ </tabpanel>
+ </tabpanels>
+</tabbox>
+</window>
diff --git a/layout/reftests/bugs/272646-2-ref.xhtml b/layout/reftests/bugs/272646-2-ref.xhtml
new file mode 100644
index 0000000000..3ff3916965
--- /dev/null
+++ b/layout/reftests/bugs/272646-2-ref.xhtml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window id="tab-test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <tabbox id="main_courseframe" flex="1">
+ <tabs id="main_coursetabs" ida-type="gradient">
+ <tab id="main_coursetab_general" label="General" />
+ <tab id="main_coursetab_overview" label="Overview" />
+ <tab id="main_coursetab_extensions" label="Extensions" />
+ </tabs>
+
+ <tabpanels id="main_coursetabpanels" flex="1">
+ <tabpanel id="main_coursetabpanel_general">
+ <label value="this is the general tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_overview">
+ <label value="this is the OVERVIEW tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_extensions">
+ <label value="this is the EXTENSIONS tabpanel" />
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+</window>
diff --git a/layout/reftests/bugs/272646-2a.xhtml b/layout/reftests/bugs/272646-2a.xhtml
new file mode 100644
index 0000000000..43c2b8122c
--- /dev/null
+++ b/layout/reftests/bugs/272646-2a.xhtml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window id="tab-test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="var e =
+ document.getElementById('main_coursetab_extensions'); e.hidden = true;
+ document.documentElement.getBoundingClientRect(); e.hidden = false;">
+ <tabbox id="main_courseframe" flex="1">
+ <tabs id="main_coursetabs" ida-type="gradient">
+ <tab id="main_coursetab_general" label="General" />
+ <tab id="main_coursetab_overview" label="Overview" />
+ <tab id="main_coursetab_extensions" label="Extensions" />
+ </tabs>
+
+ <tabpanels id="main_coursetabpanels" flex="1">
+ <tabpanel id="main_coursetabpanel_general">
+ <label value="this is the general tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_overview">
+ <label value="this is the OVERVIEW tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_extensions">
+ <label value="this is the EXTENSIONS tabpanel" />
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+</window>
diff --git a/layout/reftests/bugs/272646-2b.xhtml b/layout/reftests/bugs/272646-2b.xhtml
new file mode 100644
index 0000000000..10e91a2892
--- /dev/null
+++ b/layout/reftests/bugs/272646-2b.xhtml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window id="tab-test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="var e =
+ document.getElementById('main_coursetab_overview'); e.hidden = true;
+ document.documentElement.getBoundingClientRect(); e.hidden = false;">
+ <tabbox id="main_courseframe" flex="1">
+ <tabs id="main_coursetabs" ida-type="gradient">
+ <tab id="main_coursetab_general" label="General" />
+ <tab id="main_coursetab_overview" label="Overview" />
+ <tab id="main_coursetab_extensions" label="Extensions" />
+ </tabs>
+
+ <tabpanels id="main_coursetabpanels" flex="1">
+ <tabpanel id="main_coursetabpanel_general">
+ <label value="this is the general tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_overview">
+ <label value="this is the OVERVIEW tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_extensions">
+ <label value="this is the EXTENSIONS tabpanel" />
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+</window>
diff --git a/layout/reftests/bugs/272646-2c.xhtml b/layout/reftests/bugs/272646-2c.xhtml
new file mode 100644
index 0000000000..ba8e5d65a5
--- /dev/null
+++ b/layout/reftests/bugs/272646-2c.xhtml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window id="tab-test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="var e =
+ document.getElementById('main_coursetab_general'); e.hidden = true;
+ document.documentElement.getBoundingClientRect(); e.hidden = false;">
+ <tabbox id="main_courseframe" flex="1">
+ <tabs id="main_coursetabs" ida-type="gradient">
+ <tab id="main_coursetab_general" label="General" />
+ <tab id="main_coursetab_overview" label="Overview" />
+ <tab id="main_coursetab_extensions" label="Extensions" />
+ </tabs>
+
+ <tabpanels id="main_coursetabpanels" flex="1">
+ <tabpanel id="main_coursetabpanel_general">
+ <label value="this is the general tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_overview">
+ <label value="this is the OVERVIEW tabpanel" />
+ </tabpanel>
+
+ <tabpanel id="main_coursetabpanel_extensions">
+ <label value="this is the EXTENSIONS tabpanel" />
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+</window>
diff --git a/layout/reftests/bugs/273681-1-ref.html b/layout/reftests/bugs/273681-1-ref.html
new file mode 100644
index 0000000000..35ca47ca3b
--- /dev/null
+++ b/layout/reftests/bugs/273681-1-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form>
+<select size=2 id="test">
+<option>A</option>
+<option>B</option>
+<option>C</option>
+<option>D</option>
+<option>E</option>
+<option>F</option>
+<option>G</option>
+<option>H</option>
+<option selected>tag</option>
+<option>J</option>
+<option>K</option>
+<option>L</option>
+<option>M</option>
+<option>N</option>
+</select>
+<script>
+ // flush layout
+ document.body.offsetWidth
+</script>
+</form>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/273681-1.html b/layout/reftests/bugs/273681-1.html
new file mode 100644
index 0000000000..2a68f2230c
--- /dev/null
+++ b/layout/reftests/bugs/273681-1.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form>
+<select size=2 id="test">
+<option>A</option>
+<option>B</option>
+<option>C</option>
+<option>D</option>
+<option>E</option>
+<option>F</option>
+<option>G</option>
+<option>H</option>
+<option selected>I</option>
+<option>J</option>
+<option>K</option>
+<option>L</option>
+<option>M</option>
+<option>N</option>
+</select>
+<script>
+ // flush layout
+ document.body.offsetWidth
+
+ // Now change the text of the currently selected option
+ var obj = document.getElementById("test");
+ var pos = obj.selectedIndex;
+ obj.options[pos].text = "tag";
+</script>
+</form>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/278266-1-ref.html b/layout/reftests/bugs/278266-1-ref.html
new file mode 100644
index 0000000000..abd4884c32
--- /dev/null
+++ b/layout/reftests/bugs/278266-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+There should be text below this line:
+<div style="display: table-row" id="foo"><span style="display: table-cell">Second line of text</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/278266-1a.html b/layout/reftests/bugs/278266-1a.html
new file mode 100644
index 0000000000..0e0653ad23
--- /dev/null
+++ b/layout/reftests/bugs/278266-1a.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body onload="document.getElementById('foo').appendChild(document.createTextNode('Second line of text'))">
+There should be text below this line:
+<div style="display: table-row" id="foo"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/278266-1b.html b/layout/reftests/bugs/278266-1b.html
new file mode 100644
index 0000000000..4ed72ca571
--- /dev/null
+++ b/layout/reftests/bugs/278266-1b.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+There should be text below this line:
+<div style="display: table-row">Second line of text</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/280708-1-ref.html b/layout/reftests/bugs/280708-1-ref.html
new file mode 100644
index 0000000000..8b7dbec5dd
--- /dev/null
+++ b/layout/reftests/bugs/280708-1-ref.html
@@ -0,0 +1,9 @@
+<html><head>
+<style>
+.rowg {display:table-row-group;}
+</style>
+</head><body>
+<table><tbody><tr>
+<td class="rowg"><input class="rowg"></td>
+</tr></tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/280708-1a.html b/layout/reftests/bugs/280708-1a.html
new file mode 100644
index 0000000000..37ff834282
--- /dev/null
+++ b/layout/reftests/bugs/280708-1a.html
@@ -0,0 +1,9 @@
+<html class="reftest-wait"><head>
+<style>
+.rowg {display:table-row-group;}
+</style>
+</head><body onload="document.getElementById('x').className = 'rowg'; document.body.offsetWidth; document.getElementById('y').className = 'rowg'; document.body.offsetWidth; document.documentElement.className = '';">
+<table><tbody><tr>
+<td id="x"><input id="y"></td>
+</tr></tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/280708-1b.html b/layout/reftests/bugs/280708-1b.html
new file mode 100644
index 0000000000..c5a94ab35c
--- /dev/null
+++ b/layout/reftests/bugs/280708-1b.html
@@ -0,0 +1,9 @@
+<html class="reftest-wait"><head>
+<style>
+.rowg {display:table-row-group;}
+</style>
+</head><body onload="document.getElementById('x').className = 'rowg'; document.body.offsetWidth; document.getElementById('y').className = 'rowg'; document.body.offsetWidth; document.documentElement.className = '';">
+<table><tbody><tr>
+<td id="y"><input id="x"></td>
+</tr></tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/281241-1-ref.html b/layout/reftests/bugs/281241-1-ref.html
new file mode 100644
index 0000000000..12c3ca9cfc
--- /dev/null
+++ b/layout/reftests/bugs/281241-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>col removal</title>
+ </head>
+ <body>
+ <table border>
+ <colgroup width="500px">
+ </colgroup>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/281241-1.html b/layout/reftests/bugs/281241-1.html
new file mode 100644
index 0000000000..e6d40d1f07
--- /dev/null
+++ b/layout/reftests/bugs/281241-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>col removal</title>
+ <script type="text/javascript">
+ function foo ()
+ {
+ var out =document.getElementById('outer');
+ var int =document.getElementById('inner');
+ out.removeChild(int);
+ }
+ </script>
+ </head>
+ <body onload="foo()">
+
+ <table border>
+ <colgroup width="500px" id="outer">
+ <col width="200px" id="inner">
+ </colgroup>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/281241-2.xhtml b/layout/reftests/bugs/281241-2.xhtml
new file mode 100644
index 0000000000..3c6df6da10
--- /dev/null
+++ b/layout/reftests/bugs/281241-2.xhtml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <table border="">
+ <colgroup width="100px">
+ <script>var v = document.body.offsetHeight;</script>
+ <col width="500px"/>
+ </colgroup>
+ <tr><td>&#160;</td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/283686-1.html b/layout/reftests/bugs/283686-1.html
new file mode 100644
index 0000000000..6ed8312162
--- /dev/null
+++ b/layout/reftests/bugs/283686-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="display:none">
+<title>Testcase, bug 283686 (root element having display:none)</title>
+<p>Hello world!</p>
+
diff --git a/layout/reftests/bugs/283686-2-ref.html b/layout/reftests/bugs/283686-2-ref.html
new file mode 100644
index 0000000000..7aff98b49b
--- /dev/null
+++ b/layout/reftests/bugs/283686-2-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<title>Testcase, bug 283686 (root element having display:none)</title>
+<p>Hello world!</p>
+
diff --git a/layout/reftests/bugs/283686-2.html b/layout/reftests/bugs/283686-2.html
new file mode 100644
index 0000000000..7e07caa48a
--- /dev/null
+++ b/layout/reftests/bugs/283686-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait" style="display:none">
+<script type="text/javascript">
+function run() {
+ document.documentElement.style.display = '';
+ document.documentElement.className = '';
+}
+</script>
+<body onload="run()">
+<title>Testcase, bug 283686 (root element having display:none)</title>
+<p>Hello world!</p>
+
diff --git a/layout/reftests/bugs/283686-3.html b/layout/reftests/bugs/283686-3.html
new file mode 100644
index 0000000000..92ae2bc06a
--- /dev/null
+++ b/layout/reftests/bugs/283686-3.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<script type="text/javascript">
+function run() {
+ document.documentElement.style.display = 'none';
+ document.documentElement.className = '';
+}
+</script>
+<body onload="run()">
+<title>Testcase, bug 283686 (root element having display:none)</title>
+<p>Hello world!</p>
+
diff --git a/layout/reftests/bugs/28811-1-inner.html b/layout/reftests/bugs/28811-1-inner.html
new file mode 100644
index 0000000000..d47a4499e4
--- /dev/null
+++ b/layout/reftests/bugs/28811-1-inner.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+</style>
+</head>
+<body>
+
+<div><span style="margin-right: 10%">text</span></div>
+<div><span style="margin-left: 10%">text</span></div>
+<div><img src="blue-600x58.png" height="10" style="margin-top: 2%"></div>
+<div><img src="blue-600x58.png" height="10" style="margin-right: 10%"></div>
+<div><img src="blue-600x58.png" height="10" style="margin-bottom: 2%"></div>
+<div><img src="blue-600x58.png" height="10" style="margin-left: 10%"></div>
+
+<div><span style="background:yellow; padding-top: 2%">text</span></div>
+<div><span style="background:yellow; padding-right: 10%">text</span></div>
+<div><span style="background:yellow; padding-bottom: 2%">text</span></div>
+<div><span style="background:yellow; padding-left: 10%">text</span></div>
+
+<div><img src="blue-600x58.png" height="10" style="width: 10%"></div>
+<div><img src="blue-600x58.png" height="2" style="min-width: 50%"></div>
+<div><img src="blue-600x58.png" height="10" style="max-width: 1%"></div>
+
+<div><span style="display:inline-block">This is an inline-block that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</span></div>
+<div><button>This is a button that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</button></div>
+<div><fieldset>This is a fieldset that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</fieldset></div>
+
+<div><span style="position:relative; right: 3%">text in a span</span></div>
+<div><span style="position:relative; left: 3%">text in a span</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-1-ref.html b/layout/reftests/bugs/28811-1-ref.html
new file mode 100644
index 0000000000..99c806f950
--- /dev/null
+++ b/layout/reftests/bugs/28811-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+</head>
+<body>
+<iframe style="width: 750px" src="28811-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-1a.html b/layout/reftests/bugs/28811-1a.html
new file mode 100644
index 0000000000..14d77d0249
--- /dev/null
+++ b/layout/reftests/bugs/28811-1a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.width = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="width: 1000px" id="toresize" src="28811-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-1b.html b/layout/reftests/bugs/28811-1b.html
new file mode 100644
index 0000000000..ee854c18f2
--- /dev/null
+++ b/layout/reftests/bugs/28811-1b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.width = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="width: 500px" id="toresize" src="28811-1-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-2-inner.html b/layout/reftests/bugs/28811-2-inner.html
new file mode 100644
index 0000000000..e101c0df93
--- /dev/null
+++ b/layout/reftests/bugs/28811-2-inner.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+</style>
+</head>
+<body>
+
+<div><span><span style="margin-right: 10%">text</span></span></div>
+<div><span><span style="margin-left: 10%">text</span></span></div>
+<div><span><img src="blue-600x58.png" height="10" style="margin-top: 2%"></span></div>
+<div><span><img src="blue-600x58.png" height="10" style="margin-right: 10%"></span></div>
+<div><span><img src="blue-600x58.png" height="10" style="margin-bottom: 2%"></span></div>
+<div><span><img src="blue-600x58.png" height="10" style="margin-left: 10%"></span></div>
+
+<div><span><span style="background:yellow; padding-top: 2%">text</span></span></div>
+<div><span><span style="background:yellow; padding-right: 10%">text</span></span></div>
+<div><span><span style="background:yellow; padding-bottom: 2%">text</span></span></div>
+<div><span><span style="background:yellow; padding-left: 10%">text</span></span></div>
+
+<div><span><img src="blue-600x58.png" height="10" style="width: 10%"></span></div>
+<div><span><img src="blue-600x58.png" height="2" style="min-width: 50%"></span></div>
+<div><span><img src="blue-600x58.png" height="10" style="max-width: 1%"></span></div>
+
+<div><span><span style="display:inline-block">This is an inline-block that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</span></span></div>
+<div><span><button>This is a button that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</button></span></div>
+<div><span><fieldset>This is a fieldset that contains enough text that its shrink-wrap width will be based on the available size in its container. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.</fieldset></span></div>
+
+<div><span><span style="position:relative; right: 3%">text in a span</span></span></div>
+<div><span><span style="position:relative; left: 3%">text in a span</span></span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-2-ref.html b/layout/reftests/bugs/28811-2-ref.html
new file mode 100644
index 0000000000..e9d2264685
--- /dev/null
+++ b/layout/reftests/bugs/28811-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+</head>
+<body>
+<iframe style="width: 750px" src="28811-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-2a.html b/layout/reftests/bugs/28811-2a.html
new file mode 100644
index 0000000000..b1fc1166d6
--- /dev/null
+++ b/layout/reftests/bugs/28811-2a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.width = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="width: 1000px" id="toresize" src="28811-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/28811-2b.html b/layout/reftests/bugs/28811-2b.html
new file mode 100644
index 0000000000..a66b9305d2
--- /dev/null
+++ b/layout/reftests/bugs/28811-2b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for resizing elements that depend on containing block width</title>
+<style type="text/css">
+html, body, iframe { height: 100%; }
+</style>
+<script type="application/javascript">
+
+function run() {
+ document.getElementById("toresize").style.width = "750px";
+}
+
+</script>
+</head>
+<body onload="run()">
+<iframe style="width: 500px" id="toresize" src="28811-2-inner.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/289384-1.xhtml b/layout/reftests/bugs/289384-1.xhtml
new file mode 100644
index 0000000000..89cf169ccf
--- /dev/null
+++ b/layout/reftests/bugs/289384-1.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script type="text/javascript">
+<![CDATA[
+
+function boom()
+{
+ document.body.setAttribute("contenteditable", "true");
+ document.execCommand("selectAll", false, null);
+}
+
+]]>
+</script>
+</head>
+
+<body onload="boom();"><textarea><span/></textarea></body>
+
+</html>
diff --git a/layout/reftests/bugs/289384-ref.xhtml b/layout/reftests/bugs/289384-ref.xhtml
new file mode 100644
index 0000000000..5c5b8252ac
--- /dev/null
+++ b/layout/reftests/bugs/289384-ref.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script type="text/javascript">
+<![CDATA[
+
+function boom()
+{
+ document.body.setAttribute("contenteditable", "true");
+ document.execCommand("selectAll", false, null);
+}
+
+]]>
+</script>
+</head>
+
+<body onload="boom();"><textarea></textarea></body>
+
+</html>
diff --git a/layout/reftests/bugs/289480-mask.png b/layout/reftests/bugs/289480-mask.png
new file mode 100644
index 0000000000..e1a6f41270
--- /dev/null
+++ b/layout/reftests/bugs/289480-mask.png
Binary files differ
diff --git a/layout/reftests/bugs/289480-ref.html b/layout/reftests/bugs/289480-ref.html
new file mode 100644
index 0000000000..af68cfcd65
--- /dev/null
+++ b/layout/reftests/bugs/289480-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>The Second Acid Test (Reference Rendering)</title>
+ <style type="text/css">
+ html { margin: 0; padding: 0; border: 0; overflow: hidden; background: white; }
+ body { margin: 0; padding: 0; border: 0; }
+ h2 { margin: 0; padding: 48px 0 36px 84px; border: 0; font: 24px/24px sans-serif; color: navy; }
+ p { margin: 0; padding: 0 0 0 72px; border: 0; }
+ img { vertical-align: top; margin: 0; padding: 0; border: 0; }
+ </style>
+ </head>
+ <body>
+ <h2>Hello&nbsp;World!</h2>
+ <p><a href="289480-ref.png"><img src="289480-ref.png" alt="Follow this link to view the reference image, which should be rendered below the text &quot;Hello World!&quot; on the test page in the same way that this paragraph is rendered below that text on this page."></a></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/289480-ref.png b/layout/reftests/bugs/289480-ref.png
new file mode 100644
index 0000000000..d2f0602ed8
--- /dev/null
+++ b/layout/reftests/bugs/289480-ref.png
Binary files differ
diff --git a/layout/reftests/bugs/289480.html b/layout/reftests/bugs/289480.html
new file mode 100644
index 0000000000..10ba94b61d
--- /dev/null
+++ b/layout/reftests/bugs/289480.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>The Second Acid Test</title>
+ <style type="text/css">
+ /* section numbers refer to CSS2.1 */
+
+ /* page setup */
+ html { font: 12px sans-serif; margin: 0; padding: 0; overflow: hidden; /* hides scrollbars on viewport, see 11.1.1:3 */ background: white; color: red; }
+ body { margin: 0; padding: 0; }
+
+ /* introduction message */
+ .intro { font: 2em sans-serif; margin: 3.5em 2em; padding: 0.5em; border: solid thin; background: white; color: black; position: relative; z-index: 2; /* should cover the black and red bars that are fixed-positioned */ }
+ .intro * { font: inherit; margin: 0; padding: 0; }
+ .intro h1 { font-size: 1em; font-weight: bolder; margin: 0; padding: 0; }
+ .intro :link { color: blue; }
+ .intro :visited { color: purple; }
+
+ /* picture setup */
+ #top { margin: 100em 3em 0; padding: 2em 0 0 .5em; text-align: left; font: 2em/24px sans-serif; color: navy; white-space: pre; } /* "Hello World!" text */
+ .picture { position: relative; border: 1em solid transparent; margin: 0 0 100em 3em; } /* containing block for face */
+ .picture { background: red; } /* overriden by preferred stylesheet below */
+
+ /* top line of face (scalp): fixed positioning and min/max height/width */
+ .picture p { position: fixed; margin: 0; padding: 0; border: 0; top: 9em; left: 11em; width: 140%; max-width: 4em; height: 8px; min-height: 1em; max-height: 2mm; /* min-height overrides max-height, see 10.7 */ background: black; border-bottom: 0.5em yellow solid; }
+
+ /* bits that shouldn't be part of the top line (and shouldn't be visible at all): HTML parsing, "+" combinator, stacking order */
+ .picture p.bad { border-bottom: red solid; /* shouldn't matter, because the "p + table + p" rule below should match it too, thus hiding it */ }
+ .picture p + p { background: maroon; z-index: 1; } /* shouldn't match anything */
+ .picture p + table + p { margin-top: 3em; /* should end up under the absolutely positioned table below, and thus not be visible */ }
+
+ /* second line of face: attribute selectors, float positioning */
+ [class~=one].first.one { position: absolute; top: 0; margin: 36px 0 0 60px; padding: 0; border: black 2em; border-style: none solid; /* shrink wraps around float */ }
+ [class~=one][class~=first] [class=second\ two][class="second two"] { float: right; width: 48px; height: 12px; background: yellow; margin: 0; padding: 0; } /* only content of abs pos block */
+
+ /* third line of face: width and overflow */
+ .forehead { margin: 4em; width: 8em; border-left: solid black 1em; border-right: solid black 1em; background: red url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4%2F58BAAT%2FAf9jgNErAAAAAElFTkSuQmCC); /* that's a 1x1 yellow pixel PNG */ }
+ .forehead * { width: 12em; line-height: 1em; }
+
+ /* class selectors headache */
+ .two.error.two { background: maroon; } /* shouldn't match */
+ .forehead.error.forehead { background: red; } /* shouldn't match */
+ [class=second two] { background: red; } /* this should be ignored (invalid selector -- grammar says it only accepts IDENTs or STRINGs) */
+
+ /* fourth and fifth lines of face, with eyes: paint order test (see appendix E) and fixed backgrounds */
+ /* the two images are identical: 2-by-2 squares with the top left
+ and bottom right pixels set to yellow and the other two set to
+ transparent. Since they are offset by one pixel from each other,
+ the second one paints exactly over the transparent parts of the
+ first one, thus creating a solid yellow block. */
+ .eyes { position: absolute; top: 5em; left: 3em; margin: 0; padding: 0; background: red; }
+ #eyes-a { height: 0; line-height: 2em; text-align: right; } /* contents should paint top-most because they're inline */
+ #eyes-a object { display: inline; vertical-align: bottom; }
+ #eyes-a object[type] { width: 7.5em; height: 2.5em; } /* should have no effect since that object should fallback to being inline (height/width don't apply to inlines) */
+ #eyes-a object object object { border-right: solid 1em black; padding: 0 12px 0 11px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABnRSTlMAAAAAAABupgeRAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAAEUlEQVR42mP4%2F58BCv7%2FZwAAHfAD%2FabwPj4AAAAASUVORK5CYII%3D) fixed 1px 0; }
+ #eyes-b { float: left; width: 10em; height: 2em; background: fixed url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABnRSTlMAAAAAAABupgeRAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAAEUlEQVR42mP4%2F58BCv7%2FZwAAHfAD%2FabwPj4AAAAASUVORK5CYII%3D); border-left: solid 1em black; border-right: solid 1em red; } /* should paint in the middle layer because it is a float */
+ #eyes-c { display: block; background: red; border-left: 2em solid yellow; width: 10em; height: 2em; } /* should paint bottom most because it is a block */
+
+ /* lines six to nine, with nose: auto margins */
+ .nose { float: left; margin: -2em 2em -1em; border: solid 1em black; border-top: 0; min-height: 80%; height: 60%; max-height: 3em; /* percentages become auto (see 10.5 and 10.7) and intrinsic height is more than 3em, so 3em wins */ padding: 0; width: 12em; }
+ .nose > div { padding: 1em 1em 3em; height: 0; background: yellow; }
+ .nose div div { width: 2em; height: 2em; background: red; margin: auto; }
+ .nose :hover div { border-color: blue; }
+ .nose div:hover :before { border-bottom-color: inherit; }
+ .nose div:hover :after { border-top-color: inherit; }
+ .nose div div:before { display: block; border-style: none solid solid; border-color: red yellow black yellow; border-width: 1em; content: ''; height: 0; }
+ .nose div :after { display: block; border-style: solid solid none; border-color: black yellow red yellow; border-width: 1em; content: ''; height: 0; }
+
+ /* between lines nine and ten: margin collapsing with 'float' and 'clear' */
+ .empty { margin: 6.25em; height: 10%; /* computes to auto which makes it empty per 8.3.1:7 (own margins) */ }
+ .empty div { margin: 0 2em -6em 4em; }
+ .smile { margin: 5em 3em; clear: both; /* clearance is negative (see 8.3.1 and 9.5.1) */ }
+
+ /* line ten and eleven: containing block for abs pos */
+ .smile div { margin-top: 0.25em; background: black; width: 12em; height: 2em; position: relative; bottom: -1em; }
+ .smile div div { position: absolute; top: 0; right: 1em; width: auto; height: 0; margin: 0; border: yellow solid 1em; }
+
+ /* smile (over lines ten and eleven): backgrounds behind borders, inheritance of 'float', nested floats, negative heights */
+ .smile div div span { display: inline; margin: -1em 0 0 0; border: solid 1em transparent; border-style: none solid; float: right; background: black; height: 1em; }
+ .smile div div span em { float: inherit; border-top: solid yellow 1em; border-bottom: solid black 1em; } /* zero-height block; width comes from (zero-height) child. */
+ .smile div div span em strong { width: 6em; display: block; margin-bottom: -1em; /* should have no effect, since parent has top&bottom borders, so this margin doesn't collapse */ }
+
+ /* line twelve: line-height */
+ .chin { margin: -4em 4em 0; width: 8em; line-height: 1em; border-left: solid 1em black; border-right: solid 1em black; background: yellow url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAFSDNYfAAAAaklEQVR42u3XQQrAIAwAQeP%2F%2F6wf8CJBJTK9lnQ7FpHGaOurt1I34nfH9pMMZAZ8BwMGEvvh%2BBsJCAgICLwIOA8EBAQEBAQEBAQEBK79H5RfIQAAAAAAAAAAAAAAAAAAAAAAAAAAAID%2FABMSqAfj%2FsLmvAAAAABJRU5ErkJggg%3D%3D) /* 64x64 red square */ no-repeat fixed /* shouldn't be visible unless the smiley is moved to the top left of the viewport */; }
+ .chin div { display: inline; font: 2px/4px serif; }
+
+ /* line thirteen: cascade and selector tests */
+ .parser-container div { color: maroon; border: solid; color: orange; } /* setup */
+ div.parser-container * { border-color: black; /* overrides (implied) border-color on previous line */ } /* setup */
+ * div.parser { border-width: 0 2em; /* overrides (implied) declarations on earlier line */ } /* setup */
+
+ /* line thirteen continued: parser tests */
+ .parser { /* comment parsing test -- comment ends before the end of this line, the backslash should have no effect: \*/ }
+ .parser { margin: 0 5em 1em; padding: 0 1em; width: 2em; height: 1em; error: \}; background: yellow; } /* setup with parsing test */
+ * html .parser { background: gray; }
+ \.parser { padding: 2em; }
+ .parser { m\argin: 2em; };
+ .parser { height: 3em; }
+ .parser { width: 200; }
+ .parser { border: 5em solid red ! error; }
+ .parser { background: red pink; }
+
+ /* line fourteen (last line of face): table */
+ ul { display: table; padding: 0; margin: -1em 7em 0; background: red; }
+ ul li { padding: 0; margin: 0; }
+ ul li.first-part { display: table-cell; height: 1em; width: 1em; background: black; }
+ ul li.second-part { display: table; height: 1em; width: 1em; background: black; } /* anonymous table cell wraps around this */
+ ul li.third-part { display: table-cell; height: 0.5em; /* gets stretched to fit row */ width: 1em; background: black; }
+ ul li.fourth-part { list-style: none; height: 1em; width: 1em; background: black; } /* anonymous table cell wraps around this */
+
+ /* bits that shouldn't appear: inline alignment in cells */
+ .image-height-test { height: 10px; overflow: hidden; font: 20em serif; } /* only the area between the top of the line box and the top of the image should be visible */
+ table { margin: 0; border-spacing: 0; }
+ td { padding: 0; }
+
+ /* Mask for nose interpolation */
+ .nose-mask { position:absolute; top:94px; left:94px; }
+
+ </style>
+ <link rel="appendix stylesheet" href="data:text/css,.picture%20%7B%20background%3A%20none%3B%20%7D"> <!-- this stylesheet should be applied by default -->
+ </head>
+ <body>
+
+ <div class="intro">
+ <h1>Standards compliant?</h1>
+ <p><a href="#top">Take The Acid2 Test</a> and compare it to <a
+ href="289480-ref.html">the reference rendering</a>.</p>
+ </div>
+ <h2 id="top">Hello World!</h2>
+
+ <div class="picture">
+ <p><table><tr><td></table><p class="bad"> <!-- <table> closes <p> per the HTML4 DTD -->
+ <blockquote class="first one"><address class="second two"></address></blockquote>
+ <div class="forehead"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></div>
+ <div class="eyes"><div id="eyes-a"><object data="data:application/x-unknown,ERROR"><object data="acid2-this-file-does-not-exist.html" type="text/html"><object data="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAYCAYAAAFy7sgCAAAGsUlEQVRo3u2ZbWwcZxHHf3s%2B7LNbO3ZjXBtowprGODRX0qpNQCjmJKuVKhMl1P2AkCwhFOIKkCBSm9IXavGFKAixIAECwkmWo5MrhRI3Ub40IEwQgp6aIDg3Cd6eEqyIHEteah%2B1E69vhw%2BZtTaX8704ZzkKjHS6271nZ56ZZ%2BY%2F%2F%2BdZKF%2FCwYshx3EkkggLsD1v4FQkEZZYLCbAKyG9%2Ba9EIsG6hnUAf8x74K3aUC3j4%2BM54HcsR2oAIomwZOezkv%2FnSHpYNh%2BNCmAE7xv94zvFdd1bHsjMZmQkPSxAJP%2B%2FfuBLwK54PC7JZFKAVJmzXLBt2w%2FMvcDLwIb8QS8CeJ4nkURYIomw7J%2FYJ8BvSiiXptGGxWds2%2Fa9%2Bnaxh%2BYAD%2Bgt04NDgABTpQY2cvvSFLzw86gWeBVwC8SzlOSv2YeBPfmDBoBHgKmR9LBEEmHZfDTqGykqfkUE0nA78BzQGfSgUeP3wNeTXwXg7MwZDhw4UHL6ra2ti79%2FOvljgG8AZ4H64Lhm4MvAocxsRppGG%2FxcXihlwLIs6R%2FfKV2HO%2F26uA94pdDYUKUZUU7W1RQYXA98Gnhaf5%2FXWX0HeAHYoQonqa4sZSOsSWMCWeC9Yko%2BCQwBe4E6oNc0Tc91XTl1%2BaTsn9gnI%2Blhyc5nZWxsrBIkKSbl2tiic3tW53YDEwOKaoFBrcOfqKee53lG9xsPMjV784r%2F4lO%2FpPvyJ9iyZcuvFSaXK5XYeAZ4CDgGvB3MS4B54LQuWYPeuy4iRFsevsXqpuYoqVQKIH2bK1CuDQNo11o4XUzh%2FcDWYIe1LEtyuZx4niee54njOGKapgfsqlL%2Bl2OjEXg8nxrc1dJ0h3hbtL%2BGCtz7KPBF4CuBe9uB15VafE8hr9qylI3HgG8C2%2FK7VyHZoJj7MrBRm30qFotJMpkU27YlHo%2F7Ha5a%2BV%2FKRkSJ4KuKRLVLKapTjB1SzAVIjY2NSXY%2BKyPpYdk%2FsU9OXT4pruv6BdZbBQfKsVGnvWlIe1VB6VQO8JxC1vZYLCbZ%2BaxsPhpdZDyRRFhG0sPiOE6ldKBg2lRg4xF1YCDIIIKN7DGgD3gH%2BBXwejKZfPrs2tPs%2FvPN2bKuYR1nd7xLKBSSJeqoXKnERjPwNWAG%2BLn2rZuM%2B4Tpml6vaWlp4eLcxVusZq5lCgVgOVKJjRqdX86ffL4D5wIoZACnTpw4wRMdT96i%2FImOJxERAs4uVyqxUacF%2FPdiCj%2BjdRBRGFtwXVdG0sPSdbhTmkYbpH98p2RmM2JZlig1vl0GWo4NQ%2Fn%2Bs5pKRXfwjweaxy7TND3HcRZbfC6X8xVPVQlGy7WxVWlO5XRXFXm6EZmrQuSXYyPE3SiVoEhE6Wyr0u2rumO6zv%2B21AFdQAswC1wCMuUCXCmyWQus103Qg8qlDO0lxwOb%2Fl4FiK3AB3VS%2FuKKLtK%2FgbeAnwG%2FvUODuRw%2FFrR0H1UC75fwu8oJ%2FhFsW5VIG%2FBUgEIN6Y65O4AHu4Ap0zQ9y7LEcZyb9lRBUHQcRyzL8unZVBW5bFWAvAp%2BhDQ2g4F47dUYtlU6obXA54DnVdFLekjUGGifh4AFy7LEdV3xj3X9I66m0QZpGm2QrsOd0j%2B%2BU0bSw5KZzYjrun6HWlAd961i4FfCj0aN1Usau%2Bc1lmuXPFwvAEumUut7tQQvAb%2FXb%2FT0bCAej9cODg7yt%2Bm%2F8q2%2F7OUHZ76PnZ1k2p0mJzlykmPancbOTnL0whHs7CQfb%2B5mx2d3sH79%2BtCRI0c6FeaOr9ICrIQfLvA%2B8BGNXxi4R6HrisJVUWrxAVW2oMFf0Aczim8o3kV6enowDIPjF9%2Fk%2BMU3S3rrjzMMg56eHr%2BxP7qKFbASfojG6kpeDGs1tiW53RxwWT%2Bin5q8w4xpQK5evQpAR30H7ZH2khNvj7TTUd8BgD4rqmu1ZKX8qNeY%2BfHz4zlXDgT5E8tpCTUq7XSBC4Euv8227TV9fX1E73%2BYtvo27BmbS9cvFVTY3bSRFza9yOcf6Gfmygy7d%2B%2Fm%2FPnzF4DvrsBLhnJlJfwIKXxv1PheAE4qK6p4H9AGbNKTuhngBPBPXYRe4IemaT5kWZbR19fHNbmGnZ1k4r3U4glDR30Hm5qjbGjsImJEOHbsGHv27JFz5869o0eFq01Jq%2BmHAXwI6FFKagMTgHM7GzFDS%2BoeLSMv7zjzC9x4Y7gxFovVDAwMEI1GaWlpWSzRVCrFwYMH%2FXfxZ4AfAa8B%2F7lDaGg1%2FQgp43lfK0yqtRMuJa3ceKe5DfgYsCYAZ2ngD8CfAkzqTpW7xY%2F%2FSznyX%2FVeUb2kVmX4AAAAAElFTkSuQmCC">ERROR</object></object></object></div><div id="eyes-b"></div><div id="eyes-c"></div></div> <!-- that's a PNG with 8bit alpha containing two eyes -->
+ <div class="nose"><div><div></div></div></div>
+ <div class="empty"><div></div></div>
+
+ <div class="smile"><div><div><span><em><strong></strong></em></span></div></div></div>
+ <div class="chin"><div>&nbsp;</div></div>
+ <div class="parser-container"><div class="parser"><!-- ->ERROR<!- --></div></div> <!-- two dashes is what delimits a comment, so the text "->ERROR<!-" earlier on this line is actually part of a comment -->
+ <ul>
+ <li class="first-part"></li>
+ <li class="second-part"></li>
+ <li class="third-part"></li>
+ <li class="fourth-part"></li>
+
+ </ul>
+ <div class="image-height-test"><table><tr><td><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAFSDNYfAAAAaklEQVR42u3XQQrAIAwAQeP%2F%2F6wf8CJBJTK9lnQ7FpHGaOurt1I34nfH9pMMZAZ8BwMGEvvh%2BBsJCAgICLwIOA8EBAQEBAQEBAQEBK79H5RfIQAAAAAAAAAAAAAAAAAAAAAAAAAAAID%2FABMSqAfj%2FsLmvAAAAABJRU5ErkJggg%3D%3D" alt=""></td></tr></table></div>
+ <img class="nose-mask" src="289480-mask.png" />
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/290129-1-ref.html b/layout/reftests/bugs/290129-1-ref.html
new file mode 100644
index 0000000000..1ec0f01cf6
--- /dev/null
+++ b/layout/reftests/bugs/290129-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style>
+ th, td { background: #ddd; }
+ table { border-collapse: collapse; }
+</style>
+</head>
+<body>
+
+ <table border="1">
+ <tr><th>x</th><th colspan="2" class="a1 a2">A</th></tr>
+ <tr><th>x</th><td class="a1">a1</td><td class="a2">a2</td></tr>
+ </table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/290129-1.html b/layout/reftests/bugs/290129-1.html
new file mode 100644
index 0000000000..d49af9a34b
--- /dev/null
+++ b/layout/reftests/bugs/290129-1.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<style>
+ th, td { background: #ddd; }
+ table { border-collapse: collapse; }
+</style>
+</head>
+<body>
+
+ <table border="1">
+ <tr><th>x</th><th colspan="2" class="a1 a2">A</th></tr>
+ <tr><th>x</th><td class="a1">a1</td><td class="a2">a2</td></tr>
+ </table>
+
+ <script type="text/javascript">
+
+ function addCSSRule(selector, rule) {
+ var css = document.styleSheets[ document.styleSheets.length -1];
+ css.insertRule(selector+" {"+rule+"}", css.cssRules.length);
+ }
+
+ function removeCSSRule(selector, rule) {
+ rule = rule.split(':');
+ for (cssno=0; cssno<document.styleSheets.length;cssno++) {
+ var css = document.styleSheets[cssno];
+ for (i=(css.cssRules.length-1);i>=0;i--) {
+ var rule = css.cssRules[i];
+ if (rule.selectorText == selector && rule.style[ rule[0] ] == rule[1])
+ css.deleteRule(i);
+ }
+ }
+ }
+
+ function setClassDisplay(display, classname) {
+ document.body.offsetWidth
+ if (display)
+ removeCSSRule("."+classname, "display:none");
+ else
+ addCSSRule("."+classname, "display:none");
+ }
+
+ setClassDisplay(false, 'a1');
+ setClassDisplay(false, 'a2');
+ setClassDisplay(true, 'a1');
+ setClassDisplay(true, 'a2');
+ </script>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/291078-1-ref.html b/layout/reftests/bugs/291078-1-ref.html
new file mode 100644
index 0000000000..231da2694d
--- /dev/null
+++ b/layout/reftests/bugs/291078-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table border="1" align="center">
+ <tr>
+ <td class="type">
+ <input name="name" value="text input text input" type="text">
+ <textarea>
+1textarea textarea
+2textarea textarea
+3textarea textarea
+4textarea textarea
+5textarea textarea
+6textarea </textarea>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/291078-1.html b/layout/reftests/bugs/291078-1.html
new file mode 100644
index 0000000000..acbba5dd8b
--- /dev/null
+++ b/layout/reftests/bugs/291078-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ .type:first-line
+ {
+ }
+ </style>
+</head>
+<body>
+<table border="1" align="center">
+ <tr>
+ <td class="type">
+ <input name="name" value="text input text input" type="text">
+ <textarea>
+1textarea textarea
+2textarea textarea
+3textarea textarea
+4textarea textarea
+5textarea textarea
+6textarea </textarea>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/291078-2-ref.html b/layout/reftests/bugs/291078-2-ref.html
new file mode 100644
index 0000000000..d3622c37e1
--- /dev/null
+++ b/layout/reftests/bugs/291078-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table align="center">
+ <tr>
+ <td class="type">
+ <span style="opacity: 0.99">text text</span>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/291078-2.html b/layout/reftests/bugs/291078-2.html
new file mode 100644
index 0000000000..09886bd85b
--- /dev/null
+++ b/layout/reftests/bugs/291078-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.type:first-line
+{
+}
+</style>
+</head>
+<body>
+<table align="center">
+ <tr>
+ <td class="type">
+ <span style="opacity: 0.99">text text</span>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/291262-1-ref.html b/layout/reftests/bugs/291262-1-ref.html
new file mode 100644
index 0000000000..86392c2b6d
--- /dev/null
+++ b/layout/reftests/bugs/291262-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<title>Styling the CANVAS element</title>
+<style type="text/css">
+ div{
+ position: absolute;
+ top:37px; left:4em;
+ background:lime;
+ border:.5em solid black;
+ height:1em;
+ width:1em;
+ display:block;
+}
+</style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/291262-1.html b/layout/reftests/bugs/291262-1.html
new file mode 100644
index 0000000000..ca30af3f93
--- /dev/null
+++ b/layout/reftests/bugs/291262-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<title>Styling the CANVAS element</title>
+<style type="text/css">
+ canvas{
+ position: absolute;
+ top:37px; left:4em;
+ background:lime;
+ border:.5em solid black;
+ height:1em;
+ width:1em;
+ display:block;
+}
+</style>
+</head>
+<body>
+ <canvas></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/294306-1.html b/layout/reftests/bugs/294306-1.html
new file mode 100644
index 0000000000..dfa28bd82f
--- /dev/null
+++ b/layout/reftests/bugs/294306-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+
+<html>
+ <body>
+ <!-- Lack of space before <span> is important -->
+ <p style="text-indent: 4em;"><span src="test.jpg" style="text-indent: 0; width: 150px; height: 200px; float: right;">Right Float</span>
+Text in the block
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/294306-1a-ref.html b/layout/reftests/bugs/294306-1a-ref.html
new file mode 100644
index 0000000000..8be64df4c2
--- /dev/null
+++ b/layout/reftests/bugs/294306-1a-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+
+<html>
+ <body>
+ <span src="test.jpg" style="width: 150px; height: 200px; float: right;">Right Float</span>
+ <p style="text-indent: 4em;">
+Text in the block
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/294306-1b-ref.html b/layout/reftests/bugs/294306-1b-ref.html
new file mode 100644
index 0000000000..2fd828952b
--- /dev/null
+++ b/layout/reftests/bugs/294306-1b-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+
+<html>
+ <body>
+ <span src="test.jpg" style="width: 150px; height: 200px; float: right;">Right Float</span>
+ <p>
+Text in the block
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/296361-1.html b/layout/reftests/bugs/296361-1.html
new file mode 100644
index 0000000000..8bd89f4753
--- /dev/null
+++ b/layout/reftests/bugs/296361-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+<style>
+
+table { border-right: solid 16px gold; }
+
+a { font-family: sans-serif; padding: 2px; }
+
+a:hover { color: red; }
+
+</style>
+ <script>
+ function doTest() {
+ var s1 = document.getElementById("target");
+ s1.style.color="red"
+ document.documentElement.removeAttribute('class');
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+
+</head><body>
+<table cellpadding="4" rules="rows">
+
+ <tbody><tr>
+ <td><a href="#" id ="target"> move mouse over this text </a></td>
+ <td></td>
+ </tr>
+
+</tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/296361-ref.html b/layout/reftests/bugs/296361-ref.html
new file mode 100644
index 0000000000..73a4c9344c
--- /dev/null
+++ b/layout/reftests/bugs/296361-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+<style>
+
+table { border-right: solid 16px gold; }
+
+a { font-family: sans-serif; color: red; padding: 2px; }
+
+</style>
+
+
+</head><body>
+<table cellpadding="4" rules="rows">
+
+ <tbody><tr>
+ <td><a href="#" id ="target"> move mouse over this text </a></td>
+ <td></td>
+ </tr>
+
+</tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/296904-1-ref.html b/layout/reftests/bugs/296904-1-ref.html
new file mode 100644
index 0000000000..e8ed6301c4
--- /dev/null
+++ b/layout/reftests/bugs/296904-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<canvas width="100" height="100" id="c" style="background: #0f0"></canvas>
diff --git a/layout/reftests/bugs/296904-1.html b/layout/reftests/bugs/296904-1.html
new file mode 100644
index 0000000000..fc9a96f898
--- /dev/null
+++ b/layout/reftests/bugs/296904-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<canvas width="100" height="100" id="c"></canvas>
+<script>
+window.onload = function () {
+ var ctx = document.getElementById('c').getContext('2d');
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 100);
+ ctx.lineTo(100, 100);
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#00f';
+
+ ctx.fillRect(30, 10, 10, 10);
+ ctx.strokeRect(60, 10, 10, 10);
+ ctx.clearRect(25, 15, 50, 10);
+ ctx.drawImage(document.getElementById('c'), 0, 0);
+ if (ctx.putImageData) ctx.putImageData(ctx.getImageData(0, 0, 10, 10), 0, 0);
+
+ ctx.lineTo(100, 0);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+}
+</script>
diff --git a/layout/reftests/bugs/299136-1-ref.html b/layout/reftests/bugs/299136-1-ref.html
new file mode 100644
index 0000000000..dbd327ded5
--- /dev/null
+++ b/layout/reftests/bugs/299136-1-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<html>
+<body>
+The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.&nbsp;The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.&nbsp;The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.&nbsp;The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.&nbsp;The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.&nbsp;The&nbsp;quick&nbsp;brown&nbsp;fox&nbsp;jumps&nbsp;over&nbsp;the&nbsp;lazy&nbsp;dog.
+</body>
+</html>
diff --git a/layout/reftests/bugs/299136-1.html b/layout/reftests/bugs/299136-1.html
new file mode 100644
index 0000000000..4ff5c48f39
--- /dev/null
+++ b/layout/reftests/bugs/299136-1.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+.test { white-space: nowrap; }
+</style>
+</head>
+<body>
+<span class="test">The quick brown fox jumps over the lazy dog.</span><span class="test"> The quick brown fox jumps over the lazy dog.</span><span class="test"> The quick brown fox jumps over the lazy dog.</span><span class="test"> The quick brown fox jumps over the lazy dog.</span><span class="test"> The quick brown fox jumps over the lazy dog.</span><span class="test"> The quick brown fox jumps over the lazy dog.</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/299837-1-ref.html b/layout/reftests/bugs/299837-1-ref.html
new file mode 100644
index 0000000000..9b4b4632f2
--- /dev/null
+++ b/layout/reftests/bugs/299837-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>
+ <div style="text-align: left;">Left</div>
+ <div style="text-align: right;">Right</div>
+ </div>
+ <div>
+ <div style="text-align: right;">Right</div>
+ <div style="text-align: left;">Left</div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/299837-1.html b/layout/reftests/bugs/299837-1.html
new file mode 100644
index 0000000000..fb3be0a26f
--- /dev/null
+++ b/layout/reftests/bugs/299837-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="text-align: center">
+ <div style="text-align: start;">Left</div>
+ <div style="text-align: end;">Right</div>
+ </div>
+ <div style="text-align: center; direction: rtl">
+ <div style="text-align: start;">Right</div>
+ <div style="text-align: end;">Left</div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/299837-3-ref.xhtml b/layout/reftests/bugs/299837-3-ref.xhtml
new file mode 100644
index 0000000000..ae418f9660
--- /dev/null
+++ b/layout/reftests/bugs/299837-3-ref.xhtml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/css" href="data:text/css,treecol { visibility: hidden; }"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ style="direction: ltr">
+ <tree>
+ <treecols>
+ <treecol style="text-align: left;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: left;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: left;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: left;" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/299837-3.xhtml b/layout/reftests/bugs/299837-3.xhtml
new file mode 100644
index 0000000000..0431df0d53
--- /dev/null
+++ b/layout/reftests/bugs/299837-3.xhtml
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/css" href="data:text/css,treecol { visibility: hidden; }"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <tree>
+ <treecols>
+ <treecol style="text-align: start; direction: ltr" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: start; direction: rtl" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: left; direction: ltr" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: left; direction: rtl" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right; direction: ltr" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: right; direction: rtl" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: end; direction: ltr" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ <tree>
+ <treecols>
+ <treecol style="text-align: end; direction: rtl" flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="This is a test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/300691-1-ref.html b/layout/reftests/bugs/300691-1-ref.html
new file mode 100644
index 0000000000..c252f61959
--- /dev/null
+++ b/layout/reftests/bugs/300691-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t">abcdefgh</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1a.html b/layout/reftests/bugs/300691-1a.html
new file mode 100644
index 0000000000..9f216cd37d
--- /dev/null
+++ b/layout/reftests/bugs/300691-1a.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("abcdefgh"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1b.html b/layout/reftests/bugs/300691-1b.html
new file mode 100644
index 0000000000..031abdad9c
--- /dev/null
+++ b/layout/reftests/bugs/300691-1b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").appendChild(document.createTextNode("abcd"));
+ document.getElementById("t").appendChild(document.createTextNode("efgh"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1c.html b/layout/reftests/bugs/300691-1c.html
new file mode 100644
index 0000000000..6106858885
--- /dev/null
+++ b/layout/reftests/bugs/300691-1c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").appendChild(document.createTextNode("abcd"));
+ // Flush reflow
+ document.body.offsetWidth;
+ document.getElementById("t").appendChild(document.createTextNode("efgh"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1d.html b/layout/reftests/bugs/300691-1d.html
new file mode 100644
index 0000000000..62d0e3fe74
--- /dev/null
+++ b/layout/reftests/bugs/300691-1d.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").appendChild(document.createTextNode(""));
+ document.getElementById("t").firstChild.data = "abcdefgh";
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1e.html b/layout/reftests/bugs/300691-1e.html
new file mode 100644
index 0000000000..349438ea25
--- /dev/null
+++ b/layout/reftests/bugs/300691-1e.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").appendChild(document.createTextNode("abcd"));
+ document.getElementById("t").appendChild(document.createTextNode("efgh"));
+ document.getElementById("t").normalize();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/300691-1f.html b/layout/reftests/bugs/300691-1f.html
new file mode 100644
index 0000000000..b1d3b11a7e
--- /dev/null
+++ b/layout/reftests/bugs/300691-1f.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea id="t"></textarea>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("abcdefgh"));
+ document.getElementById("t").appendChild(document.createTextNode("ijkl"));
+ // Flush reflow
+ document.body.offsetWidth;
+ document.getElementById("t").
+ removeChild(document.getElementById("t").lastChild);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/301726-1-ref.html b/layout/reftests/bugs/301726-1-ref.html
new file mode 100644
index 0000000000..db6961e261
--- /dev/null
+++ b/layout/reftests/bugs/301726-1-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Overflow: Auto / Cascaded Boxes / Scrollbar Rendering Testcase</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ #outer_box {
+ width: 400px;
+ height: 100px;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ }
+ #inner_box {
+ width: 200%;
+ height: 100%;
+ overflow: auto;
+ }
+ #dummy_content {
+ height: 101px;
+ background: yellow;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="outer_box">
+ <div id="inner_box">
+ <div id="dummy_content">
+ &nbsp;
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/301726-1.html b/layout/reftests/bugs/301726-1.html
new file mode 100644
index 0000000000..b9d492d9cd
--- /dev/null
+++ b/layout/reftests/bugs/301726-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Overflow: Auto / Cascaded Boxes / Scrollbar Rendering Testcase</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ #outer_box {
+ width: 400px;
+ height: 100px;
+ overflow: auto;
+ }
+ #inner_box {
+ width: 200%;
+ height: 100%;
+ overflow: auto;
+ }
+ #dummy_content {
+ height: 101px;
+ background: yellow;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="outer_box">
+ <div id="inner_box">
+ <div id="dummy_content">
+ &nbsp;
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/301726-2-ref.html b/layout/reftests/bugs/301726-2-ref.html
new file mode 100644
index 0000000000..00fca7fd13
--- /dev/null
+++ b/layout/reftests/bugs/301726-2-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div style="overflow: scroll; visibility: hidden;
+ height: 100px;">
+ <div style="visibility: visible; height: 50px; background: green">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/301726-2.html b/layout/reftests/bugs/301726-2.html
new file mode 100644
index 0000000000..88f3dcb08d
--- /dev/null
+++ b/layout/reftests/bugs/301726-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div style="overflow: scroll; visibility: hidden;
+ height: 100px;">
+ <div style="visibility: visible; height: 50%; background: green">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/302379-ref.html b/layout/reftests/bugs/302379-ref.html
new file mode 100644
index 0000000000..a6a38c6dcd
--- /dev/null
+++ b/layout/reftests/bugs/302379-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title></head>
+<body>
+<table width="400">
+<tbody><tr>
+<td>
+<font><b>
+long string long string long string long string long string long string long string long string
+<select id="sel">
+<option value="b">short string</option>
+<option value="a">long string long string long string long string</option>
+</select>
+</b></font>
+</td>
+</tr>
+</tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/302379.html b/layout/reftests/bugs/302379.html
new file mode 100644
index 0000000000..6a1a091583
--- /dev/null
+++ b/layout/reftests/bugs/302379.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html class="reftest-wait"><head><title></title></head>
+<body onload="document.documentElement.className='';">
+<table width="400">
+<tbody><tr>
+<td>
+<font><b>
+long string long string long string long string long string long string long string long string
+<select id="sel">
+<option value="a">long string long string long string long string</option>
+<option value="b">short string</option>
+</select>
+</b></font>
+</td>
+</tr>
+</tbody></table>
+<script>
+sel = document.getElementById('sel');
+sel.selectedIndex=1;
+</script>
+</body></html>
diff --git a/layout/reftests/bugs/306630-1-ref.html b/layout/reftests/bugs/306630-1-ref.html
new file mode 100644
index 0000000000..5eb2f86dc4
--- /dev/null
+++ b/layout/reftests/bugs/306630-1-ref.html
@@ -0,0 +1,6 @@
+<frameset rows="170,*">
+ <!-- Have to specify charset=ISO-8859-1 because that's what javascript: will
+ do and the fonts used depend on the charset. -->
+<frame src="data:text/html;charset=ISO-8859-1,frame1">
+<frame src="data:text/html;charset=ISO-8859-1,frame2">
+</frameset>
diff --git a/layout/reftests/bugs/306630-1.html b/layout/reftests/bugs/306630-1.html
new file mode 100644
index 0000000000..a64d6cfdbd
--- /dev/null
+++ b/layout/reftests/bugs/306630-1.html
@@ -0,0 +1,4 @@
+<frameset rows="170,*">
+<frame src="javascript:'frame1'">
+<frame src="javascript:'frame2'">
+</frameset>
diff --git a/layout/reftests/bugs/306660-1-ref.html b/layout/reftests/bugs/306660-1-ref.html
new file mode 100644
index 0000000000..36929dcd57
--- /dev/null
+++ b/layout/reftests/bugs/306660-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<frameset rows="*,*">
+ <frame src="data:text/plain,PASS">
+ <frame src="data:text/plain,PASS">
+</frameset>
diff --git a/layout/reftests/bugs/306660-1.html b/layout/reftests/bugs/306660-1.html
new file mode 100644
index 0000000000..c877778d2e
--- /dev/null
+++ b/layout/reftests/bugs/306660-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<script>
+ document.documentElement.offsetWidth;
+</script>
+<frameset rows="*,*">
+ <frame src="data:text/plain,PASS">
+ <frame src="data:text/plain,PASS">
+</frameset>
diff --git a/layout/reftests/bugs/306660-2-ref.html b/layout/reftests/bugs/306660-2-ref.html
new file mode 100644
index 0000000000..2ea698faf1
--- /dev/null
+++ b/layout/reftests/bugs/306660-2-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<frameset rows="*">
+ <frame src="data:text/plain,PASS">
+</frameset>
diff --git a/layout/reftests/bugs/306660-2.html b/layout/reftests/bugs/306660-2.html
new file mode 100644
index 0000000000..0e46831a18
--- /dev/null
+++ b/layout/reftests/bugs/306660-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+ function loaded() {
+ var node = document.createElement("frame");
+ node.src = "data:text/plain,PASS";
+ node.setAttribute("onload", "document.documentElement.className = ''");
+ document.getElementById("x").appendChild(node);
+ }
+</script>
+</head>
+<frameset rows="*" id="x" onload="loaded()">
+</frameset>
+</html>
diff --git a/layout/reftests/bugs/306660-3-ref.html b/layout/reftests/bugs/306660-3-ref.html
new file mode 100644
index 0000000000..9457b7b064
--- /dev/null
+++ b/layout/reftests/bugs/306660-3-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<frameset rows="*,*"><frame src="data:text/plain,PASS"></frameset>
diff --git a/layout/reftests/bugs/306660-3.html b/layout/reftests/bugs/306660-3.html
new file mode 100644
index 0000000000..f8bd44235e
--- /dev/null
+++ b/layout/reftests/bugs/306660-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+ function loaded() {
+ var f = document.getElementById("x");
+ f.firstChild.remove();
+ }
+</script>
+</head>
+<frameset rows="*,*" id="x" onload="loaded()"
+ ><frame src="data:text/plain,PASS"
+ ><frame src="data:text/plain,PASS"></frameset>
+</html>
diff --git a/layout/reftests/bugs/307076-1-ref.html b/layout/reftests/bugs/307076-1-ref.html
new file mode 100644
index 0000000000..4e539f10b8
--- /dev/null
+++ b/layout/reftests/bugs/307076-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <body style="height: 100%">
+ <table style="height: 50%; width: 50%">
+ <tr>
+ <td id="x" style="position: relative; top: 25%; left: 25%">
+ <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
+ background: green"></div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307076-1.html b/layout/reftests/bugs/307076-1.html
new file mode 100644
index 0000000000..d27cad93af
--- /dev/null
+++ b/layout/reftests/bugs/307076-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <head>
+ <script>
+ function doIt() {
+ var d = document.createElement("div");
+ d.setAttribute("style",
+ "position: absolute; left: 0; right: 0; top: 0; " +
+ "bottom: 0; background: green");
+ document.getElementById("x").appendChild(d);
+ }
+ </script>
+ </head>
+ <body style="height: 100%" onload="doIt()">
+ <table style="height: 50%; width: 50%">
+ <tr>
+ <td id="x" style="position: relative; top: 25%; left: 25%">
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-1-ref.html b/layout/reftests/bugs/307102-1-ref.html
new file mode 100644
index 0000000000..efd13ed682
--- /dev/null
+++ b/layout/reftests/bugs/307102-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <img src="solidblue.png" style="position: absolute; top: 0; left: 0;">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-1.html b/layout/reftests/bugs/307102-1.html
new file mode 100644
index 0000000000..45ebc5a67c
--- /dev/null
+++ b/layout/reftests/bugs/307102-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <img src="solidblue.png"
+ style="position: absolute; top: 0; left: 0; right: 0">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-2-ref.html b/layout/reftests/bugs/307102-2-ref.html
new file mode 100644
index 0000000000..8b72bc0383
--- /dev/null
+++ b/layout/reftests/bugs/307102-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <input style="position: absolute; top: 0; left: 0;">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-2.html b/layout/reftests/bugs/307102-2.html
new file mode 100644
index 0000000000..cfeb6658a9
--- /dev/null
+++ b/layout/reftests/bugs/307102-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <input style="position: absolute; top: 0; left: 0; right: 0">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-3-ref.html b/layout/reftests/bugs/307102-3-ref.html
new file mode 100644
index 0000000000..c000b10a7e
--- /dev/null
+++ b/layout/reftests/bugs/307102-3-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <input type="submit"
+ style="position: absolute; top: 0; left: 0;">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-3.html b/layout/reftests/bugs/307102-3.html
new file mode 100644
index 0000000000..fa0fe7fdb7
--- /dev/null
+++ b/layout/reftests/bugs/307102-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <input type="submit"
+ style="position: absolute; top: 0; left: 0; right: 0">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-4-ref.html b/layout/reftests/bugs/307102-4-ref.html
new file mode 100644
index 0000000000..c8f6fb1a2e
--- /dev/null
+++ b/layout/reftests/bugs/307102-4-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <div style="position: absolute; top: 0; left: 0; width: 100px;
+ height: 100px; background: green">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/307102-4.html b/layout/reftests/bugs/307102-4.html
new file mode 100644
index 0000000000..85ba26ceed
--- /dev/null
+++ b/layout/reftests/bugs/307102-4.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute; width: 100px;">
+ <div style="position: absolute; top: 0; left: 0; right: 0;
+ height: 100px; background: green">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/308406-1-ref.html b/layout/reftests/bugs/308406-1-ref.html
new file mode 100644
index 0000000000..7dd1af8dba
--- /dev/null
+++ b/layout/reftests/bugs/308406-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+ <tbody style="height:200px; overflow:auto;">
+ <tr>
+ <td>Value </td>
+ <td>Value </td>
+ <td>Value </td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/308406-1.html b/layout/reftests/bugs/308406-1.html
new file mode 100644
index 0000000000..15b70d73c2
--- /dev/null
+++ b/layout/reftests/bugs/308406-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+ <tbody style="height:200px;">
+ <tr>
+ <td>Value </td>
+ <td>Value </td>
+ <td>Value </td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/308406-2-ref.html b/layout/reftests/bugs/308406-2-ref.html
new file mode 100644
index 0000000000..307e9d6655
--- /dev/null
+++ b/layout/reftests/bugs/308406-2-ref.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+<table>
+ <tbody style="height:200px; overflow:auto;">
+ <tr>
+ <td>Value </td>
+ <td>Value </td>
+ <td>Value </td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/308406-2.html b/layout/reftests/bugs/308406-2.html
new file mode 100644
index 0000000000..d2ab236a52
--- /dev/null
+++ b/layout/reftests/bugs/308406-2.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+<table>
+ <tbody style="height:200px;">
+ <tr>
+ <td>Value </td>
+ <td>Value </td>
+ <td>Value </td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/309550-1-ref.html b/layout/reftests/bugs/309550-1-ref.html
new file mode 100644
index 0000000000..005ca30428
--- /dev/null
+++ b/layout/reftests/bugs/309550-1-ref.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+fieldset {
+ margin: 0; padding: 0;
+ border: none;
+}
+#float {
+ float: left;
+ width: 10em; height: 5em;
+ background-color: green;
+}
+#sibling {
+ width: 5em; height: 10em;
+ background-color: blue;
+}
+</style>
+</head>
+<body>
+<fieldset>
+ <div id="float"></div>
+ <div id="sibling"></div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/309550-1.html b/layout/reftests/bugs/309550-1.html
new file mode 100644
index 0000000000..a161193d32
--- /dev/null
+++ b/layout/reftests/bugs/309550-1.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+fieldset {
+ margin: 0; padding: 0;
+ border: none;
+}
+#float {
+ float: left;
+ width: 10em; height: 5em;
+ background-color: green;
+}
+#clear {
+ clear: left;
+}
+#sibling {
+ width: 5em; height: 5em;
+ background-color: blue;
+}
+</style>
+</head>
+<body>
+<fieldset>
+ <div id="float"></div>
+ <div id="clear"></div>
+ <div id="sibling"></div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/311366-unknown-block-1-ref.html b/layout/reftests/bugs/311366-unknown-block-1-ref.html
new file mode 100644
index 0000000000..2bdd61718d
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+div p {background: green};
+</style>
+<div><p>This should have a green background
diff --git a/layout/reftests/bugs/311366-unknown-block-1.html b/layout/reftests/bugs/311366-unknown-block-1.html
new file mode 100644
index 0000000000..46b0cba832
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+section p {background: green};
+</style>
+<section><p>This should have a green background \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-block-2-ref.html b/layout/reftests/bugs/311366-unknown-block-2-ref.html
new file mode 100644
index 0000000000..858a0bd4ae
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-2-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+div > p {background-color:green;}
+</style>
+<div><i>foo</i><p>this should have a green background</p> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-block-2.html b/layout/reftests/bugs/311366-unknown-block-2.html
new file mode 100644
index 0000000000..51920456b7
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-2.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+section > p {background-color:green;}
+</style>
+<section><i>foo</i><p>this should have a green background</p> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-block-3-ref.html b/layout/reftests/bugs/311366-unknown-block-3-ref.html
new file mode 100644
index 0000000000..965bb04a71
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-3-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+div > p {background-color:green;}
+</style>
+<b><i><div><p>This should have a green background</p></div></b>foo</i> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-block-3.html b/layout/reftests/bugs/311366-unknown-block-3.html
new file mode 100644
index 0000000000..26b1cfdbf3
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-block-3.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+section > p {background-color:green;}
+</style>
+<b><i><section><p>This should have a green background</p></section></b>foo</i> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-inline-1-ref.html b/layout/reftests/bugs/311366-unknown-inline-1-ref.html
new file mode 100644
index 0000000000..0efd5b8576
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-inline-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+p > span {background-color:green;}
+</style>
+<p>foo <span>this should have a green background</span></p> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-inline-1.html b/layout/reftests/bugs/311366-unknown-inline-1.html
new file mode 100644
index 0000000000..1b503ac1b0
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-inline-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+p > m {background-color:green;}
+</style>
+<p>foo <m>this should have a green background</m></p> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-inline-2-ref.html b/layout/reftests/bugs/311366-unknown-inline-2-ref.html
new file mode 100644
index 0000000000..149025eb97
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-inline-2-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+i > span {background-color:green;}
+</style>
+<i>foo <span>this should have a green background</span></i> \ No newline at end of file
diff --git a/layout/reftests/bugs/311366-unknown-inline-2.html b/layout/reftests/bugs/311366-unknown-inline-2.html
new file mode 100644
index 0000000000..5640710c88
--- /dev/null
+++ b/layout/reftests/bugs/311366-unknown-inline-2.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+i > m {background-color:green;}
+</style>
+<i>foo <m>this should have a green background</m></i> \ No newline at end of file
diff --git a/layout/reftests/bugs/311822-1-ref-a.html b/layout/reftests/bugs/311822-1-ref-a.html
new file mode 100644
index 0000000000..86d247e670
--- /dev/null
+++ b/layout/reftests/bugs/311822-1-ref-a.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>Testcase, Mozilla bug 311822 (reference 1)</title>
+</head>
+
+<body>
+
+<table >
+ <caption style="font-weight: bold"><b>table </b><b>caption</b></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><em>table </em><em>caption</em></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><i>table </i><i>caption</i></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption><span>table </span><span>caption</span></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/311822-1-ref-b.html b/layout/reftests/bugs/311822-1-ref-b.html
new file mode 100644
index 0000000000..ff3ffec633
--- /dev/null
+++ b/layout/reftests/bugs/311822-1-ref-b.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>Testcase, Mozilla bug 311822 (reference 2)</title>
+</head>
+
+<body>
+
+<table >
+ <caption style="font-weight: bold"><b>table</b><b> caption</b></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><em>table</em><em> caption</em></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><i>table</i><i> caption</i></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption><span>table</span><span> caption</span></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/311822-1.html b/layout/reftests/bugs/311822-1.html
new file mode 100644
index 0000000000..15c946e0f6
--- /dev/null
+++ b/layout/reftests/bugs/311822-1.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>Testcase, Mozilla bug 311822</title>
+</head>
+
+<body>
+
+<table >
+ <caption style="font-weight:bold"><b>table</b> <b>caption</b></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><em>table</em> <em>caption</em></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption style="font-style: italic"><i>table</i> <i>caption</i></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+<table >
+ <caption><span>table</span> <span>caption</span></caption>
+ <tr>
+ <th >title</th>
+ </tr>
+ <tr>
+ <td >Content of cell</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-1-ref.html b/layout/reftests/bugs/315620-1-ref.html
new file mode 100644
index 0000000000..b2a4432268
--- /dev/null
+++ b/layout/reftests/bugs/315620-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <style>
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ </style>
+</head>
+<body>
+ <div style="display: none"></div>
+ <script>
+ var div = document.getElementsByTagName("div")[0];
+ div.style.display = "";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-1a.html b/layout/reftests/bugs/315620-1a.html
new file mode 100644
index 0000000000..659928af02
--- /dev/null
+++ b/layout/reftests/bugs/315620-1a.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+ <style>
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ </style>
+</head>
+<body>
+ <div style="display: none"></div>
+ <script>
+ var div = document.getElementsByTagName("div")[0];
+ div.appendChild(document.createTextNode(""));
+ div.style.display = "";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-1b.html b/layout/reftests/bugs/315620-1b.html
new file mode 100644
index 0000000000..71aa8925d6
--- /dev/null
+++ b/layout/reftests/bugs/315620-1b.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+ <style>
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ </style>
+</head>
+<body>
+ <div style="display: none"></div>
+ <script>
+ var div = document.getElementsByTagName("div")[0];
+ div.appendChild(document.createTextNode("aa"));
+ div.style.display = "";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-2-ref.xhtml b/layout/reftests/bugs/315620-2-ref.xhtml
new file mode 100644
index 0000000000..9e0e5613f5
--- /dev/null
+++ b/layout/reftests/bugs/315620-2-ref.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <style>
+ <![CDATA[
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ ]]>
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-2a.xhtml b/layout/reftests/bugs/315620-2a.xhtml
new file mode 100644
index 0000000000..e41d22ae18
--- /dev/null
+++ b/layout/reftests/bugs/315620-2a.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <style>
+ <![CDATA[
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ ]]>
+ </style>
+</head>
+<body>
+ <div><![CDATA[]]></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315620-2b.xhtml b/layout/reftests/bugs/315620-2b.xhtml
new file mode 100644
index 0000000000..8421db2547
--- /dev/null
+++ b/layout/reftests/bugs/315620-2b.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <style>
+ <![CDATA[
+ div { background: red; height: 3em; }
+ div:empty { background: lime; }
+ ]]>
+ </style>
+</head>
+<body>
+ <div><![CDATA[ ]]></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/315920-1-ref.html b/layout/reftests/bugs/315920-1-ref.html
new file mode 100644
index 0000000000..8a67617547
--- /dev/null
+++ b/layout/reftests/bugs/315920-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <select size="2">
+ <option id="one" style="color: green" disabled="disabled">Should be green</option>
+ <option id="two" style="color: blue">Should be blue</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-10-ref.html b/layout/reftests/bugs/315920-10-ref.html
new file mode 100644
index 0000000000..25cb5e4ea1
--- /dev/null
+++ b/layout/reftests/bugs/315920-10-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <form>
+ <br>
+ <input type="radio" name="group1" id="two" checked="true" value="2"/>
+ <label style="color: green" for="two">Should be no red</label>
+ <input type="radio" name="group1" id="three" value="3"/>
+ <label style="color: green" for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-10.html b/layout/reftests/bugs/315920-10.html
new file mode 100644
index 0000000000..88c845c7a0
--- /dev/null
+++ b/layout/reftests/bugs/315920-10.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:checked ~ label {color: green}
+ input[checked]:checked:not(:default) + label {color: red}
+ </style>
+ </head>
+ <body onload='var e1 = document.getElementById("one");
+ var l1 = document.getElementById("l1");
+ e1.parentNode.removeChild(e1);
+ l1.parentNode.removeChild(l1);
+ document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1" default="true" checked/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ <input type="radio" name="group1" id="three" value="3"/>
+ <label for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-11-ref.html b/layout/reftests/bugs/315920-11-ref.html
new file mode 100644
index 0000000000..37ad821c73
--- /dev/null
+++ b/layout/reftests/bugs/315920-11-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <form>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label style="color: green" for="two">Should be no red</label><br>
+ <input type="radio" name="group1" id="three" value="3"/>
+ <label style="color: green" for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-11.html b/layout/reftests/bugs/315920-11.html
new file mode 100644
index 0000000000..22d09f79e5
--- /dev/null
+++ b/layout/reftests/bugs/315920-11.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:checked:default ~ label {color: red}
+ input:not(:default):not(:checked):not([checked]) ~ label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").removeAttribute("checked");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1" default="true" checked/>
+ <label for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-12-ref.html b/layout/reftests/bugs/315920-12-ref.html
new file mode 100644
index 0000000000..9795eef941
--- /dev/null
+++ b/layout/reftests/bugs/315920-12-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1" checked="checked"/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label id="l2" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-12a.html b/layout/reftests/bugs/315920-12a.html
new file mode 100644
index 0000000000..6a4f0039b0
--- /dev/null
+++ b/layout/reftests/bugs/315920-12a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input:default + label {color: green}
+ input:not(:checked):not([checked]):not(:default) + label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").setAttribute("checked", "true");
+ document.getElementById("two").removeAttribute("checked");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2" checked="true"/>
+ <label id="l2" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-12b.html b/layout/reftests/bugs/315920-12b.html
new file mode 100644
index 0000000000..b8036f619b
--- /dev/null
+++ b/layout/reftests/bugs/315920-12b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:default:checked ~ label {color: green}
+
+ </style>
+ </head>
+ <body onload='var e1 = document.getElementById("one");
+ e1.setAttribute("checked", "false");
+ document.getElementById("two").removeAttribute("checked");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2" checked/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-12c.html b/layout/reftests/bugs/315920-12c.html
new file mode 100644
index 0000000000..66fe76de1b
--- /dev/null
+++ b/layout/reftests/bugs/315920-12c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input:not(:default):not(:checked):not([checked]) ~ label {color:red}
+ input[checked]:checked:default ~ label {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").setAttribute("checked", "checked");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-13-ref.html b/layout/reftests/bugs/315920-13-ref.html
new file mode 100644
index 0000000000..20c8957615
--- /dev/null
+++ b/layout/reftests/bugs/315920-13-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2" checked="checked"/>
+ <label id="l2" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-13a.html b/layout/reftests/bugs/315920-13a.html
new file mode 100644
index 0000000000..7d852d2e7b
--- /dev/null
+++ b/layout/reftests/bugs/315920-13a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:default + label {color: green}
+ input:not(:default):not([checked]) + label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-13b.html b/layout/reftests/bugs/315920-13b.html
new file mode 100644
index 0000000000..b6f8ba910a
--- /dev/null
+++ b/layout/reftests/bugs/315920-13b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:checked:default + label {color: green}
+ input:not(:checked) + label {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-14-ref.html b/layout/reftests/bugs/315920-14-ref.html
new file mode 100644
index 0000000000..8557928dbd
--- /dev/null
+++ b/layout/reftests/bugs/315920-14-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form id="form"><input type="checkbox" id="two" checked="true"/>
+ <label for="two" style="color: green">Should be no red</label><input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one" style="color: green">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-14.html b/layout/reftests/bugs/315920-14.html
new file mode 100644
index 0000000000..7c0445fa8b
--- /dev/null
+++ b/layout/reftests/bugs/315920-14.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:checked:default ~ label {color: green}
+ </style>
+ </head>
+ <body onload='var form = document.getElementById("form");
+ var input2 = document.createElement("input");
+ input2.setAttribute("type", "checkbox");
+ input2.setAttribute("id", "two");
+ input2.setAttribute("checked", "true");
+ form.insertBefore(input2, form.firstChild);
+ var label2 = document.createElement("label");
+ label2.setAttribute("for", "two");
+ var text2 = document.createTextNode("Should be no red");
+ label2.appendChild(text2);
+ form.insertBefore(label2, document.getElementById("one"));'>
+ <form id="form">
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-15-ref.html b/layout/reftests/bugs/315920-15-ref.html
new file mode 100644
index 0000000000..e603c8f451
--- /dev/null
+++ b/layout/reftests/bugs/315920-15-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <br>
+ <input type="checkbox" name="group1" id="two" value="2" checked="true"/>
+ <label for="two">Should be no red</label>
+ <input type="checkbox" name="group1" id="three" value="3"/>
+ <label for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-15.html b/layout/reftests/bugs/315920-15.html
new file mode 100644
index 0000000000..026f6fb763
--- /dev/null
+++ b/layout/reftests/bugs/315920-15.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:checked ~ label {color: green}
+ input[checked]:checked:not(:default) + label {color: red}
+ </style>
+ </head>
+ <body onload='var e1 = document.getElementById("one");
+ var l1 = document.getElementById("l1");
+ e1.parentNode.removeChild(e1);
+ l1.parentNode.removeChild(l1);
+ document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1" default="true" checked/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ <input type="checkbox" name="group1" id="three" value="3"/>
+ <label for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-16-ref.html b/layout/reftests/bugs/315920-16-ref.html
new file mode 100644
index 0000000000..f55cf2ade1
--- /dev/null
+++ b/layout/reftests/bugs/315920-16-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-16.html b/layout/reftests/bugs/315920-16.html
new file mode 100644
index 0000000000..dcd7cf4b7e
--- /dev/null
+++ b/layout/reftests/bugs/315920-16.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:checked:default ~ label {color: red}
+ input:not(:default):not(:checked):not([checked]) ~ label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").removeAttribute("checked");'>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1" checked/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-17-ref.html b/layout/reftests/bugs/315920-17-ref.html
new file mode 100644
index 0000000000..3e655d40b3
--- /dev/null
+++ b/layout/reftests/bugs/315920-17-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1" checked="checked"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="three" value="3"/>
+ <label for="three">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-17.html b/layout/reftests/bugs/315920-17.html
new file mode 100644
index 0000000000..6d9180144b
--- /dev/null
+++ b/layout/reftests/bugs/315920-17.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ input ~ label {color: red}
+ input:not(:default):not(:checked):not([checked]) ~ label {color:red}
+ input[checked]:checked:default ~ input:not(:checked):not([checked]):not(:default) + label {color: green}
+ input:checked:default + label {color: green}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="checkbox" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label><br>
+ <input type="checkbox" name="group1" id="three" value="3"/>
+ <label for="three">Should be no red</label>
+ </form>
+<script>
+function doTest() {
+ document.getElementById("two").setAttribute("checked", "true");
+ document.getElementById("one").setAttribute("checked", "checked");
+ document.getElementById("two").removeAttribute("checked");
+ setTimeout(function () { document.documentElement.removeAttribute("class"); }, 0);
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18-ref.html b/layout/reftests/bugs/315920-18-ref.html
new file mode 100644
index 0000000000..1898999190
--- /dev/null
+++ b/layout/reftests/bugs/315920-18-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <label style="color: green" for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18a.html b/layout/reftests/bugs/315920-18a.html
new file mode 100644
index 0000000000..6ee39dce01
--- /dev/null
+++ b/layout/reftests/bugs/315920-18a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ img:not(:-moz-broken) ~ label {color: green}
+ img { display: none; }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("src", "solidblue.png");'>
+ <img src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18b.html b/layout/reftests/bugs/315920-18b.html
new file mode 100644
index 0000000000..37e46efc1a
--- /dev/null
+++ b/layout/reftests/bugs/315920-18b.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ img:-moz-broken ~ label {color: green}
+ label {color: red}
+ img { display: none; }
+ </style>
+ </head>
+ <body>
+ <img src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18c.html b/layout/reftests/bugs/315920-18c.html
new file mode 100644
index 0000000000..ad70adf9ed
--- /dev/null
+++ b/layout/reftests/bugs/315920-18c.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ input:not(:-moz-broken) ~ label {color: green}
+ input { display: none }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("src", "solidblue.png");'>
+ <input type="image" src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18d.html b/layout/reftests/bugs/315920-18d.html
new file mode 100644
index 0000000000..baa0495ddc
--- /dev/null
+++ b/layout/reftests/bugs/315920-18d.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ object:not(:-moz-broken) ~ label {color: green}
+ object { display: none }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("data", "solidblue.png");'>
+ <object type="image/png" data="no-such-scheme:nothing" id="ffximage"></object>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18e.html b/layout/reftests/bugs/315920-18e.html
new file mode 100644
index 0000000000..f1b9dc589e
--- /dev/null
+++ b/layout/reftests/bugs/315920-18e.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ img[src*="solidblue"]:not(:-moz-broken) + label {color: green}
+ img { display: none; }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("src", "solidblue.png");'>
+ <img src="solidblue.png">
+ <img src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18f.html b/layout/reftests/bugs/315920-18f.html
new file mode 100644
index 0000000000..bfa37dcab9
--- /dev/null
+++ b/layout/reftests/bugs/315920-18f.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ input[src*="solidblue"]:not(:-moz-broken) + label {color: green}
+ input, img { display: none }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("src", "solidblue.png");'>
+ <img src="solidblue.png">
+ <input type="image" src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18g.html b/layout/reftests/bugs/315920-18g.html
new file mode 100644
index 0000000000..b98e60ace9
--- /dev/null
+++ b/layout/reftests/bugs/315920-18g.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ label {color: red}
+ object[data*="solidblue"]:not(:-moz-broken) + label {color: green}
+ object, img { display: none }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.onload =
+ function() { document.documentElement.className = ""; };
+ i1.setAttribute("data", "solidblue.png");'>
+ <img src="solidblue.png">
+ <object type="image/png" data="no-such-scheme:nothing" id="ffximage"></object>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18h.html b/layout/reftests/bugs/315920-18h.html
new file mode 100644
index 0000000000..227d5bbd0a
--- /dev/null
+++ b/layout/reftests/bugs/315920-18h.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input:-moz-broken + label {color: red}
+ label {color: green}
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <input type="text" src="solidblue.png" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-18i.html b/layout/reftests/bugs/315920-18i.html
new file mode 100644
index 0000000000..731476ae54
--- /dev/null
+++ b/layout/reftests/bugs/315920-18i.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input:-moz-broken + label {color: red}
+ label {color: green}
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <input type="text" src="no-such-scheme:nothing" id="ffximage"/>
+ <label for="ffximage">Text should be green</label>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-19-ref.html b/layout/reftests/bugs/315920-19-ref.html
new file mode 100644
index 0000000000..4c65731f51
--- /dev/null
+++ b/layout/reftests/bugs/315920-19-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body
+ <label for="ffximage" style="color: green">Should be no red</label>
+ <br>
+ <span style="color: green" >Should be no red</span>
+ </body>
+</html
diff --git a/layout/reftests/bugs/315920-19.html b/layout/reftests/bugs/315920-19.html
new file mode 100644
index 0000000000..efa3c2e545
--- /dev/null
+++ b/layout/reftests/bugs/315920-19.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: red}
+ label {color: red}
+ input[disabled]:disabled ~ span {color: green}
+ input[disabled]:disabled + label {color: green}
+ input { display: none; }
+ </style>
+ </head>
+ <body onload='var i1 = document.getElementById("ffximage");
+ i1.setAttribute("disabled", "disabled");'>
+ <input type="image" id="ffximage"/>
+ <label for="ffximage">Should be no red</label>
+ <br>
+ <span>Should be no red</span>
+ </body>
+</html
diff --git a/layout/reftests/bugs/315920-1a.html b/layout/reftests/bugs/315920-1a.html
new file mode 100644
index 0000000000..f7aeabca3a
--- /dev/null
+++ b/layout/reftests/bugs/315920-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: blue}
+ option:disabled {color: green}
+ option#one:not([disabled]):not(:disabled) + option#two {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <select size="2">
+ <option id="one">Should be green</option>
+ <option id="two">Should be blue</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-1b.html b/layout/reftests/bugs/315920-1b.html
new file mode 100644
index 0000000000..ec079def88
--- /dev/null
+++ b/layout/reftests/bugs/315920-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: blue}
+ option:disabled {color: green}
+ option#one:not([disabled]):enabled + option#two {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <select size="2">
+ <option id="one">Should be green</option>
+ <option id="two">Should be blue</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-1c.html b/layout/reftests/bugs/315920-1c.html
new file mode 100644
index 0000000000..c7fa4ce46f
--- /dev/null
+++ b/layout/reftests/bugs/315920-1c.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <select size="2">
+ <option id="one" style="color: green" disabled="disabled">Should be green</option>
+ <option id="two" style="color: red">Should be blue</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-1d.html b/layout/reftests/bugs/315920-1d.html
new file mode 100644
index 0000000000..889fa7b3d2
--- /dev/null
+++ b/layout/reftests/bugs/315920-1d.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <select size="2">
+ <option id="one" style="color: red" disabled="disabled">Should be green</option>
+ <option id="two" style="color: blue">Should be blue</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-2-ref.html b/layout/reftests/bugs/315920-2-ref.html
new file mode 100644
index 0000000000..104f5770e2
--- /dev/null
+++ b/layout/reftests/bugs/315920-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: green}
+ </style>
+ </head>
+ <body>
+ <select size="2">
+ <option id="one" disabled="disabled">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-20-ref.svg b/layout/reftests/bugs/315920-20-ref.svg
new file mode 100644
index 0000000000..a3ed027e57
--- /dev/null
+++ b/layout/reftests/bugs/315920-20-ref.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="4in" height="3in" version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <desc>This graphic links to an external image
+ </desc>
+ <image id="i1" x="200" y="200" width="100px" height="80px"
+ xlink:href="solidblue.png">
+ </image>
+ <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green"/>
+</svg>
diff --git a/layout/reftests/bugs/315920-20-style.css b/layout/reftests/bugs/315920-20-style.css
new file mode 100644
index 0000000000..45df745a8c
--- /dev/null
+++ b/layout/reftests/bugs/315920-20-style.css
@@ -0,0 +1,2 @@
+image:not(:-moz-broken) ~ circle {fill: green}
+circle {fill: red}
diff --git a/layout/reftests/bugs/315920-20.svg b/layout/reftests/bugs/315920-20.svg
new file mode 100644
index 0000000000..8922b0dcce
--- /dev/null
+++ b/layout/reftests/bugs/315920-20.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" standalone="no"?>
+<?xml-stylesheet href="315920-20-style.css" type="text/css"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="4in" height="3in" version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ class="reftest-wait">
+ <desc>This graphic links to an external image
+ </desc>
+ <script type="text/javascript"> <![CDATA[
+ function onloadHandler() {
+ var image = document.getElementById("i1");
+ image.addEventListener("load",
+ function() {
+ document.documentElement.removeAttribute("class");
+ },
+ false);
+ image.setAttributeNS("http://www.w3.org/1999/xlink",
+ "href", "solidblue.png");
+ }
+ window.addEventListener("load", onloadHandler, false);
+ ]]>
+ </script>
+ <image id="i1" x="200" y="200" width="100px" height="80px"
+ xlink:href="no-such-scheme:nothing">
+ </image>
+ <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
+</svg>
diff --git a/layout/reftests/bugs/315920-21-ref.svg b/layout/reftests/bugs/315920-21-ref.svg
new file mode 100644
index 0000000000..042f8279da
--- /dev/null
+++ b/layout/reftests/bugs/315920-21-ref.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="4in" height="3in" version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <desc>This graphic links to an external image
+ </desc>
+ <image id="i1" x="200" y="200" width="100px" height="80px"
+ xlink:href="broken.png">
+ </image>
+ <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green"/>
+</svg>
diff --git a/layout/reftests/bugs/315920-21-style.css b/layout/reftests/bugs/315920-21-style.css
new file mode 100644
index 0000000000..bd2df2df34
--- /dev/null
+++ b/layout/reftests/bugs/315920-21-style.css
@@ -0,0 +1,2 @@
+circle {fill: red}
+image:-moz-broken ~ circle {fill: green}
diff --git a/layout/reftests/bugs/315920-21.svg b/layout/reftests/bugs/315920-21.svg
new file mode 100644
index 0000000000..2f79a06c59
--- /dev/null
+++ b/layout/reftests/bugs/315920-21.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" standalone="no"?>
+<?xml-stylesheet href="315920-21-style.css" type="text/css"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="4in" height="3in" version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ class="reftest-wait">
+ <desc>This graphic links to an external image
+ </desc>
+ <script type="text/javascript"> <![CDATA[
+ function onloadHandler() {
+ var image = document.getElementById("i1");
+ image.addEventListener("error",
+ function() {
+ document.documentElement.removeAttribute("class");
+ },
+ false);
+ image.setAttributeNS("http://www.w3.org/1999/xlink",
+ "href", "no-such-scheme:nothing");
+ }
+ window.addEventListener("load", onloadHandler, false);
+ ]]>
+ </script>
+ <image id="i1" x="200" y="200" width="100px" height="80px">
+ </image>
+ <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
+</svg>
diff --git a/layout/reftests/bugs/315920-22-ref.html b/layout/reftests/bugs/315920-22-ref.html
new file mode 100644
index 0000000000..e06aa6223e
--- /dev/null
+++ b/layout/reftests/bugs/315920-22-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <div>
+ <input id="one" disabled="disabled"/>
+ <label for="one">Should be no red</label>
+ </div>
+ <div>
+ <input id="two"/>
+ <label for="two">Should be no red</label>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-22.html b/layout/reftests/bugs/315920-22.html
new file mode 100644
index 0000000000..5f7e77f692
--- /dev/null
+++ b/layout/reftests/bugs/315920-22.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ #one[disabled]:disabled + label {color: green}
+ #two:not([disabled]):not(:disabled) + label {color: green}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");
+ document.getElementById("two").removeAttribute("disabled")'>
+ <div>
+ <input id="one"/>
+ <label for="one">Should be no red</label>
+ </div>
+ <div>
+ <input id="two" disabled="disabled"/>
+ <label for="two">Should be no red</label>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-23-ref.html b/layout/reftests/bugs/315920-23-ref.html
new file mode 100644
index 0000000000..e06aa6223e
--- /dev/null
+++ b/layout/reftests/bugs/315920-23-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: green}
+ </style>
+ </head>
+ <body>
+ <div>
+ <input id="one" disabled="disabled"/>
+ <label for="one">Should be no red</label>
+ </div>
+ <div>
+ <input id="two"/>
+ <label for="two">Should be no red</label>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-23.html b/layout/reftests/bugs/315920-23.html
new file mode 100644
index 0000000000..dc3c2e0ede
--- /dev/null
+++ b/layout/reftests/bugs/315920-23.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ #one[disabled]:not(:enabled) + label {color: green}
+ #two:not([disabled]):enabled + label {color: green}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");
+ document.getElementById("two").removeAttribute("disabled")'>
+ <div>
+ <input id="one"/>
+ <label for="one">Should be no red</label>
+ </div>
+ <div>
+ <input id="two" disabled="disabled"/>
+ <label for="two">Should be no red</label>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-24-ref.html b/layout/reftests/bugs/315920-24-ref.html
new file mode 100644
index 0000000000..f5543ced78
--- /dev/null
+++ b/layout/reftests/bugs/315920-24-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: green}
+ </style>
+ </head>
+
+ <body>
+ <span>Should be no red</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-24.html b/layout/reftests/bugs/315920-24.html
new file mode 100644
index 0000000000..c80a8b0733
--- /dev/null
+++ b/layout/reftests/bugs/315920-24.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: red}
+ input[type=text][disabled]:disabled + span {color: green}
+ input[type=submit]:disabled + span {color: red}
+ input { display: none }
+ </style>
+ </head>
+
+ <body onload='document.getElementById("one").setAttribute("disabled", "disabled");
+ document.getElementById("one").setAttribute("type", "text");'>
+ <input type="submit" id="one"/>
+ <span>Should be no red </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-25-ref.html b/layout/reftests/bugs/315920-25-ref.html
new file mode 100644
index 0000000000..f3dd889a0e
--- /dev/null
+++ b/layout/reftests/bugs/315920-25-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: green}
+ </style>
+ </head>
+
+ <body>
+ <span>Should be no red </span><br>
+ <span>Should be no red </span><br>
+ <span style="color:blue">Should be no red </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-25.html b/layout/reftests/bugs/315920-25.html
new file mode 100644
index 0000000000..7c523b0390
--- /dev/null
+++ b/layout/reftests/bugs/315920-25.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: red}
+ input[type=submit]:not([disabled]):not(:disabled) ~ span {color: green}
+ input[type=submit][disabled]:disabled + span {color: blue}
+ input[type=text] + span {color: red}
+ input { display: none }
+ </style>
+ </head>
+
+ <body onload='document.getElementById("one").setAttribute("type", "submit");
+ document.getElementById("two").setAttribute("type", "submit");
+ document.getElementById("two").setAttribute("disabled", "disabled");
+ document.getElementById("one").removeAttribute("disabled");'>
+ <input type="text" id="one" disabled="disabled"/>
+ <span>Should be no red </span><br>
+ <span>Should be no red </span><br>
+ <input type="text" id="two"/>
+ <span>Should be no red </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-26-ref.html b/layout/reftests/bugs/315920-26-ref.html
new file mode 100644
index 0000000000..b8cc594be8
--- /dev/null
+++ b/layout/reftests/bugs/315920-26-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: green}
+ </style>
+ </head>
+
+ <body>
+ <div>
+ <input type="checkbox" id="one" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ <div>
+ <input type="checkbox" id="one" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-26.html b/layout/reftests/bugs/315920-26.html
new file mode 100644
index 0000000000..161e5fcac2
--- /dev/null
+++ b/layout/reftests/bugs/315920-26.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ span {color: red}
+ #one:checked + span {color: green}
+ #two:default + span {color: green}
+ </style>
+ </head>
+
+ <body onload='document.getElementById("one").setAttribute("type", "checkbox");
+ document.getElementById("two").setAttribute("type", "checkbox");
+ document.documentElement.removeAttribute("class");'>
+ <div>
+ <input type="text" id="one" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ <div>
+ <input type="text" id="two" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-27-ref.html b/layout/reftests/bugs/315920-27-ref.html
new file mode 100644
index 0000000000..c554059754
--- /dev/null
+++ b/layout/reftests/bugs/315920-27-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: green}
+ </style>
+ </head>
+
+ <body>
+ <div>
+ <input id="one" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ <div>
+ <input id="one" checked="checked"/>
+ <span>Should be no red </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-27.html b/layout/reftests/bugs/315920-27.html
new file mode 100644
index 0000000000..069167ca22
--- /dev/null
+++ b/layout/reftests/bugs/315920-27.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {color: green}
+ #one:checked + span {color: red}
+ #two:default + span {color: red}
+ </style>
+ </head>
+
+ <body onload='document.getElementById("one").removeAttribute("type");
+ document.getElementById("two").removeAttribute("type");'>
+ <div>
+ <input type="text" id="one" checked="checked" type="checkbox"/>
+ <span>Should be no red </span>
+ </div>
+ <div>
+ <input type="text" id="two" checked="checked" type="checkbox"/>
+ <span>Should be no red </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-28-ref.html b/layout/reftests/bugs/315920-28-ref.html
new file mode 100644
index 0000000000..4a914112c7
--- /dev/null
+++ b/layout/reftests/bugs/315920-28-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select size="7">
+ <optgroup id="ogone" label="opt group 1" style="color:green" disabled="disabled">
+ <option id="one" style="color:green">Should be no red</option>
+ <option id="two" style="color:green">Should be no red</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="opt group 2" style="color:blue">
+ <option id=three style="color:blue">Should be no red</option>
+ <option id=four style="color:blue">Should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-28a.html b/layout/reftests/bugs/315920-28a.html
new file mode 100644
index 0000000000..7934a4f1ba
--- /dev/null
+++ b/layout/reftests/bugs/315920-28a.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ optgroup {color: red}
+ option {color: red}
+ optgroup[disabled]:disabled {color: green}
+ optgroup[disabled]:disabled + optgroup:not([disabled]):not(:disabled) {color: blue}
+ optgroup[disabled]:disabled > option{color: green}
+ optgroup:not([disabled]):not(:disabled) > option {color: blue}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogone").setAttribute("disabled", "disabled");'>
+ <select size="7">
+ <optgroup id="ogone" label="opt group 1">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="opt group 2">
+ <option id=three>Should be no red</option>
+ <option id=four>Should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-28b.html b/layout/reftests/bugs/315920-28b.html
new file mode 100644
index 0000000000..a36697ec65
--- /dev/null
+++ b/layout/reftests/bugs/315920-28b.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ optgroup {color: red}
+ option {color: red}
+ optgroup[disabled]:disabled {color: green}
+ optgroup[disabled]:disabled + optgroup:not([disabled]):not(:disabled) {color: blue}
+ optgroup[disabled]:disabled > option{color: green}
+ optgroup:not([disabled]):not(:disabled) > option {color: blue}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogtwo").removeAttribute("disabled");'>
+ <select size="7">
+ <optgroup id="ogone" label="opt group 1" disabled="disabled">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="opt group 2" disabled="disabled">
+ <option id=three>Should be no red</option>
+ <option id=four>Should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-28c.html b/layout/reftests/bugs/315920-28c.html
new file mode 100644
index 0000000000..6448700012
--- /dev/null
+++ b/layout/reftests/bugs/315920-28c.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ optgroup {color: red}
+ option {color: red}
+ optgroup[disabled]:disabled {color: green}
+ optgroup[disabled]:disabled + optgroup:not([disabled]):not(:disabled) {color: blue}
+ optgroup[disabled]:disabled > option{color: green}
+ optgroup:not([disabled]):not(:disabled) > option {color: blue}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogtwo").removeAttribute("disabled");
+ document.getElementById("ogone").setAttribute("disabled", "disabled");'>
+ <select size="7">
+ <optgroup id="ogone" label="opt group 1">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="opt group 2" disabled="disabled">
+ <option id=three>Should be no red</option>
+ <option id=four>Should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-29-ref.html b/layout/reftests/bugs/315920-29-ref.html
new file mode 100644
index 0000000000..be0ed06137
--- /dev/null
+++ b/layout/reftests/bugs/315920-29-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Reference for 315920-11 d, e</title>
+ <style> optgroup {color:green} </style>
+ </head>
+ <body>
+ <select size="2">
+ <optgroup id="ogone" label="There should be no red">
+ </optgroup>
+ <optgroup id="ogtwo" label="There should be no red">
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-29a.html b/layout/reftests/bugs/315920-29a.html
new file mode 100644
index 0000000000..afb89d859c
--- /dev/null
+++ b/layout/reftests/bugs/315920-29a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ optgroup {color: red}
+ optgroup[disabled]:disabled {color: red}
+ optgroup:not([disabled]):not(:disabled) + optgroup {color: green}
+ optgroup:not(:disabled) {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogone").removeAttribute("disabled");'>
+ <select size="2">
+ <optgroup id="ogone" label="There should be no red" disabled="disabled">
+ </optgroup>
+ <optgroup id="ogtwo" label="There should be no red">
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-29b.html b/layout/reftests/bugs/315920-29b.html
new file mode 100644
index 0000000000..5edafcc708
--- /dev/null
+++ b/layout/reftests/bugs/315920-29b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ optgroup {color: red}
+ optgroup:disabled {color: green}
+ optgroup[disabled]:disabled + optgroup {color: green}
+ optgroup:not(:disabled) {color: red}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogone").setAttribute("disabled", "disabled");'>
+ <select size="2">
+ <optgroup id="ogone" label="There should be no red">
+ </optgroup>
+ <optgroup id="ogtwo" label="There should be no red">
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-2a.html b/layout/reftests/bugs/315920-2a.html
new file mode 100644
index 0000000000..17215cbe67
--- /dev/null
+++ b/layout/reftests/bugs/315920-2a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: red}
+ option:disabled {color: green}
+ option[disabled]:disabled + option {color: green}
+ option:not([disabled]):not(:disabled) + option {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <select size="2">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-2b.html b/layout/reftests/bugs/315920-2b.html
new file mode 100644
index 0000000000..51104e4a1b
--- /dev/null
+++ b/layout/reftests/bugs/315920-2b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: green}
+ option[selected] {color: red}
+ option:not([selected]):not(:default) + option {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").removeAttribute("selected");'>
+ <select size="2">
+ <option id="one" selected="selected">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-2c.html b/layout/reftests/bugs/315920-2c.html
new file mode 100644
index 0000000000..3924c7f867
--- /dev/null
+++ b/layout/reftests/bugs/315920-2c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: red}
+ option:disabled {color: green}
+ option[disabled]:not(:enabled) + option {color: green}
+ option:not([disabled]):enabled + option {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <select size="2">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3-ref.html b/layout/reftests/bugs/315920-3-ref.html
new file mode 100644
index 0000000000..fadea9ef59
--- /dev/null
+++ b/layout/reftests/bugs/315920-3-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="button" id="one" disabled="true" style="color: green" value="Should be no red"/>
+ <input type="button" id="two" style="color: green" value="Should be no red"/>
+ </body>
+</html>
+</html>
diff --git a/layout/reftests/bugs/315920-30-ref.html b/layout/reftests/bugs/315920-30-ref.html
new file mode 100644
index 0000000000..7599eaf8ff
--- /dev/null
+++ b/layout/reftests/bugs/315920-30-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Reference for 315920-11f</title>
+ <style>
+ option {color: green}
+ optgroup {color: green}
+ </style>
+ </head>
+ <body>
+ <select size="7">
+ <optgroup id="ogone" label="There should be no red" disabled="disabled">
+ <option id="one" style="color:blue" selected="selected">This should be blue</option>
+ <option id="two" style="color:blue">This should be blue</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="There should be no red">
+ <option id="three">There should be no red</option>
+ <option id="four">There should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-30.html b/layout/reftests/bugs/315920-30.html
new file mode 100644
index 0000000000..4e5e87f744
--- /dev/null
+++ b/layout/reftests/bugs/315920-30.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: green}
+ optgroup {color: red}
+ optgroup:disabled {color: green}
+ optgroup[disabled]:disabled + optgroup {color: green}
+ optgroup:not(:disabled) {color: red}
+ optgroup[disabled]:disabled > option:default {color:blue}
+ optgroup:disabled > option:default ~ option {color:blue}
+ </style>
+ </head>
+ <body onload='document.getElementById("ogone").setAttribute("disabled", "disabled");
+ document.getElementById("one").setAttribute("selected", "selected");'>
+ <select size="7">
+ <optgroup id="ogone" label="There should be no red">
+ <option id="one">This should be blue</option>
+ <option id="two">This should be blue</option>
+ </optgroup>
+ <optgroup id="ogtwo" label="There should be no red">
+ <option id="three">There should be no red</option>
+ <option id="four">There should be no red</option>
+ </optgroup>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3a.html b/layout/reftests/bugs/315920-3a.html
new file mode 100644
index 0000000000..5d52ea5659
--- /dev/null
+++ b/layout/reftests/bugs/315920-3a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {color: red}
+ #two { color: green }
+ input[disabled]:disabled {color: green}
+ input:not([disabled]):not(:disabled) + #two:enabled {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <input type="button" id="one" value="Should be no red"/>
+ <input type="button" id="two" value="Should be no red"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3b.html b/layout/reftests/bugs/315920-3b.html
new file mode 100644
index 0000000000..2aa39e80c2
--- /dev/null
+++ b/layout/reftests/bugs/315920-3b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {color: red }
+ #two { color: green }
+ input[disabled]:disabled {color: green}
+ input:not([disabled]):not(:disabled) + #two:enabled {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <input type="submit" id="one" value="Should be no red"/>
+ <input type="submit" id="two" value="Should be no red"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3c.html b/layout/reftests/bugs/315920-3c.html
new file mode 100644
index 0000000000..9ea0819b3a
--- /dev/null
+++ b/layout/reftests/bugs/315920-3c.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {color: red}
+ #two { color: green }
+ input[disabled]:not(:enabled) {color: green}
+ input:not([disabled]):enabled + #two:enabled {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <input type="button" id="one" value="Should be no red"/>
+ <input type="button" id="two" value="Should be no red"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3d.html b/layout/reftests/bugs/315920-3d.html
new file mode 100644
index 0000000000..57df925261
--- /dev/null
+++ b/layout/reftests/bugs/315920-3d.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {color: red }
+ #two { color: green }
+ input[disabled]:not(:enabled) {color: green}
+ input:not([disabled]):enabled + #two:enabled {color: red}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("disabled", "disabled");'>
+ <input type="submit" id="one" value="Should be no red"/>
+ <input type="submit" id="two" value="Should be no red"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-3e.html b/layout/reftests/bugs/315920-3e.html
new file mode 100644
index 0000000000..6e826498d1
--- /dev/null
+++ b/layout/reftests/bugs/315920-3e.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="button" id="one" disabled="true" style="color: red" value="Should be no red"/>
+ <input type="button" id="two" style="color: red" value="Should be no red"/>
+ </body>
+</html>
+</html>
diff --git a/layout/reftests/bugs/315920-3f.html b/layout/reftests/bugs/315920-3f.html
new file mode 100644
index 0000000000..a62d0f5ca6
--- /dev/null
+++ b/layout/reftests/bugs/315920-3f.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="submit" id="one" disabled="true" style="color: red" value="Should be no red"/>
+ <input type="submit" id="two" style="color: red" value="Should be no red"/>
+ </body>
+</html>
+</html>
diff --git a/layout/reftests/bugs/315920-4-ref.html b/layout/reftests/bugs/315920-4-ref.html
new file mode 100644
index 0000000000..b8b7eca7b9
--- /dev/null
+++ b/layout/reftests/bugs/315920-4-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select size="4" id="selection">
+ <option id="zero"></option>
+ <option id="one" style="color: green">Should be no red</option>
+ <option id="two" style="color: green">Should be no red</option>
+ <option id="three" style="color: green">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-4.html b/layout/reftests/bugs/315920-4.html
new file mode 100644
index 0000000000..0b70a1800f
--- /dev/null
+++ b/layout/reftests/bugs/315920-4.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: red}
+ option[disabled] {color: green}
+ option:disabled ~ option:not([disabled]):not(:disabled) {color: green}
+ option:not(:disabled):not([disabled]) + option:enabled {color: red}
+ </style>
+ </head>
+ <body onload='var elem0 = document.createElement("option");
+ elem0.setAttribute("disabled", "disabled");
+ var elem1 = document.getElementById("selection");
+ elem1.insertBefore(elem0, elem1.firstChild);
+ document.getElementById("two").setAttribute("disabled","disabled");'>
+ <select size="4" id="selection">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ <option id="three">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-5-ref.html b/layout/reftests/bugs/315920-5-ref.html
new file mode 100644
index 0000000000..5153a4e52a
--- /dev/null
+++ b/layout/reftests/bugs/315920-5-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <select size="4" id="selection">
+ <option id="zero" style="color: green" selected="true">Should be no red</option>
+ <option id="two" style="color: green">Should be no red</option>
+ <option id="three" style="color: green">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-5.html b/layout/reftests/bugs/315920-5.html
new file mode 100644
index 0000000000..4eed25c8b7
--- /dev/null
+++ b/layout/reftests/bugs/315920-5.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: green}
+ option[selected]:disabled ~ option:not([disabled]):not(:disabled) {color: red}
+ </style>
+ </head>
+ <body onload='var e1 = document.getElementById("one");
+ e1.parentNode.removeChild(e1);
+ document.getElementById("zero").setAttribute("selected", "true");'>
+ <select size="4" id="selection">
+ <option id="zero">Should be no red</option>
+ <option id="one" selected="true" disabled="disabled">Should be no red</option>
+ <option id="two">Should be no red</option>
+ <option id="three">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-6-ref.html b/layout/reftests/bugs/315920-6-ref.html
new file mode 100644
index 0000000000..1e77dd05fc
--- /dev/null
+++ b/layout/reftests/bugs/315920-6-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: green}
+ </style>
+ </head>
+ <body>
+ <select size="2">
+ <option id="one" selected="selected">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-6.html b/layout/reftests/bugs/315920-6.html
new file mode 100644
index 0000000000..d1cc73738e
--- /dev/null
+++ b/layout/reftests/bugs/315920-6.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ option {color: red}
+ option[selected] {color: green}
+ option[selected]:default + option {color: green}
+ </style>
+ </head>
+ <body onload='var elem = document.getElementById("one");
+ elem.setAttribute("selected", "selected");'>
+ <select size="2">
+ <option id="one">Should be no red</option>
+ <option id="two">Should be no red</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-7-ref.html b/layout/reftests/bugs/315920-7-ref.html
new file mode 100644
index 0000000000..9aedb001c1
--- /dev/null
+++ b/layout/reftests/bugs/315920-7-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type="radio" name="group1" id="one" value="1" checked="checked"/>
+ <label style="color: green" for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label style="color: green" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-7a.html b/layout/reftests/bugs/315920-7a.html
new file mode 100644
index 0000000000..aea8d1bbfb
--- /dev/null
+++ b/layout/reftests/bugs/315920-7a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input:default + label {color: green}
+ input:not(:checked):not([checked]):not(:default) + label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").setAttribute("checked", "true");
+ document.getElementById("two").removeAttribute("checked");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label id="l1" for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2" checked="true"/>
+ <label id="l2" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-7b.html b/layout/reftests/bugs/315920-7b.html
new file mode 100644
index 0000000000..0f5ec145e5
--- /dev/null
+++ b/layout/reftests/bugs/315920-7b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:default:checked ~ label {color: green}
+ </style>
+ </head>
+ <body onload='var e1 = document.getElementById("one");
+ e1.setAttribute("checked", "false");
+ document.getElementById("two").removeAttribute("checked");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2" checked/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-7c.html b/layout/reftests/bugs/315920-7c.html
new file mode 100644
index 0000000000..eed9b5ce77
--- /dev/null
+++ b/layout/reftests/bugs/315920-7c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input:not(:default):not(:checked):not([checked]) ~ label {color:red}
+ input[checked]:checked:default ~ label {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("one").setAttribute("checked", "checked");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-8-ref.html b/layout/reftests/bugs/315920-8-ref.html
new file mode 100644
index 0000000000..e9231735ff
--- /dev/null
+++ b/layout/reftests/bugs/315920-8-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label style="color: green" for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2" checked="checked"/>
+ <label style="color: green" for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-8a.html b/layout/reftests/bugs/315920-8a.html
new file mode 100644
index 0000000000..8668c8cc35
--- /dev/null
+++ b/layout/reftests/bugs/315920-8a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input ~ label {color: red}
+ input[checked]:default + label {color: green}
+ input:not(:default):not([checked]) + label {color:green}
+ </style>
+ </head>
+ <body onload='document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-8b.html b/layout/reftests/bugs/315920-8b.html
new file mode 100644
index 0000000000..b7a1599796
--- /dev/null
+++ b/layout/reftests/bugs/315920-8b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:checked:default + label {color: green}
+ input:not(:checked) + label {color: green}
+ </style>
+ </head>
+ <body onload='document.getElementById("two").setAttribute("checked", "true");'>
+ <form>
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label><br>
+ <input type="radio" name="group1" id="two" value="2"/>
+ <label for="two">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-9-ref.html b/layout/reftests/bugs/315920-9-ref.html
new file mode 100644
index 0000000000..6dc5209370
--- /dev/null
+++ b/layout/reftests/bugs/315920-9-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head/>
+ <body>
+ <form><input type="radio" name="group1" id="two" value="2" default="true" checked="true"/>
+ <label for="two" style="color: green">Should be no red</label><input type="radio" name="group1" id="one" value="1"/>
+ <label for="one" style="color: green">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/315920-9.html b/layout/reftests/bugs/315920-9.html
new file mode 100644
index 0000000000..fc92ed567f
--- /dev/null
+++ b/layout/reftests/bugs/315920-9.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ label {color: red}
+ input[checked]:checked:default ~ label {color: green}
+ input:not([checked]):not(:checked) + label {color: red}
+ </style>
+ </head>
+ <body onload='var form = document.getElementById("form");
+ var input2 = document.createElement("input");
+ input2.setAttribute("type", "radio");
+ input2.setAttribute("id", "two");
+ input2.setAttribute("checked", "true");
+ form.insertBefore(input2, form.firstChild);
+ var label2 = document.createElement("label");
+ label2.setAttribute("for", "two");
+ var text2 = document.createTextNode("Should be no red");
+ label2.appendChild(text2);
+ form.insertBefore(label2, document.getElementById("one"));'>
+ <form id="form">
+ <input type="radio" name="group1" id="one" value="1"/>
+ <label for="one">Should be no red</label>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/316057-1-ref.html b/layout/reftests/bugs/316057-1-ref.html
new file mode 100644
index 0000000000..8b01969bb5
--- /dev/null
+++ b/layout/reftests/bugs/316057-1-ref.html
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<head>
+<title>Testcase, bug 316057</title>
+<style type="text/css">
+
+#outer {
+ border-top:20px solid gray;
+ float: left;
+}
+
+#inner {
+ background:green;
+ height:5em;
+}
+
+</style>
+</head>
+<body>
+
+<div id="outer"><div id="inner">There should be no red in this testcase.</div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/316057-1.html b/layout/reftests/bugs/316057-1.html
new file mode 100644
index 0000000000..89de7de841
--- /dev/null
+++ b/layout/reftests/bugs/316057-1.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<head>
+<title>Testcase, bug 316057</title>
+<style type="text/css">
+
+#outer {
+ position:absolute;
+ background:red;
+ border-top:20px solid gray;
+}
+
+#inner {
+ float:left;
+ background:green;
+ height:5em;
+}
+
+</style>
+</head>
+<body>
+
+<div id="outer"><div id="middle"><div id="inner">There should be no red in this testcase.</div></div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/320979-1-ref.html b/layout/reftests/bugs/320979-1-ref.html
new file mode 100644
index 0000000000..c4c271c4bf
--- /dev/null
+++ b/layout/reftests/bugs/320979-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+<title>Bug 320979</title>
+<style type="text/css">
+table {border:thin hidden;
+border-collapse:collapse;}
+td {background: green; color: white; border:thin solid white;}
+</style>
+<p>There should be no red.
+<TABLE>
+ <TBODY>
+ <TR>
+ <td>test
+ <td>test
+ </TR>
+ <TR>
+ <td>test
+ <td>test
+ </TR>
+ </TBODY>
+</TABLE> \ No newline at end of file
diff --git a/layout/reftests/bugs/320979-1.html b/layout/reftests/bugs/320979-1.html
new file mode 100644
index 0000000000..50cc8d2034
--- /dev/null
+++ b/layout/reftests/bugs/320979-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+<title>Bug 320979</title>
+<style type="text/css">
+table {border-color: red}
+td {background: green; color: white}
+</style>
+<p>There should be no red.
+<TABLE rules=all border=0>
+ <TBODY>
+ <TR>
+ <td>test
+ <td>test
+ </TR>
+ <TR>
+ <td>test
+ <td>test
+ </TR>
+ </TBODY>
+</TABLE> \ No newline at end of file
diff --git a/layout/reftests/bugs/321402-1.html b/layout/reftests/bugs/321402-1.html
new file mode 100644
index 0000000000..1ab7a48711
--- /dev/null
+++ b/layout/reftests/bugs/321402-1.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<span style="display:-moz-inline-box">hello world</span>
diff --git a/layout/reftests/bugs/321402-2.html b/layout/reftests/bugs/321402-2.html
new file mode 100644
index 0000000000..8ffd3e619e
--- /dev/null
+++ b/layout/reftests/bugs/321402-2.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<span style="display:-moz-inline-box"><span style="background:green">&nbsp;</span></span>
diff --git a/layout/reftests/bugs/321402-3-ref.xhtml b/layout/reftests/bugs/321402-3-ref.xhtml
new file mode 100644
index 0000000000..8ece4fea29
--- /dev/null
+++ b/layout/reftests/bugs/321402-3-ref.xhtml
@@ -0,0 +1,7 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox style="font-size:0" flex="1">
+ <box flex="1" />
+ <label style="font-size:16px" value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-3.xhtml b/layout/reftests/bugs/321402-3.xhtml
new file mode 100644
index 0000000000..968f6fa55e
--- /dev/null
+++ b/layout/reftests/bugs/321402-3.xhtml
@@ -0,0 +1,8 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox style="font-size:0" flex="1">
+ <html:span style="display:inline" flex="1" /> <!-- gets blockified -->
+ <box flex="1" />
+ <label style="font-size:16px" value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-4-ref.xhtml b/layout/reftests/bugs/321402-4-ref.xhtml
new file mode 100644
index 0000000000..8e6171664d
--- /dev/null
+++ b/layout/reftests/bugs/321402-4-ref.xhtml
@@ -0,0 +1,8 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox flex="1">
+ <html:span style="display:inline" flex="1" /> <!-- causes block wrapping -->
+ <box flex="1" />
+ <label value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-4.xhtml b/layout/reftests/bugs/321402-4.xhtml
new file mode 100644
index 0000000000..073af61487
--- /dev/null
+++ b/layout/reftests/bugs/321402-4.xhtml
@@ -0,0 +1,25 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var vbox = document.getElementsByTagName("vbox")[0];
+ var span = document.createElementNS(HTML_NS, "html:span");
+ vbox.insertBefore(span, vbox.firstChild); // causes block wrapping
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <vbox flex="1">
+ <box flex="1" />
+ <label value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-5-ref.xhtml b/layout/reftests/bugs/321402-5-ref.xhtml
new file mode 100644
index 0000000000..96b86f6ee2
--- /dev/null
+++ b/layout/reftests/bugs/321402-5-ref.xhtml
@@ -0,0 +1,8 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox flex="1">
+ <box flex="1" />
+ <label value="hello world" />
+ <html:span style="display:inline" flex="1" /> <!-- causes block wrapping -->
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-5.xhtml b/layout/reftests/bugs/321402-5.xhtml
new file mode 100644
index 0000000000..61b99970fb
--- /dev/null
+++ b/layout/reftests/bugs/321402-5.xhtml
@@ -0,0 +1,25 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var vbox = document.getElementsByTagName("vbox")[0];
+ var span = document.createElementNS(HTML_NS, "html:span");
+ vbox.appendChild(span); // causes block wrapping
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <vbox flex="1">
+ <box flex="1" />
+ <label value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-6-ref.xhtml b/layout/reftests/bugs/321402-6-ref.xhtml
new file mode 100644
index 0000000000..203d3f1d66
--- /dev/null
+++ b/layout/reftests/bugs/321402-6-ref.xhtml
@@ -0,0 +1,7 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox flex="1">
+ <box flex="1" />
+ <label value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321402-6.xhtml b/layout/reftests/bugs/321402-6.xhtml
new file mode 100644
index 0000000000..d153b63349
--- /dev/null
+++ b/layout/reftests/bugs/321402-6.xhtml
@@ -0,0 +1,25 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var span = document.getElementsByTagNameNS(HTML_NS, "span")[0];
+ span.remove();
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <vbox flex="1">
+ <html:span style="display:inline" flex="1" /> <!-- causes block wrapping -->
+ <box flex="1" />
+ <label value="hello world" />
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/321738-1-ref.html b/layout/reftests/bugs/321738-1-ref.html
new file mode 100644
index 0000000000..09cc64d23d
--- /dev/null
+++ b/layout/reftests/bugs/321738-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ul {
+ margin: 4px;
+}
+li {
+ float: left;
+}
+</style>
+</head>
+<body>
+<table>
+ <tr>
+ <td>
+ <ul>
+ <li>Test</li>
+ <li>Test</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/321738-1.html b/layout/reftests/bugs/321738-1.html
new file mode 100644
index 0000000000..54c7630f28
--- /dev/null
+++ b/layout/reftests/bugs/321738-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ul {
+ margin: 4px;
+}
+li {
+ float: left;
+}
+</style>
+</head>
+<body>
+<table>
+ <tr>
+ <td>
+ <ul>
+ <li>Test</li>
+ <li><script>var b=document.body.offsetHeight</script>Test</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/322461-1-ref.html b/layout/reftests/bugs/322461-1-ref.html
new file mode 100644
index 0000000000..e9fdadca61
--- /dev/null
+++ b/layout/reftests/bugs/322461-1-ref.html
@@ -0,0 +1,4 @@
+<html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><title>This is a test</title><style type="text/css">
+ * {color:red}
+ div#first, DIV#second {color:green}
+</style></head><body><div id="first">This text should be green. CSS selector is in lowercase.</div><div id="second">This text should be green. CSS selector is in uppercase.</div></body></html>
diff --git a/layout/reftests/bugs/322461-1.xml b/layout/reftests/bugs/322461-1.xml
new file mode 100644
index 0000000000..27081cca73
--- /dev/null
+++ b/layout/reftests/bugs/322461-1.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="#"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.01//EN"/>
+
+<xsl:template match="/">
+<html>
+<head>
+<title>This is a test</title>
+<style type="text/css">
+ * {color:red}
+ div#first, DIV#second {color:green}
+</style>
+</head>
+<body>
+<div id="first">This text should be green. CSS selector is in lowercase.</div>
+<div id="second">This text should be green. CSS selector is in uppercase.</div>
+</body>
+</html>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/layout/reftests/bugs/323656-1-ref.html b/layout/reftests/bugs/323656-1-ref.html
new file mode 100644
index 0000000000..4121bf482d
--- /dev/null
+++ b/layout/reftests/bugs/323656-1-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through various table anonymous boxes</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: green; border: 0px hidden green; background: transparent }
+ .t { border-color: green }
+ .t > :first-child
+ { border-color: green; border-style: solid; border-width: 10px }
+ </style>
+ </head>
+ <body>
+ <table><tr><td class="t"><div></div></td></tr></table>
+ <div style="display: table" class="t"><div></div></div>
+ <div style="display: table-row-group" class="t"><div></div></div>
+ <div style="display: table-row" class="t"><div></div></div>
+ <div style="display: table-cell" class="t"><div></div></div>
+ <div><span><div style="display: table" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
+
+ <table><tr><td class="t"><div></div></td></tr></table>
+ <div style="display: table" class="t"><div></div></div>
+ <div style="display: table-row-group" class="t"><div></div></div>
+ <div style="display: table-row" class="t"><div></div></div>
+ <div style="display: table-cell" class="t"><div></div></div>
+ <div><span><div style="display: table" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-1.html b/layout/reftests/bugs/323656-1.html
new file mode 100644
index 0000000000..74659141f5
--- /dev/null
+++ b/layout/reftests/bugs/323656-1.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through various table anonymous boxes</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: red; border: 0px hidden red; background: transparent }
+ .t { border-color: green }
+ .t > :first-child
+ { border-color: inherit; border-style: solid; border-width: 10px }
+ </style>
+ <script>
+ function makeDiv() {
+ return document.createElement("div");
+ }
+
+ window.onload = function() {
+ var lst = document.getElementsByClassName("d");
+ for (var i = 0; i < lst.length; ++i) {
+ lst[i].appendChild(makeDiv());
+ }
+ }
+ </script>
+ </head>
+ <body>
+ <table><tr><td class="t"><div></div></td></tr></table>
+ <div style="display: table" class="t"><div></div></div>
+ <div style="display: table-row-group" class="t"><div></div></div>
+ <div style="display: table-row" class="t"><div></div></div>
+ <div style="display: table-cell" class="t"><div></div></div>
+ <div><span><div style="display: table" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-row" class="t"><div></div></div></span></div>
+ <div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
+
+ <table><tr><td class="t d"></td></tr></table>
+ <div style="display: table" class="t d"></div>
+ <div style="display: table-row-group" class="t d"></div>
+ <div style="display: table-row" class="t d"></div>
+ <div style="display: table-cell" class="t d"></div>
+ <div><span><div style="display: table" class="t d"></div></span></div>
+ <div><span><div style="display: table-row-group" class="t d"></div></span></div>
+ <div><span><div style="display: table-row" class="t d"></div></span></div>
+ <div><span><div style="display: table-cell" class="t d"></div></span></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/323656-2-ref.html b/layout/reftests/bugs/323656-2-ref.html
new file mode 100644
index 0000000000..f4b5dcbfb4
--- /dev/null
+++ b/layout/reftests/bugs/323656-2-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through fieldsets and legends</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: green; border: 0px hidden green; background: transparent }
+ .t { border-color: green }
+ .t > :first-child
+ { border-color: green; border-style: solid; border-width: 10px }
+ </style>
+ </head>
+ <body>
+ <fieldset class="t"><div></div></fieldset>
+ <fieldset><legend class="t"><span></span></legend></fieldset>
+ <fieldset class="t"><div></div></fieldset>
+ <fieldset><legend class="t"><span></span></legend></fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-2.html b/layout/reftests/bugs/323656-2.html
new file mode 100644
index 0000000000..f8ac2ec18a
--- /dev/null
+++ b/layout/reftests/bugs/323656-2.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through fieldsets and legends</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: red; border: 0px hidden red; background: transparent }
+ .t { border-color: green }
+ .t > :first-child
+ { border-color: inherit; border-style: solid; border-width: 10px }
+ </style>
+ <script>
+ function make(str) {
+ return document.createElement(str);
+ }
+
+ window.onload = function() {
+ document.getElementById("f").appendChild(make("div"));
+ document.getElementById("l").appendChild(make("span"));
+ }
+ </script>
+ </head>
+ <body>
+ <fieldset class="t"><div></div></fieldset>
+ <fieldset><legend class="t"><span></span></legend></fieldset>
+ <fieldset class="t" id="f"></fieldset>
+ <fieldset><legend class="t" id="l"></legend></fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-3-ref.html b/layout/reftests/bugs/323656-3-ref.html
new file mode 100644
index 0000000000..22786b9502
--- /dev/null
+++ b/layout/reftests/bugs/323656-3-ref.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>
+ Test inheritance through various anonymous boxes: {ib}
+ situations, buttons, overflow, columns, listboxes, first-line
+ </title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: green; border: 0px hidden green; background: transparent }
+ .t { border-color: green }
+ .t:not(.d2) > :first-child, .d2 > span
+ { border-color: green; border-style: solid; border-width: 10px }
+ .f::first-line { border-color: green }
+ </style>
+ </head>
+ <body>
+ <div class="t"><div></div></div>
+ <span class="t"><div></div></span>
+ <span style="position: relative" class="t"><div></div></span>
+ <div class="f"><span></span><br><span></span></div>
+ <button class="t"><div></div></button>
+ <div style="overflow: auto" class="t"><div></div></div>
+ <div style="column-count: 2" class="t"><div></div></div>
+ <select size="2" class="t">
+ <option></option>
+ </select>
+
+ <div class="t"><div></div></div>
+ <span class="t"><div></div></span>
+ <span style="position: relative" class="t"><div></div></span>
+ <div class="f"><span></span><br><span></span></div>
+ <button class="t"><div></div></button>
+ <div style="overflow: auto" class="t"><div></div></div>
+ <div style="column-count: 2" class="t"><div></div></div>
+ <select size="2" class="t">
+ <option></option>
+ </select>
+
+ <span class="t d2"><div></div><span></span></span>
+ <span style="position: relative" class="t d2"><div></div><span></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-3.html b/layout/reftests/bugs/323656-3.html
new file mode 100644
index 0000000000..090c7b82fb
--- /dev/null
+++ b/layout/reftests/bugs/323656-3.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through various anonymous boxes: {ib}
+ situations, buttons, overflow, columns, listboxes, first-line</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: red; border: 0px hidden red; background: transparent }
+ .t { border-color: green }
+ .t:not(.d2) > :first-child
+ { border-color: inherit; border-style: solid; border-width: 10px }
+ .d2 > span { border-style: solid; border-width: 10px }
+ .f::first-line { border-color: green }
+ </style>
+ <script>
+ function make(str) {
+ return document.createElement(str);
+ }
+
+ function makeDiv() {
+ return make("div");
+ }
+
+ window.onload = function() {
+ var lst = document.getElementsByClassName("d");
+ for (var i = 0; i < lst.length; ++i) {
+ if (lst[i].nodeName != "select") {
+ lst[i].appendChild(makeDiv());
+ } else {
+ lst[i].appendChild(make("option"));
+ }
+ }
+
+ lst = document.getElementsByClassName("d2");
+ for (i = 0; i < lst.length; ++i) {
+ var span = lst[i].getElementsByTagName("span")[0];
+ span.style.cssText =
+ "border-color: inherit; border-style: solid; border-width: 10px";
+ }
+
+ var x = document.getElementsByClassName("f d")[0];
+ x.appendChild(make("span"));
+ x.appendChild(make("br"));
+ x.appendChild(make("span"));
+ }
+ </script>
+ </head>
+ <body>
+ <div class="t"><div></div></div>
+ <span class="t"><div></div></span>
+ <span style="position: relative" class="t"><div></div></span>
+ <div class="f"><span></span><br><span></span></div>
+ <button class="t"><div></div></button>
+ <div style="overflow: auto" class="t"><div></div></div>
+ <div style="column-count: 2" class="t"><div></div></div>
+ <select size="2" class="t">
+ <option></option>
+ </select>
+
+ <div class="t d"></div>
+ <span class="t d"></span>
+ <span style="position: relative" class="t d"></span>
+ <div class="f d"></div>
+ <button class="t d"></button>
+ <div style="overflow: auto" class="t d"></div>
+ <div style="column-count: 2" class="t d"></div>
+ <select size="2" class="t d">
+ <option></option>
+ </select>
+
+ <span class="t d2"><div></div><span></span></span>
+ <span style="position: relative" class="t d2"><div></div><span></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-4-ref.html b/layout/reftests/bugs/323656-4-ref.html
new file mode 100644
index 0000000000..e7116eb19d
--- /dev/null
+++ b/layout/reftests/bugs/323656-4-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through first-letter</title>
+ <style>
+ .f2 { color: blue }
+ .f2 > span { color: green }
+ </style>
+ <body>
+ <div class="f2"><span>A</span>BC</div>
+ <div class="f2"><span>A</span>BC</div>
+ <div class="f2"><span>A</span>BC</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-4.html b/layout/reftests/bugs/323656-4.html
new file mode 100644
index 0000000000..c804b6de27
--- /dev/null
+++ b/layout/reftests/bugs/323656-4.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance through first-letter</title>
+ <style>
+ .f2 > * { color: blue }
+ .f2::first-letter { color: green }
+ </style>
+ <script>
+ function make(str) {
+ return document.createElement(str);
+ }
+
+ window.onload = function() {
+ var x = document.getElementById("d1");
+ var y = make("span");
+ y.appendChild(document.createTextNode("ABC"));
+ x.appendChild(y);
+
+ x = document.getElementById("d2");
+ y = make("span");
+ x.appendChild(y);
+ y.appendChild(document.createTextNode("ABC"));
+ }
+ </script>
+ <body>
+ <div class="f2"><span>ABC</span></div>
+ <div class="f2" id="d1"></div>
+ <div class="f2" id="d2"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-5-ref.svg b/layout/reftests/bugs/323656-5-ref.svg
new file mode 100644
index 0000000000..2f68c90539
--- /dev/null
+++ b/layout/reftests/bugs/323656-5-ref.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+
+ <title>Testcase for foreignObject</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=367366 -->
+
+ <rect width="100%" height="100%" fill="red"/>
+ <foreignObject width="100%" height="100%"
+ style="border-color: green; color: red">
+ <div xmlns="http://www.w3.org/1999/xhtml"
+ style="border-style: solid; border-width: 30px; border-color: green;
+ background: green; width:100%; height:100%;"/>
+ </foreignObject>
+
+</svg>
diff --git a/layout/reftests/bugs/323656-5.svg b/layout/reftests/bugs/323656-5.svg
new file mode 100644
index 0000000000..b98bbac63b
--- /dev/null
+++ b/layout/reftests/bugs/323656-5.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+
+ <title>Testcase for foreignObject</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=367366 -->
+
+ <rect width="100%" height="100%" fill="red"/>
+ <foreignObject width="100%" height="100%"
+ style="border-color: green; color: red">
+ <div xmlns="http://www.w3.org/1999/xhtml"
+ style="border-style: solid; border-width: 30px; border-color: inherit;
+ background: green; width:100%; height:100%;"/>
+ </foreignObject>
+
+</svg>
diff --git a/layout/reftests/bugs/323656-6-ref.html b/layout/reftests/bugs/323656-6-ref.html
new file mode 100644
index 0000000000..7f677f77cf
--- /dev/null
+++ b/layout/reftests/bugs/323656-6-ref.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance into captions</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: red; border: 0px hidden red; background: transparent }
+ .t, .t2 { border-color: green }
+ .t > :first-child
+ { border-color: green; border-style: solid; border-width: 10px }
+ .t2 > :first-child
+ { border-style: solid; border-width: 10px }
+ .t2 > .test
+ { border-color: green }
+ </style>
+ </head>
+ <body>
+ <table class="t"><caption></caption></table>
+
+ <table class="t2 d2"><caption class="test"></caption></table>
+
+ <table class="t d"><caption></caption></table>
+ <table class="t d"><caption></caption></table>
+ <table class="t d"><caption></caption></table>
+
+ <table class="t2 d d2"><caption class="test"></caption></table>
+ <table class="t2 d d2"><caption class="test"></caption></table>
+ <table class="t2 d d2"><caption class="test"></caption></table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/323656-6.html b/layout/reftests/bugs/323656-6.html
new file mode 100644
index 0000000000..a2fa16fe14
--- /dev/null
+++ b/layout/reftests/bugs/323656-6.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test inheritance into captions</title>
+ <style>
+ /**
+ * The idea is that "color" inherits by default while "border-color" does
+ * not. So if the former is red and the latter is green on a parent, and
+ * the child's border-color is set to "inherit", it'll be green only if
+ * the child is inheriting from the parent. If not, it'll either be
+ * whatever the border-color is on what it's inheriting from, which will
+ * be red if what it's inheriting from has the default (currentColor)
+ * border-color).
+ */
+
+ /* 't' for "test" */
+ * { color: red; border: 0px hidden red; background: transparent }
+ .t, .t2 { border-color: green }
+ .t > caption
+ { border-color: inherit; border-style: solid; border-width: 10px }
+ .t2 > caption
+ { border-style: solid; border-width: 10px }
+ .t2 > caption.test
+ { border-color: inherit }
+ </style>
+ <script>
+ function makeCaption() {
+ return document.createElement("caption");
+ }
+
+ window.onload = function() {
+ var lst = document.getElementsByClassName("d");
+ for (var i = 0; i < lst.length; ++i) {
+ lst[i].appendChild(makeCaption());
+ }
+
+ var lst = document.getElementsByClassName("d2");
+ for (var i = 0; i < lst.length; ++i) {
+ lst[i].firstChild.className = "test";
+ }
+ }
+ </script>
+ </head>
+ <body>
+ <table class="t"><caption></caption></table>
+
+ <table class="t2 d2"><caption></caption></table>
+
+ <table class="t d"></table>
+ <div class="t d"></div>
+ <div style="display: table" class="t d"></div>
+
+ <table class="t2 d d2"></table>
+ <div class="t2 d d2"></div>
+ <div style="display: table" class="t2 d d2"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/325292-1-ref.html b/layout/reftests/bugs/325292-1-ref.html
new file mode 100644
index 0000000000..42b2e7d0c5
--- /dev/null
+++ b/layout/reftests/bugs/325292-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-paged">
+<style>
+#second {border-bottom:green 5px solid}
+col {width:100px}
+</style>
+<body>
+<title>visibility collapse + columns + pagination</title>
+
+<table cellspacing="0" style="page-break-after:always" id="first">
+<col><col style="visibility:collapse"><col>
+<tr><td>cell1</td><td>Dont'show</td><td>cell2</td></tr></table>
+<table cellspacing="0" id="second">
+<col><col style="visibility:collapse"><col>
+<tr><td>cell3</td><td>Dont'show</td><td>cell4</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/325292-1.html b/layout/reftests/bugs/325292-1.html
new file mode 100644
index 0000000000..cfe4c392dd
--- /dev/null
+++ b/layout/reftests/bugs/325292-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-paged">
+<title>visibility collapse + columns + pagination</title>
+<style>
+table {border-bottom:green 5px solid}
+col {width:100px}
+</style>
+<body>
+<table cellspacing="0">
+<col><col style="visibility:collapse"><col>
+<tr style="page-break-after:always"><td>cell1</td><td>Dont'show</td><td>cell2</td></tr>
+<tr><td>cell3</td><td>Dont'show</td><td>cell4</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/325486-1-ref.html b/layout/reftests/bugs/325486-1-ref.html
new file mode 100644
index 0000000000..3ee2633bd5
--- /dev/null
+++ b/layout/reftests/bugs/325486-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<title>Testcase bug 325486 - Input element default value invisible when overflowing parent div</title>
+</head><body>
+<div style="position: absolute; top: 100px; left: 10px; width: 500px; height: 50px;">
+ <div style="border: 2px solid blue; position: absolute;">
+ <input value="This text gets cut off but should not. (outer div positioned absolutely)" style="width:400px;">
+ </div>
+</div>
+<div style="position: relative; top: 150px; left: 10px; width: 500px; height: 50px;">
+ <div style="border: 2px solid blue; position: absolute;">
+ <input value="This text gets cut off but should not. (outer div positioned relatively)" style="width:400px;">
+ </div>
+</div>
+</body></html>
diff --git a/layout/reftests/bugs/325486-1.html b/layout/reftests/bugs/325486-1.html
new file mode 100644
index 0000000000..113171d95c
--- /dev/null
+++ b/layout/reftests/bugs/325486-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<title>Testcase bug 325486 - Input element default value invisible when overflowing parent div</title>
+</head><body>
+<div style="position: absolute; top: 100px; left: 10px; width: 50px; height: 50px;">
+ <div style="border: 2px solid blue; position: absolute;">
+ <input value="This text gets cut off but should not. (outer div positioned absolutely)" style="width:400px;">
+ </div>
+</div>
+<div style="position: relative; top: 150px; left: 10px; width: 50px; height: 50px;">
+ <div style="border: 2px solid blue; position: absolute;">
+ <input value="This text gets cut off but should not. (outer div positioned relatively)" style="width:400px;">
+ </div>
+</div>
+</body></html>
diff --git a/layout/reftests/bugs/328111-1-ref.html b/layout/reftests/bugs/328111-1-ref.html
new file mode 100644
index 0000000000..098d3ed7fa
--- /dev/null
+++ b/layout/reftests/bugs/328111-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+ span{
+ color:red;
+ }
+</style>
+</head>
+
+<body>
+<p><span>t</span>est</p>
+<p><span>*t</span>est</p>
+<p><span>**t</span>est</p>
+<p><span>***t</span>est</p>
+<p><span>&nbsp;</span>test</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/328111-1.html b/layout/reftests/bugs/328111-1.html
new file mode 100644
index 0000000000..ab6857409b
--- /dev/null
+++ b/layout/reftests/bugs/328111-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+ p:first-letter{
+ color:red;
+ }
+</style>
+</head>
+
+<body>
+<p>test</p>
+<p>*test</p>
+<p>**test</p>
+<p>***test</p>
+<p>&nbsp;test</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/328829-1-ref.xhtml b/layout/reftests/bugs/328829-1-ref.xhtml
new file mode 100644
index 0000000000..ff41d5368f
--- /dev/null
+++ b/layout/reftests/bugs/328829-1-ref.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+ <title>Testcase, bug 328829</title>
+ <style type="text/css">
+ html, body, svg { margin: 0; padding: 0; border: none; }
+ body > svg { display:block; } /* don't leave room for descenders! */
+ </style>
+</head>
+<body>
+
+<svg:svg width="100%" height="100%">
+ <svg:g style="font-size: 24px">
+ <svg:foreignObject width="100%" height="100%">
+ <span>hello</span> <span>world</span>
+ </svg:foreignObject>
+ </svg:g>
+</svg:svg>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/328829-1.xhtml b/layout/reftests/bugs/328829-1.xhtml
new file mode 100644
index 0000000000..e88c46067f
--- /dev/null
+++ b/layout/reftests/bugs/328829-1.xhtml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+ <title>Testcase, bug 328829</title>
+ <style type="text/css">
+ html, body, svg { margin: 0; padding: 0; border: none; }
+ body > svg { display:block; } /* don't leave room for descenders! */
+ </style>
+ <script type="application/javascript">
+
+ function run() {
+ setTimeout("document.getElementById('fonted').style.fontSize = '24px'", 0);
+ }
+
+ </script>
+</head>
+<body onload="run()">
+
+<svg:svg width="100%" height="100%">
+ <svg:g id="fonted" style="font-size: 12px">
+ <svg:foreignObject width="100%" height="100%">
+ <span>hello</span> <span>world</span>
+ </svg:foreignObject>
+ </svg:g>
+</svg:svg>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/328829-2-ref.xhtml b/layout/reftests/bugs/328829-2-ref.xhtml
new file mode 100644
index 0000000000..63c622cf8f
--- /dev/null
+++ b/layout/reftests/bugs/328829-2-ref.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+ <title>Testcase, bug 328829</title>
+ <style type="text/css">
+ html, body, svg { margin: 0; padding: 0; border: none; }
+ body > svg { display:block; } /* don't leave room for descenders! */
+ </style>
+</head>
+<body style="font-size: 24px">
+
+<svg:svg width="100%" height="100%">
+ <svg:g>
+ <svg:foreignObject width="100%" height="100%">
+ <span>hello</span> <span>world</span>
+ </svg:foreignObject>
+ </svg:g>
+</svg:svg>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/328829-2.xhtml b/layout/reftests/bugs/328829-2.xhtml
new file mode 100644
index 0000000000..5c81520102
--- /dev/null
+++ b/layout/reftests/bugs/328829-2.xhtml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" class="reftest-wait"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+ <title>Testcase, bug 328829</title>
+ <style type="text/css">
+ html, body, svg { margin: 0; padding: 0; border: none; }
+ body > svg { display:block; } /* don't leave room for descenders! */
+ </style>
+ <script type="application/javascript">
+
+ function run() {
+ document.getElementById('fonted').style.fontSize = '24px';
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+</head>
+<body id="fonted" style="font-size: 12px">
+
+<svg:svg width="100%" height="100%">
+ <svg:g>
+ <svg:foreignObject width="100%" height="100%">
+ <span>hello</span> <span>world</span>
+ </svg:foreignObject>
+ </svg:g>
+</svg:svg>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/329359-1-ref.html b/layout/reftests/bugs/329359-1-ref.html
new file mode 100644
index 0000000000..3223dca414
--- /dev/null
+++ b/layout/reftests/bugs/329359-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.float-left, .float-right {
+ float: left;
+ width: 125px; height: 1em;
+ background-color: red;
+}
+.float-right {
+ float: right;
+}
+.fieldset {
+ margin: 0 125px 0; padding: 0;
+ border: none;
+ height: 5em;
+ background-color: green;
+}
+</style>
+</head>
+<body>
+<div class="float-left"></div>
+<div class="float-right"></div>
+<div class="fieldset"></div>
+<div class="float-left"></div>
+<div class="float-right"></div>
+<div class="fieldset"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/329359-1.html b/layout/reftests/bugs/329359-1.html
new file mode 100644
index 0000000000..45707f6246
--- /dev/null
+++ b/layout/reftests/bugs/329359-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.float-left, .float-right {
+ float: left;
+ width: 125px; height: 1em;
+ background-color: red;
+}
+.float-right {
+ float: right;
+}
+fieldset {
+ margin: 0; padding: 0;
+ border: none;
+ height: 5em;
+ background-color: green;
+}
+#plus-margin {
+ margin: 0 100px 0;
+}
+</style>
+</head>
+<body>
+<div class="float-left"></div>
+<div class="float-right"></div>
+<fieldset></fieldset>
+<div class="float-left"></div>
+<div class="float-right"></div>
+<fieldset id="plus-margin"></fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/331809-1-ref.html b/layout/reftests/bugs/331809-1-ref.html
new file mode 100644
index 0000000000..8daedbf800
--- /dev/null
+++ b/layout/reftests/bugs/331809-1-ref.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+iframe {
+ width:100px;
+ height:400px;
+ border:0;
+}
+span {
+ display:inline-block;
+ width:1000px;
+ height:400px;
+ background:white;
+}
+</style>
+</head>
+<body style="width:2000px; background:white;"><div style="position:absolute; top:360px;width:100px;height:40px; background:black;"></div>
+<iframe src="331809-1.xhtml"></iframe>
+<span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/331809-1.html b/layout/reftests/bugs/331809-1.html
new file mode 100644
index 0000000000..66b0016712
--- /dev/null
+++ b/layout/reftests/bugs/331809-1.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<style>
+iframe {
+ width:100px;
+ height:400px;
+ border:0;
+}
+</style>
+</head>
+<body style="width:2000px; background:white;"><div style="position:absolute; top:360px;width:100px;height:40px; background:black;"></div>
+<iframe src="331809-1.xhtml"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/331809-1.xhtml b/layout/reftests/bugs/331809-1.xhtml
new file mode 100644
index 0000000000..a67b6d176b
--- /dev/null
+++ b/layout/reftests/bugs/331809-1.xhtml
@@ -0,0 +1 @@
+<wizard xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"></wizard>
diff --git a/layout/reftests/bugs/332360-ltr-ref.html b/layout/reftests/bugs/332360-ltr-ref.html
new file mode 100644
index 0000000000..92b53374ea
--- /dev/null
+++ b/layout/reftests/bugs/332360-ltr-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li>list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332360-ltr.html b/layout/reftests/bugs/332360-ltr.html
new file mode 100644
index 0000000000..cc957bd34a
--- /dev/null
+++ b/layout/reftests/bugs/332360-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li style="float:left">list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332360-ref.html b/layout/reftests/bugs/332360-ref.html
new file mode 100644
index 0000000000..f9e2cd6dc3
--- /dev/null
+++ b/layout/reftests/bugs/332360-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" dir="rtl">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li>list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332360-width-ltr.html b/layout/reftests/bugs/332360-width-ltr.html
new file mode 100644
index 0000000000..f1f4bf535c
--- /dev/null
+++ b/layout/reftests/bugs/332360-width-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li style="width: 60%">list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332360-width.html b/layout/reftests/bugs/332360-width.html
new file mode 100644
index 0000000000..6e3d5c2afa
--- /dev/null
+++ b/layout/reftests/bugs/332360-width.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" dir="rtl">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li style="width: 60%">list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332360.html b/layout/reftests/bugs/332360.html
new file mode 100644
index 0000000000..d61ed0cc48
--- /dev/null
+++ b/layout/reftests/bugs/332360.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" dir="rtl">
+<head>
+ <title>Testcase, bug 332360</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+<body>
+
+<ul><li style="float:right">list item</li></ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/332557-1-ref.html b/layout/reftests/bugs/332557-1-ref.html
new file mode 100644
index 0000000000..980567fe1a
--- /dev/null
+++ b/layout/reftests/bugs/332557-1-ref.html
@@ -0,0 +1,9 @@
+<DOCTYPE html>
+<html>
+<body style="width: 400px">
+<div style="overflow:scroll; padding-left: 80px; padding-right: 200px;
+ background: yellow; height: 200px">
+ <div style="height: 500px; background: blue;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/332557-1.html b/layout/reftests/bugs/332557-1.html
new file mode 100644
index 0000000000..d23299e251
--- /dev/null
+++ b/layout/reftests/bugs/332557-1.html
@@ -0,0 +1,9 @@
+<DOCTYPE html>
+<html>
+<body style="width: 400px">
+<div style="overflow:scroll; padding-left: 20%; padding-right: 50%;
+ background: yellow; height: 200px">
+ <div style="height: 500px; background: blue;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/332975-1-ref.html b/layout/reftests/bugs/332975-1-ref.html
new file mode 100644
index 0000000000..3cbb9497bd
--- /dev/null
+++ b/layout/reftests/bugs/332975-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 332975</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body dir="rtl">
+<ul>
+<li>list item</li>
+<li>list item</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/332975-1.html b/layout/reftests/bugs/332975-1.html
new file mode 100644
index 0000000000..89c8ff0ab9
--- /dev/null
+++ b/layout/reftests/bugs/332975-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 332975</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body dir="rtl">
+<ul>
+<li style="margin-left:100px;">list item</li>
+<li style="padding-left:100px;">list item</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/333970-1-ref.html b/layout/reftests/bugs/333970-1-ref.html
new file mode 100644
index 0000000000..1ca55e3305
--- /dev/null
+++ b/layout/reftests/bugs/333970-1-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>points/pixels size test</title>
+ <style type="text/css">
+ td {
+ text-decoration: underline;
+ }
+ </style>
+</head>
+<body>
+<table>
+ <tr><td style="font-size:12px;">9pt/12px</td></tr>
+ <tr><td style="font-size:16px;">12pt/16px</td></tr>
+ <tr><td style="font-size:20px;">15pt/20px</td></tr>
+ <tr><td style="font-size:24px;">18pt/24px</td></tr>
+ <tr><td style="font-size:28px;">21pt/28px</td></tr>
+ <tr><td style="font-size:13.3333px;">10pt/13.3333px</td></tr>
+ <tr><td style="font-size:17.3333px;">13pt/17.3333px</td></tr>
+ <tr><td style="font-size:21.3333px;">16pt/21.3333px</td></tr>
+ <tr><td style="font-size:26.6666px;">20pt/26.6666px</td></tr>
+ <tr><td style="font-size:15px;">11.25pt/15px</td></tr>
+ <tr><td style="font-size:17px;">12.75pt/17px</td></tr>
+ <tr><td style="font-size:18px;">13.5pt/18px</td></tr>
+ <tr><td style="font-size:25px;">18.75pt/25px</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/333970-1.html b/layout/reftests/bugs/333970-1.html
new file mode 100644
index 0000000000..6b46839d9d
--- /dev/null
+++ b/layout/reftests/bugs/333970-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>points/pixels size test</title>
+ <style type="text/css">
+ td {
+ text-decoration: underline;
+ }
+ </style>
+</head>
+<body>
+<table>
+ <tr><td style="font-size:9pt;">9pt/12px</td></tr>
+ <tr><td style="font-size:12pt;">12pt/16px</td></tr>
+ <tr><td style="font-size:15pt;">15pt/20px</td></tr>
+ <tr><td style="font-size:18pt;">18pt/24px</td></tr>
+ <tr><td style="font-size:21pt;">21pt/28px</td></tr>
+ <tr><td style="font-size:10pt;">10pt/13.3333px</td></tr>
+ <tr><td style="font-size:13pt;">13pt/17.3333px</td></tr>
+ <tr><td style="font-size:16pt;">16pt/21.3333px</td></tr>
+ <tr><td style="font-size:20pt;">20pt/26.6666px</td></tr>
+ <tr><td style="font-size:11.25pt;">11.25pt/15px</td></tr>
+ <tr><td style="font-size:12.75pt;">12.75pt/17px</td></tr>
+ <tr><td style="font-size:13.5pt;">13.5pt/18px</td></tr>
+ <tr><td style="font-size:18.75pt;">18.75pt/25px</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/334829-1-ref.xhtml b/layout/reftests/bugs/334829-1-ref.xhtml
new file mode 100644
index 0000000000..d6f16bdef8
--- /dev/null
+++ b/layout/reftests/bugs/334829-1-ref.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<div id="testDiv" style="width: 0">This is text in a div This text should appear</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/334829-1a-shadow.xhtml b/layout/reftests/bugs/334829-1a-shadow.xhtml
new file mode 100644
index 0000000000..757e875358
--- /dev/null
+++ b/layout/reftests/bugs/334829-1a-shadow.xhtml
@@ -0,0 +1,34 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <script type="application/x-javascript">
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ function runTest() {
+ var div = document.getElementById("testDiv");
+
+ // First we have to make sure that we've looked up the primary frame for
+ // the textnode. Appending a space should do the trick.
+ div.firstChild.data += " ";
+
+ // Now flush our reflow
+ document.body.offsetWidth;
+
+ var node = document.createElementNS("http://www.w3.org/1999/xhtml",
+ "span");
+ div.appendChild(node);
+ node.appendChild(document.createTextNode("This text should appear"));
+ }
+ </script>
+</head>
+
+<body onload="runTest()">
+<template id="template"><span><slot/></span></template>
+<custom-element id="testDiv" style="width: 0; display: block;">This is text in a div</custom-element>
+</body>
+</html>
diff --git a/layout/reftests/bugs/334829-1b-shadow.xhtml b/layout/reftests/bugs/334829-1b-shadow.xhtml
new file mode 100644
index 0000000000..46f1114023
--- /dev/null
+++ b/layout/reftests/bugs/334829-1b-shadow.xhtml
@@ -0,0 +1,35 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <script type="application/x-javascript">
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ function runTest() {
+ var div = document.getElementById("testDiv");
+
+ // First we have to make sure that we've looked up the primary frame for
+ // the previous child span. Appending text to it should do the trick.
+ div.firstChild.
+ appendChild(document.createTextNode("This is text in a div "));
+
+ // Now flush out reflow
+ document.body.offsetWidth;
+
+ var node = document.createElementNS("http://www.w3.org/1999/xhtml",
+ "span");
+ div.appendChild(node);
+ node.appendChild(document.createTextNode("This text should appear"));
+ }
+ </script>
+</head>
+
+<body onload="runTest()">
+<template id="binding"><span><slot/></span></template>
+<custom-element id="testDiv" style="width: 0; display: block;"><span></span></custom-element>
+</body>
+</html>
diff --git a/layout/reftests/bugs/335628-1-ref.html b/layout/reftests/bugs/335628-1-ref.html
new file mode 100644
index 0000000000..4e965bb277
--- /dev/null
+++ b/layout/reftests/bugs/335628-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>a<input type="text" style="visibility: hidden">b</div>
+ <div>a<input type="text" style="visibility: hidden; padding-top: 200px">b</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/335628-1.html b/layout/reftests/bugs/335628-1.html
new file mode 100644
index 0000000000..1007760dca
--- /dev/null
+++ b/layout/reftests/bugs/335628-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>a<input type="text" style="visibility: collapse">b</div>
+ <div>a<input type="text" style="visibility: collapse; padding-top: 200px">b</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/336096-1-ref.xhtml b/layout/reftests/bugs/336096-1-ref.xhtml
new file mode 100644
index 0000000000..9867d495b1
--- /dev/null
+++ b/layout/reftests/bugs/336096-1-ref.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <description id="foo" style="font-weight: bold;">This text should appear bold after onload.</description>
+</window>
diff --git a/layout/reftests/bugs/336096-1.xhtml b/layout/reftests/bugs/336096-1.xhtml
new file mode 100644
index 0000000000..ad3bf95f45
--- /dev/null
+++ b/layout/reftests/bugs/336096-1.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <description id="foo">This text should appear bold after onload.</description>
+ <script type="application/javascript"><![CDATA[
+window.addEventListener("load", function setStyle(evt) {
+ document.getElementById("foo").style.fontWeight = "bold";
+}, true);
+ ]]></script>
+</window>
diff --git a/layout/reftests/bugs/336147-1-ref.html b/layout/reftests/bugs/336147-1-ref.html
new file mode 100644
index 0000000000..9078062a94
--- /dev/null
+++ b/layout/reftests/bugs/336147-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Bug 336147</title>
+</head>
+<body>
+ <form action="http://foo.com/" method="post">
+ <input value="abc" type="button">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/336147-1.html b/layout/reftests/bugs/336147-1.html
new file mode 100644
index 0000000000..a8eb350b7c
--- /dev/null
+++ b/layout/reftests/bugs/336147-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Bug 336147</title>
+</head>
+<body>
+ <form action="http://foo.com/" method="post">
+ <input value="abc" type="button" id="fooButton">
+ </form>
+ <script>
+ document.getElementById('fooButton').innerHTML = 'xyz';
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/336153-1-ref.html b/layout/reftests/bugs/336153-1-ref.html
new file mode 100644
index 0000000000..87b2d4cc6c
--- /dev/null
+++ b/layout/reftests/bugs/336153-1-ref.html
@@ -0,0 +1,12 @@
+<html>
+<body style="position:relative">
+<fieldset style="height: 150px; padding: 0px; background:orange; border:0; margin:0;"></fieldset>
+<div style="width:150px; height: 150px; overflow:scroll; background:red; position:absolute; top:0;">
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/336153-1.html b/layout/reftests/bugs/336153-1.html
new file mode 100644
index 0000000000..34b45dafff
--- /dev/null
+++ b/layout/reftests/bugs/336153-1.html
@@ -0,0 +1,13 @@
+<html>
+<body style="position:relative">
+<fieldset style="height: 150px; padding: 0px; background:orange; border:0; margin:0;">
+<div style="width:150px; height: 150px; overflow:scroll; background:red;">
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+text<br>text<br>text<br>text<br>text<br>text<br>
+</div>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-p-oh-ref.html b/layout/reftests/bugs/338251-p-oh-ref.html
new file mode 100644
index 0000000000..8167ec3afc
--- /dev/null
+++ b/layout/reftests/bugs/338251-p-oh-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<p style="overflow: hidden; width: 30ch;">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-p-oh.html b/layout/reftests/bugs/338251-p-oh.html
new file mode 100644
index 0000000000..c79566259e
--- /dev/null
+++ b/layout/reftests/bugs/338251-p-oh.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<p style="overflow: hidden; width: 30ch;">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-p.html b/layout/reftests/bugs/338251-p.html
new file mode 100644
index 0000000000..6600774fa7
--- /dev/null
+++ b/layout/reftests/bugs/338251-p.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<p>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-pre-oh-ref.html b/layout/reftests/bugs/338251-pre-oh-ref.html
new file mode 100644
index 0000000000..542e882f6b
--- /dev/null
+++ b/layout/reftests/bugs/338251-pre-oh-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<pre style="overflow: hidden; width: 30ch;">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</pre>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-pre-oh.html b/layout/reftests/bugs/338251-pre-oh.html
new file mode 100644
index 0000000000..adba029f55
--- /dev/null
+++ b/layout/reftests/bugs/338251-pre-oh.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<pre style="overflow: hidden; width: 30ch;">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</pre>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/338251-pre.html b/layout/reftests/bugs/338251-pre.html
new file mode 100644
index 0000000000..8c39e3e162
--- /dev/null
+++ b/layout/reftests/bugs/338251-pre.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<pre>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</pre>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/339289-1-ref.html b/layout/reftests/bugs/339289-1-ref.html
new file mode 100644
index 0000000000..2e81bbab71
--- /dev/null
+++ b/layout/reftests/bugs/339289-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<fieldset>Hello World</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/339289-1.html b/layout/reftests/bugs/339289-1.html
new file mode 100644
index 0000000000..5510ff9878
--- /dev/null
+++ b/layout/reftests/bugs/339289-1.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+ <style type="text/css">
+ fieldset:after {
+ content: "Hello World";
+ }
+ </style>
+</head>
+<body>
+<fieldset></fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/341043-1-ref.html b/layout/reftests/bugs/341043-1-ref.html
new file mode 100644
index 0000000000..a617ba59c7
--- /dev/null
+++ b/layout/reftests/bugs/341043-1-ref.html
@@ -0,0 +1,18 @@
+<html><head>
+<style>
+
+ body {
+ font-family: fixed, monospace;
+ background-color: white;
+ }
+
+</style>
+
+ </head><body>
+
+ 12345678ijklmnopqrstuvwxyz<br>
+ 12345678ijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+
+</body></html>
diff --git a/layout/reftests/bugs/341043-1a.html b/layout/reftests/bugs/341043-1a.html
new file mode 100644
index 0000000000..ba48122b4e
--- /dev/null
+++ b/layout/reftests/bugs/341043-1a.html
@@ -0,0 +1,22 @@
+<html><head>
+<style>
+
+ body {
+ font-family: fixed, monospace;
+ background-color: white;
+ }
+
+</style>
+
+ </head><body>
+
+ <div style="position: absolute; background-color: white;">
+ 12345678<br>12345678
+ </div>
+
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+
+</body></html>
diff --git a/layout/reftests/bugs/341043-1b.html b/layout/reftests/bugs/341043-1b.html
new file mode 100644
index 0000000000..59a4f28078
--- /dev/null
+++ b/layout/reftests/bugs/341043-1b.html
@@ -0,0 +1,22 @@
+<html><head>
+<style>
+
+ body {
+ font-family: fixed, monospace;
+ background-color: white;
+ }
+
+</style>
+
+ </head><body>
+
+ <div style="position: absolute">
+ 12345678<br>12345678
+ </div>
+
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+ abcdefghijklmnopqrstuvwxyz<br>
+
+</body></html>
diff --git a/layout/reftests/bugs/343538-1-ref.html b/layout/reftests/bugs/343538-1-ref.html
new file mode 100644
index 0000000000..0b7a7aef05
--- /dev/null
+++ b/layout/reftests/bugs/343538-1-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ background-color: pink;
+}
+div div {
+ float: left;
+ width: 100px; height: 100px;
+ margin: 4px;
+ border: 1px solid #000;
+ background-color: #eee;
+}
+br {
+ clear: left;
+}
+a {
+ outline: none;
+}
+</style>
+</head>
+<body>
+<div>
+ <div>
+ <a id="test" href="#">Link 1</a>
+ </div>
+ <div>
+ <a href="#">Link 2</a>
+ </div>
+ <br>
+ <div>
+ <a href="#">Link 3</a>
+ </div>
+ <br>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/343538-1.html b/layout/reftests/bugs/343538-1.html
new file mode 100644
index 0000000000..5462351c3f
--- /dev/null
+++ b/layout/reftests/bugs/343538-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ background-color: pink;
+}
+div div {
+ float: left;
+ width: 100px; height: 100px;
+ margin: 4px;
+ border: 1px solid #000;
+ background-color: #eee;
+}
+br {
+ clear: left;
+}
+a {
+ outline: none;
+}
+</style>
+</head>
+<body onload="document.getElementById('test').focus();">
+<div>
+ <div>
+ <a id="test" href="#">Link 1</a>
+ </div>
+ <div>
+ <a href="#">Link 2</a>
+ </div>
+ <br>
+ <div>
+ <a href="#">Link 3</a>
+ </div>
+ <br></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/343540-1-ref.html b/layout/reftests/bugs/343540-1-ref.html
new file mode 100644
index 0000000000..24c25935c2
--- /dev/null
+++ b/layout/reftests/bugs/343540-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style>
+span#dd:before {
+ display: inline;
+ white-space: pre;
+ content: "bef-\Aore";
+ color: gray;
+}
+
+</style>
+</head>
+<body>
+<span id="dd">new<div id="div">div</div></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/343540-1.html b/layout/reftests/bugs/343540-1.html
new file mode 100644
index 0000000000..cf1ce282d2
--- /dev/null
+++ b/layout/reftests/bugs/343540-1.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style>
+span#dd:before {
+ display: inline; white-space: pre; content: "bef-\Aore";
+ color: gray; }
+</style>
+<script>
+function boo()
+{
+ var div = document.getElementById("div");
+ var dd = document.getElementById("dd");
+ var newTextNode = document.createTextNode("new");
+ dd.insertBefore(newTextNode, div);
+}
+
+window.addEventListener("load", boo);
+
+</script>
+</head>
+<body>
+<span id="dd"><div id="div">div</div></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/345267-1-ref.html b/layout/reftests/bugs/345267-1-ref.html
new file mode 100644
index 0000000000..9bb47653ab
--- /dev/null
+++ b/layout/reftests/bugs/345267-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input size="20" value="abcde">
+</body>
+</html>
diff --git a/layout/reftests/bugs/345267-1a.html b/layout/reftests/bugs/345267-1a.html
new file mode 100644
index 0000000000..feace49e6b
--- /dev/null
+++ b/layout/reftests/bugs/345267-1a.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input size="20" maxlength="2" value="abcde">
+</body>
+</html>
diff --git a/layout/reftests/bugs/345267-1b.html b/layout/reftests/bugs/345267-1b.html
new file mode 100644
index 0000000000..e668b21136
--- /dev/null
+++ b/layout/reftests/bugs/345267-1b.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <style>
+ /* Override the default :invalid style. */
+ :invalid { box-shadow: none; }
+ </style>
+ <input size="20" maxlength="2">
+ <script>
+ document.body.offsetWidth;
+ document.getElementsByTagName("input")[0].value = "abcde";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/345267-1c.html b/layout/reftests/bugs/345267-1c.html
new file mode 100644
index 0000000000..1e78bec0dc
--- /dev/null
+++ b/layout/reftests/bugs/345267-1c.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input size="20" value="abcde">
+ <script>
+ document.body.offsetWidth;
+ document.getElementsByTagName("input")[0].maxLength = "2";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/345267-1d.html b/layout/reftests/bugs/345267-1d.html
new file mode 100644
index 0000000000..d912035a53
--- /dev/null
+++ b/layout/reftests/bugs/345267-1d.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input size="20" maxlength="2">
+ <script>
+ document.body.offsetWidth;
+ document.getElementsByTagName("input")[0].setAttribute("value", "abcde");
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/346774-1-ref.html b/layout/reftests/bugs/346774-1-ref.html
new file mode 100644
index 0000000000..ec607636e1
--- /dev/null
+++ b/layout/reftests/bugs/346774-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form name="theForm">
+ <select name="theSelect" style="width:auto">
+ <option>xxxxxxxxxx</option>
+ </select>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/346774-1a.html b/layout/reftests/bugs/346774-1a.html
new file mode 100644
index 0000000000..ff28145939
--- /dev/null
+++ b/layout/reftests/bugs/346774-1a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form name="theForm">
+ <select name="theSelect" style="width: auto">
+ <option>xxxxxxxxxx</option>
+ </select>
+</form>
+<script>
+ // Flush reflow
+ document.body.offsetWidth;
+ document.theForm.theSelect.style.width='30em';
+ document.body.offsetWidth;
+ document.theForm.theSelect.style.width='auto';
+</script>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/346774-1b.html b/layout/reftests/bugs/346774-1b.html
new file mode 100644
index 0000000000..2436d6dae4
--- /dev/null
+++ b/layout/reftests/bugs/346774-1b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form name="theForm">
+ <select name="theSelect" style="width: auto">
+ <option>xxxxxxxxxx</option>
+ </select>
+</form>
+<script>
+ // Flush reflow
+ document.body.offsetWidth;
+ document.theForm.theSelect.style.width='2em';
+ document.body.offsetWidth;
+ document.theForm.theSelect.style.width='auto';
+</script>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/346774-1c.html b/layout/reftests/bugs/346774-1c.html
new file mode 100644
index 0000000000..33f2e17d21
--- /dev/null
+++ b/layout/reftests/bugs/346774-1c.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form name="theForm">
+ <select name="theSelect" style="width: 30em">
+ <option>xxxxxxxxxx</option>
+ </select>
+</form>
+<script>
+ // Flush reflow
+ document.body.offsetWidth;
+ document.theForm.theSelect.style.width='auto';
+</script>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/347912-1-ref.html b/layout/reftests/bugs/347912-1-ref.html
new file mode 100644
index 0000000000..1d50b9f612
--- /dev/null
+++ b/layout/reftests/bugs/347912-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 347912</title>
+<style type="text/css">
+
+body { background: green; }
+
+</style>
+</head>
+<body>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/347912-1.html b/layout/reftests/bugs/347912-1.html
new file mode 100644
index 0000000000..19d3d7026f
--- /dev/null
+++ b/layout/reftests/bugs/347912-1.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 347912</title>
+<style type="text/css">
+
+body { background: green; }
+
+div { height: 10px; margin: 1em; }
+
+</style>
+</head>
+<body>
+
+<div style="background: red; background: transparent"></div>
+<div style="color: red; color: transparent">This is text</div>
+<div style="border: medium solid red; border-color: transparent"></div>
+<div style="border: medium solid red; border: medium solid transparent"></div>
+
+<div style="background: red; background: rgba(7, 35, 210, 0)"></div>
+<div style="color: red; color: rgba(7, 35, 210, 0)">This is text</div>
+<div style="border: medium solid red; border-color: rgba(7, 35, 210, 0)"></div>
+<div style="border: medium solid red; border: medium solid rgba(7, 35, 210, 0)"></div>
+
+<div style="color: red; color: rgba(7, 35, 210, 0.0)">This is text</div>
+<div style="color: red; color: rgba(7, 35, 210, .0)">This is text</div>
+<div style="color: red; color: rgba(7, 35, 210, .00000000000)">This is text</div>
+<div style="color: red; color: rgba(7, 35, 210, +.000)">This is text</div>
+<div style="color: red; color: rgba(7, 35, 210, +0.0)">This is text</div>
+<div style="color: red; color: rgba(7, 35, 210, +0)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, 0)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, 0.0)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, .0)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, .0000000000000)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, +.000)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, +0.0)">This is text</div>
+<div style="color: red; color: hsla(240, 40%, 20%, +0)">This is text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/348049-1-ref.xhtml b/layout/reftests/bugs/348049-1-ref.xhtml
new file mode 100644
index 0000000000..b892106c82
--- /dev/null
+++ b/layout/reftests/bugs/348049-1-ref.xhtml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <div>
+ <td>PASS</td>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/348049-1.xhtml b/layout/reftests/bugs/348049-1.xhtml
new file mode 100644
index 0000000000..98ae7966a8
--- /dev/null
+++ b/layout/reftests/bugs/348049-1.xhtml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <head>
+ <script><![CDATA[
+ customElements.define("custom-td", class extends HTMLDivElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+ let td = document.createElement('td');
+ td.append(document.createElement('slot'));
+ this.shadowRoot.append(td);
+ }
+ }, {
+ extends: "div",
+ });
+ function f1() {
+ document.getElementById("outer")
+ .appendChild(document.createTextNode("PASS"));
+ document.documentElement.className = "";
+ }
+ ]]></script>
+ </head>
+ <body onload="f1();">
+ <div is="custom-td" id="outer"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/348516-1-ref.html b/layout/reftests/bugs/348516-1-ref.html
new file mode 100644
index 0000000000..3479026aaa
--- /dev/null
+++ b/layout/reftests/bugs/348516-1-ref.html
@@ -0,0 +1,21 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option style="margin-right: 50%;">left</option>
+<option style="margin-left: 50%;">right</option>
+<option style="margin-left: 25%; margin-right: 25%;">center</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-1.html b/layout/reftests/bugs/348516-1.html
new file mode 100644
index 0000000000..a28e258a8a
--- /dev/null
+++ b/layout/reftests/bugs/348516-1.html
@@ -0,0 +1,21 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option style="margin-right: auto;">left</option>
+<option style="margin-left: auto;">right</option>
+<option style="margin-left: auto; margin-right: auto;">center</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-2-notref.html b/layout/reftests/bugs/348516-2-notref.html
new file mode 100644
index 0000000000..1c13e27e54
--- /dev/null
+++ b/layout/reftests/bugs/348516-2-notref.html
@@ -0,0 +1,18 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option>left</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-2-ref.html b/layout/reftests/bugs/348516-2-ref.html
new file mode 100644
index 0000000000..bb4ae1f4d2
--- /dev/null
+++ b/layout/reftests/bugs/348516-2-ref.html
@@ -0,0 +1,19 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option>left</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-2.html b/layout/reftests/bugs/348516-2.html
new file mode 100644
index 0000000000..a3bbe887b6
--- /dev/null
+++ b/layout/reftests/bugs/348516-2.html
@@ -0,0 +1,19 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option style="margin-right: 50%;">left</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-3-notref.html b/layout/reftests/bugs/348516-3-notref.html
new file mode 100644
index 0000000000..613ab07503
--- /dev/null
+++ b/layout/reftests/bugs/348516-3-notref.html
@@ -0,0 +1,19 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option>right</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348516-3.html b/layout/reftests/bugs/348516-3.html
new file mode 100644
index 0000000000..00bb49b54a
--- /dev/null
+++ b/layout/reftests/bugs/348516-3.html
@@ -0,0 +1,19 @@
+<html><head>
+
+<style>
+
+select {
+ width: 200px;
+}
+option {
+ padding: 0;
+ width: 50%;
+ background-color: cyan;
+}
+</style></head><body>
+
+<select size="3">
+<option style="margin-left: 50%;">right</option>
+</select>
+
+</body></html>
diff --git a/layout/reftests/bugs/348597-1.html b/layout/reftests/bugs/348597-1.html
new file mode 100644
index 0000000000..42c084202f
--- /dev/null
+++ b/layout/reftests/bugs/348597-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html class="reftest-wait"><head>
+
+ <style type="text/css">
+ table.suchergebnis, table.suchergebnis tr, table.suchergebnis tdx, table.suchergebnis th {
+ border: 1px solid #ccc;
+ border-collapse: collapse;
+ text-align: center;
+ }
+ </style>
+ <script>
+ function doTest() {
+ var s1 = document.getElementById("screen");
+ s1.remove();
+ document.documentElement.removeAttribute('class');
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ <title>PomPIS Liste</title>
+</head>
+<body>
+<div id="screen" style="position: fixed; left:50px; top: 20px; height:8px; width: 200px; background-color:white; border:1px solid green;"></div>
+ <table class="suchergebnis" border="1" style="width: 100%">
+ <tr><td>Frage</td></tr>
+ <tr style="border-bottom: 10px solid green;">
+ <td>Verhalten</td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/348597-ref.html b/layout/reftests/bugs/348597-ref.html
new file mode 100644
index 0000000000..678565ca6d
--- /dev/null
+++ b/layout/reftests/bugs/348597-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+ <style type="text/css">
+ table.suchergebnis, table.suchergebnis tr, table.suchergebnis tdx, table.suchergebnis th {
+ border: 1px solid #ccc;
+ border-collapse: collapse;
+ text-align: center;
+ }
+ </style>
+
+ <title>PomPIS Liste</title>
+</head>
+<body>
+
+ <table class="suchergebnis" border="1" style="width: 100%">
+ <tr><td>Frage</td></tr>
+ <tr style="border-bottom: 10px solid green;">
+ <td>Verhalten</td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/348809-1-ref.html b/layout/reftests/bugs/348809-1-ref.html
new file mode 100644
index 0000000000..18eccacb82
--- /dev/null
+++ b/layout/reftests/bugs/348809-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+</style>
+</head>
+<body>
+<span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1a.html b/layout/reftests/bugs/348809-1a.html
new file mode 100644
index 0000000000..6b88d0c8dc
--- /dev/null
+++ b/layout/reftests/bugs/348809-1a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<input checked="checked" id="foo"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1b.html b/layout/reftests/bugs/348809-1b.html
new file mode 100644
index 0000000000..43ed710313
--- /dev/null
+++ b/layout/reftests/bugs/348809-1b.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+input { display: none }
+</style>
+</head>
+<body>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1c.html b/layout/reftests/bugs/348809-1c.html
new file mode 100644
index 0000000000..b7fd4cf541
--- /dev/null
+++ b/layout/reftests/bugs/348809-1c.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:checked + span { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").removeAttribute("type");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1d.html b/layout/reftests/bugs/348809-1d.html
new file mode 100644
index 0000000000..5264e76ab6
--- /dev/null
+++ b/layout/reftests/bugs/348809-1d.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:checked + span { color: green }
+input { display: none }
+</style>
+</head>
+<body>
+<input checked="checked" id="foo"><span>There should be no red</span>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").setAttribute("type", "checkbox");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1e.html b/layout/reftests/bugs/348809-1e.html
new file mode 100644
index 0000000000..7612dd0e56
--- /dev/null
+++ b/layout/reftests/bugs/348809-1e.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default:checked + span { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="submit">
+ <input type="radio" checked="checked" id="foo">
+ <span>There should be no red</span>
+</div>
+</form>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").setAttribute("type", "submit");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-1f.html b/layout/reftests/bugs/348809-1f.html
new file mode 100644
index 0000000000..7cc0538070
--- /dev/null
+++ b/layout/reftests/bugs/348809-1f.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default:checked + span { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
+ <script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").removeAttribute("checked");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2-ref.html b/layout/reftests/bugs/348809-2-ref.html
new file mode 100644
index 0000000000..51765a1761
--- /dev/null
+++ b/layout/reftests/bugs/348809-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <span>There should be no red.</span>
+</div>
+<div>
+ <span>There should be no red.</span>
+</div>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2a.html b/layout/reftests/bugs/348809-2a.html
new file mode 100644
index 0000000000..f3e30ef98c
--- /dev/null
+++ b/layout/reftests/bugs/348809-2a.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:default + span { color: green }
+span.reverse { color: green }
+:default + span.reverse { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="submit" checked="checked" id="foo"><span>There should be no red.</span>
+</div>
+<div>
+ <input type="submit"><span class="reverse">There should be no red.</span>
+</div>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2b.html b/layout/reftests/bugs/348809-2b.html
new file mode 100644
index 0000000000..df0e61ac0d
--- /dev/null
+++ b/layout/reftests/bugs/348809-2b.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:default + span { color: green }
+span.reverse { color: green }
+:default + span.reverse { color: red }
+button { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <button type="submit" checked="checked" id="foo"></button>
+ <span>There should be no red.</span>
+</div>
+<div>
+ <button type="submit"></button><span class="reverse">There should be no red.</span>
+</div>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2c.html b/layout/reftests/bugs/348809-2c.html
new file mode 100644
index 0000000000..bcf565e08f
--- /dev/null
+++ b/layout/reftests/bugs/348809-2c.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:default + span { color: green }
+span.reverse { color: green }
+:default + span.reverse { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="checkbox" checked="checked" id="foo">
+ <span>There should be no red.</span>
+</div>
+<div>
+ <input checked="checked"><span class="reverse">There should be no red.</span>
+</div>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2d.html b/layout/reftests/bugs/348809-2d.html
new file mode 100644
index 0000000000..6afda23d4f
--- /dev/null
+++ b/layout/reftests/bugs/348809-2d.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: red }
+:default + span { color: green }
+span.reverse { color: green }
+:default + span.reverse { color: red }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="radio" checked="checked" id="foo">
+ <span>There should be no red.</span>
+</div>
+<div>
+ <input checked="checked"><span class="reverse">There should be no red.</span>
+</div>
+</form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2e.html b/layout/reftests/bugs/348809-2e.html
new file mode 100644
index 0000000000..91437288d9
--- /dev/null
+++ b/layout/reftests/bugs/348809-2e.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default + span { color: red }
+span.reverse { color: red }
+:default + span.reverse { color: green }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="submit" checked="checked" id="foo"><span>There should be no red.</span>
+</div>
+<div>
+ <input type="submit"><span class="reverse">There should be no red.</span>
+</div>
+</form>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").removeAttribute("type");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2f.html b/layout/reftests/bugs/348809-2f.html
new file mode 100644
index 0000000000..74d69838bb
--- /dev/null
+++ b/layout/reftests/bugs/348809-2f.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default + span { color: red }
+span.reverse { color: red }
+:default + span.reverse { color: green }
+button { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <button type="submit" checked="checked" id="foo"></button>
+ <span>There should be no red.</span>
+</div>
+<div>
+ <button type="submit"></button><span class="reverse">There should be no red.</span>
+</div>
+</form>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").setAttribute("type", "button");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2g.html b/layout/reftests/bugs/348809-2g.html
new file mode 100644
index 0000000000..f372a1b815
--- /dev/null
+++ b/layout/reftests/bugs/348809-2g.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default + span { color: red }
+span.reverse { color: red }
+:default + span.reverse { color: green }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="checkbox" checked="checked" id="foo">
+ <span>There should be no red.</span>
+</div>
+<div>
+ <input checked="checked" id="bar">
+ <span class="reverse">There should be no red.</span>
+</div>
+</form>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").removeAttribute("type");
+ document.getElementById("bar").setAttribute("type", "checkbox");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/348809-2h.html b/layout/reftests/bugs/348809-2h.html
new file mode 100644
index 0000000000..c5a1154dd4
--- /dev/null
+++ b/layout/reftests/bugs/348809-2h.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+span { color: green }
+:default + span { color: red }
+span.reverse { color: red }
+:default + span.reverse { color: green }
+input { display: none }
+</style>
+</head>
+<body>
+<form>
+<div>
+ <input type="radio" checked="checked" id="foo">
+ <span>There should be no red.</span>
+</div>
+<div>
+ <input checked="checked" id="bar">
+ <span class="reverse">There should be no red.</span>
+</div>
+</form>
+<script>
+ var foo = document.body.offsetWidth;
+ document.getElementById("foo").removeAttribute("type");
+ document.getElementById("bar").setAttribute("type", "radio");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/349695-1-ref.html b/layout/reftests/bugs/349695-1-ref.html
new file mode 100644
index 0000000000..f5efeb3abe
--- /dev/null
+++ b/layout/reftests/bugs/349695-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+<tr>
+ <td>First</td>
+ <td>Second</td>
+</tr>
+<tr>
+ <td>Third</td>
+ <td>Fourth</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/349695-1a.html b/layout/reftests/bugs/349695-1a.html
new file mode 100644
index 0000000000..15e2008996
--- /dev/null
+++ b/layout/reftests/bugs/349695-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+<tr>
+ <td>First</td>
+ <form>
+ <td>Second</td>
+ </form>
+</tr>
+<tr>
+ <td>Third</td>
+ <td>Fourth</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/349695-1b.html b/layout/reftests/bugs/349695-1b.html
new file mode 100644
index 0000000000..05a29ad485
--- /dev/null
+++ b/layout/reftests/bugs/349695-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+<tr>
+ <td>First</td>
+ <form style="display: block">
+ <td>Second</td>
+ </form>
+</tr>
+<tr>
+ <td>Third</td>
+ <td>Fourth</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/350506-1-ref.html b/layout/reftests/bugs/350506-1-ref.html
new file mode 100644
index 0000000000..4dd642d24c
--- /dev/null
+++ b/layout/reftests/bugs/350506-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ font-family: sans-serif;
+ padding: 1px;
+ width: 100%;
+}
+.last {
+ width: 100%;
+}
+</style>
+</head>
+<body>
+<table>
+ <tr>
+ <td>
+ <div>table-cell</div>
+ </td>
+ <td class="last"></td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/350506-1.html b/layout/reftests/bugs/350506-1.html
new file mode 100644
index 0000000000..a71b0b6f6e
--- /dev/null
+++ b/layout/reftests/bugs/350506-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ font-family: sans-serif;
+ padding: 1px;
+ width: 100%;
+ overflow-x: hidden;
+}
+.last {
+ width: 100%;
+}
+</style>
+</head>
+<body>
+<table>
+ <tr>
+ <td>
+ <div>table-cell</div>
+ </td>
+ <td class="last"></td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/351641-1-ref.html b/layout/reftests/bugs/351641-1-ref.html
new file mode 100644
index 0000000000..1e60f0dbc6
--- /dev/null
+++ b/layout/reftests/bugs/351641-1-ref.html
@@ -0,0 +1,6 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<body style="font-family:sans-serif">
+<table border><tr><td>
+<div>a</div><div>bcd<span>efg</span>hij</div><div>k</div>
+</td></tr></table>
+</body>
diff --git a/layout/reftests/bugs/351641-1a.html b/layout/reftests/bugs/351641-1a.html
new file mode 100644
index 0000000000..46abadc613
--- /dev/null
+++ b/layout/reftests/bugs/351641-1a.html
@@ -0,0 +1,6 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<body style="font-family:sans-serif">
+<table border width="1"><tr><td>
+a bcd<span>efg</span>hij k
+</td></tr></table>
+</body>
diff --git a/layout/reftests/bugs/351641-1b.html b/layout/reftests/bugs/351641-1b.html
new file mode 100644
index 0000000000..148e2b663d
--- /dev/null
+++ b/layout/reftests/bugs/351641-1b.html
@@ -0,0 +1,6 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<body style="font-family:sans-serif">
+<table border width="1"><tr><td>
+a bcdefghij k
+</td></tr></table>
+</body>
diff --git a/layout/reftests/bugs/351641-2-ref.html b/layout/reftests/bugs/351641-2-ref.html
new file mode 100644
index 0000000000..2355c892a1
--- /dev/null
+++ b/layout/reftests/bugs/351641-2-ref.html
@@ -0,0 +1,4 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<table border><tr><td>
+<div>ã®</div><div>ã®</div><div>ã®</div><div>ã®</div><div>ã®</div><div>ã®</div><div>ã®</div><div>ã®</div>
+</td></tr></table>
diff --git a/layout/reftests/bugs/351641-2a.html b/layout/reftests/bugs/351641-2a.html
new file mode 100644
index 0000000000..a65bd81ba4
--- /dev/null
+++ b/layout/reftests/bugs/351641-2a.html
@@ -0,0 +1,4 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<table width="1" border><tr><td>
+ã®ã®ã®ã®ã®ã®ã®ã®
+</td></tr></table>
diff --git a/layout/reftests/bugs/351641-2b.html b/layout/reftests/bugs/351641-2b.html
new file mode 100644
index 0000000000..75f6525e84
--- /dev/null
+++ b/layout/reftests/bugs/351641-2b.html
@@ -0,0 +1,4 @@
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<table width="1" border><tr><td>
+ã®ã®ã®<span>ã®ã®ã®</span>ã®ã®
+</td></tr></table>
diff --git a/layout/reftests/bugs/352980-1-ref.html b/layout/reftests/bugs/352980-1-ref.html
new file mode 100644
index 0000000000..5ff9b9ef7d
--- /dev/null
+++ b/layout/reftests/bugs/352980-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: green }
+ </style>
+ </head>
+ <body>
+ <form>
+ <span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1a.html b/layout/reftests/bugs/352980-1a.html
new file mode 100644
index 0000000000..414ecea39c
--- /dev/null
+++ b/layout/reftests/bugs/352980-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="image"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1b.html b/layout/reftests/bugs/352980-1b.html
new file mode 100644
index 0000000000..f4201bf781
--- /dev/null
+++ b/layout/reftests/bugs/352980-1b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="image"><span>This should be green</span>
+ <input type="submit">
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1c.html b/layout/reftests/bugs/352980-1c.html
new file mode 100644
index 0000000000..96b4972a4a
--- /dev/null
+++ b/layout/reftests/bugs/352980-1c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input type="submit"><span>This should be green</span>
+ <input type="image">
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1d.html b/layout/reftests/bugs/352980-1d.html
new file mode 100644
index 0000000000..8ca2918e33
--- /dev/null
+++ b/layout/reftests/bugs/352980-1d.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input><input type="image"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1e.html b/layout/reftests/bugs/352980-1e.html
new file mode 100644
index 0000000000..ed0cf0fbf1
--- /dev/null
+++ b/layout/reftests/bugs/352980-1e.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'submit';
+ foo.insertBefore(bar, foo.firstChild)">
+ <form id="foo">
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1f.html b/layout/reftests/bugs/352980-1f.html
new file mode 100644
index 0000000000..6972f39838
--- /dev/null
+++ b/layout/reftests/bugs/352980-1f.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'submit';
+ foo.insertBefore(bar, foo.firstChild)">
+ <form id="foo"><span>This should be green</span>
+ <input type="image">
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1g.html b/layout/reftests/bugs/352980-1g.html
new file mode 100644
index 0000000000..acafbacc9d
--- /dev/null
+++ b/layout/reftests/bugs/352980-1g.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'image';
+ foo.insertBefore(bar, foo.firstChild)">
+ <form id="foo">
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1h.html b/layout/reftests/bugs/352980-1h.html
new file mode 100644
index 0000000000..b10c0003be
--- /dev/null
+++ b/layout/reftests/bugs/352980-1h.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'image';
+ foo.insertBefore(bar, foo.firstChild)">
+ <form id="foo"><span>This should be green</span>
+ <input type="submit">
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1i.html b/layout/reftests/bugs/352980-1i.html
new file mode 100644
index 0000000000..e57fd96a41
--- /dev/null
+++ b/layout/reftests/bugs/352980-1i.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'submit';
+ foo.appendChild(bar)">
+ <form id="foo">
+ <input type="image"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1j.html b/layout/reftests/bugs/352980-1j.html
new file mode 100644
index 0000000000..d58b836189
--- /dev/null
+++ b/layout/reftests/bugs/352980-1j.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'image';
+ foo.appendChild(bar)">
+ <form id="foo">
+ <input type="image"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1k.html b/layout/reftests/bugs/352980-1k.html
new file mode 100644
index 0000000000..fdf5270927
--- /dev/null
+++ b/layout/reftests/bugs/352980-1k.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'submit';
+ foo.appendChild(bar)">
+ <form id="foo">
+ <input type="submit"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-1l.html b/layout/reftests/bugs/352980-1l.html
new file mode 100644
index 0000000000..811ea85802
--- /dev/null
+++ b/layout/reftests/bugs/352980-1l.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="var foo = document.getElementById('foo');
+ var bar = document.createElement('input');
+ bar.type = 'image';
+ foo.appendChild(bar)">
+ <form id="foo">
+ <input type="submit"><span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2-ref.html b/layout/reftests/bugs/352980-2-ref.html
new file mode 100644
index 0000000000..67ec5c697f
--- /dev/null
+++ b/layout/reftests/bugs/352980-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: green }
+ </style>
+ </head>
+ <body>
+ <form>
+ <span>This should be green</span>
+ <span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2a.html b/layout/reftests/bugs/352980-2a.html
new file mode 100644
index 0000000000..6303cc9227
--- /dev/null
+++ b/layout/reftests/bugs/352980-2a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2b.html b/layout/reftests/bugs/352980-2b.html
new file mode 100644
index 0000000000..1d215ba4d8
--- /dev/null
+++ b/layout/reftests/bugs/352980-2b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2c.html b/layout/reftests/bugs/352980-2c.html
new file mode 100644
index 0000000000..6303cc9227
--- /dev/null
+++ b/layout/reftests/bugs/352980-2c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2d.html b/layout/reftests/bugs/352980-2d.html
new file mode 100644
index 0000000000..1d215ba4d8
--- /dev/null
+++ b/layout/reftests/bugs/352980-2d.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2e.html b/layout/reftests/bugs/352980-2e.html
new file mode 100644
index 0000000000..8c4aca7846
--- /dev/null
+++ b/layout/reftests/bugs/352980-2e.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-2f.html b/layout/reftests/bugs/352980-2f.html
new file mode 100644
index 0000000000..5ee4f1e659
--- /dev/null
+++ b/layout/reftests/bugs/352980-2f.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image'">
+ <form>
+ <input id="foo"><span>This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3-ref.html b/layout/reftests/bugs/352980-3-ref.html
new file mode 100644
index 0000000000..da21758ab4
--- /dev/null
+++ b/layout/reftests/bugs/352980-3-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: green }
+ </style>
+ </head>
+ <body>
+ <form>
+ <span>This should be green</span>
+ <span>This should be green</span>
+ <span>This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3a.html b/layout/reftests/bugs/352980-3a.html
new file mode 100644
index 0000000000..29aa6a2a06
--- /dev/null
+++ b/layout/reftests/bugs/352980-3a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image'">
+ <form>
+ <input type="submit"><span>This should be green</span>
+ <input id="foo"><span class="reverse">This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3b.html b/layout/reftests/bugs/352980-3b.html
new file mode 100644
index 0000000000..9e5e18eaef
--- /dev/null
+++ b/layout/reftests/bugs/352980-3b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit'">
+ <form>
+ <input type="image"><span>This should be green</span>
+ <input id="foo"><span class="reverse">This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3c.html b/layout/reftests/bugs/352980-3c.html
new file mode 100644
index 0000000000..81f39b5c64
--- /dev/null
+++ b/layout/reftests/bugs/352980-3c.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit';
+ document.getElementById('bar').type = ''">
+ <form>
+ <input id="bar" type="image"><span class="reverse">This should be green</span>
+ <input id="foo"><span>This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3d.html b/layout/reftests/bugs/352980-3d.html
new file mode 100644
index 0000000000..c001045ef8
--- /dev/null
+++ b/layout/reftests/bugs/352980-3d.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image';
+ document.getElementById('bar').type = ''">
+ <form>
+ <input id="bar" type="image"><span class="reverse">This should be green</span>
+ <input id="foo"><span>This should be green</span>
+ <input type="submit"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3e.html b/layout/reftests/bugs/352980-3e.html
new file mode 100644
index 0000000000..7482774bfa
--- /dev/null
+++ b/layout/reftests/bugs/352980-3e.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'image';
+ document.getElementById('bar').type = ''">
+ <form>
+ <input id="bar" type="submit"><span class="reverse">This should be green</span>
+ <input id="foo"><span>This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/352980-3f.html b/layout/reftests/bugs/352980-3f.html
new file mode 100644
index 0000000000..884857adf7
--- /dev/null
+++ b/layout/reftests/bugs/352980-3f.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red }
+ :default + span { color: green }
+ span.reverse { color: green }
+ :default + span.reverse { color: red }
+ input { display: none }
+ </style>
+ </head>
+ <body onload="document.getElementById('foo').type = 'submit';
+ document.getElementById('bar').type = ''">
+ <form>
+ <input id="bar" type="submit"><span class="reverse">This should be green</span>
+ <input id="foo"><span>This should be green</span>
+ <input type="image"><span class="reverse">This should be green</span>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/356774-1-ref.html b/layout/reftests/bugs/356774-1-ref.html
new file mode 100644
index 0000000000..e781b795a1
--- /dev/null
+++ b/layout/reftests/bugs/356774-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<style>
+table {
+ border: .1mm solid black;
+}
+</style>
+<body>
+<table cellspacing="0">
+ <tr>
+ <td>border: .1mm, collapsed</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/356774-1.html b/layout/reftests/bugs/356774-1.html
new file mode 100644
index 0000000000..4299f31893
--- /dev/null
+++ b/layout/reftests/bugs/356774-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<style>
+table {
+ border: .1mm solid black;
+ border-collapse: collapse;
+}
+</style>
+<body>
+<table>
+ <tr>
+ <td>border: .1mm, collapsed</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/356775-1-ref.html b/layout/reftests/bugs/356775-1-ref.html
new file mode 100644
index 0000000000..6cd0bf8cfc
--- /dev/null
+++ b/layout/reftests/bugs/356775-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<style type="text/css">
+span {
+ border: 1px solid black;
+ word-spacing: 0.7em;
+}
+</style>
+</head>
+<body>
+<span>山本 一郎</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/356775-1.html b/layout/reftests/bugs/356775-1.html
new file mode 100644
index 0000000000..1e5cc977ce
--- /dev/null
+++ b/layout/reftests/bugs/356775-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<style type="text/css">
+span {
+ border: 1px solid black;
+ white-space: pre;
+ word-spacing: 0.7em;
+}
+</style>
+</head>
+<body>
+<span>山本 一郎</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/359869-1-ref.html b/layout/reftests/bugs/359869-1-ref.html
new file mode 100644
index 0000000000..916f507bd2
--- /dev/null
+++ b/layout/reftests/bugs/359869-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>test</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+
+<body>
+
+<form action="">
+ <fieldset>
+ <p></p>
+ </fieldset>
+</form>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/359869-1.html b/layout/reftests/bugs/359869-1.html
new file mode 100644
index 0000000000..ca8b85cf79
--- /dev/null
+++ b/layout/reftests/bugs/359869-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>test</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+
+<body>
+
+<form action="">
+ <fieldset>
+ <legend style="display:none">TEST</legend>
+ <p></p>
+ </fieldset>
+</form>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/359903-1-ref.html b/layout/reftests/bugs/359903-1-ref.html
new file mode 100644
index 0000000000..49827269d4
--- /dev/null
+++ b/layout/reftests/bugs/359903-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input type="button" style="width: 1.5em; text-align: left; font-size: 14px" value="M">
+</body>
+</html>
diff --git a/layout/reftests/bugs/359903-1.html b/layout/reftests/bugs/359903-1.html
new file mode 100644
index 0000000000..863134bf84
--- /dev/null
+++ b/layout/reftests/bugs/359903-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input type="button" style="width: 1.5em; padding-left: 0; padding-right: 0; text-align: left; font-size: 14px" value="M">
+</body>
+</html>
diff --git a/layout/reftests/bugs/359903-2-ref.html b/layout/reftests/bugs/359903-2-ref.html
new file mode 100644
index 0000000000..9cc839f4c3
--- /dev/null
+++ b/layout/reftests/bugs/359903-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<button style="width: 100px; border: 0;
+ padding-left: 10px; padding-right: 10px">
+ <img src="blue-600x58.png" width="90">
+</button>
+</body>
+</html>
diff --git a/layout/reftests/bugs/359903-2.html b/layout/reftests/bugs/359903-2.html
new file mode 100644
index 0000000000..ca66ab7fd7
--- /dev/null
+++ b/layout/reftests/bugs/359903-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<button style="width: 100px; border: 0;
+ padding-left: 0px; padding-right: 0px">
+ <img src="blue-600x58.png" width="90">
+</button>
+</body>
+</html>
diff --git a/layout/reftests/bugs/360065-1-ref.html b/layout/reftests/bugs/360065-1-ref.html
new file mode 100644
index 0000000000..bdb14387fd
--- /dev/null
+++ b/layout/reftests/bugs/360065-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>table-cell Testcase</title>
+ <style type="text/css">
+
+ /* Test case: */
+ .tablespan {
+ display: inline-table;
+ }
+ .inlinediv { border: 1px solid blue; }
+ .tablespan { border: 1px solid purple; }
+
+ </style>
+ </head>
+ <body>
+
+ <span class="inlinediv">
+ <span class="tablespan">x</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360065-1.html b/layout/reftests/bugs/360065-1.html
new file mode 100644
index 0000000000..7dbc2b37a2
--- /dev/null
+++ b/layout/reftests/bugs/360065-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>table-cell Testcase</title>
+ <style type="text/css">
+
+ /* Test case: */
+ .tablespan {
+ display: table-cell;
+ }
+ .inlinediv { border: 1px solid blue; }
+ .tablespan { border: 1px solid purple; }
+
+ </style>
+ </head>
+ <body>
+
+ <span class="inlinediv">
+ <span class="tablespan">x</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360746-1-ref.html b/layout/reftests/bugs/360746-1-ref.html
new file mode 100644
index 0000000000..7217fe6ccd
--- /dev/null
+++ b/layout/reftests/bugs/360746-1-ref.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <title>Testcase bug 360746 - The right panel has disappeared at andrewdupont.net</title>
+ <style>
+ div { height: 20px; background-color: green }
+ </style>
+ </head>
+ <body>
+ <div id="test1"></div>
+ <div id="test2"></div>
+ <div id="test3"></div>
+ <div id="test4"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360746-1.html b/layout/reftests/bugs/360746-1.html
new file mode 100644
index 0000000000..5e448429b3
--- /dev/null
+++ b/layout/reftests/bugs/360746-1.html
@@ -0,0 +1,40 @@
+<html>
+ <head>
+ <title>Testcase bug 360746 - The right panel has disappeared at andrewdupont.net</title>
+ <style>
+ div { height: 20px }
+ #test1 {
+ background-color: green;
+ }
+ #test2 {
+ background-color: red;
+ }
+ #test3 {
+ background-color: green;
+ }
+ #test4 {
+ background-color: green;
+ }
+ </style>
+ <link href="data:text/css;charset=utf-8," title="narrow" rel="stylesheet" type="text/css" />
+ <link href="data:text/css;charset=utf-8,%23test1%20%7Bbackground-color%3A%20red%3B%7D" title="medium" rel="alternate stylesheet" type="text/css" />
+ <link href="data:text/css;charset=utf-8,%23test2%20%7Bbackground-color%3A%20green%3B%7D" type="text/css" />
+ <link href="data:text/css;charset=utf-8,%23test3%20%7Bbackground-color%3A%20red%3B%7D" rel="stylesheet" type="text/css" />
+ <link href="data:text/css;charset=utf-8,%23test4%20%7Bbackground-color%3A%20red%3B%7D" rel="stylesheet" type="text/css" />
+ <script>
+ document.getElementsByTagName('link')[1].disabled = false;
+ document.getElementsByTagName('link')[1].rel = 'stylesheet';
+ </script>
+ </head>
+ <body>
+ <div id="test1"></div>
+ <div id="test2"></div>
+ <div id="test3"></div>
+ <div id="test4"></div>
+ <script>
+ document.getElementsByTagName('link')[2].rel = 'stylesheet for-the-win';
+ document.getElementsByTagName('link')[3].rel = 'just for-the-win';
+ document.getElementsByTagName('link')[4].removeAttribute("rel");
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360757-1-ref.html b/layout/reftests/bugs/360757-1-ref.html
new file mode 100644
index 0000000000..034e266e1b
--- /dev/null
+++ b/layout/reftests/bugs/360757-1-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <style>
+ body > div { overflow: visible }
+ .test { height: 20px; background: green }
+ #test2 { padding: 0 100px }
+ #test3 { padding: 0 100px; width: 250px }
+ #test4 { padding: 0 10% }
+ #test5 { padding: 0 10%; width: 250px }
+ body { width: 500px }
+ </style>
+ </head>
+
+ <body>
+ <div id="test1">
+ <div class="test"></div>
+ </div>
+ <div id="test2">
+ <div class="test"></div>
+ </div>
+ <div id="test3">
+ <div class="test"></div>
+ </div>
+ <div id="test4">
+ <div class="test"></div>
+ </div>
+ <div id="test5">
+ <div class="test"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360757-1a.html b/layout/reftests/bugs/360757-1a.html
new file mode 100644
index 0000000000..3ce13f4e5b
--- /dev/null
+++ b/layout/reftests/bugs/360757-1a.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <style>
+ body > div { overflow: hidden }
+ .test { height: 20px; background: green }
+ #test2 { padding: 0 100px }
+ #test3 { padding: 0 100px; width: 250px }
+ #test4 { padding: 0 10% }
+ #test5 { padding: 0 10%; width: 250px }
+ body { width: 500px }
+ </style>
+ </head>
+
+ <body>
+ <div id="test1">
+ <div class="test"></div>
+ </div>
+ <div id="test2">
+ <div class="test"></div>
+ </div>
+ <div id="test3">
+ <div class="test"></div>
+ </div>
+ <div id="test4">
+ <div class="test"></div>
+ </div>
+ <div id="test5">
+ <div class="test"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/360757-1b.html b/layout/reftests/bugs/360757-1b.html
new file mode 100644
index 0000000000..ddf453d50e
--- /dev/null
+++ b/layout/reftests/bugs/360757-1b.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <style>
+ body > div { overflow: auto }
+ .test { height: 20px; background: green }
+ #test2 { padding: 0 100px }
+ #test3 { padding: 0 100px; width: 250px }
+ #test4 { padding: 0 10% }
+ #test5 { padding: 0 10%; width: 250px }
+ body { width: 500px }
+ </style>
+ </head>
+
+ <body>
+ <div id="test1">
+ <div class="test"></div>
+ </div>
+ <div id="test2">
+ <div class="test"></div>
+ </div>
+ <div id="test3">
+ <div class="test"></div>
+ </div>
+ <div id="test4">
+ <div class="test"></div>
+ </div>
+ <div id="test5">
+ <div class="test"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/361091-1-ref.html b/layout/reftests/bugs/361091-1-ref.html
new file mode 100644
index 0000000000..1d9ec1ee61
--- /dev/null
+++ b/layout/reftests/bugs/361091-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <style type="text/css">
+ .a { width:300px; border:1px solid #000;}
+ .b {float:right; width:100px; height:100px; background:#ccc;}
+ </style>
+</head>
+<body>
+ <div class="a">
+ <div class="b">float right</div>
+ <div>Long text long text long text long text long text long text long text long text long text</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/361091-1.html b/layout/reftests/bugs/361091-1.html
new file mode 100644
index 0000000000..b7dc75178e
--- /dev/null
+++ b/layout/reftests/bugs/361091-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <style type="text/css">
+ .a { width:300px; border:1px solid #000;}
+ .b {float:right; width:100px; height:100px; background:#ccc;}
+ </style>
+</head>
+<body>
+ <div class="a">
+ <div class="b">float right</div>
+ <span><div>Long text long text long text long text long text long text long text long text long text</div></span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-1-quirks-ref.html b/layout/reftests/bugs/362594-1-quirks-ref.html
new file mode 100644
index 0000000000..28f33b530c
--- /dev/null
+++ b/layout/reftests/bugs/362594-1-quirks-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table border="4">
+ <tr>
+ <td width="200">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-1-standards-ref.html b/layout/reftests/bugs/362594-1-standards-ref.html
new file mode 100644
index 0000000000..cbbbbed66d
--- /dev/null
+++ b/layout/reftests/bugs/362594-1-standards-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table border="4">
+ <tr>
+ <td width="200">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-1a.html b/layout/reftests/bugs/362594-1a.html
new file mode 100644
index 0000000000..b3c71f9cd0
--- /dev/null
+++ b/layout/reftests/bugs/362594-1a.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200" nowrap>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-1b.html b/layout/reftests/bugs/362594-1b.html
new file mode 100644
index 0000000000..070cdba40c
--- /dev/null
+++ b/layout/reftests/bugs/362594-1b.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td style="min-width: 200px">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-1c.html b/layout/reftests/bugs/362594-1c.html
new file mode 100644
index 0000000000..133c0d7f97
--- /dev/null
+++ b/layout/reftests/bugs/362594-1c.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td style="min-width: 200px">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-2-quirks-ref.html b/layout/reftests/bugs/362594-2-quirks-ref.html
new file mode 100644
index 0000000000..dc2c1a148b
--- /dev/null
+++ b/layout/reftests/bugs/362594-2-quirks-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-2-standards-ref.html b/layout/reftests/bugs/362594-2-standards-ref.html
new file mode 100644
index 0000000000..4ef1e2ec65
--- /dev/null
+++ b/layout/reftests/bugs/362594-2-standards-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-2a.html b/layout/reftests/bugs/362594-2a.html
new file mode 100644
index 0000000000..8aa5370490
--- /dev/null
+++ b/layout/reftests/bugs/362594-2a.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-2b.html b/layout/reftests/bugs/362594-2b.html
new file mode 100644
index 0000000000..d369d75a85
--- /dev/null
+++ b/layout/reftests/bugs/362594-2b.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200" nowrap>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362594-2c.html b/layout/reftests/bugs/362594-2c.html
new file mode 100644
index 0000000000..97ebc029f1
--- /dev/null
+++ b/layout/reftests/bugs/362594-2c.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/362901-1-ref.html b/layout/reftests/bugs/362901-1-ref.html
new file mode 100644
index 0000000000..113a5e1758
--- /dev/null
+++ b/layout/reftests/bugs/362901-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ body { font-family: sans-serif; }
+ span { color: green }
+</style>
+</head>
+<body>
+<div><span>T</span>ext</div>
+<div style="overflow: auto"><span>T</span>ext</div>
+<fieldset><span>T</span>ext</fieldset>
+<table><tr><td><span>T</span>ext</td></tr></table>
+
+<div><span>T</span>ext</div>
+<div style="overflow: auto"><span>T</span>ext</div>
+<fieldset><span>T</span>ext</fieldset>
+<table><tr><td><span>T</span>ext</td></tr></table>
+
+<div><span>T</span>extMore Text</div>
+<div style="overflow: auto"><span>T</span>extMore Text</div>
+<fieldset><span>T</span>extMore Text</fieldset>
+<table><tr><td><span>T</span>extMore Text</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/362901-1.html b/layout/reftests/bugs/362901-1.html
new file mode 100644
index 0000000000..5d53ea656a
--- /dev/null
+++ b/layout/reftests/bugs/362901-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ body { font-family: sans-serif; }
+ .f::first-letter { color: green }
+</style>
+<script>
+ window.onload = function() {
+ var lst = document.getElementsByClassName("d");
+ for (var i = 0; i < lst.length; ++i) {
+ lst[i].insertBefore(document.createTextNode("Text"),
+ lst[i].firstChild);
+ }
+ }
+</script>
+</head>
+<body>
+<div class="f">Text</div>
+<div class="f" style="overflow: auto">Text</div>
+<fieldset class="f">Text</fieldset>
+<table><tr><td class="f">Text</td></tr></table>
+
+<div class="f d"></div>
+<div class="f d" style="overflow: auto"></div>
+<fieldset class="f d"></fieldset>
+<table><tr><td class="f d"></td></tr></table>
+
+<div class="f d">More Text</div>
+<div class="f d" style="overflow: auto">More Text</div>
+<fieldset class="f d">More Text</fieldset>
+<table><tr><td class="f d">More Text</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363247-1-ref.html b/layout/reftests/bugs/363247-1-ref.html
new file mode 100644
index 0000000000..3df7148149
--- /dev/null
+++ b/layout/reftests/bugs/363247-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <title>bug 363247</title>
+ <link rel="stylesheet" href="data:text/css,body {font-size: 20pt}" id="main-css">
+ </head>
+ <body>
+ <table id="table" style="position: absolute; font-size: inherit;">
+ <tbody>
+ <tr>
+ <td>foo</td><td>bar</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/363247-1.html b/layout/reftests/bugs/363247-1.html
new file mode 100644
index 0000000000..a017f8fa2c
--- /dev/null
+++ b/layout/reftests/bugs/363247-1.html
@@ -0,0 +1,20 @@
+<html>
+ <head>
+ <title>bug 363247</title>
+ <link rel="stylesheet" href="data:text/css,body {font-size: 10pt}" id="main-css">
+ </head>
+ <body>
+ <table id="table" style="position: absolute; font-size: inherit;">
+ <tbody>
+ <tr>
+ <td>foo</td><td>bar</td>
+ </tr>
+ </tbody>
+ </table>
+ <script>
+ document.body.offsetHeight;
+ var node = document.getElementById("main-css");
+ node.setAttribute("href", 'data:text/css,body {font-size: 20pt}');
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/363329-1-ref.html b/layout/reftests/bugs/363329-1-ref.html
new file mode 100644
index 0000000000..81339b059d
--- /dev/null
+++ b/layout/reftests/bugs/363329-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+ <title>Testcase for bug 363329</title>
+</head>
+<body>
+
+<table border="1">
+ <tr><td colspan="2">colspan 3</td></tr>
+ <tr><td>colspan 2</td><td>x</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363329-1.html b/layout/reftests/bugs/363329-1.html
new file mode 100644
index 0000000000..3ddb2e5f48
--- /dev/null
+++ b/layout/reftests/bugs/363329-1.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+ <title>Testcase for bug 363329</title>
+</head>
+<body>
+
+<table border="1">
+ <tr><td colspan="3">colspan 3</td></tr>
+ <tr><td colspan="2">colspan 2</td><td>x</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363329-2-ref.html b/layout/reftests/bugs/363329-2-ref.html
new file mode 100644
index 0000000000..9c34fb1735
--- /dev/null
+++ b/layout/reftests/bugs/363329-2-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+ <title>Testcase for bug 363329</title>
+</head>
+<body>
+
+<table cellpadding="0" cellspacing="0" border="0">
+ <tr><td width="250"></td><td>x</td></tr>
+ <tr><td width="250"></td><td>x</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363329-2.html b/layout/reftests/bugs/363329-2.html
new file mode 100644
index 0000000000..611b2d7c6c
--- /dev/null
+++ b/layout/reftests/bugs/363329-2.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+ <title>Testcase for bug 363329</title>
+</head>
+<body>
+
+<table cellpadding="0" cellspacing="0" border="0">
+ <tr><td colspan="2" width="200"></td><td></td><td>x</td></tr>
+ <tr><td colspan="3" width="250"></td><td>x</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363370-1-ref.html b/layout/reftests/bugs/363370-1-ref.html
new file mode 100644
index 0000000000..f1497a9200
--- /dev/null
+++ b/layout/reftests/bugs/363370-1-ref.html
@@ -0,0 +1,11 @@
+<html><head>
+<title>Testcase bug 363370 - [reflow branch] Crash [@ nsTArray_base::ShiftData] with testcase that appends table cells</title>
+</head>
+<body>
+
+<table border>
+<thead id="b"><tr><td rowspan="3">td</td></tr><tr><td>td</td></tr></thead>
+<tbody colspan="1" id="f"><tr></tr><tr><td>td</td></tr></tbody></table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/363370-1.html b/layout/reftests/bugs/363370-1.html
new file mode 100644
index 0000000000..3c984d3df2
--- /dev/null
+++ b/layout/reftests/bugs/363370-1.html
@@ -0,0 +1,32 @@
+<html class="reftest-wait"><head>
+<title>Testcase bug 363370 - [reflow branch] Crash [@ nsTArray_base::ShiftData] with testcase that appends table cells</title>
+</head>
+<body>
+
+<table border>
+<thead id="b"><tr><td rowspan="3">td</td></tr></thead>
+<tbody colspan="1" id="f"><tr></tr></tbody></table>
+
+<script>
+function doe() {
+
+
+var x=document.createElement('td');
+var text = document.createTextNode("td");
+x.appendChild(text);
+
+document.getElementById('b').appendChild(x);
+
+
+var y=document.createElement('td');
+var t2 = document.createTextNode("td");
+ y.appendChild(t2);
+
+
+document.getElementById('f').appendChild(y);
+document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", doe);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363402-1-ref.html b/layout/reftests/bugs/363402-1-ref.html
new file mode 100644
index 0000000000..a2662f8dca
--- /dev/null
+++ b/layout/reftests/bugs/363402-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 363402</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<table border align="left">
+ <tr><td>table</td></tr>
+ <tr><td>table</td></tr>
+ <tr><td>table</td></tr>
+</table>
+
+<p>This is text that should flow around the table.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363402-1.html b/layout/reftests/bugs/363402-1.html
new file mode 100644
index 0000000000..6496c1e324
--- /dev/null
+++ b/layout/reftests/bugs/363402-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 363402</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+
+ caption span { visibility: hidden; }
+
+ </style>
+</head>
+<body>
+
+<table border align="left">
+ <caption align="bottom"><span>x x x x x x x x x x x x x x x x x x x x x</span></caption>
+ <tr><td>table</td></tr>
+ <tr><td>table</td></tr>
+ <tr><td>table</td></tr>
+</table>
+
+<p>This is text that should flow around the table.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363637-1-ref.html b/layout/reftests/bugs/363637-1-ref.html
new file mode 100644
index 0000000000..a503f0fa32
--- /dev/null
+++ b/layout/reftests/bugs/363637-1-ref.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<style>
+ body { background: white; }
+ .rel, body { position: relative; }
+ div > div { direction: ltr; height: 10px; }
+ div > div > div { width: 100px; background: lime; }
+ .rtl { direction: rtl; }
+ #testpercentmargin > div > div { margin: 0 4%; }
+ #testabsolutemargin > div > div { margin: 0 20px; }
+ #testpercentpadding > div { padding: 0 4%; }
+ #testabsolutepadding > div { padding: 0 20px; }
+ #testborderparent > div { border-width: 0 20px; border-color: white; border-style: solid; }
+ #testborderkid > div > div { border-width: 0 20px; border-color: white; border-style: solid; }
+</style>
+<body style="width: 500px; margin-left: 100px;">
+<div id="testplain">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testpercentmargin">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testabsolutemargin">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testpercentpadding">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testabsolutepadding">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testborderparent">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testborderkid">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363637-1.html b/layout/reftests/bugs/363637-1.html
new file mode 100644
index 0000000000..c566868268
--- /dev/null
+++ b/layout/reftests/bugs/363637-1.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<style>
+ body { background: white; }
+ .rel, body { position: relative; }
+ div > div { direction: ltr; height: 10px; }
+ div > div > div { width: 100px; background: lime; position: absolute }
+ .rtl { direction: rtl; }
+ #testpercentmargin > div > div { margin: 0 4%; }
+ #testabsolutemargin > div > div { margin: 0 20px; }
+ #testpercentpadding > div { padding: 0 4%; }
+ #testabsolutepadding > div { padding: 0 20px; }
+ #testborderparent > div { border-width: 0 20px; border-color: white; border-style: solid; }
+ #testborderkid > div > div { border-width: 0 20px; border-color: white; border-style: solid; }
+</style>
+<body style="width: 500px; margin-left: 100px;">
+<div id="testplain">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testpercentmargin">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testabsolutemargin">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testpercentpadding">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testabsolutepadding">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testborderparent">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+<div id="testborderkid">
+ <div><div></div></div>
+ <div class="rel"><div></div></div>
+ <div class="rtl"><div></div></div>
+ <div class="rel rtl"><div></div></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363706-1-ref.html b/layout/reftests/bugs/363706-1-ref.html
new file mode 100644
index 0000000000..5cd2d76aa7
--- /dev/null
+++ b/layout/reftests/bugs/363706-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test for bug 363706</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ div { width: 5ch; height: 100px; background: currentColor; }
+
+ </style>
+</head>
+<body>
+
+<div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363706-1.html b/layout/reftests/bugs/363706-1.html
new file mode 100644
index 0000000000..c831fda47e
--- /dev/null
+++ b/layout/reftests/bugs/363706-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test for bug 363706</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ div { border-left: 5ch solid; height: 100px; }
+
+ </style>
+</head>
+<body>
+
+<div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363728-1-ref.html b/layout/reftests/bugs/363728-1-ref.html
new file mode 100644
index 0000000000..95cc598711
--- /dev/null
+++ b/layout/reftests/bugs/363728-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#a {
+ height: 4em;
+ background-color: green;
+ overflow: hidden;
+}
+#a div{
+ position: absolute;
+ top: 1em; left: 1em;
+ background-color: lime;
+ height: 7em; width: 7em;
+}
+</style>
+</head>
+<body>
+<div id="a">
+ <div></div>
+</div>
+<textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363728-1.html b/layout/reftests/bugs/363728-1.html
new file mode 100644
index 0000000000..5ead99a657
--- /dev/null
+++ b/layout/reftests/bugs/363728-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#a {
+ height: 4em;
+ background-color: green;
+ overflow: hidden;
+}
+#a div{
+ position: absolute;
+ top: 1em; left: 1em;
+ background-color: lime;
+ height: 7em; width: 7em;
+}
+</style>
+</head>
+<body>
+<div id="a">
+ <div></div>
+</div>
+<textarea> FAIL</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363728-2-ref.html b/layout/reftests/bugs/363728-2-ref.html
new file mode 100644
index 0000000000..b737a3deb7
--- /dev/null
+++ b/layout/reftests/bugs/363728-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#a {
+ height: 4em;
+ background-color: green;
+ overflow: hidden;
+}
+#a div{
+ position: absolute;
+ top: 1em; left: 1em;
+ background-color: lime;
+ height: 7em; width: 7em;
+}
+#b {
+ height: 4em;
+ background-color: blue;
+}
+</style>
+</head>
+<body>
+<div id="a">
+ <div></div>
+</div>
+<div id="b"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363728-2.html b/layout/reftests/bugs/363728-2.html
new file mode 100644
index 0000000000..292a785118
--- /dev/null
+++ b/layout/reftests/bugs/363728-2.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#a {
+ height: 4em;
+ background-color: green;
+ overflow: hidden;
+}
+#a div{
+ position: absolute;
+ top: 1em; left: 1em;
+ background-color: lime;
+ height: 7em; width: 7em;
+}
+#b {
+ height: 4em;
+ background-color: blue;
+ overflow: hidden;
+}
+</style>
+</head>
+<body>
+<div id="a">
+ <div></div>
+</div>
+<div id="b"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/363858-1-ref.html b/layout/reftests/bugs/363858-1-ref.html
new file mode 100644
index 0000000000..a3dd401e0f
--- /dev/null
+++ b/layout/reftests/bugs/363858-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-1.html b/layout/reftests/bugs/363858-1.html
new file mode 100644
index 0000000000..e55cbbf4d1
--- /dev/null
+++ b/layout/reftests/bugs/363858-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div { width: 0 }
+option { white-space: normal }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-2-ref.html b/layout/reftests/bugs/363858-2-ref.html
new file mode 100644
index 0000000000..4642dc7de9
--- /dev/null
+++ b/layout/reftests/bugs/363858-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+* { -moz-appearance: none }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-2.html b/layout/reftests/bugs/363858-2.html
new file mode 100644
index 0000000000..4c6300c42d
--- /dev/null
+++ b/layout/reftests/bugs/363858-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div { width: 0 }
+option { white-space: normal }
+* { -moz-appearance: none }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-3-ref.html b/layout/reftests/bugs/363858-3-ref.html
new file mode 100644
index 0000000000..4e8c96af4d
--- /dev/null
+++ b/layout/reftests/bugs/363858-3-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+</head>
+<body>
+<div>
+<select>
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+</div>
+<div>
+<select size="3">
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-3.html b/layout/reftests/bugs/363858-3.html
new file mode 100644
index 0000000000..7622e3db03
--- /dev/null
+++ b/layout/reftests/bugs/363858-3.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div { width: 0 }
+option { white-space: normal }
+optgroup { white-space: normal }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+</div>
+<div>
+<select size="3">
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-4-ref.html b/layout/reftests/bugs/363858-4-ref.html
new file mode 100644
index 0000000000..6e7a904aef
--- /dev/null
+++ b/layout/reftests/bugs/363858-4-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+* { -moz-appearance: none }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+</div>
+<div>
+<select size="3">
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-4.html b/layout/reftests/bugs/363858-4.html
new file mode 100644
index 0000000000..6a7bef2dd0
--- /dev/null
+++ b/layout/reftests/bugs/363858-4.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div { width: 0 }
+option { white-space: normal }
+optgroup { white-space: normal }
+* { -moz-appearance: none }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+</div>
+<div>
+<select size="3">
+ <optgroup>
+ <option>This is option one</option>
+ <option>This is option two</option>
+ <option>This is option three which is long</option>
+ <option>This is option four</option>
+ </optgroup>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-5-ref.html b/layout/reftests/bugs/363858-5-ref.html
new file mode 100644
index 0000000000..67f215f109
--- /dev/null
+++ b/layout/reftests/bugs/363858-5-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+select { width: 100%; box-sizing: border-box }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option style="visibility: hidden">This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-5a.html b/layout/reftests/bugs/363858-5a.html
new file mode 100644
index 0000000000..78922540b7
--- /dev/null
+++ b/layout/reftests/bugs/363858-5a.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+option { padding-left: 100%; }
+</style>
+</head>
+<body>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-5b.html b/layout/reftests/bugs/363858-5b.html
new file mode 100644
index 0000000000..0728c529e3
--- /dev/null
+++ b/layout/reftests/bugs/363858-5b.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+select { width: -moz-available; }
+</style>
+</head>
+<body>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option style="visibility: hidden">This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-6-ref.html b/layout/reftests/bugs/363858-6-ref.html
new file mode 100644
index 0000000000..7a583c79e1
--- /dev/null
+++ b/layout/reftests/bugs/363858-6-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+select { width: 100%; box-sizing: border-box }
+* { -moz-appearance: none; }
+</style>
+</head>
+<body>
+<div>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option style="visibility: hidden">This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-6a.html b/layout/reftests/bugs/363858-6a.html
new file mode 100644
index 0000000000..f2cb14a999
--- /dev/null
+++ b/layout/reftests/bugs/363858-6a.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+option { padding-left: 100%; }
+* { -moz-appearance: none; }
+</style>
+</head>
+<body>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option>This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363858-6b.html b/layout/reftests/bugs/363858-6b.html
new file mode 100644
index 0000000000..661a4c3e60
--- /dev/null
+++ b/layout/reftests/bugs/363858-6b.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+select { width: -moz-available; }
+* { -moz-appearance: none; }
+</style>
+</head>
+<body>
+<select>
+ <option>This is option one</option>
+</select>
+</div>
+<div>
+<select size="3">
+ <option style="visibility: hidden">This is option one</option>
+</select>
+<div>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/363874-max-width-ref.html b/layout/reftests/bugs/363874-max-width-ref.html
new file mode 100644
index 0000000000..7e31a7097e
--- /dev/null
+++ b/layout/reftests/bugs/363874-max-width-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 363874</title>
+</head>
+<body>
+
+<table border width="100%">
+ <tr><td>100</td><td width="50">50</td></tr>
+</table>
+
+<table border>
+ <tr><td>aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui</td></tr>
+ <tr><td width="100">100</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363874-max-width.html b/layout/reftests/bugs/363874-max-width.html
new file mode 100644
index 0000000000..026d8724f4
--- /dev/null
+++ b/layout/reftests/bugs/363874-max-width.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 363874</title>
+</head>
+<body>
+
+<table border width="100%">
+ <tr><td style="max-width: 100em">100</td><td width="50">50</td></tr>
+</table>
+
+<table border>
+ <tr><td style="max-width: 100em">aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui</td></tr>
+ <tr><td width="100">100</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363874-ref.html b/layout/reftests/bugs/363874-ref.html
new file mode 100644
index 0000000000..d235043161
--- /dev/null
+++ b/layout/reftests/bugs/363874-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 363874</title>
+</head>
+<body>
+
+<table border="0" cellpadding="0" cellspacing="0">
+ <tr><td width="100">100</td><td width="50">50</td></tr>
+ <tr><td colspan="2" width="150">aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/363874.html b/layout/reftests/bugs/363874.html
new file mode 100644
index 0000000000..4d6e3b57c4
--- /dev/null
+++ b/layout/reftests/bugs/363874.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase, bug 363874</title>
+</head>
+<body>
+
+<table border="0" cellpadding="0" cellspacing="0">
+ <tr><td width="100">100</td><td width="50">50</td></tr>
+ <tr><td colspan="2">aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui aoeui</td></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/364066-1-ref.html b/layout/reftests/bugs/364066-1-ref.html
new file mode 100644
index 0000000000..c18b33f616
--- /dev/null
+++ b/layout/reftests/bugs/364066-1-ref.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 364066</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { margin: 1px 0; border-spacing: 0; }
+td { padding: 0; border: 1px solid; }
+
+</style>
+</head>
+<body>
+
+<!-- solidblue.png is a 16x16 image -->
+
+<table border><tr>
+
+<td width="200">
+
+<table><tr><td>
+ <div style="height: 16px; width: 16px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 32px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 32px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 8px; width: 8px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 8px; width: 8px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 8px; width: 8px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 8px; width: 8px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+
+</td><td width="200">
+
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+<table><tr><td>
+ <div style="height: 40px; width: 32px"></div>
+</td></tr></table>
+
+</td>
+
+</tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/364066-1.html b/layout/reftests/bugs/364066-1.html
new file mode 100644
index 0000000000..6f8ce53d4a
--- /dev/null
+++ b/layout/reftests/bugs/364066-1.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 364066</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { margin: 1px 0; border-spacing: 0; }
+td { padding: 0; border: 1px solid; line-height: 1px; }
+img { visibility: hidden; vertical-align: bottom; }
+
+</style>
+</head>
+<body>
+
+<!-- solidblue.png is a 16x16 image -->
+
+<table border><tr>
+
+<td width="200">
+
+<table><tr><td><img src="solidblue.png"></td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="height: 32px">
+</td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="min-height: 32px">
+</td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="max-height: 8px">
+</td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="height: 4px;min-height:8px">
+</td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="max-height: 4px;min-height:8px">
+</td></tr></table>
+<table><tr><td>
+ <img src="solidblue.png" style="height: 12px;max-height:8px">
+</td></tr></table>
+<table><tr><td><div style="height: 40px">
+ <img src="solidblue.png" style="height: 80%">
+</div></td></tr></table>
+<table><tr><td><div style="height: 40px">
+ <img src="solidblue.png" style="min-height: 80%">
+</div></td></tr></table>
+<table><tr><td><div style="height: 40px">
+ <img src="solidblue.png" style="height: 60px; max-height: 80%">
+</div></td></tr></table>
+
+</td><td width="200">
+
+<table><tr><td><div style="height: 40px"><div style="height:100%"><div style="height:100%">
+ <img src="solidblue.png" style="height: 80%">
+</div></div></div></td></tr></table>
+<table><tr><td><div style="height: 64px; max-height: 40px">
+ <img src="solidblue.png" style="height: 80%">
+</div></td></tr></table>
+<table><tr><td><div style="height: 20px;min-height: 40px">
+ <img src="solidblue.png" style="height: 80%">
+</div></td></tr></table>
+<table><tr><td><div style="height: 40px"><div style="height:20px; min-height:100%"><div style="height:100px;max-height:100%">
+ <img src="solidblue.png" style="height: 80%">
+</div></div></div></td></tr></table>
+
+</td>
+
+</tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/364079-1-ref.html b/layout/reftests/bugs/364079-1-ref.html
new file mode 100644
index 0000000000..66eac80f74
--- /dev/null
+++ b/layout/reftests/bugs/364079-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ div { height: 20px; }
+ div > div { width: 100px; background: green; }
+ body > div { direction: ltr }
+ </style>
+ <body style="width: 400px">
+ <div><div style="margin-left: 100px; margin-right: auto"></div></div>
+ <div><div style="margin-left: auto; margin-right: 100px"></div></div>
+ <div><div style="margin-left: auto; margin-right: auto"></div></div>
+ <div><div style="margin-left: 200px; margin-right: auto"></div></div>
+ <div><div style="margin-left: 100px; margin-right: 100px"></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364079-1.html b/layout/reftests/bugs/364079-1.html
new file mode 100644
index 0000000000..f123d6f539
--- /dev/null
+++ b/layout/reftests/bugs/364079-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ div { height: 20px; }
+ div > div { width: 100px; background: green; }
+ body > div { direction: rtl }
+ </style>
+ <body style="width: 400px">
+ <div><div style="margin-left: 100px; margin-right: auto"></div></div>
+ <div><div style="margin-left: auto; margin-right: 100px"></div></div>
+ <div><div style="margin-left: auto; margin-right: auto"></div></div>
+ <div><div style="margin-left: 100px; margin-right: 100px"></div></div>
+ <div><div style="margin-left: 100px; margin-right: auto"></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364318-1-ref.xhtml b/layout/reftests/bugs/364318-1-ref.xhtml
new file mode 100644
index 0000000000..03fe53c0f1
--- /dev/null
+++ b/layout/reftests/bugs/364318-1-ref.xhtml
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>rowspan transition</title>
+</head>
+<body>
+<table><thead ><tr><td>td</td><td id="target" rowspan="2">x</td></tr><tr ><td rowspan="2">x</td></tr></thead></table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/364318-1.xhtml b/layout/reftests/bugs/364318-1.xhtml
new file mode 100644
index 0000000000..1bd8293a0c
--- /dev/null
+++ b/layout/reftests/bugs/364318-1.xhtml
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>rowspan transition</title>
+</head>
+<body onload="document.getElementById('target').setAttribute('rowspan',2);">
+<table><thead ><tr><td>td</td><td id="target" rowspan="0">x</td></tr><tr ><td rowspan="2">x</td></tr></thead></table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/364861-1-ref.html b/layout/reftests/bugs/364861-1-ref.html
new file mode 100644
index 0000000000..ab503e0352
--- /dev/null
+++ b/layout/reftests/bugs/364861-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="background: black;
+ background-clip: padding-box;
+ width: 400px;
+ padding: 0;
+ height: 300px;
+ border: 100px solid rgba(255, 255, 0, 0.5);
+ border-radius: 240px / 200px">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364861-1.html b/layout/reftests/bugs/364861-1.html
new file mode 100644
index 0000000000..566fb323ed
--- /dev/null
+++ b/layout/reftests/bugs/364861-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="background: black;
+ background-clip: padding-box;
+ width: 400px;
+ padding: 0;
+ height: 300px;
+ border: 100px solid rgba(255, 255, 0, 0.5);
+ border-radius: 40.0%">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364862-1-ref.html b/layout/reftests/bugs/364862-1-ref.html
new file mode 100644
index 0000000000..cc0ff22e66
--- /dev/null
+++ b/layout/reftests/bugs/364862-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body style="width: 400px; padding: 0 200px">
+ <div style="text-decoration: underline;
+ text-indent: 100px;">
+ This text should be entirely underlined, without the underline sticking out.
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364862-1.html b/layout/reftests/bugs/364862-1.html
new file mode 100644
index 0000000000..25b77754a4
--- /dev/null
+++ b/layout/reftests/bugs/364862-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body style="width: 400px; padding: 0 200px">
+ <div style="text-decoration: underline;
+ text-indent: 25%;">
+ This text should be entirely underlined, without the underline sticking out.
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/364968-1-ref.html b/layout/reftests/bugs/364968-1-ref.html
new file mode 100644
index 0000000000..6b7f3f9d42
--- /dev/null
+++ b/layout/reftests/bugs/364968-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div { position:absolute; width:7px; height:7px; }
+.r { top:0; left:0; background:red; }
+.g { top:0; left:9px; background:lime; }
+.b { top:9px; left:0; background:blue; }
+.y { top:9px; left:9px; background:yellow; }
+</style>
+</head>
+<body>
+<div style="left:256px; top:0;">
+ <div class="r"></div>
+ <div class="g"></div>
+ <div class="b"></div>
+ <div class="y"></div>
+</div>
+<div style="left:272px; top:0;">
+ <div class="r"></div>
+ <div class="g"></div>
+ <div class="b"></div>
+ <div class="y"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/364968-1.xhtml b/layout/reftests/bugs/364968-1.xhtml
new file mode 100644
index 0000000000..f942d1c54d
--- /dev/null
+++ b/layout/reftests/bugs/364968-1.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<stack>
+ <hbox flex="1">
+ <spacer style="width: 256px"/>
+ <image style="width: 16px; height: 16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
+ <image style="width: 16px; height: 16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
+ <hbox flex="1"/>
+ </hbox>
+ <!-- overdraw the troublesome junctions between colored boxes -->
+ <spacer style="margin-left: 263px; margin-top: 0; height: 16px; width: 2px; background: white;"/>
+ <spacer style="margin-left: 279px; margin-top: 0; height: 16px; width: 2px; background: white;"/>
+ <spacer style="margin-left: 256px; margin-top: 7px; height: 2px; width: 32px; background: white;"/>
+</stack>
+</window>
diff --git a/layout/reftests/bugs/364989-1-ref.html b/layout/reftests/bugs/364989-1-ref.html
new file mode 100644
index 0000000000..eb127311fa
--- /dev/null
+++ b/layout/reftests/bugs/364989-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="background: lightgreen;">a</td>
+ <td style="background: lightblue;">b</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/364989-1.html b/layout/reftests/bugs/364989-1.html
new file mode 100644
index 0000000000..aff5666bee
--- /dev/null
+++ b/layout/reftests/bugs/364989-1.html
@@ -0,0 +1,22 @@
+<html>
+<body>
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <table style="table-layout: fixed;" cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="background: lightgreen;">a</td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table style="table-layout: fixed;" cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="background: lightblue;">b</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/365173-1-ref.html b/layout/reftests/bugs/365173-1-ref.html
new file mode 100644
index 0000000000..ac8a56190e
--- /dev/null
+++ b/layout/reftests/bugs/365173-1-ref.html
@@ -0,0 +1,7 @@
+<title>Testcase, bug 365173</title>
+
+<table border="0" cellpadding="0" cellspacing="0">
+ <tr><td width="300" bgcolor="lime">300 (2)</td></tr>
+ <tr><td width="300" bgcolor="yellow">x</td></tr>
+</table>
+
diff --git a/layout/reftests/bugs/365173-1.html b/layout/reftests/bugs/365173-1.html
new file mode 100644
index 0000000000..f79f27f14f
--- /dev/null
+++ b/layout/reftests/bugs/365173-1.html
@@ -0,0 +1,7 @@
+<title>Testcase, bug 365173</title>
+
+<table border="0" cellpadding="0" cellspacing="0">
+ <tr><td colspan="2" width="300" bgcolor="lime">300 (2)</td></tr>
+ <tr><td width="295" bgcolor="yellow">x</td><td width="5" bgcolor="yellow"></td></tr>
+</table>
+
diff --git a/layout/reftests/bugs/366616-1-ref.xhtml b/layout/reftests/bugs/366616-1-ref.xhtml
new file mode 100644
index 0000000000..1dbdde1bc0
--- /dev/null
+++ b/layout/reftests/bugs/366616-1-ref.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window id="test-canvas" title="Canvas in XUL test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <box style="width: 100px; height: 100px; max-width: 100px; max-height: 100px; background: red"/>
+</window>
diff --git a/layout/reftests/bugs/366616-1.xhtml b/layout/reftests/bugs/366616-1.xhtml
new file mode 100644
index 0000000000..bf6575759d
--- /dev/null
+++ b/layout/reftests/bugs/366616-1.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window id="test-canvas" title="Canvas in XUL test"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml" onload="workWithCanvas();">
+ <script type="text/javascript">
+ function workWithCanvas()
+ {
+ var c = document.getElementById("canvas");
+ var ctx = c.getContext("2d");
+ ctx.fillStyle = "#ff0000";
+ ctx.fillRect(0, 0, 100, 100);
+ }
+ </script>
+ <html:canvas id="canvas" width="100" height="100"
+ style="width: 100px; height: 100px; max-height: 100px; max-width: 100px;"/>
+</window>
diff --git a/layout/reftests/bugs/367220-1-ref.html b/layout/reftests/bugs/367220-1-ref.html
new file mode 100644
index 0000000000..d4a7944f58
--- /dev/null
+++ b/layout/reftests/bugs/367220-1-ref.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<style id="s">
+ ol {
+ counter-reset: section;
+ list-style-type: none;
+ }
+ li:before {
+ counter-increment: section;
+ content: counters(section, ".") " ";
+ }
+</style>
+
+</head>
+<body>
+<ol>
+ <li>item</li> <!-- 1 -->
+ <li>item <!-- 2 -->
+ <ol>
+ <li>item</li> <!-- 2.1 -->
+ <li>item</li> <!-- 2.2 -->
+ <li>item <!-- 2.3 -->
+ <ol>
+ <li>item</li> <!-- 2.3.1 -->
+ <li>item</li> <!-- 2.3.2 -->
+ </ol>
+ <ol>
+ <li>item</li> <!-- 2.3.1 -->
+ <li>item</li> <!-- 2.3.2 -->
+ <li>item</li> <!-- 2.3.3 -->
+ </ol>
+ </li>
+ <li>item</li> <!-- 2.4 -->
+ </ol>
+ </li>
+ <li>item</li> <!-- 3 -->
+ <li>item</li> <!-- 4 -->
+</ol>
+<ol>
+ <li>item</li> <!-- 1 -->
+ <li>item</li> <!-- 2 -->
+</ol>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367220-1.html b/layout/reftests/bugs/367220-1.html
new file mode 100644
index 0000000000..69a8097d92
--- /dev/null
+++ b/layout/reftests/bugs/367220-1.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<style id="s">
+ ol {
+ counter-reset: section;
+ list-style-type: none;
+ }
+ li:before {
+ counter-increment: section;
+ content: counters(section, ".") " ";
+ }
+</style>
+
+</head>
+<body>
+<ol>
+ <li>item</li> <!-- 1 -->
+ <li>item <!-- 2 -->
+ <ol>
+ <li>item</li> <!-- 2.1 -->
+ <li>item</li> <!-- 2.2 -->
+ <li>item <!-- 2.3 -->
+ <ol>
+ <li>item</li> <!-- 2.3.1 -->
+ <li>item</li> <!-- 2.3.2 -->
+ </ol>
+ <ol>
+ <li>item</li> <!-- 2.3.1 -->
+ <li>item</li> <!-- 2.3.2 -->
+ <li>item</li> <!-- 2.3.3 -->
+ </ol>
+ </li>
+ <li>item</li> <!-- 2.4 -->
+ </ol>
+ </li>
+ <li>item</li> <!-- 3 -->
+ <li>item</li> <!-- 4 -->
+</ol>
+<ol>
+ <li>item</li> <!-- 1 -->
+ <li>item</li> <!-- 2 -->
+</ol>
+
+<script>
+s = document.getElementById("s");
+t = s.textContent;
+
+function foo()
+{
+ document.body.offsetHeight;
+ s.textContent = "ol { color: #ddd}";
+ document.body.offsetHeight;
+ s.textContent = t;
+}
+foo();
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-l-auto.html b/layout/reftests/bugs/367247-l-auto.html
new file mode 100644
index 0000000000..7b05c0c126
--- /dev/null
+++ b/layout/reftests/bugs/367247-l-auto.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: auto;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 150px;
+ height: 150px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-l-hidden.html b/layout/reftests/bugs/367247-l-hidden.html
new file mode 100644
index 0000000000..1d7a1b60b1
--- /dev/null
+++ b/layout/reftests/bugs/367247-l-hidden.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: hidden;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 150px;
+ height: 150px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-l-scroll.html b/layout/reftests/bugs/367247-l-scroll.html
new file mode 100644
index 0000000000..20a7c61edd
--- /dev/null
+++ b/layout/reftests/bugs/367247-l-scroll.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: scroll;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 150px;
+ height: 150px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-l-visible.html b/layout/reftests/bugs/367247-l-visible.html
new file mode 100644
index 0000000000..f971525e1b
--- /dev/null
+++ b/layout/reftests/bugs/367247-l-visible.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: visible;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 150px;
+ height: 150px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-s-auto.html b/layout/reftests/bugs/367247-s-auto.html
new file mode 100644
index 0000000000..8dfcf8fdc0
--- /dev/null
+++ b/layout/reftests/bugs/367247-s-auto.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: auto;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-s-hidden.html b/layout/reftests/bugs/367247-s-hidden.html
new file mode 100644
index 0000000000..8d320c5942
--- /dev/null
+++ b/layout/reftests/bugs/367247-s-hidden.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: hidden;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-s-scroll.html b/layout/reftests/bugs/367247-s-scroll.html
new file mode 100644
index 0000000000..22dc0d0652
--- /dev/null
+++ b/layout/reftests/bugs/367247-s-scroll.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: scroll;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367247-s-visible.html b/layout/reftests/bugs/367247-s-visible.html
new file mode 100644
index 0000000000..ccb7612c0b
--- /dev/null
+++ b/layout/reftests/bugs/367247-s-visible.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, 'overflow' on elements with 'display:inline-block'</title>
+<style type="text/css">
+
+body > span {
+ display: inline-block;
+ vertical-align: text-bottom;
+ overflow: visible;
+ width: 100px;
+ height: 100px;
+ border: thin solid;
+}
+
+body > span > span {
+ display: block;
+ background: blue;
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+<span><span></span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1-ref.html b/layout/reftests/bugs/367332-1-ref.html
new file mode 100644
index 0000000000..4dcf2089d1
--- /dev/null
+++ b/layout/reftests/bugs/367332-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells (reference)</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+
+td { padding-top: 0; }
+td div { padding-top: 40px; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td><div>data</div></td>
+ <td><div>data</div></td>
+ <td><div>data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1a.html b/layout/reftests/bugs/367332-1a.html
new file mode 100644
index 0000000000..de74333470
--- /dev/null
+++ b/layout/reftests/bugs/367332-1a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 40px"><div>data</div></td>
+ <td style="padding-top: 20px"><div>data</div></td>
+ <td style="padding-top: 0"><div>data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1b.html b/layout/reftests/bugs/367332-1b.html
new file mode 100644
index 0000000000..5352119cb7
--- /dev/null
+++ b/layout/reftests/bugs/367332-1b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; padding-top: 0; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td><div style="padding-top: 40px">data</div></td>
+ <td><div style="padding-top: 20px">data</div></td>
+ <td><div style="padding-top: 0">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1c.html b/layout/reftests/bugs/367332-1c.html
new file mode 100644
index 0000000000..0ae97188be
--- /dev/null
+++ b/layout/reftests/bugs/367332-1c.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 0"><div style="padding-top: 40px">data</div></td>
+ <td style="padding-top: 12px"><div style="padding-top: 3px">data</div></td>
+ <td style="padding-top: 40px"><div style="padding-top: 0">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1d.html b/layout/reftests/bugs/367332-1d.html
new file mode 100644
index 0000000000..f47ea6d606
--- /dev/null
+++ b/layout/reftests/bugs/367332-1d.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 12px"><div style="padding-top: 3px">data</div></td>
+ <td style="padding-top: 40px"><div style="padding-top: 0">data</div></td>
+ <td style="padding-top: 0"><div style="padding-top: 40px">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1e.html b/layout/reftests/bugs/367332-1e.html
new file mode 100644
index 0000000000..abcbe8ce0f
--- /dev/null
+++ b/layout/reftests/bugs/367332-1e.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 0; height: 80px;"><div style="padding-top: 40px">data</div></td>
+ <td style="padding-top: 12px; height: 120px;"><div style="padding-top: 3px">data</div></td>
+ <td style="padding-top: 40px; height: 160px;"><div style="padding-top: 0">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1f.html b/layout/reftests/bugs/367332-1f.html
new file mode 100644
index 0000000000..2d49213fb9
--- /dev/null
+++ b/layout/reftests/bugs/367332-1f.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 0;"><div style="padding-top: 40px; height: 80px;">data</div></td>
+ <td style="padding-top: 12px;"><div style="padding-top: 3px; height: 120px;">data</div></td>
+ <td style="padding-top: 40px;"><div style="padding-top: 0; height: 160px;">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367332-1g.html b/layout/reftests/bugs/367332-1g.html
new file mode 100644
index 0000000000..491874541c
--- /dev/null
+++ b/layout/reftests/bugs/367332-1g.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for baseline alignment of table cells</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" />
+<meta name="flags" content="" />
+<style type="text/css">
+
+td { vertical-align: baseline; }
+
+</style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="padding-top: 0;"><div style="padding-top: 40px; height: 80px;">data</div></td>
+ <td style="padding-top: 12px; height: 160px;"><div style="padding-top: 3px;">data</div></td>
+ <td style="padding-top: 40px;"><div style="padding-top: 0;">data</div></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367375-1-ref.html b/layout/reftests/bugs/367375-1-ref.html
new file mode 100644
index 0000000000..710a2f1fce
--- /dev/null
+++ b/layout/reftests/bugs/367375-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body>
+
+<table border="1" id="table" width="100%" style="table-layout: fixed;">
+<tr>
+<td>X</td>
+<td>XXX</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367375-1.html b/layout/reftests/bugs/367375-1.html
new file mode 100644
index 0000000000..faf1e9ea5c
--- /dev/null
+++ b/layout/reftests/bugs/367375-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body onload="document.getElementById('table').style.tableLayout = 'fixed';">
+
+<table border="1" id="table" width="100%">
+<tr>
+<td>X</td>
+<td>XXX</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367375-2-ref.html b/layout/reftests/bugs/367375-2-ref.html
new file mode 100644
index 0000000000..06275e6d88
--- /dev/null
+++ b/layout/reftests/bugs/367375-2-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body>
+
+<table border="1" id="table" width="100%">
+<tr>
+<td>X</td>
+<td>XXX</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367375-2.html b/layout/reftests/bugs/367375-2.html
new file mode 100644
index 0000000000..7ce8ebe2de
--- /dev/null
+++ b/layout/reftests/bugs/367375-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body onload="document.getElementById('table').style.tableLayout = '';">
+
+<table border="1" id="table" width="100%" style="table-layout: fixed;">
+<tr>
+<td>X</td>
+<td>XXX</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367489-1-ref.html b/layout/reftests/bugs/367489-1-ref.html
new file mode 100644
index 0000000000..7945721206
--- /dev/null
+++ b/layout/reftests/bugs/367489-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+
+<script>
+function boom()
+{
+ document.getElementById("s").style.overflow = "auto";
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<div id="fl">
+ <b><span id="s">Foo</a></b>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367489-1.html b/layout/reftests/bugs/367489-1.html
new file mode 100644
index 0000000000..53a0311a29
--- /dev/null
+++ b/layout/reftests/bugs/367489-1.html
@@ -0,0 +1,23 @@
+<html>
+<head>
+
+<style>
+#fl:first-line { }
+</style>
+
+<script>
+function boom()
+{
+ document.getElementById("s").style.overflow = "auto";
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<div id="fl">
+ <b><span id="s">Foo</a></b>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/367504-float-1-ref.html b/layout/reftests/bugs/367504-float-1-ref.html
new file mode 100644
index 0000000000..25c702cd5c
--- /dev/null
+++ b/layout/reftests/bugs/367504-float-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 367504 -- inline block as margin root</title>
+<style type="text/css">
+
+span#ib { display: inline-block; vertical-align: text-bottom; }
+
+span#ib span { display:block }
+
+</style>
+</head>
+<body>
+<table border><tr><td>
+
+<p>x<span id="ib"><span>test</span></span>x</p>
+
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367504-float-1.html b/layout/reftests/bugs/367504-float-1.html
new file mode 100644
index 0000000000..0cc8a84034
--- /dev/null
+++ b/layout/reftests/bugs/367504-float-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 367504 -- inline block as margin root</title>
+<style type="text/css">
+
+span#ib { display: inline-block; vertical-align: text-bottom; }
+
+span#ib span { float:left }
+
+</style>
+</head>
+<body>
+<table border><tr><td>
+
+<p>x<span id="ib"><span>test</span></span>x</p>
+
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367504-margin-1-ref.html b/layout/reftests/bugs/367504-margin-1-ref.html
new file mode 100644
index 0000000000..06e592b8a0
--- /dev/null
+++ b/layout/reftests/bugs/367504-margin-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 367504 -- inline block as margin root</title>
+<style type="text/css">
+
+span#ib { display: inline-block; vertical-align: text-bottom; }
+
+span#ib span { display: block; padding: 7px; }
+
+</style>
+</head>
+<body>
+<table border><tr><td>
+
+<p>x<span id="ib"><span>test</span></span>x</p>
+
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367504-margin-1.html b/layout/reftests/bugs/367504-margin-1.html
new file mode 100644
index 0000000000..4f45a6fdcb
--- /dev/null
+++ b/layout/reftests/bugs/367504-margin-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, bug 367504 -- inline block as margin root</title>
+<style type="text/css">
+
+span#ib { display: inline-block; vertical-align: text-bottom; margin: 4px; }
+
+span#ib span { display: block; margin: 3px; }
+
+</style>
+</head>
+<body>
+<table border><tr><td>
+
+<p>x<span id="ib"><span>test</span></span>x</p>
+
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/367612-1-ref.html b/layout/reftests/bugs/367612-1-ref.html
new file mode 100644
index 0000000000..63f4e431da
--- /dev/null
+++ b/layout/reftests/bugs/367612-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t">* { color: green }</style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1a.html b/layout/reftests/bugs/367612-1a.html
new file mode 100644
index 0000000000..dc27be6fe6
--- /dev/null
+++ b/layout/reftests/bugs/367612-1a.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: green }"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1b.html b/layout/reftests/bugs/367612-1b.html
new file mode 100644
index 0000000000..840b740900
--- /dev/null
+++ b/layout/reftests/bugs/367612-1b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: "));
+ document.getElementById("t").
+ appendChild(document.createTextNode("green }"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1c.html b/layout/reftests/bugs/367612-1c.html
new file mode 100644
index 0000000000..539f472afe
--- /dev/null
+++ b/layout/reftests/bugs/367612-1c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: "));
+ // Flush reflow
+ document.body.offsetWidth;
+ document.getElementById("t").
+ appendChild(document.createTextNode("green }"));
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1d.html b/layout/reftests/bugs/367612-1d.html
new file mode 100644
index 0000000000..1636be08b8
--- /dev/null
+++ b/layout/reftests/bugs/367612-1d.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").appendChild(document.createTextNode(""));
+ document.getElementById("t").firstChild.data = "* { color: green }";
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1e.html b/layout/reftests/bugs/367612-1e.html
new file mode 100644
index 0000000000..3042fa7dd0
--- /dev/null
+++ b/layout/reftests/bugs/367612-1e.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: "));
+ document.getElementById("t").
+ appendChild(document.createTextNode("green }"));
+ document.getElementById("t").normalize();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1f.html b/layout/reftests/bugs/367612-1f.html
new file mode 100644
index 0000000000..c8b88c87f1
--- /dev/null
+++ b/layout/reftests/bugs/367612-1f.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ <style id="t"></style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ <script>
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: green }"));
+ document.getElementById("t").
+ appendChild(document.createTextNode("* { color: red }"));
+ // Flush reflow
+ document.body.offsetWidth;
+ document.getElementById("t").
+ removeChild(document.getElementById("t").lastChild);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/367612-1g.html b/layout/reftests/bugs/367612-1g.html
new file mode 100644
index 0000000000..464391fdbb
--- /dev/null
+++ b/layout/reftests/bugs/367612-1g.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style> * { color: red } </style>
+ </head>
+ <body>
+ <span class="test">This text should be green</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/368020-1-ref.html b/layout/reftests/bugs/368020-1-ref.html
new file mode 100644
index 0000000000..afce9a262e
--- /dev/null
+++ b/layout/reftests/bugs/368020-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body>
+
+<div style="column-count: 2; column-fill: auto; height: 72px; background:yellow; line-height: 16px">
+
+ <div style="margin: 7px 1% 2px 2em; border: medium dotted; border-width: 2px 3px 4px 5px;">
+ <div style="background: url(repeatable-diagonal-gradient.png);">
+ <div style="padding: 8px 6px 4px 2px;">
+ blah<br>
+ blah<br>
+ blah<br>
+ blah
+ </div>
+ </div>
+ </div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-1.html b/layout/reftests/bugs/368020-1.html
new file mode 100644
index 0000000000..cc1b41ee4f
--- /dev/null
+++ b/layout/reftests/bugs/368020-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body>
+
+<div style="column-count: 2; column-fill: auto; height: 72px; background:yellow; line-height: 16px">
+
+ <div>
+ <div style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-clip: padding; background-origin: padding-box; background-origin: padding; margin: 7px 1% 2px 2em; border: medium dotted; border-width: 2px 3px 4px 5px; padding: 8px 6px 4px 2px;">
+ <div>
+ blah<br>
+ blah<br>
+ blah<br>
+ blah
+ </div>
+ </div>
+ </div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-2-ref.html b/layout/reftests/bugs/368020-2-ref.html
new file mode 100644
index 0000000000..99ef10fd0b
--- /dev/null
+++ b/layout/reftests/bugs/368020-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 500px;">
+
+ <span style="margin: 7px 1% 2px 2em; border: medium solid; border-width: 2px 3px 4px 5px; background: url(repeatable-diagonal-gradient.png);">
+ <span style="padding: 0 2% 0 2px;">
+ blah<br>
+ blah<br>
+ blah
+ </span>
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-2.html b/layout/reftests/bugs/368020-2.html
new file mode 100644
index 0000000000..727a87a7f5
--- /dev/null
+++ b/layout/reftests/bugs/368020-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 500px;">
+
+ <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-clip: padding; background-origin: padding-box; background-origin: padding; margin: 7px 1% 2px 2em; border: medium solid; border-width: 2px 3px 4px 5px; padding: 0 2% 0 2px;">
+ <span>
+ blah<br>
+ blah<br>
+ blah
+ </span>
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-3-ref.html b/layout/reftests/bugs/368020-3-ref.html
new file mode 100644
index 0000000000..7a95a6c4d4
--- /dev/null
+++ b/layout/reftests/bugs/368020-3-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+ <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-origin: padding-box; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px;">
+ blah<br>
+ blah<br>
+ blah
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-3.html b/layout/reftests/bugs/368020-3.html
new file mode 100644
index 0000000000..d04165527d
--- /dev/null
+++ b/layout/reftests/bugs/368020-3.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+ <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-origin: content-box; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 2% 3% 2px;">
+ blah<br>
+ blah<br>
+ blah
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-5-ref.html b/layout/reftests/bugs/368020-5-ref.html
new file mode 100644
index 0000000000..0cc7180afe
--- /dev/null
+++ b/layout/reftests/bugs/368020-5-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+ <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-origin: padding-box; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px; box-decoration-break: clone;">
+ blah<br>
+ blah<br>
+ blah
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368020-5.html b/layout/reftests/bugs/368020-5.html
new file mode 100644
index 0000000000..013708cad0
--- /dev/null
+++ b/layout/reftests/bugs/368020-5.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+ <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-origin: content-box; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 10px 15px 2px; box-decoration-break: clone;">
+ blah<br>
+ blah<br>
+ blah
+ </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368155-1-ref.xhtml b/layout/reftests/bugs/368155-1-ref.xhtml
new file mode 100644
index 0000000000..d68e227d99
--- /dev/null
+++ b/layout/reftests/bugs/368155-1-ref.xhtml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>Bug 368155 Reference</title>
+</head>
+<body>
+<div style="float: left; padding-left: 10px; border: 1px inset;">All of this text should be on one line</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368155-1.xhtml b/layout/reftests/bugs/368155-1.xhtml
new file mode 100644
index 0000000000..6b1ced944b
--- /dev/null
+++ b/layout/reftests/bugs/368155-1.xhtml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>Bug 368155</title>
+</head>
+<body>
+<div style="float: left; text-indent: 10px; border: 1px inset;">All of this text should be on one line</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368155-negative-margins-1-ref.html b/layout/reftests/bugs/368155-negative-margins-1-ref.html
new file mode 100644
index 0000000000..5596af7b19
--- /dev/null
+++ b/layout/reftests/bugs/368155-negative-margins-1-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Minimum intrinsic widths combined with negative margins</title>
+<style type="text/css">
+
+td { height: 2.5em; }
+
+</style>
+</head>
+<body>
+
+<table border width="1"><tr><td>
+</td></tr></table>
+<table border width="1"><tr><td>
+</td></tr></table>
+<table border width="1"><tr><td>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+</td></tr></table>
+<table border width="1"><tr><td>
+</td></tr></table>
+<table border width="1"><tr><td>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <div style="width: 2em"></div>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <div style="width: 3em"></div>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <div style="width: 3em"></div>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <div style="width: 0.5em"></div>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368155-negative-margins-1.html b/layout/reftests/bugs/368155-negative-margins-1.html
new file mode 100644
index 0000000000..71e7e2bbb6
--- /dev/null
+++ b/layout/reftests/bugs/368155-negative-margins-1.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Minimum intrinsic widths combined with negative margins</title>
+<style type="text/css">
+
+td { height: 2.5em; }
+
+span {
+ display: inline-block;
+ height: 0.5em;
+ width: 1em;
+}
+
+</style>
+</head>
+<body>
+
+<table border width="1"><tr><td>
+ <span style="margin-right: -1em"></span>
+</td></tr></table>
+<table border width="1"><tr><td>
+ <span style="margin-left: -1em"></span>
+</td></tr></table>
+<table border width="1"><tr><td>
+ <span style="margin: 0 -0.5em"></span>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <span style="margin-right: -2em"></span>
+</td></tr></table>
+<table border width="1"><tr><td>
+ <span style="margin-left: -2em"></span>
+</td></tr></table>
+<table border width="1"><tr><td>
+ <span style="margin: 0 -1em"></span>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <span style="margin-right: -2em"></span>&#x200b;<span style="width: 3em"></span>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <span style="width: 3em"></span>&#x200b;<span style="margin-right: -2em"></span>
+</td></tr></table>
+
+<table border width="1"><tr><td>
+ <span style="width: 3em;"></span>&#x200b;<span style="margin-left: -2em"></span>
+</td></tr></table>
+
+<table border width="1"><tr><td style="text-indent: -.75em">
+ <span style="margin-right: -.75em"></span>&#x200b;<span></span>
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368247-1-ref.html b/layout/reftests/bugs/368247-1-ref.html
new file mode 100644
index 0000000000..7e8e437e47
--- /dev/null
+++ b/layout/reftests/bugs/368247-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 64px;
+ height: 64px;
+ border: 64px solid blue;
+}
+</style>
+ <body>
+<div style="height: 0; border-bottom: 0; border-top-left-radius: 64px; border-top-right-radius: 64px;"></div>
+<div style="height: 64px; border-width: 0 64px;"></div>
+<div style="height: 0; border-top: 0; border-bottom-left-radius: 64px; border-bottom-right-radius: 64px;"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/368247-1.html b/layout/reftests/bugs/368247-1.html
new file mode 100644
index 0000000000..27e9fbf9dd
--- /dev/null
+++ b/layout/reftests/bugs/368247-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 64px;
+ height: 64px;
+ border: 64px solid blue;
+}
+</style>
+ <body>
+<div style="border-radius: 64px"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/368247-2-ref.html b/layout/reftests/bugs/368247-2-ref.html
new file mode 100644
index 0000000000..f57baf39ea
--- /dev/null
+++ b/layout/reftests/bugs/368247-2-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 64px;
+ height: 64px;
+ border: 64px solid blue;
+}
+</style>
+ <body>
+<div style="border-radius: 256px"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/368247-2.html b/layout/reftests/bugs/368247-2.html
new file mode 100644
index 0000000000..257479632f
--- /dev/null
+++ b/layout/reftests/bugs/368247-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 64px;
+ height: 64px;
+ border: 64px solid blue;
+}
+</style>
+ <body>
+<div style="border-radius: 128px"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/368504-1-ref.html b/layout/reftests/bugs/368504-1-ref.html
new file mode 100644
index 0000000000..ca2d546700
--- /dev/null
+++ b/layout/reftests/bugs/368504-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 368504 Reference</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <style type="text/css">
+ td {padding: 0px}
+ table {border-collapse: collapse; border: 0px}
+ </style>
+</head>
+<body>
+<table cellpadding="0" style="width: 100%">
+ <tr><td>
+ <table>
+ <tr>
+ <td style="background: green"><img src="solidblue.png" alt="" width="15" height="15"/></td>
+ <td style="background: yellow; width: 100%">Row 1 Text</td>
+ </tr>
+ </table>
+ </td></tr>
+ <tr><td>
+ <table style="width: 100%"><tr><td style="background: red"><img src="solidblue.png" alt="" width="30" height="15"/>StringOfReallyLongUnbrokenText</td></tr></table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-1.html b/layout/reftests/bugs/368504-1.html
new file mode 100644
index 0000000000..fa0d761d4e
--- /dev/null
+++ b/layout/reftests/bugs/368504-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Bug 368504</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <style type="text/css">
+ td {padding: 0px}
+ table {border-collapse: collapse; border: 0px}
+ </style>
+</head>
+<body>
+<table>
+ <tr>
+ <td style="background: green"><img src="solidblue.png" alt="" width="15" height="15"/></td>
+ <td style="background: yellow; width: 100%">Row 1 Text</td>
+ </tr>
+ <tr><td colspan=2 style="background: red"><img src="solidblue.png" alt="" width="30" height="15"/>StringOfReallyLongUnbrokenText</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-2-ref.html b/layout/reftests/bugs/368504-2-ref.html
new file mode 100644
index 0000000000..f6e7a8275d
--- /dev/null
+++ b/layout/reftests/bugs/368504-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 368504 Reference 2</title>
+</head>
+<body>
+<table border=1 cellpadding=0>
+ <tr>
+ <td width="100%">&nbsp;</td>
+ <td>ddd</td>
+ </tr>
+ <tr><td colspan="2">
+ <div>&nbsp;</div>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-2.html b/layout/reftests/bugs/368504-2.html
new file mode 100644
index 0000000000..e8e5986a0e
--- /dev/null
+++ b/layout/reftests/bugs/368504-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Bug 368504 Test 2</title>
+</head>
+<body>
+<table border=1 cellpadding=0>
+ <tr>
+ <td width="100%">&nbsp;</td>
+ <td>ddd</td>
+ </tr>
+ <tr><td colspan="2">
+ <div style="width: 20em">&nbsp;</div>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-3-ref.html b/layout/reftests/bugs/368504-3-ref.html
new file mode 100644
index 0000000000..b51009f3e4
--- /dev/null
+++ b/layout/reftests/bugs/368504-3-ref.html
@@ -0,0 +1,24 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Table width */
+ table { width: 500px; }
+
+ /* Cell colors + widths */
+ td.a { background: lightgreen; width: 100px; }
+ td.b { background: yellow; width: 60%; }
+ td.c { background: lightblue; width: 30%; }
+</style></head>
+<body>
+<table>
+ <tr>
+ <td class="a">a</td>
+ <td class="b">b</td>
+ <td class="c">c</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-3a.html b/layout/reftests/bugs/368504-3a.html
new file mode 100644
index 0000000000..62a18e7405
--- /dev/null
+++ b/layout/reftests/bugs/368504-3a.html
@@ -0,0 +1,28 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Table width */
+ table { width: 500px; }
+
+ /* Cell colors + widths */
+ td.a { background: lightgreen; width: 100px; }
+ td.b { background: yellow; width: 60%; }
+ td.c { background: lightblue; width: 30%; }
+ td.d { /* invisible */ min-width: 100px; }
+</style></head>
+<body>
+<table>
+ <tr>
+ <td class="a">a</td>
+ <td class="b">b</td>
+ <td class="c">c</td>
+ </tr>
+ <tr>
+ <td class="d" colspan=3>&nbsp</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-3b.html b/layout/reftests/bugs/368504-3b.html
new file mode 100644
index 0000000000..2ce80baafc
--- /dev/null
+++ b/layout/reftests/bugs/368504-3b.html
@@ -0,0 +1,28 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Table width */
+ table { width: 500px; }
+
+ /* Cell colors + widths */
+ td.a { background: lightgreen; width: 100px; }
+ td.b { background: yellow; width: 60%; }
+ td.c { background: lightblue; width: 30%; }
+ td.d { /* invisible */ min-width: 300px; }
+</style></head>
+<body>
+<table>
+ <tr>
+ <td class="a">a</td>
+ <td class="b">b</td>
+ <td class="c">c</td>
+ </tr>
+ <tr>
+ <td class="d" colspan=3>&nbsp</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-4-ref.html b/layout/reftests/bugs/368504-4-ref.html
new file mode 100644
index 0000000000..93ef367b7c
--- /dev/null
+++ b/layout/reftests/bugs/368504-4-ref.html
@@ -0,0 +1,100 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Colors for the three cell types */
+ td.a { background: lightgreen; }
+ td.b { background: yellow; }
+ td.c { background: blue; }
+
+ /* Set table-width, to replace shrinkwrap */
+ /* and and min-width on colspanning cell */
+ table { width: 500px; }
+
+ /* Set %-width on 2nd cell of first row in tables */
+ table#t0 td.b { width: 1% }
+ table#t1 td.b { width: 5% }
+ table#t2 td.b { width: 10% }
+ table#t3 td.b { width: 30% }
+ table#t4 td.b { width: 50% }
+ table#t5 td.b { width: 75% }
+ table#t6 td.b { width: 80% }
+ table#t7 td.b { width: 90% }
+ table#t8 td.b { width: 95% }
+ table#t9 td.b { width: 100% }
+
+</style></head>
+<body>
+<table id="t0"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t1"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t2"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t3"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t4"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t5"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t6"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t7"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t8"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t9"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-4.html b/layout/reftests/bugs/368504-4.html
new file mode 100644
index 0000000000..15f683f8c4
--- /dev/null
+++ b/layout/reftests/bugs/368504-4.html
@@ -0,0 +1,122 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Colors for the three cell types */
+ td.a { background: lightgreen; }
+ td.b { background: yellow; }
+ td.c { background: blue; }
+
+ /* Shrink-wrapping div */
+ div.shrinkwrap { width: 1px; }
+
+ /* Set min-width on colspanning cell */
+ td.c { min-width: 500px; }
+
+ /* Set %-width on 2nd cell of first row in tables */
+ table#t0 td.b { width: 1% }
+ table#t1 td.b { width: 5% }
+ table#t2 td.b { width: 10% }
+ table#t3 td.b { width: 30% }
+ table#t4 td.b { width: 50% }
+ table#t5 td.b { width: 75% }
+ table#t6 td.b { width: 80% }
+ table#t7 td.b { width: 90% }
+ table#t8 td.b { width: 95% }
+ table#t9 td.b { width: 100% }
+
+</style></head>
+<body>
+<div class="shrinkwrap">
+<table id="t0"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t1"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t2"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t3"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t4"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t5"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t6"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t7"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t8"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+
+<div class="shrinkwrap">
+<table id="t9"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-5-ref.html b/layout/reftests/bugs/368504-5-ref.html
new file mode 100644
index 0000000000..6b1326c8ac
--- /dev/null
+++ b/layout/reftests/bugs/368504-5-ref.html
@@ -0,0 +1,100 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Colors for the three cell types */
+ td.a { background: lightgreen; }
+ td.b { background: yellow; }
+ td.c { background: blue; }
+
+ /* Set min-width on table (replacing min-width */
+ /* on colspanning cell) */
+ table { min-width: 200px; }
+
+ /* Set %-width on 2nd cell of first row in tables */
+ table#t0 td.b { width: 1% }
+ table#t1 td.b { width: 5% }
+ table#t2 td.b { width: 10% }
+ table#t3 td.b { width: 30% }
+ table#t4 td.b { width: 50% }
+ table#t5 td.b { width: 75% }
+ table#t6 td.b { width: 80% }
+ table#t7 td.b { width: 90% }
+ table#t8 td.b { width: 95% }
+ table#t9 td.b { width: 100% }
+
+</style></head>
+<body>
+<table id="t0"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t1"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t2"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t3"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t4"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t5"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t6"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t7"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t8"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+
+<table id="t9"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c">&nbsp</td><td class="c">&nbsp</td>
+</tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-5.html b/layout/reftests/bugs/368504-5.html
new file mode 100644
index 0000000000..a297111f17
--- /dev/null
+++ b/layout/reftests/bugs/368504-5.html
@@ -0,0 +1,99 @@
+<html>
+<head><style>
+ /* cellspacing=0 cellpadding=0 */
+ table { border-spacing: 0 }
+ td, th { padding: 0 }
+
+ /* Colors for the three cell types */
+ td.a { background: lightgreen; }
+ td.b { background: yellow; }
+ td.c { background: blue; }
+
+ /* Set min-width on colspanning cell */
+ td.c { min-width: 200px; }
+
+ /* Set %-width on 2nd cell of first row in tables */
+ table#t0 td.b { width: 1% }
+ table#t1 td.b { width: 5% }
+ table#t2 td.b { width: 10% }
+ table#t3 td.b { width: 30% }
+ table#t4 td.b { width: 50% }
+ table#t5 td.b { width: 75% }
+ table#t6 td.b { width: 80% }
+ table#t7 td.b { width: 90% }
+ table#t8 td.b { width: 95% }
+ table#t9 td.b { width: 100% }
+
+</style></head>
+<body>
+<table id="t0"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t1"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t2"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t3"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t4"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t5"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t6"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t7"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t8"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+
+<table id="t9"><tr>
+ <td class="a">foo</td>
+ <td class="b">foo</td>
+ </tr><tr>
+ <td class="c" colspan="2">&nbsp</td>
+</tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-6-ref.html b/layout/reftests/bugs/368504-6-ref.html
new file mode 100644
index 0000000000..f63c687c17
--- /dev/null
+++ b/layout/reftests/bugs/368504-6-ref.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+ xxx
+ <table style="width: 600px" cellspacing=0 cellpadding=0>
+ <tr>
+ <td style="background: lightgreen" colspan=2>x x x x x x x x x x x x </td>
+ <td style="background: gray">xxx</td>
+ </tr>
+ <tr>
+ <td style="background: orange" >xxx</td>
+ <td style="background: lightblue">xxx</td>
+ <td style="background: yellow" >xxx</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368504-6.html b/layout/reftests/bugs/368504-6.html
new file mode 100644
index 0000000000..c571302f8e
--- /dev/null
+++ b/layout/reftests/bugs/368504-6.html
@@ -0,0 +1,19 @@
+<html>
+<body>
+ <table style="width: 600px" cellspacing=0 cellpadding=0>
+ <tr>
+ <td style="width: 1px" colspan=2>xxx</td>
+ <td class="b">&nbsp</td>
+ </tr>
+ <tr>
+ <td style="background: lightgreen" colspan=2>x x x x x x x x x x x x </td>
+ <td style="background: gray">xxx</td>
+ </tr>
+ <tr>
+ <td style="background: orange" >xxx</td>
+ <td style="background: lightblue">xxx</td>
+ <td style="background: yellow" >xxx</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/368622-1-ref.html b/layout/reftests/bugs/368622-1-ref.html
new file mode 100644
index 0000000000..60f5be8c6c
--- /dev/null
+++ b/layout/reftests/bugs/368622-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>::before { display: inline-block; }</title>
+<style>
+ul li {
+ list-style-type: none;
+}
+ul li span {
+ display: inline-block;
+ width: 3em;
+}
+ul {
+ margin-left: 3em;
+ padding-left: 0;
+}
+</style>
+<ul>
+<li><span>1</span>Foo
+<li><span>2</span>Bar
+</ul>
diff --git a/layout/reftests/bugs/368622-1.html b/layout/reftests/bugs/368622-1.html
new file mode 100644
index 0000000000..8bc06cc037
--- /dev/null
+++ b/layout/reftests/bugs/368622-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<title>::before { display: inline-block; }</title>
+<style>
+ul li {
+ list-style-type: none;
+ counter-increment: item;
+}
+ul li::before {
+ content: counter(item);
+ display: inline-block;
+ width: 3em;
+}
+ul {
+ margin-left: 3em;
+ padding-left: 0;
+}
+</style>
+<ul>
+<li>Foo
+<li>Bar
+</ul>
diff --git a/layout/reftests/bugs/368651-1-ref.html b/layout/reftests/bugs/368651-1-ref.html
new file mode 100644
index 0000000000..d34cbea609
--- /dev/null
+++ b/layout/reftests/bugs/368651-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+</head>
+
+<body>
+
+<table border>
+ <tbody id="tbody">
+ <tr>
+ <td rowspan="0">a</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>b</td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/368651-1.html b/layout/reftests/bugs/368651-1.html
new file mode 100644
index 0000000000..40ee8bbfe7
--- /dev/null
+++ b/layout/reftests/bugs/368651-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<script>
+function boom()
+{
+ var td = document.createElementNS("http://www.w3.org/1999/xhtml", "td");
+ td.appendChild(document.createTextNode("b"));
+ document.getElementById("tbody").appendChild(td);
+}
+</script>
+</head>
+
+<body>
+
+<table border>
+ <tbody id="tbody">
+ <tr>
+ <td rowspan="0">a</td>
+ </tr>
+ <tr>
+ </tr>
+ </tbody>
+</table>
+
+<script>
+ // Flush layout
+ document.body.offsetWidth;
+
+ boom();
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/369361-1-ref.html b/layout/reftests/bugs/369361-1-ref.html
new file mode 100644
index 0000000000..1809e8473b
--- /dev/null
+++ b/layout/reftests/bugs/369361-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: left;
+}
+ul {
+ margin: 0; padding: 0;
+ list-style: none;
+}
+li {
+ margin: 0 0 0 270px;
+ padding: 0;
+}
+</style>
+</head>
+<body>
+<div>Floater.</div>
+<ul>
+ <li>List item.</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/369361-1.html b/layout/reftests/bugs/369361-1.html
new file mode 100644
index 0000000000..37b2108834
--- /dev/null
+++ b/layout/reftests/bugs/369361-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: left;
+ width: 250px;
+}
+ul {
+ margin: 0; padding: 0;
+ list-style: none;
+}
+li {
+ margin: 0 0 0 270px;
+ padding: 0;
+}
+</style>
+</head>
+<body>
+<div>Floater.</div>
+<ul>
+ <li>List item.</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/369361-2-ref.html b/layout/reftests/bugs/369361-2-ref.html
new file mode 100644
index 0000000000..ba053d181e
--- /dev/null
+++ b/layout/reftests/bugs/369361-2-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: right;
+}
+ul {
+ margin: 0; padding: 0;
+ list-style: none;
+}
+li {
+ margin: 0 270px 0 0;
+ padding: 0;
+ text-align: right;
+}
+</style>
+</head>
+<body>
+<div>Floater.</div>
+<ul>
+ <li>List item.</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/369361-2.html b/layout/reftests/bugs/369361-2.html
new file mode 100644
index 0000000000..4e9542906a
--- /dev/null
+++ b/layout/reftests/bugs/369361-2.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: right;
+ width: 250px;
+ text-align: right;
+}
+ul {
+ margin: 0; padding: 0;
+ list-style: none;
+}
+li {
+ margin: 0 270px 0 0;
+ padding: 0;
+ text-align: right;
+}
+</style>
+</head>
+<body>
+<div>Floater.</div>
+<ul>
+ <li>List item.</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/369882-ref.xhtml b/layout/reftests/bugs/369882-ref.xhtml
new file mode 100644
index 0000000000..70cc5440ea
--- /dev/null
+++ b/layout/reftests/bugs/369882-ref.xhtml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <hbox height="18" align="center">
+ <deck>
+ <image width="16" height="16"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"/>
+ </deck>
+ </hbox>
+</window>
diff --git a/layout/reftests/bugs/369882.xhtml b/layout/reftests/bugs/369882.xhtml
new file mode 100644
index 0000000000..f40228c1f9
--- /dev/null
+++ b/layout/reftests/bugs/369882.xhtml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <hbox height="17" align="center">
+ <deck>
+ <image width="16" height="16"
+ style="background:blue"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"/>
+ </deck>
+ </hbox>
+</window>
diff --git a/layout/reftests/bugs/369975-1.html b/layout/reftests/bugs/369975-1.html
new file mode 100644
index 0000000000..f4f0b41e1f
--- /dev/null
+++ b/layout/reftests/bugs/369975-1.html
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Assert: Must have usable originating data here + crash</title>
+</head>
+
+<body>
+
+<table border>
+ <tbody>
+ <tr ><td rowspan="2">1</td></tr>
+ <tr><td rowspan="2">2</td></tr>
+ <tr ><td rowspan="3" colspan="2">3</td></tr>
+ <tr></tr>
+</tbody>
+<tbody>
+ <tr><td rowspan="3">4</td></tr>
+ <tr><td>5</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370353-1-ref.html b/layout/reftests/bugs/370353-1-ref.html
new file mode 100644
index 0000000000..c2aebb513c
--- /dev/null
+++ b/layout/reftests/bugs/370353-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+
+ <table>
+ <col>
+ <col id="col2" style="visibility: collapse;"><col>
+ <tbody>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ <td>three</td>
+ </tr>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ <td>three</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/370353-1.html b/layout/reftests/bugs/370353-1.html
new file mode 100644
index 0000000000..bd81d6bada
--- /dev/null
+++ b/layout/reftests/bugs/370353-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body onload="document.getElementById('col2').style.visibility = 'collapse';">
+
+ <table>
+ <col>
+ <col id="col2"><col>
+ <tbody>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ <td>three</td>
+ </tr>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ <td>three</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/370422-1-ref.html b/layout/reftests/bugs/370422-1-ref.html
new file mode 100644
index 0000000000..18073081bf
--- /dev/null
+++ b/layout/reftests/bugs/370422-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Testcase bug - Select drop down button doesn't update its position in this case when document widens</title>
+</head>
+<body onload="test()">
+The dropwdown button should be on the right of the select<br>
+
+<iframe src="data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%0A%3Cstyle%3E%0Aselect%0A%7B%0A%20%20HEIGHT%3A%20100px%3B%0A%20%20WIDTH%3A%20100%25%3B%20%0A%7D%0A%3C/style%3E%0A%3C/head%3E%0A%3Cbody%3E%0A%3Cselect%3E%3Coption%20value%3D%222%22%3Etext%3C/option%3E%3C/select%3E%20%20%20%20%20%20%20%20%0A%3C/body%3E%0A%3C/html%3E" style="width: 400px;">
+</iframe>
+<script>
+function test() {
+ document.getElementsByTagName('iframe')[0].style.width = '400px';
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370422-1.html b/layout/reftests/bugs/370422-1.html
new file mode 100644
index 0000000000..98ce2164fa
--- /dev/null
+++ b/layout/reftests/bugs/370422-1.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Testcase bug - Select drop down button doesn't update its position in this case when document widens</title>
+</head>
+<body onload="test()">
+The dropwdown button should be on the right of the select<br>
+
+<iframe src="data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%0A%3Cstyle%3E%0Aselect%0A%7B%0A%20%20HEIGHT%3A%20100px%3B%0A%20%20WIDTH%3A%20100%25%3B%20%0A%7D%0A%3C/style%3E%0A%3C/head%3E%0A%3Cbody%3E%0A%3Cselect%3E%3Coption%20value%3D%222%22%3Etext%3C/option%3E%3C/select%3E%20%20%20%20%20%20%20%20%0A%3C/body%3E%0A%3C/html%3E" style="width: 200px;">
+</iframe>
+<script>
+function test() {
+ document.getElementsByTagName('iframe')[0].style.width = '400px';
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-1-notref.html b/layout/reftests/bugs/370525-1-notref.html
new file mode 100644
index 0000000000..c9f8278ad4
--- /dev/null
+++ b/layout/reftests/bugs/370525-1-notref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Bug 370525 Anti-Reference Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td style="height: 10%">
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-1-ref.html b/layout/reftests/bugs/370525-1-ref.html
new file mode 100644
index 0000000000..1fe8347198
--- /dev/null
+++ b/layout/reftests/bugs/370525-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Bug 370525 Reference Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td>
+ <table style="border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-1.html b/layout/reftests/bugs/370525-1.html
new file mode 100644
index 0000000000..67df5206c2
--- /dev/null
+++ b/layout/reftests/bugs/370525-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Bug 370525 Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-2-notref.html b/layout/reftests/bugs/370525-2-notref.html
new file mode 100644
index 0000000000..a675dd5339
--- /dev/null
+++ b/layout/reftests/bugs/370525-2-notref.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+ <title>Bug 370525 Anti-Reference Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td style="height: 10%">
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-2-ref.html b/layout/reftests/bugs/370525-2-ref.html
new file mode 100644
index 0000000000..1563694b85
--- /dev/null
+++ b/layout/reftests/bugs/370525-2-ref.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+ <title>Bug 370525 Reference Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td>
+ <table style="border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-2.html b/layout/reftests/bugs/370525-2.html
new file mode 100644
index 0000000000..68aab9372f
--- /dev/null
+++ b/layout/reftests/bugs/370525-2.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+ <title>Bug 370525 Testcase</title>
+</head>
+<body>
+ <table style="border: 2px solid blue;">
+ <tr><td>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 1</td></tr>
+ </table>
+ <table style="height: 100%; border: 1px dotted red;">
+ <tr><td>Table 2</td></tr>
+ </table>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1a-ref.html b/layout/reftests/bugs/370525-rowspan-1a-ref.html
new file mode 100644
index 0000000000..803753a53b
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1a-ref.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on a sibling
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div>
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px">
+ height=200px.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, 1st column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1a.html b/layout/reftests/bugs/370525-rowspan-1a.html
new file mode 100644
index 0000000000..aa21604161
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1a.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on a sibling
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 75%">
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px">
+ height=200px.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, 1st column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1b-ref.html b/layout/reftests/bugs/370525-rowspan-1b-ref.html
new file mode 100644
index 0000000000..73cb6f929d
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1b-ref.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on a sibling
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div>
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: orange">
+ 1st row, 2nd column.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" height="200px">
+ 2nd row, 1st column. height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1b.html b/layout/reftests/bugs/370525-rowspan-1b.html
new file mode 100644
index 0000000000..3739bbb888
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1b.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on a sibling
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 75%">
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: orange">
+ 1st row, 2nd column.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" height="200px">
+ 2nd row, 1st column. height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1c-ref.html b/layout/reftests/bugs/370525-rowspan-1c-ref.html
new file mode 100644
index 0000000000..9cd100ca5a
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1c-ref.html
@@ -0,0 +1,23 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div, with specified
+height on a sibling. Also, does not explicitly create 2nd row.
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 150px">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px">
+ height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-1c.html b/layout/reftests/bugs/370525-rowspan-1c.html
new file mode 100644
index 0000000000..066a7796d0
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-1c.html
@@ -0,0 +1,23 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div, with specified
+height on a sibling. Also, does not explicitly create 2nd row.
+<table>
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 75%">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px">
+ height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-2a-ref.html b/layout/reftests/bugs/370525-rowspan-2a-ref.html
new file mode 100644
index 0000000000..8201256778
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-2a-ref.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 and specified height on a sibling of the cell with percent-height div.
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div>
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px" rowspan="2">
+ height=200px.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, 1st column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/370525-rowspan-2a.html b/layout/reftests/bugs/370525-rowspan-2a.html
new file mode 100644
index 0000000000..2fea5092a6
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-2a.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 and specified height on a sibling of the cell with percent-height div.
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div style="height: 75%">
+ height=75% / ignored
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px" rowspan="2">
+ height=200px.
+ </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, 1st column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/370525-rowspan-2b-ref.html b/layout/reftests/bugs/370525-rowspan-2b-ref.html
new file mode 100644
index 0000000000..dce70f5a36
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-2b-ref.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 and specified height on a sibling of the cell with
+percent-height div. Also, does not explicitly create 2nd row.
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div style="height: 150px">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px" rowspan="2">
+ height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/370525-rowspan-2b.html b/layout/reftests/bugs/370525-rowspan-2b.html
new file mode 100644
index 0000000000..7d697a3f46
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-2b.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 and specified height on a sibling of the cell with
+percent-height div. Also, does not explicitly create 2nd row.
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div style="height: 75%">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue" height="200px" rowspan="2">
+ height=200px.
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/370525-rowspan-3-ref.html b/layout/reftests/bugs/370525-rowspan-3-ref.html
new file mode 100644
index 0000000000..91171ca475
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-3-ref.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on table
+<table height="200px">
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 150px">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue"> first row, second column </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, only column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-3.html b/layout/reftests/bugs/370525-rowspan-3.html
new file mode 100644
index 0000000000..94a7a0f82a
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-3.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on table
+<table height="200px">
+ <tr>
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 75%">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue"> first row, second column </td>
+ </tr>
+ <tr>
+ <td style="background: orange">
+ 2nd row, only column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-4-ref.html b/layout/reftests/bugs/370525-rowspan-4-ref.html
new file mode 100644
index 0000000000..1d2ccb09da
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-4-ref.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on row
+<table>
+ <tr height="160px">
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 150px;">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue"> first row, second column </td>
+ </tr>
+ <tr height="40px">
+ <td style="background: orange">
+ 2nd row, only column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-rowspan-4.html b/layout/reftests/bugs/370525-rowspan-4.html
new file mode 100644
index 0000000000..d314e9be6d
--- /dev/null
+++ b/layout/reftests/bugs/370525-rowspan-4.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+rowspan=2 on the cell with the percent-height div,
+with specified height on row
+<table>
+ <tr height="160px">
+ <td style="background: lightgreen" rowspan="2">
+ <div style="height: 75%">
+ height=75% / 150px
+ </div>
+ blah
+ </td>
+ <td style="background: lightblue"> first row, second column </td>
+ </tr>
+ <tr height="40px">
+ <td style="background: orange">
+ 2nd row, only column
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-sib-ref.html b/layout/reftests/bugs/370525-sib-ref.html
new file mode 100644
index 0000000000..6db87d0017
--- /dev/null
+++ b/layout/reftests/bugs/370525-sib-ref.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+Specified height on sibling cell
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div style="height: 150px">height=75% / 150px</div>
+ blah
+ </td>
+ <td style="height: 200px; background: lightblue">height=200px</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-sib.html b/layout/reftests/bugs/370525-sib.html
new file mode 100644
index 0000000000..f8a20b4ca6
--- /dev/null
+++ b/layout/reftests/bugs/370525-sib.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<link rel="stylesheet" href="370525-style.css"/>
+</head>
+
+<body>
+Specified height on sibling cell
+<table>
+ <tr>
+ <td style="background: lightgreen">
+ <div style="height: 75%">height=75% / 150px</div>
+ blah
+ </td>
+ <td style="height: 200px; background: lightblue">height=200px</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/370525-style.css b/layout/reftests/bugs/370525-style.css
new file mode 100644
index 0000000000..5cc9aba0c8
--- /dev/null
+++ b/layout/reftests/bugs/370525-style.css
@@ -0,0 +1,13 @@
+div {
+ background: yellow;
+}
+table {
+ background: grey;
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+td, th {
+ padding: 0;
+ vertical-align: top;
+}
diff --git a/layout/reftests/bugs/370586-1-ref.xhtml b/layout/reftests/bugs/370586-1-ref.xhtml
new file mode 100644
index 0000000000..bd9ee231be
--- /dev/null
+++ b/layout/reftests/bugs/370586-1-ref.xhtml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<table border="1">
+ <td style="display: table-row">
+ foo
+ <td>bar</td>
+ </td>
+ <tr><td>baz</td></tr>
+</table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/370586-1.xhtml b/layout/reftests/bugs/370586-1.xhtml
new file mode 100644
index 0000000000..3fcc53afe2
--- /dev/null
+++ b/layout/reftests/bugs/370586-1.xhtml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<table border="1">
+ <td style="display: table-row" rowspan="2">
+ foo
+ <td>bar</td>
+ </td>
+ <tr><td>baz</td></tr>
+</table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/370629-1-ref.html b/layout/reftests/bugs/370629-1-ref.html
new file mode 100644
index 0000000000..78dda5f0f7
--- /dev/null
+++ b/layout/reftests/bugs/370629-1-ref.html
@@ -0,0 +1 @@
+<span style="display: inline-block; width: 720px; height:720px; background: red"></span> \ No newline at end of file
diff --git a/layout/reftests/bugs/370629-1.html b/layout/reftests/bugs/370629-1.html
new file mode 100644
index 0000000000..0f9779ca3a
--- /dev/null
+++ b/layout/reftests/bugs/370629-1.html
@@ -0,0 +1 @@
+<img width=720 src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD6AAAA%2BgAQMAAADUsXFBAAAAA1BMVEX%2FAAAZ4gk3AAAHsUlEQVR4Xu3AMQkAAAwEsfpX3fngJSQXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPCV4gABtb1MvAAAAABJRU5ErkJggg%3D%3D"> \ No newline at end of file
diff --git a/layout/reftests/bugs/370629-2-ref.html b/layout/reftests/bugs/370629-2-ref.html
new file mode 100644
index 0000000000..98e19534e4
--- /dev/null
+++ b/layout/reftests/bugs/370629-2-ref.html
@@ -0,0 +1 @@
+<span style="display: inline-block; width: 1000px; height:1000px; background: red"></span> \ No newline at end of file
diff --git a/layout/reftests/bugs/370629-2.html b/layout/reftests/bugs/370629-2.html
new file mode 100644
index 0000000000..c2ef605c7e
--- /dev/null
+++ b/layout/reftests/bugs/370629-2.html
@@ -0,0 +1 @@
+<img height=1000 src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD6AAAA%2BgAQMAAADUsXFBAAAAA1BMVEX%2FAAAZ4gk3AAAHsUlEQVR4Xu3AMQkAAAwEsfpX3fngJSQXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPCV4gABtb1MvAAAAABJRU5ErkJggg%3D%3D"> \ No newline at end of file
diff --git a/layout/reftests/bugs/371043-1-ref.html b/layout/reftests/bugs/371043-1-ref.html
new file mode 100644
index 0000000000..5b504b270a
--- /dev/null
+++ b/layout/reftests/bugs/371043-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+ <div id="source" style="font-size: 10px; column-gap: 2ch">
+ <span id="test"
+ style="background: green; color: green; display: inline-block;
+ height: 30px; padding: 0 2px">00
+ </span>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/371043-1.html b/layout/reftests/bugs/371043-1.html
new file mode 100644
index 0000000000..753a3a4c0d
--- /dev/null
+++ b/layout/reftests/bugs/371043-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<body>
+ <div id="source" style="font-size: 10px; column-gap: 2ch">
+ <span id="test"
+ style="background: green; display: inline-block; height: 30px;
+ padding: 0 2px">
+ </span>
+ <script>
+ document.getElementById("test").style.width =
+ document.defaultView.getComputedStyle(document.getElementById("source")).columnGap;
+ </script>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/371354-1-ref.html b/layout/reftests/bugs/371354-1-ref.html
new file mode 100644
index 0000000000..a65ecc6267
--- /dev/null
+++ b/layout/reftests/bugs/371354-1-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+td * {
+ vertical-align: top;
+}
+img:first-child {
+ float: right;
+}
+</style>
+</head>
+<body>
+<table border="1">
+ <tr>
+ <td><span>Header 1</span><img src="square-outline-32x32.png" alt=""></td>
+ <td><img src="square-outline-32x32.png" alt="">Header 2</td>
+ </tr>
+ <tr>
+ <td>short</td>
+ <td>long long long long long</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/371354-1.html b/layout/reftests/bugs/371354-1.html
new file mode 100644
index 0000000000..233881753a
--- /dev/null
+++ b/layout/reftests/bugs/371354-1.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+span {
+ float: left;
+}
+img {
+ float: right;
+}
+</style>
+</head>
+<body>
+<table border="1">
+ <tr>
+ <td><span>Header 1</span> <img src="square-outline-32x32.png" alt=""></td>
+ <td><span>Header 2</span> <img src="square-outline-32x32.png" alt=""></td>
+ </tr>
+ <tr>
+ <td>short</td>
+ <td>long long long long long</td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/371483-1.html b/layout/reftests/bugs/371483-1.html
new file mode 100644
index 0000000000..3259dad2cd
--- /dev/null
+++ b/layout/reftests/bugs/371483-1.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+<table>
+ <tr>
+ <td colspan="2">
+ <table style="table-layout: fixed;"></table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/371561-1-ref.html b/layout/reftests/bugs/371561-1-ref.html
new file mode 100644
index 0000000000..59507613df
--- /dev/null
+++ b/layout/reftests/bugs/371561-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ #t { background: green; position: absolute; width: 100%; left: 0;
+ height: 10px; top: 0; }
+ </style>
+ </head>
+ <body>
+ <div style="position: relative; display: inline; color: white; background: white;">ABCDEF<div id="t"></div></div>
+ <body>
+</html>
diff --git a/layout/reftests/bugs/371561-1.html b/layout/reftests/bugs/371561-1.html
new file mode 100644
index 0000000000..d658fc9556
--- /dev/null
+++ b/layout/reftests/bugs/371561-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ table, tbody, tr, td { padding: 0; margin: 0; border-spacing: 0 }
+ table { background: green; position: absolute; width: 100%;
+ border: none; left: 0; top: 0; height: 10px; }
+ </style>
+ </head>
+ <body>
+ <div style="position: relative; display: inline; color: white; background: white;">
+ ABCDEF<table><tr><td></td></tr></table></div>
+ <body>
+</html>
diff --git a/layout/reftests/bugs/371681-1.xhtml b/layout/reftests/bugs/371681-1.xhtml
new file mode 100644
index 0000000000..b607850e19
--- /dev/null
+++ b/layout/reftests/bugs/371681-1.xhtml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<head>
+</head>
+<body>
+
+<div style="float: left">X<xul:hbox><input type="radio"/></xul:hbox></div>
+<div id="y" style="float: left">Y</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/371925-1-ref.html b/layout/reftests/bugs/371925-1-ref.html
new file mode 100644
index 0000000000..0d3e2761c9
--- /dev/null
+++ b/layout/reftests/bugs/371925-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table id="theTable" border="1">
+ <thead id="thead">
+ <tr><th>Header</th></tr>
+ </thead>
+ <tbody><tr><td id="body">BODY</td></tr></tbody>
+</table>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/371925-1a.html b/layout/reftests/bugs/371925-1a.html
new file mode 100644
index 0000000000..fd1d69da37
--- /dev/null
+++ b/layout/reftests/bugs/371925-1a.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table id="theTable" border="1"><thead id="thead">
+ <tr><th>Header</th></tr>
+ </thead>
+ <tfoot id="tfoot"><tr><th>Footer</th></tr></tfoot>
+ <tbody><tr><td id="body">BODY</td></tr></tbody>
+</table>
+
+<script>
+var style = document.getElementById('tfoot').style;
+style.display = "none";
+document.body.offsetWidth;
+style.display = "table-footer-group";
+document.body.offsetWidth;
+style.display = "none";
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/371925-1b.html b/layout/reftests/bugs/371925-1b.html
new file mode 100644
index 0000000000..8db15e968b
--- /dev/null
+++ b/layout/reftests/bugs/371925-1b.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table id="theTable" border="1">
+ <thead id="thead">
+ <tr><th>Header</th></tr>
+ </thead>
+ <tfoot id="tfoot"><tr><th>Footer</th></tr></tfoot>
+ <tbody><tr><td id="body">BODY</td></tr></tbody>
+</table>
+
+<script>
+var style = document.getElementById('tfoot').style;
+style.display = "none";
+document.body.offsetWidth;
+style.display = "table-footer-group";
+document.body.offsetWidth;
+style.display = "none";
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372037-1-ref.html b/layout/reftests/bugs/372037-1-ref.html
new file mode 100644
index 0000000000..756f765cbd
--- /dev/null
+++ b/layout/reftests/bugs/372037-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<style>
+html, body {margin: 0; padding:5px}
+</style>
+
+<div style="position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: absolute; top: 10px; width: 40px; height: 50px;">
+</div>
+</div>
+
+<div style="position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: fixed; left: 20px; width: 40px; height: 50px;">
+</div>
+</div>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: relative; width: 200px; height: 200px;">
+</div>
+</div>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: absolute; width: 200px; height: 200px;">
+</div>
+</div>
diff --git a/layout/reftests/bugs/372037-1.html b/layout/reftests/bugs/372037-1.html
new file mode 100644
index 0000000000..f5a1de623c
--- /dev/null
+++ b/layout/reftests/bugs/372037-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<style>
+html, body {margin: 0; padding:5px}
+</style>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: absolute; clip: rect(10px, 40px, 60px, 0); width: 200px; height: 200px;">
+</div>
+</div>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: fixed; clip: rect(0 50px 50px 10px); width: 200px; height: 200px;">
+</div>
+</div>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: relative; clip: rect(0, 50px, 50px, 0); width: 200px; height: 200px;">
+</div>
+</div>
+
+<div style="overflow: auto; position: relative; height: 100px; width: 100px;">
+<div style="background: blue; position: absolute; clip: rect(0, auto, auto, 0); width: 200px; height: 200px;">
+</div>
+</div>
diff --git a/layout/reftests/bugs/372062-1-ref.html b/layout/reftests/bugs/372062-1-ref.html
new file mode 100644
index 0000000000..7673035a49
--- /dev/null
+++ b/layout/reftests/bugs/372062-1-ref.html
@@ -0,0 +1,8 @@
+<style>
+div {color:white; font-size: xx-large; top: 0; left: 0; position: absolute; width: 200px; height:200px;}
+</style>
+
+<div style="background: red;">FAIL</div>
+<div style="">
+ <div style="background:green">PASS</div>
+</div> \ No newline at end of file
diff --git a/layout/reftests/bugs/372062-1.html b/layout/reftests/bugs/372062-1.html
new file mode 100644
index 0000000000..c90c844b41
--- /dev/null
+++ b/layout/reftests/bugs/372062-1.html
@@ -0,0 +1,8 @@
+<style>
+div {color:white; font-size: xx-large; top: 0; left: 0; position: absolute; width: 200px; height:200px;}
+</style>
+
+<div style="background: red;">FAIL</div>
+<div style="clip:rect(-200px auto auto -200px);">
+ <div style="background:green">PASS</div>
+</div> \ No newline at end of file
diff --git a/layout/reftests/bugs/372063-1-ref.html b/layout/reftests/bugs/372063-1-ref.html
new file mode 100644
index 0000000000..e7e5ebdd39
--- /dev/null
+++ b/layout/reftests/bugs/372063-1-ref.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 372063</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color: white; font-size:16px; padding:0; margin:0;
+ }
+
+div {color:white; font-size: xx-large; top: 0; left: 0; position: absolute; width: 100px; height:100px;}
+.pass { background:green; }
+.fail { background: red; }
+
+.test1 { top:0; }
+.test2 { top:150px; }
+.test3 { top:300px; }
+.test4 { top:450px; }
+.test4b{ left:-100px;}
+.test4b div { top:100px; left:100px;}
+.test4c{ left:-100px;}
+.test4c div div { top:100px; left:100px;}
+.test5 { top:600px; }
+.test6 { top:750px; }
+.test5b , .test6b{ left:-100px; }
+.test5b div , .test6b div { left:100px;}
+.test5c , .test6c { left:-100px;}
+.test5c div div , .test6c div div { left:100px;}
+
+#test_inherit { left: 400px; height:auto; bottom:0; }
+.inherit { clip:inherit; }
+ </style>
+</head>
+<body>
+
+<div class="test1">
+<div class="fail">FAIL</div>
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test2">
+<div class="pass">PASS</div>
+</div>
+
+<div class="test3">
+<div class="fail">FAIL</div>
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test4">
+<div class="pass">PASS</div>
+</div>
+
+<div class="test5">
+<div class="pass">PASS</div>
+</div>
+
+<div class="test6">
+<div class="pass">PASS</div>
+</div>
+
+<!-- same as above but with intermediary div with clip:inherit -->
+<div id="test_inherit">
+<div class="test1">
+<div class="fail">FAIL</div>
+<div>
+ <div>
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+<div class="test2">
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test3">
+<div>
+ <div class="fail">FAIL</div>
+</div>
+<div>
+ <div >
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+<div class="test4">
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test5">
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test6">
+<div>
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372063-1.html b/layout/reftests/bugs/372063-1.html
new file mode 100644
index 0000000000..0872339e38
--- /dev/null
+++ b/layout/reftests/bugs/372063-1.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 372063</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color: white; font-size:16px; padding:0; margin:0;
+ }
+
+div {color:white; font-size: xx-large; top: 0; left: 0; position: absolute; width: 100px; height:100px;}
+.pass { background:green; }
+.fail { background: red; }
+
+.test1 { top:0; }
+.test2 { top:150px; }
+.test3 { top:300px; }
+.test4 { top:450px; }
+.test4b{ left:-100px;}
+.test4b div { top:100px; left:100px;}
+.test4c{ left:-100px;}
+.test4c div div { top:100px; left:100px;}
+.test5 { top:600px; }
+.test6 { top:750px; }
+.test5b , .test6b{ left:-100px; }
+.test5b div , .test6b div { left:100px;}
+.test5c , .test6c { left:-100px;}
+.test5c div div , .test6c div div { left:100px;}
+
+#test_inherit { left: 400px; height:auto; bottom:0; }
+.inherit { clip:inherit; }
+ </style>
+</head>
+<body>
+
+<div class="test1">
+<div class="fail">FAIL</div>
+<div style="clip:rect(auto auto auto auto);">
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test2">
+<div class="pass">PASS</div>
+<div style="clip:rect(0 0 0 0);">
+ <div class="fail">FAIL</div>
+</div>
+</div>
+
+<div class="test3">
+<div class="fail">FAIL</div>
+<div style="clip:rect(0,200px,200px,0);">
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test4">
+<div class="pass">PASS</div>
+<div class="test4b" style="clip:rect(auto auto auto auto);">
+ <div class="fail">FAIL</div>
+</div>
+</div>
+
+<div class="test5">
+<div class="fail">FAIL</div>
+<div class="test5b" style="clip:auto;">
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<div class="test6">
+<div class="fail">FAIL</div>
+<div class="test6b" style="">
+ <div class="pass">PASS</div>
+</div>
+</div>
+
+<!-- same as above but with intermediary div with clip:inherit -->
+<div id="test_inherit">
+<div class="test1">
+<div class="fail">FAIL</div>
+<div style="clip:rect(auto auto auto auto);">
+ <div class="inherit">
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+<div class="test2">
+<div class="inherit">
+ <div class="pass">PASS</div>
+</div>
+<div style="clip:rect(0 0 0 0);">
+ <div class="inherit">
+ <div class="fail">FAIL</div>
+ </div>
+</div>
+</div>
+
+<div class="test3">
+<div class="inherit">
+ <div class="fail">FAIL</div>
+</div>
+<div style="clip:rect(0,200px,200px,0);">
+ <div class="inherit">
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+<div class="test4">
+<div class="inherit">
+ <div class="pass">PASS</div>
+</div>
+<div class="test4c" style="clip:rect(auto auto auto auto);">
+ <div class="inherit">
+ <div class="fail">FAIL</div>
+ </div>
+</div>
+</div>
+
+<div class="test5">
+<div class="inherit">
+ <div class="fail">FAIL</div>
+</div>
+<div class="test5c" style="clip:auto;">
+ <div class="inherit">
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+<div class="test6">
+<div class="inherit">
+ <div class="fail">FAIL</div>
+</div>
+<div class="test6c" style="">
+ <div class="inherit">
+ <div class="pass">PASS</div>
+ </div>
+</div>
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372553-1-ref.html b/layout/reftests/bugs/372553-1-ref.html
new file mode 100644
index 0000000000..3ca9eea8a1
--- /dev/null
+++ b/layout/reftests/bugs/372553-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<style>
+
+body {
+ width: 5em;
+ font-family: monospace;
+ border: 1px solid yellow;
+}
+
+body:first-letter {
+ color: blue;
+}
+
+</style>
+
+</head>
+<body>
+
+<span><span></span>Bbbbbbbbbbbbbb<span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372553-1.html b/layout/reftests/bugs/372553-1.html
new file mode 100644
index 0000000000..7b6ed2cecf
--- /dev/null
+++ b/layout/reftests/bugs/372553-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<style>
+
+body {
+ width: 5em;
+ font-family: monospace;
+ border: 1px solid yellow;
+}
+
+body:first-letter {
+ color: blue;
+}
+
+</style>
+
+</head>
+<body>
+
+<span><span><span id="sss">Aaa </span></span>Bbbbbbbbbbbbbb<span></span></span>
+
+<script>
+document.body.offsetWidth;
+sss = document.getElementById("sss");
+sss.remove();
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372632-1-ref.html b/layout/reftests/bugs/372632-1-ref.html
new file mode 100644
index 0000000000..f1f1cef651
--- /dev/null
+++ b/layout/reftests/bugs/372632-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+
+</head>
+
+<body>
+
+<h3 id="h3">Header</h3>
+
+<div>Div</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/372632-1.html b/layout/reftests/bugs/372632-1.html
new file mode 100644
index 0000000000..2595d98a6f
--- /dev/null
+++ b/layout/reftests/bugs/372632-1.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+
+</head>
+
+<body>
+
+<h3 id="h3"></h3>
+
+<div>Div</div>
+
+<script>
+document.documentElement.offsetHeight;
+n = document.getElementById("h3");
+n.appendChild(document.createTextNode("Header"));
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/372768-1-ref.html b/layout/reftests/bugs/372768-1-ref.html
new file mode 100644
index 0000000000..390566234c
--- /dev/null
+++ b/layout/reftests/bugs/372768-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200" id="td" nowrap="nowrap">
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/372768-1.html b/layout/reftests/bugs/372768-1.html
new file mode 100644
index 0000000000..2f1d20d9de
--- /dev/null
+++ b/layout/reftests/bugs/372768-1.html
@@ -0,0 +1,14 @@
+<html>
+<body>
+<table width="100" border="4">
+ <tr>
+ <td width="200" id="td">
+ </td>
+ </tr>
+</table>
+<script>
+document.body.offsetWidth;
+document.getElementById("td").setAttribute("nowrap", "nowrap");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/373295-1-ref.html b/layout/reftests/bugs/373295-1-ref.html
new file mode 100644
index 0000000000..430741d30a
--- /dev/null
+++ b/layout/reftests/bugs/373295-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table border="1" width="1"><tr><td id="td">abc defghi</td></tr></table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/373295-1.html b/layout/reftests/bugs/373295-1.html
new file mode 100644
index 0000000000..9863503ab4
--- /dev/null
+++ b/layout/reftests/bugs/373295-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table border="1" width="1"><tr><td id="td">abc def</td></tr></table>
+
+<script>
+document.body.offsetWidth;
+document.getElementById("td").appendChild(document.createTextNode("ghi"));
+</script>
+
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/373298-1-ref.html b/layout/reftests/bugs/373298-1-ref.html
new file mode 100644
index 0000000000..cd2a8287b9
--- /dev/null
+++ b/layout/reftests/bugs/373298-1-ref.html
@@ -0,0 +1,3 @@
+<html>
+<body> <p>Foo</p></body>
+</html>
diff --git a/layout/reftests/bugs/373298-1.html b/layout/reftests/bugs/373298-1.html
new file mode 100644
index 0000000000..59a2d0bfba
--- /dev/null
+++ b/layout/reftests/bugs/373298-1.html
@@ -0,0 +1,7 @@
+<html>
+<body>XXX<p>Foo</p></body>
+<script>
+document.body.offsetWidth;
+document.body.firstChild.data = ' ';
+</script>
+</html>
diff --git a/layout/reftests/bugs/373381-1-ref.html b/layout/reftests/bugs/373381-1-ref.html
new file mode 100644
index 0000000000..37ea5077ce
--- /dev/null
+++ b/layout/reftests/bugs/373381-1-ref.html
@@ -0,0 +1,3 @@
+<input type="radio">
+<input type="radio">
+<input type="radio">
diff --git a/layout/reftests/bugs/373381-1.html b/layout/reftests/bugs/373381-1.html
new file mode 100644
index 0000000000..597de6d1f0
--- /dev/null
+++ b/layout/reftests/bugs/373381-1.html
@@ -0,0 +1,3 @@
+<input type="radio" style="width: auto">
+<input type="radio" style="height: auto">
+<input type="radio" style="height: auto; width: auto">
diff --git a/layout/reftests/bugs/373381-2-ref.html b/layout/reftests/bugs/373381-2-ref.html
new file mode 100644
index 0000000000..d3051d4697
--- /dev/null
+++ b/layout/reftests/bugs/373381-2-ref.html
@@ -0,0 +1,3 @@
+<input type="radio" style="-moz-appearance:none">
+<input type="radio" style="-moz-appearance:none">
+<input type="radio" style="-moz-appearance:none">
diff --git a/layout/reftests/bugs/373381-2.html b/layout/reftests/bugs/373381-2.html
new file mode 100644
index 0000000000..356578ae50
--- /dev/null
+++ b/layout/reftests/bugs/373381-2.html
@@ -0,0 +1,3 @@
+<input type="radio" style="width: auto; -moz-appearance: none">
+<input type="radio" style="height: auto; -moz-appearance: none">
+<input type="radio" style="height: auto; width: auto; -moz-appearance: none">
diff --git a/layout/reftests/bugs/373381-3-ref.html b/layout/reftests/bugs/373381-3-ref.html
new file mode 100644
index 0000000000..a844c81b51
--- /dev/null
+++ b/layout/reftests/bugs/373381-3-ref.html
@@ -0,0 +1,3 @@
+<input type="checkbox">
+<input type="checkbox">
+<input type="checkbox">
diff --git a/layout/reftests/bugs/373381-3.html b/layout/reftests/bugs/373381-3.html
new file mode 100644
index 0000000000..0f8326b2db
--- /dev/null
+++ b/layout/reftests/bugs/373381-3.html
@@ -0,0 +1,3 @@
+<input type="checkbox" style="width: auto">
+<input type="checkbox" style="height: auto">
+<input type="checkbox" style="height: auto; width: auto">
diff --git a/layout/reftests/bugs/373381-4-ref.html b/layout/reftests/bugs/373381-4-ref.html
new file mode 100644
index 0000000000..1fee977b80
--- /dev/null
+++ b/layout/reftests/bugs/373381-4-ref.html
@@ -0,0 +1,3 @@
+<input type="checkbox" style="-moz-appearance:none">
+<input type="checkbox" style="-moz-appearance:none">
+<input type="checkbox" style="-moz-appearance:none">
diff --git a/layout/reftests/bugs/373381-4.html b/layout/reftests/bugs/373381-4.html
new file mode 100644
index 0000000000..20a84245fb
--- /dev/null
+++ b/layout/reftests/bugs/373381-4.html
@@ -0,0 +1,3 @@
+<input type="checkbox" style="width: auto; -moz-appearance: none">
+<input type="checkbox" style="height: auto; -moz-appearance: none">
+<input type="checkbox" style="height: auto; width: auto; -moz-appearance: none">
diff --git a/layout/reftests/bugs/373383-1-ref.html b/layout/reftests/bugs/373383-1-ref.html
new file mode 100644
index 0000000000..43e778f44d
--- /dev/null
+++ b/layout/reftests/bugs/373383-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ #a { width: 15em; border: 1px solid black; }
+ #b { float: right; width: 8em; height: 3em; background: #ccc; }
+ </style>
+</head>
+<body>
+ <div id="a">
+ <div id="b">float right</div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ <div>Long text long text long text long text long text long text long text long text long text long text long text long text long text</div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/373383-1.html b/layout/reftests/bugs/373383-1.html
new file mode 100644
index 0000000000..62ccd58ddc
--- /dev/null
+++ b/layout/reftests/bugs/373383-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ #a { width: 15em; border: 1px solid black; }
+ #b { float: right; width: 8em; height: 3em; background: #ccc; }
+ </style>
+</head>
+<body>
+ <div id="a">
+ <div id="b">float right</div>
+ <div>Long text long text long text long text long text long text long text long text long text long text long text long text long text</div>
+ </div>
+
+ <script>
+ var longWord = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+
+ document.body.offsetWidth;
+ n = document.getElementById("b").nextSibling;
+ n.data = longWord + n.data;
+
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/373433-1-ref.html b/layout/reftests/bugs/373433-1-ref.html
new file mode 100644
index 0000000000..8ef9177249
--- /dev/null
+++ b/layout/reftests/bugs/373433-1-ref.html
@@ -0,0 +1,5 @@
+<div style="position:relative; width:300px; height: 300px;">test
+<script>
+</script>
+<div style="position:absolute; right:0;">
+<input style="width: 200px" value="testtesttesttesttesttesttesttest"> \ No newline at end of file
diff --git a/layout/reftests/bugs/373433-1.html b/layout/reftests/bugs/373433-1.html
new file mode 100644
index 0000000000..781c90d767
--- /dev/null
+++ b/layout/reftests/bugs/373433-1.html
@@ -0,0 +1,6 @@
+<div style="position:relative; width:300px; height: 300px;">test
+<script>
+document.body.offsetHeight;
+</script>
+<div style="position:absolute; right:0;">
+<input style="width: 200px" value="testtesttesttesttesttesttesttest"> \ No newline at end of file
diff --git a/layout/reftests/bugs/374038-1-ref.xhtml b/layout/reftests/bugs/374038-1-ref.xhtml
new file mode 100644
index 0000000000..99f8007f5a
--- /dev/null
+++ b/layout/reftests/bugs/374038-1-ref.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box>
+ <html:canvas width="300" height="300" style="background-color:lime; width: 300px; height: 300px"/>
+ </box>
+</window>
diff --git a/layout/reftests/bugs/374038-1.xhtml b/layout/reftests/bugs/374038-1.xhtml
new file mode 100644
index 0000000000..96bbd89e84
--- /dev/null
+++ b/layout/reftests/bugs/374038-1.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box>
+ <html:canvas width="300" height="300" style="background-color:lime;"/>
+ </box>
+</window>
diff --git a/layout/reftests/bugs/374038-2-ref.xhtml b/layout/reftests/bugs/374038-2-ref.xhtml
new file mode 100644
index 0000000000..595ceca9b1
--- /dev/null
+++ b/layout/reftests/bugs/374038-2-ref.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box>
+ <html:img width="600" height="58" src="mozilla-banner.gif"/>
+ </box>
+</window>
diff --git a/layout/reftests/bugs/374038-2.xhtml b/layout/reftests/bugs/374038-2.xhtml
new file mode 100644
index 0000000000..d79ac13113
--- /dev/null
+++ b/layout/reftests/bugs/374038-2.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box>
+ <html:img src="mozilla-banner.gif"/>
+ </box>
+</window>
diff --git a/layout/reftests/bugs/374927-1-ref.html b/layout/reftests/bugs/374927-1-ref.html
new file mode 100644
index 0000000000..15752c40bd
--- /dev/null
+++ b/layout/reftests/bugs/374927-1-ref.html
@@ -0,0 +1,26 @@
+<html>
+<body>
+The words "One Two Three" should appear down the right side of this page.
+<table>
+ <tr>
+ <td width="100%"/>
+ <td>One</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td width="100%"/>
+ <td>Two</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td width="100%"/>
+ <td>Three</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/374927-1.html b/layout/reftests/bugs/374927-1.html
new file mode 100644
index 0000000000..a9691e53d4
--- /dev/null
+++ b/layout/reftests/bugs/374927-1.html
@@ -0,0 +1,29 @@
+<html>
+<body>
+The words "One Two Three" should appear down the right side of this page.
+<table>
+ <tr>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td>One</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td>Two</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td><table style="table-layout: fixed;"></table></td>
+ <td>Three</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/375508-1-ref.html b/layout/reftests/bugs/375508-1-ref.html
new file mode 100644
index 0000000000..1ee9ea77c9
--- /dev/null
+++ b/layout/reftests/bugs/375508-1-ref.html
@@ -0,0 +1,4 @@
+<style>
+html, body {margin:0; padding:5px}
+</style>
+<div style="outline: 10px solid black; outline-offset: 0; width: 5px; height:5px"></div> \ No newline at end of file
diff --git a/layout/reftests/bugs/375508-1.html b/layout/reftests/bugs/375508-1.html
new file mode 100644
index 0000000000..aee62417b5
--- /dev/null
+++ b/layout/reftests/bugs/375508-1.html
@@ -0,0 +1,4 @@
+<style>
+html, body {margin:0; padding:0}
+</style>
+<div style="outline: 10px solid black; outline-offset: -10px; width: 25px; height:25px"></div> \ No newline at end of file
diff --git a/layout/reftests/bugs/375716-1-ref.html b/layout/reftests/bugs/375716-1-ref.html
new file mode 100644
index 0000000000..4128dea4b7
--- /dev/null
+++ b/layout/reftests/bugs/375716-1-ref.html
@@ -0,0 +1,18 @@
+<html><head>
+<title>Bug 375716 - Incremental reflow bug with direction: rtl and bidi-override</title>
+<style>
+
+div {
+border: 1px solid black;
+width:200px;
+}
+</style>
+</head><body>
+<div>
+<i style="direction: rtl;">
+text text text text
+<b>&#8238;text text text text text&#8236;</b>
+text
+</i>
+</div>
+</body></html>
diff --git a/layout/reftests/bugs/375716-1.html b/layout/reftests/bugs/375716-1.html
new file mode 100644
index 0000000000..403c28bda5
--- /dev/null
+++ b/layout/reftests/bugs/375716-1.html
@@ -0,0 +1,25 @@
+<html class="reftest-wait"><head>
+<title>Bug 375716 - Incremental reflow bug with direction: rtl and bidi-override</title>
+<style>
+
+div {
+border: 1px solid black;
+width:200px;
+}
+</style>
+<script>
+function boom() {
+ var div = document.getElementById('div');
+ div.removeAttribute('style')
+ document.documentElement.removeAttribute("class");
+}
+</script>
+</head><body onload="boom()">
+<div id="div" style="font-size:120%">
+<i style="direction: rtl;">
+text text text text
+<b style="unicode-bidi: bidi-override;">text text text text text</b>
+text
+</i>
+</div>
+</body></html>
diff --git a/layout/reftests/bugs/375827-1-ref.html b/layout/reftests/bugs/375827-1-ref.html
new file mode 100644
index 0000000000..c6ad3e44b6
--- /dev/null
+++ b/layout/reftests/bugs/375827-1-ref.html
@@ -0,0 +1,9 @@
+<html><head>
+<title>Bug 375827 - Text gets split when it should stay on one line in this case</title>
+</head>
+<body>
+
+<table style="font-size: 14px; border: 1px solid black; width: 1px;"><tbody><tr><td>
+text text<script></script>text
+</td></tr></tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/375827-1.html b/layout/reftests/bugs/375827-1.html
new file mode 100644
index 0000000000..9455b46f2b
--- /dev/null
+++ b/layout/reftests/bugs/375827-1.html
@@ -0,0 +1,9 @@
+<html><head>
+<title>Bug 375827 - Text gets split when it should stay on one line in this case</title>
+</head>
+<body>
+
+<table style="font-size: 14px; border: 1px solid black; width: 1px;"><tbody><tr><td>
+text text<script>document.body.offsetHeight;</script>text
+</td></tr></tbody></table>
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/376375-1-ref.html b/layout/reftests/bugs/376375-1-ref.html
new file mode 100644
index 0000000000..69dad70050
--- /dev/null
+++ b/layout/reftests/bugs/376375-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<body><div style="position:absolute; z-index:1; left:370px;top:370px;width:40px;height:40px; background:black;"></div>
+<div style="width:500px; height:500px;
+ overflow:scroll; outline:1px dotted black;
+ position:absolute; left:-100px; top:-100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/376375-1.html b/layout/reftests/bugs/376375-1.html
new file mode 100644
index 0000000000..03ec89da3c
--- /dev/null
+++ b/layout/reftests/bugs/376375-1.html
@@ -0,0 +1,7 @@
+<html>
+<body><div style="position:absolute; z-index:1; left:370px;top:370px;width:40px;height:40px; background:black;"></div>
+<div style="width:500px; height:500px; opacity:0.99999;
+ overflow:scroll; outline:1px dotted black;
+ position:absolute; left:-100px; top:-100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/376484-1-ref.html b/layout/reftests/bugs/376484-1-ref.html
new file mode 100644
index 0000000000..2cded6bc48
--- /dev/null
+++ b/layout/reftests/bugs/376484-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p style="color: green">This is text</p>
+<p>This is more text</p> <!-- javascript: in link href shouldn't run now -->
+<p style="color: green">This is yet more text</p>
+<p>This is even more text</p> <!-- javascript: in @import shouldn't run now -->
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/376484-1.html b/layout/reftests/bugs/376484-1.html
new file mode 100644
index 0000000000..3f3ced3c4b
--- /dev/null
+++ b/layout/reftests/bugs/376484-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" type="text/css"
+ href="data:text/css, .g1 { color: green }">
+<link rel="stylesheet" type="text/css"
+ href="javascript:' .g2 { color: green }'">
+<style type="text/css">
+ @import url("data:text/css, .g3 { color: green }");
+ @import url("javascript:' .g4 { color: green }'");
+</style>
+</head>
+<body>
+<p class="g1">This is text</p>
+<p class="g2">This is more text</p>
+<p class="g3">This is yet more text</p>
+<p class="g4">This is even more text</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/376532-1-ref.html b/layout/reftests/bugs/376532-1-ref.html
new file mode 100644
index 0000000000..a33760880e
--- /dev/null
+++ b/layout/reftests/bugs/376532-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 1 uses a narrow paragraph with overflow-x: hidden so that if two
+ missing glyph boxes are displayed only one will be visible
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+}
+ </style>
+ <body>
+ <p>&#xddb0d;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/376532-1.html b/layout/reftests/bugs/376532-1.html
new file mode 100644
index 0000000000..107e3f0fc2
--- /dev/null
+++ b/layout/reftests/bugs/376532-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 1 uses a narrow paragraph with overflow-x: hidden so that if two
+ missing glyph boxes are displayed only one will be visible
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+ width: 24pt;
+ overflow-x: hidden;
+}
+ </style>
+ <body>
+ <p>&#xddb0d;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/376532-2-ref.html b/layout/reftests/bugs/376532-2-ref.html
new file mode 100644
index 0000000000..67b769b325
--- /dev/null
+++ b/layout/reftests/bugs/376532-2-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 2 is a non-equality test to catch the case where a single missing
+ glyph box is shown with the high surrogate code point. The test page
+ contains U+0DDBAD (DB36 DF0D) and the reference page U+0DDB0D (DB36 DFAD)
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+}
+ </style>
+ <body>
+ <p>&#x0ddb0d;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/376532-2.html b/layout/reftests/bugs/376532-2.html
new file mode 100644
index 0000000000..f07347b95b
--- /dev/null
+++ b/layout/reftests/bugs/376532-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 2 is a non-equality test to catch the case where a single missing
+ glyph box is shown with the high surrogate code point. The test page
+ contains U+0DDBAD (DB36 DF0D) and the reference page U+0DDB0D (DB36 DFAD)
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+}
+ </style>
+ <body>
+ <p>&#x0ddbad;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/376532-3-ref.html b/layout/reftests/bugs/376532-3-ref.html
new file mode 100644
index 0000000000..5898fb8da3
--- /dev/null
+++ b/layout/reftests/bugs/376532-3-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 3 is a non-equality test to catch the case where a single missing
+ glyph box is shown with the low surrogate code point. The test page
+ contains U+BF2AD (DABC DEAD) and the reference page U+CFEAD (DAFF DEAD)
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+}
+ </style>
+ <body>
+ <p>&#xcfead;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/376532-3.html b/layout/reftests/bugs/376532-3.html
new file mode 100644
index 0000000000..a46e7dd894
--- /dev/null
+++ b/layout/reftests/bugs/376532-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 376532: should show single missing glyph box for non-BMP
+ characters (not surrogates)
+ Test 3 is a non-equality test to catch the case where a single missing
+ glyph box is shown with the low surrogate code point. The test page
+ contains U+BF2AD (DABC DEAD) and the reference page U+CFEAD (DAFF DEAD)
+-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ </head>
+ <style type="text/css">
+p {
+ font-size: 36pt;
+}
+ </style>
+ <body>
+ <p>&#xbf2ad;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/377603-1-ref.html b/layout/reftests/bugs/377603-1-ref.html
new file mode 100644
index 0000000000..a87cdb7891
--- /dev/null
+++ b/layout/reftests/bugs/377603-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <head>
+ <style>
+ table table
+ { border-collapse: collapse; border-style: solid; border-width: 10px;
+ border-color: green }
+ </style>
+ </head>
+</head>
+<body>
+<table><tr>
+ <td>
+ <table>
+ <tr><td></td></tr>
+ </table>
+ <table>
+ <tr><td></td></tr>
+ </table>
+ </td>
+</tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/377603-1.html b/layout/reftests/bugs/377603-1.html
new file mode 100644
index 0000000000..e45672e5eb
--- /dev/null
+++ b/layout/reftests/bugs/377603-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <head>
+ <style>
+ table table
+ { border-collapse: collapse; border-style: solid; border-width: 10px }
+ </style>
+ </head>
+</head>
+<body>
+<table><tr>
+ <td style="border: 0px solid green; color: red">
+ <table style="border-color: inherit">
+ <tr><td></td></tr>
+ </table>
+ <table id="test">
+ <tr><td></td></tr>
+ </table>
+ <script>
+ document.body.offsetWidth;
+ document.getElementById("test").style.borderColor = "inherit";
+ </script>
+ </td>
+</tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/377918-ref.html b/layout/reftests/bugs/377918-ref.html
new file mode 100644
index 0000000000..255619e9fc
--- /dev/null
+++ b/layout/reftests/bugs/377918-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <p></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/377918.html b/layout/reftests/bugs/377918.html
new file mode 100644
index 0000000000..4dcae2cc40
--- /dev/null
+++ b/layout/reftests/bugs/377918.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <p>&#9;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/378535-1-ref.html b/layout/reftests/bugs/378535-1-ref.html
new file mode 100644
index 0000000000..b1d25c26d1
--- /dev/null
+++ b/layout/reftests/bugs/378535-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ </head>
+ <body>
+ <div id="div1">PASS1</div>
+ <div id="div2">PASS2</div>
+ <div id="div3"></div>
+ <div id="div4">PASS4</div>
+ <div id="div5"></div>
+ <div id="div6">PASS6</div>
+ <div id="div7">PASS7</div>
+ <div id="div8">PASS8</div>
+ <div id="div9">PASS9</div>
+ <div id="div10">PASS10</div>
+ <div id="div11"></div>
+ <div id="div12">PASS12</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/378535-1.html b/layout/reftests/bugs/378535-1.html
new file mode 100644
index 0000000000..b56f9df832
--- /dev/null
+++ b/layout/reftests/bugs/378535-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style type="text/css">
+ #div1:before { content: "PASS1"; }
+ #div2:before { content: "FAIL2"; content: "PASS2" }
+ #div3:before { content: "FAIL3"; content: normal; }
+ #div4:before { content: normal; content: "PASS4"; }
+ #div5:before { content: "FAIL5"; content: none; }
+ #div6:before { content: "PASS6"; content: none none; }
+ #div7:before { content: "PASS7"; content: normal none; }
+ #div8:before { content: "PASS8"; content: none normal; }
+ #div9:before { content: "PASS9"; content: "FAIL8" none; }
+ #div10:before { content: "PASS10"; content: no-open-quote none; }
+ #div11:before { content: "FAIL11"; content: no-open-quote no-close-quote; }
+ #div12:before { content: "PASS12"; content: none "FAIL12"; }
+
+ </style>
+ </head>
+ <body>
+ <div id="div1"></div>
+ <div id="div2"></div>
+ <div id="div3"></div>
+ <div id="div4"></div>
+ <div id="div5"></div>
+ <div id="div6"></div>
+ <div id="div7"></div>
+ <div id="div8"></div>
+ <div id="div9"></div>
+ <div id="div10"></div>
+ <div id="div11"></div>
+ <div id="div12"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/378933-1-ref.html b/layout/reftests/bugs/378933-1-ref.html
new file mode 100644
index 0000000000..217f4b66e6
--- /dev/null
+++ b/layout/reftests/bugs/378933-1-ref.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+td { border: thin solid; }
+td.noborder{border: thin none;}
+</style>
+</head>
+<body>
+
+
+<table style="width: 95%; height: 95%; border-collapse: collapse;">
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+<td class="noborder">&nbsp;</td>
+
+</tr>
+</table>
+
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/378933-1.html b/layout/reftests/bugs/378933-1.html
new file mode 100644
index 0000000000..33702a1bc5
--- /dev/null
+++ b/layout/reftests/bugs/378933-1.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+td { border: thin solid; }
+
+
+</style>
+</head>
+<body>
+
+
+<table style="width: 95%; height: 95%; border-collapse: collapse;">
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+</tr>
+</table>
+
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/378935-1-ref.html b/layout/reftests/bugs/378935-1-ref.html
new file mode 100644
index 0000000000..69bd5ca70c
--- /dev/null
+++ b/layout/reftests/bugs/378935-1-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+col { border: thin solid; }
+
+</style>
+</head>
+<body>
+
+
+<table style="width: 95%; height: 95%; border-collapse: collapse;">
+<col></col>
+<col></col>
+<col></col>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/378935-1.html b/layout/reftests/bugs/378935-1.html
new file mode 100644
index 0000000000..41dfd81873
--- /dev/null
+++ b/layout/reftests/bugs/378935-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+col { border: thin solid; }
+
+</style>
+</head>
+<body>
+
+
+<table style="width: 95%; height: 95%; border-collapse: collapse;">
+<col></col>
+<col></col>
+<col></col>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/378937-1-ref.html b/layout/reftests/bugs/378937-1-ref.html
new file mode 100644
index 0000000000..4e27d38149
--- /dev/null
+++ b/layout/reftests/bugs/378937-1-ref.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+col { border: thin solid; }
+
+</style>
+</head>
+<body>
+
+<table style="width: 50%; height: 50%; border-collapse: collapse;">
+<col></col>
+<col></col>
+<col></col>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/378937-1.html b/layout/reftests/bugs/378937-1.html
new file mode 100644
index 0000000000..77ef3e9b13
--- /dev/null
+++ b/layout/reftests/bugs/378937-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase, border-collapse invalidation/repaint bug</title>
+<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
+<!--
+Reduced from
+http://en.wikipedia.org/wiki/French_presidential_election%2C_2007
+-->
+<style type="text/css">
+
+html, body { height: 100%; }
+col { border: thin solid; }
+
+</style>
+</head>
+<body>
+
+<table style="width: 50%; height: 50%; border-collapse: collapse;">
+<col></col>
+<col></col>
+<col></col>
+<tr>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379178-html-ref.html b/layout/reftests/bugs/379178-html-ref.html
new file mode 100644
index 0000000000..0709bfe2f7
--- /dev/null
+++ b/layout/reftests/bugs/379178-html-ref.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+
+<title>HTML Test for Bug #379178</title>
+
+<style type="text/css">
+
+span
+{
+ background-color: #8f8;
+}
+
+</style>
+
+</head>
+<body>
+
+<p>
+ <span>a</span>
+ <span>b</span>
+ <span>c</span>
+</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379178-html.html b/layout/reftests/bugs/379178-html.html
new file mode 100644
index 0000000000..105646f482
--- /dev/null
+++ b/layout/reftests/bugs/379178-html.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+
+<title>HTML Test for Bug #379178</title>
+
+<style type="text/css">
+
+span
+{
+ background-color: white;
+}
+
+#element,
+.extra
+{
+ background-color: #8f8;
+}
+
+</style>
+
+</head>
+<body>
+
+<p>
+ <span style="background-color: #8f8;">a</span>
+ <span id="element">b</span>
+ <span class="extra">c</span>
+</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379178-svg-ref.svg b/layout/reftests/bugs/379178-svg-ref.svg
new file mode 100644
index 0000000000..e1ca9189b3
--- /dev/null
+++ b/layout/reftests/bugs/379178-svg-ref.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" ?>
+<svg
+ width="300" height="100"
+ xmlns="http://www.w3.org/2000/svg">
+
+<style type="text/css">
+
+rect
+{
+ fill: #8f8;
+}
+
+</style>
+
+<rect x="0" y="0" width="100" height="100" />
+
+<rect x="100" y="0" width="100" height="100" />
+
+<rect x="200" y="0" width="100" height="100" />
+
+</svg>
diff --git a/layout/reftests/bugs/379178-svg.svg b/layout/reftests/bugs/379178-svg.svg
new file mode 100644
index 0000000000..d79361fed5
--- /dev/null
+++ b/layout/reftests/bugs/379178-svg.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" ?>
+<svg
+ width="300" height="100"
+ xmlns="http://www.w3.org/2000/svg">
+
+<style type="text/css">
+
+#element,
+.extra
+{
+ fill: #8f8;
+}
+
+</style>
+
+<rect x="0" y="0" width="100" height="100" style="fill: #8f8;" />
+
+<rect x="100" y="0" width="100" height="100" id="element" />
+
+<rect x="200" y="0" width="100" height="100" class="extra" />
+
+</svg>
diff --git a/layout/reftests/bugs/379178-xhtml-ref.xhtml b/layout/reftests/bugs/379178-xhtml-ref.xhtml
new file mode 100644
index 0000000000..09cf50c572
--- /dev/null
+++ b/layout/reftests/bugs/379178-xhtml-ref.xhtml
@@ -0,0 +1,26 @@
+<?xml version="1.0" ?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+<title>XHTML Test for Bug #379178</title>
+
+<style type="text/css">
+
+span
+{
+ background-color: #8f8;
+}
+
+</style>
+
+</head>
+<body>
+
+<p>
+ <span>a</span>
+ <span>b</span>
+ <span>c</span>
+</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379178-xhtml.xhtml b/layout/reftests/bugs/379178-xhtml.xhtml
new file mode 100644
index 0000000000..6e2fd52cc8
--- /dev/null
+++ b/layout/reftests/bugs/379178-xhtml.xhtml
@@ -0,0 +1,32 @@
+<?xml version="1.0" ?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+<title>XHTML Test for Bug #379178</title>
+
+<style type="text/css">
+
+span
+{
+ background-color: white;
+}
+
+#element,
+.extra
+{
+ background-color: #8f8;
+}
+
+</style>
+
+</head>
+<body>
+
+<p>
+ <span style="background-color: #8f8;">a</span>
+ <span id="element">b</span>
+ <span class="extra">c</span>
+</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379316-1-ref.html b/layout/reftests/bugs/379316-1-ref.html
new file mode 100644
index 0000000000..08f265b147
--- /dev/null
+++ b/layout/reftests/bugs/379316-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body style="color: black; background: white;">
+ <div style="opacity: 0">Test 1</div>
+ <div style="opacity: 0">Test 2</div>
+ <div style="opacity: 0">Test 3</div>
+ <div style="opacity: 0">Test 4</div>
+ <div style="opacity: 1">Test 5</div>
+ <div style="opacity: 1">Test 6</div>
+ <div style="opacity: 1">Test 7</div>
+ <div style="opacity: 1">Test 8</div>
+
+ <div style="opacity: 0">Test 9</div>
+ <div style="opacity: 0">Test 10</div>
+ <div style="opacity: 0">Test 11</div>
+ <div style="opacity: 0">Test 12</div>
+
+ <div style="opacity: 1">Test 13</div>
+ <div style="opacity: 1">Test 14</div>
+ <div style="opacity: 1">Test 15</div>
+ <div style="opacity: 1">Test 16</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379316-1.html b/layout/reftests/bugs/379316-1.html
new file mode 100644
index 0000000000..2fe613759b
--- /dev/null
+++ b/layout/reftests/bugs/379316-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body style="color: black; background: white">
+ <div style="opacity: 0">Test 1</div>
+ <div style="opacity: -1">Test 2</div>
+ <div style="opacity: -0.5">Test 3</div>
+ <div style="opacity: -6.7">Test 4</div>
+ <div style="opacity: 1">Test 5</div>
+ <div style="opacity: 1.5">Test 6</div>
+ <div style="opacity: 2">Test 7</div>
+ <div style="opacity: 7.3">Test 8</div>
+
+ <div style="color: rgba(0, 0, 0, 0)">Test 9</div>
+ <div style="color: rgba(0, 0, 0, -1)">Test 10</div>
+ <div style="color: rgba(0, 0, 0, -0.5)">Test 11</div>
+ <div style="color: rgba(0, 0, 0, -6.7)">Test 12</div>
+
+ <div style="color: rgba(0, 0, 0, 1)">Test 13</div>
+ <div style="color: rgba(0, 0, 0, 1.5)">Test 14</div>
+ <div style="color: rgba(0, 0, 0, 2)">Test 15</div>
+ <div style="color: rgba(0, 0, 0, 7.3)">Test 16</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379316-2-ref.html b/layout/reftests/bugs/379316-2-ref.html
new file mode 100644
index 0000000000..43e7289619
--- /dev/null
+++ b/layout/reftests/bugs/379316-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body style="color: black; background: white; opacity:0.9;">
+ <div style="opacity: 0.5">Test 17</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379316-2.html b/layout/reftests/bugs/379316-2.html
new file mode 100644
index 0000000000..99e70c6f5a
--- /dev/null
+++ b/layout/reftests/bugs/379316-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body style="color: black; background: white; opacity:0.9;">
+ <div style="color: rgba(0, 0, 0, 0.5)">Test 17</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379328-1-ref.html b/layout/reftests/bugs/379328-1-ref.html
new file mode 100644
index 0000000000..c578b2cfa7
--- /dev/null
+++ b/layout/reftests/bugs/379328-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style> div { width: 10px; height: 10px; margin: 1em; } </style>
+</head>
+<body style="background: white; color: black;">
+<div style="outline: 1px dotted black;"></div>
+<div style="color: blue; outline: 1px solid blue;"></div>
+<div style="color: rgba(0,255,0,0.5); outline: 1px dashed rgba(0,255,0,0.5);"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379328-1.html b/layout/reftests/bugs/379328-1.html
new file mode 100644
index 0000000000..2c11f0f65e
--- /dev/null
+++ b/layout/reftests/bugs/379328-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style> div { width: 10px; height: 10px; margin: 1em; } </style>
+</head>
+<body style="background: white; color: black;">
+<div style="outline: 1px dotted;"></div>
+<div style="color: blue; outline: 1px solid;"></div>
+<div style="color: rgba(0,255,0,0.5); outline: 1px dashed;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/379349-1-ref.xhtml b/layout/reftests/bugs/379349-1-ref.xhtml
new file mode 100644
index 0000000000..ce602ab32a
--- /dev/null
+++ b/layout/reftests/bugs/379349-1-ref.xhtml
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Basic)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <style type="text/css">
+ #overflow {
+ height: 5in;
+ border: 2pt silver solid;
+ border-top: none;
+ border-bottom: solid 10px blue;
+ }
+ #following {
+ position: absolute;
+ top: 0; left: 0;
+ margin: 0;
+ box-sizing: border-box;
+ width: 100pt;
+ height: 72pt;
+ background: white;
+ border: 2pt black;
+ border-style: none solid;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: blue;
+ }
+ body {
+ height: 2in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ position: relative;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <div id="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be in the first column.
+ There must be no red. There must be a blue
+ horizontal line in middle of the third
+ column.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-1a.xhtml b/layout/reftests/bugs/379349-1a.xhtml
new file mode 100644
index 0000000000..09075e942e
--- /dev/null
+++ b/layout/reftests/bugs/379349-1a.xhtml
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Basic)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <style type="text/css">
+ #container {
+ height: 72pt;
+ background: red;
+ }
+ #overflow {
+ height: 5in;
+ border: 2pt silver solid;
+ border-top: none;
+ border-bottom: solid 10px blue;
+ }
+ #following {
+ margin: -72pt 0;
+ height: 72pt;
+ background: white;
+ border: 2pt black;
+ border-style: none solid;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: blue;
+ }
+ body {
+ height: 2in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <div id="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be in the first column.
+ There must be no red. There must be a blue
+ horizontal line in middle of the third
+ column.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-1b.xhtml b/layout/reftests/bugs/379349-1b.xhtml
new file mode 100644
index 0000000000..15b873c45e
--- /dev/null
+++ b/layout/reftests/bugs/379349-1b.xhtml
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Multiple)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ .container {
+ height: 24pt;
+ background: red;
+ }
+ .overflow {
+ height: 5in;
+ border: 2pt silver solid;
+ border-top: none;
+ border-bottom: solid 10px red;
+ }
+ #following {
+ margin: -72pt 0;
+ height: 72pt;
+ background: white;
+ border: 2pt black;
+ border-style: none solid;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: blue;
+ }
+ .no2 .overflow {
+ height: 4.66667in;
+ }
+ .no3 .overflow {
+ height: 4.33333in;
+ border-bottom-color: blue;
+ }
+ body {
+ height: 2in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be in the first column.
+ There must be no red. There must be a blue
+ horizontal line in middle of the third
+ column.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-1c.xhtml b/layout/reftests/bugs/379349-1c.xhtml
new file mode 100644
index 0000000000..90da20174f
--- /dev/null
+++ b/layout/reftests/bugs/379349-1c.xhtml
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Multiple)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ .container {
+ height: 24pt;
+ background: red;
+ }
+ .overflow {
+ height: 5in;
+ border: 2pt silver solid;
+ border-top: none;
+ border-bottom: solid 10px red;
+ }
+ #following {
+ margin: -72pt 0;
+ height: 72pt;
+ background: white;
+ border: 2pt black;
+ border-style: none solid;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: blue;
+ }
+ .no2 .overflow {
+ height: 4.66667in;
+ border-bottom-color: blue;
+ }
+ .no3 .overflow {
+ height: 4.33333in;
+ position: relative;
+ z-index: -1;
+ }
+ body {
+ height: 2in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be in the first column.
+ There must be no red. There must be a blue
+ horizontal line in middle of the third
+ column.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-2-ref.xhtml b/layout/reftests/bugs/379349-2-ref.xhtml
new file mode 100644
index 0000000000..d17e21db7b
--- /dev/null
+++ b/layout/reftests/bugs/379349-2-ref.xhtml
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Interlaced [Simplified])</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ body, html {
+ margin: 0;
+ padding: 0;
+ }
+
+ .following {
+ margin: 0 0 .5in;
+ height: .5in;
+ background: white;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: navy;
+ }
+ .fno1 {
+ position: absolute;
+ top: 1.5in; left: 0;
+ width: 100pt;
+ border-top: 4px solid blue;
+ }
+ .fno2 {
+ position: absolute;
+ top: .5in; left: 100pt;
+ width: 100pt;
+ }
+ .overflow {
+ height: 4in;
+ width: 200pt;
+ border-bottom: 4px solid blue;
+ }
+ body {
+ height: 2.5in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ column-fill: auto;
+ border: solid gray;
+ position: relative;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="overflow">
+ </div>
+ <div class="following fno1">
+ This paragraph must be in the first column.
+ There must be no red on any page.
+ </div>
+ <p class="following fno2">
+ This paragraph must be in the second column.
+ There must be an unbroken blue line across
+ all three columns.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-2a.xhtml b/layout/reftests/bugs/379349-2a.xhtml
new file mode 100644
index 0000000000..e74fcc74dd
--- /dev/null
+++ b/layout/reftests/bugs/379349-2a.xhtml
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Interlaced [Simplified])</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ body, html {
+ margin: 0;
+ padding: 0;
+ }
+ .container {
+ height: .5in;
+ }
+ .overflow {
+ border-bottom: solid 4px red;
+ }
+ .following {
+ margin: 0 0 .5in;
+ height: .5in;
+ background: white;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: navy;
+ }
+ .fno1 {
+ margin: 0;
+ border-top: 4px solid blue;
+ }
+ .no1 .overflow {
+ height: 800%;
+ }
+ .no2 .overflow {
+ height: 1200%;
+ }
+ .no3 .overflow {
+ height: 600%;
+ border-bottom-color: blue;
+ }
+ .no4 .overflow {
+ height: 800%;
+ border-bottom-color: blue;
+ }
+ body {
+ height: 2.5in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ column-fill: auto;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="following">
+ <p class="fno1">
+ This paragraph must be in the first column.
+ There must be no red on any page.
+ </p>
+ </div>
+ <div class="container no4">
+ <div class="overflow">
+ </div>
+ </div>
+ <p class="following">
+ This paragraph must be in the second column.
+ There must be an unbroken blue line across
+ all three columns.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-2b.xhtml b/layout/reftests/bugs/379349-2b.xhtml
new file mode 100644
index 0000000000..31bfde89cb
--- /dev/null
+++ b/layout/reftests/bugs/379349-2b.xhtml
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS3 Multi-column Layout Test Suite: Overflow Pagination (Interlaced [Simplified])</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ body, html {
+ margin: 0;
+ padding: 0;
+ }
+ .container {
+ height: .5in;
+ }
+ .overflow {
+ border-bottom: solid 4px red;
+ }
+ .following {
+ margin: 0 0 .5in;
+ height: .5in;
+ background: white;
+
+ font-size: 10pt;
+ line-height: 10pt;
+ color: navy;
+ }
+ .fno1 {
+ margin: 0;
+ border-top: 4px solid blue;
+ }
+ .no1 .overflow {
+ height: 800%;
+ }
+ .no2 .overflow {
+ height: 1200%;
+ }
+ .no3 .overflow {
+ height: 600%;
+ border-bottom-color: blue;
+ }
+ .no4 .overflow {
+ height: 800%;
+ border-bottom-color: blue;
+ }
+ body {
+ height: 2.5in;
+ width: 300pt;
+ column-width: 100pt;
+ column-gap: 0;
+ column-fill: auto;
+ border: solid gray;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('tester1').style.height = '9in';
+ document.getElementById('tester1').offsetHeight;
+ document.getElementById('tester2').style.height = '29in';
+ document.getElementById('tester2').offsetHeight;
+ document.getElementById('tester1').style.height = '.5in';
+ document.getElementById('tester1').offsetHeight;
+ document.getElementById('tester2').style.height = '.5in';
+ document.documentElement.className = ''">
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="following" id="tester1">
+ <p class="fno1">
+ This paragraph must be in the first column.
+ There must be no red on any page.
+ </p>
+ </div>
+ <div class="container no4">
+ <div class="overflow">
+ </div>
+ </div>
+ <p class="following" id="tester2">
+ This paragraph must be in the second column.
+ There must be an unbroken blue line across
+ all three columns.
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-3-ref.xhtml b/layout/reftests/bugs/379349-3-ref.xhtml
new file mode 100644
index 0000000000..3793b9acb6
--- /dev/null
+++ b/layout/reftests/bugs/379349-3-ref.xhtml
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+ <head>
+ <title>CSS 2.1 Test Suite: Overflow Pagination (Multiple)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ .overflow {
+ border: solid 2pt silver;
+ height: 25in;
+ border-bottom: 4pt solid black;
+ }
+ #following {
+ position: absolute;
+ top: 0; left: 0;
+ margin: 0;
+ height: 72pt;
+ border: 2pt black;
+ border-style: none solid;
+ background: white;
+ font-size: 10pt;
+ line-height: 10pt;
+ text-align: center;
+ color: blue;
+ }
+ body {
+ position: relative;
+ }
+ </style>
+ </head>
+ <body>
+ <p id="following">
+ This paragraph must be on the first page in paged media.
+ There must be no red on any page. There must be a blue line
+ on a page <em>after</em> the first (assuming the page area
+ is shorter than 25 inches).
+ </p>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-3a.xhtml b/layout/reftests/bugs/379349-3a.xhtml
new file mode 100644
index 0000000000..4aa5cc6c46
--- /dev/null
+++ b/layout/reftests/bugs/379349-3a.xhtml
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+ <head>
+ <title>CSS 2.1 Test Suite: Overflow Pagination (Multiple)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ .container {
+ height: 24pt;
+ /* background: red; See bug 380013 for why this is commented out */
+ }
+ .overflow {
+ border: solid 2pt silver;
+ height: 25in;
+ border-bottom: 4pt solid red;
+ }
+ #following {
+ margin: -1in 0;
+ height: 72pt;
+ border: 2pt black;
+ border-style: none solid;
+ background: white;
+ font-size: 10pt;
+ line-height: 10pt;
+ text-align: center;
+ color: blue;
+ }
+ .no2 .overflow {
+ height: 24.66667in;
+ }
+ .no3 .overflow {
+ height: 24.33333in;
+ border-bottom-color: blue;
+ }
+ .fill {
+ height: 75in;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be on the first page in paged media.
+ There must be no red on any page. There must be a blue line
+ on a page <em>after</em> the first (assuming the page area
+ is shorter than 25 inches).
+ </p>
+ <div class="fill">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379349-3b.xhtml b/layout/reftests/bugs/379349-3b.xhtml
new file mode 100644
index 0000000000..8265115b79
--- /dev/null
+++ b/layout/reftests/bugs/379349-3b.xhtml
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+ <head>
+ <title>CSS 2.1 Test Suite: Overflow Pagination (Multiple)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units"/>
+ <style type="text/css">
+ .container {
+ height: 24pt;
+ /* background: red; See bug 380013 for why this is commented out */
+ }
+ .overflow {
+ border: solid 2pt silver;
+ height: 25in;
+ border-bottom: 4pt solid red;
+ }
+ #following {
+ margin: -1in 0;
+ height: 72pt;
+ border: 2pt black;
+ border-style: none solid;
+ background: white;
+ font-size: 10pt;
+ line-height: 10pt;
+ text-align: center;
+ color: blue;
+ }
+ .no2 .overflow {
+ height: 24.66667in;
+ border-bottom-color: blue;
+ }
+ .no3 .overflow {
+ height: 24.33333in;
+ position: relative;
+ z-index: -1;
+ }
+ .fill {
+ height: 75in;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container no1">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no2">
+ <div class="overflow">
+ </div>
+ </div>
+ <div class="container no3">
+ <div class="overflow">
+ </div>
+ </div>
+ <p id="following">
+ This paragraph must be on the first page in paged media.
+ There must be no red on any page. There must be a blue line
+ on a page <em>after</em> the first (assuming the page area
+ is shorter than 25 inches).
+ </p>
+ <div class="fill">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/379361-1-ref.html b/layout/reftests/bugs/379361-1-ref.html
new file mode 100644
index 0000000000..5895710250
--- /dev/null
+++ b/layout/reftests/bugs/379361-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow">Cell A</td>
+ <td style="width: 300px; background: lightgreen">This text should be on one line</td>
+ </tr>
+
+ <tr>
+ <td style="width: 100px; background: lightblue" colspan="2">Cell B</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379361-1.html b/layout/reftests/bugs/379361-1.html
new file mode 100644
index 0000000000..12153c9b88
--- /dev/null
+++ b/layout/reftests/bugs/379361-1.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow">Cell A</td>
+ <td style="background: lightgreen">This text should be on one line</td>
+ </tr>
+
+ <tr>
+ <td style="width: 100px; background: lightblue" colspan="2">Cell B</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379361-2-ref.html b/layout/reftests/bugs/379361-2-ref.html
new file mode 100644
index 0000000000..f5ec5a0372
--- /dev/null
+++ b/layout/reftests/bugs/379361-2-ref.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 300px; background: lightgreen">This text should be on one line</td>
+ <td style="width: 200px; background: yellow">Cell A</td>
+ </tr>
+
+ <tr>
+ <td style="width: 100px; background: lightblue" colspan="2">Cell B</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379361-2.html b/layout/reftests/bugs/379361-2.html
new file mode 100644
index 0000000000..8d4e4f3427
--- /dev/null
+++ b/layout/reftests/bugs/379361-2.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="background: lightgreen">This text should be on one line</td>
+ <td style="width: 200px; background: yellow">Cell A</td>
+ </tr>
+
+ <tr>
+ <td style="width: 100px; background: lightblue" colspan="2">Cell B</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379361-3-ref.html b/layout/reftests/bugs/379361-3-ref.html
new file mode 100644
index 0000000000..4ad8b7079f
--- /dev/null
+++ b/layout/reftests/bugs/379361-3-ref.html
@@ -0,0 +1,123 @@
+<html>
+<body>
+
+<li>Tables have width 500px.
+<li>Yellow cells have width 200px.
+<li>Green cells are auto-width.
+<li>Blue cells have colspan = 2 and, in test case, have various specified widths.
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">10 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">50 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">100 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">384 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">385 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">390 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">500 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">600 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">900 px</td>
+ </tr>
+</table>
+<br/>
+
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="background: lightblue" colspan="2">1500 px</td>
+ </tr>
+</table>
+<br/>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379361-3.html b/layout/reftests/bugs/379361-3.html
new file mode 100644
index 0000000000..4fe566dc2e
--- /dev/null
+++ b/layout/reftests/bugs/379361-3.html
@@ -0,0 +1,123 @@
+<html>
+<body>
+
+<li>Tables have width 500px.
+<li>Yellow cells have width 200px.
+<li>Green cells are auto-width.
+<li>Blue cells have colspan = 2 and, in test case, have various specified widths.
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 10px; background: lightblue" colspan="2">10 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 50px; background: lightblue" colspan="2">50 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 100px; background: lightblue" colspan="2">100 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 384px; background: lightblue" colspan="2">384 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 385px; background: lightblue" colspan="2">385 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 390px; background: lightblue" colspan="2">390 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 500px; background: lightblue" colspan="2">500 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 600px; background: lightblue" colspan="2">600 px</td>
+ </tr>
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 900px; background: lightblue" colspan="2">900 px</td>
+ </tr>
+</table>
+<br/>
+
+</table>
+<br/>
+
+<table width="500px" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="width: 200px; background: yellow"></td>
+ <td style="background: lightgreen">Here are some words.</td>
+ </tr>
+ <tr>
+ <td style="width: 1500px; background: lightblue" colspan="2">1500 px</td>
+ </tr>
+</table>
+<br/>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-1.html b/layout/reftests/bugs/379461-1.html
new file mode 100644
index 0000000000..717f2396d3
--- /dev/null
+++ b/layout/reftests/bugs/379461-1.html
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+ <style type="text/css">
+ body { background: lime; color: black; }
+ </style>
+</head>
+<body>
+
+<p>The entire canvas should have a lime background.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-1.xhtml b/layout/reftests/bugs/379461-1.xhtml
new file mode 100644
index 0000000000..717f2396d3
--- /dev/null
+++ b/layout/reftests/bugs/379461-1.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+ <style type="text/css">
+ body { background: lime; color: black; }
+ </style>
+</head>
+<body>
+
+<p>The entire canvas should have a lime background.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-2.html b/layout/reftests/bugs/379461-2.html
new file mode 100644
index 0000000000..6da7c53aa6
--- /dev/null
+++ b/layout/reftests/bugs/379461-2.html
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+ <style type="text/css">
+ body { background: lime no-repeat top right url(repeatable-diagonal-gradient.png); color: black; }
+ </style>
+</head>
+<body>
+
+<p>The entire canvas should have a lime background with a 256x256 rainbow in the top right.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-2.xhtml b/layout/reftests/bugs/379461-2.xhtml
new file mode 100644
index 0000000000..6da7c53aa6
--- /dev/null
+++ b/layout/reftests/bugs/379461-2.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+ <style type="text/css">
+ body { background: lime no-repeat top right url(repeatable-diagonal-gradient.png); color: black; }
+ </style>
+</head>
+<body>
+
+<p>The entire canvas should have a lime background with a 256x256 rainbow in the top right.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-3-container-blank.html b/layout/reftests/bugs/379461-3-container-blank.html
new file mode 100644
index 0000000000..d1ddfcf855
--- /dev/null
+++ b/layout/reftests/bugs/379461-3-container-blank.html
@@ -0,0 +1 @@
+<iframe height="200" width="200" src="about:blank"></iframe>
diff --git a/layout/reftests/bugs/379461-3-container-html.html b/layout/reftests/bugs/379461-3-container-html.html
new file mode 100644
index 0000000000..5f5e67ef76
--- /dev/null
+++ b/layout/reftests/bugs/379461-3-container-html.html
@@ -0,0 +1 @@
+<iframe height="200" width="200" src="379461-3.html"></iframe>
diff --git a/layout/reftests/bugs/379461-3-container-xhtml.html b/layout/reftests/bugs/379461-3-container-xhtml.html
new file mode 100644
index 0000000000..4c528453aa
--- /dev/null
+++ b/layout/reftests/bugs/379461-3-container-xhtml.html
@@ -0,0 +1 @@
+<iframe height="200" width="200" src="379461-3.xhtml"></iframe>
diff --git a/layout/reftests/bugs/379461-3.html b/layout/reftests/bugs/379461-3.html
new file mode 100644
index 0000000000..d132136bd5
--- /dev/null
+++ b/layout/reftests/bugs/379461-3.html
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+</head>
+<body dir="rtl">
+
+<!-- cause the page to have a horizontal scrollbar -->
+<p style="width:300%">&#xA0;</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/379461-3.xhtml b/layout/reftests/bugs/379461-3.xhtml
new file mode 100644
index 0000000000..d132136bd5
--- /dev/null
+++ b/layout/reftests/bugs/379461-3.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase, bug 379461</title>
+</head>
+<body dir="rtl">
+
+<!-- cause the page to have a horizontal scrollbar -->
+<p style="width:300%">&#xA0;</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/380004-1-ref.html b/layout/reftests/bugs/380004-1-ref.html
new file mode 100644
index 0000000000..c84061a1a6
--- /dev/null
+++ b/layout/reftests/bugs/380004-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="380004-iframe.html"/>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/380004-1.html b/layout/reftests/bugs/380004-1.html
new file mode 100644
index 0000000000..12e14f5f9e
--- /dev/null
+++ b/layout/reftests/bugs/380004-1.html
@@ -0,0 +1,18 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "300px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 100px"
+ src="380004-iframe.html"/>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/380004-iframe.html b/layout/reftests/bugs/380004-iframe.html
new file mode 100644
index 0000000000..fce3dfa486
--- /dev/null
+++ b/layout/reftests/bugs/380004-iframe.html
@@ -0,0 +1,9 @@
+<html>
+ <body>
+ <table height="75%">
+ <tr><td bgcolor="blue">
+ x
+ </td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/380227-1-ref.html b/layout/reftests/bugs/380227-1-ref.html
new file mode 100644
index 0000000000..dc19cf2681
--- /dev/null
+++ b/layout/reftests/bugs/380227-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 200px"
+ src="380227-iframe.html"/>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/380227-1.html b/layout/reftests/bugs/380227-1.html
new file mode 100644
index 0000000000..3c66e724e6
--- /dev/null
+++ b/layout/reftests/bugs/380227-1.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "200px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="380227-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/380227-iframe.html b/layout/reftests/bugs/380227-iframe.html
new file mode 100644
index 0000000000..92b7b3d834
--- /dev/null
+++ b/layout/reftests/bugs/380227-iframe.html
@@ -0,0 +1,9 @@
+<html>
+ <body>
+ <table height="50%">
+ <tr><td bgcolor="blue">
+ x
+ </td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/380825-1-ref.html b/layout/reftests/bugs/380825-1-ref.html
new file mode 100644
index 0000000000..9b5da58702
--- /dev/null
+++ b/layout/reftests/bugs/380825-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>Bug 380825 Reference</title>
+</head>
+<body>
+<pre style="margin: 0">text</pre>
+</body>
+</html>
diff --git a/layout/reftests/bugs/380825-1.html b/layout/reftests/bugs/380825-1.html
new file mode 100644
index 0000000000..5356423e89
--- /dev/null
+++ b/layout/reftests/bugs/380825-1.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>Bug 380825 Test</title>
+</head>
+<body>
+<table style="border-collapse: collapse; margin: 0"><tr><td style="padding: 0px"><tt>text</tt></td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/380842-1-ref.html b/layout/reftests/bugs/380842-1-ref.html
new file mode 100644
index 0000000000..fa2fcc77cf
--- /dev/null
+++ b/layout/reftests/bugs/380842-1-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ </style>
+</head>
+<body>
+<table>
+ <caption>
+ <div>Before</div>
+ Caption
+ <div>After</div>
+ </caption>
+<tr>
+ <td>
+ <div>Before</div>
+ Text
+ <div>After</div>
+ </td>
+</tr>
+</table>
+<div>
+ Before inline-block
+ <div style="display: inline-block">
+ <div>Before</div>
+ Text
+ <div>After</div>
+ </div>
+ After inline-block
+</div>
+<div>
+ Before span
+ <span>
+ <div>Before</div>
+ Text
+ <div>After</div>
+ </span>
+ After span
+</div>
+<div>
+ <div>Before</div>
+ Text
+ <div>After</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/380842-1.html b/layout/reftests/bugs/380842-1.html
new file mode 100644
index 0000000000..e05fdb7676
--- /dev/null
+++ b/layout/reftests/bugs/380842-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .test:before { content: "Before"; display: block }
+ .test:after { content: "After"; display: block }
+ </style>
+</head>
+<body>
+<table>
+ <caption class="test">
+ Caption
+ </caption>
+<tr>
+ <td class="test">
+ Text
+ </td>
+</tr>
+</table>
+<div>
+ Before inline-block
+ <div style="display: inline-block" class="test"> Text </div>
+ After inline-block
+</div>
+<div>
+ Before span
+ <span class="test"> Text </span>
+ After span
+</div>
+<div class="test"> Text </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/381130-1-ref.html b/layout/reftests/bugs/381130-1-ref.html
new file mode 100644
index 0000000000..ce9c07c876
--- /dev/null
+++ b/layout/reftests/bugs/381130-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 381130</title>
+</head>
+<body>
+<div><span>Trythis</span>whynot?
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/381130-1.html b/layout/reftests/bugs/381130-1.html
new file mode 100644
index 0000000000..4c9c6f4db3
--- /dev/null
+++ b/layout/reftests/bugs/381130-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Bug 381130</title>
+</head>
+<body>
+<div style="width:1px;"><span>Trythis</span>whynot?
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/381507-1-ref.html b/layout/reftests/bugs/381507-1-ref.html
new file mode 100644
index 0000000000..d7f0cdf054
--- /dev/null
+++ b/layout/reftests/bugs/381507-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 200px"
+ src="381507-iframe.html"/>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/381507-1.html b/layout/reftests/bugs/381507-1.html
new file mode 100644
index 0000000000..c087ed929d
--- /dev/null
+++ b/layout/reftests/bugs/381507-1.html
@@ -0,0 +1,18 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "200px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="381507-iframe.html"/>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/381507-iframe.html b/layout/reftests/bugs/381507-iframe.html
new file mode 100644
index 0000000000..38276624a6
--- /dev/null
+++ b/layout/reftests/bugs/381507-iframe.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+<table height="30%" bgcolor="green"
+ cellspacing="0" cellpadding="0">
+ <tr><td>
+ +
+ <table height="100%" bgcolor="orange"
+ cellspacing="0" cellpadding="0">
+ <tr><td>
+ +
+ </td></tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/381746-1-framea.html b/layout/reftests/bugs/381746-1-framea.html
new file mode 100644
index 0000000000..ebd0150cc2
--- /dev/null
+++ b/layout/reftests/bugs/381746-1-framea.html
@@ -0,0 +1 @@
+<body onload="parent.frameOnload();">text
diff --git a/layout/reftests/bugs/381746-1-frameb.html b/layout/reftests/bugs/381746-1-frameb.html
new file mode 100644
index 0000000000..8e27be7d61
--- /dev/null
+++ b/layout/reftests/bugs/381746-1-frameb.html
@@ -0,0 +1 @@
+text
diff --git a/layout/reftests/bugs/381746-1-ref.html b/layout/reftests/bugs/381746-1-ref.html
new file mode 100644
index 0000000000..02d020e107
--- /dev/null
+++ b/layout/reftests/bugs/381746-1-ref.html
@@ -0,0 +1,15 @@
+<html><head>
+<title>Testcase Bug 381746, reference – odd and changing border in frameset</title>
+<script>
+
+
+
+
+
+</script>
+</head>
+<frameset cols="48%,52%">
+ <frame src="381746-1-frameb.html">
+ <frame src="381746-1-frameb.html">
+</frameset>
+</html>
diff --git a/layout/reftests/bugs/381746-1.html b/layout/reftests/bugs/381746-1.html
new file mode 100644
index 0000000000..0085090387
--- /dev/null
+++ b/layout/reftests/bugs/381746-1.html
@@ -0,0 +1,23 @@
+<html class="reftest-wait"><head>
+<title>Testcase Bug 381746 - odd and changing border in frameset</title>
+<script>
+var frameOnloadCalled = false;
+function frameOnload() {
+ if (!frameOnloadCalled) {
+ frameOnloadCalled = true;
+ return;
+ }
+ document.documentElement.removeAttribute("class");
+}
+function doe() {
+document.getElementsByTagName('frame')[0].src = '381746-1-framea.html';
+document.getElementsByTagName('frame')[1].src = '381746-1-framea.html';
+}
+window.onload=doe;
+</script>
+</head>
+<frameset cols="48%,52%">
+ <frame src="">
+ <frame src="">
+</frameset>
+</html>
diff --git a/layout/reftests/bugs/382600-1-ref.html b/layout/reftests/bugs/382600-1-ref.html
new file mode 100644
index 0000000000..09271d44b2
--- /dev/null
+++ b/layout/reftests/bugs/382600-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<body>
+ <select id="filter_by" size="12" disabled="disabled"></select>
+</body>
+</html>
diff --git a/layout/reftests/bugs/382600-1.html b/layout/reftests/bugs/382600-1.html
new file mode 100644
index 0000000000..8c78ee547c
--- /dev/null
+++ b/layout/reftests/bugs/382600-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<body>
+ <select id="filter_by" size="12"></select>
+
+ <script language='javascript'>
+ document.body.offsetWidth;
+ document.getElementById("filter_by").disabled = true;
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/382916-1-ref.html b/layout/reftests/bugs/382916-1-ref.html
new file mode 100644
index 0000000000..d23768a69b
--- /dev/null
+++ b/layout/reftests/bugs/382916-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+
+<p style="text-align: start;">fifififi</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/382916-1.html b/layout/reftests/bugs/382916-1.html
new file mode 100644
index 0000000000..029cf7a1bc
--- /dev/null
+++ b/layout/reftests/bugs/382916-1.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+
+<p style="text-align: justify;">fifififi</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/383035-1.html b/layout/reftests/bugs/383035-1.html
new file mode 100644
index 0000000000..668c6df7e5
--- /dev/null
+++ b/layout/reftests/bugs/383035-1.html
@@ -0,0 +1,18 @@
+<html><head>
+<title>Testcase bug - Black vertical line showing with iframe when you shouldn't see that</title>
+<style>
+body {
+ overflow:hidden;
+}
+div#main {
+ width: 997px;
+ margin: 0px auto;
+}
+</style>
+</head>
+<body>
+<div id="main">
+<iframe frameborder="0"></iframe>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/383035-2.html b/layout/reftests/bugs/383035-2.html
new file mode 100644
index 0000000000..7a62300ede
--- /dev/null
+++ b/layout/reftests/bugs/383035-2.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>Bug 383035 – Black vertical line showing with iframe when you shouldn't see that</title>
+</head>
+<body style="overflow:hidden">
+<div style="width: 1400px;">
+<center>
+<table style="width: 815px;"><tr><td>
+<iframe frameborder="0"></iframe>
+</td></tr></table>
+</center>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/383488-1-ref.html b/layout/reftests/bugs/383488-1-ref.html
new file mode 100644
index 0000000000..0b2df13e5a
--- /dev/null
+++ b/layout/reftests/bugs/383488-1-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+ span { font-family: sans-serif; font-size: 72px; }
+</style>
+</head><body>
+<p>The X'es below should have the same size:</p>
+<!-- The wonky placement of line breaks below is to eliminate all
+ significant whitespace within the paragraph. -->
+<p
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span
+><span>X</span></p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/383488-1.html b/layout/reftests/bugs/383488-1.html
new file mode 100644
index 0000000000..cd5df2b4b8
--- /dev/null
+++ b/layout/reftests/bugs/383488-1.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+ span { font-family: sans-serif }
+ #a14 { font-size:72px; }
+</style>
+<script>
+window.onload = function()
+{
+ function S(id) {
+ return document.getElementById(id).style;
+ }
+ S("a1").setProperty("font-size", "illegal", "important");
+ S("a2").setProperty("font-size", "24px;", "important");
+ S("a3").setProperty("font-size", "24px; font-size-adjust:2", "important");
+ S("a4").setProperty("font-size", ";", "important");
+ S("a5").setProperty("font", "24px sans-serif;", "important");
+ S("a6").setProperty("font", "24px;", "important");
+ S("a7").setProperty("font-size", " 72px ", "important"); // correct
+ S("a8").setProperty("font", ";", "important");
+ S("a9").setProperty("font", " 72px sans-serif ", "important"); // correct
+ S("a10").setProperty("font-size", "!", "important");
+ S("a11").setProperty("font-size", "!important", "important");
+ S("a12").setProperty("font-size", "}", "important");
+ S("a13").setProperty("font-size", "; font-size:24px", "important");
+ S("a14").setProperty("font-size", "", "important"); // correct
+ S("a15").setProperty("font-size", "24px !important;", "important");
+ S("a16").setProperty("font-size", "24px !important; height:1px", "important");
+}
+</script>
+</head><body>
+<p>The X'es below should have the same size:</p>
+<!-- The wonky placement of line breaks below is to eliminate all
+ significant whitespace within the paragraph. -->
+<p
+><span id="a1" style="font-size:72px!important;">X</span
+><span id="a2" style="font-size:72px!important;">X</span
+><span id="a3" style="font-size:72px!important;">X</span
+><span id="a4" style="font-size:72px!important;">X</span
+><span id="a5" style="font-size:72px!important;">X</span
+><span id="a6" style="font-size:72px!important;">X</span
+><span id="a7" style="font-size:24px!important;">X</span
+><span id="a8" style="font-size:72px!important;">X</span
+><span id="a9" style="font:24px sans-serif!important;">X</span
+><span id="a10" style="font-size:72px!important;">X</span
+><span id="a11" style="font-size:72px!important;">X</span
+><span id="a12" style="font-size:72px!important;">X</span
+><span id="a13" style="font-size:72px!important;">X</span
+><span id="a14" style="font-size:24px!important;">X</span
+><span id="a15" style="font-size:72px!important;">X</span
+><span id="a16" style="font-size:72px!important;">X</span
+></p>
+</body></html>
diff --git a/layout/reftests/bugs/383551-1-ref.html b/layout/reftests/bugs/383551-1-ref.html
new file mode 100644
index 0000000000..1cab5ab0d0
--- /dev/null
+++ b/layout/reftests/bugs/383551-1-ref.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<div>This sentence should all be one line.</div>
+<div>This should be on its own line.</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/383551-1.html b/layout/reftests/bugs/383551-1.html
new file mode 100644
index 0000000000..9541fbc03b
--- /dev/null
+++ b/layout/reftests/bugs/383551-1.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<div>This sentence <span><span style="display:inline-block;">should</span> all be one line.
+<div>This should be on its own line.</div></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/383883-1-ref.html b/layout/reftests/bugs/383883-1-ref.html
new file mode 100644
index 0000000000..e3d57faa9f
--- /dev/null
+++ b/layout/reftests/bugs/383883-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<body>
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 0px">
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
+<div id=rand style="height:1px"></div>
+</div>
diff --git a/layout/reftests/bugs/383883-1.html b/layout/reftests/bugs/383883-1.html
new file mode 100644
index 0000000000..fc0cf63fac
--- /dev/null
+++ b/layout/reftests/bugs/383883-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.borderTopWidth=0;document.getElementById('rand').style.height='1px';">
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 50px">
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
+<div id=rand></div>
+</div>
diff --git a/layout/reftests/bugs/383883-2-ref.html b/layout/reftests/bugs/383883-2-ref.html
new file mode 100644
index 0000000000..1caec49414
--- /dev/null
+++ b/layout/reftests/bugs/383883-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<body>
+<div style="float:left; width:0; height:60px"></div>
+<div style="background: red; float: right; height: 50px; width: 20px; clear:left"></div>
+<div id="a" style="border-top: solid 0px;">
+ <div id="b" style="border: solid orange; float: left; clear: right; width: 100px; height: 100px; position: relative;"></div>
+</div>
+<div>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+<div id=rand style="height:1px"></div>
+</div>
diff --git a/layout/reftests/bugs/383883-2.html b/layout/reftests/bugs/383883-2.html
new file mode 100644
index 0000000000..c4a97a78f1
--- /dev/null
+++ b/layout/reftests/bugs/383883-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.borderTopWidth=0;document.getElementById('rand').style.height='1px';">
+<div style="float:left; width:0; height:60px"></div>
+<div style="background: red; float: right; height: 50px; width: 20px; clear:left"></div>
+<div id="a" style="border-top: solid 50px;">
+ <div id="b" style="border: solid orange; float: left; clear: right; width: 100px; height: 100px; position: relative;"></div>
+</div>
+<div>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+<div id=rand></div>
+</div>
diff --git a/layout/reftests/bugs/383883-3-ref.html b/layout/reftests/bugs/383883-3-ref.html
new file mode 100644
index 0000000000..2fecae1860
--- /dev/null
+++ b/layout/reftests/bugs/383883-3-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 0px">
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
+</div>
diff --git a/layout/reftests/bugs/383883-3.html b/layout/reftests/bugs/383883-3.html
new file mode 100644
index 0000000000..ecc9f95c4e
--- /dev/null
+++ b/layout/reftests/bugs/383883-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.borderTopWidth=0;">
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 50px">
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
+</div>
diff --git a/layout/reftests/bugs/383883-4-ref.html b/layout/reftests/bugs/383883-4-ref.html
new file mode 100644
index 0000000000..cdf08b1406
--- /dev/null
+++ b/layout/reftests/bugs/383883-4-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<body>
+<div style="float:left; width:0; height:60px"></div>
+<div style="background: red; float: right; height: 50px; width: 20px; clear:left"></div>
+<div id="a" style="border-top: solid 0px;">
+ <div id="b" style="border: solid orange; float: left; clear: right; width: 100px; height: 100px; position: relative;"></div>
+</div>
+<div>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+</div>
diff --git a/layout/reftests/bugs/383883-4.html b/layout/reftests/bugs/383883-4.html
new file mode 100644
index 0000000000..09eeb2f122
--- /dev/null
+++ b/layout/reftests/bugs/383883-4.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.borderTopWidth=0;">
+<div style="float:left; width:0; height:60px"></div>
+<div style="background: red; float: right; height: 50px; width: 20px; clear:left"></div>
+<div id="a" style="border-top: solid 50px;">
+ <div id="b" style="border: solid orange; float: left; clear: right; width: 100px; height: 100px; position: relative;"></div>
+</div>
+<div>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+asdf<br>
+</div>
diff --git a/layout/reftests/bugs/383884-1-ref.html b/layout/reftests/bugs/383884-1-ref.html
new file mode 100644
index 0000000000..9c6f88de94
--- /dev/null
+++ b/layout/reftests/bugs/383884-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 0px"></div>
+<div>
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
diff --git a/layout/reftests/bugs/383884-1.html b/layout/reftests/bugs/383884-1.html
new file mode 100644
index 0000000000..8dac4f3e0b
--- /dev/null
+++ b/layout/reftests/bugs/383884-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.borderTopWidth=0;">
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div id=a style="border-top: solid 50px"></div>
+<div>
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange; position:relative;"></div>
+</div>
+<div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>
diff --git a/layout/reftests/bugs/383885-1-ref.html b/layout/reftests/bugs/383885-1-ref.html
new file mode 100644
index 0000000000..68f4fe644b
--- /dev/null
+++ b/layout/reftests/bugs/383885-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<body>
+<div style="float:left; width:10px; height:500px; background:blue"></div>
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div><span id=a style="display:none">a<br></span>
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange;"></div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf
diff --git a/layout/reftests/bugs/383885-1.html b/layout/reftests/bugs/383885-1.html
new file mode 100644
index 0000000000..df96fffb33
--- /dev/null
+++ b/layout/reftests/bugs/383885-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<body onload="document.getElementById('a').style.display='none';">
+<div style="float:left; width:10px; height:500px; background:blue"></div>
+<div style="float:right; height: 50px; width: 20px; background: red"></div>
+<div><span id=a>a<br></span>
+<div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange;"></div>
+asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf
diff --git a/layout/reftests/bugs/384322-1-ref.html b/layout/reftests/bugs/384322-1-ref.html
new file mode 100644
index 0000000000..1bb765133b
--- /dev/null
+++ b/layout/reftests/bugs/384322-1-ref.html
@@ -0,0 +1,55 @@
+<html>
+<head><title>[384322] Testcase</title>
+</head>
+<body bgcolor="white">
+
+ <p>&lt;img&gt;&lt;img&gt;Hello&lt;img&gt;&lt;img&gt;
+
+ <table bgcolor="lightgray" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"><img width="50" height="50">Hello<img width="50" height="50"><img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>&lt;img&gt;&lt;img&gt;Hello</p>
+
+ <table bgcolor="lightgray" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"><img width="50" height="50">Hello
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>Hello&lt;img&gt;&lt;img&gt;</p>
+
+ <table bgcolor="lightgray" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ Hello<img width="50" height="50"><img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>&lt;img&gt;Hello</p>
+
+ <table bgcolor="lightgray" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50">Hello
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/384322-1.html b/layout/reftests/bugs/384322-1.html
new file mode 100644
index 0000000000..db36fe7c4e
--- /dev/null
+++ b/layout/reftests/bugs/384322-1.html
@@ -0,0 +1,55 @@
+<html>
+<head><title>[384322] Testcase</title>
+</head>
+<body bgcolor="white">
+
+ <p>&lt;img&gt;&lt;img&gt;Hello&lt;img&gt;&lt;img&gt;
+
+ <table bgcolor="lightgray" width="70" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"><img width="50" height="50">Hello<img width="50" height="50"><img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>&lt;img&gt;&lt;img&gt;Hello</p>
+
+ <table bgcolor="lightgray" width="70" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"><img width="50" height="50">Hello
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>Hello&lt;img&gt;&lt;img&gt;</p>
+
+ <table bgcolor="lightgray" width="70" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ Hello<img width="50" height="50"><img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>&lt;img&gt;Hello</p>
+
+ <table bgcolor="lightgray" width="70" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50">Hello
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/384576-1-ref.html b/layout/reftests/bugs/384576-1-ref.html
new file mode 100644
index 0000000000..58a8434900
--- /dev/null
+++ b/layout/reftests/bugs/384576-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+ <style type="text/css">
+ div.test {
+ background-color: red;
+ margin: 5em;
+ }
+
+ div > div {
+ background-color: green;
+ }
+ </style>
+ <body>
+ <div class="test"><div>&nbsp;</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/384576-1.html b/layout/reftests/bugs/384576-1.html
new file mode 100644
index 0000000000..e1bfa6fff1
--- /dev/null
+++ b/layout/reftests/bugs/384576-1.html
@@ -0,0 +1,16 @@
+<html>
+ <style type="text/css">
+ div.test {
+ background-color: red;
+ margin: 5em;
+ border-radius: 10px;
+ }
+
+ div > div {
+ background-color: green;
+ }
+ </style>
+ <body>
+ <div class="test"><div>&nbsp;</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/384762-1.html b/layout/reftests/bugs/384762-1.html
new file mode 100644
index 0000000000..874b19f5fc
--- /dev/null
+++ b/layout/reftests/bugs/384762-1.html
@@ -0,0 +1 @@
+<div style="margin-top: -10em; clear:both">a
diff --git a/layout/reftests/bugs/384876-1-ref.html b/layout/reftests/bugs/384876-1-ref.html
new file mode 100644
index 0000000000..e3fc7e0616
--- /dev/null
+++ b/layout/reftests/bugs/384876-1-ref.html
@@ -0,0 +1,37 @@
+<html>
+<head>
+ <title>Width:auto and padding</title>
+</head>
+
+<body>
+
+<div style="border-bottom:5px solid #000;
+ overflow: hidden;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:20px"><div style="padding: 0px 0px 0px 45px;">The bottom border should end with my text (overflow:hidden)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ overflow: visible;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:60px"><div style="padding: 0px 0px 0px 45px;">The bottom border should end with my text (overflow:visible)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ overflow: auto;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:100px"><div style="padding: 0px 0px 0px 45px;">The bottom border should end with my text (overflow:auto)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:140px"><div style="padding: 0px 0px 0px 45px;">The bottom border should end with my text (no overflow defined)</div></div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/384876-1.html b/layout/reftests/bugs/384876-1.html
new file mode 100644
index 0000000000..06a3592306
--- /dev/null
+++ b/layout/reftests/bugs/384876-1.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+ <title>Width:auto and padding</title>
+</head>
+
+<body>
+
+<div style="border-bottom:5px solid #000;
+ padding: 0px 0px 0px 45px;
+ overflow: hidden;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:20px"><div>The bottom border should end with my text (overflow:hidden)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ padding: 0px 0px 0px 45px;
+ overflow: visible;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:60px"><div>The bottom border should end with my text (overflow:visible)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ padding: 0px 0px 0px 45px;
+ overflow: auto;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:100px"><div>The bottom border should end with my text (overflow:auto)</div></div>
+
+<div style="border-bottom:5px solid #000;
+ padding: 0px 0px 0px 45px;
+ background-color:#fbb;
+ position: absolute;
+ left:0px;
+ top:140px"><div>The bottom border should end with my text (no overflow defined)</div></div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/385533-1.html b/layout/reftests/bugs/385533-1.html
new file mode 100644
index 0000000000..6e4759eebf
--- /dev/null
+++ b/layout/reftests/bugs/385533-1.html
@@ -0,0 +1,16 @@
+<!-- Assertion reftest for bug 385533 -->
+<html>
+<head>
+<style>
+.pad { padding: 50%; color: white }
+</style>
+</head>
+<body>
+ <table>
+ <tr>
+ <td><div class="pad">a</div></td>
+ <td><div class="pad">b</div></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385569-1-ref.html b/layout/reftests/bugs/385569-1-ref.html
new file mode 100644
index 0000000000..b3869ff403
--- /dev/null
+++ b/layout/reftests/bugs/385569-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<style>
+/* explicitly load a font that supports the "fi" ligature */
+@font-face {
+ font-family: test;
+ src: url(../fonts/mplus/mplus-1p-regular.ttf);
+}
+body {
+ font-family: test, serif;
+ padding: 20px;
+}
+</style>
+</head>
+
+<body>
+<div id="div" style="font-size: 40px">ifi</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385569-1a.html b/layout/reftests/bugs/385569-1a.html
new file mode 100644
index 0000000000..914c42f21f
--- /dev/null
+++ b/layout/reftests/bugs/385569-1a.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<style>
+/* explicitly load a font that supports the "fi" ligature */
+@font-face {
+ font-family: test;
+ src: url(../fonts/mplus/mplus-1p-regular.ttf);
+}
+body {
+ font-family: test, serif;
+ padding: 20px;
+}
+</style>
+<script>
+function m()
+{
+ document.body.offsetHeight;
+ var div = document.getElementById("div");
+ div.appendChild(document.createTextNode("i"));
+}
+</script>
+</head>
+
+<body onload="m();">
+<div id="div" style="font-size: 40px"><span>if</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385569-1b.html b/layout/reftests/bugs/385569-1b.html
new file mode 100644
index 0000000000..d39f03218b
--- /dev/null
+++ b/layout/reftests/bugs/385569-1b.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<style>
+/* explicitly load a font that supports the "fi" ligature */
+@font-face {
+ font-family: test;
+ src: url(../fonts/mplus/mplus-1p-regular.ttf);
+}
+body {
+ font-family: test, serif;
+ padding: 20px;
+}
+</style>
+<script>
+function m()
+{
+ document.body.offsetHeight;
+ var parent = document.getElementById("parent");
+ parent.appendChild(document.createTextNode("i"));
+}
+</script>
+</head>
+
+<body onload="m();">
+<div id="div" style="font-size: 40px"><span>if</span><span id="parent"></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385607-1-ref.html b/layout/reftests/bugs/385607-1-ref.html
new file mode 100644
index 0000000000..2164e7333e
--- /dev/null
+++ b/layout/reftests/bugs/385607-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<div id="div"><span>x </span><span> x</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385607-1.html b/layout/reftests/bugs/385607-1.html
new file mode 100644
index 0000000000..a2b89fdc02
--- /dev/null
+++ b/layout/reftests/bugs/385607-1.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script>
+function m()
+{
+ document.body.offsetHeight;
+ var div = document.getElementById("div");
+ var doomed = document.getElementById("doomed");
+ div.removeChild(doomed);
+}
+</script>
+</head>
+<body onload="m();">
+<div id="div"><span>x </span><div id="doomed">y</div><span> x</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-1-ref.html b/layout/reftests/bugs/385823-1-ref.html
new file mode 100644
index 0000000000..795fbfbc5d
--- /dev/null
+++ b/layout/reftests/bugs/385823-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+<table style="background: lightblue;" cellspacing="0" cellpadding="0">
+ <tr><td>
+ <img src="mozilla-banner.gif"/>
+ <br/>
+ Here's some text following the image.
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-1.html b/layout/reftests/bugs/385823-1.html
new file mode 100644
index 0000000000..11a78b2aa4
--- /dev/null
+++ b/layout/reftests/bugs/385823-1.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+<table style="background: lightblue;" cellspacing="0" cellpadding="0">
+ <tr><td>
+ <img src="mozilla-banner.gif" height="100%"/>
+ <br/>
+ Here's some text following the image.
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-2-ref.html b/layout/reftests/bugs/385823-2-ref.html
new file mode 100644
index 0000000000..1c595b8ec5
--- /dev/null
+++ b/layout/reftests/bugs/385823-2-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<table cellspacing="0" cellpadding="0" height="70px">
+ <tr><td>
+ <img src="mozilla-banner.gif" height="70px"/>
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-2a.html b/layout/reftests/bugs/385823-2a.html
new file mode 100644
index 0000000000..1fd3286e41
--- /dev/null
+++ b/layout/reftests/bugs/385823-2a.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<table cellspacing="0" cellpadding="0" height="70px">
+ <tr><td>
+ <img src="mozilla-banner.gif" height="100%"/>
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-2b.html b/layout/reftests/bugs/385823-2b.html
new file mode 100644
index 0000000000..c9c434ef50
--- /dev/null
+++ b/layout/reftests/bugs/385823-2b.html
@@ -0,0 +1,14 @@
+<html>
+<body>
+<table cellspacing="0" cellpadding="0" height="70px">
+ <tr><td>
+ <img src="mozilla-banner.gif" height="100%"/>
+ <br/>
+ <!-- Add some text content, but make it small enough not
+ to push us to over 70px before we scale the image.
+ This text should end up hidden behind the image. -->
+ <font style="font-size: 20%">text text</font>
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385823-2c.html b/layout/reftests/bugs/385823-2c.html
new file mode 100644
index 0000000000..400caee40a
--- /dev/null
+++ b/layout/reftests/bugs/385823-2c.html
@@ -0,0 +1,15 @@
+<html>
+<body>
+<!-- Specify a width on the table, to make sure it's wide enough
+ to hold the scaled image. -->
+<table cellspacing="0" cellpadding="0" height="70px" width="724px">
+ <tr><td>
+ <img src="mozilla-banner.gif" height="100%"/>
+ <br/>
+ <!-- Add some text content, but make it small enough not
+ to push us to over 70px before we scale the image. -->
+ <font style="font-size: 20%; color:rgba(0,0,0,0);">text text</font>
+ </tr></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/385870-1-ref.html b/layout/reftests/bugs/385870-1-ref.html
new file mode 100644
index 0000000000..fcebd34fb2
--- /dev/null
+++ b/layout/reftests/bugs/385870-1-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<textarea id=red></textarea>
+<textarea id=green></textarea>
+<textarea id=blue></textarea>
+<textarea id=yellow></textarea>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/385870-1.html b/layout/reftests/bugs/385870-1.html
new file mode 100644
index 0000000000..4d292e1c20
--- /dev/null
+++ b/layout/reftests/bugs/385870-1.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+ right: 100px;
+ bottom: 100px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+ bottom: 100px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ right: 100px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<textarea id=red></textarea>
+<textarea id=green></textarea>
+<textarea id=blue></textarea>
+<textarea id=yellow></textarea>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/385870-2-ref.html b/layout/reftests/bugs/385870-2-ref.html
new file mode 100644
index 0000000000..eebef3805e
--- /dev/null
+++ b/layout/reftests/bugs/385870-2-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<input id=red>
+<input id=green>
+<input id=blue>
+<input id=yellow>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/385870-2.html b/layout/reftests/bugs/385870-2.html
new file mode 100644
index 0000000000..c641abb796
--- /dev/null
+++ b/layout/reftests/bugs/385870-2.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+ right: 100px;
+ bottom: 100px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+ bottom: 100px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ right: 100px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<input id=red>
+<input id=green>
+<input id=blue>
+<input id=yellow>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386014-1-ref.html b/layout/reftests/bugs/386014-1-ref.html
new file mode 100644
index 0000000000..f1b0d60894
--- /dev/null
+++ b/layout/reftests/bugs/386014-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div { background: green; color: green; width: -moz-fit-content; }
+ </style>
+</head>
+<body>
+
+<div>TEST</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386014-1a.html b/layout/reftests/bugs/386014-1a.html
new file mode 100644
index 0000000000..1bbc6fd311
--- /dev/null
+++ b/layout/reftests/bugs/386014-1a.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ caption { color: green }
+</style>
+<script>
+function boom()
+{
+ var table = document.getElementById("table");
+
+ var newCaption = document.createElement('caption');
+ newCaption.appendChild(document.createTextNode("TEST"));
+ newCaption.style.background = "inherit"
+ table.insertBefore(newCaption, table.firstChild);
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<table id="table" style="background: green;"><caption></caption></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386014-1b.html b/layout/reftests/bugs/386014-1b.html
new file mode 100644
index 0000000000..5e394458c4
--- /dev/null
+++ b/layout/reftests/bugs/386014-1b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ caption { color: green }
+</style>
+<script>
+function boom()
+{
+ var table = document.getElementById("table");
+
+ var newCaption = document.createElement('caption');
+ newCaption.appendChild(document.createTextNode("TEST"));
+ newCaption.style.background = "inherit"
+ table.appendChild(newCaption);
+ table.appendChild(document.createElement('caption'));
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<table id="table" style="background: green;"></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386014-1c.html b/layout/reftests/bugs/386014-1c.html
new file mode 100644
index 0000000000..d670cccb46
--- /dev/null
+++ b/layout/reftests/bugs/386014-1c.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ caption { color: green }
+ </style>
+</head>
+<body>
+
+<table style="background: green;"><caption style="background: inherit">TEST</caption><caption></caption></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386065-1-ref.html b/layout/reftests/bugs/386065-1-ref.html
new file mode 100644
index 0000000000..c2fdddb0db
--- /dev/null
+++ b/layout/reftests/bugs/386065-1-ref.html
@@ -0,0 +1,17 @@
+<html>
+
+<head>
+ <style type="text/css">
+ legend {font-size:0;}
+ </style>
+</head>
+
+<body>
+ <form>
+ <fieldset>
+ <legend></legend>
+ </fieldset>
+
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386065-1.html b/layout/reftests/bugs/386065-1.html
new file mode 100644
index 0000000000..5695543548
--- /dev/null
+++ b/layout/reftests/bugs/386065-1.html
@@ -0,0 +1,17 @@
+<html>
+
+<head>
+ <style type="text/css">
+ legend {font-size:0;}
+ </style>
+</head>
+
+<body>
+ <form>
+ <fieldset>
+ <legend>Invisible text</legend>
+ </fieldset>
+
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386065-2.html b/layout/reftests/bugs/386065-2.html
new file mode 100644
index 0000000000..27197f51a3
--- /dev/null
+++ b/layout/reftests/bugs/386065-2.html
@@ -0,0 +1,12 @@
+<html>
+
+<head>
+ <style type="text/css">
+ div {font-size:0;}
+ </style>
+</head>
+
+<body>
+ <div>This should be invisible.</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386147-1-ref.html b/layout/reftests/bugs/386147-1-ref.html
new file mode 100644
index 0000000000..9bf61293c9
--- /dev/null
+++ b/layout/reftests/bugs/386147-1-ref.html
@@ -0,0 +1,6 @@
+<div style="column-count: 2; width: 10em">
+<div>
+a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>
+</div>
+<div>
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
diff --git a/layout/reftests/bugs/386147-1.html b/layout/reftests/bugs/386147-1.html
new file mode 100644
index 0000000000..02734d53fe
--- /dev/null
+++ b/layout/reftests/bugs/386147-1.html
@@ -0,0 +1,6 @@
+<div style="column-count: 2; width: 10em">
+<div style="float:left;">
+a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>
+</div>
+<div style="float:left">
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
diff --git a/layout/reftests/bugs/386310-1-ref.html b/layout/reftests/bugs/386310-1-ref.html
new file mode 100644
index 0000000000..8b92dbd483
--- /dev/null
+++ b/layout/reftests/bugs/386310-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div id="test">first second third [<span style="background: yellow">fourth</span>]</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386310-1a.html b/layout/reftests/bugs/386310-1a.html
new file mode 100644
index 0000000000..df18acda95
--- /dev/null
+++ b/layout/reftests/bugs/386310-1a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="386310-script.js"></script>
+ </head>
+ <body>
+ <div id="test">first second third [fourth]</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386310-1b-shadow.html b/layout/reftests/bugs/386310-1b-shadow.html
new file mode 100644
index 0000000000..9cfa6f477b
--- /dev/null
+++ b/layout/reftests/bugs/386310-1b-shadow.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="386310-script.js"></script>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ </script>
+ </head>
+ <body>
+ <template id="template">
+ <span></span>
+ <slot></slot>
+ </template>
+ <custom-element id="test" style="display: block;">first second third [fourth]</custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386310-1c-shadow.html b/layout/reftests/bugs/386310-1c-shadow.html
new file mode 100644
index 0000000000..2198276464
--- /dev/null
+++ b/layout/reftests/bugs/386310-1c-shadow.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="386310-script.js"></script>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ </script>
+ </head>
+ <body>
+ <template id="template">
+ <slot></slot>
+ <span></span>
+ </template>
+ <custom-element id="test" style="display: block;">first second third [fourth]</custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386310-1d-shadow.html b/layout/reftests/bugs/386310-1d-shadow.html
new file mode 100644
index 0000000000..acfb4c2d65
--- /dev/null
+++ b/layout/reftests/bugs/386310-1d-shadow.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="386310-script.js"></script>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ var span = document.createComment("generated comment to prevent bug #36");
+ this.insertBefore(span, this.firstChild);
+ }
+ });
+ </script>
+ </head>
+ <body>
+ <template id="template">
+ <span></span>
+ <slot></slot>
+ </template>
+ <custom-element id="test" style="display: block;">first second third [fourth]</custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/386310-script.js b/layout/reftests/bugs/386310-script.js
new file mode 100644
index 0000000000..960fe6ab5a
--- /dev/null
+++ b/layout/reftests/bugs/386310-script.js
@@ -0,0 +1,12 @@
+function wrapNode() {
+ var elm = document.getElementById("test");
+ var span = document.createElement("span");
+ span.setAttribute("style", "background: yellow");
+ var range = document.createRange();
+ var start = "first second third [".length;
+ range.setStart(elm.lastChild, start);
+ range.setEnd(elm.lastChild, start + "fourth".length);
+ range.surroundContents(span);
+}
+
+window.addEventListener("load", wrapNode);
diff --git a/layout/reftests/bugs/386401-1-ref.html b/layout/reftests/bugs/386401-1-ref.html
new file mode 100644
index 0000000000..a5f47e681a
--- /dev/null
+++ b/layout/reftests/bugs/386401-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table { border-spacing: 2px; width: 30em; }
+ td { border: 1px solid; padding: 2px; }
+ tbody { overflow: scroll; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <thead><tr><td>Header</td><td id="grow">A really big header.</td><td>Header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386401-1.html b/layout/reftests/bugs/386401-1.html
new file mode 100644
index 0000000000..5f8a61ce32
--- /dev/null
+++ b/layout/reftests/bugs/386401-1.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" class="reftest-wait">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ table { border-spacing: 2px; width: 30em; }
+ td { border: 1px solid; padding: 2px; }
+ tbody { overflow: scroll; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ setTimeout(run2, 0);
+ }
+
+ function run2() {
+ var t = document.getElementById("grow").firstChild;
+ t.data = "A really big header.";
+ document.documentElement.className = "";
+ }
+
+ </script>
+</head>
+<body onload="run()">
+
+<table>
+ <thead><tr><td>Header</td><td id="grow">Header</td><td>Header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386401-2-ref.html b/layout/reftests/bugs/386401-2-ref.html
new file mode 100644
index 0000000000..55009b28d9
--- /dev/null
+++ b/layout/reftests/bugs/386401-2-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ table { border-spacing: 2px; width: 30em; }
+ td { border: 1px solid; padding: 2px; }
+ tbody { overflow: scroll; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <thead><tr><td>Header</td><td id="appendhere">Header</td><td>A really big header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386401-2.html b/layout/reftests/bugs/386401-2.html
new file mode 100644
index 0000000000..1d05a0c5fc
--- /dev/null
+++ b/layout/reftests/bugs/386401-2.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" class="reftest-wait">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ table { border-spacing: 2px; width: 30em; }
+ td { border: 1px solid; padding: 2px; }
+ tbody { overflow: scroll; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ setTimeout(run2, 0);
+ }
+
+ function run2() {
+ var c = document.getElementById("appendhere");
+ var newc = document.createElement("td");
+ var t = document.createTextNode("A really big header");
+ newc.appendChild(t);
+ c.parentNode.appendChild(newc);
+ document.documentElement.className = "";
+ }
+
+ </script>
+</head>
+<body onload="run()">
+
+<table>
+ <thead><tr><td>Header</td><td id="appendhere">Header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386401-3-ref.html b/layout/reftests/bugs/386401-3-ref.html
new file mode 100644
index 0000000000..9f59dd67e3
--- /dev/null
+++ b/layout/reftests/bugs/386401-3-ref.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ table#main { border-spacing: 2px; }
+ table#main td { border: 1px solid; padding: 2px; }
+ table#main tbody { overflow: scroll; }
+
+ </style>
+</head>
+<body>
+
+<table id="outer"><tr>
+<td>
+
+<table id="main">
+ <thead><tr><td>Header</td><td>Header</td><td>A really big header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</td>
+<td id="grow" style="width: 99%">
+</td>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386401-3.html b/layout/reftests/bugs/386401-3.html
new file mode 100644
index 0000000000..a4bd8463e3
--- /dev/null
+++ b/layout/reftests/bugs/386401-3.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US" class="reftest-wait">
+<head>
+ <title>Testcase, bug 386401</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ table#main { border-spacing: 2px; }
+ table#main td { border: 1px solid; padding: 2px; }
+ table#main tbody { overflow: scroll; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ setTimeout(run2, 0);
+ }
+
+ function run2() {
+ var c = document.getElementById("grow");
+ c.style.width="99%";
+ document.documentElement.className = "";
+ }
+
+ </script>
+</head>
+<body onload="run()">
+
+<table id="outer"><tr>
+<td>
+
+<table id="main">
+ <thead><tr><td>Header</td><td>Header</td><td>A really big header</td></tr></thead>
+ <tfoot><tr><td>Footer</td><td>Footer</td><td>Footer</td></tr></tfoot>
+ <tbody>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
+ </tbody>
+</table>
+
+</td>
+<td id="grow">
+</td>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/386470-1-ref.html b/layout/reftests/bugs/386470-1-ref.html
new file mode 100644
index 0000000000..492fc1e997
--- /dev/null
+++ b/layout/reftests/bugs/386470-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML><html>
+<head>
+</head>
+<body>
+<MARQUEE scrollamount="0" direction="right" behavior="alternate" style="background-color: blue; height: 100px;"><div style="width: 50px; height: 50px; background-color: lime;"></div></MARQUEE>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386470-1a.html b/layout/reftests/bugs/386470-1a.html
new file mode 100644
index 0000000000..746c206c41
--- /dev/null
+++ b/layout/reftests/bugs/386470-1a.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML><html>
+<head>
+</head>
+<body>
+<MARQUEE style="background-color: blue; height: 100px;" contenteditable><div style="width: 50px; height: 50px; background-color: lime;"></div></MARQUEE>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386470-1b.html b/layout/reftests/bugs/386470-1b.html
new file mode 100644
index 0000000000..ff79431736
--- /dev/null
+++ b/layout/reftests/bugs/386470-1b.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML><html>
+<head>
+</head>
+<body>
+<MARQUEE style="background-color: blue; height: 100px;" direction="down" scrollamount="0" behavior="alternate"><div style="width: 50px; height: 50px; background-color: lime;"></div></MARQUEE>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386470-1c.html b/layout/reftests/bugs/386470-1c.html
new file mode 100644
index 0000000000..e791be9726
--- /dev/null
+++ b/layout/reftests/bugs/386470-1c.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML><html>
+<head>
+</head>
+<body>
+<MARQUEE style="background-color: blue; height: 100px;" direction="up" contenteditable><div style="width: 50px; height: 50px; background-color: lime;"></div></MARQUEE>
+</body>
+</html>
diff --git a/layout/reftests/bugs/386920-1-ref.html b/layout/reftests/bugs/386920-1-ref.html
new file mode 100644
index 0000000000..3cfa7d849f
--- /dev/null
+++ b/layout/reftests/bugs/386920-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width:0px;">
+<p>THIS TEXT SHOULD BREAK.
+</body>
+</html>
diff --git a/layout/reftests/bugs/386920-1.html b/layout/reftests/bugs/386920-1.html
new file mode 100644
index 0000000000..b74b0cdaa2
--- /dev/null
+++ b/layout/reftests/bugs/386920-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width:0px;">
+<p style="font-variant:small-caps;">THIS TEXT SHOULD BREAK.
+</body>
+</html>
diff --git a/layout/reftests/bugs/387201-1-ref.html b/layout/reftests/bugs/387201-1-ref.html
new file mode 100644
index 0000000000..bcd40d8aeb
--- /dev/null
+++ b/layout/reftests/bugs/387201-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+.i {
+ height: 10px;
+ float: left;
+}
+</style>
+</head>
+<body>
+
+<div style="width: 4px;">
+ <div style="margin-left: 10px;">
+
+ <div class="i" style="border: 1px solid green">2</div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/387201-1.html b/layout/reftests/bugs/387201-1.html
new file mode 100644
index 0000000000..103f617b63
--- /dev/null
+++ b/layout/reftests/bugs/387201-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+.i {
+ height: 10px;
+ float: left;
+}
+</style>
+</head>
+<body>
+
+<div style="width: 4px;">
+ <div style="margin-left: 10px;">
+ <div class="i"></div>
+ <div class="i" style="border: 1px solid green">2</div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/387201-2.html b/layout/reftests/bugs/387201-2.html
new file mode 100644
index 0000000000..e3b4ca996b
--- /dev/null
+++ b/layout/reftests/bugs/387201-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#mlinks {
+ padding: 0;
+ float: right;
+}
+#hticker {
+ clear: both;
+}
+</style>
+</head>
+<body>
+<ul id="mlinks"></ul>
+<div id="hticker"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387201-3.html b/layout/reftests/bugs/387201-3.html
new file mode 100644
index 0000000000..f0d578de80
--- /dev/null
+++ b/layout/reftests/bugs/387201-3.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<div style="display: table-footer-group;">
+ <div style="float: right; width: 10px; height: 10px; padding-left: 40px;"></div>
+ <div style="-moz-float-edge: margin-box;">
+ <div style="float: right; height: 18px; width: 0px;"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/387227-1-ref.html b/layout/reftests/bugs/387227-1-ref.html
new file mode 100644
index 0000000000..37a43e6e24
--- /dev/null
+++ b/layout/reftests/bugs/387227-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: table-cell">Table cell</div
+ ><div>New Div</div
+ ><div id="insertion">Block</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/387227-1.html b/layout/reftests/bugs/387227-1.html
new file mode 100644
index 0000000000..3d0ad93353
--- /dev/null
+++ b/layout/reftests/bugs/387227-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function runTest() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("New Div"));
+ document.body.insertBefore(div, document.getElementById("insertion"));
+ }
+ </script>
+ </head>
+ <body onload="runTest()">
+ <div style="display: table-cell">Table cell</div
+ ><div id="insertion">Block</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/387227-2-ref.html b/layout/reftests/bugs/387227-2-ref.html
new file mode 100644
index 0000000000..50b9d20cfe
--- /dev/null
+++ b/layout/reftests/bugs/387227-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: table-cell">Table cell</div>
+ <div>New Div</div><div id="insertion">Block</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/387227-2.html b/layout/reftests/bugs/387227-2.html
new file mode 100644
index 0000000000..386a68c4e8
--- /dev/null
+++ b/layout/reftests/bugs/387227-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function runTest() {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode("New Div"));
+ document.body.insertBefore(div, document.getElementById("insertion"));
+ }
+ </script>
+ </head>
+ <body onload="runTest()">
+ <div style="display: table-cell">Table cell</div>
+ <div id="insertion">Block</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/387344-1-ref.html b/layout/reftests/bugs/387344-1-ref.html
new file mode 100644
index 0000000000..6a524018d7
--- /dev/null
+++ b/layout/reftests/bugs/387344-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+<tbody style="height: 100px; overflow: scroll; font-size: 20px; visibility: hidden">
+<tr><td>Test 1</td></tr>
+<tr><td>Test 2</td></tr>
+<tr><td>Test 3</td></tr>
+<tr><td>Test 4</td></tr>
+<tr><td>Test 5</td></tr>
+<tr><td>Test 6</td></tr>
+<tr><td>Test 7</td></tr>
+</tbody>
+</table>
+This text should be right up against the table.
+</body>
+</html>
diff --git a/layout/reftests/bugs/387344-1.html b/layout/reftests/bugs/387344-1.html
new file mode 100644
index 0000000000..034de9c9b2
--- /dev/null
+++ b/layout/reftests/bugs/387344-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+<tbody style="height: 100px; overflow: scroll; font-size: 20px; visibility: hidden">
+<tr><td>Test 1</td></tr>
+<tr><td>Test 2</td></tr>
+<tr><td>Test 3</td></tr>
+<tr><td>Test 4</td></tr>
+<tr><td>Test 5</td></tr>
+<tr><td>Test 6</td></tr>
+<tr><td>Test 7</td></tr>
+<tr><td>Test 8</td></tr>
+<tr><td>Test 9</td></tr>
+</tbody>
+</table>
+This text should be right up against the table.
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-1-ref.html b/layout/reftests/bugs/387876-1-ref.html
new file mode 100644
index 0000000000..3b722d20c9
--- /dev/null
+++ b/layout/reftests/bugs/387876-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Bug 387876 Reference Case 1</title>
+</head>
+<body>
+ The yellow box should say 'ab'.
+ <div style="column-width: 30px;
+ column-gap: 0px;
+ height: 0px;
+ ">
+ <div id="weirdDiv"
+ style="background: yellow;">ab</div>
+ z
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-1.html b/layout/reftests/bugs/387876-1.html
new file mode 100644
index 0000000000..20c84bcf54
--- /dev/null
+++ b/layout/reftests/bugs/387876-1.html
@@ -0,0 +1,22 @@
+<html class="reftest-wait">
+<head>
+<title>Bug 387876 Test Case 1</title>
+<script>
+ function tweak() {
+ document.getElementById('weirdDiv').textContent += 'b';
+ document.documentElement.className = '';
+ }
+</script>
+</head>
+<body onload="setTimeout(tweak, 10);">
+ The yellow box should say 'ab'.
+ <div style="column-width: 30px;
+ column-gap: 0px;
+ height: 0px;
+ ">
+ <div id="weirdDiv"
+ style="background: yellow;">a</div>
+ z
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-2-ref.html b/layout/reftests/bugs/387876-2-ref.html
new file mode 100644
index 0000000000..ffcce37b1c
--- /dev/null
+++ b/layout/reftests/bugs/387876-2-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>Bug 387876 Reference Case 2</title>
+</head>
+<body>
+ <div style="width:100%; height:0px;
+ column-width: 20px; column-gap: 10px;">
+ <div style="background: lightblue;">a</div>
+ <p id="weird"
+ style="background: lightgreen">b cd</p>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-2.html b/layout/reftests/bugs/387876-2.html
new file mode 100644
index 0000000000..b2bbf830b5
--- /dev/null
+++ b/layout/reftests/bugs/387876-2.html
@@ -0,0 +1,19 @@
+<html class="reftest-wait">
+<head>
+<title>Bug 387876 Test Case 2</title>
+<script>
+ function tweak() {
+ document.getElementById('weird').textContent += 'd';
+ document.documentElement.className = '';
+ }
+</script>
+</head>
+<body onload="setTimeout(tweak, 10);">
+ <div style="width:100%; height:0px;
+ column-width: 20px; column-gap: 10px;">
+ <div style="background: lightblue;">a</div>
+ <p id="weird"
+ style="background: lightgreen">b c</p>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-3-ref.html b/layout/reftests/bugs/387876-3-ref.html
new file mode 100644
index 0000000000..de4f912495
--- /dev/null
+++ b/layout/reftests/bugs/387876-3-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+ <div style="column-width: 60px; height: 60px; background: yellow;">
+ title
+ <p id="p" style="background: lightgreen">
+ below
+ </p>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-3a.html b/layout/reftests/bugs/387876-3a.html
new file mode 100644
index 0000000000..a84cdf2a62
--- /dev/null
+++ b/layout/reftests/bugs/387876-3a.html
@@ -0,0 +1,19 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ document.getElementById('p').textContent = 'below';
+ document.documentElement.className = '';
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div style="column-width: 60px; height: 60px; background: yellow;">
+ title
+ <p id="p" style="background: lightgreen">
+ line
+ break
+ </p>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/387876-3b.html b/layout/reftests/bugs/387876-3b.html
new file mode 100644
index 0000000000..3f29a9c18d
--- /dev/null
+++ b/layout/reftests/bugs/387876-3b.html
@@ -0,0 +1,28 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ document.getElementById('p').textContent = 'below';
+ document.documentElement.className = '';
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div style="column-width: 60px; height: 60px; background: yellow;">
+ title
+ <p id="p" style="background: lightgreen">
+ line
+ break
+ [middle]
+ line
+ break
+ [middle]
+ line
+ break
+ [middle]
+ line
+ break
+ </p>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/388026-1-ref.html b/layout/reftests/bugs/388026-1-ref.html
new file mode 100644
index 0000000000..7fa6a2ba74
--- /dev/null
+++ b/layout/reftests/bugs/388026-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0; text-align:right;">m</body>
+</html>
diff --git a/layout/reftests/bugs/388026-1.html b/layout/reftests/bugs/388026-1.html
new file mode 100644
index 0000000000..4932fd3cf0
--- /dev/null
+++ b/layout/reftests/bugs/388026-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0; text-align:right;">m </body>
+</html>
diff --git a/layout/reftests/bugs/389074-1-ref.html b/layout/reftests/bugs/389074-1-ref.html
new file mode 100644
index 0000000000..69e68a114d
--- /dev/null
+++ b/layout/reftests/bugs/389074-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<!-- check that U+FEFF doesn't disrupt glyph rendering, see bug 389074 comments 26, 30 -->
+<html>
+ <div style="font-size: large; font-family: sans-serif;">
+ <!-- leave one FEFF in the text to maintain same line height -->
+ <p>&#xfeff;ABC</p>
+ </div>
+</html>
diff --git a/layout/reftests/bugs/389074-1.html b/layout/reftests/bugs/389074-1.html
new file mode 100644
index 0000000000..70ec4e3320
--- /dev/null
+++ b/layout/reftests/bugs/389074-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<!-- check that U+FEFF doesn't disrupt glyph rendering, see bug 389074 comments 26, 30 -->
+<html>
+ <div style="font-size: large; font-family: sans-serif;">
+ <p>&#xfeff;A&#xfeff;B&#xfeff;C&#xfeff;</p>
+ </div>
+</html>
diff --git a/layout/reftests/bugs/389224-1-ref.html b/layout/reftests/bugs/389224-1-ref.html
new file mode 100644
index 0000000000..8e96f27773
--- /dev/null
+++ b/layout/reftests/bugs/389224-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; left:10px; top:10px; width:100px; height:100px; background:lime">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389224-1.html b/layout/reftests/bugs/389224-1.html
new file mode 100644
index 0000000000..01b7990c68
--- /dev/null
+++ b/layout/reftests/bugs/389224-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d" style="position:absolute; left:10px; top:10px; width:10px; height:10px; clip:rect(auto,100px,50px,auto)">
+ <div style="width:100px; height:100px; background:lime;"></div>
+</div>
+<script>
+var d = document.getElementById("d");
+function doTest() {
+ d.style.clip = "";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389224-2.html b/layout/reftests/bugs/389224-2.html
new file mode 100644
index 0000000000..354b9a9138
--- /dev/null
+++ b/layout/reftests/bugs/389224-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d" style="position:absolute; left:10px; top:10px; width:10px; height:10px;">
+ <div style="width:100px; height:100px; background:lime;"></div>
+</div>
+<script>
+var d = document.getElementById("d");
+function doTest() {
+ d.style.clip = "rect(0,0,0,0)";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389468-1-ref.html b/layout/reftests/bugs/389468-1-ref.html
new file mode 100644
index 0000000000..2d31941cd9
--- /dev/null
+++ b/layout/reftests/bugs/389468-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <table id="t" style="border:1px solid black; width:50em;">
+ <tbody>
+ <tr>
+ <td>China's Leader Closes Door to Reform - New York Times<br/>
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ a game Monday outside the Great Hall of the People. By
+ JOS...<span style="white-space: nowrap;"> all 1,062 news
+ articles</span></td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
+ \ No newline at end of file
diff --git a/layout/reftests/bugs/389468-1.html b/layout/reftests/bugs/389468-1.html
new file mode 100644
index 0000000000..1d22363154
--- /dev/null
+++ b/layout/reftests/bugs/389468-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <table id="t" style="border:1px solid black;">
+ <tbody>
+ <tr>
+ <td>China's Leader Closes Door to Reform - New York Times<br/>
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ Hostesses for the Communist Party's 17th National Congress played
+ a game Monday outside the Great Hall of the People. By
+ JOS...<span style="white-space: nowrap;"> all 1,062 news
+ articles</span></td>
+ </tr>
+ </tbody>
+ </table>
+ <script>
+document.body.offsetTop;
+var t = document.getElementById("t");
+// comment out the following line to see the correct rendering
+t.style.width = "4em";
+document.body.offsetTop;
+t.style.width = "50em";
+ </script>
+</body>
+</html>
+ \ No newline at end of file
diff --git a/layout/reftests/bugs/389623-1-ref.html b/layout/reftests/bugs/389623-1-ref.html
new file mode 100644
index 0000000000..f642da123f
--- /dev/null
+++ b/layout/reftests/bugs/389623-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.float, .float + div {
+ float: left;
+ height: 200px;
+ width: 100px;
+ background: #ccc;
+}
+.float + div{
+ float:right;
+}
+#bg {
+ background: #999;
+ height: 100px;
+}
+</style>
+</head>
+<body>
+<div class="float"></div>
+<div></div>
+<div id="bg"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389623-1.html b/layout/reftests/bugs/389623-1.html
new file mode 100644
index 0000000000..4c230797ff
--- /dev/null
+++ b/layout/reftests/bugs/389623-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.float, .float + div {
+ float: left;
+ height: 200px;
+ width: 100px;
+ background: #ccc;
+}
+.float + div{
+ float:right;
+}
+#bg {
+ background: url() #999 fixed;
+ height: 100px;
+}
+</style>
+</head>
+<body>
+<div class="float"></div>
+<div></div>
+<div id="bg"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389636-1.html b/layout/reftests/bugs/389636-1.html
new file mode 100644
index 0000000000..e3ab2cabef
--- /dev/null
+++ b/layout/reftests/bugs/389636-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+function finishTest()
+{
+ document.documentElement.className = "";
+}
+
+function boom()
+{
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
+ var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+
+ var clonedRichListBox = document.createElementNS(XUL_NS, 'richlistbox').cloneNode(false);
+ var div = document.createElementNS(HTML_NS, "div");
+
+ div.appendChild(clonedRichListBox);
+
+ document.body.appendChild(clonedRichListBox);
+
+ setTimeout(finishTest, 100);
+}
+
+</script>
+
+</head>
+<body onload="setTimeout(boom, 100);" style="visibility: hidden">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/389924-1-ref.html b/layout/reftests/bugs/389924-1-ref.html
new file mode 100644
index 0000000000..d8fbd84010
--- /dev/null
+++ b/layout/reftests/bugs/389924-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<table id="table"><caption>THIS SHOULD BE VISIBLE</caption><tbody></tbody></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389924-1a.html b/layout/reftests/bugs/389924-1a.html
new file mode 100644
index 0000000000..d6eaa02ea8
--- /dev/null
+++ b/layout/reftests/bugs/389924-1a.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var table = document.getElementById("table");
+
+ var newCaption = document.createElement('caption');
+ newCaption.appendChild(document.createTextNode("THIS SHOULD BE VISIBLE"));
+ table.insertBefore(newCaption, table.firstChild);
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<table id="table"><tbody></tbody></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/389924-1b.html b/layout/reftests/bugs/389924-1b.html
new file mode 100644
index 0000000000..4c6af6fee8
--- /dev/null
+++ b/layout/reftests/bugs/389924-1b.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var table = document.getElementById("table");
+
+ var newCaption = document.createElement('caption');
+ newCaption.appendChild(document.createTextNode("THIS SHOULD BE VISIBLE"));
+ table.appendChild(newCaption);
+ table.appendChild(document.createElement("tbody"));
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<table id="table"></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/390318-1-ref.html b/layout/reftests/bugs/390318-1-ref.html
new file mode 100644
index 0000000000..5524321cdb
--- /dev/null
+++ b/layout/reftests/bugs/390318-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; }</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1a.html b/layout/reftests/bugs/390318-1a.html
new file mode 100644
index 0000000000..da4e295fdc
--- /dev/null
+++ b/layout/reftests/bugs/390318-1a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: red; } body { color: green</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1b.html b/layout/reftests/bugs/390318-1b.html
new file mode 100644
index 0000000000..39282e02e0
--- /dev/null
+++ b/layout/reftests/bugs/390318-1b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: red; } body { color: green !important</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1c.html b/layout/reftests/bugs/390318-1c.html
new file mode 100644
index 0000000000..94853bbccf
--- /dev/null
+++ b/layout/reftests/bugs/390318-1c.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: red; } body { color: green ;</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1d.html b/layout/reftests/bugs/390318-1d.html
new file mode 100644
index 0000000000..6c7a1c4d68
--- /dev/null
+++ b/layout/reftests/bugs/390318-1d.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: red; } body { color: green !important ;</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1e.html b/layout/reftests/bugs/390318-1e.html
new file mode 100644
index 0000000000..2693566c95
--- /dev/null
+++ b/layout/reftests/bugs/390318-1e.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; } body { color: red a</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/390318-1f.html b/layout/reftests/bugs/390318-1f.html
new file mode 100644
index 0000000000..8107525244
--- /dev/null
+++ b/layout/reftests/bugs/390318-1f.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; } body { color: red !important a</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/391045-ref.html b/layout/reftests/bugs/391045-ref.html
new file mode 100644
index 0000000000..cab36daf0c
--- /dev/null
+++ b/layout/reftests/bugs/391045-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 391045 -->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>reftest for bug 391045</title>
+ </head>
+ <style type="text/css">
+ body {
+ font-size: 24pt;
+ }
+ </style>
+ <body>
+ <p>നെ à´¤àµà´Ÿà´°àµâ€à´¨àµà´¨à´¾à´£àµ ആര&zwj;&zwnj;.</p>
+ <!-- note the extra zwnj before the period; this is needed to prevent
+ the zwj causing font fallback choices to propagate further
+ (see gfxFontGroup::FindFontForChar). -->
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/391045.html b/layout/reftests/bugs/391045.html
new file mode 100644
index 0000000000..810fa5c6c8
--- /dev/null
+++ b/layout/reftests/bugs/391045.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<!-- Reftest for bug 391045 -->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>reftest for bug 391045</title>
+ </head>
+ <style type="text/css">
+ body {
+ font-size: 24pt;
+ }
+ </style>
+ <body>
+ <p>നെ à´¤àµà´Ÿà´°àµâ€à´¨àµà´¨à´¾à´£àµ ആര.</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/391140-1-ref.html b/layout/reftests/bugs/391140-1-ref.html
new file mode 100644
index 0000000000..f2e7e47472
--- /dev/null
+++ b/layout/reftests/bugs/391140-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="display: table">
+<div style="display: table-row-group">
+<div style="display: table-row">
+<input style="display: table-cell;" type="image">
+<input style="display: table-cell;" type="image">
+</div>
+</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391140-1.html b/layout/reftests/bugs/391140-1.html
new file mode 100644
index 0000000000..b649ef2005
--- /dev/null
+++ b/layout/reftests/bugs/391140-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input style="display: table-cell;" type="image">
+<input style="display: table-cell;" type="image">
+</body>
+</html>
diff --git a/layout/reftests/bugs/391412-1-ref.html b/layout/reftests/bugs/391412-1-ref.html
new file mode 100644
index 0000000000..e3474a8e29
--- /dev/null
+++ b/layout/reftests/bugs/391412-1-ref.html
@@ -0,0 +1,8 @@
+<html><head>
+<title>Testcase bug 391412 – Regression in float layout causing "clear:" to be ignored</title>
+</head>
+<body>
+<div style="width: 400px; height: 400px; background-color: lime;">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391412-1a.html b/layout/reftests/bugs/391412-1a.html
new file mode 100644
index 0000000000..f2616cf115
--- /dev/null
+++ b/layout/reftests/bugs/391412-1a.html
@@ -0,0 +1,11 @@
+<html><head>
+<title>Testcase bug 391412 – Regression in float layout causing "clear:" to be ignored</title>
+</head>
+<body>
+<div style="width: 400px; height: 400px; background-color: red;">
+ <div style="float:left; width: 100%; background-color: lime;">
+ <div style="float: left; width: 100%; margin-right: -100%; height: 400px;"></div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391412-1b.html b/layout/reftests/bugs/391412-1b.html
new file mode 100644
index 0000000000..a14f429f9c
--- /dev/null
+++ b/layout/reftests/bugs/391412-1b.html
@@ -0,0 +1,11 @@
+<html><head>
+<title>Testcase bug 391412 – Regression in float layout causing "clear:" to be ignored</title>
+</head>
+<body>
+<div style="width: 400px; height: 400px; background-color: red;">
+ <div style="float:left; width: 100%; background-color: lime;">
+ <div style="float: right; width: 100%; margin-left:-100%; height: 400px;"></div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391909-1-ref.html b/layout/reftests/bugs/391909-1-ref.html
new file mode 100644
index 0000000000..e30535dd91
--- /dev/null
+++ b/layout/reftests/bugs/391909-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div id="source" style="width: 3ch"></div>
+ <div id="target" style="width: 0">
+ This is a test
+ </div>
+ <script>
+ document.getElementById("target").style.lineHeight =
+ document.defaultView
+ .getComputedStyle(document.getElementById("source")).width;
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/391909-1.html b/layout/reftests/bugs/391909-1.html
new file mode 100644
index 0000000000..34b2d069a0
--- /dev/null
+++ b/layout/reftests/bugs/391909-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="line-height: 3ch; width: 0">
+This is a test
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391979-ref.html b/layout/reftests/bugs/391979-ref.html
new file mode 100644
index 0000000000..224e6f05ec
--- /dev/null
+++ b/layout/reftests/bugs/391979-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 391979</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+ div { background:green; width:20ch; height:4ch; }
+ </style>
+</head>
+<body>
+<div>green</div>
+<div>green</div>
+<div>green</div>
+<div>green</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391979.html b/layout/reftests/bugs/391979.html
new file mode 100644
index 0000000000..b2a1c58383
--- /dev/null
+++ b/layout/reftests/bugs/391979.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 391979</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+ .float { float:left; clear:both; }
+ .t1 { column-count:2; column-width: 9ch; column-gap: 2ch; background:red; height:4ch; }
+
+ .abs { position:absolute; width:20ch; height:4ch; }
+
+ .red { background:red; }
+ .green { background:green; }
+ </style>
+</head>
+<body>
+<div class="abs green" style="left:0; top:0;">green</div>
+<div class="abs red" style="left:0; top:4ch; z-index:-1;">green</div>
+<div class="abs green" style="left:0; top:8ch; z-index:2;">green</div>
+<div class="abs red" style="left:0; top:12ch;">green</div>
+
+<div class="float">
+ <div class="t1 red">green</div>
+</div>
+
+<div class="float">
+ <div class="t1 green">green</div>
+</div>
+
+<div class="t1" style="position: absolute; top:8ch; ">green</div>
+<div class="t1 green" style="position: absolute; top:12ch; z-index:2;">green</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/391994-1-ref.html b/layout/reftests/bugs/391994-1-ref.html
new file mode 100644
index 0000000000..0ea20b39e0
--- /dev/null
+++ b/layout/reftests/bugs/391994-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<select>
+<option>1
+<option selected>2
+</select>
+</body>
+</html>
diff --git a/layout/reftests/bugs/391994-1.html b/layout/reftests/bugs/391994-1.html
new file mode 100644
index 0000000000..b9c9cc65d8
--- /dev/null
+++ b/layout/reftests/bugs/391994-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script>
+ var sel = document.createElement("select");
+ sel.appendChild(new Option(1));
+ var opt = new Option(2);
+ opt.setAttribute("selected", "selected");
+ sel.appendChild(opt);
+ document.body.appendChild(sel);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/392047-ref.html b/layout/reftests/bugs/392047-ref.html
new file mode 100644
index 0000000000..8fdc32b0a3
--- /dev/null
+++ b/layout/reftests/bugs/392047-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<head><title>bug 392047</title>
+<style>
+table {empty-cells:show;
+background-color:red;
+padding:0;
+border-spacing:0}
+td {background-color:green;
+padding:0;
+color:green}
+</style>
+</head>
+
+<body>
+<table>
+ <tr><td></td><td>X</td></tr>
+ <tr><td>X</td><td></td></tr>
+ </table>
+ </body>
+ </html> \ No newline at end of file
diff --git a/layout/reftests/bugs/392047.html b/layout/reftests/bugs/392047.html
new file mode 100644
index 0000000000..aad83cfb4c
--- /dev/null
+++ b/layout/reftests/bugs/392047.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<head><title>bug 392047</title>
+<style>
+table {empty-cells:hide;
+background-color:red;
+padding:0;
+border-spacing:0;
+border-collapse:collapse;}
+td {background-color:green;
+padding:0;
+color:green}
+</style>
+</head>
+
+<body>
+<table>
+ <tr><td></td><td>X</td></tr>
+ <tr><td>X</td><td></td></tr>
+ </table>
+ </body>
+ </html> \ No newline at end of file
diff --git a/layout/reftests/bugs/392435-1-ref.html b/layout/reftests/bugs/392435-1-ref.html
new file mode 100644
index 0000000000..87669f5034
--- /dev/null
+++ b/layout/reftests/bugs/392435-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span {
+ font-weight:bold;
+ font-style: italic;
+ font-size: 200%;
+ font-variant: small-caps;
+ font-family: sans-serif;
+ color:red;
+}
+span.line {
+ background: yellow;
+ text-decoration: line-through;
+}
+</style>
+</head>
+<body>
+<p><span>H</span>ello
+<div><span class="line">Hello</span><br>Kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/392435-1.html b/layout/reftests/bugs/392435-1.html
new file mode 100644
index 0000000000..a348ab3be3
--- /dev/null
+++ b/layout/reftests/bugs/392435-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span, p:first-letter, div:first-line {
+ font-weight:bold;
+ font-style: italic;
+ font-size: 200%;
+ font-variant: small-caps;
+ font-family: sans-serif;
+ color:red;
+}
+span, div:first-line {
+ background: yellow;
+ text-decoration: line-through;
+}
+</style>
+</head>
+<body>
+<p><span></span>Hello
+<div>Hello<br>Kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393330-1-ref.html b/layout/reftests/bugs/393330-1-ref.html
new file mode 100644
index 0000000000..94bf100f1a
--- /dev/null
+++ b/layout/reftests/bugs/393330-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ #div > div { text-indent: 0 }
+ div > div > div { display: inline-block; width: 30px; }
+ body > div > div { text-decoration: underline; }
+</style>
+<body>
+<div style="height: 20px; line-height: 20px; column-width: 100px;
+ column-gap: 0px">
+<div id="div" style="text-indent: 30px;">
+ <div>a</div>
+ <div>a</div>
+</div>
+<div>
+ <div>a</div>
+ <div>a</div>
+ <div>a</div>
+</div>
+<div>
+ <div>a</div>
+ <div>a</div>
+ <div>a</div>
+</div>
+<div>
+ <div style="width: 100px">b</div>
+</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393330-1.html b/layout/reftests/bugs/393330-1.html
new file mode 100644
index 0000000000..90b17dafc7
--- /dev/null
+++ b/layout/reftests/bugs/393330-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ document.getElementById("div").style.width = "-moz-fit-content";
+}
+</script>
+<style type="text/css">
+#div > div { text-indent: 0; display: inline-block; width: 30px }
+</style>
+</head>
+<body onload="boom();">
+
+<div style="height: 20px; line-height: 20px; column-width: 100px;
+ column-gap: 0px">
+<div id="div" style="text-indent: 30px; text-decoration: underline;">
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div>a</div>
+<div style="width: 100px">b</div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393490-1-ref.html b/layout/reftests/bugs/393490-1-ref.html
new file mode 100644
index 0000000000..0d16136170
--- /dev/null
+++ b/layout/reftests/bugs/393490-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<body onclick="">
+<div style="float:left;width:500px; border: 1px solid black;">
+ <div>
+ <div style="float:right;">
+ <div style="padding-top: 50px; background-color: green;">
+ <img id="a" src="" style="width:300px">
+ </div>
+
+ </div>
+ <div style="float:right;width:150px;height:150px;clear:right; background-color:blue;"></div>
+ <h2>This text should not overlap with the green box</h2>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393490-1.html b/layout/reftests/bugs/393490-1.html
new file mode 100644
index 0000000000..d8680908ab
--- /dev/null
+++ b/layout/reftests/bugs/393490-1.html
@@ -0,0 +1,20 @@
+<html>
+<body onclick="">
+<div style="float:left;width:500px; border: 1px solid black;">
+ <div>
+ <div style="float:right;">
+ <div style="padding-top: 50px; background-color: green;">
+ <img id="a" src="">
+ </div>
+
+ </div>
+ <div style="float:right;width:150px;height:150px;clear:right; background-color:blue;"></div>
+ <h2>This text should not overlap with the green box</h2>
+ </div>
+</div>
+<script>
+document.body.offsetTop;
+document.getElementById('a').style.width='300px';
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393517-1.xhtml b/layout/reftests/bugs/393517-1.xhtml
new file mode 100644
index 0000000000..5c22769f8b
--- /dev/null
+++ b/layout/reftests/bugs/393517-1.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<head>
+<script>
+function boom()
+{
+ document.getElementById("inxul").appendChild(document.getElementById("floater"));
+}
+</script>
+</head>
+
+<body onload="boom()">
+
+<xul:vbox><span id="inxul"><div/></span></xul:vbox>
+
+<span style="float: left;" id="floater"></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393649-1-ref.html b/layout/reftests/bugs/393649-1-ref.html
new file mode 100644
index 0000000000..b36980efbe
--- /dev/null
+++ b/layout/reftests/bugs/393649-1-ref.html
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script>
+function boom()
+{
+ find("XXX");
+}
+</script>
+</head>
+
+<body onload="boom();" style="width: 15em;">
+<div style="column-count: 2;">
+<span id="span"><div>yo yo yo yo yo yo yo yo</div>XXX</span>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393649-1.html b/layout/reftests/bugs/393649-1.html
new file mode 100644
index 0000000000..967a9c6510
--- /dev/null
+++ b/layout/reftests/bugs/393649-1.html
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script>
+function boom()
+{
+ document.getElementById("span").appendChild(document.createTextNode("XXX"));
+ find("XXX");
+}
+</script>
+</head>
+
+<body onload="boom();" style="width: 15em;">
+<div style="column-count: 2;">
+<span id="span"><div>yo yo yo yo yo yo yo yo</div></span>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-1-ref.html b/layout/reftests/bugs/393655-1-ref.html
new file mode 100644
index 0000000000..22916ffe98
--- /dev/null
+++ b/layout/reftests/bugs/393655-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+ <span id="editMe" style="margin-bottom: 1px;">
+ a
+ </span>
+ <div>
+ b
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-1.html b/layout/reftests/bugs/393655-1.html
new file mode 100644
index 0000000000..dc1048bd5d
--- /dev/null
+++ b/layout/reftests/bugs/393655-1.html
@@ -0,0 +1,18 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ var editMe = document.getElementById('editMe');
+ editMe.innerHTML="a";
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <span id="editMe" style="margin-bottom: 1px;">
+ </span>
+ <div>
+ b
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-2-ref.html b/layout/reftests/bugs/393655-2-ref.html
new file mode 100644
index 0000000000..7cdc75c34b
--- /dev/null
+++ b/layout/reftests/bugs/393655-2-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+ <span id="editMe" style="margin-top: 1px;">
+ a
+ </span>
+ <div>
+ b
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-2.html b/layout/reftests/bugs/393655-2.html
new file mode 100644
index 0000000000..3de1db67e6
--- /dev/null
+++ b/layout/reftests/bugs/393655-2.html
@@ -0,0 +1,18 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ var editMe = document.getElementById('editMe');
+ editMe.innerHTML="a";
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <span id="editMe" style="margin-top: 1px;">
+ </span>
+ <div>
+ b
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-3-ref.html b/layout/reftests/bugs/393655-3-ref.html
new file mode 100644
index 0000000000..5ea94b3cc6
--- /dev/null
+++ b/layout/reftests/bugs/393655-3-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+ Foo
+ <div id="editMe" style="margin-bottom: 50px;">
+ a
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-3.html b/layout/reftests/bugs/393655-3.html
new file mode 100644
index 0000000000..50c5276da8
--- /dev/null
+++ b/layout/reftests/bugs/393655-3.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ var editMe = document.getElementById('editMe');
+ editMe.innerHTML="a";
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ Foo
+ <div id="editMe" style="margin-bottom: 50px;">
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-4-ref.html b/layout/reftests/bugs/393655-4-ref.html
new file mode 100644
index 0000000000..e8a9cbb7e0
--- /dev/null
+++ b/layout/reftests/bugs/393655-4-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+ Foo
+ <div id="editMe" style="margin-top: 50px;">
+ a
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-4.html b/layout/reftests/bugs/393655-4.html
new file mode 100644
index 0000000000..81358e2c1c
--- /dev/null
+++ b/layout/reftests/bugs/393655-4.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ var editMe = document.getElementById('editMe');
+ editMe.innerHTML="a";
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ Foo
+ <div id="editMe" style="margin-top: 50px;">
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-5-ref.html b/layout/reftests/bugs/393655-5-ref.html
new file mode 100644
index 0000000000..53f01254df
--- /dev/null
+++ b/layout/reftests/bugs/393655-5-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+ Foo
+ <div id="editMe" style="margin-bottom: 50px; margin-top: 50px;">
+ a
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393655-5.html b/layout/reftests/bugs/393655-5.html
new file mode 100644
index 0000000000..e587de9ebb
--- /dev/null
+++ b/layout/reftests/bugs/393655-5.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function tweak() {
+ var editMe = document.getElementById('editMe');
+ editMe.innerHTML="a";
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ Foo
+ <div id="editMe" style="margin-bottom: 50px; margin-top: 50px;">
+ </div>
+ <div>Bar</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-1-ref.html b/layout/reftests/bugs/393671-1-ref.html
new file mode 100644
index 0000000000..50df959b99
--- /dev/null
+++ b/layout/reftests/bugs/393671-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+
+<body>
+
+<span><span><div></div><span style="float: right">float</span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-1.html b/layout/reftests/bugs/393671-1.html
new file mode 100644
index 0000000000..01f3982b61
--- /dev/null
+++ b/layout/reftests/bugs/393671-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var floater = document.createElement("span");
+ floater.style.cssFloat = "right";
+ floater.appendChild(document.createTextNode("float"));
+
+ document.getElementById("s").appendChild(floater);
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<span><span id="s"><div></div></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-2-ref.html b/layout/reftests/bugs/393671-2-ref.html
new file mode 100644
index 0000000000..29318484ae
--- /dev/null
+++ b/layout/reftests/bugs/393671-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+
+<body>
+
+<span><span><span><div></div><span style="float: right">float</span></span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-2.html b/layout/reftests/bugs/393671-2.html
new file mode 100644
index 0000000000..81b076e740
--- /dev/null
+++ b/layout/reftests/bugs/393671-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var floater = document.createElement("span");
+ floater.style.cssFloat = "right";
+ floater.appendChild(document.createTextNode("float"));
+
+ document.getElementById("s").appendChild(floater);
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<span><span><span id="s"><div></div></span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-3-ref.html b/layout/reftests/bugs/393671-3-ref.html
new file mode 100644
index 0000000000..33336f5e32
--- /dev/null
+++ b/layout/reftests/bugs/393671-3-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+
+<body>
+
+<span><span><span><span><div></div><span style="float: right">float</span></span></span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/393671-3.html b/layout/reftests/bugs/393671-3.html
new file mode 100644
index 0000000000..abe5ae7a5f
--- /dev/null
+++ b/layout/reftests/bugs/393671-3.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function boom()
+{
+ var floater = document.createElement("span");
+ floater.style.cssFloat = "right";
+ floater.appendChild(document.createTextNode("float"));
+
+ document.getElementById("s").appendChild(floater);
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<span><span><span><span id="s"><div></div></span></span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/394111-1.html b/layout/reftests/bugs/394111-1.html
new file mode 100644
index 0000000000..439307b7cb
--- /dev/null
+++ b/layout/reftests/bugs/394111-1.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<script>
+function boom()
+{
+ var k = document.getElementById("k");
+ k.appendChild(document.createTextNode(" "));
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<span><span id="k"><div></div></span><span style="float: right;"></span></span>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/394534-1-ref.html b/layout/reftests/bugs/394534-1-ref.html
new file mode 100644
index 0000000000..770fe65353
--- /dev/null
+++ b/layout/reftests/bugs/394534-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+test
+<font color="green" color="red">test</font><input type="checkbox" type="text" checked="checked">
+</body>
+</html>
diff --git a/layout/reftests/bugs/394534-1.html b/layout/reftests/bugs/394534-1.html
new file mode 100644
index 0000000000..511930acd2
--- /dev/null
+++ b/layout/reftests/bugs/394534-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table>
+test
+<font color="green" color="red">test</font><input type="checkbox" type="text" checked="checked">
+</body>
+</html>
diff --git a/layout/reftests/bugs/395107-1-ref.html b/layout/reftests/bugs/395107-1-ref.html
new file mode 100644
index 0000000000..176a294966
--- /dev/null
+++ b/layout/reftests/bugs/395107-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<select id="a" size="5">
+<option>Option 1</option>
+<option selected>Option 2</option>
+<option selected>Option 3</option>
+<option selected>Option 4</option>
+</select>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/395107-1.html b/layout/reftests/bugs/395107-1.html
new file mode 100644
index 0000000000..e3cea8b472
--- /dev/null
+++ b/layout/reftests/bugs/395107-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<select id="a" size="5">
+<option>Option 1</option>
+<option>Option 2</option>
+<option>Option 3</option>
+<option>Option 4</option>
+</select>
+
+<script>
+document.body.offsetWidth;
+var x=document.getElementById('a').options;
+x[1].defaultSelected = true;
+x[2].defaultSelected = true;
+x[3].defaultSelected = true;
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/395107-2-ref.html b/layout/reftests/bugs/395107-2-ref.html
new file mode 100644
index 0000000000..a7915b5972
--- /dev/null
+++ b/layout/reftests/bugs/395107-2-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<select id="a">
+<option>Option 1</option>
+<option selected>Option 2</option>
+<option selected>Option 3</option>
+<option selected>Option 4</option>
+</select>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/395107-2.html b/layout/reftests/bugs/395107-2.html
new file mode 100644
index 0000000000..cb049a72f9
--- /dev/null
+++ b/layout/reftests/bugs/395107-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<select id="a">
+<option>Option 1</option>
+<option>Option 2</option>
+<option>Option 3</option>
+<option>Option 4</option>
+</select>
+
+<script>
+document.body.offsetWidth;
+var x=document.getElementById('a').options;
+x[1].defaultSelected = true;
+x[2].defaultSelected = true;
+x[3].defaultSelected = true;
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/395107-3-ref.html b/layout/reftests/bugs/395107-3-ref.html
new file mode 100644
index 0000000000..82d3a53668
--- /dev/null
+++ b/layout/reftests/bugs/395107-3-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select size="2">
+ <option selected disabled>Option one</option>
+ <option>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395107-3.html b/layout/reftests/bugs/395107-3.html
new file mode 100644
index 0000000000..aed85f0b98
--- /dev/null
+++ b/layout/reftests/bugs/395107-3.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body onload='var elem1 = document.getElementById("one");
+ elem1.setAttribute("selected", "selected");'>
+ <select size="2">
+ <option id="one" disabled>Option one</option>
+ <option id="two" selected>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395107-4-ref.html b/layout/reftests/bugs/395107-4-ref.html
new file mode 100644
index 0000000000..fb3586f0ba
--- /dev/null
+++ b/layout/reftests/bugs/395107-4-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select>
+ <option selected disabled>Option one</option>
+ <option>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395107-4.html b/layout/reftests/bugs/395107-4.html
new file mode 100644
index 0000000000..23b7c9086c
--- /dev/null
+++ b/layout/reftests/bugs/395107-4.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body onload='var elem1 = document.getElementById("one");
+ elem1.setAttribute("selected", "selected");'>
+ <select>
+ <option id="one" disabled>Option one</option>
+ <option id="two" selected>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395107-5-ref.html b/layout/reftests/bugs/395107-5-ref.html
new file mode 100644
index 0000000000..89058e1cf3
--- /dev/null
+++ b/layout/reftests/bugs/395107-5-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select size="2">
+ <option>Option one</option>
+ <option>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395107-5.html b/layout/reftests/bugs/395107-5.html
new file mode 100644
index 0000000000..19505b11f4
--- /dev/null
+++ b/layout/reftests/bugs/395107-5.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body onload='var elem2 = document.getElementById("two");
+ elem2.removeAttribute("selected");'>
+ <select size="2">
+ <option id="one">Option one</option>
+ <option id="two" selected>Option two</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/395130-1-ref.html b/layout/reftests/bugs/395130-1-ref.html
new file mode 100644
index 0000000000..5ee85a24b9
--- /dev/null
+++ b/layout/reftests/bugs/395130-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+
+<input class="a">
+<input class="a">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/395130-1.html b/layout/reftests/bugs/395130-1.html
new file mode 100644
index 0000000000..f95e8e237d
--- /dev/null
+++ b/layout/reftests/bugs/395130-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style id="s">
+.a { position: absolute; }
+</style>
+</head>
+<body onload="document.getElementById('s').textContent = '';">
+
+<input class="a">
+<input class="a">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/395130-2-ref.html b/layout/reftests/bugs/395130-2-ref.html
new file mode 100644
index 0000000000..a26d9ee9f2
--- /dev/null
+++ b/layout/reftests/bugs/395130-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body><script>
+window.onload = function() {
+ var a = document.createTextNode("a ");
+ var b = document.createElement("input");
+ var c = document.createTextNode(" c");
+ document.body.appendChild(a);
+ document.body.appendChild(b);
+ document.body.appendChild(c);
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/395130-2.html b/layout/reftests/bugs/395130-2.html
new file mode 100644
index 0000000000..56cae0cff6
--- /dev/null
+++ b/layout/reftests/bugs/395130-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<body><script>
+window.onload = function() {
+ var a = document.createTextNode("a ");
+ var b = document.createElement("input");
+ var c = document.createTextNode(" c");
+ document.body.appendChild(a);
+ document.body.appendChild(c);
+ document.body.offsetWidth;
+ document.body.insertBefore(b, c);
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/395390-1-ref.html b/layout/reftests/bugs/395390-1-ref.html
new file mode 100644
index 0000000000..4155938b45
--- /dev/null
+++ b/layout/reftests/bugs/395390-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<img src='data:text/plain,' alt="initial. I'M INVISIBLE!">
+</body>
+</html>
diff --git a/layout/reftests/bugs/395390-1.html b/layout/reftests/bugs/395390-1.html
new file mode 100644
index 0000000000..fdbdec35aa
--- /dev/null
+++ b/layout/reftests/bugs/395390-1.html
@@ -0,0 +1,14 @@
+<html class="reftest-wait">
+<head>
+<script type='text/javascript'>
+function changeAltText(img)
+{
+ img.alt = img.alt + ". I'M INVISIBLE!";
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="changeAltText(document.images[0])">
+<img src='data:text/plain,' alt="initial">
+</body>
+</html>
diff --git a/layout/reftests/bugs/397428-1-ref.html b/layout/reftests/bugs/397428-1-ref.html
new file mode 100644
index 0000000000..83832ef3fa
--- /dev/null
+++ b/layout/reftests/bugs/397428-1-ref.html
@@ -0,0 +1,6 @@
+<html class="reftest-paged">
+<body>
+ <div style="page-break-after:always;"></div>
+ <br><br>
+ Head
+</body></html>
diff --git a/layout/reftests/bugs/397428-1.html b/layout/reftests/bugs/397428-1.html
new file mode 100644
index 0000000000..58eb4f0d6a
--- /dev/null
+++ b/layout/reftests/bugs/397428-1.html
@@ -0,0 +1,8 @@
+<html class="reftest-paged">
+<body>
+ <div style="page-break-after:always;"></div>
+ <table cellspacing="0" border="0" cellpadding="0"><tbody><tr><td>
+ <table cellspacing="0" border="0" cellpadding="0"><tbody><tr><td><br><br></td></tr></tbody></table>
+ Head
+ </td></tr></tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/397844-1-ref.xhtml b/layout/reftests/bugs/397844-1-ref.xhtml
new file mode 100644
index 0000000000..4be48a4b8c
--- /dev/null
+++ b/layout/reftests/bugs/397844-1-ref.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<style>
+.fl:first-letter { }
+</style>
+</head>
+
+<body dir="rtl">
+
+<div class="fl" style="padding: 0;"><span>abc</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/397844-1.xhtml b/layout/reftests/bugs/397844-1.xhtml
new file mode 100644
index 0000000000..2f50f1c7d9
--- /dev/null
+++ b/layout/reftests/bugs/397844-1.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<style>
+.fl:first-letter { }
+</style>
+</head>
+
+<body dir="rtl" onload="document.getElementById('t').style.padding = '0';">
+
+<div class="fl" id="t"><span>abc</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/398092-1-ref.html b/layout/reftests/bugs/398092-1-ref.html
new file mode 100644
index 0000000000..c045660a0b
--- /dev/null
+++ b/layout/reftests/bugs/398092-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body>
+
+<div style="float:left; width:10px; height:500px; background:blue; display: block;"></div>
+
+<div style="float:right; height: 100px; width: 20px; background: red;"></div>
+
+<div>
+ <div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange;"></div>
+ asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/398092-1.html b/layout/reftests/bugs/398092-1.html
new file mode 100644
index 0000000000..05d74feab2
--- /dev/null
+++ b/layout/reftests/bugs/398092-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body onload="document.getElementById('blue').style.display = 'block'; ">
+
+<div style="float:left; width:10px; height:500px; background:blue; display: none" id="blue"></div>
+
+<div style="float:right; height: 100px; width: 20px; background: red;"></div>
+
+<div>
+ <div id=b style="float:left; clear: right; width: 100px; height:100px; border: solid orange;"></div>
+ asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf<br>asdf
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/398101-1-ref.html b/layout/reftests/bugs/398101-1-ref.html
new file mode 100644
index 0000000000..2765b37586
--- /dev/null
+++ b/layout/reftests/bugs/398101-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body style="font-family: monospace;">
+
+<div style="width: 3ch; border: 1px solid orange;">
+ <span>a</span> <span>b</span> <span id="c">c</span>
+</div>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/398101-1.html b/layout/reftests/bugs/398101-1.html
new file mode 100644
index 0000000000..603ca92d57
--- /dev/null
+++ b/layout/reftests/bugs/398101-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function boom()
+{
+ var c = document.getElementById("c");
+ var space = document.createTextNode(" ");
+ c.parentNode.insertBefore(space, c);
+}
+
+</script>
+</head>
+<body style="font-family: monospace;" onload="boom();">
+
+<div style="width: 3ch; border: 1px solid orange;">
+ <span>a</span> <span>b</span><span id="c">c</span>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/398144-1-ref.html b/layout/reftests/bugs/398144-1-ref.html
new file mode 100644
index 0000000000..b9e09bedd3
--- /dev/null
+++ b/layout/reftests/bugs/398144-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="height:100px; background-color:blue;"></div>
+<div style="padding:100px 0; opacity:0;">blank line</div>
+<div style="height:100px; background-color:blue;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/398144-1.html b/layout/reftests/bugs/398144-1.html
new file mode 100644
index 0000000000..86e019b62c
--- /dev/null
+++ b/layout/reftests/bugs/398144-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="height:100px; background-color:blue;"></div>
+<div style="margin-top:100px; margin-bottom:100px;">
+ <div style="display:inline-block;"></div>
+</div>
+<div style="height:100px; background-color:blue;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398682-1-ref.html b/layout/reftests/bugs/398682-1-ref.html
new file mode 100644
index 0000000000..27b2987ff5
--- /dev/null
+++ b/layout/reftests/bugs/398682-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#a { color: orange; }
+#b { color: blue; }
+</style>
+
+</head>
+
+<body>
+ <table border="10"><tr id="tr"><td id="td">
+ <p><span id="a">a</span><span id="b">b</span></p>
+ </td></tr></table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/398682-1.html b/layout/reftests/bugs/398682-1.html
new file mode 100644
index 0000000000..0e5793b352
--- /dev/null
+++ b/layout/reftests/bugs/398682-1.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function boom()
+{
+ // Only this exact number of calls to bounce() triggers the bug,
+ // but changing the depth of the document changes the number of
+ // bounce() calls needed. For example, removing the 'p' tag
+ // makes it so one additional bounce() is needed.
+
+ for (var i = 0; i < 7; ++i)
+ bounce();
+
+ var tr = document.getElementById("tr");
+ tr.style.display = "none";
+ document.documentElement.offsetHeight;
+ bounce();
+ document.documentElement.offsetHeight;
+ tr.style.display = "";
+
+ document.documentElement.offsetHeight;
+
+ var td = document.getElementById("td");
+ td.style.display = "none";
+ document.documentElement.offsetHeight;
+ bounce();
+ document.documentElement.offsetHeight;
+ td.style.display = "";
+}
+
+
+function bounce()
+{
+ var docElem = document.documentElement;
+ var docElemChildren = [];
+ while (docElem.firstChild) {
+ docElemChildren.push(docElem.firstChild);
+ docElem.firstChild.remove();
+ }
+
+ for (var i = 0; i < docElemChildren.length; ++i)
+ docElem.appendChild(docElemChildren[i]);
+}
+
+</script>
+
+<style type="text/css">
+#a { color: orange; }
+#b { color: blue; }
+</style>
+
+</head>
+
+<body onload="boom();">
+ <table border="10"><tr id="tr"><td id="td">
+ <p><span id="a">a</span><span id="b">b</span></p>
+ </td></tr></table>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/398797-1-ref.html b/layout/reftests/bugs/398797-1-ref.html
new file mode 100644
index 0000000000..2645cdea45
--- /dev/null
+++ b/layout/reftests/bugs/398797-1-ref.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="398797-style.css"/>
+</head>
+<body>
+ <div class="green">foo</div>
+ <div class="blue">
+ <!-- Note: 'float: left' is necessary here due to bug 402918 -->
+ <span class="yellow" style="float: left">bar</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398797-1a.html b/layout/reftests/bugs/398797-1a.html
new file mode 100644
index 0000000000..ed3613f45f
--- /dev/null
+++ b/layout/reftests/bugs/398797-1a.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<link rel="stylesheet" href="398797-style.css"/>
+</head>
+<body>
+ <div class="green">foo</div>
+ <div class="blue rel in">
+ <span class="yellow abs pos">bar</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398797-1b.html b/layout/reftests/bugs/398797-1b.html
new file mode 100644
index 0000000000..8fb4fc660f
--- /dev/null
+++ b/layout/reftests/bugs/398797-1b.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<link rel="stylesheet" href="398797-style.css"/>
+</head>
+<body>
+ <div class="green">foo</div>
+ <div class="blue rel">
+ <span class="yellow abs pos">bar</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398797-1c.html b/layout/reftests/bugs/398797-1c.html
new file mode 100644
index 0000000000..ade00e52ee
--- /dev/null
+++ b/layout/reftests/bugs/398797-1c.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<link rel="stylesheet" href="398797-style.css"/>
+</head>
+<body>
+ <div class="green">foo</div>
+ <div class="blue abs in">
+ <span class="yellow abs pos">bar</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398797-1d.html b/layout/reftests/bugs/398797-1d.html
new file mode 100644
index 0000000000..5c726daf55
--- /dev/null
+++ b/layout/reftests/bugs/398797-1d.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<link rel="stylesheet" href="398797-style.css"/>
+</head>
+<body>
+ <div class="green">foo</div>
+ <div class="blue abs">
+ <span class="yellow abs pos">bar</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/398797-style.css b/layout/reftests/bugs/398797-style.css
new file mode 100644
index 0000000000..d917dc92b4
--- /dev/null
+++ b/layout/reftests/bugs/398797-style.css
@@ -0,0 +1,13 @@
+/* Size the divs */
+div { width: 50px; height: 50px; }
+
+/* Colors */
+div.green { background: lightgreen; }
+div.blue { background: lightblue; }
+span.yellow { background: yellow; }
+
+/* Positioning */
+.abs { position: absolute; }
+.rel { position: relative; }
+.in { display: inline-block; }
+.pos { top: 0px; left: 0px; }
diff --git a/layout/reftests/bugs/399209-1-ref.html b/layout/reftests/bugs/399209-1-ref.html
new file mode 100644
index 0000000000..2bd458503b
--- /dev/null
+++ b/layout/reftests/bugs/399209-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ table { background: white; }
+ td { color: white; }
+</style>
+</head>
+<body>
+<table>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399209-1.html b/layout/reftests/bugs/399209-1.html
new file mode 100644
index 0000000000..9216db0b14
--- /dev/null
+++ b/layout/reftests/bugs/399209-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+ table { background: white; }
+ col { background: green; }
+ td { color: white; }
+</style>
+<script>
+function boom()
+{
+ var col = document.getElementsByTagName("col")[0];
+ col.remove();
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="boom();">
+<table>
+ <col span="3">
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399209-2-ref.html b/layout/reftests/bugs/399209-2-ref.html
new file mode 100644
index 0000000000..e081b0cda0
--- /dev/null
+++ b/layout/reftests/bugs/399209-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ table { background: white; }
+ td { color: black; }
+</style>
+</head>
+<body>
+<table>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399209-2.html b/layout/reftests/bugs/399209-2.html
new file mode 100644
index 0000000000..4d2b006be5
--- /dev/null
+++ b/layout/reftests/bugs/399209-2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+ table { background: white; }
+ col { visibility: collapse; }
+ td { color: black; }
+</style>
+<script>
+function boom()
+{
+ var col = document.getElementsByTagName("col")[0];
+ col.remove();
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="boom();">
+<table>
+ <col span="3">
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399258-1-ref.html b/layout/reftests/bugs/399258-1-ref.html
new file mode 100644
index 0000000000..6b993707f6
--- /dev/null
+++ b/layout/reftests/bugs/399258-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="position:absolute; top:0; left:0; width:10px; height:10px; background:black;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399258-1.html b/layout/reftests/bugs/399258-1.html
new file mode 100644
index 0000000000..ac4b694882
--- /dev/null
+++ b/layout/reftests/bugs/399258-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="position:absolute; border: 20px solid black;
+ left: -50px; top: -50px; width: 3000px; height: 3000px;
+ border-radius: 160px; clip:rect(50px 60px 60px 50px);">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/399384-1-ref.html b/layout/reftests/bugs/399384-1-ref.html
new file mode 100644
index 0000000000..26959bad23
--- /dev/null
+++ b/layout/reftests/bugs/399384-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+ <style>
+ body { background: lightblue;}
+ .first:first-letter { color: red; }
+ .right { direction: rtl; }
+ </style>
+</head>
+
+<body>
+ <div class="first"><span>abc</span></div>
+ <div class="first"><span class="right">def</span></div>
+ <div class="first right"><span>geh</span></div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/399384-1.html b/layout/reftests/bugs/399384-1.html
new file mode 100644
index 0000000000..7b5b475426
--- /dev/null
+++ b/layout/reftests/bugs/399384-1.html
@@ -0,0 +1,21 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ .first:first-letter { color: red; }
+ .right { direction: rtl; }
+ </style>
+ <script>
+ function tweak() {
+ document.body.style.background = 'lightblue';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+
+<body onload="tweak();">
+ <div class="first"><span>abc</span></div>
+ <div class="first"><span class="right">def</span></div>
+ <div class="first right"><span>geh</span></div>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/399636-quirks-css.html b/layout/reftests/bugs/399636-quirks-css.html
new file mode 100644
index 0000000000..24c5ec228d
--- /dev/null
+++ b/layout/reftests/bugs/399636-quirks-css.html
@@ -0,0 +1,23 @@
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636 (quirks mode, family from CSS)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ /* the first three fonts lack glyphs for P, A, and S */
+ span { font-family: Symbol, Webdings, Wingdings, serif; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<span>PASS</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/399636-quirks-html.html b/layout/reftests/bugs/399636-quirks-html.html
new file mode 100644
index 0000000000..87afa729c2
--- /dev/null
+++ b/layout/reftests/bugs/399636-quirks-html.html
@@ -0,0 +1,20 @@
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636 (quirks mode, family from HTML)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<font face="Symbol, Webdings, Wingdings, serif">PASS</font></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/399636-quirks-ref.html b/layout/reftests/bugs/399636-quirks-ref.html
new file mode 100644
index 0000000000..df6778f974
--- /dev/null
+++ b/layout/reftests/bugs/399636-quirks-ref.html
@@ -0,0 +1,22 @@
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ span { font-family: serif; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<span>PASS</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/399636-standards-css.html b/layout/reftests/bugs/399636-standards-css.html
new file mode 100644
index 0000000000..66960f6931
--- /dev/null
+++ b/layout/reftests/bugs/399636-standards-css.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636 (standards mode, family from CSS)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ /* the first three fonts lack glyphs for P, A, and S */
+ span { font-family: Symbol, Webdings, Wingdings, serif; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<span>PASS</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/399636-standards-html.html b/layout/reftests/bugs/399636-standards-html.html
new file mode 100644
index 0000000000..814d381ac1
--- /dev/null
+++ b/layout/reftests/bugs/399636-standards-html.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636 (standards mode, family from HTML)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<font face="Symbol, Webdings, Wingdings, serif">PASS</font></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/399636-standards-ref.html b/layout/reftests/bugs/399636-standards-ref.html
new file mode 100644
index 0000000000..41551d8281
--- /dev/null
+++ b/layout/reftests/bugs/399636-standards-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 399636</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ body { text-rendering: optimizeLegibility; }
+
+ span { font-family: serif; }
+
+ /* ensure consistent vertical positioning under variation in
+ first-choice font */
+ p { line-height: 50px; font-size: 16px; }
+ span, font { line-height: 25px; }
+
+ </style>
+</head>
+<body>
+
+<p>&nbsp;<span>PASS</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/400081-1.html b/layout/reftests/bugs/400081-1.html
new file mode 100644
index 0000000000..2594a31690
--- /dev/null
+++ b/layout/reftests/bugs/400081-1.html
@@ -0,0 +1,5 @@
+<html>
+<head>
+</head>
+<body style="font-size: 0;">&#173;</body>
+</html>
diff --git a/layout/reftests/bugs/400171-1-ref.html b/layout/reftests/bugs/400171-1-ref.html
new file mode 100644
index 0000000000..3d11fbf2d2
--- /dev/null
+++ b/layout/reftests/bugs/400171-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <style>
+ div { width: 100px; }
+ div.a { height: 30px; background: lightblue; }
+ div.b { height: 100px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+</head>
+<body>
+ <div class="a"></div>
+ <div class="b"></div>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-1a.html b/layout/reftests/bugs/400171-1a.html
new file mode 100644
index 0000000000..faf1142b5e
--- /dev/null
+++ b/layout/reftests/bugs/400171-1a.html
@@ -0,0 +1,23 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 30px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <div class="b" id="changeMe"></div>
+ <br/>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-1b.html b/layout/reftests/bugs/400171-1b.html
new file mode 100644
index 0000000000..a8ab3acf7a
--- /dev/null
+++ b/layout/reftests/bugs/400171-1b.html
@@ -0,0 +1,22 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 30px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <div class="b" id="changeMe"></div>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-1c.html b/layout/reftests/bugs/400171-1c.html
new file mode 100644
index 0000000000..8032a8bbfb
--- /dev/null
+++ b/layout/reftests/bugs/400171-1c.html
@@ -0,0 +1,24 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 30px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <br/>
+ <div class="b" id="changeMe"></div>
+ <br/>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-2-ref.html b/layout/reftests/bugs/400171-2-ref.html
new file mode 100644
index 0000000000..9085c15da7
--- /dev/null
+++ b/layout/reftests/bugs/400171-2-ref.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <style>
+ div { width: 100px; }
+ div.a { height: 80px; background: lightblue; }
+ div.b { height: 100px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+</head>
+<body>
+ <div class="a"></div>
+ <div class="b"></div>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-2a.html b/layout/reftests/bugs/400171-2a.html
new file mode 100644
index 0000000000..0216a8d086
--- /dev/null
+++ b/layout/reftests/bugs/400171-2a.html
@@ -0,0 +1,23 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 80px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <div class="b" id="changeMe"></div>
+ <br/>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-2b.html b/layout/reftests/bugs/400171-2b.html
new file mode 100644
index 0000000000..5c156367c4
--- /dev/null
+++ b/layout/reftests/bugs/400171-2b.html
@@ -0,0 +1,22 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 80px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <div class="b" id="changeMe"></div>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400171-2c.html b/layout/reftests/bugs/400171-2c.html
new file mode 100644
index 0000000000..346a76f596
--- /dev/null
+++ b/layout/reftests/bugs/400171-2c.html
@@ -0,0 +1,24 @@
+<html class="reftest-wait">
+<head>
+ <style>
+ body { width: 100px; line-height: 15px; }
+ div { width: 100px; float: left }
+ div.a { height: 80px; background: lightblue; }
+ div.b { height: 10px; background: lightgreen; }
+ div.c { height: 10px; background: black; }
+ </style>
+ <script>
+ function tweak() {
+ document.getElementById('changeMe').style.height = '100px';
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="tweak()">
+ <div class="a"></div>
+ <br/>
+ <div class="b" id="changeMe"></div>
+ <br/>
+ <div class="c"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400421-1-ref.html b/layout/reftests/bugs/400421-1-ref.html
new file mode 100644
index 0000000000..0a5fd51705
--- /dev/null
+++ b/layout/reftests/bugs/400421-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+ <img src="solidblue.png" style="border: 0"/>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400421-1.html b/layout/reftests/bugs/400421-1.html
new file mode 100644
index 0000000000..3e355f9eef
--- /dev/null
+++ b/layout/reftests/bugs/400421-1.html
@@ -0,0 +1,20 @@
+<html class="reftest-wait">
+<head>
+<script>
+function go()
+{
+ var myMap = document.getElementById('myMap');
+ var myArea = document.getElementById('myArea');
+ myMap.removeChild(myArea);
+
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="setTimeout('go()', 0);">
+ <img src="solidblue.png" usemap="#myMap" style="border: 0"/>
+ <map id="myMap" name="myMap">
+ <area id="myArea" shape="rect" coords="0,0,1,1"/>
+ </map>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400813-1-ref.html b/layout/reftests/bugs/400813-1-ref.html
new file mode 100644
index 0000000000..3fd2cba12b
--- /dev/null
+++ b/layout/reftests/bugs/400813-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="line-height:100px; font-size:10px; opacity:0;">Hello</div>
+Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/400813-1.html b/layout/reftests/bugs/400813-1.html
new file mode 100644
index 0000000000..470e9d7e2f
--- /dev/null
+++ b/layout/reftests/bugs/400813-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="line-height:100px; font-size:0">Hello</div>
+Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/400826-1-ref.html b/layout/reftests/bugs/400826-1-ref.html
new file mode 100644
index 0000000000..4bfcd54cc0
--- /dev/null
+++ b/layout/reftests/bugs/400826-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<p>Hello
+<div>HELLO<br>kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/400826-1.html b/layout/reftests/bugs/400826-1.html
new file mode 100644
index 0000000000..29d489e96e
--- /dev/null
+++ b/layout/reftests/bugs/400826-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p:first-letter, div:first-line {
+ text-transform:uppercase;
+}
+</style>
+</head>
+<body>
+<p>hello
+<div>hello<br>kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/401121-1-ref.html b/layout/reftests/bugs/401121-1-ref.html
new file mode 100644
index 0000000000..fbe978a256
--- /dev/null
+++ b/layout/reftests/bugs/401121-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<!-- Explicitly apply our standard reftest-paged page-size, for the benefit of
+ anyone viewing this testcase in a regular print-preview dialog: -->
+<style>@page { size: 5in 3in; margin: 0.5in; }</style>
+<!-- 3px of padding matches the offset from the table in the testcase. -->
+<div style="height: 10px;padding: 3px">
+<!-- 5in of height is enough to require 3 reftest-paged pages. -->
+<div style="height: 5in; width: 2in; border: 1px solid black;"></div>
+</div>
+</html>
diff --git a/layout/reftests/bugs/401121-1.html b/layout/reftests/bugs/401121-1.html
new file mode 100644
index 0000000000..d01e777924
--- /dev/null
+++ b/layout/reftests/bugs/401121-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<!-- Explicitly apply our standard reftest-paged page-size, for the benefit of
+ anyone viewing this testcase in a regular print-preview dialog: -->
+<style>@page { size: 5in 3in; margin: 0.5in; }</style>
+<table><tr><td>
+<div style="height: 10px;">
+<!-- 5in of height is enough to require 3 reftest-paged pages. -->
+<div style="height: 5in; width: 2in; border: 1px solid black;"></div>
+</div>
+</td></tr></table>
+</html>
diff --git a/layout/reftests/bugs/401121-2-ref.html b/layout/reftests/bugs/401121-2-ref.html
new file mode 100644
index 0000000000..6dabb9cc77
--- /dev/null
+++ b/layout/reftests/bugs/401121-2-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<!-- Explicitly apply our standard reftest-paged page-size, for the benefit of
+ anyone viewing this testcase in a regular print-preview dialog: -->
+<style>@page { size: 5in 3in; margin: 0.5in; }</style>
+<body>
+<div style="padding: 3px; width: 2in; box-sizing: border-box"
+ ><div style="height: 100px; border: 1px dotted;"
+ ><div style="height: 5in; border: 1px solid;"></div
+ ></div
+></div
+></body>
+</html>
diff --git a/layout/reftests/bugs/401121-2.html b/layout/reftests/bugs/401121-2.html
new file mode 100644
index 0000000000..4decf38bbd
--- /dev/null
+++ b/layout/reftests/bugs/401121-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<!-- Explicitly apply our standard reftest-paged page-size, for the benefit of
+ anyone viewing this testcase in a regular print-preview dialog: -->
+<style>@page { size: 5in 3in; margin: 0.5in; }</style>
+<body>
+<table style="width: 2in"
+ ><tr><td
+ ><div style="height: 100px; border: 1px dotted;"
+ ><div style="height: 5in; border: 1px solid;"></div
+ ></div
+ ></td></tr
+></table
+></body>
+</html>
diff --git a/layout/reftests/bugs/401361-frame.html b/layout/reftests/bugs/401361-frame.html
new file mode 100644
index 0000000000..6be4ed3de3
--- /dev/null
+++ b/layout/reftests/bugs/401361-frame.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style='margin:0'>
+<div style='width:100px; height:100px; background:cyan;'></div>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/401946-1.xhtml b/layout/reftests/bugs/401946-1.xhtml
new file mode 100644
index 0000000000..183d0c6fcb
--- /dev/null
+++ b/layout/reftests/bugs/401946-1.xhtml
@@ -0,0 +1,4 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<script type="Unknown"/>
+<script type="Unknown"/>
+</window>
diff --git a/layout/reftests/bugs/402338-1-ref.html b/layout/reftests/bugs/402338-1-ref.html
new file mode 100644
index 0000000000..ec1783d99f
--- /dev/null
+++ b/layout/reftests/bugs/402338-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span { outline:2px solid blue; }
+b { display:inline-block; }
+</style>
+</head>
+<body>
+<div><span><b style="display:inline-block; width:100px;height:100px;">H</b></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402338-1.html b/layout/reftests/bugs/402338-1.html
new file mode 100644
index 0000000000..ba5f6b5642
--- /dev/null
+++ b/layout/reftests/bugs/402338-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span { display:inline-block; outline:2px solid blue; }
+b { display:inline-block; }
+</style>
+</head>
+<body>
+<div><span><b style="display:inline-block; width:100px;height:100px;">H</b></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-1-ref.html b/layout/reftests/bugs/402567-1-ref.html
new file mode 100644
index 0000000000..196398f4df
--- /dev/null
+++ b/layout/reftests/bugs/402567-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head><style>
+ table { width: 10px; }
+ div { background: lightgreen;
+ padding: 0.2em; }
+</style></head>
+<body>
+ <table><tr><td>
+ <div>
+ a bb ccc dddd
+ </div>
+ </td></tr></table>
+ <table><tr><td>
+ <div>
+ a bb ccc dddd
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-1.html b/layout/reftests/bugs/402567-1.html
new file mode 100644
index 0000000000..c4fcf77c38
--- /dev/null
+++ b/layout/reftests/bugs/402567-1.html
@@ -0,0 +1,19 @@
+<html>
+<head><style>
+ table { width: 10px; }
+ div { background: lightgreen;
+ padding: 0.2em; }
+</style></head>
+<body>
+ <table><tr><td>
+ <div style="overflow: hidden;">
+ a bb ccc dddd
+ </div>
+ </td></tr></table>
+ <table><tr><td>
+ <div style="overflow: auto;">
+ a bb ccc dddd
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-2-ref.html b/layout/reftests/bugs/402567-2-ref.html
new file mode 100644
index 0000000000..f2fde16f4f
--- /dev/null
+++ b/layout/reftests/bugs/402567-2-ref.html
@@ -0,0 +1,20 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.scroll {
+ overflow: scroll;
+ background: lightgreen;
+ }
+ div.invis {
+ color: white;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="scroll">xxx</div>
+ <div class="invis">xxx</div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-2.html b/layout/reftests/bugs/402567-2.html
new file mode 100644
index 0000000000..bc4a00ef8e
--- /dev/null
+++ b/layout/reftests/bugs/402567-2.html
@@ -0,0 +1,16 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.scroll {
+ overflow: scroll;
+ background: lightgreen;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="scroll">xxx</div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-3-ref.html b/layout/reftests/bugs/402567-3-ref.html
new file mode 100644
index 0000000000..92f57854fc
--- /dev/null
+++ b/layout/reftests/bugs/402567-3-ref.html
@@ -0,0 +1,25 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.scroll {
+ overflow: scroll;
+ background: lightgreen;
+ }
+ div.invis {
+ color: white;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="scroll">
+ x xx x xx x xx x xx x xx x xx x xx x
+ xxxxxx
+ </div>
+ <div class="invis">
+ xxxxxx
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-3.html b/layout/reftests/bugs/402567-3.html
new file mode 100644
index 0000000000..631e90ae33
--- /dev/null
+++ b/layout/reftests/bugs/402567-3.html
@@ -0,0 +1,19 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.scroll {
+ overflow: scroll;
+ background: lightgreen;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="scroll">
+ x xx x xx x xx x xx x xx x xx x xx x
+ xxxxxx
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-4-ref.html b/layout/reftests/bugs/402567-4-ref.html
new file mode 100644
index 0000000000..80ecb44f4e
--- /dev/null
+++ b/layout/reftests/bugs/402567-4-ref.html
@@ -0,0 +1,26 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.auto {
+ overflow: auto;
+ height: 50px;
+ background: lightgreen;
+ }
+ div.invis {
+ color: white;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="auto">
+ x xx x xx x xx x xx x xx x xx x xx x
+ xxxxxx
+ </div>
+ <div class="invis">
+ xxxxxx
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402567-4.html b/layout/reftests/bugs/402567-4.html
new file mode 100644
index 0000000000..6e65c842af
--- /dev/null
+++ b/layout/reftests/bugs/402567-4.html
@@ -0,0 +1,20 @@
+<html>
+<head><style>
+ table {
+ width: 10px;
+ }
+ div.auto {
+ overflow: auto;
+ height: 50px;
+ background: lightgreen;
+ }
+</style></head>
+<body>
+ <table><tr><td>
+ <div class="auto">
+ x xx x xx x xx x xx x xx x xx x xx x
+ xxxxxx
+ </div>
+ </td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402629-1-iframe.html b/layout/reftests/bugs/402629-1-iframe.html
new file mode 100644
index 0000000000..f28e5a44f0
--- /dev/null
+++ b/layout/reftests/bugs/402629-1-iframe.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+ html { height: 50%; }
+ body { height:100%; }
+ table { height:100%; }
+ div { height:100%; }
+ td.green { background:lightgreen }
+
+ /* Apply this to outermost <td> or <tr> to trigger bug. */
+ .fill { height: 100% }
+</style>
+</head>
+<body>
+ <table cellpadding="0" cellspacing="0">
+ <tr><td class="fill">
+ <div><div><div><div>
+ <table cellpadding="0" cellspacing="0">
+ <tr><td class="green">foo</td></tr>
+ </table>
+ </div></div></div></div>
+ </td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402629-1-ref.html b/layout/reftests/bugs/402629-1-ref.html
new file mode 100644
index 0000000000..2c60bcf955
--- /dev/null
+++ b/layout/reftests/bugs/402629-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 200px"
+ src="402629-1-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402629-1.html b/layout/reftests/bugs/402629-1.html
new file mode 100644
index 0000000000..35e7222656
--- /dev/null
+++ b/layout/reftests/bugs/402629-1.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "200px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="402629-1-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402629-2-iframe.html b/layout/reftests/bugs/402629-2-iframe.html
new file mode 100644
index 0000000000..4f04fb2573
--- /dev/null
+++ b/layout/reftests/bugs/402629-2-iframe.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html style="height:10%">
+<body style="height:100%; margin:0px;padding:0px;">
+<table style="height:100%" cellpadding="0px" cellspacing="0px">
+ <tr>
+ <td style="height: 100%; background: lightblue;">
+ Outside the div
+ <div style="height:100%">
+ <table style="height:100%" cellpadding="0px" cellspacing="0px">
+ <tr>
+ <td style="height: 100%; background:lightgreen;">
+ Inside div
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402629-2-ref.html b/layout/reftests/bugs/402629-2-ref.html
new file mode 100644
index 0000000000..875a04c3bd
--- /dev/null
+++ b/layout/reftests/bugs/402629-2-ref.html
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 200px"
+ src="402629-2-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402629-2.html b/layout/reftests/bugs/402629-2.html
new file mode 100644
index 0000000000..d8d1fd11b9
--- /dev/null
+++ b/layout/reftests/bugs/402629-2.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "200px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="402629-2-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402629-3-iframe.html b/layout/reftests/bugs/402629-3-iframe.html
new file mode 100644
index 0000000000..50f0ca7b2e
--- /dev/null
+++ b/layout/reftests/bugs/402629-3-iframe.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<style>
+ html { height: 50%; }
+ body { height:100%; }
+ table { height:100%; }
+ div { height:100%; }
+ td.green { background:lightgreen }
+ td.fill { height: 100% }
+</style>
+<html>
+<body>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="fill"><div>
+ <table cellpadding="0" cellspacing="0">
+ <tr><td class="green">foo</td></tr>
+ </table>
+ </div></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402629-3-ref.html b/layout/reftests/bugs/402629-3-ref.html
new file mode 100644
index 0000000000..e72ee432ba
--- /dev/null
+++ b/layout/reftests/bugs/402629-3-ref.html
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <iframe id="myFrame"
+ style="height: 200px"
+ src="402629-3-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402629-3.html b/layout/reftests/bugs/402629-3.html
new file mode 100644
index 0000000000..9c3be93921
--- /dev/null
+++ b/layout/reftests/bugs/402629-3.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+ <body onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ var myFrame = document.getElementById("myFrame");
+ myFrame.style.height = "200px";
+ document.documentElement.className = "";
+ }, 0);
+ }
+ </script>
+
+ <iframe id="myFrame"
+ style="height: 300px"
+ src="402629-3-iframe.html"/>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/402807-1-ref.html b/layout/reftests/bugs/402807-1-ref.html
new file mode 100644
index 0000000000..573b064b64
--- /dev/null
+++ b/layout/reftests/bugs/402807-1-ref.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+body {
+margin: 0px;
+}
+
+div {
+border: 1px solid black;
+width:500px;
+height:200%;
+margin-left:auto;
+margin-right:auto;
+background-image: url(data:image/gif;base64,R0lGODlh9AEBAPcAAAT%2BBADiFgASAgAAAFnY0Bu9xgBQUAAAAE4AdBuw4gBQEgAAAAAcAADiABUSAAAAAApU3gAnnwCRgAB8fAAJAAIEAAAAQAAAAAAA0AOwxgBQUAAAAMA3dOAp4hKREgB8AOng9eXin4ESgHwAfAAz4AAI4gGREgB8AFbgfQDiBAASAAAAAMh9AN8EABIAAAAAAHMAEAAAAABAAAAAAOjwB%2BAAABJAAAAAABho5O7h4pASEnwAAHB9AwUEAZEAAHwAAP%2BgqP%2Fh4v8SEv8AAG2VAgUIAJGRAHx8AIUA1OcAUoFAUHwAAAABkAAAARUAFQAAAGACwAMA4gAAEgAAANjIpJbhqxkSUgAAADDwDm8AABVAAAAAAAAAAAAAAABAAAAAAH4AAwDiAQASAMAAAAB1AAApAACRAAB8AP8A1P8A4v9AEv8AAP8B3f8A3%2F8AOv8AfgACAAAAAAAAAAAAAAC5pAApqwCRUgB8AADgBwDiABUSAAAAAPh9YOAEnhIAgAAAfNIAoOYAgIFAFnwAADAzAG8IABWRAAB8AEpQB%2BMWAIECAHwAAMB9AHYEAFAAAAAAADAAAG8AgAFAFgAAAGzwAAAAAABAAAAAADR2AODrABIAAAAAAAAQAADiAAASAAAAADCFAPYrABKDAAB8ABgAaO4AnpAAgHwAfHAA%2FwUA%2F5EA%2F3wA%2F%2F8AYP8Anv8AgP8AfG0pMQW3AJGSAHx8AEqgMfSAAIAWAHwAAAA0gABk6RWDEgB8AAD%2F%2FwD%2F%2FwD%2F%2FwD%2F%2FzAAAG8AABUAAAAAAAD0PAHh4wASEgAAAAA0vgBkOwCDTAB8AFcwHPT244ASEnwAACAYd%2BLuEBKQTwB8ADAAUG%2B34xWSEgB8AAD%2FNAD%2FZED%2FgwD%2FfPCg8QCA40AWEgAAABA0zeFk%2FxKD%2FwB8fwA4wADj4wASEgAAAEjnoOFkgBKDFgB8AJWINAhkZJGDg3x8fAABoAAAgEAAFgAAAPAxdvQA6wAAAAAAAAiUANTiABISAAAAAPC36eEszhKRRwB8ACH5BAAAAAAALAAAAAD0AQEABwgnAAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePBAMCADs%3D);
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402807-1.html b/layout/reftests/bugs/402807-1.html
new file mode 100644
index 0000000000..2491994b15
--- /dev/null
+++ b/layout/reftests/bugs/402807-1.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+body{
+margin: 0px;
+background:#ffffff url(data:image/gif;base64,R0lGODlh9AEBAPcAAAT%2BBADiFgASAgAAAFnY0Bu9xgBQUAAAAE4AdBuw4gBQEgAAAAAcAADiABUSAAAAAApU3gAnnwCRgAB8fAAJAAIEAAAAQAAAAAAA0AOwxgBQUAAAAMA3dOAp4hKREgB8AOng9eXin4ESgHwAfAAz4AAI4gGREgB8AFbgfQDiBAASAAAAAMh9AN8EABIAAAAAAHMAEAAAAABAAAAAAOjwB%2BAAABJAAAAAABho5O7h4pASEnwAAHB9AwUEAZEAAHwAAP%2BgqP%2Fh4v8SEv8AAG2VAgUIAJGRAHx8AIUA1OcAUoFAUHwAAAABkAAAARUAFQAAAGACwAMA4gAAEgAAANjIpJbhqxkSUgAAADDwDm8AABVAAAAAAAAAAAAAAABAAAAAAH4AAwDiAQASAMAAAAB1AAApAACRAAB8AP8A1P8A4v9AEv8AAP8B3f8A3%2F8AOv8AfgACAAAAAAAAAAAAAAC5pAApqwCRUgB8AADgBwDiABUSAAAAAPh9YOAEnhIAgAAAfNIAoOYAgIFAFnwAADAzAG8IABWRAAB8AEpQB%2BMWAIECAHwAAMB9AHYEAFAAAAAAADAAAG8AgAFAFgAAAGzwAAAAAABAAAAAADR2AODrABIAAAAAAAAQAADiAAASAAAAADCFAPYrABKDAAB8ABgAaO4AnpAAgHwAfHAA%2FwUA%2F5EA%2F3wA%2F%2F8AYP8Anv8AgP8AfG0pMQW3AJGSAHx8AEqgMfSAAIAWAHwAAAA0gABk6RWDEgB8AAD%2F%2FwD%2F%2FwD%2F%2FwD%2F%2FzAAAG8AABUAAAAAAAD0PAHh4wASEgAAAAA0vgBkOwCDTAB8AFcwHPT244ASEnwAACAYd%2BLuEBKQTwB8ADAAUG%2B34xWSEgB8AAD%2FNAD%2FZED%2FgwD%2FfPCg8QCA40AWEgAAABA0zeFk%2FxKD%2FwB8fwA4wADj4wASEgAAAEjnoOFkgBKDFgB8AJWINAhkZJGDg3x8fAABoAAAgEAAFgAAAPAxdvQA6wAAAAAAAAiUANTiABISAAAAAPC36eEszhKRRwB8ACH5BAAAAAAALAAAAAD0AQEABwgnAAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePBAMCADs%3D) repeat-y fixed center;
+}
+
+div {
+border: 1px solid black;
+width:500px;
+height:200%;
+margin-left:auto;
+margin-right:auto;
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-1-ref.html b/layout/reftests/bugs/402940-1-ref.html
new file mode 100644
index 0000000000..6ddf9019ad
--- /dev/null
+++ b/layout/reftests/bugs/402940-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: baseline; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="checkbox"><input type="checkbox" checked><input type="radio"><input type="radio" checked>This is some text</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-1.html b/layout/reftests/bugs/402940-1.html
new file mode 100644
index 0000000000..18abd304ee
--- /dev/null
+++ b/layout/reftests/bugs/402940-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: baseline; margin-bottom: 6em; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="checkbox"><input type="checkbox" checked><input type="radio"><input type="radio" checked>This is some text</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-1b.html b/layout/reftests/bugs/402940-1b.html
new file mode 100644
index 0000000000..0eef49313b
--- /dev/null
+++ b/layout/reftests/bugs/402940-1b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ /* test that the default vertical-align is baseline */
+ input { margin-bottom: 6em; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="checkbox"><input type="checkbox" checked><input type="radio"><input type="radio" checked>This is some text</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-2-notref.html b/layout/reftests/bugs/402940-2-notref.html
new file mode 100644
index 0000000000..b15f80a1da
--- /dev/null
+++ b/layout/reftests/bugs/402940-2-notref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: text-bottom; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="checkbox" checked>This is some text.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-2.html b/layout/reftests/bugs/402940-2.html
new file mode 100644
index 0000000000..cfc786f768
--- /dev/null
+++ b/layout/reftests/bugs/402940-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: text-bottom; margin-bottom: 6em; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="checkbox" checked>This is some text.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-3-notref.html b/layout/reftests/bugs/402940-3-notref.html
new file mode 100644
index 0000000000..f0a8502a6b
--- /dev/null
+++ b/layout/reftests/bugs/402940-3-notref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: text-bottom; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="radio" checked>This is some text.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402940-3.html b/layout/reftests/bugs/402940-3.html
new file mode 100644
index 0000000000..eed30b5248
--- /dev/null
+++ b/layout/reftests/bugs/402940-3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Baseline alignment of radio buttons and checkboxes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ input { vertical-align: text-bottom; margin-bottom: 6em; }
+
+ </style>
+</head>
+<body>
+
+<p><input type="radio" checked>This is some text.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/402950-1-ref.html b/layout/reftests/bugs/402950-1-ref.html
new file mode 100644
index 0000000000..40911b5e6c
--- /dev/null
+++ b/layout/reftests/bugs/402950-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html><head>
+<style>
+p { width: 13em; border: 1px solid black; }
+p { white-space: nowrap; }
+a { color:pink; }
+</style>
+</head>
+<body>
+<p><span>mmmmmmmmmm</span><br>
+<span>mmmmm<a>mmmmm</a></span></p>
+<p>m <span>mmmmmmmmmm</span><br>
+<span>m<a>mmmmmmmmm</a></span></p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/402950-1.html b/layout/reftests/bugs/402950-1.html
new file mode 100644
index 0000000000..923678d66e
--- /dev/null
+++ b/layout/reftests/bugs/402950-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html><head>
+<style>
+p { width: 13em; border: 1px solid black; }
+p span { white-space: nowrap; }
+a { color:pink; }
+</style>
+</head>
+<body>
+<!-- We should be able to break even when the only break opportunity is within a span
+that overflows the line width (the break opportunity after the whitespace is treated
+as a break before the first character of the second span) -->
+<p><span>mmmmmmmmmm</span>
+<span>mmmmm<a>mmmmm</a></span></p>
+<!-- A span that overflows the line width should be allowed to fit, it might have a break
+opportunity inside it (the break opportunity after the whitespace is treated
+as a break before the first character of the second span) -->
+<p>m <span>mmmmmmmmmm</span>
+<span>m<a>mmmmmmmmm</a></span></p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-1-ref.html b/layout/reftests/bugs/403129-1-ref.html
new file mode 100644
index 0000000000..2dd2289f8a
--- /dev/null
+++ b/layout/reftests/bugs/403129-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="width: 1px">
+ <div style="float: left">xx</div>
+ <div style="float: left">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-1.html b/layout/reftests/bugs/403129-1.html
new file mode 100644
index 0000000000..b57ce6b35f
--- /dev/null
+++ b/layout/reftests/bugs/403129-1.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="width: 0px">
+ <div style="float: left">xx</div>
+ <div style="float: left">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-2-ref.html b/layout/reftests/bugs/403129-2-ref.html
new file mode 100644
index 0000000000..523ffc66a6
--- /dev/null
+++ b/layout/reftests/bugs/403129-2-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="width: 1px; padding-left: 20px">
+ <div style="float: left">xx</div>
+ <div style="float: left">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-2.html b/layout/reftests/bugs/403129-2.html
new file mode 100644
index 0000000000..7016ecb795
--- /dev/null
+++ b/layout/reftests/bugs/403129-2.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="width: 0px; padding-left: 20px">
+ <div style="float: left">xx</div>
+ <div style="float: left">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-3-ref.html b/layout/reftests/bugs/403129-3-ref.html
new file mode 100644
index 0000000000..dd16cf7857
--- /dev/null
+++ b/layout/reftests/bugs/403129-3-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="float: right; width: 1px">
+ <div style="float: right">xx</div>
+ <div style="float: right">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-3.html b/layout/reftests/bugs/403129-3.html
new file mode 100644
index 0000000000..fff71e0c43
--- /dev/null
+++ b/layout/reftests/bugs/403129-3.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="float: right; width: 0px">
+ <div style="float: right">xx</div>
+ <div style="float: right">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-4-ref.html b/layout/reftests/bugs/403129-4-ref.html
new file mode 100644
index 0000000000..fcee7a47e4
--- /dev/null
+++ b/layout/reftests/bugs/403129-4-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="float: right; width: 1px; padding-right: 20px">
+ <div style="float: right">xx</div>
+ <div style="float: right">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403129-4.html b/layout/reftests/bugs/403129-4.html
new file mode 100644
index 0000000000..7efab714ca
--- /dev/null
+++ b/layout/reftests/bugs/403129-4.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <div style="float: right; width: 0px; padding-right: 20px">
+ <div style="float: right">xx</div>
+ <div style="float: right">ii</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403134-1-ref.html b/layout/reftests/bugs/403134-1-ref.html
new file mode 100644
index 0000000000..70c653815a
--- /dev/null
+++ b/layout/reftests/bugs/403134-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<div style="column-width: 0.5em; column-gap: 100px;" id="div"><span style="color: green">x</span>x ! </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/403134-1.html b/layout/reftests/bugs/403134-1.html
new file mode 100644
index 0000000000..a82123cb37
--- /dev/null
+++ b/layout/reftests/bugs/403134-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+
+#div:first-letter { color: green; }
+
+</style>
+</head>
+
+<body onload="document.getElementById('div').appendChild(document.createTextNode(''));">
+
+<div style="column-width: 0.5em; column-gap: 100px;" id="div">xx ! </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/403181-1-ref.xml b/layout/reftests/bugs/403181-1-ref.xml
new file mode 100644
index 0000000000..ef961fb121
--- /dev/null
+++ b/layout/reftests/bugs/403181-1-ref.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<svg xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/2000/svg">
+ <foreignObject transform="scale(2.5)" width="100%" height="100%">
+ <html:p style="width:36px; height:24px; background:white;">
+ </html:p>
+ <html:p style="width:12px; height:12px; background:black;">
+ </html:p>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/403181-1.xml b/layout/reftests/bugs/403181-1.xml
new file mode 100644
index 0000000000..2204669c49
--- /dev/null
+++ b/layout/reftests/bugs/403181-1.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<svg xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/2000/svg">
+ <foreignObject transform="scale(2.5)" width="100%" height="100%">
+ <html:p style="width:36px; height:24px; background-image: url(289480-ref.png);">
+ </html:p>
+ <!-- this one can be hard to see, but we should get a black rectangle with none of
+ the yellow face blended in at the edges -->
+ <html:p style="width:12px; height:12px; background-image: url(289480-ref.png); background-position:-120px -108px;">
+ </html:p>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/403249-1-ref.html b/layout/reftests/bugs/403249-1-ref.html
new file mode 100644
index 0000000000..9b356c7496
--- /dev/null
+++ b/layout/reftests/bugs/403249-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col { background: green }
+td { color: white }
+</style>
+</head>
+<body>
+ <table>
+ <col id="x" span="2">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403249-1a.html b/layout/reftests/bugs/403249-1a.html
new file mode 100644
index 0000000000..4694b3bd33
--- /dev/null
+++ b/layout/reftests/bugs/403249-1a.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col { background: green }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <col id="x" span="1">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403249-1b.html b/layout/reftests/bugs/403249-1b.html
new file mode 100644
index 0000000000..caa6b19cc6
--- /dev/null
+++ b/layout/reftests/bugs/403249-1b.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col { background: green }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <col id="x" span="3">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403249-2-ref.html b/layout/reftests/bugs/403249-2-ref.html
new file mode 100644
index 0000000000..21ae21ebd9
--- /dev/null
+++ b/layout/reftests/bugs/403249-2-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: green }
+td { color: white }
+</style>
+</head>
+<body>
+ <table>
+ <tr>
+ <td>Three</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403249-2a.html b/layout/reftests/bugs/403249-2a.html
new file mode 100644
index 0000000000..42bebbf54b
--- /dev/null
+++ b/layout/reftests/bugs/403249-2a.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: green }
+col { background: red; visibility: collapse; }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <col id="x" span="1">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403249-2b.html b/layout/reftests/bugs/403249-2b.html
new file mode 100644
index 0000000000..59bc3bc86e
--- /dev/null
+++ b/layout/reftests/bugs/403249-2b.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: green }
+col { background: red; visibility: collapse; }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <col id="x" span="3">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403328-1-ref.html b/layout/reftests/bugs/403328-1-ref.html
new file mode 100644
index 0000000000..db0fdeca7d
--- /dev/null
+++ b/layout/reftests/bugs/403328-1-ref.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<html><head>
+<title>Testcase for bug 403328</title>
+<style>
+body {
+ margin-left:40px;
+}
+div.cb {
+ background-color: lime;
+ width: 80px;
+}
+div.spcb {
+ background-color: blue;
+ margin-left:auto;
+ margin-right:auto;
+ width: 40px;
+}
+div.abs {
+ background-color: red;
+ height: 40px;
+}
+div.extrawide {
+ width: 100px;
+}
+div.narrow {
+ width: 20px;
+}
+
+</style>
+</head><body>
+
+<div class="cb">
+<div class="spcb">
+<div class="abs narrow" style="margin-left:auto;"></div>
+<div class="abs narrow"></div>
+<div class="abs extrawide" style="margin-left:-20px;"></div>
+<div class="abs extrawide" style="margin-left:-40px;"></div>
+<div class="abs narrow" style="margin-left:-20px;"></div>
+<div class="abs narrow" style="margin-left:auto; margin-right:-20px;"></div>
+<div class="abs narrow" style="margin-left:auto;"></div>
+<div class="abs narrow"></div>
+</div>
+</div>
+
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/403328-1.html b/layout/reftests/bugs/403328-1.html
new file mode 100644
index 0000000000..535b483060
--- /dev/null
+++ b/layout/reftests/bugs/403328-1.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML>
+<html><head>
+<title>Testcase for bug 403328</title>
+<style>
+body {
+ margin-left:40px;
+}
+div.cb {
+ background-color: lime;
+ position: relative;
+ width: 80px;
+}
+div.spcb {
+ background-color: blue;
+ margin-left:auto;
+ margin-right:auto;
+ width: 40px;
+ height: 20px;
+}
+div.abs {
+ background-color: red;
+ position: absolute;
+ height: 20px;
+}
+div.auto-margins {
+ margin-left: auto;
+ margin-right: auto;
+}
+div.zero-margins {
+ margin-left: 0;
+ margin-right: 0;
+}
+div.extrawide {
+ width: 100px;
+}
+div.narrow {
+ width: 20px;
+}
+div.leftright {
+ left: 0;
+ right: 0;
+}
+
+</style>
+</head><body>
+
+<div dir="ltr" class="cb">
+<div dir="rtl" class="spcb">
+<div dir="ltr" class="abs"><div class="narrow"></div></div>
+</div>
+<div dir="rtl" class="spcb">
+<div dir="rtl" class="abs"><div class="narrow"></div></div>
+</div>
+</div>
+<div dir="rtl" class="cb">
+<div dir="ltr" class="spcb">
+<div dir="ltr" class="abs"><div class="narrow"></div></div>
+</div>
+<div dir="ltr" class="spcb">
+<div dir="rtl" class="abs"><div class="narrow"></div></div>
+</div>
+</div>
+
+<div dir="ltr" class="cb">
+<div dir="rtl" class="spcb">
+<div dir="ltr" class="abs leftright extrawide auto-margins"></div>
+</div>
+<div dir="rtl" class="spcb">
+<div dir="rtl" class="abs leftright extrawide auto-margins"></div>
+</div>
+</div>
+<div dir="rtl" class="cb">
+<div dir="ltr" class="spcb">
+<div dir="ltr" class="abs leftright extrawide auto-margins"></div>
+</div>
+<div dir="ltr" class="spcb">
+<div dir="rtl" class="abs leftright extrawide auto-margins"></div>
+</div>
+</div>
+
+<div dir="ltr" class="cb">
+<div dir="rtl" class="spcb">
+<div dir="ltr" class="abs leftright narrow zero-margins"></div>
+</div>
+<div dir="rtl" class="spcb">
+<div dir="rtl" class="abs leftright narrow zero-margins"></div>
+</div>
+</div>
+<div dir="rtl" class="cb">
+<div dir="ltr" class="spcb">
+<div dir="ltr" class="abs leftright narrow zero-margins"></div>
+</div>
+<div dir="ltr" class="spcb">
+<div dir="rtl" class="abs leftright narrow zero-margins"></div>
+</div>
+</div>
+
+<div dir="ltr" class="cb">
+<div dir="rtl" class="spcb">
+<div dir="ltr" class="abs narrow"></div>
+</div>
+<div dir="rtl" class="spcb">
+<div dir="rtl" class="abs narrow"></div>
+</div>
+</div>
+<div dir="rtl" class="cb">
+<div dir="ltr" class="spcb">
+<div dir="ltr" class="abs narrow"></div>
+</div>
+<div dir="ltr" class="spcb">
+<div dir="rtl" class="abs narrow"></div>
+</div>
+</div>
+
+</body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/403426-1-ref.html b/layout/reftests/bugs/403426-1-ref.html
new file mode 100644
index 0000000000..3e28517475
--- /dev/null
+++ b/layout/reftests/bugs/403426-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<p><span style="white-space:nowrap;"><input type="checkbox">hello1</span>
+<p>Hello2<br><span style="white-space:nowrap;"><input type="checkbox"></span>
+<p>Hello3<br><input type="checkbox">
+</body>
+</html>
diff --git a/layout/reftests/bugs/403426-1.html b/layout/reftests/bugs/403426-1.html
new file mode 100644
index 0000000000..8e93d6f3a0
--- /dev/null
+++ b/layout/reftests/bugs/403426-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width:0;">
+<p><span style="white-space:nowrap;"><input type="checkbox">hello1</span>
+<p>Hello2 <span style="white-space:nowrap;"><input type="checkbox"></span>
+<p style="white-space:nowrap"><span style="white-space:normal">Hello3
+</span><span style="white-space:nowrap;"><input type="checkbox"></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403455-1-ref.html b/layout/reftests/bugs/403455-1-ref.html
new file mode 100644
index 0000000000..bac7791f87
--- /dev/null
+++ b/layout/reftests/bugs/403455-1-ref.html
@@ -0,0 +1,12 @@
+<html><head>
+<style>
+p { width: 13em; border: 1px solid black; }
+p { white-space: nowrap; }
+a { color:pink; }
+</style>
+</head>
+<body>
+<p><a style="white-space:pre-wrap;">mmmmmmmmmm <br>m</a>mmmmmmmmm</p>
+<p>m <br><a style="white-space:pre;">mmmmmmmmmm</a>mmmmmmmmm</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403455-1.html b/layout/reftests/bugs/403455-1.html
new file mode 100644
index 0000000000..6713d53496
--- /dev/null
+++ b/layout/reftests/bugs/403455-1.html
@@ -0,0 +1,14 @@
+<html><head>
+<style>
+p { width: 13em; border: 1px solid black; }
+p span { white-space: nowrap; }
+a { color:pink; }
+</style>
+</head>
+<body>
+<!-- A prewrap text frame should be able to record a break opportunity -->
+<p><a style="white-space:pre-wrap;">mmmmmmmmmm m</a>mmmmmmmmm</p>
+<!-- A 'pre' text frame should be able to record a break opportunity at its start -->
+<p>m <a style="white-space:pre;">mmmmmmmmmm</a>mmmmmmmmm</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403505-1-ref.xhtml b/layout/reftests/bugs/403505-1-ref.xhtml
new file mode 100644
index 0000000000..163561d1b2
--- /dev/null
+++ b/layout/reftests/bugs/403505-1-ref.xhtml
@@ -0,0 +1 @@
+<?xml version="1.0"?><!DOCTYPE window><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox><label value="test" style="-moz-box-flex: 3" /><label value="test2" /><label value="test3" style="-moz-box-flex: 1" /></hbox></window>
diff --git a/layout/reftests/bugs/403505-1.xml b/layout/reftests/bugs/403505-1.xml
new file mode 100644
index 0000000000..a06bfb9272
--- /dev/null
+++ b/layout/reftests/bugs/403505-1.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!--
+ Intentionally testing XUL loaded through the XML content sink rather
+ than the XUL content sink.
+ -->
+<!DOCTYPE window>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <hbox>
+ <label value="test" style="-moz-box-flex: 3" />
+ <label value="test2" />
+ <label value="test3" style="-moz-box-flex: 1" />
+ </hbox>
+</window>
diff --git a/layout/reftests/bugs/403519-1-ref.html b/layout/reftests/bugs/403519-1-ref.html
new file mode 100644
index 0000000000..3c31e093bb
--- /dev/null
+++ b/layout/reftests/bugs/403519-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+<body>
+<table border="1" width="100%">
+ <tr>
+ <td colspan="2" width="100%">&nbsp</td>
+ <td>b</td>
+ </tr>
+ <tr>
+ <td/>
+ <td/>
+ <td/>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403519-1.html b/layout/reftests/bugs/403519-1.html
new file mode 100644
index 0000000000..988be36aea
--- /dev/null
+++ b/layout/reftests/bugs/403519-1.html
@@ -0,0 +1,15 @@
+<html>
+<body>
+<table border="1" width="100%">
+ <tr>
+ <td colspan="2"><marquee>&nbsp</marquee></td>
+ <td>b</td>
+ </tr>
+ <tr>
+ <td/>
+ <td/>
+ <td/>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403519-2-ref.html b/layout/reftests/bugs/403519-2-ref.html
new file mode 100644
index 0000000000..72176a89a6
--- /dev/null
+++ b/layout/reftests/bugs/403519-2-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd"><html>
+<head>
+<style>
+td {
+ border: 1px solid black;
+ background-color: lime;
+}
+table {
+ border: 1px solid black;
+ background-color: red;
+ width: 200px;
+ border-spacing: 0;
+}
+</style>
+</head>
+<body>
+<table>
+ <tbody><tr>
+ <td colspan="2"><div>&nbsp;</div></td>
+ <td>b</td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+</tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/403519-2.html b/layout/reftests/bugs/403519-2.html
new file mode 100644
index 0000000000..b362f11dc7
--- /dev/null
+++ b/layout/reftests/bugs/403519-2.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd"><html>
+<head>
+<style>
+td {
+ border: 1px solid black;
+ background-color: lime;
+}
+table {
+ border: 1px solid black;
+ background-color: red;
+ width: 200px;
+ border-spacing: 0;
+}
+</style>
+</head>
+<body>
+<table>
+ <tbody><tr>
+ <td colspan="2"><div style="margin: 0 100%;">&nbsp;</div></td>
+ <td>b</td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+</tbody></table>
+</body></html>
diff --git a/layout/reftests/bugs/403656-1-ref.html b/layout/reftests/bugs/403656-1-ref.html
new file mode 100644
index 0000000000..945ab915bd
--- /dev/null
+++ b/layout/reftests/bugs/403656-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div style="width: 300px; height: 300px; background: green"></div>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-1.html b/layout/reftests/bugs/403656-1.html
new file mode 100644
index 0000000000..4840ffed2b
--- /dev/null
+++ b/layout/reftests/bugs/403656-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ table { margin: 0; }
+ </style>
+</head>
+<body>
+
+<table cellpadding=0 cellspacing=0 width="300" height="300">
+ <tr><td bgcolor="green"></td></tr>
+</table>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-2-ref.html b/layout/reftests/bugs/403656-2-ref.html
new file mode 100644
index 0000000000..6e92bd6ef8
--- /dev/null
+++ b/layout/reftests/bugs/403656-2-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: green"></div>
+<div style="width: 300px; height: 100px; background: yellow"></div>
+<div style="width: 300px; height: 100px; background: blue"></div>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-2.html b/layout/reftests/bugs/403656-2.html
new file mode 100644
index 0000000000..0459696d8d
--- /dev/null
+++ b/layout/reftests/bugs/403656-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ table { margin: 0; }
+ </style>
+</head>
+<body>
+
+<table cellpadding=0 cellspacing=0 width="300" height="300">
+ <tr><td bgcolor="green"></td></tr>
+ <tr><td bgcolor="yellow"></td></tr>
+ <tr><td bgcolor="blue"></td></tr>
+</table>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-3-ref.html b/layout/reftests/bugs/403656-3-ref.html
new file mode 100644
index 0000000000..c5171918ce
--- /dev/null
+++ b/layout/reftests/bugs/403656-3-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div style="width: 300px; height: 95px; background: green"></div>
+<div style="width: 300px; height: 95px; background: yellow"></div>
+<div style="width: 300px; height: 15px; background: pink"></div>
+<div style="width: 300px; height: 95px; background: blue"></div>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-3.html b/layout/reftests/bugs/403656-3.html
new file mode 100644
index 0000000000..31161e9f87
--- /dev/null
+++ b/layout/reftests/bugs/403656-3.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ table { margin: 0; }
+ </style>
+</head>
+<body>
+
+<table cellpadding=0 cellspacing=0 width="300" height="300">
+ <tr><td bgcolor="green"></td></tr>
+ <tr><td bgcolor="yellow"></td></tr>
+ <tr><td height="15" bgcolor="pink"></td></tr>
+ <tr><td bgcolor="blue"></td></tr>
+</table>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-4-ref.html b/layout/reftests/bugs/403656-4-ref.html
new file mode 100644
index 0000000000..6e92bd6ef8
--- /dev/null
+++ b/layout/reftests/bugs/403656-4-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: green"></div>
+<div style="width: 300px; height: 100px; background: yellow"></div>
+<div style="width: 300px; height: 100px; background: blue"></div>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-4.html b/layout/reftests/bugs/403656-4.html
new file mode 100644
index 0000000000..d64b0d431a
--- /dev/null
+++ b/layout/reftests/bugs/403656-4.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ table { margin: 0; }
+ </style>
+</head>
+<body>
+
+<table cellpadding=0 cellspacing=0 width="300" height="300">
+ <tr><td bgcolor="green" height="10"></td></tr>
+ <tr><td bgcolor="yellow" height="10"></td></tr>
+ <tr><td bgcolor="blue" height="10"></td></tr>
+</table>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-5-ref.html b/layout/reftests/bugs/403656-5-ref.html
new file mode 100644
index 0000000000..6e92bd6ef8
--- /dev/null
+++ b/layout/reftests/bugs/403656-5-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div style="width: 300px; height: 100px; background: green"></div>
+<div style="width: 300px; height: 100px; background: yellow"></div>
+<div style="width: 300px; height: 100px; background: blue"></div>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403656-5.html b/layout/reftests/bugs/403656-5.html
new file mode 100644
index 0000000000..b0ad81a74c
--- /dev/null
+++ b/layout/reftests/bugs/403656-5.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 403656</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ table { margin: 0; }
+ </style>
+</head>
+<body>
+
+<table cellpadding=0 cellspacing=0 width="300" height="300">
+ <tr><td bgcolor="green" height="0"></td></tr>
+ <tr><td bgcolor="yellow" height="0"></td></tr>
+ <tr><td bgcolor="blue" height="0"></td></tr>
+</table>
+
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/403657-1-ref.html b/layout/reftests/bugs/403657-1-ref.html
new file mode 100644
index 0000000000..8673c14645
--- /dev/null
+++ b/layout/reftests/bugs/403657-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body
+<ol>
+<li>Some text</li>
+<li>&nbsp;</li>
+<li>&nbsp;</li>
+</ol>
+</body>
+</html>
diff --git a/layout/reftests/bugs/403657-1.html b/layout/reftests/bugs/403657-1.html
new file mode 100644
index 0000000000..eb3bbfbf4a
--- /dev/null
+++ b/layout/reftests/bugs/403657-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body
+<ol>
+<li>Some text</li>
+<li></li>
+<li></li>
+</ol>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404030-1-notref.html b/layout/reftests/bugs/404030-1-notref.html
new file mode 100644
index 0000000000..6375224554
--- /dev/null
+++ b/layout/reftests/bugs/404030-1-notref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 404030</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ span { display: inline-table; height: 2em; border: thin solid; }
+
+ </style>
+</head>
+<body>
+
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span>inline-table</span>.</p>
+<p>Test: <span><i style="display:block; line-height: normal">inline-table</i></span>.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/404030-1-notref2.html b/layout/reftests/bugs/404030-1-notref2.html
new file mode 100644
index 0000000000..703d88d3ce
--- /dev/null
+++ b/layout/reftests/bugs/404030-1-notref2.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 404030</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ span { display: inline-table; height: 2em; border: thin solid; }
+
+ </style>
+</head>
+<body>
+
+<!-- vary only the last test, to make sure line-height works -->
+
+<p>Test: <span style="vertical-align: top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: middle">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: baseline">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 4px">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%"><i style="display:block; line-height: normal">inline-table</i></span>.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/404030-1-ref.html b/layout/reftests/bugs/404030-1-ref.html
new file mode 100644
index 0000000000..3e9feb6e04
--- /dev/null
+++ b/layout/reftests/bugs/404030-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 404030</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ span { display: inline-block; height: 2em; border: thin solid; }
+
+ </style>
+</head>
+<body>
+
+<p>Test: <span style="vertical-align: top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: middle">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: baseline">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 4px">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%; line-height: 3"><i style="display:block; line-height: normal">inline-table</i></span>.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/404030-1.html b/layout/reftests/bugs/404030-1.html
new file mode 100644
index 0000000000..a3a2f24c52
--- /dev/null
+++ b/layout/reftests/bugs/404030-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 404030</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ span { display: inline-table; height: 2em; border: thin solid; }
+
+ </style>
+</head>
+<body>
+
+<p>Test: <span style="vertical-align: top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-top">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: middle">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: text-bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: bottom">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: baseline">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 4px">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%">inline-table</span>.</p>
+<p>Test: <span style="vertical-align: 50%; line-height: 3"><i style="display:block; line-height: normal">inline-table</i></span>.</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/404123-1-ref.html b/layout/reftests/bugs/404123-1-ref.html
new file mode 100644
index 0000000000..0b0758a09b
--- /dev/null
+++ b/layout/reftests/bugs/404123-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="display: inline">
+ <legend>This is legend text</legend>
+ This is other text
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/404123-1.html b/layout/reftests/bugs/404123-1.html
new file mode 100644
index 0000000000..ce99165190
--- /dev/null
+++ b/layout/reftests/bugs/404123-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body style="width: 0">
+ <fieldset>
+ <legend style="white-space: nowrap">This is legend text</legend>
+ This is other text
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/404123-2-ref.html b/layout/reftests/bugs/404123-2-ref.html
new file mode 100644
index 0000000000..f862706a21
--- /dev/null
+++ b/layout/reftests/bugs/404123-2-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset style="display: inline">
+ <legend>Legend<br>textstuffandall</legend>
+ Text
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/404123-2.html b/layout/reftests/bugs/404123-2.html
new file mode 100644
index 0000000000..87580138ac
--- /dev/null
+++ b/layout/reftests/bugs/404123-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body style="width: 0">
+ <fieldset>
+ <legend style="white-space: normal">Legend textstuffandall</legend>
+ Text
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/404123-3-ref.html b/layout/reftests/bugs/404123-3-ref.html
new file mode 100644
index 0000000000..2a99d26d2f
--- /dev/null
+++ b/layout/reftests/bugs/404123-3-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset>
+ <legend style="border: 1px solid black;">
+ <span style="display: inline-block; height:100px; width: 100px"></span>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/404123-3.html b/layout/reftests/bugs/404123-3.html
new file mode 100644
index 0000000000..bf9638786f
--- /dev/null
+++ b/layout/reftests/bugs/404123-3.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset>
+ <legend style="width: 300px; min-width: 400px; max-width: 50px;
+ height: 300px; min-height: 400px; max-height: 50px;
+ border: 1px solid black;">
+ <span style="display: inline-block; height:100px; width: 100px"></span>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/404149-1-ref.xhtml b/layout/reftests/bugs/404149-1-ref.xhtml
new file mode 100644
index 0000000000..c69173983b
--- /dev/null
+++ b/layout/reftests/bugs/404149-1-ref.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css" href="../fonts/sil/silfonts.css"?>
+<?xml-stylesheet type="text/css" href="data:text/css,
+label {
+ text-align: right;
+ width: 60px;
+ border: 1px solid black;
+ height: 20px;
+ padding: 0 2px 0;
+ margin: 0 10px 0 -58px;
+ font-family: Scheherazade;
+ font-size: 16px;
+}
+" ?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box width="100">
+ <label value="Ù" accesskey="Ù" />
+ </box>
+</window>
diff --git a/layout/reftests/bugs/404149-1.xhtml b/layout/reftests/bugs/404149-1.xhtml
new file mode 100644
index 0000000000..7d28fbb7e7
--- /dev/null
+++ b/layout/reftests/bugs/404149-1.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css" href="../fonts/sil/silfonts.css"?>
+<?xml-stylesheet type="text/css" href="data:text/css,
+label {
+ text-align: right;
+ width: 60px;
+ border: 1px solid black;
+ height: 20px;
+ padding: 0 2px 0;
+ margin: 0 10px 0 -58px;
+ font-family: Scheherazade;
+ font-size: 16px;
+}
+" ?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <box width="100">
+ <label value="ÙایرÙاکس" accesskey="Ù" />
+ </box>
+</window>
diff --git a/layout/reftests/bugs/404180-1-ref.html b/layout/reftests/bugs/404180-1-ref.html
new file mode 100644
index 0000000000..c7723d1748
--- /dev/null
+++ b/layout/reftests/bugs/404180-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<span style="border-left: 80px solid blue;"></span>&#x05d0;12345
+</body>
+</html>
diff --git a/layout/reftests/bugs/404180-1.html b/layout/reftests/bugs/404180-1.html
new file mode 100644
index 0000000000..1e35d5b54a
--- /dev/null
+++ b/layout/reftests/bugs/404180-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<span style="border-left: 80px solid blue;">&#x05d0;12345</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404301-1-ref.html b/layout/reftests/bugs/404301-1-ref.html
new file mode 100644
index 0000000000..aaf89acec1
--- /dev/null
+++ b/layout/reftests/bugs/404301-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col[span] { background: green }
+td { color: white }
+</style>
+</head>
+<body>
+ <table>
+ <colgroup id="x">
+ <col span="2"></col>
+ <col></col>
+ <col id="y"></col>
+ </colgroup>
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ <td>Four</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404301-1.html b/layout/reftests/bugs/404301-1.html
new file mode 100644
index 0000000000..9771a0bcec
--- /dev/null
+++ b/layout/reftests/bugs/404301-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col[span] { background: green }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <colgroup id="x">
+ <col span="2"></col>
+ <col id="y"></col>
+ </colgroup>
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ <td>Four</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").insertBefore(document.createElement("col"),
+ document.getElementById("y"));
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404309-1-ref.html b/layout/reftests/bugs/404309-1-ref.html
new file mode 100644
index 0000000000..3ddf362e53
--- /dev/null
+++ b/layout/reftests/bugs/404309-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+colgroup { background: green }
+td { color: white }
+</style>
+</head>
+<body>
+ <table>
+ <colgroup id="x" span="2">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404309-1a.html b/layout/reftests/bugs/404309-1a.html
new file mode 100644
index 0000000000..cee2427d43
--- /dev/null
+++ b/layout/reftests/bugs/404309-1a.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+colgroup { background: green }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <colgroup id="x" span="1">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404309-1b.html b/layout/reftests/bugs/404309-1b.html
new file mode 100644
index 0000000000..a414488478
--- /dev/null
+++ b/layout/reftests/bugs/404309-1b.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+colgroup { background: green }
+td { color: white }
+</style>
+</head>
+<body onload="runTest()">
+ <table>
+ <colgroup id="x" span="3">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+ </table>
+
+ <script>
+ function runTest() {
+ document.body.offsetWidth;
+ document.getElementById("x").setAttribute("span", 2);
+ }
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/404553-1-ref.html b/layout/reftests/bugs/404553-1-ref.html
new file mode 100644
index 0000000000..cfa0dc8147
--- /dev/null
+++ b/layout/reftests/bugs/404553-1-ref.html
@@ -0,0 +1 @@
+<div style="background-color: lime; height: 50px;"><div style="background: green; width: 50px; margin-left: auto; margin-right: 0;">&nbsp;</div></div> \ No newline at end of file
diff --git a/layout/reftests/bugs/404553-1.html b/layout/reftests/bugs/404553-1.html
new file mode 100644
index 0000000000..692c63c67c
--- /dev/null
+++ b/layout/reftests/bugs/404553-1.html
@@ -0,0 +1 @@
+<table><marquee behavior="alternate" scrollamount="0" style="background-color: lime; height: 50px;"><div style="background: green; width: 50px">&nbsp;</div></marquee><span><title> \ No newline at end of file
diff --git a/layout/reftests/bugs/404666-1-ref.html b/layout/reftests/bugs/404666-1-ref.html
new file mode 100644
index 0000000000..eae778c13f
--- /dev/null
+++ b/layout/reftests/bugs/404666-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+col { background: green }
+td { color: white }
+</style>
+</head>
+<body>
+<table>
+ <col id="col" span="2">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+</table>
+</html>
diff --git a/layout/reftests/bugs/404666-1.html b/layout/reftests/bugs/404666-1.html
new file mode 100644
index 0000000000..53bc049afc
--- /dev/null
+++ b/layout/reftests/bugs/404666-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table { background: white }
+td { color: white }
+</style>
+<script>
+function runTest()
+{
+ document.body.offsetHeight;
+ document.getElementById("col").style.backgroundColor = "green";
+}
+</script>
+</head>
+<body onload="runTest()">
+<table>
+ <col id="col" span="2">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+</table>
+</html>
diff --git a/layout/reftests/bugs/404666-2-ref.html b/layout/reftests/bugs/404666-2-ref.html
new file mode 100644
index 0000000000..0b081bee98
--- /dev/null
+++ b/layout/reftests/bugs/404666-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table {background-color:green}
+td { color: white }
+</style>
+</head>
+<body>
+<table>
+ <tr>
+ <td>Three</td>
+ </tr>
+</table>
+</html>
diff --git a/layout/reftests/bugs/404666-2.html b/layout/reftests/bugs/404666-2.html
new file mode 100644
index 0000000000..1a9c457a8a
--- /dev/null
+++ b/layout/reftests/bugs/404666-2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+table {background-color:green}
+col {background-color:red}
+td { color: white }
+</style>
+<script>
+function runTest()
+{
+ document.body.offsetHeight;
+ document.getElementById("col").style.visibility = "collapse";
+}
+</script>
+</head>
+<body onload="runTest()">
+<table>
+ <col id="col" span="2">
+ <tr>
+ <td>One</td>
+ <td>Two</td>
+ <td>Three</td>
+ </tr>
+</table>
+</html>
diff --git a/layout/reftests/bugs/405305-1-ref.html b/layout/reftests/bugs/405305-1-ref.html
new file mode 100644
index 0000000000..f5c74d4922
--- /dev/null
+++ b/layout/reftests/bugs/405305-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<fieldset>
+ <legend style="margin:0; border:0; padding:0;">
+ <span style="display:inline-block; background:green; width:100px; height:100px;">
+ </legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/405305-1.html b/layout/reftests/bugs/405305-1.html
new file mode 100644
index 0000000000..c22a6b1265
--- /dev/null
+++ b/layout/reftests/bugs/405305-1.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<fieldset>
+ <legend style="background:red; margin:0; border:0; padding:0;">
+ <span style="float:left; display:inline-block; background:green; width:100px; height:100px;">
+ </legend>
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/405380-1-ref.html b/layout/reftests/bugs/405380-1-ref.html
new file mode 100644
index 0000000000..ab6c27f8f1
--- /dev/null
+++ b/layout/reftests/bugs/405380-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="display: inline-block; border: 1px solid red">f l<br/>s l l</div>
+<div style="width:0;"><div style="display: inline-block; border: 1px solid red;">f l<br/>second l l</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/405380-1.html b/layout/reftests/bugs/405380-1.html
new file mode 100644
index 0000000000..ef03347373
--- /dev/null
+++ b/layout/reftests/bugs/405380-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="display: inline-block; border: 1px solid red">f l<br/>
+s l l</div>
+<div style="width:0;"><div style="display: inline-block; border: 1px solid red;">f l<br/><span style="white-space:nowrap"> second</span> l l</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/405517-1-ref.xhtml b/layout/reftests/bugs/405517-1-ref.xhtml
new file mode 100644
index 0000000000..903d531a2e
--- /dev/null
+++ b/layout/reftests/bugs/405517-1-ref.xhtml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+</head>
+
+<body><p id="j">a</p>b<div>c</div></body>
+
+</html>
diff --git a/layout/reftests/bugs/405517-1.xhtml b/layout/reftests/bugs/405517-1.xhtml
new file mode 100644
index 0000000000..acf1f547c1
--- /dev/null
+++ b/layout/reftests/bugs/405517-1.xhtml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script type="text/javascript">
+
+function m()
+{
+ document.getElementById("j").nextSibling.data = 'b';
+}
+
+</script>
+</head>
+
+<body onload="m();"><p id="j">a</p> <div>c</div></body>
+
+</html>
diff --git a/layout/reftests/bugs/405577-1-ref.html b/layout/reftests/bugs/405577-1-ref.html
new file mode 100644
index 0000000000..b8182f38b8
--- /dev/null
+++ b/layout/reftests/bugs/405577-1-ref.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<style>
+b { white-space:nowrap; }
+div { border:1px solid black; }
+</style>
+</head>
+<body style="font-size:10px;">
+
+<div style="width:100px">
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+<div style="width:200px">
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+<div style="width:300px">
+<b><img src="blue-600x58.png" width="100">T</b>
+<b><img src="blue-600x58.png" width="100">T</b><br>
+<b><img src="blue-600x58.png" width="100">T</b>
+<b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/405577-1.html b/layout/reftests/bugs/405577-1.html
new file mode 100644
index 0000000000..9cc87474da
--- /dev/null
+++ b/layout/reftests/bugs/405577-1.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<style>
+b { white-space:nowrap; }
+div { border:1px solid black; }
+</style>
+</head>
+<body style="font-size:10px;">
+
+<div style="width:100px">
+<b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+<div style="width:200px">
+<b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+<div style="width:300px">
+<b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b><span>
+</span><b><img src="blue-600x58.png" width="100">T</b>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/405584-1-ref.html b/layout/reftests/bugs/405584-1-ref.html
new file mode 100644
index 0000000000..353f232887
--- /dev/null
+++ b/layout/reftests/bugs/405584-1-ref.html
@@ -0,0 +1,5 @@
+<html><head></head>
+<body>
+<img src="data:image/gif,GIF89ad%00d%00%B3%00%00%04%FE%04%0C%FE%04%16%00%00%00%00%00%40%E0%00%00%08%00%00%09%00%00%00%00%08(%DF%A0%7D%DA%16%009%00%00~%10%60%00%A0%E8%00%16%12%00%00%00%00!%F9%04%00%00%00%00%00%2C%00%00%00%00d%00d%00%03%04%FF%10%C8I%AB%BD8%CB%B0'%A7%DF%07%88%E2X%95Z%AAb%A8%E7%86%9Dir%B0l%D3%5D%D9%AE%7C%7F%9F1%5C%0D%26%9C%C5%5C%BEdf%98k%16%9FF%A8%D4vTZ%2FD%99pJ%E3%1A%B5%D4%EB%8A%D4%0C%E6%98%D3(%18%FA%12%2B%5B%E9%40w%1B%95%D2%E9%40w%9B%FC%95%3BG%5D3w%81~%85%84_%88b5%16%8B%24%87O%84%91%80%93%86j%85%7Fzf%7F8k%80%97%5E%A0E%9A%8AyYv%94ur%AA%AB%AC%AD%AE%A9%7DUXH%88%9C%A1%94%AE%B9%BA%BB%8F%96V%3A%60%9B%B8%91%BC%C5%B9%A8%A2d%3BLeq%BEs%C6%D1%AF%AAja%3D(%5C%9F%D2%DB%D2%C8%B1%B3%3F%B1%90%82%DE%DC%E6%D4%E8%9F%E1%8CH%A6%CF%C4%E7%F1%AC%CF%B2%B4%CA%C2%BD%E9%9E%F2%DC%9E%BE%DF%ED%82%D1Sg%88%1F%3F%7F%B6%96%04%3C%A5%CD%A0%C3y%E3%16%1D%B9%17q_%C3%87%18%BDYCS%A7%9CEh%18%FF%B7%09%EA%B5%10%1F%B9%82%AB%3E%86%94w%B2J%B2w%23%91%AD%3C%98o%5D%A7%8A%95f%EA%D4x%EF%26%AC-%40u%9A%3B%99p%A2%C9%84)%85%AE%A4%B7%07_%2B%8B*%95%D2%ECT%92!H%A9%F1%10%A2%FA%C1%91%08%CA%82Q%B1%F6%038%90%D8H%B14%EFpu2%E8%EAW%B4Y%FD%08%A42%87hN%B8%2CI6%7D%04%EDlR%BC%E7%26%05%CB%26s%1A%E0n%DA%121%3C%9B%EA%B0A%A6%C9%EA%BA%95%ECX%97V%C9%40%061%0EZ9%EF%40%98%93Cw%86%F8o%2F.%A8n%C3VV%B9%B5%ACG%88%A3%11_fg5)%EA%D8%D1%0433%95%0F6%EEc%8995%23%CA%FAw%B1%E2Z%84%DB%8A%08%EF%AD%F1qa%90%9EN%A7%EF%B9%B1oE%C1jW%FD%BC%5C%A3%A31%AD%C7%A5%AB%A9%B6f%F1%FB%3C%B6%F1IY%FCuusA%B5to8'%F9%AE%1D%B5%8B%C6%CD%D3%E8-%CE%F4%FDU%DA%FF%60%AE%5D%C4%1D%60%B7%89%83%09h%20%1D%D8Y~.%99!%1Fs%C6%85WM)%05N6L%85%E8%60w%9F%255%B97%DB%0E%99%81%E8%9Do%CD%095%8C%85%97%80%C0%8E8%BD%A1g%9Bp%B4%98D%1Ci%D4%F1WI%19%EBU%F5%CE_%D5I%E5%DD%85.%96%C8%DEf%B7%FDFN%22%8A)%A8V%8E%3A%BE%94%82%94q%5Ct%17V%AF%0Dh%0D%818%D9%05%D7G%EAMY%CD%84%06%A2%E4%A0%83%B0eIc%3D%D9%99%D8%17%90O%5D%E9%1C%8E%C1%CD%25%26%1F%8B5t%D9%9C%C0%A5%F8%26%91%2C%803%DF%7C%D4%A1)g%9F%7B%8E%E9%03%9E%9B%60V%E8%A3%FB%BD%07d-%1A0%E3!%24%87%EE%02%E6%5D%C8Q%99%04%1FN%BAi%A5j%86%B28%CA%A7%F6%1Ci%DF%8C%1DB%09%E5t%8A%D6SiI%9F%E1%D4%EA%A4%40%85%F7%A4%9D%D74%95%E1%86%9B%22%84%E2%9B%5El9k%84%AA%AAy%EB%A3%7Bv)J%D6%26%13N%D7%E0%9F9%26%99%18%93WH%F4%22s%CD%BE%25l%AE%DBIG%E2%A26%86R%AD%99%DE%B6%DAd%26yl%0B%1E_2%8D%18%A2%60%C6f%5B%2Bh%F1%D6%C9)%1B%A0%B2K%22~V%E5%7B%5E%96F%B1%FB%0FGnB%B8%AB%BE%04%1A%7Cg%C2%92%EC%1B%F1%C2%C2%CA%AA%070%FE5*%ED%C6%12c%EB%F0%B1%E1%ECvo%B4%00%7F%ACP%C1%E2%8E%ACr%BD%26%07*%E1%CB%24%AB%CCF%CB%2F%86%9Cl%CC3%8FK%B3%A0h%B8%833%BE%DA%EE%5C%F3%9A2C%EC1%CB%3B%8F%5B%B2%A2%2F%3D%1B%B4%D0%0F%A7J%95%C8%0Dc%AC3%D4%CB%08%94E%D5%E5%BD%0Cu%AF%1B-H%F5%D8%ED~%0D6%A3%13s%1C%B1%C5f%1Fk)%CDO%B7%FDF%D1%F2%C9m%F7%DD%13D%00%00%3B" style="width: 100px; height: 100px;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/405584-1.html b/layout/reftests/bugs/405584-1.html
new file mode 100644
index 0000000000..61d8b7f8b7
--- /dev/null
+++ b/layout/reftests/bugs/405584-1.html
@@ -0,0 +1,12 @@
+<html><head></head>
+<body>
+<img src="data:image/gif,GIF89ad%00d%00%B3%00%00%04%FE%04%0C%FE%04%16%00%00%00%00%00%40%E0%00%00%08%00%00%09%00%00%00%00%08(%DF%A0%7D%DA%16%009%00%00~%10%60%00%A0%E8%00%16%12%00%00%00%00!%F9%04%00%00%00%00%00%2C%00%00%00%00d%00d%00%03%04%FF%10%C8I%AB%BD8%CB%B0'%A7%DF%07%88%E2X%95Z%AAb%A8%E7%86%9Dir%B0l%D3%5D%D9%AE%7C%7F%9F1%5C%0D%26%9C%C5%5C%BEdf%98k%16%9FF%A8%D4vTZ%2FD%99pJ%E3%1A%B5%D4%EB%8A%D4%0C%E6%98%D3(%18%FA%12%2B%5B%E9%40w%1B%95%D2%E9%40w%9B%FC%95%3BG%5D3w%81~%85%84_%88b5%16%8B%24%87O%84%91%80%93%86j%85%7Fzf%7F8k%80%97%5E%A0E%9A%8AyYv%94ur%AA%AB%AC%AD%AE%A9%7DUXH%88%9C%A1%94%AE%B9%BA%BB%8F%96V%3A%60%9B%B8%91%BC%C5%B9%A8%A2d%3BLeq%BEs%C6%D1%AF%AAja%3D(%5C%9F%D2%DB%D2%C8%B1%B3%3F%B1%90%82%DE%DC%E6%D4%E8%9F%E1%8CH%A6%CF%C4%E7%F1%AC%CF%B2%B4%CA%C2%BD%E9%9E%F2%DC%9E%BE%DF%ED%82%D1Sg%88%1F%3F%7F%B6%96%04%3C%A5%CD%A0%C3y%E3%16%1D%B9%17q_%C3%87%18%BDYCS%A7%9CEh%18%FF%B7%09%EA%B5%10%1F%B9%82%AB%3E%86%94w%B2J%B2w%23%91%AD%3C%98o%5D%A7%8A%95f%EA%D4x%EF%26%AC-%40u%9A%3B%99p%A2%C9%84)%85%AE%A4%B7%07_%2B%8B*%95%D2%ECT%92!H%A9%F1%10%A2%FA%C1%91%08%CA%82Q%B1%F6%038%90%D8H%B14%EFpu2%E8%EAW%B4Y%FD%08%A42%87hN%B8%2CI6%7D%04%EDlR%BC%E7%26%05%CB%26s%1A%E0n%DA%121%3C%9B%EA%B0A%A6%C9%EA%BA%95%ECX%97V%C9%40%061%0EZ9%EF%40%98%93Cw%86%F8o%2F.%A8n%C3VV%B9%B5%ACG%88%A3%11_fg5)%EA%D8%D1%0433%95%0F6%EEc%8995%23%CA%FAw%B1%E2Z%84%DB%8A%08%EF%AD%F1qa%90%9EN%A7%EF%B9%B1oE%C1jW%FD%BC%5C%A3%A31%AD%C7%A5%AB%A9%B6f%F1%FB%3C%B6%F1IY%FCuusA%B5to8'%F9%AE%1D%B5%8B%C6%CD%D3%E8-%CE%F4%FDU%DA%FF%60%AE%5D%C4%1D%60%B7%89%83%09h%20%1D%D8Y~.%99!%1Fs%C6%85WM)%05N6L%85%E8%60w%9F%255%B97%DB%0E%99%81%E8%9Do%CD%095%8C%85%97%80%C0%8E8%BD%A1g%9Bp%B4%98D%1Ci%D4%F1WI%19%EBU%F5%CE_%D5I%E5%DD%85.%96%C8%DEf%B7%FDFN%22%8A)%A8V%8E%3A%BE%94%82%94q%5Ct%17V%AF%0Dh%0D%818%D9%05%D7G%EAMY%CD%84%06%A2%E4%A0%83%B0eIc%3D%D9%99%D8%17%90O%5D%E9%1C%8E%C1%CD%25%26%1F%8B5t%D9%9C%C0%A5%F8%26%91%2C%803%DF%7C%D4%A1)g%9F%7B%8E%E9%03%9E%9B%60V%E8%A3%FB%BD%07d-%1A0%E3!%24%87%EE%02%E6%5D%C8Q%99%04%1FN%BAi%A5j%86%B28%CA%A7%F6%1Ci%DF%8C%1DB%09%E5t%8A%D6SiI%9F%E1%D4%EA%A4%40%85%F7%A4%9D%D74%95%E1%86%9B%22%84%E2%9B%5El9k%84%AA%AAy%EB%A3%7Bv)J%D6%26%13N%D7%E0%9F9%26%99%18%93WH%F4%22s%CD%BE%25l%AE%DBIG%E2%A26%86R%AD%99%DE%B6%DAd%26yl%0B%1E_2%8D%18%A2%60%C6f%5B%2Bh%F1%D6%C9)%1B%A0%B2K%22~V%E5%7B%5E%96F%B1%FB%0FGnB%B8%AB%BE%04%1A%7Cg%C2%92%EC%1B%F1%C2%C2%CA%AA%070%FE5*%ED%C6%12c%EB%F0%B1%E1%ECvo%B4%00%7F%ACP%C1%E2%8E%ACr%BD%26%07*%E1%CB%24%AB%CCF%CB%2F%86%9Cl%CC3%8FK%B3%A0h%B8%833%BE%DA%EE%5C%F3%9A2C%EC1%CB%3B%8F%5B%B2%A2%2F%3D%1B%B4%D0%0F%A7J%95%C8%0Dc%AC3%D4%CB%08%94E%D5%E5%BD%0Cu%AF%1B-H%F5%D8%ED~%0D6%A3%13s%1C%B1%C5f%1Fk)%CDO%B7%FDF%D1%F2%C9m%F7%DD%13D%00%00%3B" style="width: 100px; height: 100px; display: none;">
+<canvas id="c"></canvas>
+<script>
+window.onload = function () {
+ var ctx = document.getElementById('c').getContext('2d');
+ ctx.drawImage(document.images[0], 0, 0);
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/405952-1-ref.html b/layout/reftests/bugs/405952-1-ref.html
new file mode 100644
index 0000000000..5325412995
--- /dev/null
+++ b/layout/reftests/bugs/405952-1-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+.container { margin-top:1em; background:yellow; width:100px; }
+.content { width:100px; height:60px; }
+.scroll-in { overflow:scroll; }
+.scroll { overflow-x:scroll; width:200px; }
+.over { height:50px; }
+body { margin:0; position:absolute; clip: rect(0 100px auto 0); }
+</style>
+</head>
+<body>
+
+<div class="container">
+ <div class="content"></div>
+</div>
+<div class="container scroll">
+ <div class="content"></div>
+</div>
+<div class="container scroll-in over">
+ <div class="content"></div>
+</div>
+<div class="container scroll over">
+ <div class="content"></div>
+</div>
+
+<div class="container">
+ <div class="content"></div>
+</div>
+<div class="container scroll">
+ <div class="content"></div>
+</div>
+<div class="container scroll-in over">
+ <div class="content"></div>
+</div>
+<div class="container scroll over">
+ <div class="content"></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/405952-1.html b/layout/reftests/bugs/405952-1.html
new file mode 100644
index 0000000000..d94df11fe7
--- /dev/null
+++ b/layout/reftests/bugs/405952-1.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+.container { float:left; margin-top:1em; clear:both; }
+.auto { overflow:auto; }
+.scroll { overflow:scroll; }
+.content { width:100px; height:60px; background:yellow; }
+.over { height:50px; }
+body { margin:0; position:absolute; clip: rect(0 100px auto 0); }
+</style>
+</head>
+<body>
+
+<!-- test pref-width -->
+
+<div class="container auto">
+ <div class="content"></div>
+</div>
+<div class="container scroll">
+ <div class="content"></div>
+</div>
+<div class="container auto over">
+ <div class="content"></div>
+</div>
+<div class="container scroll over">
+ <div class="content"></div>
+</div>
+
+<!-- test min-width -->
+
+<div style="width:0">
+<div class="container auto">
+ <div class="content"></div>
+</div>
+<div class="container scroll">
+ <div class="content"></div>
+</div>
+<div class="container auto over">
+ <div class="content"></div>
+</div>
+<div class="container scroll over">
+ <div class="content"></div>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/40596-1-ref.html b/layout/reftests/bugs/40596-1-ref.html
new file mode 100644
index 0000000000..8246c82658
--- /dev/null
+++ b/layout/reftests/bugs/40596-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ &nbsp;
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1a.html b/layout/reftests/bugs/40596-1a.html
new file mode 100644
index 0000000000..8fbcc64dcb
--- /dev/null
+++ b/layout/reftests/bugs/40596-1a.html
@@ -0,0 +1,16 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <input type="text" style="width: 100%; visibility: hidden ">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1b.html b/layout/reftests/bugs/40596-1b.html
new file mode 100644
index 0000000000..8a832d4097
--- /dev/null
+++ b/layout/reftests/bugs/40596-1b.html
@@ -0,0 +1,16 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <input type="text" style="visibility: hidden">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1c.html b/layout/reftests/bugs/40596-1c.html
new file mode 100644
index 0000000000..69c6739813
--- /dev/null
+++ b/layout/reftests/bugs/40596-1c.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <select style="width: 100%; visibility: hidden">
+ <option>This is pretty long text in the select</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1d.html b/layout/reftests/bugs/40596-1d.html
new file mode 100644
index 0000000000..c554cd8d99
--- /dev/null
+++ b/layout/reftests/bugs/40596-1d.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <select style="visibility: hidden">
+ <option>This is pretty long text in the select</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1e.html b/layout/reftests/bugs/40596-1e.html
new file mode 100644
index 0000000000..d7afcd5491
--- /dev/null
+++ b/layout/reftests/bugs/40596-1e.html
@@ -0,0 +1,17 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <input type="button" style="width: 100%; visibility: hidden"
+ value="This is pretty long text in the button">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1f.html b/layout/reftests/bugs/40596-1f.html
new file mode 100644
index 0000000000..76b04dbbce
--- /dev/null
+++ b/layout/reftests/bugs/40596-1f.html
@@ -0,0 +1,17 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <input type="button" style="visibility: hidden"
+ value="This is pretty long text in the button">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1g.html b/layout/reftests/bugs/40596-1g.html
new file mode 100644
index 0000000000..a160324916
--- /dev/null
+++ b/layout/reftests/bugs/40596-1g.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <button style="width: 100%; visibility: hidden">
+ This is prettylongtextinthebutton
+ </button>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1h.html b/layout/reftests/bugs/40596-1h.html
new file mode 100644
index 0000000000..c5a3f1166d
--- /dev/null
+++ b/layout/reftests/bugs/40596-1h.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <button style="visibility: hidden">
+ This is prettylongtextinthebutton
+ </button>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1i.html b/layout/reftests/bugs/40596-1i.html
new file mode 100644
index 0000000000..67d86c3735
--- /dev/null
+++ b/layout/reftests/bugs/40596-1i.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <select size="4" style="width: 100%; visibility: hidden">
+ <option>This is pretty long text in the select</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/40596-1j.html b/layout/reftests/bugs/40596-1j.html
new file mode 100644
index 0000000000..6ab87c9d03
--- /dev/null
+++ b/layout/reftests/bugs/40596-1j.html
@@ -0,0 +1,18 @@
+<html>
+ <body>
+ <form>
+ <table border="1" width="300" style="height: 300px">
+ <tr>
+ <td style="width:80%">
+ &nbsp;
+ </td>
+ <td style="width:20%">
+ <select size="4" style="visibility: hidden">
+ <option>This is pretty long text in the select</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/406484-1-ref.html b/layout/reftests/bugs/406484-1-ref.html
new file mode 100644
index 0000000000..572e87035d
--- /dev/null
+++ b/layout/reftests/bugs/406484-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body style="border:3px solid;">
+ <div style="float:left;">Kitty</div>
+ <div>
+ <div><div style="clear:both"></div></div>
+ Kitty
+ <div style="clear:both">.</div>
+ <div style="float:left;"></div>
+ </div>
+ <div id="i">xxx</div>
+ <div style="clear:both"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/406484-1.html b/layout/reftests/bugs/406484-1.html
new file mode 100644
index 0000000000..effc63d39a
--- /dev/null
+++ b/layout/reftests/bugs/406484-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body style="border:3px solid;">
+ <div style="float:left;">Kitty</div>
+ <div>
+ <div><div style="clear:both"></div></div>
+ Kitty
+ <div style="clear:both">.</div>
+ <div style="float:left;"></div>
+ </div>
+ <div id="i">x</div>
+ <div style="clear:both"></div>
+ <script>
+ document.body.offsetTop;
+ document.getElementById("i").textContent += "x";
+ document.body.offsetTop;
+ document.getElementById("i").textContent += "x";
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/406568-1-ref.html b/layout/reftests/bugs/406568-1-ref.html
new file mode 100644
index 0000000000..4c7c1bd1ae
--- /dev/null
+++ b/layout/reftests/bugs/406568-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+&nbsp;
+<div style="position:relative; width:300px; background:grey;">
+ <div style="position:absolute; left:0; bottom:0px; width:250px; background:lime;">abs.pos.</div>
+ <div style="float:left; width:200px; height:200px; background:cyan;"></div>
+ <div style="clear:both;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/406568-1.html b/layout/reftests/bugs/406568-1.html
new file mode 100644
index 0000000000..82ec493ad8
--- /dev/null
+++ b/layout/reftests/bugs/406568-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+&nbsp;
+<div style="position:relative; width:300px; background:grey;">
+ <div style="position:absolute; left:0; bottom:0px; width:250px; background:lime;">abs.pos.</div>
+ <div style="float:left; width:200px; height:200px; background:cyan;"></div>
+ <script>document.body.offsetTop;</script>
+ <div style="clear:both;"></div>
+</div>
+<script>document.body.offsetTop;</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407016-1-a.html b/layout/reftests/bugs/407016-1-a.html
new file mode 100644
index 0000000000..28812bd6c8
--- /dev/null
+++ b/layout/reftests/bugs/407016-1-a.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<table style="width: 200px; border: 1px solid black;"><tr><td>
+<marquee scrollamount="0" style="background-color: lime;">
+ <div style="width: 2000px; height: 50px;"></div>
+</marquee>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407016-1-b.html b/layout/reftests/bugs/407016-1-b.html
new file mode 100644
index 0000000000..5e0c72a616
--- /dev/null
+++ b/layout/reftests/bugs/407016-1-b.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<table style="width: 200px; border: 1px solid black;"><tr><td>
+<marquee scrollamount="0" behavior="alternate">
+ <div style="width: 2000px; height: 50px; background-color: lime;"></div>
+</marquee>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407016-1-ref.html b/layout/reftests/bugs/407016-1-ref.html
new file mode 100644
index 0000000000..fd2a9ac051
--- /dev/null
+++ b/layout/reftests/bugs/407016-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<table style="width: 200px; border: 1px solid black;"><tr><td>
+<div style="background-color: lime; height: 50px;">
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407078-1-ref.html b/layout/reftests/bugs/407078-1-ref.html
new file mode 100644
index 0000000000..a5486ef6ca
--- /dev/null
+++ b/layout/reftests/bugs/407078-1-ref.html
@@ -0,0 +1,21 @@
+<html><head>
+<style>
+body{
+font:normal 13px Verdana;
+}
+div {
+padding-right:7px;
+font-size:11px;
+}
+</style></head>
+<body>
+<table><tbody><tr><td>
+<div>
+<span>m m </span>
+</div>
+<div>
+<span>m</span>
+</div>
+</td></tr></tbody></table>
+
+</body></html>
diff --git a/layout/reftests/bugs/407078-1.html b/layout/reftests/bugs/407078-1.html
new file mode 100644
index 0000000000..d273580733
--- /dev/null
+++ b/layout/reftests/bugs/407078-1.html
@@ -0,0 +1,22 @@
+<html><head>
+<style>
+body{
+font:normal 13px Verdana;
+}
+div {
+padding-right:7px;
+font-size:11px;
+}
+</style></head>
+<body>
+<table><tbody><tr><td>
+<div>
+<span>m m </span>
+<br>
+</div>
+<div>
+<span>m</span>
+</div>
+</td></tr></tbody></table>
+
+</body></html>
diff --git a/layout/reftests/bugs/407095-1-ref.html b/layout/reftests/bugs/407095-1-ref.html
new file mode 100644
index 0000000000..348e8c8a69
--- /dev/null
+++ b/layout/reftests/bugs/407095-1-ref.html
@@ -0,0 +1,9 @@
+<DOCTYPE html>
+
+<html><body style="width: 400px;">
+
+<div style="overflow:scroll; background: yellow; height: 200px;">
+
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/407095-1.html b/layout/reftests/bugs/407095-1.html
new file mode 100644
index 0000000000..765a6efe6f
--- /dev/null
+++ b/layout/reftests/bugs/407095-1.html
@@ -0,0 +1,9 @@
+<DOCTYPE html>
+
+<html><body style="width: 400px;" onload="document.documentElement.appendChild(document.body)">
+
+<div style="overflow:scroll; background: yellow; height: 200px;">
+
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/407111-1-ref.html b/layout/reftests/bugs/407111-1-ref.html
new file mode 100644
index 0000000000..bd63b82657
--- /dev/null
+++ b/layout/reftests/bugs/407111-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<style>
+b { white-space:nowrap; }
+div { border:1px solid black; }
+</style>
+</head>
+<body style="font-size:10px; width:200px; border:1px solid black"><b><img src="mozilla-banner.gif" width="100">T</b><br>
+<b><img src="mozilla-banner.gif" width="100">T</b></body>
+</html>
diff --git a/layout/reftests/bugs/407111-1.html b/layout/reftests/bugs/407111-1.html
new file mode 100644
index 0000000000..0b63ea1b8f
--- /dev/null
+++ b/layout/reftests/bugs/407111-1.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<style>
+b { white-space:nowrap; }
+div { border:1px solid black; }
+</style>
+</head>
+<body style="font-size:10px; width:200px; border:1px solid black"><b><img src="mozilla-banner.gif" width="100">T</b>
+<b><img src="mozilla-banner.gif" width="100">T</b></br></body>
+</html>
diff --git a/layout/reftests/bugs/407227-1-ref.html b/layout/reftests/bugs/407227-1-ref.html
new file mode 100644
index 0000000000..5e124064f6
--- /dev/null
+++ b/layout/reftests/bugs/407227-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+ <table bgcolor="lightgray" width="70">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"><br><img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407227-1.html b/layout/reftests/bugs/407227-1.html
new file mode 100644
index 0000000000..d16e9d6b15
--- /dev/null
+++ b/layout/reftests/bugs/407227-1.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+ <table bgcolor="lightgray" width="70">
+ <tbody>
+ <tr>
+ <td bgcolor="red">
+ <img width="50" height="50"> <img width="50" height="50">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407243-1-ref.html b/layout/reftests/bugs/407243-1-ref.html
new file mode 100644
index 0000000000..06769250ce
--- /dev/null
+++ b/layout/reftests/bugs/407243-1-ref.html
@@ -0,0 +1,67 @@
+<html>
+<head><style>
+ tr { height: 1em; }
+ td.wide { width: 500px; }
+
+ td.orange { background: orange; }
+ td.purple { background: purple; }
+ td.teal { background: teal; }
+ td.blue { background: lightblue; }
+</style></head>
+<body>
+ <p>(x,x) labels indicate the column & row order of the orange cell.</p>
+
+ <br/>(0,0)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="orange wide"></td>
+ <td class="orange"></td>
+ <td class="purple"></td>
+ </td>
+ </tr><tr>
+ <td class="teal">x</td>
+ <td class="blue" colspan="2">y z</td>
+ </tr>
+ </table>
+
+ <br/>(0,1)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="teal">x</td>
+ <td class="blue" colspan="2">y z</td>
+ </td>
+ </tr><tr>
+ <td class="orange wide"></td>
+ <td class="orange"></td>
+
+ <td class="purple"></td>
+ </tr>
+ </table>
+
+ <br/>(1,0)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="purple"></td>
+ <td class="orange"></td>
+ <td class="orange wide"></td>
+ </td>
+ </tr><tr>
+ <td class="blue" colspan="2">y z</td>
+ <td class="teal">x</td>
+ </tr>
+ </table>
+
+ <br/>(1,1)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="blue" colspan="2">y z</td>
+ <td class="teal">x</td>
+ </td>
+ </tr><tr>
+ <td class="purple"></td>
+ <td class="orange"></td>
+ <td class="orange wide"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407243-1.html b/layout/reftests/bugs/407243-1.html
new file mode 100644
index 0000000000..a5b3d82ec2
--- /dev/null
+++ b/layout/reftests/bugs/407243-1.html
@@ -0,0 +1,73 @@
+<html>
+<!-- This testcase asserts that in all the tables below, all 500px of the --
+ -- orange colspanning cell's specified width should go to its first --
+ -- spanned column. Its second spanned column receives none of the --
+ -- 500px, and it only gets a small amount of width by taking half of the --
+ -- light-blue cell's preferred width. --
+ -- --
+ -- This happens because the first column starts with nonzero pref-width, --
+ -- whereas the second and third columns have zero pref-width. Hence, --
+ -- the orange colspanning cell favors the first column over the second, --
+ -- whereas the lightblue colspanning cell distributes its width equally --
+ -- between the second and third columns. -->
+<head><style>
+ tr { height: 1em; }
+ td.wide { width: 500px; }
+
+ td.orange { background: orange; }
+ td.purple { background: purple; }
+ td.teal { background: teal; }
+ td.blue { background: lightblue; }
+</style></head>
+<body>
+ <p>(x,x) labels indicate the column & row order of the orange cell.</p>
+
+ <br/>(0,0)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="orange wide" colspan="2"></td>
+ <td class="purple"></td>
+ </td>
+ </tr><tr>
+ <td class="teal">x</td>
+ <td class="blue" colspan="2">y z</td>
+ </tr>
+ </table>
+
+ <br/>(0,1)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="teal">x</td>
+ <td class="blue" colspan="2">y z</td>
+ </td>
+ </tr><tr>
+ <td class="orange wide" colspan="2"></td>
+ <td class="purple"></td>
+ </tr>
+ </table>
+
+ <br/>(1,0)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="purple"></td>
+ <td class="orange wide" colspan="2"></td>
+ </td>
+ </tr><tr>
+ <td class="blue" colspan="2">y z</td>
+ <td class="teal">x</td>
+ </tr>
+ </table>
+
+ <br/>(1,1)
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="blue" colspan="2">y z</td>
+ <td class="teal">x</td>
+ </td>
+ </tr><tr>
+ <td class="purple"></td>
+ <td class="orange wide" colspan="2"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407419-1-ref.html b/layout/reftests/bugs/407419-1-ref.html
new file mode 100644
index 0000000000..96abde25dd
--- /dev/null
+++ b/layout/reftests/bugs/407419-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+<body>
+
+<span style="display: -moz-inline-box" id="s">hello world</span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/407419-1.html b/layout/reftests/bugs/407419-1.html
new file mode 100644
index 0000000000..4ba0cad4f3
--- /dev/null
+++ b/layout/reftests/bugs/407419-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+<body onload="document.getElementById('s').firstChild.data = ('hello world');">
+
+<span style="display: -moz-inline-box" id="s"> </span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/407937-1-ref.html b/layout/reftests/bugs/407937-1-ref.html
new file mode 100644
index 0000000000..b2025a4d39
--- /dev/null
+++ b/layout/reftests/bugs/407937-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<div style="width:1px"><b>T</b>T</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/407937-1.html b/layout/reftests/bugs/407937-1.html
new file mode 100644
index 0000000000..af435c77ce
--- /dev/null
+++ b/layout/reftests/bugs/407937-1.html
@@ -0,0 +1,5 @@
+<html class="reftest-wait">
+<body onload="var d = document.getElementById('d'); d.removeChild(d.firstChild); document.documentElement.className='';">
+<div style="width:1px"><b>T</b><span id="d"> </span>T</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/408493-1.html b/layout/reftests/bugs/408493-1.html
new file mode 100644
index 0000000000..7b7eff6612
--- /dev/null
+++ b/layout/reftests/bugs/408493-1.html
@@ -0,0 +1,16 @@
+<html>
+
+<head>
+<style type="text/css">
+
+body { column-count: 2; }
+span { white-space: pre; }
+body:first-letter { }
+
+</style>
+</head>
+
+<body onload="document.body.removeChild(document.body.lastChild);"><span>
+</span>b</body>
+
+</html>
diff --git a/layout/reftests/bugs/408493-2-ref.html b/layout/reftests/bugs/408493-2-ref.html
new file mode 100644
index 0000000000..d3d518fdbf
--- /dev/null
+++ b/layout/reftests/bugs/408493-2-ref.html
@@ -0,0 +1,14 @@
+<html>
+
+<head>
+<style type="text/css">
+
+body { column-count: 2; }
+body:first-letter { color:blue; font-size:400%; }
+
+</style>
+</head>
+
+<body>T</body>
+
+</html>
diff --git a/layout/reftests/bugs/408493-2.html b/layout/reftests/bugs/408493-2.html
new file mode 100644
index 0000000000..65d3bc92ae
--- /dev/null
+++ b/layout/reftests/bugs/408493-2.html
@@ -0,0 +1,16 @@
+<html>
+
+<head>
+<style type="text/css">
+
+body { column-count: 2; }
+span { white-space: pre; }
+body:first-letter { color:blue; font-size:400%; }
+
+</style>
+</head>
+
+<body onload="var span=document.getElementById('span'); span.removeChild(span.lastChild);"><span id="span">T
+</span>T</body>
+
+</html>
diff --git a/layout/reftests/bugs/408656-1-ref.html b/layout/reftests/bugs/408656-1-ref.html
new file mode 100644
index 0000000000..9e3050c191
--- /dev/null
+++ b/layout/reftests/bugs/408656-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head><style>
+body {
+ margin: 0px;
+}
+div {
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+ margin: 100px;
+}
+</style></head>
+<body>
+<div/>
+</body>
+</html>
diff --git a/layout/reftests/bugs/408656-1a.html b/layout/reftests/bugs/408656-1a.html
new file mode 100644
index 0000000000..638929eca9
--- /dev/null
+++ b/layout/reftests/bugs/408656-1a.html
@@ -0,0 +1,22 @@
+<html>
+<head><style>
+body {
+ margin: 0px;
+}
+span.a {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+ overflow: hidden;
+}
+</style></head>
+<body>
+<script>document.body.offsetHeight;</script>
+<div style="padding: 100px;">
+ <span style="position: relative;">
+ <span class="a"></span>
+ </span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/408656-1b.html b/layout/reftests/bugs/408656-1b.html
new file mode 100644
index 0000000000..1d22d1487c
--- /dev/null
+++ b/layout/reftests/bugs/408656-1b.html
@@ -0,0 +1,25 @@
+<html>
+<head><style>
+body {
+ margin: 0px;
+}
+span.a {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+ overflow: hidden;
+}
+</style></head>
+<body>
+<!-- Note: This variant testcase (with no whitespace -->
+<!-- between </script> and <div>) only reproduces the -->
+<!-- bug on nightlies after May 1st, 2005. -->
+<script>document.body.offsetHeight;</script
+><div style="padding: 100px;">
+ <span style="position: relative;">
+ <span class="a"></span>
+ </span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/408656-1c.html b/layout/reftests/bugs/408656-1c.html
new file mode 100644
index 0000000000..82c55385a3
--- /dev/null
+++ b/layout/reftests/bugs/408656-1c.html
@@ -0,0 +1,21 @@
+<html>
+<head><style>
+body {
+ margin: 0px;
+}
+span.a {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+ overflow: hidden;
+}
+</style></head>
+<body>
+<div style="padding: 100px;">
+ <span style="position: relative;">
+ <span class="a"></span>
+ </span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-1-ref.html b/layout/reftests/bugs/408782-1-ref.html
new file mode 100644
index 0000000000..c40a081773
--- /dev/null
+++ b/layout/reftests/bugs/408782-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+
+<input id="i" type="image" src="moz-no-such-scheme:nothing">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-1a.html b/layout/reftests/bugs/408782-1a.html
new file mode 100644
index 0000000000..5a5c65f0a2
--- /dev/null
+++ b/layout/reftests/bugs/408782-1a.html
@@ -0,0 +1,9 @@
+<html class="reftest-wait">
+<head>
+</head>
+<body onload="document.getElementById('i').removeAttribute('alt'); document.documentElement.className='';">
+
+<input id="i" type="image" src="moz-no-such-scheme:nothing" alt="Alt">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-1b.html b/layout/reftests/bugs/408782-1b.html
new file mode 100644
index 0000000000..f4044508e3
--- /dev/null
+++ b/layout/reftests/bugs/408782-1b.html
@@ -0,0 +1,9 @@
+<html class="reftest-wait">
+<head>
+</head>
+<body onload="document.getElementById('i').removeAttribute('value'); document.documentElement.className='';">
+
+<input id="i" type="image" src="moz-no-such-scheme:nothing" value="Value">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-2-ref.html b/layout/reftests/bugs/408782-2-ref.html
new file mode 100644
index 0000000000..c5fbda2fe4
--- /dev/null
+++ b/layout/reftests/bugs/408782-2-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<input id="i" type="image" src="moz-no-such-scheme:nothing" alt="Alt">
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-2a.html b/layout/reftests/bugs/408782-2a.html
new file mode 100644
index 0000000000..2ad4ab5cd6
--- /dev/null
+++ b/layout/reftests/bugs/408782-2a.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<input id="i" type="image" src="moz-no-such-scheme:nothing" alt="Alt" value="Value">
+</body>
+</html>
diff --git a/layout/reftests/bugs/408782-2b.html b/layout/reftests/bugs/408782-2b.html
new file mode 100644
index 0000000000..1597dfaf2e
--- /dev/null
+++ b/layout/reftests/bugs/408782-2b.html
@@ -0,0 +1,9 @@
+<html class="reftest-wait">
+<head>
+</head>
+<body onload="document.getElementById('i').removeAttribute('alt'); document.documentElement.className='';">
+
+<input id="i" type="image" src="moz-no-such-scheme:nothing" value="Alt" alt="Value">
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/409084-1-ref.html b/layout/reftests/bugs/409084-1-ref.html
new file mode 100644
index 0000000000..5ae9e92080
--- /dev/null
+++ b/layout/reftests/bugs/409084-1-ref.html
@@ -0,0 +1,15 @@
+<html class="reftest-paged">
+<head><style>
+ td { vertical-align: top; }
+ .break { page-break-before: always; height: 1in }
+</style></head>
+<body>
+ <table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr><td rowspan="2">line 1<br/>line 2<br/>line 3</td></tr>
+ <tr><td><div class="tall"></iframe></td></tr>
+ </tbody>
+ </table>
+ <div class="break"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/409084-1a.html b/layout/reftests/bugs/409084-1a.html
new file mode 100644
index 0000000000..48f440edac
--- /dev/null
+++ b/layout/reftests/bugs/409084-1a.html
@@ -0,0 +1,20 @@
+<html class="reftest-paged">
+<head><style>
+ td { vertical-align: top; }
+ .tall {
+ height: 2.1in; /* just longer than a reftest-paged page. */
+ width: 1in;
+ float: left;
+ border: 0px;
+ }
+</style></head>
+<body>
+ <table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr><td rowspan="2">line 1<br/>line 2<br/>line 3</td></tr>
+ <tr><td><iframe class="tall"></iframe></td></tr>
+ </tbody>
+ </table>
+ <br>
+</body>
+</html>
diff --git a/layout/reftests/bugs/409084-1b.html b/layout/reftests/bugs/409084-1b.html
new file mode 100644
index 0000000000..d710842e56
--- /dev/null
+++ b/layout/reftests/bugs/409084-1b.html
@@ -0,0 +1,21 @@
+<html class="reftest-paged">
+<head><style>
+ td { vertical-align: top; }
+ .tall {
+ height: 2.1in; /* just longer than a reftest-paged page. */
+ width: 1in;
+ float: left;
+ border: 0px;
+ }
+</style></head>
+<body>
+ <table cellspacing="0" cellpadding="0">
+ <tbody></tbody>
+ <tfoot>
+ <tr><td rowspan="2">line 1<br/>line 2<br/>line 3</td></tr>
+ <tr><td><iframe class="tall"></iframe></td></tr>
+ </tfoot>
+ </table>
+ <br>
+</body>
+</html>
diff --git a/layout/reftests/bugs/409659-1-ref.html b/layout/reftests/bugs/409659-1-ref.html
new file mode 100644
index 0000000000..f900be5437
--- /dev/null
+++ b/layout/reftests/bugs/409659-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <img src="solidblue.png" style="height: 4in; width: 100px; display: block">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/409659-1a.html b/layout/reftests/bugs/409659-1a.html
new file mode 100644
index 0000000000..1b5de9a529
--- /dev/null
+++ b/layout/reftests/bugs/409659-1a.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <input type="image" src="solidblue.png"
+ style="height: 4in; width: 100px; display: block">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/409659-1b.html b/layout/reftests/bugs/409659-1b.html
new file mode 100644
index 0000000000..ce8168a3b7
--- /dev/null
+++ b/layout/reftests/bugs/409659-1b.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <img src="solidblue.png" style="height: 2in; width: 100px; display: block">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/409659-1c.html b/layout/reftests/bugs/409659-1c.html
new file mode 100644
index 0000000000..f7001a387b
--- /dev/null
+++ b/layout/reftests/bugs/409659-1c.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <img src="solidblue.png" style="height: 30in; width: 100px; display: block">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/409659-1d.html b/layout/reftests/bugs/409659-1d.html
new file mode 100644
index 0000000000..3b68464f2a
--- /dev/null
+++ b/layout/reftests/bugs/409659-1d.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <img src="solidblue.png" style="height: 1in; width: 100px; display: block">
+ <img src="solidblue.png" style="height: 1in; width: 100px; display: block">
+ <img src="solidblue.png" style="height: 1in; width: 100px; display: block">
+ <img src="solidblue.png" style="height: 1in; width: 100px; display: block">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/410621-1-ref.html b/layout/reftests/bugs/410621-1-ref.html
new file mode 100644
index 0000000000..49a51d5cec
--- /dev/null
+++ b/layout/reftests/bugs/410621-1-ref.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+td {
+ border: 4px solid green;
+}
+table {
+ border-collapse: collapse;
+}
+</style>
+</head>
+<body>
+<div style="height: 20em;">
+ <table align="left">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+ <table align="center">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+ <table align="right">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/410621-1.html b/layout/reftests/bugs/410621-1.html
new file mode 100644
index 0000000000..38b04b8f03
--- /dev/null
+++ b/layout/reftests/bugs/410621-1.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+td {
+ border: 4px solid green;
+}
+table {
+ border-collapse: collapse;
+}
+</style>
+</head>
+<body>
+<div style="overflow: auto; height: 20em;">
+ <table align="left">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+ <table align="center">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+ <table align="right">
+ <tr>
+ <td>Entry 1</td>
+ <td>Value 1</td>
+ </tr>
+ <tr>
+ <td>Entry 2</td>
+ <td>Value 2</td>
+ </tr>
+ <tr>
+ <td>Entry 3</td>
+ <td>Value 3</td>
+ </tr>
+ <tr>
+ <td>Entry 4</td>
+ <td>Value 4</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411059-1-ref.html b/layout/reftests/bugs/411059-1-ref.html
new file mode 100644
index 0000000000..088c8b0691
--- /dev/null
+++ b/layout/reftests/bugs/411059-1-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p { float:left; white-space:pre; border:1px solid black; clear:both; }
+.letterspace { letter-spacing:4px; }
+.space { padding:0 4px 0 0; }
+table { clear:both; }
+</style>
+</head>
+<body>
+
+<p>
+ a
+</p>
+
+<div style="width:0">
+ <p>
+ a
+ </p>
+</div>
+
+<p>
+<span class="letterspace"> </span><span class="space">a</span>
+</p>
+
+<div style="width:0">
+ <p>
+<span class="letterspace"> </span><span class="space">a</span>
+ </p>
+</div>
+
+<table><tr>
+ <td style="background-color:#808080;"><pre>
+test
+abcdefg hijklm nopqr stuv wxy z0 1
+ </pre></td>
+ <td style="background-color:#c08080;">cell 2</td>
+</tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/411059-1.html b/layout/reftests/bugs/411059-1.html
new file mode 100644
index 0000000000..da69720f7c
--- /dev/null
+++ b/layout/reftests/bugs/411059-1.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p { float:left; white-space:pre; border:1px solid black; clear:both; }
+.letterspace { letter-spacing:4px; }
+table { clear:both; }
+</style>
+</head>
+<body>
+
+<p>
+ a
+</p>
+
+<div style="width:0">
+ <p>
+ a
+ </p>
+</div>
+
+<!-- there should be no letter-spacing after the tab, because letter-spacing is
+ already incorporated into the calculation of the tab position, but there
+ will be 4px after the a -->
+<p class="letterspace">
+ a
+</p>
+
+<div style="width:0">
+ <p class="letterspace">
+ a
+ </p>
+</div>
+
+<table><tr>
+ <td style="background-color:#808080;"><pre>
+test
+abcdefg hijklm nopqr stuv wxy z0 1
+ </pre></td>
+ <td style="background-color:#c08080;">cell 2</td>
+</tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/411334-1-ref.xml b/layout/reftests/bugs/411334-1-ref.xml
new file mode 100644
index 0000000000..8996ae0435
--- /dev/null
+++ b/layout/reftests/bugs/411334-1-ref.xml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<div style="font-family: serif; font-size: 100px; padding-left:10px;">
+ W<img style="width:0px; height:200px;" src="mozilla-banner.gif"/>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411334-1.xml b/layout/reftests/bugs/411334-1.xml
new file mode 100644
index 0000000000..91a4b3efa9
--- /dev/null
+++ b/layout/reftests/bugs/411334-1.xml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="font-family: serif; font-size: 100px;" height="500" width="500">
+ <text x="10" y="200">W</text>
+</svg>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-1-ref.html b/layout/reftests/bugs/411585-1-ref.html
new file mode 100644
index 0000000000..c21437c279
--- /dev/null
+++ b/layout/reftests/bugs/411585-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="position:absolute; top:0; left:0;">This text should be visible in print preview</div>
+<div style="height:800px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-1.html b/layout/reftests/bugs/411585-1.html
new file mode 100644
index 0000000000..40bef4ba5c
--- /dev/null
+++ b/layout/reftests/bugs/411585-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="height:800px;"></div>
+<div style="position:absolute; top:0; left:0;">This text should be visible in print preview</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-2-ref.html b/layout/reftests/bugs/411585-2-ref.html
new file mode 100644
index 0000000000..d6b223b31f
--- /dev/null
+++ b/layout/reftests/bugs/411585-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="position:absolute; top:0; left:0; width:100px; height:100px; background:black; opacity:0.5;">Hi</div>
+<div style="height:800px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-2.html b/layout/reftests/bugs/411585-2.html
new file mode 100644
index 0000000000..b87d91b386
--- /dev/null
+++ b/layout/reftests/bugs/411585-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="height:800px;"></div>
+<div style="opacity:0.5;">
+ <div style="position:absolute; top:0; left:0; width:100px; height:100px; background:black;">Hi</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-3-ref.html b/layout/reftests/bugs/411585-3-ref.html
new file mode 100644
index 0000000000..bc4471a443
--- /dev/null
+++ b/layout/reftests/bugs/411585-3-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body style="margin:0">
+<div style="position:absolute; top:0; left:0; width:100px; height:100px; background:black;">Hi</div>
+<div style="height:800px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411585-3.html b/layout/reftests/bugs/411585-3.html
new file mode 100644
index 0000000000..ca8d5c3b91
--- /dev/null
+++ b/layout/reftests/bugs/411585-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body style="margin:0">
+<div style="height:800px;"></div>
+<div style="position:absolute; clip:rect(-800px 200px 100px 0px);">
+ <div style="position:absolute; top:-800px; left:0; width:100px; height:100px; background:black;">Hi</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411792-1-ref.html b/layout/reftests/bugs/411792-1-ref.html
new file mode 100644
index 0000000000..8fda116056
--- /dev/null
+++ b/layout/reftests/bugs/411792-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div>One<br>Two<br>Three</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/411792-1.html b/layout/reftests/bugs/411792-1.html
new file mode 100644
index 0000000000..a14fe491f0
--- /dev/null
+++ b/layout/reftests/bugs/411792-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width:0">
+<div style="white-space:pre-wrap">One
+Two Three</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/412093-1-ref.html b/layout/reftests/bugs/412093-1-ref.html
new file mode 100644
index 0000000000..799b337238
--- /dev/null
+++ b/layout/reftests/bugs/412093-1-ref.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Bidi text in inline with background image</title>
+ <style type="text/css">
+body {
+ font-size: 0;
+}
+i {
+ background-image: url(mozilla-banner.gif);
+ background-repeat: no-repeat;
+}
+i, b {
+ padding: 29px 30px;
+ line-height: 58px;
+}
+.l0{
+ background-position: 0 0;
+}
+.l60{
+ background-position: -60px 0;
+}
+.l120{
+ background-position: -120px 0;
+}
+.l180{
+ background-position: -180px 0;
+}
+.r0{
+ background-position: -540px 0;
+}
+.r60{
+ background-position: -480px 0;
+}
+.r120{
+ background-position: -420px 0;
+}
+.r180{
+ background-position: -360px 0;
+}
+ </style>
+ </head>
+<body>
+ <p dir="rtl"><i class="l180"></i><br><i class="l120"></i><i class="l60"></i><b></b><i class="l0"></i></p>
+ <p dir="rtl"><i class="r0"></i><br><i class="r60"></i><i class="r120"></i><b></b><i class="r180"></i></p>
+ <p dir="ltr"><i class="l0"></i><br><i class="l60"></i><b></b><i class="l120"></i><i class="l180"></i></p>
+ <p dir="ltr"><i class="r180"></i><br><i class="r120"></i><b></b><i class="r60"></i><i class="r0"></i></p>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/412093-1.html b/layout/reftests/bugs/412093-1.html
new file mode 100644
index 0000000000..9d1ca10ca2
--- /dev/null
+++ b/layout/reftests/bugs/412093-1.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Bidi text in inline with background image</title>
+ <style type="text/css">
+body {
+ font-size: 0;
+}
+span {
+ padding: 29px 0;
+ line-height: 58px;
+}
+.bgleft {
+ background: url(mozilla-banner.gif) no-repeat;
+}
+.bgright {
+ background: url(mozilla-banner.gif) no-repeat right top;
+}
+i {
+ padding: 30px;
+}
+ </style>
+ </head>
+<body>
+ <p dir="rtl"><span class="bgleft"><i>&rlm;</i><br><i>&lrm;</i><i>&rlm;</i><i>&lrm;</i></span><i>&lrm;</i></p>
+ <p dir="rtl"><span class="bgright"><i>&rlm;</i><br><i>&lrm;</i><i>&rlm;</i><i>&lrm;</i></span><i>&lrm;</i></p>
+ <p dir="ltr"><span class="bgleft"><i>&lrm;</i><br><i>&lrm;</i><i>&rlm;</i><i dir="ltr">&lrm;</i></span><i>&rlm;</i></p>
+ <p dir="ltr"><span class="bgright"><i>&lrm;</i><br><i>&lrm;</i><i>&rlm;</i><i dir="ltr">&lrm;</i></span><i>&rlm;</i></p>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/412352-1-ref.html b/layout/reftests/bugs/412352-1-ref.html
new file mode 100644
index 0000000000..e70fef0671
--- /dev/null
+++ b/layout/reftests/bugs/412352-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head></head>
+
+<body>
+
+<div style="position: absolute;"><input id="input" type="file" style="position: absolute;"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412352-1.html b/layout/reftests/bugs/412352-1.html
new file mode 100644
index 0000000000..a357162e82
--- /dev/null
+++ b/layout/reftests/bugs/412352-1.html
@@ -0,0 +1,14 @@
+<html>
+<head></head>
+
+<body>
+
+<div style="position: absolute;"><input id="input" type="file"></div>
+
+<script>
+document.body.offsetHeight;
+document.getElementById("input").style.position = "absolute";
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412352-2-ref.html b/layout/reftests/bugs/412352-2-ref.html
new file mode 100644
index 0000000000..d0066885f8
--- /dev/null
+++ b/layout/reftests/bugs/412352-2-ref.html
@@ -0,0 +1,9 @@
+<html>
+<head></head>
+
+<body>
+
+<div style="position: absolute; outline: 1px solid magenta;"><input id="input" type="file" style="position: absolute;"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412352-2.html b/layout/reftests/bugs/412352-2.html
new file mode 100644
index 0000000000..504012747a
--- /dev/null
+++ b/layout/reftests/bugs/412352-2.html
@@ -0,0 +1,14 @@
+<html>
+<head></head>
+
+<body>
+
+<div style="position: absolute; outline: 1px solid magenta;"><input id="input" type="file"></div>
+
+<script>
+document.body.offsetHeight;
+document.getElementById("input").style.position = "absolute";
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412607-1-ref.html b/layout/reftests/bugs/412607-1-ref.html
new file mode 100644
index 0000000000..e3a830edbe
--- /dev/null
+++ b/layout/reftests/bugs/412607-1-ref.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<style>
+ div.wrapper {
+ width: 80px;
+ height: 30px;
+ }
+ div.a, div.b {
+ height: 20px;
+ display: inline-block;
+ }
+ div.a {
+ width: 20px;
+ background: blue;
+ }
+ div.b {
+ width: 80px;
+ background: green;
+ }
+</style>
+</head>
+<body>
+ <div class="wrapper">
+ <div class="a"></div> <div class="b"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/412607-1a.html b/layout/reftests/bugs/412607-1a.html
new file mode 100644
index 0000000000..24b66af45d
--- /dev/null
+++ b/layout/reftests/bugs/412607-1a.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<style>
+ div.wrapper {
+ width: 100px;
+ height: 30px;
+ }
+ div.a, div.b {
+ height: 20px;
+ display: inline-block;
+ }
+ div.a {
+ width: 20px;
+ background: blue;
+ }
+ div.b {
+ width: 80px;
+ background: green;
+ }
+</style>
+</head>
+<body>
+ <div class="wrapper">
+ <div class="a"></div> <div class="b"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/412607-1b.html b/layout/reftests/bugs/412607-1b.html
new file mode 100644
index 0000000000..8ffb4661fd
--- /dev/null
+++ b/layout/reftests/bugs/412607-1b.html
@@ -0,0 +1,27 @@
+<html>
+<head>
+<style>
+ div.wrapper {
+ width: 101px;
+ height: 30px;
+ }
+ div.a, div.b {
+ height: 20px;
+ display: inline-block;
+ }
+ div.a {
+ width: 20px;
+ background: blue;
+ }
+ div.b {
+ width: 80px;
+ background: green;
+ }
+</style>
+</head>
+<body>
+ <div class="wrapper">
+ <div class="a"></div> <div class="b"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/412679-1-ref.html b/layout/reftests/bugs/412679-1-ref.html
new file mode 100644
index 0000000000..6e8afb4599
--- /dev/null
+++ b/layout/reftests/bugs/412679-1-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: fixed;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+}
+
+#green {
+ position: fixed;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+}
+
+#blue {
+ position: fixed;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: fixed;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<iframe id=red></iframe>
+<iframe id=green></iframe>
+<iframe id=blue></iframe>
+<iframe id=yellow></iframe>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412679-1.html b/layout/reftests/bugs/412679-1.html
new file mode 100644
index 0000000000..eb0892321a
--- /dev/null
+++ b/layout/reftests/bugs/412679-1.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: fixed;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+ right: 100px;
+ bottom: 100px;
+}
+
+#green {
+ position: fixed;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+ bottom: 100px;
+}
+
+#blue {
+ position: fixed;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ right: 100px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: fixed;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<iframe id=red></iframe>
+<iframe id=green></iframe>
+<iframe id=blue></iframe>
+<iframe id=yellow></iframe>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412679-2-ref.html b/layout/reftests/bugs/412679-2-ref.html
new file mode 100644
index 0000000000..f054f6992f
--- /dev/null
+++ b/layout/reftests/bugs/412679-2-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<iframe id=red></iframe>
+<iframe id=green></iframe>
+<iframe id=blue></iframe>
+<iframe id=yellow></iframe>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/412679-2.html b/layout/reftests/bugs/412679-2.html
new file mode 100644
index 0000000000..655bba9b9c
--- /dev/null
+++ b/layout/reftests/bugs/412679-2.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style>
+#red {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ left: 10px;
+ right: 100px;
+ bottom: 100px;
+}
+
+#green {
+ position: absolute;
+ background-color: blue;
+ top: 10px;
+ width: 80px;
+ right: 10px;
+ bottom: 100px;
+}
+
+#blue {
+ position: absolute;
+ background-color: blue;
+ left: 10px;
+ height: 80px;
+ right: 100px;
+ bottom: 10px;
+}
+
+#yellow {
+ position: absolute;
+ background-color: blue;
+ right: 10px;
+ width: 80px;
+ height: 80px;
+ bottom: 10px;
+}
+
+</style>
+<script>
+
+</script>
+</head>
+<body>
+
+<iframe id=red></iframe>
+<iframe id=green></iframe>
+<iframe id=blue></iframe>
+<iframe id=yellow></iframe>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413027-2-ref.html b/layout/reftests/bugs/413027-2-ref.html
new file mode 100644
index 0000000000..f96e2fbba8
--- /dev/null
+++ b/layout/reftests/bugs/413027-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+
+<div style="float:left; border:4px dotted blue;">
+ <div>
+ <span style="display:inline-block; width:50px; height:200px; background:yellow;">
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413027-2.html b/layout/reftests/bugs/413027-2.html
new file mode 100644
index 0000000000..319ffb153e
--- /dev/null
+++ b/layout/reftests/bugs/413027-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+
+<div style="display:-moz-box; height:20px; border:4px dotted blue;">
+ <div>
+ <span style="display:inline-block; width:50px; height:200px; background:yellow;">
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413027-3-ref.html b/layout/reftests/bugs/413027-3-ref.html
new file mode 100644
index 0000000000..837cb6bd5c
--- /dev/null
+++ b/layout/reftests/bugs/413027-3-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+
+<div style="float:left; border:4px dotted blue;">
+ <div style="overflow:hidden">text<br>more text</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413027-3.html b/layout/reftests/bugs/413027-3.html
new file mode 100644
index 0000000000..3f8252de40
--- /dev/null
+++ b/layout/reftests/bugs/413027-3.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+
+<div style="display:-moz-box; height: 5px; border:4px dotted blue;">
+ <div style="overflow:hidden">text<br>more text</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-1-ref.html b/layout/reftests/bugs/413286-1-ref.html
new file mode 100644
index 0000000000..f4a464e5e6
--- /dev/null
+++ b/layout/reftests/bugs/413286-1-ref.html
@@ -0,0 +1,89 @@
+<html>
+ <head>
+ <style>
+ table { width: 400px; height: 25px; }
+ td.blue { background: lightblue; }
+ td.green { background: lightgreen; }
+ td.skinny { width: 100px }
+ td.medium { width: 200px }
+ td.wide { width: 300px }
+ </style>
+ </head>
+ <body>
+ With colspan:
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+
+ Without colspan:
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <tbody><tr>
+ <td class="blue skinny"></td>
+ <td class="green wide"></td>
+ </tr></tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/413286-1a.html b/layout/reftests/bugs/413286-1a.html
new file mode 100644
index 0000000000..495072b168
--- /dev/null
+++ b/layout/reftests/bugs/413286-1a.html
@@ -0,0 +1,108 @@
+<html>
+ <head>
+ <style>
+ table { width: 400px; height: 25px; font-size: 10px; }
+ td.blue { background: lightblue; color: rgba(0,0,0,0) }
+ td.green { background: lightgreen; color: rgba(0,0,0,0) }
+ col.a { width: 100px; }
+ col.c { width: 25%; }
+ </style>
+ </head>
+ <body>
+ With colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+
+ Without colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/413286-1b.html b/layout/reftests/bugs/413286-1b.html
new file mode 100644
index 0000000000..d2e125b24a
--- /dev/null
+++ b/layout/reftests/bugs/413286-1b.html
@@ -0,0 +1,108 @@
+<html>
+ <head>
+ <style>
+ table { width: 400px; height: 25px; font-size: 10px; }
+ td.blue { background: lightblue; color: rgba(0,0,0,0) }
+ td.green { background: lightgreen; color: rgba(0,0,0,0) }
+ col.a { width: 25%; }
+ col.c { width: 25%; }
+ </style>
+ </head>
+ <body>
+ With colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+
+ Without colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/413286-1c.html b/layout/reftests/bugs/413286-1c.html
new file mode 100644
index 0000000000..7e4b1db3c0
--- /dev/null
+++ b/layout/reftests/bugs/413286-1c.html
@@ -0,0 +1,108 @@
+<html>
+ <head>
+ <style>
+ table { width: 400px; height: 25px; font-size: 10px; }
+ td.blue { background: lightblue; color: rgba(0,0,0,0) }
+ td.green { background: lightgreen; color: rgba(0,0,0,0) }
+ col.a { width: 100px; }
+ col.c { width: 100px; }
+ </style>
+ </head>
+ <body>
+ With colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green" colspan="2">xxx</td>
+ </tr></tbody>
+ </table>
+
+ Without colspan:
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green"></td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green"></td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue"></td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ <table cellspacing=0 cellpadding=0>
+ <colgroup><col class="a"/><col/><col class="c"/></colgroup>
+ <tbody><tr>
+ <td class="blue">xxx</td>
+ <td class="green">xxx</td>
+ <td class="green">xxx</td>
+ </tr></tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/413286-2-ref.html b/layout/reftests/bugs/413286-2-ref.html
new file mode 100644
index 0000000000..fda91a9e6c
--- /dev/null
+++ b/layout/reftests/bugs/413286-2-ref.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Reference Case</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ </tr><tr>
+ <td class="lime" style="width: 50px"></td>
+ <td class="blue" style="width: 450px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 50px"></td>
+ <td class="blue" style="width: 400px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 50px"></td>
+ <td class="blue" style="width: 250px"></td>
+ <td class="pink" style="width: 200px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 50px"></td>
+ <td class="blue" style="width: 400px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-2a.html b/layout/reftests/bugs/413286-2a.html
new file mode 100644
index 0000000000..8af608a05f
--- /dev/null
+++ b/layout/reftests/bugs/413286-2a.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Spanning cell has no specified width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.hiPct { width: 50% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-2b.html b/layout/reftests/bugs/413286-2b.html
new file mode 100644
index 0000000000..d4367a937e
--- /dev/null
+++ b/layout/reftests/bugs/413286-2b.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Spanning cell has nonzero pref & min width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.aquaText { color: aqua }
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.hiPct { width: 50% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua aquaText">text</td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua aquaText">text</td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua aquaText">text</td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua aquaText">text</td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-2c.html b/layout/reftests/bugs/413286-2c.html
new file mode 100644
index 0000000000..38ade8b385
--- /dev/null
+++ b/layout/reftests/bugs/413286-2c.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Spanning cell has low percent width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.hiPct { width: 50% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua lowPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua lowPct"></td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua lowPct"></td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua lowPct"></td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-3-ref.html b/layout/reftests/bugs/413286-3-ref.html
new file mode 100644
index 0000000000..be091cdab7
--- /dev/null
+++ b/layout/reftests/bugs/413286-3-ref.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Reference Case</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ </tr><tr>
+ <td class="lime" style="width: 250px"></td>
+ <td class="blue" style="width: 250px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 250px"></td>
+ <td class="blue" style="width: 200px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 250px"></td>
+ <td class="blue" style="width: 50px"></td>
+ <td class="pink" style="width: 200px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 250px"></td>
+ <td class="blue" style="width: 200px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-3.html b/layout/reftests/bugs/413286-3.html
new file mode 100644
index 0000000000..a5bc147029
--- /dev/null
+++ b/layout/reftests/bugs/413286-3.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Spanning cell has high percent width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.hiPct { width: 50% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua hiPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua hiPct"></td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua hiPct"></td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua hiPct"></td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime specWidth"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-4-ref.html b/layout/reftests/bugs/413286-4-ref.html
new file mode 100644
index 0000000000..f19e6c3cd8
--- /dev/null
+++ b/layout/reftests/bugs/413286-4-ref.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>First two columns have no width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ </tr><tr>
+ <td class="lime" style="width: 250px"></td>
+ <td class="blue" style="width: 250px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 225px"></td>
+ <td class="blue" style="width: 225px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 150px"></td>
+ <td class="blue" style="width: 150px"></td>
+ <td class="pink" style="width: 200px"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow"></td>
+ </tr><tr>
+ <td class="lime" style="width: 225px"></td>
+ <td class="blue" style="width: 225px"></td>
+ <td class="pink" style="width: 50px"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-4a.html b/layout/reftests/bugs/413286-4a.html
new file mode 100644
index 0000000000..a2c53d8834
--- /dev/null
+++ b/layout/reftests/bugs/413286-4a.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Span & its columns have no width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2" class="aqua"></td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-4b.html b/layout/reftests/bugs/413286-4b.html
new file mode 100644
index 0000000000..1c2b43efe4
--- /dev/null
+++ b/layout/reftests/bugs/413286-4b.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>First two columns have no width</title>
+ <style>
+ table { width: 500px; }
+ td { height: 2em; }
+ td.aqua { background: aqua }
+ td.lime { background: lime }
+ td.blue { background: blue }
+ td.pink { background: pink }
+ td.yellow { background: yellow }
+
+ td.lowPct { width: 10% }
+ td.medPct { width: 40% }
+ td.specWidth { width: 50px }
+ </style>
+</head>
+<body>
+ <h2>No third column</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with low percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow lowPct"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink lowPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with medium percent width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow medPct"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink medPct"></td>
+ </tr>
+ </table>
+
+ <h2>Third column with preferred width</h2>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="aqua"></td>
+ <td class="aqua"></td>
+ <td class="yellow specWidth"></td>
+ </tr><tr>
+ <td class="lime"></td>
+ <td class="blue"></td>
+ <td class="pink specWidth"></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-5-ref.html b/layout/reftests/bugs/413286-5-ref.html
new file mode 100644
index 0000000000..70b3029542
--- /dev/null
+++ b/layout/reftests/bugs/413286-5-ref.html
@@ -0,0 +1,68 @@
+<html>
+<head><style>
+ table { width: 600px }
+ td.smallSpec { width: 100px; }
+ td.bigSpec { width: 500px; }
+ td.smallPct { width: 10%; }
+ td.bigPct { width: 90%; }
+ td.pink { background: pink }
+ td.teal { background: teal }
+</style></head>
+<body>
+
+<h2>Other column fixed-width</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="bigSpec teal"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="bigPct teal"/>
+ </tr>
+</table>
+
+<h2>Other column fixed-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="bigSpec teal"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="bigPct teal"/>
+ </tr>
+</table>
+
+<h2>Other column fixed-width; two zero columns with colspan</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="bigSpec teal"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width; two zero columns with colspan</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="bigPct teal"/>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-5.html b/layout/reftests/bugs/413286-5.html
new file mode 100644
index 0000000000..df72e6ede0
--- /dev/null
+++ b/layout/reftests/bugs/413286-5.html
@@ -0,0 +1,68 @@
+<html>
+<head><style>
+ table { width: 600px }
+ td.smallSpec { width: 100px; }
+ td.smallPct { width: 10%; }
+ td.pink { background: pink }
+ td.teal { background: teal }
+</style></head>
+<body>
+
+<h2>Other column fixed-width</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="teal"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="teal"/>
+ </tr>
+</table>
+
+<h2>Other column fixed-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="teal"/>
+ </tr>
+ <tr><td colspan="2"/></tr>
+</table>
+
+<h2>Other column percent-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="teal"/>
+ </tr>
+ <tr><td colspan="2"/></tr>
+</table>
+
+<h2>Other column fixed-width; two zero columns with colspan</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="teal" colspan="2"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width; two zero columns with colspan</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="teal" colspan="2"/>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-6-ref.html b/layout/reftests/bugs/413286-6-ref.html
new file mode 100644
index 0000000000..65e3ae50fa
--- /dev/null
+++ b/layout/reftests/bugs/413286-6-ref.html
@@ -0,0 +1,48 @@
+<html>
+<head><style>
+ table { width: 600px; }
+ td.smallSpec { width: 100px; }
+ td.bigSpec { width: 500px; }
+ td.smallPct { width: 10%; }
+ td.bigPct { width: 90%; }
+ td.pink { background: pink; }
+ td.teal { background: teal; }
+</style></head>
+<body>
+
+<h2>Other column fixed-width; two zero columns with colspan; explicit 0 width on span</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="bigSpec teal"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width; two zero columns with colspan; explicit 0 width on span</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="bigPct teal"/>
+ </tr>
+</table>
+
+<h2>Other column fixed-width; zero-column explicitly zero-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="pink">100</td>
+ </tr>
+</table>
+
+<h2>Other column percent-width; zero-column explicitly zero-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="pink">10%</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413286-6.html b/layout/reftests/bugs/413286-6.html
new file mode 100644
index 0000000000..2b71da8ac2
--- /dev/null
+++ b/layout/reftests/bugs/413286-6.html
@@ -0,0 +1,51 @@
+<html>
+<head><style>
+ table { width: 600px; }
+ td.smallSpec { width: 100px; }
+ td.zeroSpec { width: 0px; }
+ td.smallPct { width: 10%; }
+ td.pink { background: pink; }
+ td.teal { background: teal; }
+</style></head>
+<body>
+
+<h2>Other column fixed-width; two zero columns with colspan; explicit 0 width on span</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="zeroSpec teal" colspan="2"/>
+ </tr>
+</table>
+
+<h2>Other column percent-width; two zero columns with colspan; explicit 0 width on span</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="zeroSpec teal" colspan="2"/>
+ </tr>
+</table>
+
+<h2>Other column fixed-width; zero-column explicitly zero-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallSpec pink">100</td>
+ <td class="zeroSpec teal"/>
+ </tr>
+ <tr><td colspan="2"/></tr>
+</table>
+
+<h2>Other column percent-width; zero-column explicitly zero-width; zero column spanned by colspan (crossing other column)</h2>
+
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="smallPct pink">10%</td>
+ <td class="zeroSpec teal"/>
+ </tr>
+ <tr><td colspan="2"/></tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413292-1-ref.html b/layout/reftests/bugs/413292-1-ref.html
new file mode 100644
index 0000000000..183e420526
--- /dev/null
+++ b/layout/reftests/bugs/413292-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ body { font-family: sans-serif; }
+ </style>
+ </head>
+ <body>
+ Done
+ </body>
+</html>
diff --git a/layout/reftests/bugs/413292-1.html b/layout/reftests/bugs/413292-1.html
new file mode 100644
index 0000000000..8b780be799
--- /dev/null
+++ b/layout/reftests/bugs/413292-1.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+
+<style>
+ body { font-family: sans-serif; }
+</style>
+
+<script type="text/javascript">
+var loopCount = 0;
+var pause = 10; // smaller values make the bug more likely to occur
+var src = "data:text/html,iframe 1 <iframe width='100' height='100' src='data:text/html,iframe 2'>";
+var start = new Date();
+
+function ap()
+{
+ document.getElementById("div").style.position = "absolute";
+ setTimeout(bp, pause);
+}
+
+function bp()
+{
+ document.getElementById("div").style.position = "";
+ setTimeout(cp, pause);
+}
+
+function cp()
+{
+ document.getElementById("iframe").setAttribute("src", src);
+ setTimeout(nextIteration, pause);
+}
+
+function nextIteration()
+{
+ var now = new Date();
+ loopCount++;
+ if (loopCount < 20 && now - start < 5000) {
+ ap();
+ } else {
+ document.body.textContent = "Done";
+ document.documentElement.className = '';
+ }
+}
+</script>
+
+</head>
+
+<body onload="ap();"><div id="div"><iframe id="iframe"></iframe></div></body>
+</html>
diff --git a/layout/reftests/bugs/413361-1-ref.html b/layout/reftests/bugs/413361-1-ref.html
new file mode 100644
index 0000000000..463d45f2a8
--- /dev/null
+++ b/layout/reftests/bugs/413361-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>testcase</title>
+<style>
+img{
+ width: 252px;
+}
+</style>
+ </head>
+ <body>
+ <img src="mozilla-banner.gif" alt="">
+</body>
+</html>
diff --git a/layout/reftests/bugs/413361-1.html b/layout/reftests/bugs/413361-1.html
new file mode 100644
index 0000000000..a38daa53da
--- /dev/null
+++ b/layout/reftests/bugs/413361-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>testcase</title>
+<style>
+img{
+ max-width: 126px;
+ min-width: 252px;
+ width: 252px;
+}
+</style>
+ </head>
+ <body>
+ <img src="mozilla-banner.gif" alt="">
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-background-unchanged-ref.html b/layout/reftests/bugs/413840-background-unchanged-ref.html
new file mode 100644
index 0000000000..d412649ee2
--- /dev/null
+++ b/layout/reftests/bugs/413840-background-unchanged-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ ul, ol, li { margin-top: 0; margin-bottom: 0; }
+ li { height: 2em; background: aqua; color: black; }
+
+ </style>
+</head>
+<body>
+
+<div style="background: aqua; color: black; margin-left: 40px">
+<div style="margin-left: -40px">
+<div style="margin-left: 60px"><ol start="1"><li>one</li></ol></div>
+<div style="margin-left: 60px"><ol start="2"><li>two</li></ol></div>
+<ol start="3"><li>three</li></ol>
+<ol start="4"><li>four</li></ol>
+</div>
+</div>
+
+<div style="background: aqua; color: black; margin-left: 40px">
+<div style="margin-left: -40px">
+<div style="margin-left: 60px"><ul><li>one</li></ul></div>
+<div style="margin-left: 60px"><ul><li>two</li></ul></div>
+<ul><li>three</li></ul>
+<ul><li>four</li></ul>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-background-unchanged.html b/layout/reftests/bugs/413840-background-unchanged.html
new file mode 100644
index 0000000000..685cdfebdb
--- /dev/null
+++ b/layout/reftests/bugs/413840-background-unchanged.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ div { float: left; height: 3em; width: 100px; }
+
+ ul, ol, li { margin-top: 0; margin-bottom: 0; }
+ li { height: 2em; background: aqua; color: black; }
+
+ </style>
+</head>
+<body>
+
+<div></div>
+
+<ol>
+ <li>one</li>
+ <li>two</li>
+ <li>three</li>
+ <li>four</li>
+</ol>
+
+<div></div>
+
+<ul>
+ <li>one</li>
+ <li>two</li>
+ <li>three</li>
+ <li>four</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-bullet-first-line-ref.html b/layout/reftests/bugs/413840-bullet-first-line-ref.html
new file mode 100644
index 0000000000..6b1a798206
--- /dev/null
+++ b/layout/reftests/bugs/413840-bullet-first-line-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test that bullet is on the first line!</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ </style>
+</head>
+<body>
+
+<ul>
+ <li>first line</li>
+ <li style="list-style-type:none">second line</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-bullet-first-line.html b/layout/reftests/bugs/413840-bullet-first-line.html
new file mode 100644
index 0000000000..6a15e0e560
--- /dev/null
+++ b/layout/reftests/bugs/413840-bullet-first-line.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test that bullet is on the first line!</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ </style>
+</head>
+<body>
+
+<ul>
+ <li>first line<br>second line</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-ltr-offsets-ref.html b/layout/reftests/bugs/413840-ltr-offsets-ref.html
new file mode 100644
index 0000000000..a58c3e6965
--- /dev/null
+++ b/layout/reftests/bugs/413840-ltr-offsets-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ ul, ol, li { margin: 0; padding: 0; }
+
+ ::marker { font-family: inherit; }
+ </style>
+</head>
+<body>
+
+<div style="margin-left: 100px"><ul><li><div style="margin-left: 0px">item</li></ul></div>
+<div style="margin-left: 100px"><ul><li><div style="margin-left: 0px">item</li></ul></div>
+<div style="margin-left: 94px"><ul><li><div style="margin-left: 6px">item</li></ul></div>
+<div style="margin-left: 150px"><ul><li><div style="margin-left: 6px">item</li></ul></div>
+<div style="margin-left: 40px"><ul><li><div style="margin-left: 154px">item</li></ul></div>
+<div style="margin-left: 40px"><ul><li><div style="margin-left: 152px">item</li></ul></div>
+<div style="margin-left: 94px"><ol start="1"><li><div style="margin-left: 6px">item</li></ol></div>
+<div style="margin-left: 150px"><ol start="2"><li><div style="margin-left: 6px">item</li></ol></div>
+<div style="margin-left: 40px"><ol start="3"><li><div style="margin-left: 154px">item</li></ol></div>
+<div style="margin-left: 40px"><ol start="4"><li><div style="margin-left: 152px">item</li></ol></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-ltr-offsets.html b/layout/reftests/bugs/413840-ltr-offsets.html
new file mode 100644
index 0000000000..4a97a9dbf1
--- /dev/null
+++ b/layout/reftests/bugs/413840-ltr-offsets.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ #float { float: left; width: 100px; height: 20em; }
+
+ ul, ol, li { margin: 0; padding: 0; }
+
+ ::marker { font-family: inherit; }
+ </style>
+</head>
+<body>
+
+<div id="float"></div>
+
+<ul><li>item</li></ul>
+<ul style="margin-left: 1px; border-left: 2px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;"><li>item</li></ul>
+<ul>
+<li style="margin-left: 1px; border-left: 2px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 150px; border-left: 2px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 40px; border-left: 150px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 40px; border-left: 2px solid transparent; padding-left: 150px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+</ul>
+<ol>
+<li style="margin-left: 1px; border-left: 2px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 150px; border-left: 2px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 40px; border-left: 150px solid transparent; padding-left: 4px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+<li style="margin-left: 40px; border-left: 2px solid transparent; padding-left: 150px; padding-right: 8px; border-right: 16px solid transparent; margin-right: 32px;">item</li>
+</ol>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-pushed-line-bullet-ref.html b/layout/reftests/bugs/413840-pushed-line-bullet-ref.html
new file mode 100644
index 0000000000..f243e84b72
--- /dev/null
+++ b/layout/reftests/bugs/413840-pushed-line-bullet-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test for bullet lining up with element pushed past float</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+ html, body { margin: 0; }
+ </style>
+</head>
+<body>
+
+<div style="width: 200px; display:list-item; margin-left: 50px; margin-top: 50px">
+ <select size="2">
+ <option>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</option>
+ <option>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</option>
+ </select>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-pushed-line-bullet.html b/layout/reftests/bugs/413840-pushed-line-bullet.html
new file mode 100644
index 0000000000..a5debbe1df
--- /dev/null
+++ b/layout/reftests/bugs/413840-pushed-line-bullet.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test for bullet lining up with element pushed past float</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+ html, body { margin: 0; }
+ </style>
+</head>
+<body>
+
+<div style="float: left; width: 150px; height: 50px"></div>
+<div style="width: 200px; display:list-item; margin-left: 50px">
+ <select size="2">
+ <option>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</option>
+ <option>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</option>
+ </select>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-rtl-offsets-ref.html b/layout/reftests/bugs/413840-rtl-offsets-ref.html
new file mode 100644
index 0000000000..01ae4be390
--- /dev/null
+++ b/layout/reftests/bugs/413840-rtl-offsets-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ body { direction: rtl; }
+ ul, ol, li { margin: 0; padding: 0; }
+
+ ::marker { font-family: inherit; }
+ </style>
+</head>
+<body>
+
+<div style="margin-right: 100px"><ul><li><div style="margin-right: 0px">item</li></ul></div>
+<div style="margin-right: 100px"><ul><li><div style="margin-right: 0px">item</li></ul></div>
+<div style="margin-right: 94px"><ul><li><div style="margin-right: 6px">item</li></ul></div>
+<div style="margin-right: 150px"><ul><li><div style="margin-right: 6px">item</li></ul></div>
+<div style="margin-right: 40px"><ul><li><div style="margin-right: 154px">item</li></ul></div>
+<div style="margin-right: 40px"><ul><li><div style="margin-right: 152px">item</li></ul></div>
+<div style="margin-right: 94px"><ol start="1"><li><div style="margin-right: 6px">item</li></ol></div>
+<div style="margin-right: 150px"><ol start="2"><li><div style="margin-right: 6px">item</li></ol></div>
+<div style="margin-right: 40px"><ol start="3"><li><div style="margin-right: 154px">item</li></ol></div>
+<div style="margin-right: 40px"><ol start="4"><li><div style="margin-right: 152px">item</li></ol></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413840-rtl-offsets.html b/layout/reftests/bugs/413840-rtl-offsets.html
new file mode 100644
index 0000000000..c19b364f8a
--- /dev/null
+++ b/layout/reftests/bugs/413840-rtl-offsets.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test case for list items flowing around floats</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <style type="text/css">
+
+ body { direction: rtl; }
+ #float { float: right; width: 100px; height: 20em; }
+
+ ul, ol, li { margin: 0; padding: 0; }
+
+ ::marker { font-family: inherit; }
+ </style>
+</head>
+<body>
+
+<div id="float"></div>
+
+<ul><li>item</li></ul>
+<ul style="margin-right: 1px; border-right: 2px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;"><li>item</li></ul>
+<ul>
+<li style="margin-right: 1px; border-right: 2px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 150px; border-right: 2px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 40px; border-right: 150px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 40px; border-right: 2px solid transparent; padding-right: 150px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+</ul>
+<ol>
+<li style="margin-right: 1px; border-right: 2px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 150px; border-right: 2px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 40px; border-right: 150px solid transparent; padding-right: 4px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+<li style="margin-right: 40px; border-right: 2px solid transparent; padding-right: 150px; padding-left: 8px; border-left: 16px solid transparent; margin-left: 32px;">item</li>
+</ol>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/413982-ref.html b/layout/reftests/bugs/413982-ref.html
new file mode 100644
index 0000000000..3e8af90a7e
--- /dev/null
+++ b/layout/reftests/bugs/413982-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+ <title>Bug 413982</title>
+</head>
+<body>
+ <div>This is the first line.</div>
+ <div>This is the second line.</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/413982.html b/layout/reftests/bugs/413982.html
new file mode 100644
index 0000000000..e0502fd0df
--- /dev/null
+++ b/layout/reftests/bugs/413982.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+ <title>Bug 413982</title>
+ <style type="text/css">
+ div.clearboth {
+ clear: both;
+ }
+ div.floatdiv {
+ float: left;
+ }
+ span.innerspan {
+ white-space: nowrap;
+ }
+ </style>
+</head>
+<body>
+ <div class="floatdiv">
+ This is
+ <span class="innerspan"> the first line.
+ </span>
+ </div>
+ <div class="clearboth">This is the second line.</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/414638-ref.html b/layout/reftests/bugs/414638-ref.html
new file mode 100644
index 0000000000..dc10d24377
--- /dev/null
+++ b/layout/reftests/bugs/414638-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>CSS Test: clip: Missing commas in rect()</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/">
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#clipping">
+ <meta name="flags" content="invalid may">
+ <meta name="assert" content="User agents may support separation of values within rect() by whitespace instead of commas, but not a combination of whitespace and commas.">
+ <style type="text/css">
+ div {
+ background: red;
+ width: 100px; height: 100px;
+ }
+ .inner {
+ position: absolute;
+ background: green;
+ }
+ </style>
+
+ </head>
+ <body>
+ <p>There must be a green box below and no red.</p>
+ <div class="outer">
+ <div class="inner"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/414638.html b/layout/reftests/bugs/414638.html
new file mode 100644
index 0000000000..80579d0477
--- /dev/null
+++ b/layout/reftests/bugs/414638.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>CSS Test: clip: Missing commas in rect()</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/">
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#clipping">
+ <meta name="flags" content="invalid may">
+ <meta name="assert" content="User agents may support separation of values within rect() by whitespace instead of commas, but not a combination of whitespace and commas.">
+ <style type="text/css">
+ div {
+ background: red;
+ width: 100px; height: 100px;
+ }
+ .inner {
+ position: absolute;
+ background: green;
+ clip: rect(0,0,0,0);
+ clip: rect( 0 auto auto 0 );
+ clip: rect(0,0 0,0);
+ clip: rect(0 0,0,0);
+ clip: rect(0,0,0 0);
+ clip: rect(0 0,0 0);
+ }
+ </style>
+
+ </head>
+ <body>
+ <p>There must be a green box below and no red.</p>
+ <div class="outer">
+ <div class="inner"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/414851-1-ref.html b/layout/reftests/bugs/414851-1-ref.html
new file mode 100644
index 0000000000..d514ebe567
--- /dev/null
+++ b/layout/reftests/bugs/414851-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head></head>
+<body>
+
+
+
+<div style="white-space: nowrap;">
+ <button type="button">
+ a few words
+ </button>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/414851-1.html b/layout/reftests/bugs/414851-1.html
new file mode 100644
index 0000000000..e9877875b7
--- /dev/null
+++ b/layout/reftests/bugs/414851-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head></head>
+<body>
+
+<!-- Test that the white-space property is inherited by buttons. -->
+
+<div style="white-space: nowrap; width: 1px;">
+ <button type="button">
+ a few words
+ </button>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/416106-1-ref.xhtml b/layout/reftests/bugs/416106-1-ref.xhtml
new file mode 100644
index 0000000000..d8542a9104
--- /dev/null
+++ b/layout/reftests/bugs/416106-1-ref.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Namespace identifiers should be case sensitive (bug 416106)</title>
+</head>
+<body>
+
+<div style="color: green"><span>This should be green.</span></div>
+<div style="color: green"><span>This should be green.</span></div>
+<div style="color: green"><span>This should be green.</span></div>
+<div style="color: green"><span>This should be green.</span></div>
+<div style="color: green"><span>This should be green.</span></div>
+<div style="color: green"><span>This should be green.</span></div>
+<div>passpasspass</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/416106-1.xhtml b/layout/reftests/bugs/416106-1.xhtml
new file mode 100644
index 0000000000..e43cf65ff5
--- /dev/null
+++ b/layout/reftests/bugs/416106-1.xhtml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Namespace identifiers should be case sensitive (bug 416106)</title>
+ <style type="text/css">
+ @namespace foo url(http://www.example.com/1);
+ @namespace Foo url(http://www.example.com/2);
+ @namespace fOO url(http://www.example.com/3);
+
+ foo|one { color: green; }
+ Foo|two { color: green; }
+ fOO|three { color: green; }
+
+ Foo|one { color: red; }
+ fOO|one { color: red; }
+ foo|two { color: red; }
+ fOO|two { color: red; }
+ foo|three { color: red; }
+ Foo|three { color: red; }
+
+ div[foo|one] { color: green; }
+ div[Foo|two] { color: green; }
+ div[fOO|three] { color: green; }
+
+ div[Foo|one] { color: red; }
+ div[fOO|one] { color: red; }
+ div[foo|two] { color: red; }
+ div[fOO|two] { color: red; }
+ div[foo|three] { color: red; }
+ div[Foo|three] { color: red; }
+
+ div#gencon { color: black; }
+ div#gencon:before { content: attr(foo|one) attr(Foo|two) attr(fOO|three); }
+
+ </style>
+</head>
+<body xmlns:one="http://www.example.com/1"
+ xmlns:two="http://www.example.com/2"
+ xmlns:three="http://www.example.com/3">
+
+<div><one:one>This should be green.</one:one></div>
+<div><two:two>This should be green.</two:two></div>
+<div><three:three>This should be green.</three:three></div>
+<div one:one="true">This should be green.</div>
+<div two:two="true">This should be green.</div>
+<div three:three="true">This should be green.</div>
+
+<div id="gencon"
+ one:one="pass" one:two="fail" one:three="fail"
+ two:one="fail" two:two="pass" two:three="fail"
+ three:one="fail" three:two="fail" three:three="pass"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/416752-1-ref.html b/layout/reftests/bugs/416752-1-ref.html
new file mode 100644
index 0000000000..b61fde7a95
--- /dev/null
+++ b/layout/reftests/bugs/416752-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+ <head><style>
+ div.post {
+ overflow: auto;
+ height: 15px;
+ border: 1px solid black;
+ }
+ div.filler {
+ height: 16px;
+ background: yellow;
+ }
+ </style></head>
+ <body><div class="post"><div class="filler"></div></div></body>
+</html>
diff --git a/layout/reftests/bugs/416752-1.html b/layout/reftests/bugs/416752-1.html
new file mode 100644
index 0000000000..2c71058158
--- /dev/null
+++ b/layout/reftests/bugs/416752-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+ <head><style>
+ div.post {
+ overflow: auto;
+ border: 1px solid black;
+ }
+ div.filler {
+ height: 15px;
+ background: yellow;
+ }
+ div.d2 {
+ height: 16px;
+ }
+ </style></head>
+ <body><div class="post"><div class="filler"><div class="d2"></div></div></div></body>
+</html>
diff --git a/layout/reftests/bugs/417178-1-ref.html b/layout/reftests/bugs/417178-1-ref.html
new file mode 100644
index 0000000000..76a73f9110
--- /dev/null
+++ b/layout/reftests/bugs/417178-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <p style="border-right: 0px solid black; border-bottom:0px solid black;">0
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">0.3
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">0.5
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">0.6
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">1
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">1.3
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">1.5
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">1.6
+ <p style="border-right: 2px solid black; border-bottom:2px solid black;">2
+</body>
+</html>
diff --git a/layout/reftests/bugs/417178-1.html b/layout/reftests/bugs/417178-1.html
new file mode 100644
index 0000000000..083298bdec
--- /dev/null
+++ b/layout/reftests/bugs/417178-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <p style="border-right: 0px solid black; border-bottom:0px solid black;">0
+ <p style="border-right: 0.3px solid black; border-bottom:0.3px solid black;">0.3
+ <p style="border-right: 0.5px solid black; border-bottom:0.5px solid black;">0.5
+ <p style="border-right: 0.6px solid black; border-bottom:0.6px solid black;">0.6
+ <p style="border-right: 1px solid black; border-bottom:1px solid black;">1
+ <p style="border-right: 1.3px solid black; border-bottom:1.3px solid black;">1.3
+ <p style="border-right: 1.5px solid black; border-bottom:1.5px solid black;">1.5
+ <p style="border-right: 1.6px solid black; border-bottom:1.6px solid black;">1.6
+ <p style="border-right: 2px solid black; border-bottom:2px solid black;">2
+</body>
+</html>
diff --git a/layout/reftests/bugs/417246-1-ref.html b/layout/reftests/bugs/417246-1-ref.html
new file mode 100644
index 0000000000..a0f7bea16f
--- /dev/null
+++ b/layout/reftests/bugs/417246-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<style>
+.a {
+ border-top: 40px solid blue;
+ border-bottom: 20px solid green;
+ width: 200px;
+}
+</style>
+</head>
+<body>
+<div class="a"></div>
+</body> </html>
diff --git a/layout/reftests/bugs/417246-1.html b/layout/reftests/bugs/417246-1.html
new file mode 100644
index 0000000000..cd4681c3a2
--- /dev/null
+++ b/layout/reftests/bugs/417246-1.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<style>
+.a {
+ border-top: 40px solid blue;
+ border-bottom: 20px dashed green;
+ background: green;
+ width: 200px;
+}
+</style>
+</head>
+<body>
+<div class="a"></div>
+</body> </html>
diff --git a/layout/reftests/bugs/417676-ref.html b/layout/reftests/bugs/417676-ref.html
new file mode 100644
index 0000000000..16d032ed07
--- /dev/null
+++ b/layout/reftests/bugs/417676-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-paged">
+<title>Fixed Positioning Test</title>
+<style type="text/css">
+ html, body { margin: 0; padding: 0; }
+</style>
+
+<div style="width: 3in; border: solid; font-size: 16px;">
+This box must be repeated at this same position on the first, second, and third pages.
+</div>
+
+<div style="page-break-before: always; width: 3in; border: solid; font-size: 16px;">
+This box must be repeated at this same position on the first, second, and third pages.
+</div>
+
+<div style="page-break-before: always; width: 3in; border: solid; font-size: 16px;">
+This box must be repeated at this same position on the first, second, and third pages.
+</div>
diff --git a/layout/reftests/bugs/417676.html b/layout/reftests/bugs/417676.html
new file mode 100644
index 0000000000..1737557afe
--- /dev/null
+++ b/layout/reftests/bugs/417676.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-paged">
+<title>Fixed Positioning Test</title>
+
+<div style="position: fixed; left: 0; top: 0; width: 3in; border: solid; font-size: 16px;">
+This box must be repeated at this same position on the first, second, and third pages.
+</div>
+
+<p style="width: 0; height: 5in;"> \ No newline at end of file
diff --git a/layout/reftests/bugs/418574-1-ref.html b/layout/reftests/bugs/418574-1-ref.html
new file mode 100644
index 0000000000..2c34c75729
--- /dev/null
+++ b/layout/reftests/bugs/418574-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ ol {
+ list-style-position: inside;
+ padding: 0;
+ margin: 0;
+}
+
+ </style>
+ </head>
+ <body dir="rtl">
+ <ol start="1">
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ol>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/418574-1.html b/layout/reftests/bugs/418574-1.html
new file mode 100644
index 0000000000..ed1a3dca9e
--- /dev/null
+++ b/layout/reftests/bugs/418574-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ ol {
+ list-style-position: inside;
+ padding: 0;
+ margin: 0;
+}
+
+ </style>
+ </head>
+ <body dir="rtl" onload="document.getElementById('ol').setAttribute('start', '1');">
+ <ol start="5" id="ol">
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ol>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/418574-2-ref.html b/layout/reftests/bugs/418574-2-ref.html
new file mode 100644
index 0000000000..55c0736352
--- /dev/null
+++ b/layout/reftests/bugs/418574-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ ol {
+ padding-left: 160px;
+}
+
+ </style>
+ </head>
+ <body>
+ <ol start="10001">
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ </ol>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/418574-2.html b/layout/reftests/bugs/418574-2.html
new file mode 100644
index 0000000000..5bbb8944f2
--- /dev/null
+++ b/layout/reftests/bugs/418574-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ ol {
+ padding-left: 160px;
+}
+
+ </style>
+ </head>
+ <body onload="document.getElementById('ol').setAttribute('start', '10001');">
+ <ol start="1" id="ol">
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ <li>foo</li>
+ </ol>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/418766-1-ref.html b/layout/reftests/bugs/418766-1-ref.html
new file mode 100644
index 0000000000..a205c5a495
--- /dev/null
+++ b/layout/reftests/bugs/418766-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+ b
+</body>
+</html>
diff --git a/layout/reftests/bugs/418766-1a.html b/layout/reftests/bugs/418766-1a.html
new file mode 100644
index 0000000000..8dcfe6e198
--- /dev/null
+++ b/layout/reftests/bugs/418766-1a.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<head>
+<script>
+function boom()
+{
+ var n = document.getElementById("editMe");
+ n.firstChild.remove();
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="boom();">
+ <span id="editMe" style="margin-bottom: 1px;">a</span>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/418766-1b.html b/layout/reftests/bugs/418766-1b.html
new file mode 100644
index 0000000000..ded8ea9ede
--- /dev/null
+++ b/layout/reftests/bugs/418766-1b.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+ <span id="editMe" style="margin-bottom: 1px;"></span>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/419060-ref.html b/layout/reftests/bugs/419060-ref.html
new file mode 100644
index 0000000000..a18534ddad
--- /dev/null
+++ b/layout/reftests/bugs/419060-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Absolute positioning margin:auto regression</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > div {
+ position: relative;
+ border: medium solid;
+ width: 600px;
+ padding-bottom: 0.5em;
+ }
+
+ body > div > div {
+ background: blue;
+ width: 400px;
+ height: 1em;
+ margin-left: 100px;
+ }
+
+ </style>
+</head>
+<body>
+
+<div>
+This div should be centered within its container:
+<div></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/419060.html b/layout/reftests/bugs/419060.html
new file mode 100644
index 0000000000..8a339d09dd
--- /dev/null
+++ b/layout/reftests/bugs/419060.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Absolute positioning margin:auto regression</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > div {
+ position: relative;
+ border: medium solid;
+ width: 600px;
+ padding-bottom: 1.5em;
+ }
+
+ body > div > div {
+ background: blue;
+ width: 400px;
+ height: 1em;
+ position: absolute;
+ left: 0;
+ right: 0;
+ margin-left: auto;
+ margin-right: 100px;
+ }
+
+ </style>
+</head>
+<body>
+
+<div>
+This div should be centered within its container:
+<div></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/419285-1-ref.html b/layout/reftests/bugs/419285-1-ref.html
new file mode 100644
index 0000000000..9dfc642b16
--- /dev/null
+++ b/layout/reftests/bugs/419285-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style="line-height:50px">
+<p><br>Hello
+<p><span style="font-size:200%">"</span><br>Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/419285-1.html b/layout/reftests/bugs/419285-1.html
new file mode 100644
index 0000000000..e4fd623470
--- /dev/null
+++ b/layout/reftests/bugs/419285-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p::first-letter { font-size:200%; }
+</style>
+</head>
+<body style="line-height:50px">
+<p><br>Hello
+<p>"<br>Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/419531-1-ref.html b/layout/reftests/bugs/419531-1-ref.html
new file mode 100644
index 0000000000..e8a67a5452
--- /dev/null
+++ b/layout/reftests/bugs/419531-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <body>
+ <fieldset>
+ <div style="white-space: pre">
+ <span>This text doesn't move around This text does</span>
+ <span>This text doesn't move around This text does</span>
+ <span>This text doesn't move around This text does</span>
+ <span>This text doesn't move around This text does!</span>
+ </div>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/419531-1.html b/layout/reftests/bugs/419531-1.html
new file mode 100644
index 0000000000..afa002aa16
--- /dev/null
+++ b/layout/reftests/bugs/419531-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <body>
+ <fieldset>
+ <div style="white-space: pre">
+ <span>This text doesn't move around This text does</span>
+ <span>This text doesn't move around This text does</span>
+ <span>This text doesn't move around This text does</span>
+ <span id="s">This text doesn't move around This text does</span>
+ </div>
+ </fieldset>
+ <script>
+ document.body.offsetTop;
+ document.getElementById("s").innerHTML += "!";
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/420069-1-ref.html b/layout/reftests/bugs/420069-1-ref.html
new file mode 100644
index 0000000000..6d62e87e44
--- /dev/null
+++ b/layout/reftests/bugs/420069-1-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Test, bug 420069</title>
+<style type="text/css">
+
+body { font-size: 12px; color: transparent; }
+
+p {
+ float: left; clear: left; margin: 1px; height: 5px;
+ border: medium solid black;
+}
+
+</style>
+</head>
+<body>
+
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/420069-1.html b/layout/reftests/bugs/420069-1.html
new file mode 100644
index 0000000000..9335b44063
--- /dev/null
+++ b/layout/reftests/bugs/420069-1.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Test, bug 420069</title>
+<style type="text/css">
+
+body { font-size: 12px; color: transparent; }
+
+p {
+ float: left; clear: left; margin: 1px; height: 5px;
+ border: medium solid black;
+}
+
+</style>
+</head>
+<body>
+
+<!-- pref width without line breaks -->
+<p><span style="margin-left: 10em">A BBB</span></p>
+<p><span style="margin-right: 10em">A BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A BBB</span></p>
+<p><span style="padding-left: 10em">A BBB</span></p>
+<p><span style="padding-right: 10em">A BBB</span></p>
+
+<!-- pref width with line breaks -->
+<p><span style="margin-left: 10em">A<br>BBB</span></p>
+<p><span style="margin-right: 10em">A<br>BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A<br>BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A<br>BBB</span></p>
+<p><span style="padding-left: 10em">A<br>BBB</span></p>
+<p><span style="padding-right: 10em">A<br>BBB</span></p>
+
+<div style="width:1px">
+
+<!-- min width without line breaks -->
+<p><span style="margin-left: 10em">A&nbsp;BBB</span></p>
+<p><span style="margin-right: 10em">A&nbsp;BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A&nbsp;BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A&nbsp;BBB</span></p>
+<p><span style="padding-left: 10em">A&nbsp;BBB</span></p>
+<p><span style="padding-right: 10em">A&nbsp;BBB</span></p>
+
+<!-- min width with line breaks -->
+<p><span style="margin-left: 10em">A BBB</span></p>
+<p><span style="margin-right: 10em">A BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A BBB</span></p>
+<p><span style="padding-left: 10em">A BBB</span></p>
+<p><span style="padding-right: 10em">A BBB</span></p>
+
+</div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/420069-2-ref.html b/layout/reftests/bugs/420069-2-ref.html
new file mode 100644
index 0000000000..ab5e2c51c8
--- /dev/null
+++ b/layout/reftests/bugs/420069-2-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<head>
+<title>Test, bug 420069</title>
+<style type="text/css">
+
+body { font-size: 12px; color: transparent; }
+
+p {
+ float: right; clear: right; margin: 1px; height: 5px;
+ border: medium solid black;
+}
+
+</style>
+</head>
+<body>
+
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+<p style="padding-left: 10em">A&nbsp;BBB</p>
+
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+<p style="padding-left: 10em">BBB</p>
+<p style="padding-left: 10em">A</p>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/420069-2.html b/layout/reftests/bugs/420069-2.html
new file mode 100644
index 0000000000..5e9c59dc2a
--- /dev/null
+++ b/layout/reftests/bugs/420069-2.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<head>
+<title>Test, bug 420069</title>
+<style type="text/css">
+
+body { font-size: 12px; color: transparent; }
+
+p {
+ float: right; clear: right; margin: 1px; height: 5px;
+ border: medium solid black;
+}
+
+</style>
+</head>
+<body>
+
+<!-- pref width without line breaks -->
+<p><span style="margin-left: 10em">A BBB</span></p>
+<p><span style="margin-right: 10em">A BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A BBB</span></p>
+<p><span style="padding-left: 10em">A BBB</span></p>
+<p><span style="padding-right: 10em">A BBB</span></p>
+
+<!-- pref width with line breaks -->
+<p><span style="margin-left: 10em">A<br>BBB</span></p>
+<p><span style="margin-right: 10em">A<br>BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A<br>BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A<br>BBB</span></p>
+<p><span style="padding-left: 10em">A<br>BBB</span></p>
+<p><span style="padding-right: 10em">A<br>BBB</span></p>
+
+<div style="width:1px">
+
+<!-- min width without line breaks -->
+<p><span style="margin-left: 10em">A&nbsp;BBB</span></p>
+<p><span style="margin-right: 10em">A&nbsp;BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A&nbsp;BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A&nbsp;BBB</span></p>
+<p><span style="padding-left: 10em">A&nbsp;BBB</span></p>
+<p><span style="padding-right: 10em">A&nbsp;BBB</span></p>
+
+<!-- min width with line breaks -->
+<p><span style="margin-left: 10em">A BBB</span></p>
+<p><span style="margin-right: 10em">A BBB</span></p>
+<p><span style="border-left: 10em transparent solid">A BBB</span></p>
+<p><span style="border-right: 10em transparent solid">A BBB</span></p>
+<p><span style="padding-left: 10em">A BBB</span></p>
+<p><span style="padding-right: 10em">A BBB</span></p>
+
+</div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/420351-1-ref.html b/layout/reftests/bugs/420351-1-ref.html
new file mode 100644
index 0000000000..948c1619a5
--- /dev/null
+++ b/layout/reftests/bugs/420351-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<title>Testcase bug - List item marker takes up room now with list-style-type: none in strict mode</title>
+<style>
+div.li {
+ border: 1px solid red;
+}
+div.inside {
+ border: 1px solid black;
+}
+</style></head>
+<body>
+
+<ul><div class="li"><div class="inside">text</div></div></ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/420351-1.html b/layout/reftests/bugs/420351-1.html
new file mode 100644
index 0000000000..271ba903b3
--- /dev/null
+++ b/layout/reftests/bugs/420351-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<title>Testcase bug - List item marker takes up room now with list-style-type: none in strict mode</title>
+<style>
+li{
+ list-style-type: none;
+ list-style-position: inside;
+ border: 1px solid red;
+}
+div {
+ border: 1px solid black;
+}
+</style></head>
+<body>
+
+<ul><li><div>text</div></li></ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421069-ref.html b/layout/reftests/bugs/421069-ref.html
new file mode 100644
index 0000000000..3fc3ae0685
--- /dev/null
+++ b/layout/reftests/bugs/421069-ref.html
@@ -0,0 +1,163 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 421069</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > div { position: absolute; top: 10px; left: 10px; }
+ img { margin-left: 10px; }
+
+ .p0 { margin-top: 10px; }
+ .p1 { margin-top: 50px; }
+ .p2 { margin-top: 90px; }
+ .p3 { margin-top: 130px; }
+ .p4 { margin-top: 170px; }
+ .p5 { margin-top: 211px; }
+ .p6 { margin-top: 251px; }
+ .p7 { margin-top: 291px; }
+ .p8 { margin-top: 331px; }
+ .p9 { margin-top: 371px; }
+
+ body > div > div, body > div > table {
+ background-image: url(square-outline-32x32.png);
+ }
+
+ table { margin: 0; border-spacing: 0; }
+ td { padding: 0; }
+
+ .big { width: 33px; height: 33px; }
+ .small { width: 20px; height: 20px; }
+
+ div.tl {
+ margin-left: 50px;
+ background-position: top left; /* the default */
+ }
+
+ div.br {
+ margin-left: 90px;
+ background-position: bottom right;
+ }
+
+ table.tr {
+ margin-left: 130px;
+ background-position: top right;
+ }
+
+ table.bl {
+ margin-left: 170px;
+ background-position: bottom left;
+ }
+
+ div.tl.big { margin-left: 210px; }
+ div.br.big { margin-left: 250px; }
+ table.tr.big { margin-left: 290px; }
+ table.bl.big { margin-left: 330px; }
+
+ </style>
+</head>
+<body>
+
+<div><img src="square-outline-32x32.png" class="p0"></div>
+<div><img src="square-outline-32x32.png" class="p1"></div>
+<div><img src="square-outline-32x32.png" class="p2"></div>
+<div><img src="square-outline-32x32.png" class="p3"></div>
+<div><img src="square-outline-32x32.png" class="p4"></div>
+<div><img src="square-outline-32x32.png" class="p5"></div>
+<div><img src="square-outline-32x32.png" class="p6"></div>
+<div><img src="square-outline-32x32.png" class="p7"></div>
+<div><img src="square-outline-32x32.png" class="p8"></div>
+<div><img src="square-outline-32x32.png" class="p9"></div>
+
+<div><div class="tl small p0"></div></div>
+<div><div class="tl small p1"></div></div>
+<div><div class="tl small p2"></div></div>
+<div><div class="tl small p3"></div></div>
+<div><div class="tl small p4"></div></div>
+<div><div class="tl small p5"></div></div>
+<div><div class="tl small p6"></div></div>
+<div><div class="tl small p7"></div></div>
+<div><div class="tl small p8"></div></div>
+<div><div class="tl small p9"></div></div>
+
+<div><div class="br small p0"></div></div>
+<div><div class="br small p1"></div></div>
+<div><div class="br small p2"></div></div>
+<div><div class="br small p3"></div></div>
+<div><div class="br small p4"></div></div>
+<div><div class="br small p5"></div></div>
+<div><div class="br small p6"></div></div>
+<div><div class="br small p7"></div></div>
+<div><div class="br small p8"></div></div>
+<div><div class="br small p9"></div></div>
+
+<div><table class="tr small p0"><tr><td></table></div>
+<div><table class="tr small p1"><tr><td></table></div>
+<div><table class="tr small p2"><tr><td></table></div>
+<div><table class="tr small p3"><tr><td></table></div>
+<div><table class="tr small p4"><tr><td></table></div>
+<div><table class="tr small p5"><tr><td></table></div>
+<div><table class="tr small p6"><tr><td></table></div>
+<div><table class="tr small p7"><tr><td></table></div>
+<div><table class="tr small p8"><tr><td></table></div>
+<div><table class="tr small p9"><tr><td></table></div>
+
+<div><table class="bl small p0"><tr><td></table></div>
+<div><table class="bl small p1"><tr><td></table></div>
+<div><table class="bl small p2"><tr><td></table></div>
+<div><table class="bl small p3"><tr><td></table></div>
+<div><table class="bl small p4"><tr><td></table></div>
+<div><table class="bl small p5"><tr><td></table></div>
+<div><table class="bl small p6"><tr><td></table></div>
+<div><table class="bl small p7"><tr><td></table></div>
+<div><table class="bl small p8"><tr><td></table></div>
+<div><table class="bl small p9"><tr><td></table></div>
+
+<div><div class="tl big p0"></div></div>
+<div><div class="tl big p1"></div></div>
+<div><div class="tl big p2"></div></div>
+<div><div class="tl big p3"></div></div>
+<div><div class="tl big p4"></div></div>
+<div><div class="tl big p5"></div></div>
+<div><div class="tl big p6"></div></div>
+<div><div class="tl big p7"></div></div>
+<div><div class="tl big p8"></div></div>
+<div><div class="tl big p9"></div></div>
+
+<div><div class="br big p0"></div></div>
+<div><div class="br big p1"></div></div>
+<div><div class="br big p2"></div></div>
+<div><div class="br big p3"></div></div>
+<div><div class="br big p4"></div></div>
+<div><div class="br big p5"></div></div>
+<div><div class="br big p6"></div></div>
+<div><div class="br big p7"></div></div>
+<div><div class="br big p8"></div></div>
+<div><div class="br big p9"></div></div>
+
+<div><table class="tr big p0"><tr><td></table></div>
+<div><table class="tr big p1"><tr><td></table></div>
+<div><table class="tr big p2"><tr><td></table></div>
+<div><table class="tr big p3"><tr><td></table></div>
+<div><table class="tr big p4"><tr><td></table></div>
+<div><table class="tr big p5"><tr><td></table></div>
+<div><table class="tr big p6"><tr><td></table></div>
+<div><table class="tr big p7"><tr><td></table></div>
+<div><table class="tr big p8"><tr><td></table></div>
+<div><table class="tr big p9"><tr><td></table></div>
+
+<div><table class="bl big p0"><tr><td></table></div>
+<div><table class="bl big p1"><tr><td></table></div>
+<div><table class="bl big p2"><tr><td></table></div>
+<div><table class="bl big p3"><tr><td></table></div>
+<div><table class="bl big p4"><tr><td></table></div>
+<div><table class="bl big p5"><tr><td></table></div>
+<div><table class="bl big p6"><tr><td></table></div>
+<div><table class="bl big p7"><tr><td></table></div>
+<div><table class="bl big p8"><tr><td></table></div>
+<div><table class="bl big p9"><tr><td></table></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/421069-ref2.html b/layout/reftests/bugs/421069-ref2.html
new file mode 100644
index 0000000000..7a69806e10
--- /dev/null
+++ b/layout/reftests/bugs/421069-ref2.html
@@ -0,0 +1,191 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 421069</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > div { position: absolute; top: 10px; left: 10px; }
+ img { margin-left: 10px; }
+
+ .p0 { margin-top: 10.0px; }
+ .p1 { margin-top: 50.1px; }
+ .p2 { margin-top: 90.2px; }
+ .p3 { margin-top: 130.3px; }
+ .p4 { margin-top: 170.4px; }
+ .p5 { margin-top: 210.5px; }
+ .p6 { margin-top: 250.6px; }
+ .p7 { margin-top: 290.7px; }
+ .p8 { margin-top: 330.8px; }
+ .p9 { margin-top: 370.9px; }
+
+ body > div > div, body > div > div {
+ background-color: white;
+ }
+
+ div { margin: 0; border-spacing: 0; }
+ td { padding: 0; }
+
+ .big { width: 30px; height: 30px; }
+ .small { width: 19px; height: 19px; }
+
+ div.tl {
+ margin-left: 50px;
+ border-top: 1px solid black;
+ border-left: 1px solid black;
+ }
+
+ div.br {
+ margin-left: 90px;
+ border-bottom: 1px solid black;
+ border-right: 1px solid black;
+ }
+
+ div.tr {
+ margin-left: 130px;
+ border-top: 1px solid black;
+ border-right: 1px solid black;
+ }
+
+ div.bl {
+ margin-left: 170px;
+ border-bottom: 1px solid black;
+ border-left: 1px solid black;
+ }
+
+ div.tl.big {
+ margin-left: 210px;
+ border-top: 1px solid black;
+ border-right: 2px solid black;
+ border-bottom: 2px solid black;
+ border-left: 1px solid black;
+ }
+ div.br.big {
+ margin-left: 250px;
+ border-top: 2px solid black;
+ border-right: 1px solid black;
+ border-bottom: 1px solid black;
+ border-left: 2px solid black;
+ }
+ div.tr.big {
+ margin-left: 290px;
+ border-top: 1px solid black;
+ border-right: 1px solid black;
+ border-bottom: 2px solid black;
+ border-left: 2px solid black;
+ }
+ div.bl.big {
+ margin-left: 330px;
+ border-top: 2px solid black;
+ border-right: 2px solid black;
+ border-bottom: 1px solid black;
+ border-left: 1px solid black;
+ }
+
+ </style>
+</head>
+<body>
+
+<div><img src="square-outline-32x32.png" class="p0"></div>
+<div><img src="square-outline-32x32.png" class="p1"></div>
+<div><img src="square-outline-32x32.png" class="p2"></div>
+<div><img src="square-outline-32x32.png" class="p3"></div>
+<div><img src="square-outline-32x32.png" class="p4"></div>
+<div><img src="square-outline-32x32.png" class="p5"></div>
+<div><img src="square-outline-32x32.png" class="p6"></div>
+<div><img src="square-outline-32x32.png" class="p7"></div>
+<div><img src="square-outline-32x32.png" class="p8"></div>
+<div><img src="square-outline-32x32.png" class="p9"></div>
+
+<div><div class="tl small p0"></div></div>
+<div><div class="tl small p1"></div></div>
+<div><div class="tl small p2"></div></div>
+<div><div class="tl small p3"></div></div>
+<div><div class="tl small p4"></div></div>
+<div><div class="tl small p5"></div></div>
+<div><div class="tl small p6"></div></div>
+<div><div class="tl small p7"></div></div>
+<div><div class="tl small p8"></div></div>
+<div><div class="tl small p9"></div></div>
+
+<div><div class="br small p0"></div></div>
+<div><div class="br small p1"></div></div>
+<div><div class="br small p2"></div></div>
+<div><div class="br small p3"></div></div>
+<div><div class="br small p4"></div></div>
+<div><div class="br small p5"></div></div>
+<div><div class="br small p6"></div></div>
+<div><div class="br small p7"></div></div>
+<div><div class="br small p8"></div></div>
+<div><div class="br small p9"></div></div>
+
+<div><div class="tr small p0"></div></div>
+<div><div class="tr small p1"></div></div>
+<div><div class="tr small p2"></div></div>
+<div><div class="tr small p3"></div></div>
+<div><div class="tr small p4"></div></div>
+<div><div class="tr small p5"></div></div>
+<div><div class="tr small p6"></div></div>
+<div><div class="tr small p7"></div></div>
+<div><div class="tr small p8"></div></div>
+<div><div class="tr small p9"></div></div>
+
+<div><div class="bl small p0"></div></div>
+<div><div class="bl small p1"></div></div>
+<div><div class="bl small p2"></div></div>
+<div><div class="bl small p3"></div></div>
+<div><div class="bl small p4"></div></div>
+<div><div class="bl small p5"></div></div>
+<div><div class="bl small p6"></div></div>
+<div><div class="bl small p7"></div></div>
+<div><div class="bl small p8"></div></div>
+<div><div class="bl small p9"></div></div>
+
+<div><div class="tl big p0"></div></div>
+<div><div class="tl big p1"></div></div>
+<div><div class="tl big p2"></div></div>
+<div><div class="tl big p3"></div></div>
+<div><div class="tl big p4"></div></div>
+<div><div class="tl big p5"></div></div>
+<div><div class="tl big p6"></div></div>
+<div><div class="tl big p7"></div></div>
+<div><div class="tl big p8"></div></div>
+<div><div class="tl big p9"></div></div>
+
+<div><div class="br big p0"></div></div>
+<div><div class="br big p1"></div></div>
+<div><div class="br big p2"></div></div>
+<div><div class="br big p3"></div></div>
+<div><div class="br big p4"></div></div>
+<div><div class="br big p5"></div></div>
+<div><div class="br big p6"></div></div>
+<div><div class="br big p7"></div></div>
+<div><div class="br big p8"></div></div>
+<div><div class="br big p9"></div></div>
+
+<div><div class="tr big p0"></div></div>
+<div><div class="tr big p1"></div></div>
+<div><div class="tr big p2"></div></div>
+<div><div class="tr big p3"></div></div>
+<div><div class="tr big p4"></div></div>
+<div><div class="tr big p5"></div></div>
+<div><div class="tr big p6"></div></div>
+<div><div class="tr big p7"></div></div>
+<div><div class="tr big p8"></div></div>
+<div><div class="tr big p9"></div></div>
+
+<div><div class="bl big p0"></div></div>
+<div><div class="bl big p1"></div></div>
+<div><div class="bl big p2"></div></div>
+<div><div class="bl big p3"></div></div>
+<div><div class="bl big p4"></div></div>
+<div><div class="bl big p5"></div></div>
+<div><div class="bl big p6"></div></div>
+<div><div class="bl big p7"></div></div>
+<div><div class="bl big p8"></div></div>
+<div><div class="bl big p9"></div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/421069.html b/layout/reftests/bugs/421069.html
new file mode 100644
index 0000000000..7afc07712b
--- /dev/null
+++ b/layout/reftests/bugs/421069.html
@@ -0,0 +1,163 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Testcase, bug 421069</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > div { position: absolute; top: 10px; left: 10px; }
+ img { margin-left: 10px; }
+
+ .p0 { margin-top: 10.0px; }
+ .p1 { margin-top: 50.1px; }
+ .p2 { margin-top: 90.2px; }
+ .p3 { margin-top: 130.3px; }
+ .p4 { margin-top: 170.4px; }
+ .p5 { margin-top: 210.5px; }
+ .p6 { margin-top: 250.6px; }
+ .p7 { margin-top: 290.7px; }
+ .p8 { margin-top: 330.8px; }
+ .p9 { margin-top: 370.9px; }
+
+ body > div > div, body > div > table {
+ background-image: url(square-outline-32x32.png);
+ }
+
+ table { margin: 0; border-spacing: 0; }
+ td { padding: 0; }
+
+ .big { width: 33px; height: 33px; }
+ .small { width: 20px; height: 20px; }
+
+ div.tl {
+ margin-left: 50px;
+ background-position: top left; /* the default */
+ }
+
+ div.br {
+ margin-left: 90px;
+ background-position: bottom right;
+ }
+
+ table.tr {
+ margin-left: 130px;
+ background-position: top right;
+ }
+
+ table.bl {
+ margin-left: 170px;
+ background-position: bottom left;
+ }
+
+ div.tl.big { margin-left: 210px; }
+ div.br.big { margin-left: 250px; }
+ table.tr.big { margin-left: 290px; }
+ table.bl.big { margin-left: 330px; }
+
+ </style>
+</head>
+<body>
+
+<div><img src="square-outline-32x32.png" class="p0"></div>
+<div><img src="square-outline-32x32.png" class="p1"></div>
+<div><img src="square-outline-32x32.png" class="p2"></div>
+<div><img src="square-outline-32x32.png" class="p3"></div>
+<div><img src="square-outline-32x32.png" class="p4"></div>
+<div><img src="square-outline-32x32.png" class="p5"></div>
+<div><img src="square-outline-32x32.png" class="p6"></div>
+<div><img src="square-outline-32x32.png" class="p7"></div>
+<div><img src="square-outline-32x32.png" class="p8"></div>
+<div><img src="square-outline-32x32.png" class="p9"></div>
+
+<div><div class="tl small p0"></div></div>
+<div><div class="tl small p1"></div></div>
+<div><div class="tl small p2"></div></div>
+<div><div class="tl small p3"></div></div>
+<div><div class="tl small p4"></div></div>
+<div><div class="tl small p5"></div></div>
+<div><div class="tl small p6"></div></div>
+<div><div class="tl small p7"></div></div>
+<div><div class="tl small p8"></div></div>
+<div><div class="tl small p9"></div></div>
+
+<div><div class="br small p0"></div></div>
+<div><div class="br small p1"></div></div>
+<div><div class="br small p2"></div></div>
+<div><div class="br small p3"></div></div>
+<div><div class="br small p4"></div></div>
+<div><div class="br small p5"></div></div>
+<div><div class="br small p6"></div></div>
+<div><div class="br small p7"></div></div>
+<div><div class="br small p8"></div></div>
+<div><div class="br small p9"></div></div>
+
+<div><table class="tr small p0"><tr><td></table></div>
+<div><table class="tr small p1"><tr><td></table></div>
+<div><table class="tr small p2"><tr><td></table></div>
+<div><table class="tr small p3"><tr><td></table></div>
+<div><table class="tr small p4"><tr><td></table></div>
+<div><table class="tr small p5"><tr><td></table></div>
+<div><table class="tr small p6"><tr><td></table></div>
+<div><table class="tr small p7"><tr><td></table></div>
+<div><table class="tr small p8"><tr><td></table></div>
+<div><table class="tr small p9"><tr><td></table></div>
+
+<div><table class="bl small p0"><tr><td></table></div>
+<div><table class="bl small p1"><tr><td></table></div>
+<div><table class="bl small p2"><tr><td></table></div>
+<div><table class="bl small p3"><tr><td></table></div>
+<div><table class="bl small p4"><tr><td></table></div>
+<div><table class="bl small p5"><tr><td></table></div>
+<div><table class="bl small p6"><tr><td></table></div>
+<div><table class="bl small p7"><tr><td></table></div>
+<div><table class="bl small p8"><tr><td></table></div>
+<div><table class="bl small p9"><tr><td></table></div>
+
+<div><div class="tl big p0"></div></div>
+<div><div class="tl big p1"></div></div>
+<div><div class="tl big p2"></div></div>
+<div><div class="tl big p3"></div></div>
+<div><div class="tl big p4"></div></div>
+<div><div class="tl big p5"></div></div>
+<div><div class="tl big p6"></div></div>
+<div><div class="tl big p7"></div></div>
+<div><div class="tl big p8"></div></div>
+<div><div class="tl big p9"></div></div>
+
+<div><div class="br big p0"></div></div>
+<div><div class="br big p1"></div></div>
+<div><div class="br big p2"></div></div>
+<div><div class="br big p3"></div></div>
+<div><div class="br big p4"></div></div>
+<div><div class="br big p5"></div></div>
+<div><div class="br big p6"></div></div>
+<div><div class="br big p7"></div></div>
+<div><div class="br big p8"></div></div>
+<div><div class="br big p9"></div></div>
+
+<div><table class="tr big p0"><tr><td></table></div>
+<div><table class="tr big p1"><tr><td></table></div>
+<div><table class="tr big p2"><tr><td></table></div>
+<div><table class="tr big p3"><tr><td></table></div>
+<div><table class="tr big p4"><tr><td></table></div>
+<div><table class="tr big p5"><tr><td></table></div>
+<div><table class="tr big p6"><tr><td></table></div>
+<div><table class="tr big p7"><tr><td></table></div>
+<div><table class="tr big p8"><tr><td></table></div>
+<div><table class="tr big p9"><tr><td></table></div>
+
+<div><table class="bl big p0"><tr><td></table></div>
+<div><table class="bl big p1"><tr><td></table></div>
+<div><table class="bl big p2"><tr><td></table></div>
+<div><table class="bl big p3"><tr><td></table></div>
+<div><table class="bl big p4"><tr><td></table></div>
+<div><table class="bl big p5"><tr><td></table></div>
+<div><table class="bl big p6"><tr><td></table></div>
+<div><table class="bl big p7"><tr><td></table></div>
+<div><table class="bl big p8"><tr><td></table></div>
+<div><table class="bl big p9"><tr><td></table></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/421203-1-ref.html b/layout/reftests/bugs/421203-1-ref.html
new file mode 100644
index 0000000000..268b8703d3
--- /dev/null
+++ b/layout/reftests/bugs/421203-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<title>Reference for 421203-1 and 421203-2</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+Hello world!
diff --git a/layout/reftests/bugs/421203-1.xhtml b/layout/reftests/bugs/421203-1.xhtml
new file mode 100644
index 0000000000..299a5f972e
--- /dev/null
+++ b/layout/reftests/bugs/421203-1.xhtml
@@ -0,0 +1,4 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ Hello world!
+</window>
diff --git a/layout/reftests/bugs/421203-2.xhtml b/layout/reftests/bugs/421203-2.xhtml
new file mode 100644
index 0000000000..6824138a50
--- /dev/null
+++ b/layout/reftests/bugs/421203-2.xhtml
@@ -0,0 +1,4 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <html:span>Hello world!</html:span>
+</window>
diff --git a/layout/reftests/bugs/421203-3.xhtml b/layout/reftests/bugs/421203-3.xhtml
new file mode 100644
index 0000000000..adc27f7e4b
--- /dev/null
+++ b/layout/reftests/bugs/421203-3.xhtml
@@ -0,0 +1,7 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ style="font-size:0">
+ <html:span style="display:inline" flex="1" /> <!-- causes block wrapping -->
+ <box flex="1" />
+ <label style="font-size:16px" value="hello world" />
+</window>
diff --git a/layout/reftests/bugs/421203-4.xhtml b/layout/reftests/bugs/421203-4.xhtml
new file mode 100644
index 0000000000..77275ecdf7
--- /dev/null
+++ b/layout/reftests/bugs/421203-4.xhtml
@@ -0,0 +1,24 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var window = document.getElementsByTagName("window")[0];
+ var box = document.getElementsByTagName("box")[0];
+ var span = document.createElementNS(HTML_NS, "html:span");
+ window.insertBefore(span, box); // causes block wrapping
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <box flex="1" />
+ <label value="hello world" />
+</window>
diff --git a/layout/reftests/bugs/421203-5.xhtml b/layout/reftests/bugs/421203-5.xhtml
new file mode 100644
index 0000000000..578f6bf920
--- /dev/null
+++ b/layout/reftests/bugs/421203-5.xhtml
@@ -0,0 +1,23 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var window = document.getElementsByTagName("window")[0];
+ var span = document.createElementNS(HTML_NS, "html:span");
+ window.appendChild(span); // causes block wrapping
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <box flex="1" />
+ <label value="hello world" />
+</window>
diff --git a/layout/reftests/bugs/421203-6.xhtml b/layout/reftests/bugs/421203-6.xhtml
new file mode 100644
index 0000000000..00c10721f4
--- /dev/null
+++ b/layout/reftests/bugs/421203-6.xhtml
@@ -0,0 +1,23 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ class="reftest-wait">
+ <script type="text/javascript"><![CDATA[
+ function run() {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ const HTML_NS = "http://www.w3.org/1999/xhtml";
+ var span = document.getElementsByTagNameNS(HTML_NS, "span")[0];
+ span.remove();
+ setTimeout(finish, 0);
+ }
+ function finish() {
+ document.documentElement.removeAttribute("class");
+ }
+ function load(event) {
+ setTimeout(run, 0);
+ }
+ window.addEventListener("load", load, false);
+ ]]></script>
+ <html:span style="display:inline" flex="1" /> <!-- causes block wrapping -->
+ <box flex="1" />
+ <label value="hello world" />
+</window>
diff --git a/layout/reftests/bugs/421234-1-ref.html b/layout/reftests/bugs/421234-1-ref.html
new file mode 100644
index 0000000000..edf7e66d6b
--- /dev/null
+++ b/layout/reftests/bugs/421234-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<div>A</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421234-1.html b/layout/reftests/bugs/421234-1.html
new file mode 100644
index 0000000000..1c65ed51ae
--- /dev/null
+++ b/layout/reftests/bugs/421234-1.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<div>&zwnj;A</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421239-1-ref.html b/layout/reftests/bugs/421239-1-ref.html
new file mode 100644
index 0000000000..6e75fc08e6
--- /dev/null
+++ b/layout/reftests/bugs/421239-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div#a { margin: 100px 0px 100px 0px; }
+ </style>
+</head>
+<body>
+ <div id="a"></div>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421239-1.html b/layout/reftests/bugs/421239-1.html
new file mode 100644
index 0000000000..d9cc8b5b48
--- /dev/null
+++ b/layout/reftests/bugs/421239-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ div#a { margin: 100px 0px 100px 0px; }
+ </style>
+ <script>
+ function boom()
+ {
+ var a = document.getElementById("a");
+ a.firstChild.remove();
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="boom();">
+ <div id="a">a</div>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421239-2-ref.html b/layout/reftests/bugs/421239-2-ref.html
new file mode 100644
index 0000000000..3d2770879a
--- /dev/null
+++ b/layout/reftests/bugs/421239-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div#a { margin: 0px 0px 100px 0px; }
+ </style>
+</head>
+<body>
+ <div id="a"></div>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421239-2.html b/layout/reftests/bugs/421239-2.html
new file mode 100644
index 0000000000..6db0b8e89c
--- /dev/null
+++ b/layout/reftests/bugs/421239-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ div#a { margin: 0px 0px 100px 0px; }
+ </style>
+ <script>
+ function boom()
+ {
+ var a = document.getElementById("a");
+ a.firstChild.remove();
+ document.documentElement.className = "";
+ }
+ </script>
+</head>
+<body onload="boom();">
+ <div id="a">a</div>
+ <div>b</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421419-1-ref.html b/layout/reftests/bugs/421419-1-ref.html
new file mode 100644
index 0000000000..0ee5a5c6c1
--- /dev/null
+++ b/layout/reftests/bugs/421419-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: left;
+ border: medium solid black;
+}
+</style>
+</head>
+<body>
+<div><span style="padding-right: 10em;"><br>&lrm;</span></div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/421419-1.html b/layout/reftests/bugs/421419-1.html
new file mode 100644
index 0000000000..1a3b5f79fd
--- /dev/null
+++ b/layout/reftests/bugs/421419-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: left;
+ border: medium solid black;
+}
+</style>
+</head>
+<body>
+<div><span style="padding-right: 10em;"><br>&rlm;</span></div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/421436-1-ref.html b/layout/reftests/bugs/421436-1-ref.html
new file mode 100644
index 0000000000..c7b5995c37
--- /dev/null
+++ b/layout/reftests/bugs/421436-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div>A</div>
+<div>B</div>
+
+<div>A</div>
+<div style="visibility:hidden">B</div>
+<div>B</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421436-1a.html b/layout/reftests/bugs/421436-1a.html
new file mode 100644
index 0000000000..353d571bcc
--- /dev/null
+++ b/layout/reftests/bugs/421436-1a.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div>A<br>B</div>
+<div>A<br><br>B</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421436-1b.html b/layout/reftests/bugs/421436-1b.html
new file mode 100644
index 0000000000..2c1c4b3e12
--- /dev/null
+++ b/layout/reftests/bugs/421436-1b.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<div>A<br>B</div>
+<div>A<br><br>B</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421632-1-ref.html b/layout/reftests/bugs/421632-1-ref.html
new file mode 100644
index 0000000000..350bd71d15
--- /dev/null
+++ b/layout/reftests/bugs/421632-1-ref.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+
+<head>
+<title></title>
+
+<style>
+
+body {
+ margin: 20px;
+}
+
+tr {
+ background: gray;
+}
+
+.t2 tr {
+ outline: 1px solid gray;
+}
+
+.t1 tr {
+ outline: 1px solid red;
+}
+
+</style>
+
+</head>
+
+<body>
+
+<table id="table1" class="t1">
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+</table>
+
+<table class="t2">
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+
+ <tr><td>AAAA</td></tr>
+</table>
+
+<br/>
+<form method="get" action="#">
+ <input type="button" onclick="showBug(); return false;" value="Trigger bug"/>
+</form>
+
+</body> </html>
diff --git a/layout/reftests/bugs/421632-1.html b/layout/reftests/bugs/421632-1.html
new file mode 100644
index 0000000000..9b8fee873b
--- /dev/null
+++ b/layout/reftests/bugs/421632-1.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html class="reftest-wait">
+
+<head>
+<title></title>
+
+<style>
+
+body {
+ margin: 20px;
+}
+
+tr {
+ background: gray;
+}
+
+.t2 tr {
+ outline: 1px solid gray;
+}
+
+.t1 tr {
+ outline: 1px solid red;
+}
+
+</style>
+
+<script type="text/javascript">
+
+function showBug() {
+ document.getElementById("table1").setAttribute("class", "t1");
+}
+
+window.addEventListener("MozReftestInvalidate",
+ function() {
+ showBug();
+ document.documentElement.className = "";
+ });
+
+</script>
+
+</head>
+
+<body>
+
+<table id="table1">
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+</table>
+
+<table class="t2">
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+ <tr><td>AAAA</td></tr>
+
+ <tr><td>AAAA</td></tr>
+</table>
+
+<br/>
+<form method="get" action="#">
+ <input type="button" onclick="showBug(); return false;" value="Trigger bug"/>
+</form>
+
+</body> </html>
diff --git a/layout/reftests/bugs/421710-1.html b/layout/reftests/bugs/421710-1.html
new file mode 100644
index 0000000000..7c5f8bdc1b
--- /dev/null
+++ b/layout/reftests/bugs/421710-1.html
@@ -0,0 +1,226 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html class="reftest-paged">
+<head>
+<style>
+#spContainer {
+clear: both;
+float: left !important;
+margin:0 !important;
+padding: 0 0 0 22px !important;
+min-width: 980px;
+max-width: 3000px;
+}
+.spSmallScreen #spMainContent {
+float: left !important;
+margin: 20px 12px 10px 0;
+padding: 0 0 0 0;
+width: 422px !important;
+clear:left;
+overflow: hidden;
+}
+.spSmallScreen #spColumnRight {
+float: left !important;
+margin: 0;
+width: 339px !important;
+background-repeat: repeat-y;
+background-position: top left;
+padding:0;
+overflow: hidden;
+}
+.spBigScreen #spColumnRight ul.spSingle,
+.spBigScreen #spColumnRight ul.spSplit,
+.spBigScreen #spColumnRight ul.spSplitRight {
+width: 220px !important;
+list-style: none;
+}
+.spBigScreen #spColumnRight ul.spSingle li,
+.spBigScreen #spColumnRight ul.spSplit li {
+width: 220px !important;
+float: none !important;
+}
+.spInfoBox {
+float: left;
+margin: 0 0 0 1px;
+padding: 13px 10px 15px 11px !important;
+width: 317px;
+}
+.spInfoBox table{
+width: 280px !important;
+}
+ul.spSingle,
+ul.spSplit,
+ul.spSplitRight {
+float: left;
+padding: 0;
+width: 155px !important;
+margin: 11px 0 0 1px;
+list-style: none;
+}
+ul.spSplitRight {
+width: 142px !important;
+margin: 13px 0 0 11px !important;
+}
+#spBreadcrumbLine {
+width: 772px;
+height: auto;
+padding: 10px 0 8px 0;
+font-size: 0.625em;
+text-align: right;
+line-height: 1em;
+}
+.spArticleCredit{
+float: left;
+margin: 0;
+padding: 0;
+width: 100%;
+font-size: 0.8333em !important;
+line-height: 1.2em;
+text-align: right;
+}
+</style>
+</head>
+<body>
+<br clear="all">
+<div id="spContainer" class="spSmallScreen">
+<div id="spBreadcrumbLine">
+<br clear="all">
+</div>
+<div id="spMainContent">
+<div class="spArticleCredit">
+</div>
+<br clear="all">
+</div>
+
+<div id="spColumnRight">
+<div class="spInfoBox">
+<h5><a href=""></a></h5>
+<div id="spTop3KastenReiter">
+<ul>
+</ul>
+</div>
+<div id="spTop3daten">
+<ul class="spSplit">
+<li><h6>Gestresste Eltern: Hauen und Stechen in der Chancengesellschaft</h6>
+<div style="width: 140px">
+<img src="" width="140" height="80" />
+<div style="width:142px;">
+<div align="right" class="spCredit">AP</div>
+</div>
+
+</div>
+</li>
+</ul>
+<ul class="spSplitRight">
+</ul>
+</div>
+<br clear="all" />
+</div>
+<br clear="all" />
+<br clear="all">
+<br clear="all">
+<br>
+<div class="spInfoBox">
+<h5>SPIEGEL-DOSSIERS</h5>
+<ul class="spSplit">
+ <li>
+
+ <h6>Oskar Lafontaine: Der rote Panther</h6>
+ <div style="width: 140px;">
+ <img src="" height="80" width="140">
+ <div style="width: 142px;">
+ <div class="spCredit" align="right">DPA</div>
+ </div>
+ </div>
+ </li>
+
+</ul>
+</div>
+<br clear="all">
+<br clear="all">
+<div class="spInfoBox">
+<h5>SPIEGEL special Geschichte</h5>
+<div style="clear: left;" align="center">
+<div style="width: 140px;">
+ <img src="" height="185" width="140"></div>
+</div>
+</div>
+<br clear="all">
+<div class="spInfoBox">
+<h5>SERVICE-ANGEBOTE</h5>
+
+<div>
+<table cellpadding="0" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td>Immobilien-<br> B&ouml;rse</td>
+
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td>Lotto</td>
+ <td><img src=""></td>
+ <td>Banken-<br>Vergleiche</td>
+ <td><img src=""></td>
+
+ <td>Partnersuche</td>
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td>Sportwetten</td>
+ <td><img src=""></td>
+ <td>Versicherungs-<br>Vergleiche</td>
+
+ <td><img src=""></td>
+ <td>Automarkt</td>
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td>Kostenloses<br>Girokonto</td>
+
+ <td><img src=""></td>
+ <td>Kfz-<br>Versicherung</td>
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td>Brutto-Netto-<br>Rechner</td>
+
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td><img src=""></td>
+ <td>Prozesskosten-<br>Rechner</td>
+ <td><img src=""></td>
+ <td>Uni-Tools</td>
+
+ </tr>
+ <tr>
+ <td><img src="" alt="SPIEGEL ONLINE"></td>
+ <td><img src=""></td>
+ <td><img src="" alt="SPIEGEL ONLINE"></td>
+ </tr>
+ <tr>
+ <td><img src=""></td>
+ <td>W&auml;hrungs-<br>Rechner</td>
+
+ <td><img src=""></td>
+ </tr>
+ <tr>
+ <td>H&ouml;rbuch-<br>Downloads</td>
+ </tbody>
+</table>
+</div>
+</div>
+</div>
+
+</div>
+<br clear="all">
+<br>
+<br clear="all">
+</body>
+</html>
diff --git a/layout/reftests/bugs/421885-1-ref.xml b/layout/reftests/bugs/421885-1-ref.xml
new file mode 100644
index 0000000000..6884bdcf0d
--- /dev/null
+++ b/layout/reftests/bugs/421885-1-ref.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<svg xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/2000/svg">
+ <foreignObject transform="scale(2)" width="100%" height="100%">
+ <!-- test the two-span case, subimage covers two tiles -->
+ <html:div style="width:2px; height:64px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:2px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ <!-- test the one-span case, subimage covers one tile at the end of the tile -->
+ <html:div style="width:1px; height:64px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:1px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ <!-- test the one-span case, subimage covers one tile at the start of the tile -->
+ <html:div style="width:1px; height:64px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:1px; background:black;
+ margin-bottom:5px;">
+ </html:div>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/421885-1.xml b/layout/reftests/bugs/421885-1.xml
new file mode 100644
index 0000000000..6e78617551
--- /dev/null
+++ b/layout/reftests/bugs/421885-1.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<svg xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/2000/svg">
+ <foreignObject transform="scale(2)" width="100%" height="100%">
+ <!-- test the two-span case, subimage covers two tiles -->
+ <html:div style="width:2px; height:64px; background-position:-31px 0;
+ background-image: url(square-left-right-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:2px; background-position:0 -31px;
+ background-image: url(square-top-bottom-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ <!-- test the one-span case, subimage covers one tile at the end of the tile -->
+ <html:div style="width:1px; height:64px; background-position:-31px 0;
+ background-image: url(square-left-right-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:1px; background-position:0 -31px;
+ background-image: url(square-top-bottom-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ <!-- test the one-span case, subimage covers one tile at the start of the tile -->
+ <html:div style="width:1px; height:64px; background-position:0 0;
+ background-image: url(square-left-right-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ <html:div style="width:64px; height:1px; background-position:0 0;
+ background-image: url(square-top-bottom-32x32.png);
+ margin-bottom:5px;">
+ </html:div>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/421955-1-ref.html b/layout/reftests/bugs/421955-1-ref.html
new file mode 100644
index 0000000000..8113b3a837
--- /dev/null
+++ b/layout/reftests/bugs/421955-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body style="text-rendering: optimizeLegibility; background-color: white;
+ letter-spacing: 2px;">
+<p>&#x0305;<span style="color: white">-hidden</span></p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/421955-1.html b/layout/reftests/bugs/421955-1.html
new file mode 100644
index 0000000000..b1441b066d
--- /dev/null
+++ b/layout/reftests/bugs/421955-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<!-- Use letter-spacing in the style to keep the antialiased edges of the glyph
+ from being erased by the following white span in the reference -->
+<body style="text-rendering: optimizeLegibility; background-color: white;
+ letter-spacing: 2px;">
+<p>&#x0305;</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422249-1-ref.html b/layout/reftests/bugs/422249-1-ref.html
new file mode 100644
index 0000000000..2919257553
--- /dev/null
+++ b/layout/reftests/bugs/422249-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head><style>
+ .tall {
+ border: 1px solid black;
+ line-height: 20px;
+ }
+</style></head>
+<body style="margin:0">
+ <table class="tall" cellspacing="0" cellpadding="0"><td valign="top">
+ <div style="height:2000px;">
+ a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i
+ <br>j<br>k<br>l<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x
+ <br>y<br>z<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l
+ <br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x<br>y<br>z
+ <br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l<br>m<br>n</td>
+ </div>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422249-1.html b/layout/reftests/bugs/422249-1.html
new file mode 100644
index 0000000000..84bb8ab1e0
--- /dev/null
+++ b/layout/reftests/bugs/422249-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<head><style>
+ .tall {
+ border: 1px solid black;
+ height: 2002px;
+ line-height: 20px;
+ }
+</style></head>
+<body style="margin:0">
+ <table class="tall" cellspacing="0" cellpadding="0"><td valign="top">a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i
+ <br>j<br>k<br>l<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x
+ <br>y<br>z<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l
+ <br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x<br>y<br>z
+ <br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l<br>m<br>n</td>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422394-1-ref.html b/layout/reftests/bugs/422394-1-ref.html
new file mode 100644
index 0000000000..3c4d59e954
--- /dev/null
+++ b/layout/reftests/bugs/422394-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<pre>xxxxxxxx xxxxxxxx xxxxxxxx</pre>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422394-1.html b/layout/reftests/bugs/422394-1.html
new file mode 100644
index 0000000000..e6f049b03e
--- /dev/null
+++ b/layout/reftests/bugs/422394-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<pre>xxxxxxxx xxxxxxxx xxxxxxxx</pre>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422678-1-ref.html b/layout/reftests/bugs/422678-1-ref.html
new file mode 100644
index 0000000000..bcd08f4825
--- /dev/null
+++ b/layout/reftests/bugs/422678-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body>
+<table border="1">
+ <tbody>
+ <tr>
+ <td style="background:yellow;"><div style="height:800px;">Hello</div></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/422678-1.html b/layout/reftests/bugs/422678-1.html
new file mode 100644
index 0000000000..cd4e3829f5
--- /dev/null
+++ b/layout/reftests/bugs/422678-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body>
+<table border="1">
+ <tbody>
+ <tr>
+ <td style="background:yellow; height:800px;" valign="top">Hello</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423130-1-ref.html b/layout/reftests/bugs/423130-1-ref.html
new file mode 100644
index 0000000000..3a39d09548
--- /dev/null
+++ b/layout/reftests/bugs/423130-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+div {
+ float: left;
+ border: medium solid black;
+}
+</style>
+</head>
+<body>
+<div><span style="padding-right: 10em;" id="s"><br></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423130-1.html b/layout/reftests/bugs/423130-1.html
new file mode 100644
index 0000000000..43dded9bae
--- /dev/null
+++ b/layout/reftests/bugs/423130-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="text/javascript">
+function boom()
+{
+ var s = document.getElementById("s");
+ s.removeChild(s.lastChild);
+}
+</script>
+<style type="text/css">
+div {
+ float: left;
+ border: medium solid black;
+}
+</style>
+</head>
+<body onload="boom();">
+<div><span style="padding-right: 10em;" id="s"><br>&rlm;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423385-1-ref.html b/layout/reftests/bugs/423385-1-ref.html
new file mode 100644
index 0000000000..a9513ea6c0
--- /dev/null
+++ b/layout/reftests/bugs/423385-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="float:left; background-color:yellow; height:100px; width:2px;"></div>
+ <div style="float:left; background-color:purple; height:100px; width:150px;"></div>
+ <div style="float:left; background-color:yellow; height:100px; width:10px;"></div>
+ <div style="float:left; background-color:red; height:100px; width:272px;"></div>
+ <div style="float:left; background-color:yellow; height:100px; width:4px;"></div>
+ <div style="float:left; background-color:orange; height:100px; width:150px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423385-1.html b/layout/reftests/bugs/423385-1.html
new file mode 100644
index 0000000000..6a4175ae78
--- /dev/null
+++ b/layout/reftests/bugs/423385-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="float:left; background-color:yellow;
+ height:100px; overflow:hidden;">
+ <div style="float:left; width: 272px;background-color:red;
+ height:100px;margin-left:162px;">
+ </div>
+ <div style="width:150px;margin-left:-432px;height:100px;float:left;background-color:purple;">
+ </div>
+ <div style="width:150px;margin-left:4px;float:left;background-color:orange;height:100px;">
+
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423599-1-ref.html b/layout/reftests/bugs/423599-1-ref.html
new file mode 100644
index 0000000000..5b6258334b
--- /dev/null
+++ b/layout/reftests/bugs/423599-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+ <head><style>
+ select { visibility: hidden; }
+ select.unthemed { -moz-appearance: none; margin: 2px 0 2px 0}
+ </style></head>
+ <body>
+ <div style="background: lightblue">
+ <select class="unthemed"></select>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/423599-1.html b/layout/reftests/bugs/423599-1.html
new file mode 100644
index 0000000000..5023878964
--- /dev/null
+++ b/layout/reftests/bugs/423599-1.html
@@ -0,0 +1,14 @@
+<html>
+ <head><style>
+ select { visibility: hidden; }
+ select.unthemed { -moz-appearance: none; margin: 2px 0 2px 0}
+ </style></head>
+ <body>
+ <div style="background: lightblue">
+ <select class="unthemed"></select><!--
+ No space here to make this more robust
+ in the face of different default fonts
+ --><select></select>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/423676-1-ref.html b/layout/reftests/bugs/423676-1-ref.html
new file mode 100644
index 0000000000..82a50a61fb
--- /dev/null
+++ b/layout/reftests/bugs/423676-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 423676</title>
+<style>
+#a,#d {font-weight: bold;}
+</style>
+</head>
+<body>
+<pre><span id="a">A</span>
+B
+C
+</pre>
+<pre><span id="d">D</span>
+
+E
+</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/423676-1.html b/layout/reftests/bugs/423676-1.html
new file mode 100644
index 0000000000..8b72f71875
--- /dev/null
+++ b/layout/reftests/bugs/423676-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Testcase for bug 423676</title>
+<script>
+function boom() {
+ document.getElementById("a").style.fontWeight='bold';
+ document.getElementById("d").style.fontWeight='bold';
+}
+</script>
+</head>
+<body onload="boom();">
+<pre><span id="a">A</span>
+&rlm;B
+C
+</pre>
+<pre><span id="d">D</span>
+&rlm;
+E
+</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/423823-1-ref.html b/layout/reftests/bugs/423823-1-ref.html
new file mode 100644
index 0000000000..a84c728c7e
--- /dev/null
+++ b/layout/reftests/bugs/423823-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:200px; height:100px; background:yellow;"></div>
+<br>
+<div style="width:200px; height:100px; background:yellow; overflow:scroll;">
+ <div style="height:200px; width:200px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/423823-1.html b/layout/reftests/bugs/423823-1.html
new file mode 100644
index 0000000000..7e615b0172
--- /dev/null
+++ b/layout/reftests/bugs/423823-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table cellspacing="0" cellpadding="0" style="width:200px;">
+ <tbody style="height:100px; overflow:hidden;">
+ <tr style="background:yellow;"><td><div style="height:200px;"></div>
+ </tbody>
+</table>
+<br>
+<table cellspacing="0" cellpadding="0" style="width:200px;">
+ <tbody style="height:100px; overflow:scroll;">
+ <tr style="background:yellow;"><td><div style="height:200px;"></div>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/424074-1-ref.xhtml b/layout/reftests/bugs/424074-1-ref.xhtml
new file mode 100644
index 0000000000..d29aff218c
--- /dev/null
+++ b/layout/reftests/bugs/424074-1-ref.xhtml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="width: 500px">
+ <scrollbar
+ orient="horizontal"
+ curpos="0"
+ maxpos="100"
+ pageincrement="10"/>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/424074-1-ref2.xhtml b/layout/reftests/bugs/424074-1-ref2.xhtml
new file mode 100644
index 0000000000..ee970320f3
--- /dev/null
+++ b/layout/reftests/bugs/424074-1-ref2.xhtml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="width: 500px">
+ <scrollbar
+ orient="horizontal"
+ curpos="0"
+ maxpos="100"
+ pageincrement="40"/>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/424074-1-ref3.xhtml b/layout/reftests/bugs/424074-1-ref3.xhtml
new file mode 100644
index 0000000000..7070727cb6
--- /dev/null
+++ b/layout/reftests/bugs/424074-1-ref3.xhtml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="width: 500px">
+ <scrollbar
+ orient="horizontal"
+ curpos="0"
+ maxpos="1000"
+ pageincrement="400"/>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/424074-1.xhtml b/layout/reftests/bugs/424074-1.xhtml
new file mode 100644
index 0000000000..88e3581e03
--- /dev/null
+++ b/layout/reftests/bugs/424074-1.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="width: 500px">
+ <scrollbar orient="horizontal"/>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/424236-1-ref.html b/layout/reftests/bugs/424236-1-ref.html
new file mode 100644
index 0000000000..87b4e2c6a0
--- /dev/null
+++ b/layout/reftests/bugs/424236-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; }
+ </style>
+</head>
+<body>
+
+<div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-1.html b/layout/reftests/bugs/424236-1.html
new file mode 100644
index 0000000000..ba747a6290
--- /dev/null
+++ b/layout/reftests/bugs/424236-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-10-ref.html b/layout/reftests/bugs/424236-10-ref.html
new file mode 100644
index 0000000000..6a8d8b1aa6
--- /dev/null
+++ b/layout/reftests/bugs/424236-10-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML> <!-- standards mode only! -->
+<html>
+<head>
+<title>Testcase, overflow on empty spans</title>
+<style type="text/css">
+
+html, body { margin: 0; padding: 0.25em; }
+body > div { background:aqua; }
+body > div > div { outline: 1px dotted black; margin: 0 1em; }
+
+</style>
+</head>
+<body>
+ <div>
+ <div>text</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-10.html b/layout/reftests/bugs/424236-10.html
new file mode 100644
index 0000000000..3d8eb191f2
--- /dev/null
+++ b/layout/reftests/bugs/424236-10.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML> <!-- standards mode only! -->
+<html>
+<head>
+<title>Testcase, overflow on empty spans</title>
+<style type="text/css">
+
+html, body { margin: 0; padding: 0.25em; }
+div { background:aqua; }
+div > span { outline: 1px dotted black; }
+div > span > span { display:block; margin: 0 1em; }
+
+</style>
+</head>
+<body>
+ <div>
+ <span>
+ <span>text</span></span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-11.html b/layout/reftests/bugs/424236-11.html
new file mode 100644
index 0000000000..efc813761a
--- /dev/null
+++ b/layout/reftests/bugs/424236-11.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ /* just like 424236-3, but with two extra spans nested */
+
+ * { -moz-outline-offset: 5px; outline-offset: 5px; }
+ body > span { outline: 1px dotted black; }
+ body > span > span > span > span { display: block; width: 5em; }
+
+ </style>
+</head>
+<body>
+
+<span><span><span><span>text</span></span></span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-2-ref.html b/layout/reftests/bugs/424236-2-ref.html
new file mode 100644
index 0000000000..4bb0de68de
--- /dev/null
+++ b/layout/reftests/bugs/424236-2-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; }
+
+ </style>
+</head>
+<body>
+
+&nbsp;&nbsp;<span>A</span><div>B</div><span>C</span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-2.html b/layout/reftests/bugs/424236-2.html
new file mode 100644
index 0000000000..70cd1c4571
--- /dev/null
+++ b/layout/reftests/bugs/424236-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; }
+
+ </style>
+</head>
+<body>
+
+&nbsp;&nbsp;<span>A<span>B</span>C</span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-3-ref.html b/layout/reftests/bugs/424236-3-ref.html
new file mode 100644
index 0000000000..00153c3f60
--- /dev/null
+++ b/layout/reftests/bugs/424236-3-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: 5px; outline-offset: 5px; }
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; width: 5em; }
+
+ </style>
+</head>
+<body>
+
+<div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-3.html b/layout/reftests/bugs/424236-3.html
new file mode 100644
index 0000000000..fef7ced9da
--- /dev/null
+++ b/layout/reftests/bugs/424236-3.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: 5px; outline-offset: 5px; }
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 5em; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-4-ref.html b/layout/reftests/bugs/424236-4-ref.html
new file mode 100644
index 0000000000..ad4a057785
--- /dev/null
+++ b/layout/reftests/bugs/424236-4-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; width: 10em; }
+
+ </style>
+</head>
+<body>
+
+<div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-4.html b/layout/reftests/bugs/424236-4.html
new file mode 100644
index 0000000000..d7fba65a0e
--- /dev/null
+++ b/layout/reftests/bugs/424236-4.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { width: 5em; }
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-5-ref.html b/layout/reftests/bugs/424236-5-ref.html
new file mode 100644
index 0000000000..e524214986
--- /dev/null
+++ b/layout/reftests/bugs/424236-5-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: -2px; outline-offset: -2px; }
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; width: 15em; }
+
+ </style>
+</head>
+<body>
+
+<div>text<br>text<br>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-5.html b/layout/reftests/bugs/424236-5.html
new file mode 100644
index 0000000000..dedf4330cb
--- /dev/null
+++ b/layout/reftests/bugs/424236-5.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: -2px; outline-offset: -2px; }
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+ body > span > span + span { width: 5em; }
+ body > span > span + span + span { width: 15em; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span><span>text</span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-6-ref.html b/layout/reftests/bugs/424236-6-ref.html
new file mode 100644
index 0000000000..a0879f5d15
--- /dev/null
+++ b/layout/reftests/bugs/424236-6-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; }
+ body > div > div { text-align: right; }
+ body > div > div > span { display: inline-block; width: 5em; text-align: left; }
+
+ </style>
+</head>
+<body>
+
+<div>text<div><span>text</span></div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-6.html b/layout/reftests/bugs/424236-6.html
new file mode 100644
index 0000000000..0742419f4f
--- /dev/null
+++ b/layout/reftests/bugs/424236-6.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 5em; }
+ body > span > span + span { margin-left: auto; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-7-ref.html b/layout/reftests/bugs/424236-7-ref.html
new file mode 100644
index 0000000000..9904b0176c
--- /dev/null
+++ b/layout/reftests/bugs/424236-7-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; width: 5em; margin-left: auto; margin-right: auto; }
+
+ </style>
+</head>
+<body>
+
+<div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-7.html b/layout/reftests/bugs/424236-7.html
new file mode 100644
index 0000000000..61fbcfa4b7
--- /dev/null
+++ b/layout/reftests/bugs/424236-7.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 5em; margin-right: auto; margin-left: auto; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-8-ref.html b/layout/reftests/bugs/424236-8-ref.html
new file mode 100644
index 0000000000..219d39c50f
--- /dev/null
+++ b/layout/reftests/bugs/424236-8-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: 3px; outline-offset: 3px; }
+ body > span { outline: 1px dotted black; }
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; }
+ body > div { width: 10em; }
+ body > div + span + div { width: 15em }
+
+ </style>
+</head>
+<body>
+
+<div>text</div><span>text</span><div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-8.html b/layout/reftests/bugs/424236-8.html
new file mode 100644
index 0000000000..d5e65c4e5e
--- /dev/null
+++ b/layout/reftests/bugs/424236-8.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ * { -moz-outline-offset: 3px; outline-offset: 3px; }
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+ body > span > span + span { display:inline; }
+ body > span > span + span + span { display: block; width: 15em; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span><span>text</span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-9-ref.html b/layout/reftests/bugs/424236-9-ref.html
new file mode 100644
index 0000000000..6c3dea9f7b
--- /dev/null
+++ b/layout/reftests/bugs/424236-9-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+ * { -moz-outline-offset: -1px; outline-offset: -1px; }
+ body > span { outline: 1px dotted black; }
+ /* can't compare to border combined with negative margin because of
+ margin collapsing */
+ body > div { display: block; outline: 1px dotted black; width: 10em; }
+ body > div + span + div { width: 5em; }
+
+ </style>
+</head>
+<body>
+
+<div>text</div><span>Some words that must be wider than 10em</span><div>text</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424236-9.html b/layout/reftests/bugs/424236-9.html
new file mode 100644
index 0000000000..a8494924fe
--- /dev/null
+++ b/layout/reftests/bugs/424236-9.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>reftest, bug 424236</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { font-size: 16px; }
+ * { -moz-outline-offset: -1px; outline-offset: -1px; }
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+ body > span > span + span { display:inline; }
+ body > span > span + span + span { display: block; width: 5em; }
+
+ </style>
+</head>
+<body>
+
+<span><span>text</span><span>Some words that must be wider than 10em</span><span>text</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424434-1-ref.html b/layout/reftests/bugs/424434-1-ref.html
new file mode 100644
index 0000000000..7590961eb9
--- /dev/null
+++ b/layout/reftests/bugs/424434-1-ref.html
@@ -0,0 +1,10 @@
+<head>
+</head>
+<body>
+<table style="border:1px solid blue">
+<thead style="display: table-cell; border-collapse: collapse; border:1px solid red; padding:1px">
+<td style="display: table-header-group; border:1px solid green"></td>
+<td style=" border:10px solid orange" ></td>
+</thead>
+</table>
+</body> \ No newline at end of file
diff --git a/layout/reftests/bugs/424434-1.html b/layout/reftests/bugs/424434-1.html
new file mode 100644
index 0000000000..e4276b4620
--- /dev/null
+++ b/layout/reftests/bugs/424434-1.html
@@ -0,0 +1,10 @@
+<head>
+</head>
+<body>
+<table style="border:1px solid blue">
+<thead style="display: table-cell; border-collapse: collapse; border:1px solid red; padding:1px">
+<td style="overflow: auto; display: table-header-group; border:1px solid green"></td>
+<td style=" border:10px solid orange" ></td>
+</thead>
+</table>
+</body> \ No newline at end of file
diff --git a/layout/reftests/bugs/424465-1-ref.html b/layout/reftests/bugs/424465-1-ref.html
new file mode 100644
index 0000000000..05f254e819
--- /dev/null
+++ b/layout/reftests/bugs/424465-1-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>424465 testcase</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+ <style type="text/css">
+ .standardform {
+ background-color: #00f000;
+ border: 1px solid #000000;
+ margin-bottom: 3px; /* Remove this line and bug disappears */
+ }
+ </style>
+
+ </head>
+
+ <body>
+
+ <form method="get" action="#">
+ <table class="standardform" cellspacing="5">
+ <tbody>
+ <tr>
+ <td colspan="2" id="hiddenColumnBugged">
+ <div>.: See the bug ? :.<br/>
+ <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAAATCAIAAAB0hvS3AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6AAAdTAAAOpgAAA6lwAAF2+XqZnUAAAAuUlEQVR4nGJkYPjPMApGwWACAAHENNAOGAWjAB0ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABBgAsywBJafN/+UAAAAASUVORK5CYII=' />
+ </div>
+ </td>
+ </tr>
+ </tbody>
+
+ </table>
+ </form>
+ </body>
+
+</html>
diff --git a/layout/reftests/bugs/424465-1.html b/layout/reftests/bugs/424465-1.html
new file mode 100644
index 0000000000..4527c48f48
--- /dev/null
+++ b/layout/reftests/bugs/424465-1.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>424465 testcase</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+ <style type="text/css">
+ .standardform {
+ background-color: #00f000;
+ border: 1px solid #000000;
+ margin-bottom: 3px; /* Remove this line and bug disappears */
+ }
+ </style>
+
+ <script type="text/javascript">
+ //<![CDATA[
+
+ window.addEventListener("MozReftestInvalidate", showBug);
+
+ function imageLoaded()
+ {
+ document.documentElement.className = "";
+ }
+
+ function showBug()
+ {
+ document.getElementById("hiddenColumnBugged").innerHTML =
+ "<div>.: See the bug ? :.<br /><img onload='imageLoaded()' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAAATCAIAAAB0hvS3AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6AAAdTAAAOpgAAA6lwAAF2+XqZnUAAAAuUlEQVR4nGJkYPjPMApGwWACAAHENNAOGAWjAB0ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABNBoohwFgw4ABBgAsywBJafN/+UAAAAASUVORK5CYII=' /><\/div>";
+ }
+
+ //]]>
+ </script>
+
+ </head>
+
+ <body>
+
+ <form method="get" action="#">
+ <table class="standardform" cellspacing="5">
+ <tbody>
+ <tr>
+ <td colspan="2" id="hiddenColumnBugged">
+ <input onclick="showBug(); return false;" value="Trigger Bug" type="button" />
+ </td>
+ </tr>
+ </tbody>
+
+ </table>
+ </form>
+ </body>
+
+</html>
diff --git a/layout/reftests/bugs/424631-1-ref.html b/layout/reftests/bugs/424631-1-ref.html
new file mode 100644
index 0000000000..22d1912497
--- /dev/null
+++ b/layout/reftests/bugs/424631-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+</head>
+
+<body>
+
+<div><span id="o"><span id="a">a</span><span id="b">b&#x202e;</span><span>c</span>d</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424631-1.html b/layout/reftests/bugs/424631-1.html
new file mode 100644
index 0000000000..341d07a06e
--- /dev/null
+++ b/layout/reftests/bugs/424631-1.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+</head>
+
+<body onload="document.getElementById('o').appendChild(document.createTextNode('d'));">
+
+<div><span id="o"><span id="a">a</span><span id="b">b&#x202e;</span><span>c</span></span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424710-1-ref.html b/layout/reftests/bugs/424710-1-ref.html
new file mode 100644
index 0000000000..45cccf5035
--- /dev/null
+++ b/layout/reftests/bugs/424710-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="border:2px dotted blue; margin:3px;">
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/424710-1.html b/layout/reftests/bugs/424710-1.html
new file mode 100644
index 0000000000..32c07ebb65
--- /dev/null
+++ b/layout/reftests/bugs/424710-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html style="border:2px dotted blue; margin:3px;">
+<body>
+<div style="position:absolute; top:0; right:0px; width:100px; height:100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/424766-1-ref.html b/layout/reftests/bugs/424766-1-ref.html
new file mode 100644
index 0000000000..d22022f716
--- /dev/null
+++ b/layout/reftests/bugs/424766-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+
+</head>
+
+<body style="width: 1000px; margin: 0; padding: 0">
+ <table cellpadding="0" cellspacing="0" align="center">
+ <tr>
+ <td>
+ <div style="background:red; WIDTH: 400px; height:400px;"></div>
+ <div id="x" style="width: 0px"></div>
+
+ </td>
+ </tr>
+ </table>
+ <div style="position: absolute; top: 0; left: 300px; height: 400px; width: 400px; background: green; opacity: 0.9"></div>
+
+<br/>
+
+<div style="text-align: center;">
+<form method="get" action="#">
+ <input onclick="return false;" value="Trigger Bug" type="button" />
+</form>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/424766-1.html b/layout/reftests/bugs/424766-1.html
new file mode 100644
index 0000000000..976d6e4568
--- /dev/null
+++ b/layout/reftests/bugs/424766-1.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<title></title>
+
+<script type="text/javascript">
+//<![CDATA[
+
+function showBug() {
+ document.getElementById('x').style.width = 0;
+ }
+
+window.addEventListener("MozReftestInvalidate",
+ function() {
+ showBug();
+ document.documentElement.className = "";
+ });
+
+//]]>
+</script>
+
+</head>
+
+<body style="width: 1000px; margin: 0; padding: 0">
+ <table cellpadding="0" cellspacing="0" align="center">
+ <tr>
+ <td>
+ <div style="background:red; WIDTH: 400px; height:400px;"></div>
+ <div id="x" style="width: 600px"></div>
+
+ </td>
+ </tr>
+ </table>
+ <div style="position: absolute; top: 0; left: 300px; height: 400px; width: 400px; background: green; opacity: 0.9"></div>
+
+<br/>
+
+<div style="text-align: center;">
+<form method="get" action="#">
+ <input onclick="showBug(); return false;" value="Trigger Bug" type="button" />
+</form>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/425972-1-ref.html b/layout/reftests/bugs/425972-1-ref.html
new file mode 100644
index 0000000000..279cadbb3f
--- /dev/null
+++ b/layout/reftests/bugs/425972-1-ref.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>there should not be a red bar over the whole page</title>
+</head>
+<body >
+ <table width="100%">
+ <tbody>
+
+ <tr><td bgcolor="#ff3333" width="100%" height="50px"></td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/425972-1.html b/layout/reftests/bugs/425972-1.html
new file mode 100644
index 0000000000..a0851b1608
--- /dev/null
+++ b/layout/reftests/bugs/425972-1.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>there should be a red bar over the whole page</title>
+</head>
+<body >
+ <table width="100%">
+ <tbody>
+
+ <tr><td bgcolor="#ff3333" width="1%" height="50px"></td></tr>
+ <tr><td colspan="2"></td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/425972-2-ref.html b/layout/reftests/bugs/425972-2-ref.html
new file mode 100644
index 0000000000..5ffc0f2921
--- /dev/null
+++ b/layout/reftests/bugs/425972-2-ref.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>there should not be a red bar over the whole page</title>
+</head>
+<body >
+ <table width="100%">
+ <tbody>
+
+ <tr><td bgcolor="#ff3333" width="1%" height="50px"></td><td style="padding:0">&nbsp;&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/425972-2.html b/layout/reftests/bugs/425972-2.html
new file mode 100644
index 0000000000..1cf28b26fd
--- /dev/null
+++ b/layout/reftests/bugs/425972-2.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>there should not be a red bar over the whole page</title>
+</head>
+<body >
+ <table width="100%">
+ <tbody>
+
+ <tr><td bgcolor="#ff3333" width="1%" height="50px"></td><td style="padding:0"></td></tr>
+ <tr><td colspan="2"></td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/426629-1-ref.html b/layout/reftests/bugs/426629-1-ref.html
new file mode 100644
index 0000000000..66e1757207
--- /dev/null
+++ b/layout/reftests/bugs/426629-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W#C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title> fixed layout not triggered by changing width from auto to coordinate</title>
+<script type="text/javascript">
+function doTest(){
+ t1 = document.getElementById('target1');
+ t1.style.width="20px";
+}
+</script>
+</head>
+<body onload="doTest();">
+<table border style="table-layout:fixed; width:400px" id="target1">
+<tr><td>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/426629-1.html b/layout/reftests/bugs/426629-1.html
new file mode 100644
index 0000000000..546adc1c03
--- /dev/null
+++ b/layout/reftests/bugs/426629-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W#C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title> fixed layout not triggered by changing width from auto to coordinate</title>
+<script type="text/javascript">
+function doTest(){
+ t1 = document.getElementById('target2');
+ t1.style.width="20px";
+
+}
+</script>
+</head>
+<body onload="doTest();">
+<table border style="table-layout:fixed;" id="target2">
+<tr><td>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/427017-1.xhtml b/layout/reftests/bugs/427017-1.xhtml
new file mode 100644
index 0000000000..84715abab0
--- /dev/null
+++ b/layout/reftests/bugs/427017-1.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+<body>
+<div style="position: absolute; border: 5px solid black;">
+ <div style="position: fixed; page-break-before: left;"/>
+ <div style="display: table-header-group; page-break-after: right;">
+ <div style="position: absolute;">
+ <div style="position: fixed;"/>
+ </div>
+ </div>
+ <div style="display: table-footer-group;"/>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-image.html b/layout/reftests/bugs/427129-image.html
new file mode 100644
index 0000000000..5bdfadc3bb
--- /dev/null
+++ b/layout/reftests/bugs/427129-image.html
@@ -0,0 +1,213 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 10px; margin: 2px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ .fl, .fr { height: 5px; }
+ .fl { float: left; width: 56px; }
+ .fr { float: right; width: 73px; }
+
+ .t { display: block; background: blue; height: 5px; width: 85px;
+ border-left: 1px solid blue; padding-left: 2px;
+ padding-right: 4px; border-right: 8px solid blue; }
+
+ </style>
+</head>
+<body>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: 30px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: 56px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: 73px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: 100px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: auto">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: auto; margin-right: 30px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: auto; margin-right: 56px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: auto; margin-right: 73px">
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin-left: auto; margin-right: 100px">
+</div>
+
+<!-- Remember that the extra end-edge margin gets ignored -->
+<div style="width: 300px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="width: 57px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px; width: 57px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px 0 56px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px 0 57px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 73px 0 15px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 74px 0 15px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 0 0 15px; width: 56px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 0 0 15px; width: 57px">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px; width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="width: 29%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px; width: 29%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px 0 56px; width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 15px 0 57px; width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 73px 0 15px; width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 74px 0 15px; width: 28%">
+ </div>
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 0 0 15px; width: 28%">
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <img src="solidblue2.png" class="t" style="margin: 0 0 0 15px; width: 29%">
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-ref.html b/layout/reftests/bugs/427129-ref.html
new file mode 100644
index 0000000000..331409e40d
--- /dev/null
+++ b/layout/reftests/bugs/427129-ref.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 10px; margin: 2px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ .t { background: blue; height: 5px; width: 100px; }
+
+ </style>
+</head>
+<body>
+
+<div class="contain">
+ <div class="t" style="margin-left: 56px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: 56px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: 56px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: 100px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: auto; margin-right: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: auto; margin-right: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: auto; margin-right: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: auto; margin-right: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="t" style="margin-left: auto; margin-right: 100px"></div>
+</div>
+
+<!-- Remember that the extra end-edge margin gets ignored -->
+<div style="width: 300px">
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; width: 72px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 15px; width: 72px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 57px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 15px; width: 72px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; width: 73px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 15px; width: 73px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 57px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-left: 56px; width: 71px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="t" style="margin-top: 5px; margin-left: 15px; width: 73px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-scrollframe.html b/layout/reftests/bugs/427129-scrollframe.html
new file mode 100644
index 0000000000..a5974e9b88
--- /dev/null
+++ b/layout/reftests/bugs/427129-scrollframe.html
@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 10px; margin: 2px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ .fl, .fr { height: 5px; }
+ .fl { float: left; width: 56px; }
+ .fr { float: right; width: 73px; }
+
+ .t { overflow: hidden; background: blue; height: 5px; width: 85px;
+ border-left: 1px solid blue; padding-left: 2px;
+ padding-right: 4px; border-right: 8px solid blue; }
+
+ </style>
+</head>
+<body>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: 30px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: 56px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: 100px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: auto"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: auto; margin-right: 30px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: auto; margin-right: 56px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: auto; margin-right: 73px"></div>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin-left: auto; margin-right: 100px"></div>
+</div>
+
+<!-- Remember that the extra end-edge margin gets ignored -->
+<div style="width: 300px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="width: 57px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px; width: 57px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px 0 56px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px 0 57px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 73px 0 15px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 74px 0 15px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 0 0 15px; width: 56px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 0 0 15px; width: 57px"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="width: 29%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px; width: 29%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px 0 56px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 15px 0 57px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 73px 0 15px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 74px 0 15px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 0 0 15px; width: 28%"></div>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <div class="t" style="margin: 0 0 0 15px; width: 29%"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-table-caption-ref.html b/layout/reftests/bugs/427129-table-caption-ref.html
new file mode 100644
index 0000000000..4cecb194cb
--- /dev/null
+++ b/layout/reftests/bugs/427129-table-caption-ref.html
@@ -0,0 +1,174 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 4px; margin: 1px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ div.pushed { height: 2px; }
+ div.t { background: blue; height: 1px; width: 100px; }
+ div.caption { background: purple; height: 1px; width: 100px; }
+ div.side { display: inline-block; vertical-align: top; }
+
+ </style>
+</head>
+<body>
+
+<!--
+
+ WARNING: Both this test and the reference are constructed to test
+ our current behavior, which is far from optimal in a number of cases.
+ Fixing the test to test better behavior is encouraged when such
+ behavior is implemented.
+
+ To test the behavior under resizing, every test in this page is
+ repeated three times, once in a container one pixel above the
+ transition width, once at the transition width (just fitting), and
+ once in a container a pixel below the transition width.
+
+-->
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="t" style="margin-left: 56px"></div>
+ <div class="caption" style="margin-left: 116px"></div>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="t" style="margin-left: 56px"></div>
+ <div class="caption" style="margin-left: 116px"></div>
+ </div>
+</div>
+
+<div style="width: 403px">
+ <div class="contain">
+ <div class="pushed"></div>
+ <div class="t" style="margin-left: 55px"></div>
+ <div class="caption" style="margin-left: 115px"></div>
+ </div>
+</div>
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="caption" style="margin-left: 116px"></div>
+ <div class="t" style="margin-left: 56px"></div>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="caption" style="margin-left: 116px"></div>
+ <div class="t" style="margin-left: 56px"></div>
+ </div>
+</div>
+
+<div style="width: 403px">
+ <div class="contain">
+ <div class="pushed"></div>
+ <div class="caption" style="margin-left: 116px"></div>
+ <div class="t" style="margin-left: 56px"></div>
+ </div>
+</div>
+
+<div style="width: 406px">
+ <div class="contain">
+ <div class="t" style="margin-left: 57px"></div>
+ <div class="caption" style="margin-left: 117px"></div>
+ </div>
+</div>
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="t" style="margin-left: 57px"></div>
+ <div class="caption" style="margin-left: 117px"></div>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="pushed"></div>
+ <div class="t" style="margin-left: 57px"></div>
+ <div class="caption" style="margin-left: 117px"></div>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="t" style="margin-left: 152px"></div>
+ <div class="caption" style="margin-left: 72px"></div>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="t" style="margin-left: 151px"></div>
+ <div class="caption" style="margin-left: 71px"></div>
+ </div>
+</div>
+
+<div style="width: 423px">
+ <div class="contain rtl">
+ <div class="pushed"></div>
+ <div class="t" style="margin-left: 151px"></div>
+ <div class="caption" style="margin-left: 71px"></div>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="caption" style="margin-left: 72px"></div>
+ <div class="t" style="margin-left: 152px"></div>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="caption" style="margin-left: 71px"></div>
+ <div class="t" style="margin-left: 151px"></div>
+ </div>
+</div>
+
+<div style="width: 423px">
+ <div class="contain rtl">
+ <div class="pushed"></div>
+ <div class="caption" style="margin-left: 70px"></div>
+ <div class="t" style="margin-left: 150px"></div>
+ </div>
+</div>
+
+<div style="width: 426px">
+ <div class="contain rtl">
+ <div class="t" style="margin-left: 152px"></div>
+ <div class="caption" style="margin-left: 72px"></div>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="t" style="margin-left: 151px"></div>
+ <div class="caption" style="margin-left: 71px"></div>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="pushed"></div>
+ <div class="t" style="margin-left: 150px"></div>
+ <div class="caption" style="margin-left: 70px"></div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-table-caption.html b/layout/reftests/bugs/427129-table-caption.html
new file mode 100644
index 0000000000..f310ca0dda
--- /dev/null
+++ b/layout/reftests/bugs/427129-table-caption.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .rtl { direction: rtl; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 4px; margin: 1px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ .fl, .fr { height: 2px; }
+ .fl { float: left; width: 56px; }
+ .fr { float: right; width: 73px; }
+
+ .t { background: blue; height: 1px; width: 100px; border-spacing: 0; }
+ .t caption { background: purple; height: 1px; width: 100px; }
+ .t td { padding: 0; }
+
+ </style>
+</head>
+<body>
+
+<!--
+
+ WARNING: Both this test and the reference are constructed to test
+ our current behavior, which is far from optimal in a number of cases.
+ Fixing the test to test better behavior is encouraged when such
+ behavior is implemented. In particular:
+ * making the effect of the caption's side margin make sense for 'top'
+ and 'bottom' captions
+ * making 'left' and 'right' captions behave sensibly
+
+ To test the behavior under resizing, every test in this page is
+ repeated three times, once in a container one pixel above the
+ transition width, once at the transition width (just fitting), and
+ once in a container a pixel below the transition width.
+
+-->
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 55px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 55px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 403px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 55px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 56px; caption-side: top">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 56px; caption-side: top">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 403px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 56px; caption-side: top">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 406px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 57px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 405px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 57px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 404px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 57px; caption-side: bottom">
+ <caption style="margin: 0 15px 0 60px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 72px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 72px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 423px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 72px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 73px 0 15px; caption-side: top">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 73px 0 15px; caption-side: top">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 423px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 73px 0 15px; caption-side: top">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 426px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 74px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 425px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 74px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+<div style="width: 424px">
+ <div class="contain rtl">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 74px 0 15px; caption-side: bottom">
+ <caption style="margin: 0 80px 0 15px"></caption>
+ <tr><td></td></tr>
+ </table>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427129-table.html b/layout/reftests/bugs/427129-table.html
new file mode 100644
index 0000000000..4d0a2de3dd
--- /dev/null
+++ b/layout/reftests/bugs/427129-table.html
@@ -0,0 +1,216 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Reftest, bug 427129</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ html, body { margin: 0; }
+
+ .contain {
+ background: aqua; color: black;
+ height: 10px; margin: 2px 50px;
+ padding-top: 0.1px; /* needed for some reason (XXX WHY?) */
+ }
+
+ .fl, .fr { height: 5px; }
+ .fl { float: left; width: 56px; }
+ .fr { float: right; width: 73px; }
+
+ /* tables default to border-box sizing */
+ .t { background: blue; height: 5px; width: 100px; border-spacing: 0;
+ border-left: 1px solid blue; padding-left: 2px;
+ padding-right: 4px; border-right: 8px solid blue; }
+ .t td { padding: 0; }
+
+ </style>
+</head>
+<body>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: 30px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: 56px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: 73px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: 100px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: auto"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: auto; margin-right: 30px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: auto; margin-right: 56px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: auto; margin-right: 73px"><tr><td></td></tr></table>
+</div>
+
+<div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin-left: auto; margin-right: 100px"><tr><td></td></tr></table>
+</div>
+
+<!-- Remember that the extra end-edge margin gets ignored -->
+<div style="width: 300px">
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="width: 72px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px; width: 72px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 56px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 57px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 73px 0 15px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 74px 0 15px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 0 0 15px; width: 71px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 0 0 15px; width: 72px"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="width: 36.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px; width: 36.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 56px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 15px 0 57px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 73px 0 15px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 74px 0 15px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 0 0 15px; width: 35.5%"><tr><td></td></tr></table>
+ </div>
+
+ <div class="contain">
+ <div class="fl"></div>
+ <div class="fr"></div>
+ <table class="t" style="margin: 0 0 0 15px; width: 36.5%"><tr><td></td></tr></table>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427370-1-ref.html b/layout/reftests/bugs/427370-1-ref.html
new file mode 100644
index 0000000000..a53c5cd0eb
--- /dev/null
+++ b/layout/reftests/bugs/427370-1-ref.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 427370</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color: white; font-size:16px; padding:0; margin:0;
+ }
+ body {
+ margin:10px;
+ }
+ ol,li{margin:0!important;padding:0!important}
+ ol { margin-top:1em!important; }
+ .rtl li {margin-right:40px!important;}
+ .ltr li {margin-left:40px!important;}
+
+ DEBUG_li {
+ outline:1px dashed red;
+ border:3px dashed blue;
+ }
+ .inside li {
+ list-style-position:inside;
+ }
+
+ .rtl label {
+ float:right;
+ }
+ .ltr label {
+ float:left;
+ }
+
+ label {
+ width:100px;
+ height:1em;
+ background:pink;
+ }
+
+ .rtl {
+ direction:rtl;
+ }
+ .ltr {
+ direction:ltr;
+ }
+
+ .C {
+ padding:0 0.2em 0 0.2em;
+ }
+ </style>
+</head>
+<body>
+<div style="position:absolute;top:0;left: 50px;bottom:0;width:1px;background:lime;opacity:0.5"></div>
+<div style="position:absolute;top:0;right:50px;bottom:0;width:1px;background:lime;opacity:0.5"></div>
+
+<div class="ltr">
+ <ol>
+ <li><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></li>
+ <li><div style="overflow:hidden;">
+ <div></div><div><span class="C">C</span></div>
+ </div></li>
+</ol>
+</div>
+
+<div class="rtl">
+<ol>
+ <li><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></li>
+ <li><div style="overflow:hidden;">
+ <div></div><div><span class="C">C</span></div>
+ </div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:left; width:100px; height:5em; border:1px solid black"></div>
+<div class="ltr">
+ <ol>
+ <li><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></li>
+ <li><div style="overflow:hidden;">
+ <div></div><div><span class="C">C</span></div>
+ </div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:right; width:100px; height:5em; border:1px solid black"></div>
+<div class="rtl">
+<ol>
+ <li><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></li>
+ <li><div style="overflow:hidden;">
+ <div></div><div><span class="C">C</span></div>
+ </div></li>
+</ol>
+</div>
+
+
+<br style="clear:both;">
+
+<div class="ltr">
+ <ol>
+ <li><div><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></div></li>
+</ol>
+</div>
+
+<div class="rtl">
+<ol>
+ <li><div><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:left; width:100px; height:5em; border:1px solid black"></div>
+<div class="ltr">
+ <ol>
+ <li><div><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:right; width:100px; height:5em; border:1px solid black"></div>
+<div class="rtl">
+<ol>
+ <li><div><div style="overflow:hidden;">
+ <label></label>
+ Outside
+ </div></div></li>
+</ol>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427370-1.html b/layout/reftests/bugs/427370-1.html
new file mode 100644
index 0000000000..44c8bc5975
--- /dev/null
+++ b/layout/reftests/bugs/427370-1.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 427370</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color: white; font-size:16px; padding:0; margin:0;
+ }
+ body {
+ margin:10px;
+ }
+ ol,li{margin:0!important;padding:0!important}
+ ol { margin-top:1em!important; }
+ .rtl li {margin-right:40px!important;}
+ .ltr li {margin-left:40px!important;}
+
+ DEBUG_li {
+ outline:1px dashed red;
+ border:3px dashed blue;
+ }
+ .inside li {
+ list-style-position:inside;
+ }
+
+ .rtl label {
+ float:right;
+ }
+ .ltr label {
+ float:left;
+ }
+
+ label {
+ width:100px;
+ height:1em;
+ background:pink;
+ }
+
+ .rtl {
+ direction:rtl;
+ }
+ .ltr {
+ direction:ltr;
+ }
+
+ .C {
+ padding:0 0.2em 0 0.2em;
+ }
+ </style>
+</head>
+<body>
+<div style="position:absolute;top:0;left: 50px;bottom:0;width:1px;background:lime;opacity:0.5"></div>
+<div style="position:absolute;top:0;right:50px;bottom:0;width:1px;background:lime;opacity:0.5"></div>
+
+<div class="ltr">
+ <ol>
+ <li>
+ <label></label>
+ Outside
+ </li>
+ <li>
+ <div></div><div><span class="C">C</span></div>
+ </li>
+</ol>
+</div>
+
+<div class="rtl">
+<ol>
+ <li>
+ <label></label>
+ Outside
+ </li>
+ <li>
+ <div></div><div><span class="C">C</span></div>
+ </li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:left; width:100px; height:5em; border:1px solid black"></div>
+<div class="ltr">
+ <ol>
+ <li>
+ <label></label>
+ Outside
+ </li>
+ <li>
+ <div></div><div><span class="C">C</span></div>
+ </li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:right; width:100px; height:5em; border:1px solid black"></div>
+<div class="rtl">
+<ol>
+ <li>
+ <label></label>
+ Outside
+ </li>
+ <li>
+ <div></div><div><span class="C">C</span></div>
+ </li>
+</ol>
+</div>
+
+
+<br style="clear:both;">
+
+<div class="ltr">
+ <ol>
+ <li><div>
+ <label></label>
+ Outside
+ </div></li>
+</ol>
+</div>
+
+<div class="rtl">
+<ol>
+ <li><div>
+ <label></label>
+ Outside
+ </div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:left; width:100px; height:5em; border:1px solid black"></div>
+<div class="ltr">
+ <ol>
+ <li><div>
+ <label></label>
+ Outside
+ </div></li>
+</ol>
+</div>
+
+<br style="clear:both;">
+
+<div style="float:right; width:100px; height:5em; border:1px solid black"></div>
+<div class="rtl">
+<ol>
+ <li><div>
+ <label></label>
+ Outside
+ </div></li>
+</ol>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/427730-1-ref.html b/layout/reftests/bugs/427730-1-ref.html
new file mode 100644
index 0000000000..52005c19be
--- /dev/null
+++ b/layout/reftests/bugs/427730-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body style="font-size:78px; line-height: 1.2em">
+<p><span style="border:1px dotted red;">T</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/427730-1.html b/layout/reftests/bugs/427730-1.html
new file mode 100644
index 0000000000..b3ec1c3518
--- /dev/null
+++ b/layout/reftests/bugs/427730-1.html
@@ -0,0 +1,5 @@
+<html>
+<body style="font-size:78px; line-height: 1.2em">
+<p>&#x200b;<span style="border:1px dotted red;">T</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428278-iframe.html b/layout/reftests/bugs/428278-iframe.html
new file mode 100644
index 0000000000..19643e0a4c
--- /dev/null
+++ b/layout/reftests/bugs/428278-iframe.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+
+</head><body>
+<table style="outline-color: red; outline-style: solid; outline-width: medium; border:1px solid black">
+<tr><td style="border:1px solid blue">resize the window
+</table>
+</body></html>
diff --git a/layout/reftests/bugs/428278-ref.html b/layout/reftests/bugs/428278-ref.html
new file mode 100644
index 0000000000..daee98b883
--- /dev/null
+++ b/layout/reftests/bugs/428278-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+
+</head><body>
+
+<iframe id="x" src="428278-iframe.html" style="width:400px"></iframe>
+</body></html>
diff --git a/layout/reftests/bugs/428278.html b/layout/reftests/bugs/428278.html
new file mode 100644
index 0000000000..feed7c77fa
--- /dev/null
+++ b/layout/reftests/bugs/428278.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+
+</head><body onload="foo()">
+
+<iframe id="x" src="428278-iframe.html"></iframe>
+<script>
+var w = 400;
+function foo() {
+ var div = document.getElementById('x');
+ div.style.width=w+"px";
+ ++w;
+ var v = document.offsetHeight;
+}
+</script>
+</body></html>
diff --git a/layout/reftests/bugs/428423-1-ref.html b/layout/reftests/bugs/428423-1-ref.html
new file mode 100644
index 0000000000..8d7057a0cf
--- /dev/null
+++ b/layout/reftests/bugs/428423-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<head><style>
+ .float { float: left } /* Just using for shrink-wrapping */
+ .orange { background: orange }
+</style></head>
+<body>
+ The orange box should only be as wide as its text.<br>
+ <div class="float orange">foo</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428423-1a.html b/layout/reftests/bugs/428423-1a.html
new file mode 100644
index 0000000000..69880be4a3
--- /dev/null
+++ b/layout/reftests/bugs/428423-1a.html
@@ -0,0 +1,18 @@
+<html>
+<head><style>
+ fieldset, legend { margin: 0px; padding: 0px; }
+ fieldset {
+ width: 20em;
+ text-align: right;
+ border: 0px;
+ }
+ legend { display: block; }
+ .orange { background: orange }
+</style></head>
+<body>
+ The orange box should only be as wide as its text.
+ <fieldset>
+ <legend class="orange">foo</legend>
+ </fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428423-1b.html b/layout/reftests/bugs/428423-1b.html
new file mode 100644
index 0000000000..1417352966
--- /dev/null
+++ b/layout/reftests/bugs/428423-1b.html
@@ -0,0 +1,17 @@
+<html>
+<head><style>
+ fieldset, legend { margin: 0px; padding: 0px; }
+ fieldset {
+ width: 20em;
+ text-align: right;
+ border: 0px;
+ }
+ .orange { background: orange }
+</style></head>
+<body>
+ The orange box should only be as wide as its text.
+ <fieldset>
+ <legend class="orange">foo</legend>
+ </fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428521-1-ref.html b/layout/reftests/bugs/428521-1-ref.html
new file mode 100644
index 0000000000..62050a45cb
--- /dev/null
+++ b/layout/reftests/bugs/428521-1-ref.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <style>
+ body { margin: 0; }
+ div.a, div.b { display: inline-block; }
+ div.a { width: 200px; background: blue; }
+ div.b { width: 200px; background: green; }
+ td.c { width: 75%; background: orange; }
+ div.d { width: 100px; background: purple; }
+ </style>
+</head>
+<body>
+The blue and green divs should be on the same line.
+<table cellspacing=0 cellpadding=0>
+ <tr><td>
+ <table cellspacing=0 cellpadding=0>
+ <tr>
+ <td colspan="2"><div class="a">a</div><div class="b">b</div></td>
+ </tr>
+ <tr>
+ <td class="c">c</td>
+ <td><div class="d">d</div></td>
+ </tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428521-1a.html b/layout/reftests/bugs/428521-1a.html
new file mode 100644
index 0000000000..615c412bc3
--- /dev/null
+++ b/layout/reftests/bugs/428521-1a.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <style>
+ body { margin: 0; }
+ div.a, div.b { display: inline-block; }
+ div.a { width: 200px; background: blue; }
+ div.b { width: 200px; background: green; }
+ td.c { width: 75.1%; background: orange; }
+ div.d { width: 100px; background: purple; }
+ </style>
+</head>
+<body>
+The blue and green divs should be on the same line.
+<table cellspacing=0 cellpadding=0>
+ <tr><td>
+ <table cellspacing=0 cellpadding=0>
+ <tr>
+ <td colspan="2"><div class="a">a</div><div class="b">b</div></td>
+ </tr>
+ <tr>
+ <td class="c">c</td>
+ <td><div class="d">d</div></td>
+ </tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428521-1b.html b/layout/reftests/bugs/428521-1b.html
new file mode 100644
index 0000000000..9f6a80f4db
--- /dev/null
+++ b/layout/reftests/bugs/428521-1b.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <style>
+ body { margin: 0; }
+ div.a, div.b { display: inline-block; }
+ div.a { width: 200px; background: blue; }
+ div.b { width: 200px; background: green; }
+ td.c { width: 80%; background: orange; }
+ div.d { width: 100px; background: purple; }
+ </style>
+</head>
+<body>
+The blue and green divs should be on the same line.
+<table cellspacing=0 cellpadding=0>
+ <tr><td>
+ <table cellspacing=0 cellpadding=0>
+ <tr>
+ <td colspan="2"><div class="a">a</div><div class="b">b</div></td>
+ </tr>
+ <tr>
+ <td class="c">c</td>
+ <td><div class="d">d</div></td>
+ </tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428521-1c.html b/layout/reftests/bugs/428521-1c.html
new file mode 100644
index 0000000000..6633fcc1ff
--- /dev/null
+++ b/layout/reftests/bugs/428521-1c.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <style>
+ body { margin: 0; }
+ div.a, div.b { display: inline-block; }
+ div.a { width: 200px; background: blue; }
+ div.b { width: 200px; background: green; }
+ td.c { width: 100%; background: orange; }
+ div.d { width: 100px; background: purple; }
+ </style>
+</head>
+<body>
+The blue and green divs should be on the same line.
+<table cellspacing=0 cellpadding=0>
+ <tr><td>
+ <table cellspacing=0 cellpadding=0>
+ <tr>
+ <td colspan="2"><div class="a">a</div><div class="b">b</div></td>
+ </tr>
+ <tr>
+ <td class="c">c</td>
+ <td><div class="d">d</div></td>
+ </tr>
+ </table>
+ </td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/428810-1-ltr-insets-ref.html b/layout/reftests/bugs/428810-1-ltr-insets-ref.html
new file mode 100644
index 0000000000..9cfce54a61
--- /dev/null
+++ b/layout/reftests/bugs/428810-1-ltr-insets-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-left: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1-ltr-ref.html b/layout/reftests/bugs/428810-1-ltr-ref.html
new file mode 100644
index 0000000000..a11dfcd1b5
--- /dev/null
+++ b/layout/reftests/bugs/428810-1-ltr-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-left: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1-rtl-insets-ref.html b/layout/reftests/bugs/428810-1-rtl-insets-ref.html
new file mode 100644
index 0000000000..f25bd2df80
--- /dev/null
+++ b/layout/reftests/bugs/428810-1-rtl-insets-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-right: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1-rtl-ref.html b/layout/reftests/bugs/428810-1-rtl-ref.html
new file mode 100644
index 0000000000..d28c519b95
--- /dev/null
+++ b/layout/reftests/bugs/428810-1-rtl-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-right: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1a-ltr-insets.html b/layout/reftests/bugs/428810-1a-ltr-insets.html
new file mode 100644
index 0000000000..d41ef5026b
--- /dev/null
+++ b/layout/reftests/bugs/428810-1a-ltr-insets.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1a-ltr.html b/layout/reftests/bugs/428810-1a-ltr.html
new file mode 100644
index 0000000000..ab2d0e4d3f
--- /dev/null
+++ b/layout/reftests/bugs/428810-1a-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1a-rtl-insets.html b/layout/reftests/bugs/428810-1a-rtl-insets.html
new file mode 100644
index 0000000000..4281f6d1d1
--- /dev/null
+++ b/layout/reftests/bugs/428810-1a-rtl-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1a-rtl.html b/layout/reftests/bugs/428810-1a-rtl.html
new file mode 100644
index 0000000000..46b91924b2
--- /dev/null
+++ b/layout/reftests/bugs/428810-1a-rtl.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-1b-ltr-insets.html b/layout/reftests/bugs/428810-1b-ltr-insets.html
new file mode 100644
index 0000000000..6b393c2611
--- /dev/null
+++ b/layout/reftests/bugs/428810-1b-ltr-insets.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1b-ltr.html b/layout/reftests/bugs/428810-1b-ltr.html
new file mode 100644
index 0000000000..cfd48a7f50
--- /dev/null
+++ b/layout/reftests/bugs/428810-1b-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1b-rtl-insets.html b/layout/reftests/bugs/428810-1b-rtl-insets.html
new file mode 100644
index 0000000000..ec2f3fd05a
--- /dev/null
+++ b/layout/reftests/bugs/428810-1b-rtl-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1b-rtl.html b/layout/reftests/bugs/428810-1b-rtl.html
new file mode 100644
index 0000000000..4a1930e11a
--- /dev/null
+++ b/layout/reftests/bugs/428810-1b-rtl.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1c-ltr-insets.html b/layout/reftests/bugs/428810-1c-ltr-insets.html
new file mode 100644
index 0000000000..b265eeddd8
--- /dev/null
+++ b/layout/reftests/bugs/428810-1c-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+
+</div>
+
diff --git a/layout/reftests/bugs/428810-1c-ltr.html b/layout/reftests/bugs/428810-1c-ltr.html
new file mode 100644
index 0000000000..a0a0901817
--- /dev/null
+++ b/layout/reftests/bugs/428810-1c-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+
+</div>
+
diff --git a/layout/reftests/bugs/428810-1c-rtl-insets.html b/layout/reftests/bugs/428810-1c-rtl-insets.html
new file mode 100644
index 0000000000..7e84f07c71
--- /dev/null
+++ b/layout/reftests/bugs/428810-1c-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+
+</div>
+
diff --git a/layout/reftests/bugs/428810-1c-rtl.html b/layout/reftests/bugs/428810-1c-rtl.html
new file mode 100644
index 0000000000..4e2fb12e72
--- /dev/null
+++ b/layout/reftests/bugs/428810-1c-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+
+</div>
+
diff --git a/layout/reftests/bugs/428810-1d-ltr-insets.html b/layout/reftests/bugs/428810-1d-ltr-insets.html
new file mode 100644
index 0000000000..868a8122e4
--- /dev/null
+++ b/layout/reftests/bugs/428810-1d-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1d-ltr.html b/layout/reftests/bugs/428810-1d-ltr.html
new file mode 100644
index 0000000000..a7b772b666
--- /dev/null
+++ b/layout/reftests/bugs/428810-1d-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1d-rtl-insets.html b/layout/reftests/bugs/428810-1d-rtl-insets.html
new file mode 100644
index 0000000000..2a8f5b9f75
--- /dev/null
+++ b/layout/reftests/bugs/428810-1d-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-1d-rtl.html b/layout/reftests/bugs/428810-1d-rtl.html
new file mode 100644
index 0000000000..1667a81667
--- /dev/null
+++ b/layout/reftests/bugs/428810-1d-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2-ltr-insets-ref.html b/layout/reftests/bugs/428810-2-ltr-insets-ref.html
new file mode 100644
index 0000000000..9cfce54a61
--- /dev/null
+++ b/layout/reftests/bugs/428810-2-ltr-insets-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-left: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2-ltr-ref.html b/layout/reftests/bugs/428810-2-ltr-ref.html
new file mode 100644
index 0000000000..a11dfcd1b5
--- /dev/null
+++ b/layout/reftests/bugs/428810-2-ltr-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-left: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2-rtl-insets-ref.html b/layout/reftests/bugs/428810-2-rtl-insets-ref.html
new file mode 100644
index 0000000000..f25bd2df80
--- /dev/null
+++ b/layout/reftests/bugs/428810-2-rtl-insets-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-right: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2-rtl-ref.html b/layout/reftests/bugs/428810-2-rtl-ref.html
new file mode 100644
index 0000000000..d28c519b95
--- /dev/null
+++ b/layout/reftests/bugs/428810-2-rtl-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 20px"></div>
+<div style="margin-right: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2a-ltr-insets.html b/layout/reftests/bugs/428810-2a-ltr-insets.html
new file mode 100644
index 0000000000..ebacad0df0
--- /dev/null
+++ b/layout/reftests/bugs/428810-2a-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2a-ltr.html b/layout/reftests/bugs/428810-2a-ltr.html
new file mode 100644
index 0000000000..0e6259844d
--- /dev/null
+++ b/layout/reftests/bugs/428810-2a-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2a-rtl-insets.html b/layout/reftests/bugs/428810-2a-rtl-insets.html
new file mode 100644
index 0000000000..e66983ab56
--- /dev/null
+++ b/layout/reftests/bugs/428810-2a-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2a-rtl.html b/layout/reftests/bugs/428810-2a-rtl.html
new file mode 100644
index 0000000000..1024f0954b
--- /dev/null
+++ b/layout/reftests/bugs/428810-2a-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-2b-ltr-insets.html b/layout/reftests/bugs/428810-2b-ltr-insets.html
new file mode 100644
index 0000000000..826d313951
--- /dev/null
+++ b/layout/reftests/bugs/428810-2b-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2b-ltr.html b/layout/reftests/bugs/428810-2b-ltr.html
new file mode 100644
index 0000000000..d268362387
--- /dev/null
+++ b/layout/reftests/bugs/428810-2b-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2b-rtl-insets.html b/layout/reftests/bugs/428810-2b-rtl-insets.html
new file mode 100644
index 0000000000..26ae943c58
--- /dev/null
+++ b/layout/reftests/bugs/428810-2b-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2b-rtl.html b/layout/reftests/bugs/428810-2b-rtl.html
new file mode 100644
index 0000000000..45672915d5
--- /dev/null
+++ b/layout/reftests/bugs/428810-2b-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2e-ltr-insets.html b/layout/reftests/bugs/428810-2e-ltr-insets.html
new file mode 100644
index 0000000000..109a2fcbb5
--- /dev/null
+++ b/layout/reftests/bugs/428810-2e-ltr-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ <div style="clear:left"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2e-ltr.html b/layout/reftests/bugs/428810-2e-ltr.html
new file mode 100644
index 0000000000..d9f5be94a8
--- /dev/null
+++ b/layout/reftests/bugs/428810-2e-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 15px"></div>
+ <div style="clear:left"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2e-rtl-insets.html b/layout/reftests/bugs/428810-2e-rtl-insets.html
new file mode 100644
index 0000000000..e9844d256a
--- /dev/null
+++ b/layout/reftests/bugs/428810-2e-rtl-insets.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ <div style="clear:right"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2e-rtl.html b/layout/reftests/bugs/428810-2e-rtl.html
new file mode 100644
index 0000000000..df9840eda0
--- /dev/null
+++ b/layout/reftests/bugs/428810-2e-rtl.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 15px"></div>
+ <div style="clear:right"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2f-ltr-insets.html b/layout/reftests/bugs/428810-2f-ltr-insets.html
new file mode 100644
index 0000000000..914bfa7cb9
--- /dev/null
+++ b/layout/reftests/bugs/428810-2f-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 15px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2f-ltr.html b/layout/reftests/bugs/428810-2f-ltr.html
new file mode 100644
index 0000000000..12927e933b
--- /dev/null
+++ b/layout/reftests/bugs/428810-2f-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 15px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2f-rtl-insets.html b/layout/reftests/bugs/428810-2f-rtl-insets.html
new file mode 100644
index 0000000000..3c757050e8
--- /dev/null
+++ b/layout/reftests/bugs/428810-2f-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 15px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-2f-rtl.html b/layout/reftests/bugs/428810-2f-rtl.html
new file mode 100644
index 0000000000..0b9332fc92
--- /dev/null
+++ b/layout/reftests/bugs/428810-2f-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 15px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3-ltr-insets-ref.html b/layout/reftests/bugs/428810-3-ltr-insets-ref.html
new file mode 100644
index 0000000000..0e75c7c878
--- /dev/null
+++ b/layout/reftests/bugs/428810-3-ltr-insets-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 40px"></div>
+<div style="margin-left: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3-ltr-ref.html b/layout/reftests/bugs/428810-3-ltr-ref.html
new file mode 100644
index 0000000000..27eb602206
--- /dev/null
+++ b/layout/reftests/bugs/428810-3-ltr-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 40px"></div>
+<div style="margin-left: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3-rtl-insets-ref.html b/layout/reftests/bugs/428810-3-rtl-insets-ref.html
new file mode 100644
index 0000000000..09dff236b3
--- /dev/null
+++ b/layout/reftests/bugs/428810-3-rtl-insets-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 40px"></div>
+<div style="margin-right: 32px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3-rtl-ref.html b/layout/reftests/bugs/428810-3-rtl-ref.html
new file mode 100644
index 0000000000..539e4e252e
--- /dev/null
+++ b/layout/reftests/bugs/428810-3-rtl-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 40px"></div>
+<div style="margin-right: 40px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3a-ltr-insets.html b/layout/reftests/bugs/428810-3a-ltr-insets.html
new file mode 100644
index 0000000000..8086d7a734
--- /dev/null
+++ b/layout/reftests/bugs/428810-3a-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3a-ltr.html b/layout/reftests/bugs/428810-3a-ltr.html
new file mode 100644
index 0000000000..c3a1d4d816
--- /dev/null
+++ b/layout/reftests/bugs/428810-3a-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3a-rtl-insets.html b/layout/reftests/bugs/428810-3a-rtl-insets.html
new file mode 100644
index 0000000000..256b24c66b
--- /dev/null
+++ b/layout/reftests/bugs/428810-3a-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3a-rtl.html b/layout/reftests/bugs/428810-3a-rtl.html
new file mode 100644
index 0000000000..5cc8f72d56
--- /dev/null
+++ b/layout/reftests/bugs/428810-3a-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-3b-ltr-insets.html b/layout/reftests/bugs/428810-3b-ltr-insets.html
new file mode 100644
index 0000000000..a806be0f63
--- /dev/null
+++ b/layout/reftests/bugs/428810-3b-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3b-ltr.html b/layout/reftests/bugs/428810-3b-ltr.html
new file mode 100644
index 0000000000..1b40b63262
--- /dev/null
+++ b/layout/reftests/bugs/428810-3b-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3b-rtl-insets.html b/layout/reftests/bugs/428810-3b-rtl-insets.html
new file mode 100644
index 0000000000..af37e4dc00
--- /dev/null
+++ b/layout/reftests/bugs/428810-3b-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3b-rtl.html b/layout/reftests/bugs/428810-3b-rtl.html
new file mode 100644
index 0000000000..14077bc2d1
--- /dev/null
+++ b/layout/reftests/bugs/428810-3b-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3e-ltr-insets.html b/layout/reftests/bugs/428810-3e-ltr-insets.html
new file mode 100644
index 0000000000..a563a09045
--- /dev/null
+++ b/layout/reftests/bugs/428810-3e-ltr-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ <div style="clear:left"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3e-ltr.html b/layout/reftests/bugs/428810-3e-ltr.html
new file mode 100644
index 0000000000..c37d8b2232
--- /dev/null
+++ b/layout/reftests/bugs/428810-3e-ltr.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 60px"></div>
+ <div style="clear:left"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3e-rtl-insets.html b/layout/reftests/bugs/428810-3e-rtl-insets.html
new file mode 100644
index 0000000000..29b78c2716
--- /dev/null
+++ b/layout/reftests/bugs/428810-3e-rtl-insets.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ <div style="clear:right"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3e-rtl.html b/layout/reftests/bugs/428810-3e-rtl.html
new file mode 100644
index 0000000000..42099b828a
--- /dev/null
+++ b/layout/reftests/bugs/428810-3e-rtl.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 60px"></div>
+ <div style="clear:right"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3f-ltr-insets.html b/layout/reftests/bugs/428810-3f-ltr-insets.html
new file mode 100644
index 0000000000..3d49cf50c5
--- /dev/null
+++ b/layout/reftests/bugs/428810-3f-ltr-insets.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: left; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 1px 32px 32px; border: medium solid transparent; border-width: 2px 2px 16px 16px; padding: 4px 4px 8px 8px">
+ <div style="float: left; height: 20px; width: 60px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3f-ltr.html b/layout/reftests/bugs/428810-3f-ltr.html
new file mode 100644
index 0000000000..04412001b4
--- /dev/null
+++ b/layout/reftests/bugs/428810-3f-ltr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: left; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-left: 40px; width: 70px; display: list-item;">
+ <div style="float: left; height: 20px; width: 60px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3f-rtl-insets.html b/layout/reftests/bugs/428810-3f-rtl-insets.html
new file mode 100644
index 0000000000..741b3f114e
--- /dev/null
+++ b/layout/reftests/bugs/428810-3f-rtl-insets.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 6px">
+ <div style="float: right; height: 20px; width: 116px"></div>
+</div>
+<div style="width: 70px; display: list-item; margin: 1px 32px 32px 1px; border: medium solid transparent; border-width: 2px 16px 16px 2px; padding: 4px 8px 8px 4px">
+ <div style="float: right; height: 20px; width: 60px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-3f-rtl.html b/layout/reftests/bugs/428810-3f-rtl.html
new file mode 100644
index 0000000000..530100c104
--- /dev/null
+++ b/layout/reftests/bugs/428810-3f-rtl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px">
+ <div style="float: right; height: 20px; width: 100px"></div>
+</div>
+<div style="margin-right: 40px; width: 70px; display: list-item;">
+ <div style="float: right; height: 20px; width: 60px"></div>
+</div>
+
diff --git a/layout/reftests/bugs/428810-empty-ltr-insets-ref.html b/layout/reftests/bugs/428810-empty-ltr-insets-ref.html
new file mode 100644
index 0000000000..eb99b74bd6
--- /dev/null
+++ b/layout/reftests/bugs/428810-empty-ltr-insets-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 13px"></div>
+<div style="margin-left: 92px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-empty-ltr-ref.html b/layout/reftests/bugs/428810-empty-ltr-ref.html
new file mode 100644
index 0000000000..0f91fd0b0f
--- /dev/null
+++ b/layout/reftests/bugs/428810-empty-ltr-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px"></div>
+<div style="margin-left: 100px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-empty-rtl-insets-ref.html b/layout/reftests/bugs/428810-empty-rtl-insets-ref.html
new file mode 100644
index 0000000000..bc36e6a9bc
--- /dev/null
+++ b/layout/reftests/bugs/428810-empty-rtl-insets-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 13px"></div>
+<div style="margin-right: 92px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/428810-empty-rtl-ref.html b/layout/reftests/bugs/428810-empty-rtl-ref.html
new file mode 100644
index 0000000000..2e6021c6ff
--- /dev/null
+++ b/layout/reftests/bugs/428810-empty-rtl-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+<title>Testcase, bug 428810</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+::marker { font-family: inherit; }
+</style>
+<div style="height: 10px"></div>
+<div style="margin-right: 100px; display: list-item;">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+
diff --git a/layout/reftests/bugs/430412-1-ref.html b/layout/reftests/bugs/430412-1-ref.html
new file mode 100644
index 0000000000..d889cbd2d5
--- /dev/null
+++ b/layout/reftests/bugs/430412-1-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+ body > div { width:200px; height:50px; border:1px solid black; margin-bottom:2em; }
+ body > div > div { height:10px; background:yellow; }
+</style>
+</head>
+<body>
+
+ <div style="overflow-x:hidden;">
+ <div style="width:200px;"></div>
+ </div>
+
+ <div style="overflow-x:scroll;">
+ <div style="width:201px;"></div>
+ </div>
+
+ <div style="direction:rtl; overflow-x:hidden;">
+ <div style="width:200px;"></div>
+ </div>
+
+ <div style="direction:rtl; overflow-x:scroll;">
+ <div style="width:201px;"></div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/430412-1.html b/layout/reftests/bugs/430412-1.html
new file mode 100644
index 0000000000..03e4727c53
--- /dev/null
+++ b/layout/reftests/bugs/430412-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+ body > div { width:200px; height:50px; overflow:auto; border:1px solid black; margin-bottom:2em; }
+ body > div > div { height:10px; background:yellow; }
+</style>
+</head>
+<body>
+
+ <div>
+ <div style="width:200.1px;"></div>
+ </div>
+
+ <div>
+ <div style="width:201px;"></div>
+ </div>
+
+ <div style="direction:rtl;">
+ <div style="width:200.1px;"></div>
+ </div>
+
+ <div style="direction:rtl;">
+ <div style="width:201px;"></div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/430813-1-ref.html b/layout/reftests/bugs/430813-1-ref.html
new file mode 100644
index 0000000000..1c9c1705e8
--- /dev/null
+++ b/layout/reftests/bugs/430813-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Testcase, bug 430813</title>
+ <style type="text/css">
+ table, td { border-spacing: 0; margin: 0; padding: 0; }
+ td { background: aqua; }
+ </style>
+</head>
+<body style="border: 1px solid; width: 500px; height: 600px;">
+<table style="margin-right: 50px"><tr><td>
+This should be near the top of the page, not 200px down.
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+</td></tr></table>
+</body></html>
diff --git a/layout/reftests/bugs/430813-1.html b/layout/reftests/bugs/430813-1.html
new file mode 100644
index 0000000000..3a4705bf7f
--- /dev/null
+++ b/layout/reftests/bugs/430813-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Testcase, bug 430813</title>
+ <style type="text/css">
+ table, td { border-spacing: 0; margin: 0; padding: 0; }
+ td { background: aqua; }
+ </style>
+</head>
+<body style="border: 1px solid; width: 500px; height: 600px;">
+<div style="float:right;height:200px;width:50px"></div>
+<table style="margin-right: 10px"><tr><td>
+This should be near the top of the page, not 200px down.
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+</td></tr></table>
+</body></html>
diff --git a/layout/reftests/bugs/430813-2-ref.html b/layout/reftests/bugs/430813-2-ref.html
new file mode 100644
index 0000000000..bf4f276a18
--- /dev/null
+++ b/layout/reftests/bugs/430813-2-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Testcase, bug 430813</title>
+ <style type="text/css">
+ table, td { border-spacing: 0; margin: 0; padding: 0; }
+ td { background: aqua; }
+ </style>
+</head>
+<body style="border: 1px solid; width: 500px; height: 600px;">
+<table style="margin-left: 50px; margin-right: 10px"><tr><td>
+This should be near the top of the page, not 200px down.
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+</td></tr></table>
+</body></html>
diff --git a/layout/reftests/bugs/430813-2.html b/layout/reftests/bugs/430813-2.html
new file mode 100644
index 0000000000..1443329f32
--- /dev/null
+++ b/layout/reftests/bugs/430813-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Testcase, bug 430813</title>
+ <style type="text/css">
+ table, td { border-spacing: 0; margin: 0; padding: 0; }
+ td { background: aqua; }
+ </style>
+</head>
+<body style="border: 1px solid; width: 500px; height: 600px;">
+<div style="float:left;height:200px;width:50px"></div>
+<table style="margin-right: 10px"><tr><td>
+This should be near the top of the page, not 200px down.
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
+</td></tr></table>
+</body></html>
diff --git a/layout/reftests/bugs/430813-3-ref.html b/layout/reftests/bugs/430813-3-ref.html
new file mode 100644
index 0000000000..52706c614f
--- /dev/null
+++ b/layout/reftests/bugs/430813-3-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Testcase, bug 430813</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<div style="margin-bottom: 1px">text</div>
+<div style="float:left;width:90px;height:300px"></div>
+<div style="margin-left:90px; font-size: 16px;">
+<span style="padding:0.2em;">This text should be near the top of the page, not pushed below the float.</span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/430813-3.html b/layout/reftests/bugs/430813-3.html
new file mode 100644
index 0000000000..ed58d3d27a
--- /dev/null
+++ b/layout/reftests/bugs/430813-3.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Testcase, bug 430813</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<div style="margin-bottom: 1px">text</div>
+<div style="float:left;width:90px;height:300px"></div>
+<div style="overflow:hidden; font-size: 16px;">
+<!-- restrict size to prevent wrap, can lead to antialiasing problem in the test -->
+<span style="padding:0.2em;">This text should be near the top of the page, not pushed below the float.</span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/431341-1-ref.html b/layout/reftests/bugs/431341-1-ref.html
new file mode 100644
index 0000000000..b70e7bd5f3
--- /dev/null
+++ b/layout/reftests/bugs/431341-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p::first-letter { font-size:200%; float:left; }
+</style>
+</head>
+<body>
+<p>Hello Kitty
+<p>"Hello Kitty"
+</body>
+</html>
diff --git a/layout/reftests/bugs/431341-1.html b/layout/reftests/bugs/431341-1.html
new file mode 100644
index 0000000000..44b80657e0
--- /dev/null
+++ b/layout/reftests/bugs/431341-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+p { text-transform:capitalize; }
+p::first-letter { font-size:200%; float:left; }
+</style>
+</head>
+<body>
+<p>hello kitty
+<p>"hello kitty"
+</body>
+</html>
diff --git a/layout/reftests/bugs/431341-2-ref.html b/layout/reftests/bugs/431341-2-ref.html
new file mode 100644
index 0000000000..5fa3d7e220
--- /dev/null
+++ b/layout/reftests/bugs/431341-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body { font-family:DejaVu Sans; font-size:100px; }
+p::first-letter { float:left; }
+</style>
+</head>
+<body>
+<p>f&#8204;ish fish f&#8204;ish
+</body>
+</html>
diff --git a/layout/reftests/bugs/431341-2.html b/layout/reftests/bugs/431341-2.html
new file mode 100644
index 0000000000..96377592b2
--- /dev/null
+++ b/layout/reftests/bugs/431341-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body { font-family:DejaVu Sans; font-size:100px; }
+p::first-letter { float:left; }
+</style>
+</head>
+<body>
+<p>fish fish f&#8204;ish
+</body>
+</html>
diff --git a/layout/reftests/bugs/431520-1-ref.html b/layout/reftests/bugs/431520-1-ref.html
new file mode 100644
index 0000000000..bda6bb3393
--- /dev/null
+++ b/layout/reftests/bugs/431520-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+<title>Testcase, bug 431520</title>
+<body>
+<fieldset><legend>Legend</legend>contents of fieldset</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/431520-1.html b/layout/reftests/bugs/431520-1.html
new file mode 100644
index 0000000000..1a7df88f4e
--- /dev/null
+++ b/layout/reftests/bugs/431520-1.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title>Testcase, bug 431520</title>
+<style type="text/css">
+fieldset:first-line { color: red }
+</style>
+<body>
+<fieldset><legend>Legend</legend>contents of fieldset</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/431948-1-ref.html b/layout/reftests/bugs/431948-1-ref.html
new file mode 100644
index 0000000000..4d44e12108
--- /dev/null
+++ b/layout/reftests/bugs/431948-1-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<style>
+span {
+ width: 50px; height: 50px; margin: 5px;
+ display: inline-block; background-color: green;
+}
+</style>
+<span id="a"></span>
+<span id="b"></span>
+<span id="c"></span>
+<span id="d"></span>
+<span id="e"></span>
diff --git a/layout/reftests/bugs/431948-1.html b/layout/reftests/bugs/431948-1.html
new file mode 100644
index 0000000000..33a31048ff
--- /dev/null
+++ b/layout/reftests/bugs/431948-1.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<style>
+span {
+ width: 50px; height: 50px; margin: 5px;
+ display: inline-block; background-color: red;
+}
+
+/* A semicolon at the top level of a @media block should not cause the
+ whole @media block to be invalidated; in particular, valid rules
+ either before or after it should not be discarded. */
+@media screen {
+ #a { background-color: green }
+ ;
+}
+@media screen {
+ #b { background-color: green }
+ #c { background-color: green }
+}
+
+/* A stray close curly brace in the middle of a selector should not
+ be treated as a resynchronization point, however. */
+#d { background-color: green }
+badselector( } #d { background-color:red } ) {}
+#e { background-color:green }
+
+</style>
+<span id="a"></span>
+<span id="b"></span>
+<span id="c"></span>
+<span id="d"></span>
+<span id="e"></span>
diff --git a/layout/reftests/bugs/433640-1-ref.html b/layout/reftests/bugs/433640-1-ref.html
new file mode 100644
index 0000000000..697eb58255
--- /dev/null
+++ b/layout/reftests/bugs/433640-1-ref.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html><head>
+<style type="text/css">
+ div.image {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAQMAAACQp+OdAAAABlBMVEUAAAD///+l2Z/dAAAAGElEQVR42mNggIHcbbfBCMEYlRqVIiQFAPco1xfL/SakAAAAAElFTkSuQmCC");
+ width: 32px;
+ height: 32px;
+ }
+
+ div.cell {
+ float: left;
+ width: 100px;
+ }
+
+ body > div { height:100px; }
+
+ p { font-size: 12px; height:20px; }
+</style>
+</head><body>
+
+<div>
+<div class="cell"><p>31 x 32</p><div style="width:31px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>31.1 x 32</p><div style="width:31px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>31.5 x 32</p><div style="width:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>31.8 x 32</p><div style="width:32px; background-position:-16px -16px;" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 32</p><div style="width:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32.1 x 32</p><div style="width:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32.5 x 32</p><div style="width:33px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32.8 x 32</p><div style="width:33px; background-position:-16px -16px;" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 31 </p><div style="height:31px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 31.1 </p><div style="height:31px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 31.5 </p><div style="height:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 31.8 </p><div style="height:32px; background-position:-16px -16px;" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 32 </p><div style="height:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 32.1 </p><div style="height:32px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 32.5 </p><div style="height:33px; background-position:-16px -16px;" class="image"></div></div>
+<div class="cell"><p>32 x 32.8 </p><div style="height:33px; background-position:-16px -16px;" class="image"></div></div>
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/433640-1.html b/layout/reftests/bugs/433640-1.html
new file mode 100644
index 0000000000..2dbb26cfa0
--- /dev/null
+++ b/layout/reftests/bugs/433640-1.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html><head>
+<style type="text/css">
+ div.image {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAQMAAACQp+OdAAAABlBMVEUAAAD///+l2Z/dAAAAGElEQVR42mNggIHcbbfBCMEYlRqVIiQFAPco1xfL/SakAAAAAElFTkSuQmCC");
+ background-position: center center;
+ width: 32px;
+ height: 32px;
+ }
+
+ div.cell {
+ float: left;
+ width: 100px;
+ }
+
+ body > div { height:100px; }
+
+ /* ensure that font heights do not affect image placement. Fractional image offsets can
+ affect exactly which pixel rects get painted. */
+ p { font-size: 12px; height:20px; }
+</style>
+</head><body>
+
+<div>
+<div class="cell"><p>31 x 32</p><div style="width:31px" class="image"></div></div>
+<div class="cell"><p>31.1 x 32</p><div style="width:31.1px" class="image"></div></div>
+<div class="cell"><p>31.5 x 32</p><div style="width:31.5px" class="image"></div></div>
+<div class="cell"><p>31.8 x 32</p><div style="width:31.8px" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 32</p><div style="width:32px" class="image"></div></div>
+<div class="cell"><p>32.1 x 32</p><div style="width:32.1px" class="image"></div></div>
+<div class="cell"><p>32.5 x 32</p><div style="width:32.5px" class="image"></div></div>
+<div class="cell"><p>32.8 x 32</p><div style="width:32.8px" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 31 </p><div style="height:31px" class="image"></div></div>
+<div class="cell"><p>32 x 31.1 </p><div style="height:31.1px" class="image"></div></div>
+<div class="cell"><p>32 x 31.5 </p><div style="height:31.5px" class="image"></div></div>
+<div class="cell"><p>32 x 31.8 </p><div style="height:31.8px" class="image"></div></div>
+</div>
+
+<div>
+<div class="cell"><p>32 x 32 </p><div style="height:32px" class="image"></div></div>
+<div class="cell"><p>32 x 32.1 </p><div style="height:32.1px" class="image"></div></div>
+<div class="cell"><p>32 x 32.5 </p><div style="height:32.5px" class="image"></div></div>
+<div class="cell"><p>32 x 32.8 </p><div style="height:32.8px" class="image"></div></div>
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/433700-ref.html b/layout/reftests/bugs/433700-ref.html
new file mode 100644
index 0000000000..20b6eb3243
--- /dev/null
+++ b/layout/reftests/bugs/433700-ref.html
@@ -0,0 +1,95 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 433700</title>
+ <style type="text/css">
+
+body { font-family: sans-serif; font-size: 16px; }
+
+fieldset,legend { padding:0; margin:0; border-width:0; border-style:solid; }
+fieldset { border-right:7px solid blue; font-size: 16px; }
+
+#test1 { position:fixed; }
+#test1 fieldset { background:lime;}
+#test1 .legend { margin-left:30px; background:pink; }
+
+#test2 { position:fixed; top:3em; }
+#test2 fieldset { background:lime; width:260px; }
+#test2 .legend { margin-left: 20px; background:pink; }
+
+#test3 { position:fixed; top:6em; width:200px; }
+#test3 fieldset { background:lime;}
+#test3 .legend { margin-left: 80px; background:pink; }
+
+#test4 { position:fixed; top:9em; width:200px; }
+#test4 fieldset { background:lime; width:260px; }
+#test4 .legend { margin-left: 80px; background:pink; }
+
+#test5 { position:fixed; top:12em; width:200px; }
+#test5 fieldset { background:lime;}
+/* Percentage margins don't get counted in intrinsic width, so make sure that
+ our fixed-size margins sum to 0, so they also do not affect intrinsic width
+ either. */
+#test5 .legend { margin-left: 193px; background:pink; margin-right: -193px; }
+
+#test6 { position:fixed; left:20px; top:15em; width:400px; }
+#test6 fieldset { width:300px; }
+#test6 fieldset div { position:relative; left:100px; padding-left:0px; width:200px; background:lime; }
+#test6 legend { margin-left:0; background:pink; }
+
+fieldset div { padding-left:60px; }
+
+.legend { display:block; }
+
+ </style>
+</head>
+<body>
+
+<div id="test1">
+<fieldset>
+<legend><span class="legend">LEGEND</span></legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test2">
+<fieldset>
+<legend><span class="legend">LEGEND</span></legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test3">
+<fieldset>
+<legend><span class="legend">LEGEND</span></legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test4">
+<fieldset>
+<legend><span class="legend">LEGEND</span></legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test5">
+<fieldset>
+<legend><span class="legend">LEGEND</span></legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test6">
+<fieldset>
+<legend>LEGEND</legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/433700.html b/layout/reftests/bugs/433700.html
new file mode 100644
index 0000000000..e369dd994f
--- /dev/null
+++ b/layout/reftests/bugs/433700.html
@@ -0,0 +1,88 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 433700</title>
+ <style type="text/css">
+
+body { font-family: sans-serif; font-size: 16px; }
+
+fieldset,legend { padding:0; margin:0; border-width:0; border-style:solid; }
+fieldset { border-right:7px solid blue; font-size: 16px; }
+
+#test1 { position:fixed; }
+#test1 fieldset { padding-left:35px; border-left:25px solid lime; background:lime; }
+#test1 legend { margin-left: -30px; background:pink; }
+
+#test2 { position:fixed; top:3em; }
+#test2 fieldset { padding-left:35px; border-left:25px solid lime; background:lime; width:200px; }
+#test2 legend { margin-left: -20%; background:pink; }
+
+#test3 { position:fixed; top:6em; width:200px; }
+#test3 fieldset { padding-left:35px; border-left:25px solid lime; background:lime; }
+#test3 legend { margin-left: 20px; background:pink; }
+
+#test4 { position:fixed; top:9em; width:200px; }
+#test4 fieldset { padding-left:35px; border-left:25px solid lime; background:lime; width:200px; }
+#test4 legend { margin-left: 10%; background:pink; }
+
+#test5 { position:fixed; top:12em; width:200px; }
+#test5 fieldset { padding-left:35px; border-left:25px solid lime; background:lime; }
+#test5 legend { margin-left: 100%; background:pink; }
+
+#test6 { position:fixed; left:60px; top:15em; width:200px; }
+#test6 fieldset { padding-left:35px; border-left:25px solid white; }
+#test6 fieldset div { width:200px; background:lime; }
+#test6 legend { margin-left: -50%; background:pink; }
+
+ </style>
+</head>
+<body>
+
+<div id="test1">
+<fieldset>
+<legend>LEGEND</legend>
+FIELDSET
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test2">
+<fieldset>
+<legend>LEGEND</legend>
+FIELDSET
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test3">
+<fieldset>
+<legend>LEGEND</legend>
+FIELDSET
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test4">
+<fieldset>
+<legend>LEGEND</legend>
+FIELDSET
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test5">
+<fieldset>
+<legend>LEGEND</legend>
+FIELDSET
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+<div id="test6">
+<fieldset>
+<legend>LEGEND</legend>
+<div>FIELDSET</div>
+<script>var v = document.body.offsetHeight;</script>
+</fieldset>
+</div>
+
+</body></html>
diff --git a/layout/reftests/bugs/436356-1-ref.html b/layout/reftests/bugs/436356-1-ref.html
new file mode 100644
index 0000000000..f7d49bfdb4
--- /dev/null
+++ b/layout/reftests/bugs/436356-1-ref.html
@@ -0,0 +1 @@
+<html><body><center><ul><li><p>Test</p></li></ul></center></body></html>
diff --git a/layout/reftests/bugs/436356-1.html b/layout/reftests/bugs/436356-1.html
new file mode 100644
index 0000000000..115b918481
--- /dev/null
+++ b/layout/reftests/bugs/436356-1.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+<center>
+<ul>
+<li>
+<p>
+Test
+</p>
+</li>
+</ul>
+</center>
+</body>
+</html>
diff --git a/layout/reftests/bugs/436356-2-ref.html b/layout/reftests/bugs/436356-2-ref.html
new file mode 100644
index 0000000000..2b7b2b72b2
--- /dev/null
+++ b/layout/reftests/bugs/436356-2-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<html><body><center><ul><li><p>Test</p></li></ul></center></body></html>
diff --git a/layout/reftests/bugs/436356-2.html b/layout/reftests/bugs/436356-2.html
new file mode 100644
index 0000000000..d4877f0022
--- /dev/null
+++ b/layout/reftests/bugs/436356-2.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+<center>
+<ul>
+<li>
+<p>
+Test
+</p>
+</li>
+</ul>
+</center>
+</body>
+</html>
diff --git a/layout/reftests/bugs/438537-1-ref.html b/layout/reftests/bugs/438537-1-ref.html
new file mode 100644
index 0000000000..f5aff5e418
--- /dev/null
+++ b/layout/reftests/bugs/438537-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Testcase, bug 438537</title>
+ </head>
+ <body>
+ <div style="height:40px;border:solid 2px black;border-radius: 8px;overflow:hidden">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/438537-1.html b/layout/reftests/bugs/438537-1.html
new file mode 100644
index 0000000000..641e0a6521
--- /dev/null
+++ b/layout/reftests/bugs/438537-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>Testcase, bug 438537</title>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var div = document.getElementById("div");
+ div.style.height = "40px";
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body>
+ <div id="div" style="height:20px;border:solid 2px black;border-radius: 8px;overflow:hidden">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/438981-1.xhtml b/layout/reftests/bugs/438981-1.xhtml
new file mode 100644
index 0000000000..d6eba7fce9
--- /dev/null
+++ b/layout/reftests/bugs/438981-1.xhtml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body id="realbody">
+</body>
+<body style="background:blue;">
+</body>
+<script>
+if (document.body != document.getElementById("realbody")) {
+ document.body.appendChild(document.createTextNode("FAIL"));
+}
+</script>
+</html>
diff --git a/layout/reftests/bugs/438987-1-ref.html b/layout/reftests/bugs/438987-1-ref.html
new file mode 100644
index 0000000000..5c607bb637
--- /dev/null
+++ b/layout/reftests/bugs/438987-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html style="background:yellow;">
+<body style="margin:0">
+The yellow table background should be propagated to the viewport.
+</body>
+</html>
diff --git a/layout/reftests/bugs/438987-1.html b/layout/reftests/bugs/438987-1.html
new file mode 100644
index 0000000000..161a85947b
--- /dev/null
+++ b/layout/reftests/bugs/438987-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<!-- check that the background of a root table element propagates to the viewport -->
+<html style="display:table; background:yellow;">
+<body style="margin:0">
+The yellow table background should be propagated to the viewport.
+</body>
+</html>
diff --git a/layout/reftests/bugs/438987-2-ref.html b/layout/reftests/bugs/438987-2-ref.html
new file mode 100644
index 0000000000..4606a9635d
--- /dev/null
+++ b/layout/reftests/bugs/438987-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background:rgba(0,0,255,0.5); position:fixed; top:0; left:0; right:0; bottom:0;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/438987-2a.html b/layout/reftests/bugs/438987-2a.html
new file mode 100644
index 0000000000..574bffba2a
--- /dev/null
+++ b/layout/reftests/bugs/438987-2a.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:rgba(0,0,255,0.5);">
+</body>
+</html>
diff --git a/layout/reftests/bugs/438987-2b.html b/layout/reftests/bugs/438987-2b.html
new file mode 100644
index 0000000000..82928102b7
--- /dev/null
+++ b/layout/reftests/bugs/438987-2b.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="background:rgba(0,0,255,0.5);">
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/438987-2c.html b/layout/reftests/bugs/438987-2c.html
new file mode 100644
index 0000000000..4a31b44a2d
--- /dev/null
+++ b/layout/reftests/bugs/438987-2c.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="background:rgba(0,0,255,0.5);">
+<body style="background:red;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/439004-1-ref.html b/layout/reftests/bugs/439004-1-ref.html
new file mode 100644
index 0000000000..c466a95177
--- /dev/null
+++ b/layout/reftests/bugs/439004-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+&nbsp;Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/439004-1.html b/layout/reftests/bugs/439004-1.html
new file mode 100644
index 0000000000..c6574dd96c
--- /dev/null
+++ b/layout/reftests/bugs/439004-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img src="mozilla-banner.gif" style="width:0"> Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/439639-1-ref.html b/layout/reftests/bugs/439639-1-ref.html
new file mode 100644
index 0000000000..1218316084
--- /dev/null
+++ b/layout/reftests/bugs/439639-1-ref.html
@@ -0,0 +1,25 @@
+<html>
+
+<!-- This bug is quirksmode only -->
+<head>
+
+
+<title>Table Test</title>
+
+</head>
+<body>
+<div style="height:200px; background:gold">
+
+<table>
+
+ <tbody style="height:100px; background:silver">
+
+ <tr><td><a href='#' id="target"> click me (should not move me) </a></td></tr>
+
+ </tbody>
+
+</table>
+
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/439639-1.html b/layout/reftests/bugs/439639-1.html
new file mode 100644
index 0000000000..95071d3264
--- /dev/null
+++ b/layout/reftests/bugs/439639-1.html
@@ -0,0 +1,33 @@
+<html>
+
+<!-- This bug is quirksmode only -->
+<head>
+<script>
+function doTest() {
+ var t1=document.getElementById("target");
+ t1.style.paddingTop="4px";
+ var b = document.body.offsetHeight;
+ t1.style.paddingTop="0px";
+}
+</script>
+
+
+<title>Table Test</title>
+
+</head>
+<body onload="doTest();">
+<div style="height:200px; background:gold">
+
+<table>
+
+ <tbody style="height:100px; background:silver">
+
+ <tr><td><a href='#' id="target"> click me (should not move me) </a></td></tr>
+
+ </tbody>
+
+</table>
+
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/439910-ref.html b/layout/reftests/bugs/439910-ref.html
new file mode 100644
index 0000000000..4eaf68ef48
--- /dev/null
+++ b/layout/reftests/bugs/439910-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Letter spacing with surrogate characters</title>
+ <style type="text/css">
+ span { padding-right: 10px; }
+ </style>
+ </head>
+ <body>
+ <!-- ASCII for sanity check -->
+ <p><span>A</span><span>A</span><span>A</span><span>A</span><span>A</span><span>A</span></p>
+ <!-- SMP Characters, MATHEMATICAL BOLD CAPITAL A. It will probably appear as hexboxes, but that doesn't matter -->
+ <p><span>&#x1d400;</span><span>&#x1d400;</span><span>&#x1d400;</span><span>&#x1d400;</span><span>&#x1d400;</span><span>&#x1d400;</span></p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/439910.html b/layout/reftests/bugs/439910.html
new file mode 100644
index 0000000000..10fbb8ea3a
--- /dev/null
+++ b/layout/reftests/bugs/439910.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Letter spacing with surrogate characters</title>
+ <style type="text/css">
+ p { letter-spacing: 10px; }
+ </style>
+ </head>
+ <body>
+ <!-- ASCII for sanity check -->
+ <p>AAAAAA</p>
+ <!-- SMP Characters, MATHEMATICAL BOLD CAPITAL A. It will probably appear as hexboxes, but that doesn't matter -->
+ <p>&#x1d400;&#x1d400;&#x1d400;&#x1d400;&#x1d400;&#x1d400;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/440112-ref.html b/layout/reftests/bugs/440112-ref.html
new file mode 100644
index 0000000000..b5a12d63d3
--- /dev/null
+++ b/layout/reftests/bugs/440112-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html;charset=utf-8">
+
+<title>Bug 440112</title>
+</head>
+<body>
+<body style="background-color: orange">
+ <div id="wrapper" style="position: absolute; top: 30px; left: 30px; height: 150px;">
+ <form>
+
+ <textarea id="formElement" style="width: 200px; height: 50px;">
+</textarea>
+ </form>
+ </div>
+ <div style="background-color: orange; height: 150px; width: 120px; position: absolute; top: 25px; left: 130px;"></div>
+</body>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/440112.html b/layout/reftests/bugs/440112.html
new file mode 100644
index 0000000000..cb102f681d
--- /dev/null
+++ b/layout/reftests/bugs/440112.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html;charset=utf-8">
+
+<title>Bug 440112</title>
+</head>
+<body>
+<body style="background-color: orange">
+ <div id="wrapper" style="position: absolute; top: 30px; left: 30px; overflow:hidden; height: 150px; width: 100px">
+ <form>
+
+ <textarea id="formElement" style="width: 200px; height: 50px;">
+</textarea>
+ </form>
+ </div>
+</body>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/440149-1-ref.html b/layout/reftests/bugs/440149-1-ref.html
new file mode 100644
index 0000000000..7fc5e06fc8
--- /dev/null
+++ b/layout/reftests/bugs/440149-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div {
+ width: 0px;
+}
+span {
+ border: 5px solid orange;
+ margin-left: 50px;
+}
+</style></head>
+<body><div><span><input></span></div></body>
+</html>
diff --git a/layout/reftests/bugs/440149-1.html b/layout/reftests/bugs/440149-1.html
new file mode 100644
index 0000000000..c041f73383
--- /dev/null
+++ b/layout/reftests/bugs/440149-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div {
+ width: 0px;
+}
+span {
+ border: 5px solid orange;
+ margin-left: 50px;
+}
+</style></head>
+<body><div><span><!--whitespace--> <input></span></div></body>
+</html>
diff --git a/layout/reftests/bugs/441259-1-ref.html b/layout/reftests/bugs/441259-1-ref.html
new file mode 100644
index 0000000000..a02fd786e1
--- /dev/null
+++ b/layout/reftests/bugs/441259-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span { display:inline-block; width:50px; height:10px; background:yellow; }
+</style>
+</head>
+<body style="width:100px; border:1px solid black;">
+<div style="float:left; width:50px; height:50px; background:green;"></div><span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/441259-1.html b/layout/reftests/bugs/441259-1.html
new file mode 100644
index 0000000000..6cf03a710a
--- /dev/null
+++ b/layout/reftests/bugs/441259-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span { display:inline-block; width:50px; height:10px; background:yellow; }
+</style>
+</head>
+<body style="width:100px; border:1px solid black;">
+<span></span>
+<div style="float:left; width:50px; height:50px; background:green;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/441259-2-ref.html b/layout/reftests/bugs/441259-2-ref.html
new file mode 100644
index 0000000000..ff76f9c77c
--- /dev/null
+++ b/layout/reftests/bugs/441259-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="float:left; width:50px; height:50px; background:green;"></div>
+H
+</body>
+</html>
diff --git a/layout/reftests/bugs/441259-2.html b/layout/reftests/bugs/441259-2.html
new file mode 100644
index 0000000000..1e448d6c6c
--- /dev/null
+++ b/layout/reftests/bugs/441259-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style="white-space:nowrap">
+H
+<div style="float:left; width:50px; height:50px; background:green;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/442542-1-ref.html b/layout/reftests/bugs/442542-1-ref.html
new file mode 100644
index 0000000000..6b4caa3136
--- /dev/null
+++ b/layout/reftests/bugs/442542-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+ <iframe src="442542-subframe.html" width="200" height="200"></iframe>
+</body>
diff --git a/layout/reftests/bugs/442542-1.html b/layout/reftests/bugs/442542-1.html
new file mode 100644
index 0000000000..6b35c4027a
--- /dev/null
+++ b/layout/reftests/bugs/442542-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body onload="document.getElementsByTagName('iframe')[0].width = 200">
+ <iframe src="442542-subframe.html" width="300" height="200"></iframe>
+</body>
diff --git a/layout/reftests/bugs/442542-subframe.html b/layout/reftests/bugs/442542-subframe.html
new file mode 100644
index 0000000000..1369005344
--- /dev/null
+++ b/layout/reftests/bugs/442542-subframe.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<body>
+ <div style="position:relative">
+ <div style="float:right; height: 10px"></div>
+ <div style="clear:right"></div>
+ <div style="position:absolute; top:4em; right:0; background:green; width: 100px; height: 100px"></div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/444015-1-ref.html b/layout/reftests/bugs/444015-1-ref.html
new file mode 100644
index 0000000000..11d87a6375
--- /dev/null
+++ b/layout/reftests/bugs/444015-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<title>Bug 444015 </title>
+</head><body>
+<table cellpadding="0" cellspacing="0"><tbody><tr><td width="500" style="background-color:lime">
+ <table style="margin-left: 250px;" cellpadding="0" cellspacing="0"><tbody><tr><td width="200" style="background-color:white">This line of text should be mostly at the right side of the containing box</td></tr></tbody></table>
+</td></tr></tbody></table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/444015-1.html b/layout/reftests/bugs/444015-1.html
new file mode 100644
index 0000000000..700bcef855
--- /dev/null
+++ b/layout/reftests/bugs/444015-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<title>Bug 444015 </title>
+</head><body>
+<table cellpadding="0" cellspacing="0"><tbody><tr><td align="center" width="500" style="background-color:lime">
+ <table style="margin-left: 200px;" cellpadding="0" cellspacing="0"><tbody><tr><td width="200" style="background-color:white">This line of text should be mostly at the right side of the containing box</td></tr></tbody></table>
+</td></tr></tbody></table>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/444375-1-ref.html b/layout/reftests/bugs/444375-1-ref.html
new file mode 100644
index 0000000000..1dee7b7fab
--- /dev/null
+++ b/layout/reftests/bugs/444375-1-ref.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<style>
+span {
+ font-size: 200%;
+}
+img {
+ width: 100px;
+ height: 100px;
+}
+</style>
+</head>
+<body style="width: 150px; border: 1px solid black; white-space:pre;"><table><tbody><tr><td><img>
+<span><img></span></td></tr></tbody></table></body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/444375-1.html b/layout/reftests/bugs/444375-1.html
new file mode 100644
index 0000000000..119ffeea39
--- /dev/null
+++ b/layout/reftests/bugs/444375-1.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style>
+span {
+ font-size: 200%;
+}
+img {
+ width: 100px;
+ height: 100px;
+}
+</style>
+</head>
+<body style="width: 150px; border: 1px solid black;">
+<table><tbody><tr><td><img> <span> <img></span></td></tr></tbody></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-1-ref.html b/layout/reftests/bugs/444928-1-ref.html
new file mode 100644
index 0000000000..b7ef8bcb7c
--- /dev/null
+++ b/layout/reftests/bugs/444928-1-ref.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<style type="text/css">
+table{ width: 500px; }
+
+</style>
+</head>
+<body>
+<table class="grid" cellspacing="50" cellpadding="0" border>
+<col width="10%"/>
+<col width="1" span="2"/>
+<tbody>
+<tr><th class="top" colspan="3"> Some Text</th></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-1.html b/layout/reftests/bugs/444928-1.html
new file mode 100644
index 0000000000..22ce58e216
--- /dev/null
+++ b/layout/reftests/bugs/444928-1.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<style type="text/css">
+table{table-layout: fixed; width: 500px; }
+
+</style>
+</head>
+<body>
+<table class="grid" cellspacing="50" cellpadding="0" border>
+<col width="10%"/>
+<col width="1" span="2"/>
+<tbody>
+<tr><th class="top" colspan="3"> Some Text</th></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-2-ref.html b/layout/reftests/bugs/444928-2-ref.html
new file mode 100644
index 0000000000..7e854abc37
--- /dev/null
+++ b/layout/reftests/bugs/444928-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Examples for bug 444928</title>
+</head>
+<body>
+
+<table cellspacing="50" cellpadding="0" style="table-layout:fixed" width="652">
+<col width="150">
+<col width="150">
+<col>
+<tr><td colspan="2" style="background:yellow">1-2</td><td style="background:fuchsia">3</td></tr>
+<tr style="color:transparent"><td>1</td><td>2</td><td>3</td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-2.html b/layout/reftests/bugs/444928-2.html
new file mode 100644
index 0000000000..4f74050acd
--- /dev/null
+++ b/layout/reftests/bugs/444928-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Examples for bug 444928</title>
+</head>
+<body>
+
+<table cellspacing="50" cellpadding="0" style="table-layout:fixed" width="652">
+<col width="150">
+<col width="150">
+<col>
+<tr><td colspan="2" style="background:yellow">1-2</td><td style="background:fuchsia">3</td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-3-ref.html b/layout/reftests/bugs/444928-3-ref.html
new file mode 100644
index 0000000000..08e2c37cb5
--- /dev/null
+++ b/layout/reftests/bugs/444928-3-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Examples for bug 444928</title>
+</head>
+<body>
+
+<table cellspacing="50" cellpadding="0" width="652">
+<col width="150">
+<col width="150">
+<col>
+<tr><td colspan="2" style="background:yellow">1-2</td><td style="background:fuchsia">3</td></tr>
+<tr style="color:transparent"><td>1</td><td>2</td><td>3</td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/444928-3.html b/layout/reftests/bugs/444928-3.html
new file mode 100644
index 0000000000..2af7819857
--- /dev/null
+++ b/layout/reftests/bugs/444928-3.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Examples for bug 444928</title>
+</head>
+<body>
+
+<table cellspacing="50" cellpadding="0" width="652">
+<col width="150">
+<col width="150">
+<col>
+<tr><td colspan="2" style="background:yellow">1-2</td><td style="background:fuchsia">3</td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445004-1-ref.html b/layout/reftests/bugs/445004-1-ref.html
new file mode 100644
index 0000000000..f56a9d7b77
--- /dev/null
+++ b/layout/reftests/bugs/445004-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+ <iframe width="500" height="200" src="subdir/445004-ref-subframe.html"></iframe>
+</body>
diff --git a/layout/reftests/bugs/445004-1.html b/layout/reftests/bugs/445004-1.html
new file mode 100644
index 0000000000..2535e01642
--- /dev/null
+++ b/layout/reftests/bugs/445004-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ var loads = 0;
+ function loadStarted() {
+ ++loads;
+ }
+ function loadEnded() {
+ --loads;
+ if (loads == 0) {
+ document.documentElement.className = "";
+ }
+ }
+ loadStarted();
+ window.onload = function() {
+ if (location.protocol != 'file:') {
+ var txt = document.createTextNode('Must be run from file://');
+ var div = document.createElement("div");
+ div.appendChild(txt);
+ document.body.appendChild(div);
+ }
+ loadEnded();
+ }
+ </script>
+ </head>
+ <body>
+ <iframe width="500" height="200" src="subdir/445004-subframe.html"
+ onload="window.frames[0].doIt();"></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/445142-1-ref.html b/layout/reftests/bugs/445142-1-ref.html
new file mode 100644
index 0000000000..265497df60
--- /dev/null
+++ b/layout/reftests/bugs/445142-1-ref.html
@@ -0,0 +1,147 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ border-spacing: 0;
+ margin-bottom: 2px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="width: 600px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 700px">700px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">600px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 200px">100px</td>
+ <td style="width: 400px">200px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 200px">150px</td>
+ <td style="width: 400px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">20%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">100%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">120%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 200px">20%</td>
+ <td style="width: 400px">40%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 200px">30%</td>
+ <td style="width: 400px">60%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 120px">20%</td>
+ <td style="width: 480px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 120px">20%</td>
+ <td style="width: 100px">100px</td>
+ <td style="width: 380px">div</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">20%</td>
+ <td style="width: 0"><div style="width: 0">0</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">20%</td>
+ <td style="width: 0"><div style="width: 0">0%</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">100px</td>
+ <td style="width: 0"><div style="width: 0">0</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">100px</td>
+ <td style="width: 0"><div style="width: 0">0%</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 300px">0</td>
+ <td style="width: 300px">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 300px">0%</td>
+ <td style="width: 300px">0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-1a.html b/layout/reftests/bugs/445142-1a.html
new file mode 100644
index 0000000000..8ab69ad821
--- /dev/null
+++ b/layout/reftests/bugs/445142-1a.html
@@ -0,0 +1,149 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ table-layout: fixed;
+ width: 600px;
+ border-spacing: 0;
+ margin-bottom: 2px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 700px">700px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">600px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 200px">200px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">150px</td>
+ <td style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100%">100%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 120%">120%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 40%">40%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 30%">30%</td>
+ <td style="width: 60%">60%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 100px">100px</td>
+ <td><div style="width: 100px">div</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 0">0</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 0%">0%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-1b.html b/layout/reftests/bugs/445142-1b.html
new file mode 100644
index 0000000000..57102394dc
--- /dev/null
+++ b/layout/reftests/bugs/445142-1b.html
@@ -0,0 +1,187 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ table-layout: fixed;
+ width: 600px;
+ border-spacing: 0;
+ margin-bottom: 2px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<!--
+
+A copy of 445142-1a.html where one of the widths is specified on a col
+instead of a td.
+
+-->
+
+<table>
+ <col style="width: 100px">
+ <tr>
+ <td>100px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 700px">
+ <tr>
+ <td>700px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 600px">
+ <tr>
+ <td>600px</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 200px">
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td>200px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 150px">
+ <col>
+ <tr>
+ <td style="width: 9999px">150px</td>
+ <td style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <tr>
+ <td>20%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 100%">
+ <tr>
+ <td>100%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 120%">
+ <tr>
+ <td>120%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 40%">40%</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 60%">
+ <tr>
+ <td style="width: 30%">30%</td>
+ <td style="width: 9999px">60%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 100px">
+ <col>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 5%">100px</td>
+ <td><div style="width: 100px">div</div></td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0%">
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td>0%</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0">
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td>0</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 100px">
+ <col>
+ <tr>
+ <td>100px</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 0">
+ <col>
+ <tr>
+ <td>0</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0">
+ <tr>
+ <td style="width: 0%">0%</td>
+ <td>0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-1c.html b/layout/reftests/bugs/445142-1c.html
new file mode 100644
index 0000000000..cef8cfc6ee
--- /dev/null
+++ b/layout/reftests/bugs/445142-1c.html
@@ -0,0 +1,155 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ table-layout: fixed;
+ width: 600px;
+ border-spacing: 0;
+ margin-bottom: 2px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<!--
+
+A copy of 445142-1a.html where some cells have colspans.
+
+-->
+
+<table>
+ <tr>
+ <td colspan="3" style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="2" style="width: 700px">700px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="5" style="width: 600px">600px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="3" style="width: 100px">100px</td>
+ <td style="width: 200px">200px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">150px</td>
+ <td colspan="2" style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="4" style="width: 20%">20%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="2" style="width: 100%">100%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="3" style="width: 120%">120%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="2" style="width: 20%">20%</td>
+ <td style="width: 40%">40%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 30%">30%</td>
+ <td colspan="3" style="width: 60%">60%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td colspan="4" style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="3" style="width: 20%">20%</td>
+ <td style="width: 100px">100px</td>
+ <td><div style="width: 100px">div</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="2" style="width: 20%">20%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td colspan="2" style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="4" style="width: 100px">100px</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td colspan="2" style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="4" style="width: 0">0</td>
+ <td colspan="4" style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td colspan="10" style="width: 0%">0%</td>
+ <td colspan="10" style="width: 0">0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-2-ref.html b/layout/reftests/bugs/445142-2-ref.html
new file mode 100644
index 0000000000..31be5f7d66
--- /dev/null
+++ b/layout/reftests/bugs/445142-2-ref.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ border-spacing: 10px 0;
+ margin-bottom: 2px;
+ padding: 0 10px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="width: 460px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 500px">500px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">600px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">100px</td>
+ <td style="width: 300px">200px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">150px</td>
+ <td style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 460px">20%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 460px">100%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 460px">120%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">20%</td>
+ <td style="width: 300px">40%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">30%</td>
+ <td style="width: 300px">60%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 90px">20%</td>
+ <td style="width: 360px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 88px">20%</td>
+ <td style="width: 100px">100px</td>
+ <td style="width: 252px">div</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 450px">20%</td>
+ <td style="width: 0"><div style="width: 0">0</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 450px">20%</td>
+ <td style="width: 0"><div style="width: 0">0%</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 450px">100px</td>
+ <td style="width: 0"><div style="width: 0">0</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 450px">100px</td>
+ <td style="width: 0"><div style="width: 0">0%</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 225px">0</td>
+ <td style="width: 225px">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 225px">0%</td>
+ <td style="width: 225px">0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-2a.html b/layout/reftests/bugs/445142-2a.html
new file mode 100644
index 0000000000..e89c2fabd1
--- /dev/null
+++ b/layout/reftests/bugs/445142-2a.html
@@ -0,0 +1,150 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ table-layout: fixed;
+ width: 500px;
+ border-spacing: 10px 0;
+ margin-bottom: 2px;
+ padding: 0 10px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 500px">500px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 600px">600px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 200px">200px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 150px">150px</td>
+ <td style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100%">100%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 120%">120%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 40%">40%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 30%">30%</td>
+ <td style="width: 60%">60%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 100px">100px</td>
+ <td><div style="width: 100px">div</div></td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 0">0</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <tr>
+ <td style="width: 0%">0%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/445142-2b.html b/layout/reftests/bugs/445142-2b.html
new file mode 100644
index 0000000000..f633e498ff
--- /dev/null
+++ b/layout/reftests/bugs/445142-2b.html
@@ -0,0 +1,188 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>table-layout: fixed width distribution with unassigned space</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ table, td { margin: 0; padding: 0; }
+
+ table {
+ table-layout: fixed;
+ width: 500px;
+ border-spacing: 10px 0;
+ margin-bottom: 2px;
+ padding: 0 10px;
+ }
+
+ td { color: black; background: yellow; }
+ td + td { background: aqua; }
+ td + td + td { background: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<!--
+
+A copy of 445142-1a.html where one of the widths is specified on a col
+instead of a td.
+
+-->
+
+<table>
+ <col style="width: 100px">
+ <tr>
+ <td>100px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 500px">
+ <tr>
+ <td>500px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 600px">
+ <tr>
+ <td>600px</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 200px">
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td>200px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 150px">
+ <col>
+ <tr>
+ <td style="width: 9999px">150px</td>
+ <td style="width: 300px">300px</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <tr>
+ <td>20%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 100%">
+ <tr>
+ <td>100%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 120%">
+ <tr>
+ <td>120%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 40%">40%</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 60%">
+ <tr>
+ <td style="width: 30%">30%</td>
+ <td style="width: 9999px">60%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 100px">100px</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 100px">
+ <col>
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td style="width: 5%">100px</td>
+ <td><div style="width: 100px">div</div></td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 20%">
+ <col>
+ <tr>
+ <td>20%</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0%">
+ <tr>
+ <td style="width: 20%">20%</td>
+ <td>0%</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0">
+ <tr>
+ <td style="width: 100px">100px</td>
+ <td>0</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 100px">
+ <col>
+ <tr>
+ <td>100px</td>
+ <td style="width: 0%">0%</td>
+ </tr>
+</table>
+
+<table>
+ <col style="width: 0">
+ <col>
+ <tr>
+ <td>0</td>
+ <td style="width: 0">0</td>
+ </tr>
+</table>
+
+<table>
+ <col>
+ <col style="width: 0">
+ <tr>
+ <td style="width: 0%">0%</td>
+ <td>0</td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1a.html b/layout/reftests/bugs/446100-1a.html
new file mode 100644
index 0000000000..d556a8c8f9
--- /dev/null
+++ b/layout/reftests/bugs/446100-1a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="1.2">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1b.html b/layout/reftests/bugs/446100-1b.html
new file mode 100644
index 0000000000..935d2b5f90
--- /dev/null
+++ b/layout/reftests/bugs/446100-1b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="1.5">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1c.html b/layout/reftests/bugs/446100-1c.html
new file mode 100644
index 0000000000..9e37594e0b
--- /dev/null
+++ b/layout/reftests/bugs/446100-1c.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="1.8">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1d.html b/layout/reftests/bugs/446100-1d.html
new file mode 100644
index 0000000000..e82fc57c36
--- /dev/null
+++ b/layout/reftests/bugs/446100-1d.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2.0">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1e.html b/layout/reftests/bugs/446100-1e.html
new file mode 100644
index 0000000000..00d2613137
--- /dev/null
+++ b/layout/reftests/bugs/446100-1e.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.8">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1f.html b/layout/reftests/bugs/446100-1f.html
new file mode 100644
index 0000000000..35d24ed89b
--- /dev/null
+++ b/layout/reftests/bugs/446100-1f.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.6666666">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1g.html b/layout/reftests/bugs/446100-1g.html
new file mode 100644
index 0000000000..33e834c9a5
--- /dev/null
+++ b/layout/reftests/bugs/446100-1g.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.5">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/446100-1h.html b/layout/reftests/bugs/446100-1h.html
new file mode 100644
index 0000000000..662e2a436a
--- /dev/null
+++ b/layout/reftests/bugs/446100-1h.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.3">
+<head>
+<style>
+div { margin:1em; }
+/* A 7x7px image, black with a 5x5 transparent box centered in it */
+div.box { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==); }
+/* A 7x5px image, black with a 5x5 transparent box centered in it */
+div.vstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=); }
+/* A 5x7px image, black with a 5x5 transparent box centered in it */
+div.hstrip { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==); }
+</style>
+</head>
+<body>
+<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
+<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
+<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/447749-1-ref.html b/layout/reftests/bugs/447749-1-ref.html
new file mode 100644
index 0000000000..faebca087a
--- /dev/null
+++ b/layout/reftests/bugs/447749-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Bug 4477749</title>
+ <style type="text/css">
+ div.scroller { overflow: scroll; width: 100px; }
+ span { border: 1px solid blue; }
+ </style>
+ </head>
+ <body>
+ <div dir="ltr">
+ <div class="scroller"><span>TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</span></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/447749-1.html b/layout/reftests/bugs/447749-1.html
new file mode 100644
index 0000000000..f747614f73
--- /dev/null
+++ b/layout/reftests/bugs/447749-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Bug 4477749</title>
+ <style type="text/css">
+ div.scroller { overflow: scroll; width: 100px; }
+ span { border: 1px solid blue; }
+ </style>
+ <script type="text/javascript">
+function testit()
+{
+ var inner=document.getElementById("testinner").childNodes[0];
+ window.getSelection().collapse(inner, 0);
+ document.getElementById("testmid").scrollLeft=-1000;
+ document.getElementById("testouter").style.direction="ltr";
+}
+ </script>
+ </head>
+ <body onload="testit()">
+ <div id="testouter" dir="rtl">
+ <div id="testmid" class="scroller"><span id="testinner">TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</span></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/448193-ref.html b/layout/reftests/bugs/448193-ref.html
new file mode 100644
index 0000000000..27402478d0
--- /dev/null
+++ b/layout/reftests/bugs/448193-ref.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html><head>
+<title>3d effect degradation at 1px with border radius</title>
+<style>
+div {
+ width: 50px;
+ height: 50px;
+ margin: 10px;
+ border-width: 1px;
+ border-style: solid;
+ -moz-border-radius: 20px;
+}
+</style>
+<body>
+<div style="border-color: #aa0000 #ff0000 #ff0000 #aa0000"></div>
+<div style="border-color: #ff0000 #aa0000 #aa0000 #ff0000"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/448193.html b/layout/reftests/bugs/448193.html
new file mode 100644
index 0000000000..db439b93fe
--- /dev/null
+++ b/layout/reftests/bugs/448193.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html><head>
+<title>3d effect degradation at 1px with border radius</title>
+<style>
+div {
+ width: 50px;
+ height: 50px;
+ margin: 10px;
+ border-width: 1px;
+ border-color: red;
+ -moz-border-radius: 20px;
+}
+</style>
+<body>
+<div style="border-style: inset"></div>
+<div style="border-style: outset"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/449171-1.html b/layout/reftests/bugs/449171-1.html
new file mode 100644
index 0000000000..9eb01d7b5d
--- /dev/null
+++ b/layout/reftests/bugs/449171-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ @import url("data:text/css,.import { color: green }");
+ div { color: red }
+ @media {
+ .media { color: green }
+ }
+ </style>
+ </head>
+ <body>
+ <div class="import">test</div>
+ <div class="media">test</div>
+ <body>
+</html>
diff --git a/layout/reftests/bugs/449171-ref.html b/layout/reftests/bugs/449171-ref.html
new file mode 100644
index 0000000000..f60066aa43
--- /dev/null
+++ b/layout/reftests/bugs/449171-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { color: green }
+ </style>
+ </head>
+ <body>
+ <div>test</div>
+ <div>test</div>
+ <body>
+</html>
diff --git a/layout/reftests/bugs/449362-1-ref.html b/layout/reftests/bugs/449362-1-ref.html
new file mode 100644
index 0000000000..531273827a
--- /dev/null
+++ b/layout/reftests/bugs/449362-1-ref.html
@@ -0,0 +1,43 @@
+<html>
+<head>
+ <title>FF3 Test</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+ <style>
+ td {
+ border: 1px solid;
+ vertical-align: top;
+ }
+ </style>
+</head>
+
+<body>
+
+<table id="pp_owned" align="center" cellpadding="0" cellspacing="0">
+
+
+<tbody>
+ <tr >
+ <td >Column 1</td>
+ <td >Column 2</td>
+ </tr>
+ <tr>
+
+ <td >
+hello
+ </td>
+ <td >
+ <span id="B" >
+ Now I am<br />
+ higher.<br />
+
+ Click me<br />
+ Again!
+ </span>
+ </td>
+ </tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/449362-1.html b/layout/reftests/bugs/449362-1.html
new file mode 100644
index 0000000000..a90a1e56f4
--- /dev/null
+++ b/layout/reftests/bugs/449362-1.html
@@ -0,0 +1,74 @@
+<html class="reftest-wait">
+<head>
+ <title>FF3 Test</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+ <style>
+ td {
+ border: 1px solid;
+ vertical-align: top;
+ }
+ </style>
+ <script type="text/javascript" language="JavaScript">
+ /**
+ * Display the element 'idShow' and hide the element 'idHide'.
+ *
+ * @param idShow the id of the element to show.
+ * @param idHide the id of the element to hide.
+ */
+ toggleElements = function(idShow, idHide)
+ {
+
+ var elementHide = document.getElementById(idHide);
+ var elementShow = document.getElementById(idShow);
+ if (elementHide && elementShow)
+ {
+ elementHide.style.display = 'none';
+ elementShow.style.display = '';
+ }
+
+ }
+ function doTest()
+ {
+ toggleElements('B', 'A');
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+
+</head>
+
+<body>
+
+<table id="pp_owned" align="center" cellpadding="0" cellspacing="0">
+
+<tbody>
+ <tr >
+ <td >Column 1</td>
+ <td >Column 2</td>
+ </tr>
+ <tr>
+
+ <td >
+hello
+ </td>
+ <td >
+ <span id="A">
+ Click me!
+ </span>
+ <span id="B" style="display: none;" >
+ Now I am<br />
+ higher.<br />
+
+ Click me<br />
+ Again!
+ </span>
+ </td>
+ </tr>
+</tbody>
+</table>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/449519-1-ref.html b/layout/reftests/bugs/449519-1-ref.html
new file mode 100644
index 0000000000..030b741ce1
--- /dev/null
+++ b/layout/reftests/bugs/449519-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="text-shadow: 5px 5px 1.5px red;">
+edcba
+</body>
+</html>
diff --git a/layout/reftests/bugs/449519-1.html b/layout/reftests/bugs/449519-1.html
new file mode 100644
index 0000000000..5cd48769fc
--- /dev/null
+++ b/layout/reftests/bugs/449519-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="text-shadow: 5px 5px 1.5px red;">
+<span style="direction: rtl; unicode-bidi: bidi-override">abcde</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/450670-1-ref.html b/layout/reftests/bugs/450670-1-ref.html
new file mode 100644
index 0000000000..687daee20e
--- /dev/null
+++ b/layout/reftests/bugs/450670-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body style="white-space:pre;">
+Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/450670-1.html b/layout/reftests/bugs/450670-1.html
new file mode 100644
index 0000000000..625bea3dc4
--- /dev/null
+++ b/layout/reftests/bugs/450670-1.html
@@ -0,0 +1,6 @@
+<html>
+<body style="text-align: justify;">
+<br>
+Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/451168-1-ref.html b/layout/reftests/bugs/451168-1-ref.html
new file mode 100644
index 0000000000..e4680c831a
--- /dev/null
+++ b/layout/reftests/bugs/451168-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img src="mozilla-banner.gif">
+</body>
+</html>
diff --git a/layout/reftests/bugs/451168-1.html b/layout/reftests/bugs/451168-1.html
new file mode 100644
index 0000000000..f3f8ec0a5a
--- /dev/null
+++ b/layout/reftests/bugs/451168-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+a::before { content:url(mozilla-banner.gif); }
+</style>
+</head>
+<body>
+<a href="#"></a>
+</body>
+</html>
diff --git a/layout/reftests/bugs/451876-1-ref.html b/layout/reftests/bugs/451876-1-ref.html
new file mode 100644
index 0000000000..3d17fe5993
--- /dev/null
+++ b/layout/reftests/bugs/451876-1-ref.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<style type="text/css">
+div {
+ overflow: hidden;
+ height: 100px;
+}
+table {
+ table-layout: fixed;
+ border: 1px solid #000;
+ width: 100%;
+}
+td {
+ border: 1px solid #000;
+}
+</style>
+</head>
+<body>
+<div>
+ <table>
+ <tr>
+ <td width="200">Header1</td><td>Header2</td>
+ </tr>
+ <tr>
+ <td>Cell1</td><td>Cell2</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/451876-1.html b/layout/reftests/bugs/451876-1.html
new file mode 100644
index 0000000000..da2b111560
--- /dev/null
+++ b/layout/reftests/bugs/451876-1.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<style type="text/css">
+div {
+ overflow: hidden;
+ height: 100px;
+}
+table {
+ table-layout: fixed;
+ border: 1px solid #000;
+ width: 100%;
+}
+td {
+ border: 1px solid #000;
+}
+</style>
+</head>
+<body onload="document.getElementById('bug').style.width='200px';">
+<div>
+ <table>
+ <tr>
+ <td width="100" id="bug">Header1</td><td>Header2</td>
+ </tr>
+ <tr>
+ <td>Cell1</td><td>Cell2</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/451876-2-ref.html b/layout/reftests/bugs/451876-2-ref.html
new file mode 100644
index 0000000000..3714a83f64
--- /dev/null
+++ b/layout/reftests/bugs/451876-2-ref.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+div {
+ overflow: hidden;
+ height: 100px;
+}
+table {
+ table-layout: fixed;
+ border: 1px solid #000;
+ width: 100%;
+}
+td {
+ border: 1px solid #000;
+}
+</style>
+</head>
+<body>
+<div>
+ <table>
+ <tr>
+ <td width="200">Header1</td><td>Header2</td>
+ </tr>
+ <tr>
+ <td>Cell1</td><td>Cell2</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/451876-2.html b/layout/reftests/bugs/451876-2.html
new file mode 100644
index 0000000000..c2b011d4ee
--- /dev/null
+++ b/layout/reftests/bugs/451876-2.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+div {
+ overflow: hidden;
+ height: 100px;
+}
+table {
+ table-layout: fixed;
+ border: 1px solid #000;
+ width: 100%;
+}
+td {
+ border: 1px solid #000;
+}
+</style>
+</head>
+<body onload="document.getElementById('bug').style.width='200px';">
+<div>
+ <table>
+ <tr>
+ <td width="100" id="bug">Header1</td><td>Header2</td>
+ </tr>
+ <tr>
+ <td>Cell1</td><td>Cell2</td>
+ </tr>
+ </table>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/452915-1-ref.html b/layout/reftests/bugs/452915-1-ref.html
new file mode 100644
index 0000000000..58eabfe7a4
--- /dev/null
+++ b/layout/reftests/bugs/452915-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>HTML5 Rendering section: No border for linked images.</title>
+</head>
+<body><img src="solidblue.png"></body>
+</html>
diff --git a/layout/reftests/bugs/452915-1.html b/layout/reftests/bugs/452915-1.html
new file mode 100644
index 0000000000..467ab4f70e
--- /dev/null
+++ b/layout/reftests/bugs/452915-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>HTML5 Rendering section: No border for linked images.</title>
+</head>
+<body><a href="about:blank"><img src="solidblue.png"></a></body>
+</html>
diff --git a/layout/reftests/bugs/452964-1-ref.html b/layout/reftests/bugs/452964-1-ref.html
new file mode 100644
index 0000000000..6e0af83a62
--- /dev/null
+++ b/layout/reftests/bugs/452964-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { display: table; }
+ p { display: table-row; }
+ span { display: table-cell; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <p>
+ <span>Test</span>
+ </p>
+ <p>
+ <span>Col 1</span>
+ <span>Col 2</span>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/452964-1.html b/layout/reftests/bugs/452964-1.html
new file mode 100644
index 0000000000..83ed94b478
--- /dev/null
+++ b/layout/reftests/bugs/452964-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div::before { content: "Test"; }
+ div { display: table; }
+ p { display: table-row; }
+ span { display: table-cell; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <p>
+ <span>Col 1</span>
+ <span>Col 2</span>
+ </p>
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/454361.html b/layout/reftests/bugs/454361.html
new file mode 100644
index 0000000000..cde4bf0267
--- /dev/null
+++ b/layout/reftests/bugs/454361.html
@@ -0,0 +1,6 @@
+<html style="position: absolute; display: none">
+<head>
+</head>
+<body>Hello Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/455105-1.html b/layout/reftests/bugs/455105-1.html
new file mode 100644
index 0000000000..d1ec887add
--- /dev/null
+++ b/layout/reftests/bugs/455105-1.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html><head><title>455105-1</title>
+<style>
+div#below {
+ position: absolute;
+ top: 10px; left: 10px;
+ width: 40px;
+ height: 40px;
+ border: 10px solid red;
+ background-color: red;
+}
+div#above {
+ position: absolute;
+ top: 10px; left: 10px;
+ width: 40px;
+ height: 40px;
+ border-width: 10px;
+ border-style: solid;
+ border-color: initial;
+ color: rgba(0,0,0,0);
+ background-image: url("data:image/gif;base64,\
+R0lGODlhAQABAPAAAACAAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==");
+}
+</style>
+</head><body>
+<div id="below"></div>
+<div id="above"></div>
+</body></html>
diff --git a/layout/reftests/bugs/455105-2.html b/layout/reftests/bugs/455105-2.html
new file mode 100644
index 0000000000..ee546d00ef
--- /dev/null
+++ b/layout/reftests/bugs/455105-2.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html><head><title>455105-2</title>
+<style>
+div#below {
+ position: absolute;
+ top: 10px; left: 10px;
+ width: 40px;
+ height: 40px;
+ border: 10px solid red;
+ background-color: red;
+}
+div#above {
+ position: absolute;
+ top: 10px; left: 10px;
+ width: 40px;
+ height: 40px;
+ border-width: 10px;
+ border-style: solid;
+ border-color: green;
+ /* one pixel green */
+ background-image: url("data:image/gif;base64,\
+R0lGODlhAQABAPAAAACAAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==");
+ /* three by three pixel transparent - drawn *instead of* regular border */
+ border-image: url("data:image/gif;base64,\
+R0lGODlhAwADAPAAAAAAAAAAACH5BAEAAAAALAAAAAADAAMAAAIDhH8FADs=") 1 1;
+}
+</style>
+</head><body>
+<div id="below"></div>
+<div id="above"></div>
+</body></html>
diff --git a/layout/reftests/bugs/455105-ref.html b/layout/reftests/bugs/455105-ref.html
new file mode 100644
index 0000000000..c170fc4966
--- /dev/null
+++ b/layout/reftests/bugs/455105-ref.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html><head><title>455105 ref</title>
+<style>
+div {
+ position: absolute;
+ top: 10px; left: 10px;
+ width: 40px;
+ height: 40px;
+ border-width: 10px;
+ border-style: solid;
+ border-color: green;
+ background-color: green;
+}
+</style>
+</head><body>
+<div></div>
+</body></html>
diff --git a/layout/reftests/bugs/455171-5-ref.html b/layout/reftests/bugs/455171-5-ref.html
new file mode 100644
index 0000000000..ed8a18e5b0
--- /dev/null
+++ b/layout/reftests/bugs/455171-5-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<title>Testcase for hypothetical box calculation for position:fixed inside transform</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="margin: 30px 0 0 10px; height: 10px; width: 10px; background: blue"></div>
diff --git a/layout/reftests/bugs/455171-5.html b/layout/reftests/bugs/455171-5.html
new file mode 100644
index 0000000000..9538fd1d3a
--- /dev/null
+++ b/layout/reftests/bugs/455171-5.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<title>Testcase for hypothetical box calculation for position:fixed inside transform</title>
+<style type="text/css">
+html, body { margin: 0; padding: 0; }
+</style>
+<div style="transform: translate(10px,10px); width:0">
+ <div style="height: 20px"></div>
+ <div style="position: fixed; height: 10px; width: 10px; background: blue"></div>
+</div>
diff --git a/layout/reftests/bugs/455280-1-ref.xhtml b/layout/reftests/bugs/455280-1-ref.xhtml
new file mode 100644
index 0000000000..0d5df2fad4
--- /dev/null
+++ b/layout/reftests/bugs/455280-1-ref.xhtml
@@ -0,0 +1,10 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+ <div style="width:160px; height:160px; position:relative; left:120px; top:120px; background:lime;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/455280-1.xhtml b/layout/reftests/bugs/455280-1.xhtml
new file mode 100644
index 0000000000..cc2418ffa1
--- /dev/null
+++ b/layout/reftests/bugs/455280-1.xhtml
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+<body>
+ <div style="width:400px; height:400px; clip-path: url(#c1); background:lime; transform:scale(0.5)"></div>
+ <svg:svg height="0">
+ <svg:clipPath id="c1" clipPathUnits="objectBoundingBox">
+ <svg:rect x="0.1" y="0.1" width="0.8" height="0.8"/>
+ </svg:clipPath>
+ </svg:svg>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/455826-1-ref.html b/layout/reftests/bugs/455826-1-ref.html
new file mode 100644
index 0000000000..7bc0743de6
--- /dev/null
+++ b/layout/reftests/bugs/455826-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body style="font-family: monospace; white-space:pre;">aa
+aa
+a<b>a a</b></body>
+</html>
diff --git a/layout/reftests/bugs/455826-1.html b/layout/reftests/bugs/455826-1.html
new file mode 100644
index 0000000000..b9ae24e2bc
--- /dev/null
+++ b/layout/reftests/bugs/455826-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+<body style="font-family: monospace; width: 4.1ch;">aa aa a<b>a a</b></body>
+</html>
diff --git a/layout/reftests/bugs/456147-ref.html b/layout/reftests/bugs/456147-ref.html
new file mode 100644
index 0000000000..f2977e4765
--- /dev/null
+++ b/layout/reftests/bugs/456147-ref.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html><head><title>Colored strikethrough test</title>
+<style>
+/* In order to ensure consistency between the HTML reference and XUL
+ test case, we explicitly specify all relevant style properties. */
+* {
+ margin: 0;
+ padding: 0;
+ border: none;
+ background-color: transparent;
+ text-decoration-skip-ink: none;
+}
+body {
+ padding: 8px;
+ background-color: white;
+}
+span {
+ color: black;
+ font: normal normal normal 12pt/14pt serif;
+ display: block;
+ height: 30px;
+}
+div#under {
+ text-decoration: underline;
+ color: orange;
+}
+div#strike {
+ text-decoration: line-through;
+ color: blue;
+}
+</style>
+</head>
+<body>
+<div><span>The next three lines should all have:</span></div>
+<div id="under">
+<div id="strike">
+<span>No overline.</span>
+<span>Orange underline.</span>
+<span>Blue strikethrough.</span>
+</div>
+</div>
+</body></html>
diff --git a/layout/reftests/bugs/456147.css b/layout/reftests/bugs/456147.css
new file mode 100644
index 0000000000..7f8647ce9b
--- /dev/null
+++ b/layout/reftests/bugs/456147.css
@@ -0,0 +1,27 @@
+/* In order to ensure consistency between the HTML reference and XUL
+ test case, we explicitly specify all relevant style properties. */
+* {
+ margin: 0;
+ padding: 0;
+ border: none;
+ background-color: transparent;
+}
+window {
+ padding: 8px;
+ background-color: white;
+}
+label, description {
+ color: black;
+ font: normal normal normal 12pt/14pt serif;
+ height: 30px;
+}
+vbox#under {
+ text-decoration: underline;
+ text-decoration-skip-ink: none;
+ color: orange;
+}
+vbox#strike {
+ text-decoration: line-through;
+ text-decoration-skip-ink: none;
+ color: blue;
+}
diff --git a/layout/reftests/bugs/456147.xhtml b/layout/reftests/bugs/456147.xhtml
new file mode 100644
index 0000000000..02871716c7
--- /dev/null
+++ b/layout/reftests/bugs/456147.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="456147.css" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ title="Colored strikethrough test">
+<label value="The next three lines should all have:"/>
+<vbox id="under">
+<vbox id="strike">
+<label value="No overline."/>
+<label value="Orange underline."/>
+<description value="Blue strikethrough."/>
+</vbox>
+</vbox>
+</window>
diff --git a/layout/reftests/bugs/456219-1-mask-wArA.png b/layout/reftests/bugs/456219-1-mask-wArA.png
new file mode 100644
index 0000000000..f3901b4aa2
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wArA.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wArB.png b/layout/reftests/bugs/456219-1-mask-wArB.png
new file mode 100644
index 0000000000..b4ca1d79e2
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wArB.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wArC.png b/layout/reftests/bugs/456219-1-mask-wArC.png
new file mode 100644
index 0000000000..7dadce8da1
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wArC.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wArD.png b/layout/reftests/bugs/456219-1-mask-wArD.png
new file mode 100644
index 0000000000..b5810dc4b8
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wArD.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wArE.png b/layout/reftests/bugs/456219-1-mask-wArE.png
new file mode 100644
index 0000000000..aa415b734d
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wArE.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wBrA.png b/layout/reftests/bugs/456219-1-mask-wBrA.png
new file mode 100644
index 0000000000..b0df7a2065
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wBrA.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wBrB.png b/layout/reftests/bugs/456219-1-mask-wBrB.png
new file mode 100644
index 0000000000..9a88c65964
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wBrB.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wBrC.png b/layout/reftests/bugs/456219-1-mask-wBrC.png
new file mode 100644
index 0000000000..641aa9a5c3
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wBrC.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wBrD.png b/layout/reftests/bugs/456219-1-mask-wBrD.png
new file mode 100644
index 0000000000..a0d17a8f0d
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wBrD.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wBrE.png b/layout/reftests/bugs/456219-1-mask-wBrE.png
new file mode 100644
index 0000000000..831bea7fcb
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wBrE.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wCrA.png b/layout/reftests/bugs/456219-1-mask-wCrA.png
new file mode 100644
index 0000000000..6826f1df8a
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wCrA.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wCrB.png b/layout/reftests/bugs/456219-1-mask-wCrB.png
new file mode 100644
index 0000000000..35eb4e2c8e
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wCrB.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wCrC.png b/layout/reftests/bugs/456219-1-mask-wCrC.png
new file mode 100644
index 0000000000..a2e8644a25
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wCrC.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wCrD.png b/layout/reftests/bugs/456219-1-mask-wCrD.png
new file mode 100644
index 0000000000..c8b5e6be8a
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wCrD.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wCrE.png b/layout/reftests/bugs/456219-1-mask-wCrE.png
new file mode 100644
index 0000000000..c8b5e6be8a
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wCrE.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wDrA.png b/layout/reftests/bugs/456219-1-mask-wDrA.png
new file mode 100644
index 0000000000..901e2cef8b
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wDrA.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wDrB.png b/layout/reftests/bugs/456219-1-mask-wDrB.png
new file mode 100644
index 0000000000..bb4bdb99eb
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wDrB.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wDrC.png b/layout/reftests/bugs/456219-1-mask-wDrC.png
new file mode 100644
index 0000000000..37301e813b
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wDrC.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wDrD.png b/layout/reftests/bugs/456219-1-mask-wDrD.png
new file mode 100644
index 0000000000..0d01c5a0e5
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wDrD.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wDrE.png b/layout/reftests/bugs/456219-1-mask-wDrE.png
new file mode 100644
index 0000000000..99c6a60bd8
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wDrE.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wErA.png b/layout/reftests/bugs/456219-1-mask-wErA.png
new file mode 100644
index 0000000000..69b3588499
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wErA.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wErB.png b/layout/reftests/bugs/456219-1-mask-wErB.png
new file mode 100644
index 0000000000..4159c22c5b
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wErB.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wErC.png b/layout/reftests/bugs/456219-1-mask-wErC.png
new file mode 100644
index 0000000000..50436f63ea
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wErC.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wErD.png b/layout/reftests/bugs/456219-1-mask-wErD.png
new file mode 100644
index 0000000000..a1129e53ee
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wErD.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-mask-wErE.png b/layout/reftests/bugs/456219-1-mask-wErE.png
new file mode 100644
index 0000000000..9aa2eaafe0
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-mask-wErE.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-1-ref.html b/layout/reftests/bugs/456219-1-ref.html
new file mode 100644
index 0000000000..e4e393b216
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-ref.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+ case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+ z-index: 0;
+ width: 70px;
+ height: 70px;
+ border-style: solid;
+ border-color: transparent;
+ background-color: green;
+}
+.rA div.i { border-radius: 10px; }
+.rB div.i { border-radius: 20px; }
+.rC div.i { border-radius: 30px; }
+.rD div.i { border-radius: 40px; }
+.rE div.i { border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+ display: inline-block;
+ position: relative;
+}
+img {
+ position: absolute; top: 0; left: 0;
+ z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
diff --git a/layout/reftests/bugs/456219-1a.html b/layout/reftests/bugs/456219-1a.html
new file mode 100644
index 0000000000..da18c89d3b
--- /dev/null
+++ b/layout/reftests/bugs/456219-1a.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+ case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+ z-index: 0;
+ width: 70px;
+ height: 70px;
+ border-style: solid;
+ border-color: green;
+ background-clip: padding-box;
+ background-color: green;
+}
+.rA div.i { border-radius: 10px; }
+.rB div.i { border-radius: 20px; }
+.rC div.i { border-radius: 30px; }
+.rD div.i { border-radius: 40px; }
+.rE div.i { border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+ display: inline-block;
+ position: relative;
+}
+img {
+ position: absolute; top: 0; left: 0;
+ z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
diff --git a/layout/reftests/bugs/456219-1b.html b/layout/reftests/bugs/456219-1b.html
new file mode 100644
index 0000000000..257f31e194
--- /dev/null
+++ b/layout/reftests/bugs/456219-1b.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+ case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+ z-index: 0;
+ width: 70px;
+ height: 70px;
+ border-style: solid;
+ border-color: green;
+ background-clip: padding-box;
+ background-image: url("data:image/gif;base64,R0lGODdhAQABAPAAAACAAAAAACwAAAAAAQABAAACAkQBADs=");
+}
+.rA div.i { border-radius: 10px; }
+.rB div.i { border-radius: 20px; }
+.rC div.i { border-radius: 30px; }
+.rD div.i { border-radius: 40px; }
+.rE div.i { border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+ display: inline-block;
+ position: relative;
+}
+img {
+ position: absolute; top: 0; left: 0;
+ z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
diff --git a/layout/reftests/bugs/456219-1c.html b/layout/reftests/bugs/456219-1c.html
new file mode 100644
index 0000000000..b9094582ff
--- /dev/null
+++ b/layout/reftests/bugs/456219-1c.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+ case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+ z-index: 0;
+ width: 70px;
+ height: 70px;
+ border-style: solid;
+ border-color: green;
+ background-clip: padding-box;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaAQMAAAACZtNBAAAAA1BMVEUAgACc+aWRAAAAEklEQVQYGWNgGAWjYBSMgsECAASSAAFZGYSDAAAAAElFTkSuQmCC");
+}
+.rA div.i { border-radius: 10px; }
+.rB div.i { border-radius: 20px; }
+.rC div.i { border-radius: 30px; }
+.rD div.i { border-radius: 40px; }
+.rE div.i { border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+ display: inline-block;
+ position: relative;
+}
+img {
+ position: absolute; top: 0; left: 0;
+ z-index: 1;
+}
+
+</style>
+</head><body>
+<table>
+<tr class="wA">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+ <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+ <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+ <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+ <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+ <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+</body></html>
diff --git a/layout/reftests/bugs/456219-2-mask.png b/layout/reftests/bugs/456219-2-mask.png
new file mode 100644
index 0000000000..ff406b3897
--- /dev/null
+++ b/layout/reftests/bugs/456219-2-mask.png
Binary files differ
diff --git a/layout/reftests/bugs/456219-2-ref.html b/layout/reftests/bugs/456219-2-ref.html
new file mode 100644
index 0000000000..bc97cd4749
--- /dev/null
+++ b/layout/reftests/bugs/456219-2-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+/* If you fix bug #466572, you can remove the IMG
+ and related styling from this test case. */
+body { background: white; color: black; margin: 0 }
+div {
+ background: aqua;
+ color: black;
+ height: 75px;
+ width: 75px;
+ padding: 15px;
+ border: 20px solid;
+ border-radius: 25px;
+ border-color: transparent;
+ background-clip: padding-box;
+}
+img {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+}
+</style>
+</head>
+<body>
+<div></div>
+<img src="456219-2-mask.png">
+</body>
+</html>
diff --git a/layout/reftests/bugs/456219-2.html b/layout/reftests/bugs/456219-2.html
new file mode 100644
index 0000000000..923a504a40
--- /dev/null
+++ b/layout/reftests/bugs/456219-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+/* If you fix bug #466572, you can remove the IMG
+ and related styling from this test case. */
+body { background: white; color: black; margin: 0 }
+div {
+ background: aqua;
+ color: black;
+ height: 75px;
+ width: 75px;
+ padding: 15px;
+ border: 20px solid;
+ border-radius: 25px;
+ border-color: white;
+}
+img {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+}
+</style>
+</head>
+<body>
+<div></div>
+<img src="456219-2-mask.png">
+</body>
+</html>
diff --git a/layout/reftests/bugs/456330-1-ref.png b/layout/reftests/bugs/456330-1-ref.png
new file mode 100644
index 0000000000..3f1445ab11
--- /dev/null
+++ b/layout/reftests/bugs/456330-1-ref.png
Binary files differ
diff --git a/layout/reftests/bugs/456330-1.gif b/layout/reftests/bugs/456330-1.gif
new file mode 100644
index 0000000000..0829b64887
--- /dev/null
+++ b/layout/reftests/bugs/456330-1.gif
Binary files differ
diff --git a/layout/reftests/bugs/456484-1-ref.html b/layout/reftests/bugs/456484-1-ref.html
new file mode 100644
index 0000000000..cc8f9ed69b
--- /dev/null
+++ b/layout/reftests/bugs/456484-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Inside block shrinkwraps when outside inline-block has scrollframe</title>
+<style>
+div {
+ border: 1px solid black;
+}
+</style>
+</head>
+<body>
+
+<div style="display: inline-block; width: 500px; background-color: red;">
+<div style="background-color: lime;">
+div
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/456484-1.html b/layout/reftests/bugs/456484-1.html
new file mode 100644
index 0000000000..58c1d5829d
--- /dev/null
+++ b/layout/reftests/bugs/456484-1.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Inside block shrinkwraps when outside inline-block has scrollframe</title>
+<style>
+div {
+ border: 1px solid black;
+}
+</style>
+</head>
+<body>
+
+<div style="display: inline-block; width: 500px; overflow: auto; background-color: red;">
+<div style="background-color: lime;">
+div
+</div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/457398-1-ref.html b/layout/reftests/bugs/457398-1-ref.html
new file mode 100644
index 0000000000..de5db31db1
--- /dev/null
+++ b/layout/reftests/bugs/457398-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+span { color: green; }
+</style></head>
+<body>
+<div><span>T</span>est</div>
+<div style="float:left; width:100px; height:200px; background:yellow;"></div>
+<div style="clear:both"><span>T</span>est</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/457398-1.html b/layout/reftests/bugs/457398-1.html
new file mode 100644
index 0000000000..4576e1d42e
--- /dev/null
+++ b/layout/reftests/bugs/457398-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div::first-letter { color: green; }
+</style></head>
+<body>
+<div style="width:0"> <span></span>Test</div>
+<span style="float:left; width:100px; height:200px; background:yellow;"></span>
+<div style="width:0"> <span></span>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/457398-2-ref.html b/layout/reftests/bugs/457398-2-ref.html
new file mode 100644
index 0000000000..25a03a0202
--- /dev/null
+++ b/layout/reftests/bugs/457398-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+span { display:inline-block; width:20px; }
+</style></head>
+<body>
+<div><span></span>Test</div>
+<div style="float:left; width:100px; height:200px; background:yellow;"></div>
+<div style="clear:both"><span></span>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/457398-2.html b/layout/reftests/bugs/457398-2.html
new file mode 100644
index 0000000000..1951ce0aab
--- /dev/null
+++ b/layout/reftests/bugs/457398-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div { text-indent:20px; }
+</style></head>
+<body>
+<div style="width:0"> <span></span>Test</div>
+<span style="float:left; width:100px; height:200px; background:yellow;"></span>
+<div style="width:0"> <span></span>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458296-1-ref.html b/layout/reftests/bugs/458296-1-ref.html
new file mode 100644
index 0000000000..8ba9e6194b
--- /dev/null
+++ b/layout/reftests/bugs/458296-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:auto; width:300px; height:300px; background:green;">
+ <div style="height:100px;"></div>
+ <div style="height:200px; margin-left:100px; margin-right:100px; width:100px; background:yellow;"></div>
+ <div style="height:100px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458296-1a.html b/layout/reftests/bugs/458296-1a.html
new file mode 100644
index 0000000000..e5edd2a0f9
--- /dev/null
+++ b/layout/reftests/bugs/458296-1a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:auto; width:100px; height:100px; padding:100px; background:green;">
+ <div style="height:200px; width:100px; background:yellow;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458296-1b.html b/layout/reftests/bugs/458296-1b.html
new file mode 100644
index 0000000000..f56f55e44a
--- /dev/null
+++ b/layout/reftests/bugs/458296-1b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:auto; width:300px; height:300px; background:green;">
+ <div style="height:200px; width:100px; margin:100px; background:yellow;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458296-1c.html b/layout/reftests/bugs/458296-1c.html
new file mode 100644
index 0000000000..98bbf4bdee
--- /dev/null
+++ b/layout/reftests/bugs/458296-1c.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:auto; width:300px; height:300px; background:green;">
+ <div style="height:100px; margin-top:100px;">
+ <div style="height:200px; margin-left:100px; width:100px; margin-bottom:100px; margin-right:100px; background:yellow;"></div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458296-1d.html b/layout/reftests/bugs/458296-1d.html
new file mode 100644
index 0000000000..9a72de2ce5
--- /dev/null
+++ b/layout/reftests/bugs/458296-1d.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:auto; width:300px; height:300px; background:green;">
+ <div style="height:200px; margin:100px; width:100px; float:left; background:yellow;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-1-ref.html b/layout/reftests/bugs/458487-1-ref.html
new file mode 100644
index 0000000000..edbae0dd0c
--- /dev/null
+++ b/layout/reftests/bugs/458487-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; top:30px; left:30px;
+ background: url(mozilla-banner.gif) no-repeat; width:600px; height:100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-1a.html b/layout/reftests/bugs/458487-1a.html
new file mode 100644
index 0000000000..45990bc587
--- /dev/null
+++ b/layout/reftests/bugs/458487-1a.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="margin:30px; border:30px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat;
+ background-origin: border-box; height:100px;">
+</html>
diff --git a/layout/reftests/bugs/458487-1b.html b/layout/reftests/bugs/458487-1b.html
new file mode 100644
index 0000000000..53f089de92
--- /dev/null
+++ b/layout/reftests/bugs/458487-1b.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="border:30px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat;
+ background-origin: padding-box; height:100px;">
+</html>
diff --git a/layout/reftests/bugs/458487-1c.html b/layout/reftests/bugs/458487-1c.html
new file mode 100644
index 0000000000..ebc08f607b
--- /dev/null
+++ b/layout/reftests/bugs/458487-1c.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html style="padding:30px; background: url(mozilla-banner.gif) no-repeat;
+ background-origin: content-box; height:100px;">
+</html>
diff --git a/layout/reftests/bugs/458487-1d.html b/layout/reftests/bugs/458487-1d.html
new file mode 100644
index 0000000000..477700f4d7
--- /dev/null
+++ b/layout/reftests/bugs/458487-1d.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html style="background: url(mozilla-banner.gif) no-repeat;
+ background-position:100% 30px; height:100px; width:630px;">
+</html>
diff --git a/layout/reftests/bugs/458487-1e.html b/layout/reftests/bugs/458487-1e.html
new file mode 100644
index 0000000000..c1eeae80fb
--- /dev/null
+++ b/layout/reftests/bugs/458487-1e.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="margin:30px; border:30px solid rgba(0,0,0,0); height:100px;">
+<body style="background: url(mozilla-banner.gif) no-repeat; background-origin: border-box;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-1f.html b/layout/reftests/bugs/458487-1f.html
new file mode 100644
index 0000000000..37ff3ef2ad
--- /dev/null
+++ b/layout/reftests/bugs/458487-1f.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="border:30px solid rgba(0,0,0,0); height:100px;">
+<body style="background: url(mozilla-banner.gif) no-repeat; background-origin: padding-box;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-1g.html b/layout/reftests/bugs/458487-1g.html
new file mode 100644
index 0000000000..5570443046
--- /dev/null
+++ b/layout/reftests/bugs/458487-1g.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="padding:30px; height:100px;">
+<body style="background: url(mozilla-banner.gif) no-repeat; background-origin: content-box;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-1h.html b/layout/reftests/bugs/458487-1h.html
new file mode 100644
index 0000000000..e9fdc8ba0c
--- /dev/null
+++ b/layout/reftests/bugs/458487-1h.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="height:100px; width:630px;">
+<body style="background: url(mozilla-banner.gif) no-repeat; background-position:100% 30px;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-2-ref.html b/layout/reftests/bugs/458487-2-ref.html
new file mode 100644
index 0000000000..5d4ec7000c
--- /dev/null
+++ b/layout/reftests/bugs/458487-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div { width:198px; overflow:hidden; background: url(mozilla-banner.gif) no-repeat; height:100px; border:1px solid; }
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-2.html b/layout/reftests/bugs/458487-2.html
new file mode 100644
index 0000000000..0fe2e5845d
--- /dev/null
+++ b/layout/reftests/bugs/458487-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div { width:198.2px; background: url(mozilla-banner.gif) no-repeat; height:100px; border:1px solid; }
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-3-iframe.html b/layout/reftests/bugs/458487-3-iframe.html
new file mode 100644
index 0000000000..2bd2ebbe41
--- /dev/null
+++ b/layout/reftests/bugs/458487-3-iframe.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0;">
+<img src="mozilla-banner.gif">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-3-ref.html b/layout/reftests/bugs/458487-3-ref.html
new file mode 100644
index 0000000000..a4f0a5a34e
--- /dev/null
+++ b/layout/reftests/bugs/458487-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img src="mozilla-banner.gif" style="margin-left:100px;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-3.html b/layout/reftests/bugs/458487-3.html
new file mode 100644
index 0000000000..9cb42bc5c4
--- /dev/null
+++ b/layout/reftests/bugs/458487-3.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<iframe style="margin-left:100px; border:none; width:650px; height:150px;" src="458487-3-iframe.html"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-4-ref.html b/layout/reftests/bugs/458487-4-ref.html
new file mode 100644
index 0000000000..2fb2c23320
--- /dev/null
+++ b/layout/reftests/bugs/458487-4-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<html style="background: url(mozilla-banner.gif) no-repeat;">
+</html>
diff --git a/layout/reftests/bugs/458487-4a.html b/layout/reftests/bugs/458487-4a.html
new file mode 100644
index 0000000000..c537eab79b
--- /dev/null
+++ b/layout/reftests/bugs/458487-4a.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="margin:30px; border:30px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat fixed;
+ background-origin: border-box; height:10px;">
+</html>
diff --git a/layout/reftests/bugs/458487-4b.html b/layout/reftests/bugs/458487-4b.html
new file mode 100644
index 0000000000..231fe904b9
--- /dev/null
+++ b/layout/reftests/bugs/458487-4b.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html style="border:30px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat fixed;
+ background-origin: padding-box; height:10px;">
+</html>
diff --git a/layout/reftests/bugs/458487-4c.html b/layout/reftests/bugs/458487-4c.html
new file mode 100644
index 0000000000..6e6503e680
--- /dev/null
+++ b/layout/reftests/bugs/458487-4c.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html style="margin:30px; border:30px solid rgba(0,0,0,0); height:10px;">
+<body style="background: url(mozilla-banner.gif) no-repeat fixed;
+ background-origin: border-box;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-5-ref.html b/layout/reftests/bugs/458487-5-ref.html
new file mode 100644
index 0000000000..2df5bb05cf
--- /dev/null
+++ b/layout/reftests/bugs/458487-5-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; left:20px; top:20px; height:20px; width:600px;
+ background: url(mozilla-banner.gif) no-repeat;
+ background-position:-20px -20px;">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-5a.html b/layout/reftests/bugs/458487-5a.html
new file mode 100644
index 0000000000..d9ea89fee0
--- /dev/null
+++ b/layout/reftests/bugs/458487-5a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0">
+<div style="margin:20px; border:10px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat fixed;
+ background-origin: border-box; height:0px;">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/458487-5b.html b/layout/reftests/bugs/458487-5b.html
new file mode 100644
index 0000000000..19abacc6a3
--- /dev/null
+++ b/layout/reftests/bugs/458487-5b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0">
+<div style="margin:20px; border:10px solid rgba(0,0,0,0);
+ background: url(mozilla-banner.gif) no-repeat fixed;
+ background-origin: padding-box; height:0px;">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/459443-1-ref.html b/layout/reftests/bugs/459443-1-ref.html
new file mode 100644
index 0000000000..b731831e84
--- /dev/null
+++ b/layout/reftests/bugs/459443-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <iframe src="data:text/html,<body>PASS</body>"></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/459443-1.html b/layout/reftests/bugs/459443-1.html
new file mode 100644
index 0000000000..c2d6412296
--- /dev/null
+++ b/layout/reftests/bugs/459443-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body onload="loaded()">
+ <iframe id="foo"></iframe>
+ <script type="text/javascript">
+ function loaded() {
+ dump("459443-1.html: Entering loaded()\n");
+ var n = document.getElementById('foo');
+
+ // Just to detect if/when the iframe might be firing its load event
+ // before we set up its final className-clearing load event handler:
+ n.addEventListener("load",
+ function() {
+ dump("459443-1.html: Entering n initial " +
+ "no-op load callback\n");});
+
+ var f = n.contentWindow;
+ f.document.open();
+ f.document.write('');
+ f.onload = function() {
+ dump("459443-1.html: Entering f.onload callback\n");
+ f.document.designMode = 'on';
+ setTimeout(function() {
+ dump("459443-1.html: Entering setTimeout callback\n");
+ f.document.designMode='on';
+ f.location = 'data:text/html;charset=utf-8,<body>FAIL<script>document.body.innerHTML="PASS"<\/script>';
+ n.addEventListener("load",
+ function() {
+ dump("459443-1.html: Entering n final " +
+ "load callback; clearing className\n");
+ document.documentElement.className = ''; });
+ }, 0);
+ };
+ f.document.close();
+ }
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/459613-1-ref.html b/layout/reftests/bugs/459613-1-ref.html
new file mode 100644
index 0000000000..13c158f42d
--- /dev/null
+++ b/layout/reftests/bugs/459613-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+notaword
+</body>
+</html>
diff --git a/layout/reftests/bugs/459613-1.html b/layout/reftests/bugs/459613-1.html
new file mode 100644
index 0000000000..ecbf467e1d
--- /dev/null
+++ b/layout/reftests/bugs/459613-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body onload="document.getElementById('d').removeAttribute('contenteditable')">
+<div id="d" contenteditable>notaword</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/460012-1-ref.html b/layout/reftests/bugs/460012-1-ref.html
new file mode 100644
index 0000000000..59f913c000
--- /dev/null
+++ b/layout/reftests/bugs/460012-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div><span style="border:1px solid red">Y</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/460012-1.html b/layout/reftests/bugs/460012-1.html
new file mode 100644
index 0000000000..92d9e2c71f
--- /dev/null
+++ b/layout/reftests/bugs/460012-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div:after { content: 'X'; border:1px solid red; }
+div.foo:after { content: 'Y'; }
+</style>
+</head>
+<body>
+<div id="d"></div>
+<script>
+document.body.offsetTop;
+document.getElementById("d").setAttribute("class", "foo");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/461266-1-ref.html b/layout/reftests/bugs/461266-1-ref.html
new file mode 100644
index 0000000000..3afa70d30a
--- /dev/null
+++ b/layout/reftests/bugs/461266-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase for bug 461266</title>
+ <style type="text/css">
+ div {
+ height: 100px; width: 100px;
+ background-color: blue;
+ float: right;
+ }
+ </style>
+</head>
+
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/461266-1.html b/layout/reftests/bugs/461266-1.html
new file mode 100644
index 0000000000..08d45520f4
--- /dev/null
+++ b/layout/reftests/bugs/461266-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Testcase for bug 461266</title>
+ <style type="text/css">
+ div { height: 100px; width: 100px; }
+
+ @media all and (min-width:0) {}
+ div { background-color: blue; }
+
+ /* This line stops parsing of following selectors */
+ @media all and(min-width:0) {}
+ div { float: right; }
+ </style>
+</head>
+
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/461512-1-ref.html b/layout/reftests/bugs/461512-1-ref.html
new file mode 100644
index 0000000000..f4645d596e
--- /dev/null
+++ b/layout/reftests/bugs/461512-1-ref.html
@@ -0,0 +1,68 @@
+<html>
+ <head>
+ <style type="text/css">
+ body { background-color: white; margin: 0; padding: 0; }
+ div.mask {
+ position: absolute;
+ width: 10px;
+ height: 10px;
+ background-color: white;
+ }
+ div.tr {
+ right: 10px;
+ }
+ div.tl {
+ left: 10px;
+ }
+ div.bl {
+ left: 10px;
+ margin-top: 20px;
+ }
+ div.br {
+ right: 10px;
+ margin-top: 20px;
+ }
+ p {
+ margin: 10px;
+ padding: 0;
+ border: 10px solid rgb(227, 207, 187);
+ height: 10px;
+ }
+ p.groove, p.ridge {
+ border-width: 5px;
+ height: 20px;
+ }
+ p.groove > span, p.ridge > span {
+ border: 5px solid;
+ margin: 0;
+ padding: 0;
+ display: block;
+ height: 10px;
+ }
+ p.inset, p.groove, p.ridge > span {
+ border-color: rgb(194, 180, 167) rgb(227, 207, 187) rgb(227, 207, 187) rgb(194, 180, 167);
+ }
+ p.outset, p.ridge, p.groove > span {
+ border-color: rgb(227, 207, 187) rgb(194, 180, 167) rgb(194, 180, 167) rgb(227, 207, 187);
+ }
+ </style>
+ </head>
+ <body>
+ <p style="border-style: solid;">&nbsp;</p>
+ <!-- <p style="border-style: dashed;">&nbsp;</p> -->
+ <!-- <p style="border-style: dotted;">&nbsp;</p> -->
+ <p style="border-style: double;">&nbsp;</p>
+ <div class="mask tr"></div>
+ <div class="mask bl"></div>
+ <p class="ridge"><span>&nbsp;</span></p>
+ <div class="mask tr"></div>
+ <div class="mask bl"></div>
+ <p class="groove"><span>&nbsp;</span></p>
+ <div class="mask tr"></div>
+ <div class="mask bl"></div>
+ <p class="inset">&nbsp;</p>
+ <div class="mask tr"></div>
+ <div class="mask bl"></div>
+ <p class="outset">&nbsp;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/461512-1.html b/layout/reftests/bugs/461512-1.html
new file mode 100644
index 0000000000..627c7f3924
--- /dev/null
+++ b/layout/reftests/bugs/461512-1.html
@@ -0,0 +1,59 @@
+<html>
+ <head>
+ <style type="text/css">
+ body { background-color: white; margin: 0; padding: 0; }
+ p {
+ margin: 10px;
+ padding: 0;
+ border: 10px solid rgba(200, 160, 120, 0.5);
+ height: 10px;
+ }
+
+ /**
+ * XXX we cannot test the corner by this testing because when the corner
+ * is joined with anti-aliased, the edge isn't matching with the
+ * reference. The dashed and dotted line's anti-aliasing are same.
+ */
+
+ /* Cover the coners by the white div element */
+ div {
+ position: absolute;
+ width: 10px;
+ height: 10px;
+ background-color: white;
+ }
+ div.tr {
+ right: 10px;
+ }
+ div.tl {
+ left: 10px;
+ }
+ div.bl {
+ left: 10px;
+ margin-top: 20px;
+ }
+ div.br {
+ right: 10px;
+ margin-top: 20px;
+ }
+ </style>
+ </head>
+ <body>
+ <p style="border-style: solid;">&nbsp;</p>
+ <!-- <p style="border-style: dashed;">&nbsp;</p> -->
+ <!-- <p style="border-style: dotted;">&nbsp;</p> -->
+ <p style="border-style: double;">&nbsp;</p>
+ <div class="tr"></div>
+ <div class="bl"></div>
+ <p style="border-style: ridge;">&nbsp;</p>
+ <div class="tr"></div>
+ <div class="bl"></div>
+ <p style="border-style: groove;">&nbsp;</p>
+ <div class="tr"></div>
+ <div class="bl"></div>
+ <p style="border-style: inset;">&nbsp;</p>
+ <div class="tr"></div>
+ <div class="bl"></div>
+ <p style="border-style: outset;">&nbsp;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/462844-1.html b/layout/reftests/bugs/462844-1.html
new file mode 100644
index 0000000000..e13d9e610d
--- /dev/null
+++ b/layout/reftests/bugs/462844-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 462844</title>
+<div style="position: relative">
+ <div style="display:inline">
+ <div style="height: 100px"></div>
+ <div style="background: aqua; height: 20px;"></div>
+ <div style="display:block; position: absolute; top: auto; left: 0; background: yellow;">Should be just below aqua block</div>
+ <div style="height: 100px"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/462844-2.html b/layout/reftests/bugs/462844-2.html
new file mode 100644
index 0000000000..2f8761e325
--- /dev/null
+++ b/layout/reftests/bugs/462844-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 462844</title>
+<div style="position: relative">
+ <div style="display:inline">
+ <div style="height: 100px"></div>
+ <div style="background: aqua; height: 20px;"></div>
+ <div style="display:inline; position: absolute; top: auto; left: 0; background: yellow;">Should be just below aqua block</div>
+ <div style="height: 100px"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/462844-3.html b/layout/reftests/bugs/462844-3.html
new file mode 100644
index 0000000000..3913d620e1
--- /dev/null
+++ b/layout/reftests/bugs/462844-3.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 462844</title>
+<div style="position: relative">
+ <div>
+ <div style="height: 100px"></div>
+ <div style="background: aqua; height: 20px;"></div>
+ <div style="display:block; position: absolute; top: auto; left: 0; background: yellow;">Should be just below aqua block</div>
+ <div style="height: 100px"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/462844-4.html b/layout/reftests/bugs/462844-4.html
new file mode 100644
index 0000000000..3913d620e1
--- /dev/null
+++ b/layout/reftests/bugs/462844-4.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 462844</title>
+<div style="position: relative">
+ <div>
+ <div style="height: 100px"></div>
+ <div style="background: aqua; height: 20px;"></div>
+ <div style="display:block; position: absolute; top: auto; left: 0; background: yellow;">Should be just below aqua block</div>
+ <div style="height: 100px"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/462844-ref.html b/layout/reftests/bugs/462844-ref.html
new file mode 100644
index 0000000000..f15b405237
--- /dev/null
+++ b/layout/reftests/bugs/462844-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 462844</title>
+<div style="height: 100px"></div>
+<div style="background: aqua; height: 20px;"></div>
+<div style="display:block; background: yellow; width: -moz-fit-content">Should be just below aqua block</div>
diff --git a/layout/reftests/bugs/463204-1-ref.html b/layout/reftests/bugs/463204-1-ref.html
new file mode 100644
index 0000000000..59e5eabe2b
--- /dev/null
+++ b/layout/reftests/bugs/463204-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span {
+ background-image: url(data:image/gif;base64,R0lGODlhEwATAKIAAP//AMzMADMzAP8AAAAAAP///wAAAAAAACH5BAEAAAUALAAAAAATABMAAANWWLrUTisyEoC1oUlFr8dQRHykFRad+Y0gdzlv86KVKdsskOUAjHu312rFK5FuxaMNIMgYe85GrVfKZVDAR7DHmVoG4IHn6vqEgZLU90xOq8OazUS7SQAAOw==);
+ display: inline-block;
+ width: 19px;
+ height: 19px;
+ margin-left: 1px;
+}
+</style>
+</head>
+<body>
+<span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/463204-1.html b/layout/reftests/bugs/463204-1.html
new file mode 100644
index 0000000000..3ba91abaa1
--- /dev/null
+++ b/layout/reftests/bugs/463204-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span {
+ background-image: url(data:image/gif;base64,R0lGODlhEwATAKIAAP//AMzMADMzAP8AAAAAAP///wAAAAAAACH5BAEAAAUALAAAAAATABMAAANWWLrUTisyEoC1oUlFr8dQRHykFRad+Y0gdzlv86KVKdsskOUAjHu312rFK5FuxaMNIMgYe85GrVfKZVDAR7DHmVoG4IHn6vqEgZLU90xOq8OazUS7SQAAOw==);
+ display: inline-block;
+ background-repeat: no-repeat;
+ background-position: center center;
+ width: 19px;
+ height: 19px;
+ margin-left: 0.6px;
+}
+</style>
+</head>
+<body>
+<span></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/463217-1-ref.xhtml b/layout/reftests/bugs/463217-1-ref.xhtml
new file mode 100644
index 0000000000..b099b97936
--- /dev/null
+++ b/layout/reftests/bugs/463217-1-ref.xhtml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="border:2px solid blue;" flex="0">
+ <image style="list-style-image: url(mozilla-banner.gif);"/>
+ </vbox>
+ <vbox/>
+</window>
diff --git a/layout/reftests/bugs/463217-1.xhtml b/layout/reftests/bugs/463217-1.xhtml
new file mode 100644
index 0000000000..4a0bf93342
--- /dev/null
+++ b/layout/reftests/bugs/463217-1.xhtml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <image style="border:2px solid blue; list-style-image: url(mozilla-banner.gif);"/>
+</window>
diff --git a/layout/reftests/bugs/463952-1-ref.html b/layout/reftests/bugs/463952-1-ref.html
new file mode 100644
index 0000000000..f90bb9bfc2
--- /dev/null
+++ b/layout/reftests/bugs/463952-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background: url(square-outline-32x32.png) repeat-x; width:200px; height:100px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/463952-1.html b/layout/reftests/bugs/463952-1.html
new file mode 100644
index 0000000000..5132674ad9
--- /dev/null
+++ b/layout/reftests/bugs/463952-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table style="width:200px;" cellpadding="0" cellspacing="0">
+ <tr style="background: url(square-outline-32x32.png) repeat-x;">
+ <td style="height:100px;">
+ <td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/464811-1-ref.html b/layout/reftests/bugs/464811-1-ref.html
new file mode 100644
index 0000000000..daf09b483b
--- /dev/null
+++ b/layout/reftests/bugs/464811-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background:url(mozilla-banner.gif); width:600px; height:58px;"></div>
+<div style="margin-left: 100px; background:url(mozilla-banner.gif) -100px 0px; width:1px; height:58px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/464811-1.html b/layout/reftests/bugs/464811-1.html
new file mode 100644
index 0000000000..8d20db8f11
--- /dev/null
+++ b/layout/reftests/bugs/464811-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background:url(mozilla-banner.gif); width:600px; height:58px;"></div>
+<div style="margin-left: 100.4px; background:url(mozilla-banner.gif) -100.4px 0px; width:0.2px; height:58px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/465574-1-ref.html b/layout/reftests/bugs/465574-1-ref.html
new file mode 100644
index 0000000000..797def1f37
--- /dev/null
+++ b/layout/reftests/bugs/465574-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Testcase</title>
+ <style>
+ table[dir="rtl"] {
+ background-color: #CCF;
+ /*
+ Add a left margin for the 1-appunit <br> hack in bug 1242781
+ The margin should be removed after bug 421436 is fixed
+ */
+ margin-left: 0.016667px;
+ }
+ table[dir="ltr"] {background-color: #FCC}
+ </style>
+ </head>
+ <body>
+ 1<table dir="ltr"><tr><td><span>lorem ipsum</span></td></tr></table>
+ 2<table dir="rtl"><tr><td><span>lorem ipsum</span></td></tr></table>
+ 3<table dir="ltr"><tr><td><span>×œ×•×¨× ×יפסו×</span></td></tr></table>
+ 4<table dir="rtl"><tr><td><span>×œ×•×¨× ×יפסו×</span></td></tr></table>
+ 5<table dir="ltr"><tr><td>lorem ipsum<span></span></td></tr></table>
+ 6<table dir="rtl"><tr><td>×œ×•×¨× ×יפסו×<span></span></td></tr></table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/465574-1.html b/layout/reftests/bugs/465574-1.html
new file mode 100644
index 0000000000..e5b8361305
--- /dev/null
+++ b/layout/reftests/bugs/465574-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Testcase</title>
+ <style>
+ table[dir="rtl"] {background-color: #CCF}
+ table[dir="ltr"] {background-color: #FCC}
+ </style>
+ </head>
+ <body>
+ 1<table dir="ltr"><tr><td><span>lorem ipsum<br></span></td></tr></table>
+ 2<table dir="rtl"><tr><td><span>lorem ipsum<br></span></td></tr></table>
+ 3<table dir="ltr"><tr><td><span>×œ×•×¨× ×יפסו×<br></span></td></tr></table>
+ 4<table dir="rtl"><tr><td><span>×œ×•×¨× ×יפסו×<br></span></td></tr></table>
+ 5<table dir="ltr"><tr><td>lorem ipsum<span><br></span></td></tr></table>
+ 6<table dir="rtl"><tr><td>×œ×•×¨× ×יפסו×<span><br></span></td></tr></table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/466258-1-ref.html b/layout/reftests/bugs/466258-1-ref.html
new file mode 100644
index 0000000000..387c8c6f60
--- /dev/null
+++ b/layout/reftests/bugs/466258-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background-position:-590px 0;
+ background-image: url(mozilla-banner.gif);
+ width:10px; height:58px; float:left;">
+</div>
+<div style="background-image: url(mozilla-banner.gif);
+ width:590px; height:58px; float:left;">
+</div>
+</html>
diff --git a/layout/reftests/bugs/466258-1.html b/layout/reftests/bugs/466258-1.html
new file mode 100644
index 0000000000..f7cf89c39a
--- /dev/null
+++ b/layout/reftests/bugs/466258-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="background-position:10px 0;
+ background-image: url(mozilla-banner.gif);
+ width:600px; height:58px;">
+</div>
+</html>
diff --git a/layout/reftests/bugs/466395-1-ref.html b/layout/reftests/bugs/466395-1-ref.html
new file mode 100644
index 0000000000..e794afc9a9
--- /dev/null
+++ b/layout/reftests/bugs/466395-1-ref.html
@@ -0,0 +1,2 @@
+<title>Testcase, bug 466395</title>
+&nbsp;hello
diff --git a/layout/reftests/bugs/466395-1.html b/layout/reftests/bugs/466395-1.html
new file mode 100644
index 0000000000..2a459b3fc8
--- /dev/null
+++ b/layout/reftests/bugs/466395-1.html
@@ -0,0 +1,8 @@
+<title>Testcase, bug 466395</title>
+<div style="overflow:hidden;height:500px;width:500px">
+ <div style="display: inline-block; height: 10px">
+ &nbsp;hello
+ <div style="height: 10000px"></div>
+ goodbye
+ </div>
+</div>
diff --git a/layout/reftests/bugs/466395-2-ref.html b/layout/reftests/bugs/466395-2-ref.html
new file mode 100644
index 0000000000..6672667dfb
--- /dev/null
+++ b/layout/reftests/bugs/466395-2-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 466395</title>
+&nbsp;hello
diff --git a/layout/reftests/bugs/466395-2.html b/layout/reftests/bugs/466395-2.html
new file mode 100644
index 0000000000..3e9e5983c7
--- /dev/null
+++ b/layout/reftests/bugs/466395-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 466395</title>
+<div style="overflow:hidden;height:500px;width:500px">
+ <div style="display: inline-block; height: 10px">
+ &nbsp;hello
+ <div style="height: 10000px"></div>
+ goodbye
+ </div>
+</div>
diff --git a/layout/reftests/bugs/467084-1-ref.html b/layout/reftests/bugs/467084-1-ref.html
new file mode 100644
index 0000000000..d1fa6a29b6
--- /dev/null
+++ b/layout/reftests/bugs/467084-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<title>Testcase for side issue in bug 467084</title>
+<style type="text/css">
+
+div { background: yellow; }
+select {
+ margin: 2em 0; /* be bigger than the line-height */
+ visibility: hidden;
+}
+option { height: 1px; min-height: 0; }
+
+</style>
+<div>
+<select size="3">
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+</select>
+</div>
diff --git a/layout/reftests/bugs/467084-1.html b/layout/reftests/bugs/467084-1.html
new file mode 100644
index 0000000000..aca317d7f5
--- /dev/null
+++ b/layout/reftests/bugs/467084-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<title>Testcase for side issue in bug 467084</title>
+<style type="text/css">
+
+div { background: yellow; padding-bottom: 3px; }
+select {
+ margin: 2em 0; /* be bigger than the line-height */
+ visibility: hidden;
+}
+option { height: 0; min-height: 0; }
+
+</style>
+<div>
+<select size="3">
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+</select>
+</div>
diff --git a/layout/reftests/bugs/467084-2-ref.html b/layout/reftests/bugs/467084-2-ref.html
new file mode 100644
index 0000000000..e09caca520
--- /dev/null
+++ b/layout/reftests/bugs/467084-2-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase for side issue in bug 467084</title>
+<style type="text/css">
+
+select { font-size: 50px; }
+
+</style>
+<select size="3">
+ <option></option>
+</select>
diff --git a/layout/reftests/bugs/467084-2.html b/layout/reftests/bugs/467084-2.html
new file mode 100644
index 0000000000..8a13222f19
--- /dev/null
+++ b/layout/reftests/bugs/467084-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>Testcase for side issue in bug 467084</title>
+<style type="text/css">
+
+option { font-size: 50px; }
+
+</style>
+<select size="3">
+ <option></option>
+</select>
diff --git a/layout/reftests/bugs/467444-1-ref.html b/layout/reftests/bugs/467444-1-ref.html
new file mode 100644
index 0000000000..a5a17181d7
--- /dev/null
+++ b/layout/reftests/bugs/467444-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged"><head>
+<style>
+div.spacer {
+ height: 5px;
+ width: 10px;
+}
+img, td.spacer {
+ height: 140px;
+ width: 30px;
+}
+</style>
+<title>rowspan pagination</title>
+</head>
+<body>
+ <div class="spacer"> </div>
+ <table>
+ <tbody>
+ <tr><td class="spacer"></td></tr>
+ <tr style="page-break-before:always">
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/467444-1.html b/layout/reftests/bugs/467444-1.html
new file mode 100644
index 0000000000..6f28fdf216
--- /dev/null
+++ b/layout/reftests/bugs/467444-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged"><head>
+<style>
+@page { size:5in 3in; margin:0.5in; }
+div.spacer {
+ height: 5px;
+ width: 10px;
+}
+img, td.spacer {
+ height: 140px;
+ width: 30px;
+}
+</style>
+<title>rowspan pagination</title>
+</head>
+<body>
+ <div class="spacer"> </div>
+ <table>
+ <tbody>
+ <tr><td class="spacer"></td></tr>
+ <tr>
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/467460-1-ref.html b/layout/reftests/bugs/467460-1-ref.html
new file mode 100644
index 0000000000..d12b5294eb
--- /dev/null
+++ b/layout/reftests/bugs/467460-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+ <div style="transform: translate(50px, 50px); border: 1px solid red; width: 7ch;">
+ A
+ <div id="f" style="left: 50px; top: 100px; border: 1px solid blue; width: 7ch; position: fixed;">
+ 0
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/467460-1.html b/layout/reftests/bugs/467460-1.html
new file mode 100644
index 0000000000..cbef8e92da
--- /dev/null
+++ b/layout/reftests/bugs/467460-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+
+function m()
+{
+ document.getElementById("f").style.position = "fixed";
+}
+
+</script>
+</head>
+<body onload="m();">
+ <div style="transform: translate(50px, 50px); border: 1px solid red; width: 7ch;">
+ A
+ <div id="f" style="left: 50px; top: 100px; border: 1px solid blue; width: 7ch;">
+ 0
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/468473-1-ref.xhtml b/layout/reftests/bugs/468473-1-ref.xhtml
new file mode 100644
index 0000000000..5969b67aa0
--- /dev/null
+++ b/layout/reftests/bugs/468473-1-ref.xhtml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<window title="Missing repaint when using border-image on a XUL button"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox>
+<button label="Button" style="min-width: 0; -moz-appearance: none; border: medium solid; padding: 0; margin: 0; visibility:hidden; border-width: 0 8px;"/>
+<box flex="1" style="background: green" />
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/468473-1.xhtml b/layout/reftests/bugs/468473-1.xhtml
new file mode 100644
index 0000000000..6646a7c83d
--- /dev/null
+++ b/layout/reftests/bugs/468473-1.xhtml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<window title="Missing repaint when using border-image on a XUL button"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox>
+<button label="Button" style="min-width: 0; -moz-appearance: none; border-width: 0; padding: 0; margin: 0; visibility:hidden; border-width: 0 8px; border-style: solid; border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAARCAMAAADnhAzLAAAAsVBMVEUAAAAAAAAAAAD///////8QEBAAAAAHBwcQEBD///8GBgYAAAAAAAAAAAAAAAAODg4AAAA2NjYAAAAAAAAGBgYREREAAAAQEBAAAAA4ODiJiYkSEhIAAADExMQAAAAICAhra2stLS0ODg4JCQklJSX///8HBwcGBgb///////98fHz///////+hoaE4ODj////////e3t6np6dxcXFUVFROTk7///////////////////+i+RpeAAAAO3RSTlNKAEwHAlBRbU8Ff2heWVdcZyFPTX1MZE5VIGpIVFdOXFhVWFdaQWp4El1tIGp6YBhhjYNxbWwnVXeDhIrUVQ0AAACvSURBVHheXdDXDoJAEIXhMztL73ZRFBXE3vv7P5hrognrfzdfMjcHRJIT22q5bsuyE5ZEIIe7lecHYRj4XtVlhyA5inuNplA1G704Yglud0yBb8LstBn9uYla5ryPwRBawwFmI51GM4yFTmKMKfQUTKCnIP9/zJEVOhUZytSoi5GWWCxXNTNWywVovdnufrLbbtYEov3heDpfrtfL+XQ87OlDJG/3x/P1ej7uN6nON0ZMDbf0SRXfAAAAAElFTkSuQmCC) 0 8 fill;"/>
+<box flex="1" style="background: green" />
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/471356-1-ref.html b/layout/reftests/bugs/471356-1-ref.html
new file mode 100644
index 0000000000..531ebdd6d3
--- /dev/null
+++ b/layout/reftests/bugs/471356-1-ref.html
@@ -0,0 +1,11 @@
+<!--quirks mode-->
+<html style="height: 300px;
+ margin: 1px 0 2px 0; padding: 4px 0 8px 0;">
+<head>
+ <title>Testcase, bug 471356 / bug 243519</title>
+</head>
+<body style="margin: 16px 0 32px 0; padding: 64px 0 128px 0;">
+ <div style="background: blue; height: 30px">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/471356-1.html b/layout/reftests/bugs/471356-1.html
new file mode 100644
index 0000000000..becdc477a6
--- /dev/null
+++ b/layout/reftests/bugs/471356-1.html
@@ -0,0 +1,23 @@
+<!--quirks mode-->
+
+<!--
+ It's not clear that this is desired behavior, but I'm adding a test
+ for it because bug 243519 *accidentally* regressed it.
+
+ We're testing here that quirks mode percentage height calculation
+ subtracts the margin, padding, and border of the BODY element when the
+ basis for that percentage height is a specified non-auto height on the
+ HTML element.
+-->
+<html style="height: 300px;
+ margin: 1px 0 2px 0; padding: 4px 0 8px 0;">
+<head>
+ <title>Testcase, bug 471356 / bug 243519</title>
+</head>
+<body style="margin: 16px 0 32px 0; padding: 64px 0 128px 0;">
+ <!-- basis for percentage is 300px - (16px + 32px + 64px + 128px)
+ == 60px -->
+ <div style="background: blue; height: 50%">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/472500-1-ref.xhtml b/layout/reftests/bugs/472500-1-ref.xhtml
new file mode 100644
index 0000000000..547f8f0775
--- /dev/null
+++ b/layout/reftests/bugs/472500-1-ref.xhtml
@@ -0,0 +1,3 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <hbox>This is some text</hbox>
+</window>
diff --git a/layout/reftests/bugs/472500-1.xhtml b/layout/reftests/bugs/472500-1.xhtml
new file mode 100644
index 0000000000..a9cee6b1e8
--- /dev/null
+++ b/layout/reftests/bugs/472500-1.xhtml
@@ -0,0 +1,4 @@
+<?xml-stylesheet type="text/css" href="data:text/css,hbox::before { content: 'This is some text'; }" ?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <hbox/>
+</window>
diff --git a/layout/reftests/bugs/472769-1-ref.html b/layout/reftests/bugs/472769-1-ref.html
new file mode 100644
index 0000000000..b043c98da2
--- /dev/null
+++ b/layout/reftests/bugs/472769-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <style>
+ body { margin: 0px; }
+ div {
+ margin-top: 1px;
+ margin-left: 1px;
+ height: 100px;
+ width: 100px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/bugs/472769-1a.html b/layout/reftests/bugs/472769-1a.html
new file mode 100644
index 0000000000..aa8b74252b
--- /dev/null
+++ b/layout/reftests/bugs/472769-1a.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <style>
+ body { margin: 0px; }
+ div {
+ transform: translate(0.5px, 0.5px);
+ height: 100px;
+ width: 100px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/bugs/472769-1b.html b/layout/reftests/bugs/472769-1b.html
new file mode 100644
index 0000000000..c288851787
--- /dev/null
+++ b/layout/reftests/bugs/472769-1b.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <style>
+ body { margin: 0px; }
+ div {
+ margin-top: 0.5px;
+ margin-left: 0.5px;
+ height: 100px;
+ width: 100px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/bugs/472769-2-ref.html b/layout/reftests/bugs/472769-2-ref.html
new file mode 100644
index 0000000000..d5d397ed4f
--- /dev/null
+++ b/layout/reftests/bugs/472769-2-ref.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<style>
+ body { margin: 0px }
+ div.pt0 { transform:translateY(0.0px); }
+ div.pt1 { transform:translateY(0.1px); }
+ div.pt2 { transform:translateY(0.2px); }
+ div.pt3 { transform:translateY(0.3px); }
+ div.pt4 { transform:translateY(0.4px); }
+ div.pt5 { transform:translateY(0.5px); }
+ div.pt6 { transform:translateY(0.6px); }
+ div.pt7 { transform:translateY(0.7px); }
+ div.pt8 { transform:translateY(0.8px); }
+ div.pt9 { transform:translateY(0.9px); }
+ div.test {
+ border: 20px solid black;
+ width: 0px;
+ height: 0px;
+ display: inline-block;
+ margin-right: 4px;
+ }
+</style>
+</head>
+<body
+ ><div class="test pt0" ></div
+ ><div class="test pt1" ></div
+ ><div class="test pt2" ></div
+ ><div class="test pt3" ></div
+ ><div class="test pt4" ></div
+ ><div class="test pt5" ></div
+ ><div class="test pt6" ></div
+ ><div class="test pt7" ></div
+ ><div class="test pt8" ></div
+ ><div class="test pt9" ></div
+></body>
+</html>
diff --git a/layout/reftests/bugs/472769-2.html b/layout/reftests/bugs/472769-2.html
new file mode 100644
index 0000000000..7131ffae2a
--- /dev/null
+++ b/layout/reftests/bugs/472769-2.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<style>
+ body { margin: 0px }
+ div.pt0 { transform:translateY(0.0px); }
+ div.pt1 { transform:translateY(0.1px); }
+ div.pt2 { transform:translateY(0.2px); }
+ div.pt3 { transform:translateY(0.3px); }
+ div.pt4 { transform:translateY(0.4px); }
+ div.pt5 { transform:translateY(0.5px); }
+ div.pt6 { transform:translateY(0.6px); }
+ div.pt7 { transform:translateY(0.7px); }
+ div.pt8 { transform:translateY(0.8px); }
+ div.pt9 { transform:translateY(0.9px); }
+ div.test {
+ background: black;
+ width: 40px;
+ height: 40px;
+ display: inline-block;
+ margin-right: 4px;
+ }
+</style>
+</head>
+<body
+ ><div class="test pt0" ></div
+ ><div class="test pt1" ></div
+ ><div class="test pt2" ></div
+ ><div class="test pt3" ></div
+ ><div class="test pt4" ></div
+ ><div class="test pt5" ></div
+ ><div class="test pt6" ></div
+ ><div class="test pt7" ></div
+ ><div class="test pt8" ></div
+ ><div class="test pt9" ></div
+></body>
+</html>
diff --git a/layout/reftests/bugs/472769-3-ref.html b/layout/reftests/bugs/472769-3-ref.html
new file mode 100644
index 0000000000..5a5923439b
--- /dev/null
+++ b/layout/reftests/bugs/472769-3-ref.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+<style>
+ body { margin: 0px }
+ div.pt0 { transform:translateX(0.0px); }
+ div.pt1 { transform:translateX(0.1px); }
+ div.pt2 { transform:translateX(0.2px); }
+ div.pt3 { transform:translateX(0.3px); }
+ div.pt4 { transform:translateX(0.4px); }
+ div.pt5 { transform:translateX(0.5px); }
+ div.pt6 { transform:translateX(0.6px); }
+ div.pt7 { transform:translateX(0.7px); }
+ div.pt8 { transform:translateX(0.8px); }
+ div.pt9 { transform:translateX(0.9px); }
+ div.test {
+ border: 20px solid black;
+ width: 0px;
+ height: 0px;
+ margin-bottom: 4px;
+ }
+</style>
+</head>
+<body
+ ><div class="test pt0" ></div
+ ><div class="test pt1" ></div
+ ><div class="test pt2" ></div
+ ><div class="test pt3" ></div
+ ><div class="test pt4" ></div
+ ><div class="test pt5" ></div
+ ><div class="test pt6" ></div
+ ><div class="test pt7" ></div
+ ><div class="test pt8" ></div
+ ><div class="test pt9" ></div
+></body>
+</html>
diff --git a/layout/reftests/bugs/472769-3.html b/layout/reftests/bugs/472769-3.html
new file mode 100644
index 0000000000..27b3d90bae
--- /dev/null
+++ b/layout/reftests/bugs/472769-3.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+<style>
+ body { margin: 0px }
+ div.pt0 { transform:translateX(0.0px); }
+ div.pt1 { transform:translateX(0.1px); }
+ div.pt2 { transform:translateX(0.2px); }
+ div.pt3 { transform:translateX(0.3px); }
+ div.pt4 { transform:translateX(0.4px); }
+ div.pt5 { transform:translateX(0.5px); }
+ div.pt6 { transform:translateX(0.6px); }
+ div.pt7 { transform:translateX(0.7px); }
+ div.pt8 { transform:translateX(0.8px); }
+ div.pt9 { transform:translateX(0.9px); }
+ div.test {
+ background: black;
+ width: 40px;
+ height: 40px;
+ margin-bottom: 4px;
+ }
+</style>
+</head>
+<body
+ ><div class="test pt0" ></div
+ ><div class="test pt1" ></div
+ ><div class="test pt2" ></div
+ ><div class="test pt3" ></div
+ ><div class="test pt4" ></div
+ ><div class="test pt5" ></div
+ ><div class="test pt6" ></div
+ ><div class="test pt7" ></div
+ ><div class="test pt8" ></div
+ ><div class="test pt9" ></div
+></body>
+</html>
diff --git a/layout/reftests/bugs/473847-1-ref.xhtml b/layout/reftests/bugs/473847-1-ref.xhtml
new file mode 100644
index 0000000000..5174e11079
--- /dev/null
+++ b/layout/reftests/bugs/473847-1-ref.xhtml
@@ -0,0 +1,8 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox height="40">
+ <spacer style="-moz-box-flex: 6000; background-color: red;"/>
+ <spacer style="background-color: blue;"/>
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/473847-1.xhtml b/layout/reftests/bugs/473847-1.xhtml
new file mode 100644
index 0000000000..7adca521f3
--- /dev/null
+++ b/layout/reftests/bugs/473847-1.xhtml
@@ -0,0 +1,8 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox height="40">
+ <spacer style="-moz-box-flex: 60000; background-color: red;"/>
+ <spacer style="background-color: blue;"/>
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/474417-1-ref.html b/layout/reftests/bugs/474417-1-ref.html
new file mode 100644
index 0000000000..ab469a3a3b
--- /dev/null
+++ b/layout/reftests/bugs/474417-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+ <!-- use sans to eliminate antialias issues on serif tips -->
+
+<html style="font-family: sans-serif;">
+ <div style="width: 100em">
+ AB
+ </div>
+ <div style="width: 0">
+ A B
+ </div>
+</html>
diff --git a/layout/reftests/bugs/474417-1.html b/layout/reftests/bugs/474417-1.html
new file mode 100644
index 0000000000..911c3fd3b6
--- /dev/null
+++ b/layout/reftests/bugs/474417-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+ <!-- use sans to eliminate antialias issues on serif tips -->
+
+<html style="font-family: sans-serif;">
+ <div style="width: 100em;">
+ A<wbr>B
+ </div>
+ <div style="width: 0">
+ A<wbr>B
+ </div>
+</html>
diff --git a/layout/reftests/bugs/474472-1-ref.html b/layout/reftests/bugs/474472-1-ref.html
new file mode 100644
index 0000000000..e342e80f6b
--- /dev/null
+++ b/layout/reftests/bugs/474472-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <iframe id="foo" srcdoc="<body bgcolor='lime'>PASS</body>"></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/474472-1.html b/layout/reftests/bugs/474472-1.html
new file mode 100644
index 0000000000..8c857042e3
--- /dev/null
+++ b/layout/reftests/bugs/474472-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <iframe id="foo" srcdoc="<body bgcolor='red'>FAIL</body>"></iframe>
+ <script type="text/javascript">
+ // Globals
+ var foo = document.getElementById('foo');
+ var win = foo.contentWindow;
+
+ // Start the chain of execution when iframe's window loads
+ win.onload = iframeWindowLoaded;
+
+ function iframeWindowLoaded() {
+ setTimeout("tweak()", 0);
+ }
+ function tweak() {
+ win.location ="data:text/html,<body bgcolor='lime'>PASS</body>";
+ foo.onload = snapshot;
+ }
+ function snapshot() {
+ document.documentElement.className = '';
+ }
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1-ref.html b/layout/reftests/bugs/475986-1-ref.html
new file mode 100644
index 0000000000..f733250e10
--- /dev/null
+++ b/layout/reftests/bugs/475986-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr><th style="text-align: left">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1a.html b/layout/reftests/bugs/475986-1a.html
new file mode 100644
index 0000000000..9581eadb3b
--- /dev/null
+++ b/layout/reftests/bugs/475986-1a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="left"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1b.html b/layout/reftests/bugs/475986-1b.html
new file mode 100644
index 0000000000..b0ca4a8cca
--- /dev/null
+++ b/layout/reftests/bugs/475986-1b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="left" dir="rtl"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1c.html b/layout/reftests/bugs/475986-1c.html
new file mode 100644
index 0000000000..5e306fc1eb
--- /dev/null
+++ b/layout/reftests/bugs/475986-1c.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1d.html b/layout/reftests/bugs/475986-1d.html
new file mode 100644
index 0000000000..ea7a25d1df
--- /dev/null
+++ b/layout/reftests/bugs/475986-1d.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="left"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1e.html b/layout/reftests/bugs/475986-1e.html
new file mode 100644
index 0000000000..b20f4613c9
--- /dev/null
+++ b/layout/reftests/bugs/475986-1e.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="right"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-1f.html b/layout/reftests/bugs/475986-1f.html
new file mode 100644
index 0000000000..c954982bb1
--- /dev/null
+++ b/layout/reftests/bugs/475986-1f.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="center"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2-ref.html b/layout/reftests/bugs/475986-2-ref.html
new file mode 100644
index 0000000000..bc1588459d
--- /dev/null
+++ b/layout/reftests/bugs/475986-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr><th style="text-align: right">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2a.html b/layout/reftests/bugs/475986-2a.html
new file mode 100644
index 0000000000..fb7157bfa5
--- /dev/null
+++ b/layout/reftests/bugs/475986-2a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="right"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2b.html b/layout/reftests/bugs/475986-2b.html
new file mode 100644
index 0000000000..f8d88fddbb
--- /dev/null
+++ b/layout/reftests/bugs/475986-2b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="right" dir="rtl"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2c.html b/layout/reftests/bugs/475986-2c.html
new file mode 100644
index 0000000000..70853875d9
--- /dev/null
+++ b/layout/reftests/bugs/475986-2c.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr dir="rtl"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2d.html b/layout/reftests/bugs/475986-2d.html
new file mode 100644
index 0000000000..bba2a15048
--- /dev/null
+++ b/layout/reftests/bugs/475986-2d.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr dir="rtl" align="left"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2e.html b/layout/reftests/bugs/475986-2e.html
new file mode 100644
index 0000000000..e1c35e1615
--- /dev/null
+++ b/layout/reftests/bugs/475986-2e.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr dir="rtl" align="right"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-2f.html b/layout/reftests/bugs/475986-2f.html
new file mode 100644
index 0000000000..144522f3eb
--- /dev/null
+++ b/layout/reftests/bugs/475986-2f.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr dir="rtl" align="center"><th style="text-align: start">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-3-ref.html b/layout/reftests/bugs/475986-3-ref.html
new file mode 100644
index 0000000000..f72dd9bc7a
--- /dev/null
+++ b/layout/reftests/bugs/475986-3-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr><th style="text-align: center">Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-3a.html b/layout/reftests/bugs/475986-3a.html
new file mode 100644
index 0000000000..ce22721cd4
--- /dev/null
+++ b/layout/reftests/bugs/475986-3a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="center"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-3b.html b/layout/reftests/bugs/475986-3b.html
new file mode 100644
index 0000000000..aae610ecc8
--- /dev/null
+++ b/layout/reftests/bugs/475986-3b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table width="100%">
+ <tr align="center" dir="rtl"><th>Text</th></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/475986-4-ref.html b/layout/reftests/bugs/475986-4-ref.html
new file mode 100644
index 0000000000..95da846adf
--- /dev/null
+++ b/layout/reftests/bugs/475986-4-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ th {
+ word-spacing: 0;
+ letter-spacing: 0;
+ text-transform: none;
+ text-indent: 0;
+ text-shadow: none;
+ line-height: normal;
+ white-space: normal;
+ word-wrap: normal;
+ }
+ </style>
+ </head>
+ <table width="100%">
+ <tr>
+ <th style="text-align: right">Text</th>
+ </tr>
+ </table>
+</html>
diff --git a/layout/reftests/bugs/475986-4.html b/layout/reftests/bugs/475986-4.html
new file mode 100644
index 0000000000..be7237704d
--- /dev/null
+++ b/layout/reftests/bugs/475986-4.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ th {
+ word-spacing: 0;
+ letter-spacing: 0;
+ text-transform: none;
+ text-indent: 0;
+ text-shadow: none;
+ line-height: normal;
+ white-space: normal;
+ word-wrap: normal;
+ }
+ </style>
+ </head>
+ <table width="100%">
+ <tr style="text-align: right">
+ <th>Text</th>
+ </tr>
+ </table>
+</html>
diff --git a/layout/reftests/bugs/476063-1-ref.html b/layout/reftests/bugs/476063-1-ref.html
new file mode 100644
index 0000000000..1d2ba67d89
--- /dev/null
+++ b/layout/reftests/bugs/476063-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<head>
+</head>
+<body>
+ <div style="display: table" id="x">
+ <div style="display: table-row">
+ <div style="display: table-cell">1 - 1</div>
+ <div style="display: table-cell">1 - 2</div>
+ </div>
+ <div style="display: table-row">
+ <div style="display: table-cell">2 - 1</div>
+ <div style="display: table-cell">2 - 2</div>
+ </div>
+ </div>
+ <div style="border: 2px solid green">This is a test</div>
+ <span style="border: 2px solid green">before<div>This is a test</div>after</span>
+</body>
diff --git a/layout/reftests/bugs/476063-1.html b/layout/reftests/bugs/476063-1.html
new file mode 100644
index 0000000000..d6a2d7f04a
--- /dev/null
+++ b/layout/reftests/bugs/476063-1.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ legend { padding: 0; }
+ </style>
+ <script>
+ function doTest() {
+ var l = document.createElement("legend");
+ l.textContent = "This is a test";
+ l.style.border = "2px solid green";
+ l.style.display = "block"
+ document.body.appendChild(l);
+
+ l = document.createElement("legend");
+ var d = document.createElement("div");
+ d.textContent = "This is a test";
+ l.style.border = "2px solid green";
+ l.style.display = "inline"
+ l.textContent = "before";
+ l.appendChild(d);
+ l.appendChild(document.createTextNode("after"));
+ document.body.appendChild(l);
+
+ var t = document.getElementById("x");
+ var r = document.createElement("div");
+ r.style.display = "table-row";
+ l = document.createElement("legend");
+ l.textContent = "2 - 1";
+ l.style.display = "table-cell";
+ r.appendChild(l);
+ l = document.createElement("legend");
+ l.textContent = "2 - 2";
+ l.style.display = "table-cell";
+ r.appendChild(l);
+ t.appendChild(r);
+ }
+ </script>
+</head>
+<body onload="doTest()">
+ <div style="display: table" id="x">
+ <div style="display: table-row">
+ <div style="display: table-cell">1 - 1</div>
+ <div style="display: table-cell">1 - 2</div>
+ </div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/476063-2-ref.html b/layout/reftests/bugs/476063-2-ref.html
new file mode 100644
index 0000000000..af168a2c63
--- /dev/null
+++ b/layout/reftests/bugs/476063-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "This is a test";
+ var l = document.getElementById("l");
+ l.textContent = "before";
+ l.appendChild(d);
+ l.appendChild(document.createTextNode("after"));
+ }
+ </script>
+</head>
+<body onload="doTest()">
+ <fieldset>
+ <legend style="border: 2px solid green">This is a test</legend>
+ First fieldset
+ </fieldset>
+ <fieldset>
+ <legend id="l" style="border: 2px solid green"></legend>
+ First fieldset
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/476063-2.html b/layout/reftests/bugs/476063-2.html
new file mode 100644
index 0000000000..f32eee68e2
--- /dev/null
+++ b/layout/reftests/bugs/476063-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<head>
+ <script>
+ function doTest() {
+ var l = document.createElement("legend");
+ l.textContent = "This is a test";
+ l.style.border = "2px solid green";
+ l.style.display = "block"
+ document.getElementById("f1").appendChild(l);
+
+ l = document.createElement("legend");
+ var d = document.createElement("div");
+ d.textContent = "This is a test";
+ l.style.border = "2px solid green";
+ l.style.display = "inline"
+ l.textContent = "before";
+ l.appendChild(d);
+ l.appendChild(document.createTextNode("after"));
+ document.getElementById("f2").appendChild(l);
+ }
+ </script>
+</head>
+<body onload="doTest()">
+ <fieldset id="f1">
+ First fieldset
+ </fieldset>
+ <fieldset id="f2">
+ First fieldset
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/476063-3-ref.html b/layout/reftests/bugs/476063-3-ref.html
new file mode 100644
index 0000000000..3d23a803af
--- /dev/null
+++ b/layout/reftests/bugs/476063-3-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<head>
+</head>
+<body>
+ <fieldset>
+ <span style="border: 2px solid green;">Legend</span>
+ First fieldset
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/476063-3.html b/layout/reftests/bugs/476063-3.html
new file mode 100644
index 0000000000..66899c317e
--- /dev/null
+++ b/layout/reftests/bugs/476063-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<head>
+</head>
+<body>
+ <fieldset>
+ <legend style="border: 2px solid green; display: inline; padding: 0">Legend</legend>
+ First fieldset
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/476063-4-ref.xhtml b/layout/reftests/bugs/476063-4-ref.xhtml
new file mode 100644
index 0000000000..487a428852
--- /dev/null
+++ b/layout/reftests/bugs/476063-4-ref.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Test that legend is display:block by default when outside of fieldset (Bug 476063)</title>
+</head>
+<body>
+
+<div>
+ <div>The legend</div>
+ The rest of the div.
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/476063-4.xhtml b/layout/reftests/bugs/476063-4.xhtml
new file mode 100644
index 0000000000..3da2672197
--- /dev/null
+++ b/layout/reftests/bugs/476063-4.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Test that legend is display:block by default when outside of fieldset (Bug 476063)</title>
+</head>
+<body>
+
+<div>
+ <legend style="padding: 0">The legend</legend>
+ The rest of the div.
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/476357-1-ref.html b/layout/reftests/bugs/476357-1-ref.html
new file mode 100644
index 0000000000..cb9085ea0b
--- /dev/null
+++ b/layout/reftests/bugs/476357-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 476357</title>
+<div style="font-size: 30px;">
+ <div style="float: right; height: 1px"></div>
+ <div style="clear:both">.</div>
+ <!-- We never give the following div a reflow with NS_FRAME_IS_DIRTY -->
+ <div>Text<span>Text</span></div>
+</div>
diff --git a/layout/reftests/bugs/476357-1.html b/layout/reftests/bugs/476357-1.html
new file mode 100644
index 0000000000..b1e1b8d6ca
--- /dev/null
+++ b/layout/reftests/bugs/476357-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<title>Testcase, bug 476357</title>
+<div style="font-size: 10px;" id="page">
+ <div style="float: right; height: 1px"></div>
+ <div style="clear:both">.</div>
+ <!-- We never give the following div a reflow with NS_FRAME_IS_DIRTY -->
+ <div>Text<span>Text</span></div>
+</div>
+<script type="text/javascript">
+function run() {
+ document.getElementById('page').style.fontSize='30px';
+ document.documentElement.removeAttribute("class");
+}
+setTimeout(run, 0);
+</script>
diff --git a/layout/reftests/bugs/476598-1-ref.html b/layout/reftests/bugs/476598-1-ref.html
new file mode 100644
index 0000000000..9615c436fb
--- /dev/null
+++ b/layout/reftests/bugs/476598-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<title>Test for incorrect inherited/aInherited use in transform-origin handling</title>
+<style type="text/css">
+
+p {
+ height: 20px;
+ width: 20px;
+ background: green;
+ margin: 0;
+}
+
+</style>
+<!-- scaled from bottom right -->
+<p style="margin-top: 40px; margin-left: 40px;"></p>
+<!-- scaled from 2x times bottom right -->
+<p style="margin-top: 30px; margin-left: 30px;"></p>
diff --git a/layout/reftests/bugs/476598-1-ref2.html b/layout/reftests/bugs/476598-1-ref2.html
new file mode 100644
index 0000000000..72b298566d
--- /dev/null
+++ b/layout/reftests/bugs/476598-1-ref2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<title>Test for incorrect inherited/aInherited use in transform-origin handling</title>
+<style type="text/css">
+
+p {
+ transform: scale(2);
+ height: 10px;
+ width: 10px;
+ background: green;
+ margin: 50px;
+}
+
+</style>
+<p style="transform-origin: 10px 10px"></p>
+<p style="transform-origin: 20px 20px"></p>
diff --git a/layout/reftests/bugs/476598-1a.html b/layout/reftests/bugs/476598-1a.html
new file mode 100644
index 0000000000..e6a30c0b5d
--- /dev/null
+++ b/layout/reftests/bugs/476598-1a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<title>Test for incorrect inherited/aInherited use in transform-origin handling</title>
+<style type="text/css">
+
+p {
+ transform-origin: 1em 1em;
+ transform: scale(2);
+ height: 10px;
+ width: 10px;
+ background: green;
+ margin: 50px;
+}
+
+</style>
+<p style="font-size: 10px"></p>
+<p style="font-size: 20px"></p>
diff --git a/layout/reftests/bugs/476598-1b.html b/layout/reftests/bugs/476598-1b.html
new file mode 100644
index 0000000000..46056f4e12
--- /dev/null
+++ b/layout/reftests/bugs/476598-1b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<title>Test for incorrect inherited/aInherited use in transform-origin handling</title>
+<style type="text/css">
+
+p {
+ transform-origin: inherit;
+ transform: scale(2);
+ height: 10px;
+ width: 10px;
+ background: green;
+ margin: 50px;
+}
+
+</style>
+<div style="transform-origin: 10px 10px">
+<p style="font-size: 10px"></p>
+</div>
+<div style="transform-origin: 20px 20px">
+<p style="font-size: 20px"></p>
+</div>
diff --git a/layout/reftests/bugs/476856-1-ref.html b/layout/reftests/bugs/476856-1-ref.html
new file mode 100644
index 0000000000..8a8f03bb09
--- /dev/null
+++ b/layout/reftests/bugs/476856-1-ref.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html><head><title>Handling of un-terminated long tokens in CSS</title>
+
+</head><body>
+
+<div>This CSS parser does not
+ backtrack for unterminated comments.</div>
+
+<div>It does not
+ backtrack for unterminated double-quoted url().</div>
+
+<div>It does not
+ backtrack for unterminated single-quoted url().</div>
+
+<div>It does not
+ backtrack for unterminated unquoted url().</div>
+
+</body></html>
+
diff --git a/layout/reftests/bugs/476856-1.html b/layout/reftests/bugs/476856-1.html
new file mode 100644
index 0000000000..6d26bbcb6f
--- /dev/null
+++ b/layout/reftests/bugs/476856-1.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<html><head><title>Handling of un-terminated long tokens in CSS</title>
+
+<style>#ax,#bx,#cx,#dx{display:none}</style>
+
+<style>#ad{color:/*}#ao{display:none}#ax{display:inline}</style>
+
+<style>#bd{background:url("xxx"}#bo{display:none}#bx{display:inline}</style>
+
+<style>#cd{background:url('xxx'}#co{display:none}#cx{display:inline}</style>
+
+<style>#dd{background:url(xxx}#do{display:none}#dx{display:inline}</style>
+
+</head><body>
+
+<div>This CSS parser <span id="ao">does not</span>
+ backtrack<span id="ax">s</span> for unterminated comments.</div>
+
+<div>It <span id="bo">does not</span>
+ backtrack<span id="bx">s</span> for unterminated double-quoted url().</div>
+
+<div>It <span id="co">does not</span>
+ backtrack<span id="cx">s</span> for unterminated single-quoted url().</div>
+
+<div>It <span id="do">does not</span>
+ backtrack<span id="dx">s</span> for unterminated unquoted url().</div>
+
+</body></html>
+
diff --git a/layout/reftests/bugs/478377-1-ref.xhtml b/layout/reftests/bugs/478377-1-ref.xhtml
new file mode 100644
index 0000000000..b481276f76
--- /dev/null
+++ b/layout/reftests/bugs/478377-1-ref.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css" href="data:text/css,
+window { direction: ltr; }
+tree { height: 100px; }
+treecol, treecolpicker { visibility: hidden; text-align: right; }
+"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <tree>
+ <treecols>
+ <treecol flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="test."/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/478377-1.xhtml b/layout/reftests/bugs/478377-1.xhtml
new file mode 100644
index 0000000000..833ab49d55
--- /dev/null
+++ b/layout/reftests/bugs/478377-1.xhtml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <style xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
+ window { direction: rtl; }
+ tree { height: 100px; }
+ treecol, treecolpicker { visibility: hidden; }
+ treechildren::-moz-tree-cell { direction: ltr; }
+ ]]></style>
+ <tree>
+ <treecols>
+ <treecol flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="test."/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/478614-1-ref.html b/layout/reftests/bugs/478614-1-ref.html
new file mode 100644
index 0000000000..e58e6c35ff
--- /dev/null
+++ b/layout/reftests/bugs/478614-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top: 150px}
+table {width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-1.html b/layout/reftests/bugs/478614-1.html
new file mode 100644
index 0000000000..9bffe51aab
--- /dev/null
+++ b/layout/reftests/bugs/478614-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top: 50px;}
+table {margin-top: 100px; width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-2.html b/layout/reftests/bugs/478614-2.html
new file mode 100644
index 0000000000..d4ded0fc79
--- /dev/null
+++ b/layout/reftests/bugs/478614-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top: 50px; caption-side:top}
+table {margin-top: 100px; width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-3-ref.html b/layout/reftests/bugs/478614-3-ref.html
new file mode 100644
index 0000000000..8114d9b0c4
--- /dev/null
+++ b/layout/reftests/bugs/478614-3-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption { caption-side:bottom;}
+table {100px; width:100px;}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-3.html b/layout/reftests/bugs/478614-3.html
new file mode 100644
index 0000000000..0f692680f7
--- /dev/null
+++ b/layout/reftests/bugs/478614-3.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-bottom: 100px; caption-side:bottom;}
+table {margin-bottom: 100px; width:100px;}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-4-ref.html b/layout/reftests/bugs/478614-4-ref.html
new file mode 100644
index 0000000000..0407e84ab6
--- /dev/null
+++ b/layout/reftests/bugs/478614-4-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top: 160px;margin-bottom:50px}
+table {width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-4.html b/layout/reftests/bugs/478614-4.html
new file mode 100644
index 0000000000..75e231f455
--- /dev/null
+++ b/layout/reftests/bugs/478614-4.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top: 60px;margin-bottom:50px}
+table {margin-top: 100px; width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-5-ref.html b/layout/reftests/bugs/478614-5-ref.html
new file mode 100644
index 0000000000..0c93a04f5a
--- /dev/null
+++ b/layout/reftests/bugs/478614-5-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-top:50px; caption-side:bottom}
+table {width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478614-5.html b/layout/reftests/bugs/478614-5.html
new file mode 100644
index 0000000000..80ec4281a6
--- /dev/null
+++ b/layout/reftests/bugs/478614-5.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Testcase for table + caption vertical margins (bug 478614)</title>
+<style type="text/css">
+body {margin-top: 0} /* Don't let collapsing of the body's top margin interfere with positioning */
+caption {margin-bottom: 100px;margin-top:50px; caption-side:bottom}
+table {margin-bottom: 100px; width:100px}
+</style>
+</head>
+<body>
+<table><caption>caption</caption>
+<tr><td>td</td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/478811-1-ref.html b/layout/reftests/bugs/478811-1-ref.html
new file mode 100644
index 0000000000..81d4c302a7
--- /dev/null
+++ b/layout/reftests/bugs/478811-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <body style="height: 100%">
+ <fieldset style="position: relative; display: table; width: 50%;
+ height: 50%; top: 25%; left: 25%">
+ <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
+ background: green"></div>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-1.html b/layout/reftests/bugs/478811-1.html
new file mode 100644
index 0000000000..a3b599ba59
--- /dev/null
+++ b/layout/reftests/bugs/478811-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait" style="height: 100%">
+ <head>
+ <script>
+ function doIt() {
+ var d = document.createElement("div");
+ d.setAttribute("style",
+ "position: absolute; left: 0; right: 0; top: 0; " +
+ "bottom: 0; background: green");
+ document.getElementById("x").appendChild(d);
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doIt);
+ </script>
+ </head>
+ <body style="height: 100%">
+ <fieldset id="x" style="position: relative; display: table; width: 50%;
+ height: 50%; top: 25%; left: 25%">
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-2-ref.html b/layout/reftests/bugs/478811-2-ref.html
new file mode 100644
index 0000000000..c3a9a8fd2c
--- /dev/null
+++ b/layout/reftests/bugs/478811-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <body style="height: 100%">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button style="position: relative; display: table; width: 50%;
+ height: 50%; top: 25%; left: 25%; pointer-events: none">
+ <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
+ background: green"></div>
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-2.html b/layout/reftests/bugs/478811-2.html
new file mode 100644
index 0000000000..fb61c90f49
--- /dev/null
+++ b/layout/reftests/bugs/478811-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <head>
+ <script>
+ function doIt() {
+ var d = document.createElement("div");
+ d.setAttribute("style",
+ "position: absolute; left: 0; right: 0; top: 0; " +
+ "bottom: 0; background: green");
+ document.getElementById("x").appendChild(d);
+ }
+ </script>
+ </head>
+ <body style="height: 100%" onload="doIt()">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button id="x" style="position: relative; display: table; width: 50%;
+ height: 50%; top: 25%; left: 25%;
+ pointer-events: none">
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-3-ref.html b/layout/reftests/bugs/478811-3-ref.html
new file mode 100644
index 0000000000..9f365fb08b
--- /dev/null
+++ b/layout/reftests/bugs/478811-3-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <body style="height: 100%">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button style="position: relative; display: table-cell; width: 50%;
+ height: 50%; top: 25%; left: 25%; pointer-events: none">
+ <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
+ background: green"></div>
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-3.html b/layout/reftests/bugs/478811-3.html
new file mode 100644
index 0000000000..009ef6f63b
--- /dev/null
+++ b/layout/reftests/bugs/478811-3.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <head>
+ <script>
+ function doIt() {
+ var d = document.createElement("div");
+ d.setAttribute("style",
+ "position: absolute; left: 0; right: 0; top: 0; " +
+ "bottom: 0; background: green");
+ document.getElementById("x").appendChild(d);
+ }
+ </script>
+ </head>
+ <body style="height: 100%" onload="doIt()">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button id="x" style="position: relative; display: table-cell; width: 50%;
+ height: 50%; top: 25%; left: 25%;
+ pointer-events: none">
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-4-ref.html b/layout/reftests/bugs/478811-4-ref.html
new file mode 100644
index 0000000000..a1cced339d
--- /dev/null
+++ b/layout/reftests/bugs/478811-4-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <body style="height: 100%">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button style="position: relative; display: table-row; width: 50%;
+ height: 50%; top: 25%; left: 25%; pointer-events: none">
+ <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
+ background: green"></div>
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478811-4.html b/layout/reftests/bugs/478811-4.html
new file mode 100644
index 0000000000..73ee73f31d
--- /dev/null
+++ b/layout/reftests/bugs/478811-4.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html style="height: 100%">
+ <head>
+ <script>
+ function doIt() {
+ var d = document.createElement("div");
+ d.setAttribute("style",
+ "position: absolute; left: 0; right: 0; top: 0; " +
+ "bottom: 0; background: green");
+ document.getElementById("x").appendChild(d);
+ }
+ </script>
+ </head>
+ <body style="height: 100%" onload="doIt()">
+ <!-- Button shouldn't get pointer events because it confuses tests if it
+ can be hovered -->
+ <button id="x" style="position: relative; display: table-row; width: 50%;
+ height: 50%; top: 25%; left: 25%;
+ pointer-events: none">
+ </button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478956-1-ref.html b/layout/reftests/bugs/478956-1-ref.html
new file mode 100644
index 0000000000..3815f3a460
--- /dev/null
+++ b/layout/reftests/bugs/478956-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td>Long long cell</td>
+ <td>cell</td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td>cell</td>
+ <td>cell</td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478956-1a.html b/layout/reftests/bugs/478956-1a.html
new file mode 100644
index 0000000000..4ae0aca8e6
--- /dev/null
+++ b/layout/reftests/bugs/478956-1a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: table-row">
+ <div style="display: table-row">
+ <div style="display: table-cell">Long long cell</div>
+ <div style="display: table-cell">cell</div>
+ </div>
+ <span style="display: table"></span>
+ <div style="display: table-row">
+ <div style="display: table-cell">cell</div>
+ <div style="display: table-cell">cell</div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/478956-1b.html b/layout/reftests/bugs/478956-1b.html
new file mode 100644
index 0000000000..1b656a98e5
--- /dev/null
+++ b/layout/reftests/bugs/478956-1b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: table-row">
+ <div style="display: table-row">
+ <div style="display: table-cell">Long long cell</div>
+ <div style="display: table-cell">cell</div>
+ </div>
+ <span style="display: block"></span>
+ <div style="display: table-row">
+ <div style="display: table-cell">cell</div>
+ <div style="display: table-cell">cell</div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-1-ref.html b/layout/reftests/bugs/480880-1-ref.html
new file mode 100644
index 0000000000..647b67c58a
--- /dev/null
+++ b/layout/reftests/bugs/480880-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+ <body style="background: green">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-1a.html b/layout/reftests/bugs/480880-1a.html
new file mode 100644
index 0000000000..c57a8ae66d
--- /dev/null
+++ b/layout/reftests/bugs/480880-1a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html style="display: table" class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var b = document.createElement("body");
+ b.style.background = "green";
+ document.documentElement.appendChild(b);
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: red">
+ <script>
+ document.documentElement.removeChild(document.body);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-1b.html b/layout/reftests/bugs/480880-1b.html
new file mode 100644
index 0000000000..9eabe868cc
--- /dev/null
+++ b/layout/reftests/bugs/480880-1b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html style="display: table" class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var b = document.body;
+ b.style.background = "green";
+ b.style.display = "";
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: red; display: none">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-1c.html b/layout/reftests/bugs/480880-1c.html
new file mode 100644
index 0000000000..c9b48fa4d4
--- /dev/null
+++ b/layout/reftests/bugs/480880-1c.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class="reftest-wait" style="background: green; display: none">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var h = document.documentElement;
+ h.style.display = "";
+ h.className = "";
+ });
+ </script>
+ </head>
+</html>
diff --git a/layout/reftests/bugs/480880-1d.html b/layout/reftests/bugs/480880-1d.html
new file mode 100644
index 0000000000..e48edea39e
--- /dev/null
+++ b/layout/reftests/bugs/480880-1d.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var b = document.createElement("body");
+ b.style.background = "green";
+ document.documentElement.appendChild(b);
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: red">
+ <script>
+ document.documentElement.removeChild(document.body);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-1e.html b/layout/reftests/bugs/480880-1e.html
new file mode 100644
index 0000000000..ba450f7267
--- /dev/null
+++ b/layout/reftests/bugs/480880-1e.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var b = document.body;
+ b.style.background = "green";
+ b.style.display = "";
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: red; display: none">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-2a.html b/layout/reftests/bugs/480880-2a.html
new file mode 100644
index 0000000000..afc3c4a49f
--- /dev/null
+++ b/layout/reftests/bugs/480880-2a.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html style="display: table" class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ document.documentElement.removeChild(document.body);
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: green">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-2b.html b/layout/reftests/bugs/480880-2b.html
new file mode 100644
index 0000000000..12e871d1f4
--- /dev/null
+++ b/layout/reftests/bugs/480880-2b.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ document.documentElement.removeChild(document.body);
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body style="background: green">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/480880-2c.html b/layout/reftests/bugs/480880-2c.html
new file mode 100644
index 0000000000..9ba61b0fc5
--- /dev/null
+++ b/layout/reftests/bugs/480880-2c.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class="reftest-wait" style="background: green">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var h = document.documentElement;
+ h.style.display = "none";
+ h.className = "";
+ });
+ </script>
+ </head>
+</html>
diff --git a/layout/reftests/bugs/481024-1-ref.html b/layout/reftests/bugs/481024-1-ref.html
new file mode 100644
index 0000000000..56258b14d8
--- /dev/null
+++ b/layout/reftests/bugs/481024-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green;"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481024-1a.html b/layout/reftests/bugs/481024-1a.html
new file mode 100644
index 0000000000..6cc0ccfbe5
--- /dev/null
+++ b/layout/reftests/bugs/481024-1a.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green; resize: none;"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481024-1b.html b/layout/reftests/bugs/481024-1b.html
new file mode 100644
index 0000000000..d760ea5023
--- /dev/null
+++ b/layout/reftests/bugs/481024-1b.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green; max-width: 200px; resize: none;"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481024-1c.html b/layout/reftests/bugs/481024-1c.html
new file mode 100644
index 0000000000..af106e4655
--- /dev/null
+++ b/layout/reftests/bugs/481024-1c.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green; max-height: 200px; resize: none;"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481024-1d.html b/layout/reftests/bugs/481024-1d.html
new file mode 100644
index 0000000000..1d92ef2f97
--- /dev/null
+++ b/layout/reftests/bugs/481024-1d.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green; max-width: 200px;"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481024-1e.html b/layout/reftests/bugs/481024-1e.html
new file mode 100644
index 0000000000..7b52da5911
--- /dev/null
+++ b/layout/reftests/bugs/481024-1e.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: block; border: none; width: 200px; height: 200px; padding: 50px; background: green; max-height: 200px"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481948-1-ref.html b/layout/reftests/bugs/481948-1-ref.html
new file mode 100644
index 0000000000..558322e509
--- /dev/null
+++ b/layout/reftests/bugs/481948-1-ref.html
@@ -0,0 +1,13 @@
+<!-- test for bug 481948: check whether Indic cluster shows all glyphs -->
+<html>
+ <head>
+ <style type="text/css">
+ body {
+ font-size: 24pt;
+ }
+ </style>
+ </head>
+ <body>
+ <p>&#x0930;&#x094d;&#x0915;&#x094d;&#x0915;&#x094d;&#x0915;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481948-1.html b/layout/reftests/bugs/481948-1.html
new file mode 100644
index 0000000000..a921b66029
--- /dev/null
+++ b/layout/reftests/bugs/481948-1.html
@@ -0,0 +1,15 @@
+<!-- test for bug 481948: check whether Indic cluster shows all glyphs -->
+<html>
+ <head>
+ <style type="text/css">
+ body {
+ font-size: 24pt;
+ }
+ </style>
+ </head>
+ <body>
+ <!-- The cluster here is longer than in the reference, so display should be different.
+ In FF3.0.x on Mac OS X, they look identical. -->
+ <p>&#x0930;&#x094d;&#x0915;&#x094d;&#x0915;&#x094d;&#x0915;&#x094d;&#x0915;</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481948-2-ref.html b/layout/reftests/bugs/481948-2-ref.html
new file mode 100644
index 0000000000..dac69d48ac
--- /dev/null
+++ b/layout/reftests/bugs/481948-2-ref.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<style type="text/css">
+body {
+ /* try for some likely fonts that might implement the "fi" ligature */
+ font-family: Times, Calibri, PalatinoLinotype, DejaVuSerif, serif;
+ font-size: 40pt;
+}
+.R {
+ color: #FF0000;
+}
+.G {
+ color: #00FF00;
+}
+</style>
+</head>
+<body>
+<span class="R">fi</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/481948-2.html b/layout/reftests/bugs/481948-2.html
new file mode 100644
index 0000000000..e0c899f4d8
--- /dev/null
+++ b/layout/reftests/bugs/481948-2.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style type="text/css">
+body {
+ /* try for some likely fonts that might implement the "fi" ligature */
+ font-family: Times, Calibri, Palatino Linotype, DejaVu Serif, serif;
+ font-size: 40pt;
+}
+.R {
+ color: #FF0000;
+}
+.G {
+ color: #00FF00;
+}
+</style>
+</head>
+<!--
+The reference has "fi" in a single red span; the expected result is
+NOT EQUAL, provided we successfully paint the ligature in two halves.
+-->
+<body>
+<span class="R">f</span><span class="G">i</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/481948-3-ref.html b/layout/reftests/bugs/481948-3-ref.html
new file mode 100644
index 0000000000..0d0b7f556a
--- /dev/null
+++ b/layout/reftests/bugs/481948-3-ref.html
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <style type="text/css">
+ .R { color: #FF0000; }
+ .G { color: #00FF00; }
+ .B { color: #0000FF; }
+ .K { color: #000000; }
+ </style>
+ </head>
+ <body>
+ <p>There should be only red and black text here</p>
+ <p style="font-size: 24pt;">
+ <span class="R">&#x0930;&#x094d;&#x0915;&#x094d;&#x0915;</span><span
+ class="K">&#x0915;</span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/481948-3.html b/layout/reftests/bugs/481948-3.html
new file mode 100644
index 0000000000..6485ea5192
--- /dev/null
+++ b/layout/reftests/bugs/481948-3.html
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ <style type="text/css">
+ .R { color: #FF0000; }
+ .G { color: #00FF00; }
+ .B { color: #0000FF; }
+ .K { color: #000000; }
+ </style>
+ </head>
+ <body>
+ <p>There should be only red and black text here</p>
+ <p style="font-size: 24pt;">
+ <!-- The first three spans here become a single Devanagari cluster,
+ so the entire cluster is painted with the color of the first
+ character. Currently NOT true on Linux, see bug 488364. -->
+ <span class="R">&#x0930;&#x094d;</span><span
+ class="G">&#x0915;&#x094d;</span><span
+ class="B">&#x0915;</span><span
+ class="K">&#x0915;</span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/482398-1-ref.html b/layout/reftests/bugs/482398-1-ref.html
new file mode 100644
index 0000000000..0230372568
--- /dev/null
+++ b/layout/reftests/bugs/482398-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+
+<body><div style="width: 0em;"><span style="color: green">A</span> BcD</div></body>
diff --git a/layout/reftests/bugs/482398-1.html b/layout/reftests/bugs/482398-1.html
new file mode 100644
index 0000000000..4290d667ba
--- /dev/null
+++ b/layout/reftests/bugs/482398-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+
+function boom()
+{
+ var x = document.getElementById("x");
+ var y = document.createElement("span");
+ y.appendChild(document.createTextNode("c"));
+ x.parentNode.insertBefore(y, x);
+ document.documentElement.className = "";
+}
+
+</script>
+<style type="text/css">
+
+div:first-letter { color: green }
+
+</style>
+</head>
+
+<body onload="boom();"><div style="width: 0em;"><span>A B<span id="x">D</span></span></div></body>
+
+</html>
diff --git a/layout/reftests/bugs/482592-1-ref.html b/layout/reftests/bugs/482592-1-ref.html
new file mode 100644
index 0000000000..7abe1a7c55
--- /dev/null
+++ b/layout/reftests/bugs/482592-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body style="font-size: 300%">
+ xy
+ </body>
+</html>
diff --git a/layout/reftests/bugs/482592-1a-shadow.xhtml b/layout/reftests/bugs/482592-1a-shadow.xhtml
new file mode 100644
index 0000000000..9ec624c1bf
--- /dev/null
+++ b/layout/reftests/bugs/482592-1a-shadow.xhtml
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ function doTest() {
+ var l = document.getElementById("l");
+ l.parentNode.insertBefore(document.createTextNode("x"), l);
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <template id="template">
+ <style>
+ #hasAfter::after { content: "y"; }
+ #l { display: none; }
+ </style>
+ <span id="hasAfter"><slot/></span>
+ </template>
+ <custom-element style="font-size: 300%; display:block;"><span id="l"></span></custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/482592-1b-shadow.xhtml b/layout/reftests/bugs/482592-1b-shadow.xhtml
new file mode 100644
index 0000000000..d5594723b4
--- /dev/null
+++ b/layout/reftests/bugs/482592-1b-shadow.xhtml
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ function doTest() {
+ var l = document.getElementById("l");
+ l.parentNode.insertBefore(document.createTextNode("y"), l);
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <template id="template">
+ <style>
+ #hasBefore::before { content: "x"; }
+ </style>
+ <span id="hasBefore"><slot/></span>
+ </template>
+ <custom-element style="font-size: 300%; display: block;"><span id="l"></span></custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/482659-1-ref.html b/layout/reftests/bugs/482659-1-ref.html
new file mode 100644
index 0000000000..70e76fb7b8
--- /dev/null
+++ b/layout/reftests/bugs/482659-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+ <iframe src="subdir/445004-ref-subsubframe.html"></iframe>
+</body>
diff --git a/layout/reftests/bugs/482659-1a.html b/layout/reftests/bugs/482659-1a.html
new file mode 100644
index 0000000000..81f56cc4fd
--- /dev/null
+++ b/layout/reftests/bugs/482659-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ window.frames[0].document.body.innerHTML =
+ "<img src='passouter.png' " +
+ "onload='window.parent.document.documentElement.className = &quot;&quot;'>";
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <iframe></iframe>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/482659-1b.html b/layout/reftests/bugs/482659-1b.html
new file mode 100644
index 0000000000..b86f2e77b8
--- /dev/null
+++ b/layout/reftests/bugs/482659-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ window.frames[0].document.body.innerHTML =
+ "<img src='passouter.png' " +
+ "onload='window.parent.document.documentElement.className = &quot;&quot;'>";
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <iframe src="about:blank"></iframe>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/482659-1c.html b/layout/reftests/bugs/482659-1c.html
new file mode 100644
index 0000000000..ae76d090fe
--- /dev/null
+++ b/layout/reftests/bugs/482659-1c.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ window.frames[0].location =
+ 'javascript:document.write(""); document.close(); ' +
+ 'parent.continueTest();'
+ }
+
+ function continueTest() {
+ // Do this part async just in case
+ setTimeout(function() {
+ window.frames[0].document.body.innerHTML =
+ "<img src='passouter.png' " +
+ "onload='window.parent.document.documentElement.className = &quot;&quot;'>";
+ }, 0);
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <iframe></iframe>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/482659-1d.html b/layout/reftests/bugs/482659-1d.html
new file mode 100644
index 0000000000..6296415da5
--- /dev/null
+++ b/layout/reftests/bugs/482659-1d.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ window.frames[0].location =
+ 'javascript:document.write(""); document.close(); ' +
+ 'parent.continueTest();'
+ }
+
+ function continueTest() {
+ // Do this part async just in case
+ setTimeout(function() {
+ window.frames[0].document.body.innerHTML =
+ "<img src='passouter.png' " +
+ "onload='window.parent.document.documentElement.className = &quot;&quot;'>";
+ }, 0);
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <iframe src="about:blank"></iframe>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/483565-ref.xhtml b/layout/reftests/bugs/483565-ref.xhtml
new file mode 100644
index 0000000000..6b5419f954
--- /dev/null
+++ b/layout/reftests/bugs/483565-ref.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+
+<window id="yesno" title="Reference for bug 483565" orient="horizontal"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <hbox align="baseline">
+ <stack align="baseline">
+ <label value="hij"/>
+ </stack>
+ <stack align="baseline">
+ <label value="hij" style="margin-top: 20px"/>
+ </stack>
+ </hbox>
+</window>
diff --git a/layout/reftests/bugs/483565.xhtml b/layout/reftests/bugs/483565.xhtml
new file mode 100644
index 0000000000..e3bdffeb79
--- /dev/null
+++ b/layout/reftests/bugs/483565.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+
+<window id="yesno" title="Testcase for bug 483565" orient="horizontal"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <hbox align="baseline">
+ <stack align="baseline">
+ <label value="hij" style="margin-top: 20px"/>
+ </stack>
+ <stack align="baseline">
+ <label value="hij" style="margin-bottom: 20px; margin-top: 20px"/>
+ </stack>
+ </hbox>
+</window>
diff --git a/layout/reftests/bugs/484256-1-ref.html b/layout/reftests/bugs/484256-1-ref.html
new file mode 100644
index 0000000000..ac7f3ca01a
--- /dev/null
+++ b/layout/reftests/bugs/484256-1-ref.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<style>
+table {border-collapse: separate; border-spacing:0px;
+border-top: 300px solid orange}
+div {width:10px; height: 10px; border:thin green solid;}
+td {padding:0px;}
+</style>
+</head>
+<div></div>
+<table><tr><td><div></div></td></tr></table>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/484256-1.html b/layout/reftests/bugs/484256-1.html
new file mode 100644
index 0000000000..1c9b053278
--- /dev/null
+++ b/layout/reftests/bugs/484256-1.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<style>
+table {border-collapse: collapse;
+border-top: 300px solid orange}
+div {width:10px; height: 10px; border:thin green solid;}
+td {padding:0px;}
+</style>
+</head>
+<div></div>
+<table><tr><td><div></div></td></tr></table>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/484256-2.html b/layout/reftests/bugs/484256-2.html
new file mode 100644
index 0000000000..392b41e37e
--- /dev/null
+++ b/layout/reftests/bugs/484256-2.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<style>
+table {border-collapse: collapse;
+border-bottom: 300px solid orange}
+div {width:10px; height: 10px; border:thin green solid;}
+td {padding:0px;}
+</style>
+</head>
+<table><tr><td><div></div></td></tr></table>
+
+<div></div>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/485012-1-ref.html b/layout/reftests/bugs/485012-1-ref.html
new file mode 100644
index 0000000000..a9ccb1b9fd
--- /dev/null
+++ b/layout/reftests/bugs/485012-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { color: green }
+ </style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/485012-1.html b/layout/reftests/bugs/485012-1.html
new file mode 100644
index 0000000000..56759f94f1
--- /dev/null
+++ b/layout/reftests/bugs/485012-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { color: red }
+ </style>
+ <script src="data:application/javascript,"></script>
+ <link rel="stylesheet" type="text/css"
+ charset="UTF-16BE"
+ href="data:text/css,%00b%00o%00d%00y%00{%00c%00o%00l%00o%00r%00:%00g%00r%00e%00e%00n%00}">
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/485275-1-ref.html b/layout/reftests/bugs/485275-1-ref.html
new file mode 100644
index 0000000000..b31ac81b5c
--- /dev/null
+++ b/layout/reftests/bugs/485275-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E"
+ style="width: 100px; height: 100px; border:none; position:absolute;
+ top: 0px; left: 200px;"/>
+</body>
+</html>
diff --git a/layout/reftests/bugs/485275-1.html b/layout/reftests/bugs/485275-1.html
new file mode 100644
index 0000000000..35acdd4eda
--- /dev/null
+++ b/layout/reftests/bugs/485275-1.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E"
+ style="width: 100px; height: 100px; border:none; position:absolute;
+ top: 0px; left: 0px; transform: translateX(200px)"/>
+</body>
+</html>
diff --git a/layout/reftests/bugs/485275-1.svg b/layout/reftests/bugs/485275-1.svg
new file mode 100644
index 0000000000..9f3f5eb1c6
--- /dev/null
+++ b/layout/reftests/bugs/485275-1.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <foreignObject transform="translate(200)" width="100" height="100">
+ <body xmlns="http://www.w3.org/1999/xhtml" style="margin: 0pt;">
+ <iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E" style="border: medium none ; width: 100px; height: 100px;"/>
+ </body>
+ </foreignObject>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/486052-1-ref.html b/layout/reftests/bugs/486052-1-ref.html
new file mode 100644
index 0000000000..76e8d8da8b
--- /dev/null
+++ b/layout/reftests/bugs/486052-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <caption style="position: relative; caption-side: bottom"><div style="position: absolute; top: 0; left: 0">Test</div></caption>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-1.html b/layout/reftests/bugs/486052-1.html
new file mode 100644
index 0000000000..78ab224c04
--- /dev/null
+++ b/layout/reftests/bugs/486052-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <table>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <tr><td>This is a test</td></tr>
+ <caption style="position: relative; caption-side: bottom" id="t"></caption>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2-ref.html b/layout/reftests/bugs/486052-2-ref.html
new file mode 100644
index 0000000000..d3a7de5c49
--- /dev/null
+++ b/layout/reftests/bugs/486052-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: relative; display: table-row-group;"><div style="display: table-row"><div style="display: table-cell"><div style="position: absolute; top: 0; left: 0">Test</div></div></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2a.html b/layout/reftests/bugs/486052-2a.html
new file mode 100644
index 0000000000..bef0026a28
--- /dev/null
+++ b/layout/reftests/bugs/486052-2a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-row-group;" id="t"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2b.html b/layout/reftests/bugs/486052-2b.html
new file mode 100644
index 0000000000..5b7c89bca9
--- /dev/null
+++ b/layout/reftests/bugs/486052-2b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-header-group;" id="t"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2c.html b/layout/reftests/bugs/486052-2c.html
new file mode 100644
index 0000000000..f4d99f3c69
--- /dev/null
+++ b/layout/reftests/bugs/486052-2c.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-footer-group;" id="t"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2d.html b/layout/reftests/bugs/486052-2d.html
new file mode 100644
index 0000000000..71452bceda
--- /dev/null
+++ b/layout/reftests/bugs/486052-2d.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: relative; display: table-row-group;"><div style="position: absolute; top: 0; left: 0">Test</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2e.html b/layout/reftests/bugs/486052-2e.html
new file mode 100644
index 0000000000..82a8291ae0
--- /dev/null
+++ b/layout/reftests/bugs/486052-2e.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-row-group;"><div style="display: table-row"><div style="display: table-cell" id="t"></div></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2f.html b/layout/reftests/bugs/486052-2f.html
new file mode 100644
index 0000000000..cd502ed6ad
--- /dev/null
+++ b/layout/reftests/bugs/486052-2f.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-header-group;"><div style="display: table-row"><div style="display: table-cell" id="t"></div></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486052-2g.html b/layout/reftests/bugs/486052-2g.html
new file mode 100644
index 0000000000..e23f930fdf
--- /dev/null
+++ b/layout/reftests/bugs/486052-2g.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function doTest() {
+ var d = document.createElement("div");
+ d.textContent = "Test";
+ d.style.top = d.style.left = 0;
+ d.style.position = "absolute";
+ document.getElementById("t").appendChild(d);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <div style="position: relative; display: table-footer-group;"><div style="display: table-row"><div style="display: table-cell" id="t"></div></div></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/486065-1-ref.html b/layout/reftests/bugs/486065-1-ref.html
new file mode 100644
index 0000000000..9d25407185
--- /dev/null
+++ b/layout/reftests/bugs/486065-1-ref.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<style>
+.d {
+ height:10em;
+ border:75px solid #CCC;
+}
+</style>
+</head>
+<body>
+ <ul class="d">
+ <li>a</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/486065-1.html b/layout/reftests/bugs/486065-1.html
new file mode 100644
index 0000000000..39f5e2dbd3
--- /dev/null
+++ b/layout/reftests/bugs/486065-1.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style>
+.d {
+ height:10em;
+ overflow:auto;
+ border:75px solid #CCC;
+}
+</style>
+</head>
+<body>
+ <ul class="d">
+ <li>a</li>
+ </ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/487539-1.html b/layout/reftests/bugs/487539-1.html
new file mode 100644
index 0000000000..de88e713e8
--- /dev/null
+++ b/layout/reftests/bugs/487539-1.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+
+var img = document.createElement("img");
+img.setAttributeNS(null, "usemap", "#map");
+img.setAttributeNS(null, "src", "data:image/gif;base64,R0lGODlhEwATAKIAAP//AMzMADMzAP8AAAAAAP///wAAAAAAACH5BAEAAAUALAAAAAATABMAAANWWLrUTisyEoC1oUlFr8dQRHykFRad+Y0gdzlv86KVKdsskOUAjHu312rFK5FuxaMNIMgYe85GrVfKZVDAR7DHmVoG4IHn6vqEgZLU90xOq8OazUS7SQAAOw==");
+
+function boom()
+{
+ map = document.createElement("map");
+ map.setAttributeNS(null, "name", "map");
+ area = document.createElement("area");
+ map.appendChild(area);
+ span = document.createElement("span");
+ span.appendChild(img);
+ td = document.createElement("td");
+ span.appendChild(td);
+ map.appendChild(span);
+ document.body.appendChild(map);
+ boom2();
+}
+
+function boom2()
+{
+ // For reliable reproduction, need a flush here.
+ var x = document.body.offsetWidth;
+
+ // needs to be async, apparently.
+ setTimeout(boom3, 0);
+}
+
+function boom3()
+{
+ span.remove();
+ document.documentElement.removeAttribute("class");
+}
+
+</script>
+</head>
+
+<body onload="boom();"></body>
+
+</html>
diff --git a/layout/reftests/bugs/488390-1-ref.html b/layout/reftests/bugs/488390-1-ref.html
new file mode 100644
index 0000000000..14508f199d
--- /dev/null
+++ b/layout/reftests/bugs/488390-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+ <body>ab</body>
+</html>
diff --git a/layout/reftests/bugs/488390-1.html b/layout/reftests/bugs/488390-1.html
new file mode 100644
index 0000000000..dd8fa8a5c4
--- /dev/null
+++ b/layout/reftests/bugs/488390-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script type="text/javascript">
+ function boom()
+ {
+ var s = document.getElementById("s");
+ s.remove();
+ }
+ </script>
+ </head>
+ <body onload="boom();">
+ <!-- Need the bidi control chars to trigger non-fluid continuations, and
+ need the span right around the div so that the prevSibling of the node
+ whose frame we try to get doesn't have a frame map entry (so that we
+ don't have a useful hint). -->
+ <span>&#x202E;a&#x202C;b
+ <span><div></div></span>
+ <span id="s">This text should be gone</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/488649-1-ref.html b/layout/reftests/bugs/488649-1-ref.html
new file mode 100644
index 0000000000..fd47f3b528
--- /dev/null
+++ b/layout/reftests/bugs/488649-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Reference for bug 488649</title>
+ </head>
+ <body>
+ <div style="color: black; font-size: 36px;">PASS</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/488649-1.html b/layout/reftests/bugs/488649-1.html
new file mode 100644
index 0000000000..5065577cc0
--- /dev/null
+++ b/layout/reftests/bugs/488649-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Testcase for bug 488649</title>
+ </head>
+ <body onload="document.body.bgColor=document.body.bgColor;">
+ <div style="color: black; font-size: 36px;">PASS</div>
+ <div style="color: white; font-size: 36px;">FAIL</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/488685-1-ref.html b/layout/reftests/bugs/488685-1-ref.html
new file mode 100644
index 0000000000..dbe9a305ff
--- /dev/null
+++ b/layout/reftests/bugs/488685-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="padding: 3px;">
+<div style="width: 10px; height: 10px; background-position: -3px -3px; background-image: url(data:image/gif;base64,R0lGODlhEAAQAPAAALuWAAAAACH5BAUIAAEALAMAAwAKAAoAAAIMDI5nye0Po5xutVAAADs=)"></div>
+</div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/488685-1.html b/layout/reftests/bugs/488685-1.html
new file mode 100644
index 0000000000..9283304c47
--- /dev/null
+++ b/layout/reftests/bugs/488685-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img style="display:block;" src="data:image/gif;base64,R0lGODlhEAAQAPAAALuWAAAAACH5BAUIAAEALAMAAwAKAAoAAAIMDI5nye0Po5xutVAAADs=">
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/488692-1-ref.html b/layout/reftests/bugs/488692-1-ref.html
new file mode 100644
index 0000000000..d21a0da083
--- /dev/null
+++ b/layout/reftests/bugs/488692-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2.0">
+<body style="background: black">
+<div style="width: 100px; height: 100px; background: #00ff00"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/488692-1.html b/layout/reftests/bugs/488692-1.html
new file mode 100644
index 0000000000..0fa0b6752b
--- /dev/null
+++ b/layout/reftests/bugs/488692-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2.0">
+<body style="background: black">
+<canvas width="100" height="100" id="c"></canvas>
+<script type="text/javascript">
+var cx = document.getElementById("c").getContext("2d");
+cx.fillStyle = "#00ff00";
+cx.fillRect(0, 0, 100, 100);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/489868-1-ref.svg b/layout/reftests/bugs/489868-1-ref.svg
new file mode 100644
index 0000000000..4b2da23e8c
--- /dev/null
+++ b/layout/reftests/bugs/489868-1-ref.svg
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <rect x="20" y="20" width="75" height="75" fill="green"/>
+
+</svg>
diff --git a/layout/reftests/bugs/489868-1.svg b/layout/reftests/bugs/489868-1.svg
new file mode 100644
index 0000000000..e9d91e76ac
--- /dev/null
+++ b/layout/reftests/bugs/489868-1.svg
@@ -0,0 +1,34 @@
+<svg xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/2000/svg"
+ class="reftest-wait">
+
+<html:style>
+ .gencon:after { content: counter(chicken); }
+</html:style>
+
+<script type="text/javascript">
+
+var dc;
+var defs;
+
+function boom()
+{
+ var define = document.getElementById("define");
+ define.setAttribute("class", "gencon");
+ document.documentElement.removeAttribute("class");
+}
+
+window.addEventListener("load", boom, false);
+
+</script>
+
+<defs id="defs">
+ <g id="define">
+ <rect x="0" y="0" width="75" height="75" fill="green"/>
+ </g>
+</defs>
+
+<use xlink:href="#define" x="20" y="20" id="use" />
+
+</svg>
diff --git a/layout/reftests/bugs/490173-2-ref.html b/layout/reftests/bugs/490173-2-ref.html
new file mode 100644
index 0000000000..cab4e3f0c0
--- /dev/null
+++ b/layout/reftests/bugs/490173-2-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table border="1">
+ <colgroup>
+ <col width="200">
+ </colgroup>
+ <tr><td>Foo</tr></td>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/490173-2.html b/layout/reftests/bugs/490173-2.html
new file mode 100644
index 0000000000..9f9f23a749
--- /dev/null
+++ b/layout/reftests/bugs/490173-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="document.getElementById('c1').style.display = '';">
+ <table border="1">
+ <colgroup>
+ <col id="c1" width="200" style="display: block">
+ </colgroup>
+ <tr><td>Foo</tr></td>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/490176-1-ref.html b/layout/reftests/bugs/490176-1-ref.html
new file mode 100644
index 0000000000..a44124ae24
--- /dev/null
+++ b/layout/reftests/bugs/490176-1-ref.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<style type="text/css">
+
+body, p {
+ display: table;
+ position: absolute;
+}
+
+</style>
+</head>
+
+<body>
+<div>A B</div>
+<p id="n">C D</p>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/490176-1.html b/layout/reftests/bugs/490176-1.html
new file mode 100644
index 0000000000..30d42412f9
--- /dev/null
+++ b/layout/reftests/bugs/490176-1.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+<style type="text/css">
+
+body, p {
+ display: table;
+ position: absolute;
+}
+
+</style>
+
+<script type="text/javascript">
+
+function boom()
+{
+ var n = document.getElementById("n");
+ var b = document.body;
+ var next = n.nextSibling;
+ b.removeChild(n);
+ b.insertBefore(n, next);
+}
+
+</script>
+</head>
+
+<body onload="boom();">
+<div>A B</div>
+<p id="n">C D</p>
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/490177-1-ref.svg b/layout/reftests/bugs/490177-1-ref.svg
new file mode 100644
index 0000000000..0fb4b31145
--- /dev/null
+++ b/layout/reftests/bugs/490177-1-ref.svg
@@ -0,0 +1,18 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+
+<foreignObject id="f" width="500" height="500" y="300">
+
+<div xmlns="http://www.w3.org/1999/xhtml">
+
+<table border="1">
+ <tr>
+ <td><input type="text" value="3" /></td>
+ </tr>
+</table>
+
+</div>
+
+</foreignObject>
+
+</svg>
diff --git a/layout/reftests/bugs/490177-1.svg b/layout/reftests/bugs/490177-1.svg
new file mode 100644
index 0000000000..0bebcc02e5
--- /dev/null
+++ b/layout/reftests/bugs/490177-1.svg
@@ -0,0 +1,27 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+
+<foreignObject id="f" width="500" height="500" y="300">
+
+<div xmlns="http://www.w3.org/1999/xhtml">
+
+<table border="1">
+ <tr>
+ <td><input type="text" value="3" /></td>
+ </tr>
+</table>
+
+</div>
+
+</foreignObject>
+
+<script>
+window.addEventListener("load", boom, false);
+function boom()
+{
+ var f = document.getElementById("f");
+ document.documentElement.appendChild(f);
+}
+</script>
+
+</svg>
diff --git a/layout/reftests/bugs/490182-1-ref.html b/layout/reftests/bugs/490182-1-ref.html
new file mode 100644
index 0000000000..9c002563ff
--- /dev/null
+++ b/layout/reftests/bugs/490182-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+<body>
+<table border="2" id="table">
+<col id="col1">
+<col width=200 id="col2">
+<tr>
+<td>100?</td><td>200</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/490182-1a.html b/layout/reftests/bugs/490182-1a.html
new file mode 100644
index 0000000000..f7ccc776a6
--- /dev/null
+++ b/layout/reftests/bugs/490182-1a.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="text/javascript">
+function boom()
+{
+ var col1 = document.getElementById("col1");
+ var parent = col1.parentNode;
+ var next = col1.nextSibling;
+
+ parent.removeChild(col1);
+ reflow();
+ parent.insertBefore(col1, next);
+ reflow();
+ col1.removeAttribute("width");
+}
+
+function reflow() { document.documentElement.offsetHeight; }
+
+</script>
+</head>
+<body onload="boom();">
+<table border="2" id="table">
+<col width=100 id="col1">
+<col width=200 id="col2">
+<tr>
+<td>100?</td><td>200</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/490182-1b.html b/layout/reftests/bugs/490182-1b.html
new file mode 100644
index 0000000000..8a661352c3
--- /dev/null
+++ b/layout/reftests/bugs/490182-1b.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="text/javascript">
+function boom()
+{
+ var col1 = document.createElement("col");
+ col1.setAttribute("width", "100");
+ var next = document.getElementById("col2");
+
+ next.parentNode.insertBefore(col1, next);
+ reflow();
+ col1.removeAttribute("width");
+}
+
+function reflow() { document.documentElement.offsetHeight; }
+
+</script>
+</head>
+<body onload="boom();">
+<table border="2" id="table">
+<col width=200 id="col2">
+<tr>
+<td>100?</td><td>200</td>
+</tr>
+</table>
+</BODY>
+</HTML>
diff --git a/layout/reftests/bugs/491180-1-ref.html b/layout/reftests/bugs/491180-1-ref.html
new file mode 100644
index 0000000000..e9dcf7cc56
--- /dev/null
+++ b/layout/reftests/bugs/491180-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+ <div style="padding: 0; margin: 0; border: none; background: transparent; -moz-appearance: none; width: 0; height: 0; font: inherit; padding: 0">
+ Some text <div style="background: green; width: 100px; height: 100px"></div>
+ </div>
diff --git a/layout/reftests/bugs/491180-1.html b/layout/reftests/bugs/491180-1.html
new file mode 100644
index 0000000000..c82712220f
--- /dev/null
+++ b/layout/reftests/bugs/491180-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+ <button style="padding: 0; margin: 0; border: none; background: transparent; -moz-appearance: none; width: 0; height: 0; font: inherit; color: black">
+ Some text <div style="background: green; width: 100px; height: 100px"></div>
+ </button>
diff --git a/layout/reftests/bugs/491180-2-ref.html b/layout/reftests/bugs/491180-2-ref.html
new file mode 100644
index 0000000000..7ab4aa58c5
--- /dev/null
+++ b/layout/reftests/bugs/491180-2-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+ <div style="padding: 0; margin: 0; border: none; background: transparent; -moz-appearance: none; width: 20px; font: inherit; padding: 0; white-space: pre; overflow: hidden">Some text</div>
+ </div>
diff --git a/layout/reftests/bugs/491180-2.html b/layout/reftests/bugs/491180-2.html
new file mode 100644
index 0000000000..c5f6b4cb73
--- /dev/null
+++ b/layout/reftests/bugs/491180-2.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html>
+ <input type="button" style="padding: 0; margin: 0; border: none; background: transparent; -moz-appearance: none; width: 20px; font: inherit; color: black" value="Some text">
diff --git a/layout/reftests/bugs/491323-1-ref.xhtml b/layout/reftests/bugs/491323-1-ref.xhtml
new file mode 100644
index 0000000000..bcfd636da2
--- /dev/null
+++ b/layout/reftests/bugs/491323-1-ref.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<hbox flex="1">
+ <html:style>
+ /* Make sure our splitter's background doesn't depend on its hover styles */
+ splitter {
+ background-color: yellow;
+ -moz-appearance: none;
+ }
+ </html:style>
+ <splitter collapse="before" resizeafter="farthest" width="200" id="s">
+ </splitter>
+</hbox>
+</window>
diff --git a/layout/reftests/bugs/491323-1.xhtml b/layout/reftests/bugs/491323-1.xhtml
new file mode 100644
index 0000000000..e255d1d4d3
--- /dev/null
+++ b/layout/reftests/bugs/491323-1.xhtml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="loaded()">
+<hbox flex="1">
+ <html:style>
+ /* Make sure our splitter's background doesn't depend on its hover styles */
+ splitter {
+ background-color: yellow;
+ -moz-appearance: none;
+ }
+ </html:style>
+ <script>
+ function loaded() {
+ document.documentElement.getBoundingClientRect();
+ document.getElementById("s").setAttribute("state", "collapsed");
+ }
+ </script>
+ <iframe width="200" src="data:text/html,hello"/>
+ <splitter collapse="before" resizeafter="farthest" width="200" id="s">
+ </splitter>
+</hbox>
+</window>
diff --git a/layout/reftests/bugs/492661-1-ref.html b/layout/reftests/bugs/492661-1-ref.html
new file mode 100644
index 0000000000..eaf999dc7b
--- /dev/null
+++ b/layout/reftests/bugs/492661-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body>
+
+<table>
+<col>
+<col style="visibility: collapse;"><col>
+<tbody id="tbody">
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ </tr>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ </tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/492661-1.html b/layout/reftests/bugs/492661-1.html
new file mode 100644
index 0000000000..c22de45142
--- /dev/null
+++ b/layout/reftests/bugs/492661-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function boom()
+{
+ var tbody = document.getElementById("tbody");
+ var table = tbody.parentNode;
+ table.removeChild(tbody);
+ document.documentElement.offsetHeight;
+ table.appendChild(tbody);
+}
+</script>
+</head>
+
+<body onload="boom();">
+
+<table>
+<col>
+<col style="visibility: collapse;"><col>
+<tbody id="tbody">
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ </tr>
+ <tr>
+ <td>one</td>
+ <td>two</td>
+ </tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/493968-1-ref.html b/layout/reftests/bugs/493968-1-ref.html
new file mode 100644
index 0000000000..d9c46efb14
--- /dev/null
+++ b/layout/reftests/bugs/493968-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; }</style>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/493968-1.html b/layout/reftests/bugs/493968-1.html
new file mode 100644
index 0000000000..a725be25fc
--- /dev/null
+++ b/layout/reftests/bugs/493968-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: red; }</style>
+ <link rel="stylesheet" href="data:text/css,@import 'data:text/css,body { color: green }'; @import 'data:text/css,foopy {}';" id="r">
+ <link rel="stylesheet" href="data:text/css,@import 'data:text/css,body { color: green }'; @import 'data:text/css,foopy {}';">
+ <script>
+ // Force a unique inner for the second linked sheet
+ document.styleSheets[2].cssRules[0];
+
+ // Ditch the first sheet
+ var r = document.getElementById("r");
+ r.remove();
+ </script>
+ </head>
+ <body>
+ This should be green
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/494667-1-ref.html b/layout/reftests/bugs/494667-1-ref.html
new file mode 100644
index 0000000000..0f300a1b6d
--- /dev/null
+++ b/layout/reftests/bugs/494667-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:200px; height:200px; background:lime;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/494667-1.html b/layout/reftests/bugs/494667-1.html
new file mode 100644
index 0000000000..fed4c9baae
--- /dev/null
+++ b/layout/reftests/bugs/494667-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+table {
+ border-collapse: collapse;
+ background-color: red;
+}
+td, th {
+ background-color: lime;
+ width:100px;
+ height:100px;
+ box-sizing:border-box;
+}
+td {
+ border-top: 4px solid lime;
+}
+</style>
+</head>
+<body>
+<table cellpadding="0">
+ <tr><th colspan="2"></th></tr>
+ <tr><th></th><td></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/494667-2-ref.html b/layout/reftests/bugs/494667-2-ref.html
new file mode 100644
index 0000000000..efe979237e
--- /dev/null
+++ b/layout/reftests/bugs/494667-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:204px; height:204px; background:lime;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/494667-2.html b/layout/reftests/bugs/494667-2.html
new file mode 100644
index 0000000000..98f3368596
--- /dev/null
+++ b/layout/reftests/bugs/494667-2.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+table {
+ border-collapse: collapse;
+ background-color: red;
+}
+td, th {
+ background-color: lime;
+ width:100px;
+ height:100px;
+ border:4px solid lime;
+ box-sizing:border-box;
+}
+td {
+ border-top:hidden;
+}
+</style>
+</head>
+<body>
+<table cellpadding="0">
+ <tr><th colspan="2"></th></tr>
+ <tr><th></th><td></td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495274-1-ref.html b/layout/reftests/bugs/495274-1-ref.html
new file mode 100644
index 0000000000..882f0ef9fc
--- /dev/null
+++ b/layout/reftests/bugs/495274-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; }</style>
+ </head>
+ <body>
+ This text should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/495274-1.html b/layout/reftests/bugs/495274-1.html
new file mode 100644
index 0000000000..2a0b3a85a6
--- /dev/null
+++ b/layout/reftests/bugs/495274-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>body { color: green; }</style>
+ <link rel="stylesheet" href='data:text/css,body > span { color: red }' type="text/css"/>
+ <link rel="stylesheet" href='data:text/css,body > span { color: red }' type="text/css"/>
+ <script>
+ // Force cloning of the second linked sheet
+ document.styleSheets[2].cssRules[0];
+ </script>
+ </head>
+ <body>
+ <div><span>This text should be green</span></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/495385-1-ref.html b/layout/reftests/bugs/495385-1-ref.html
new file mode 100644
index 0000000000..e1ee689e67
--- /dev/null
+++ b/layout/reftests/bugs/495385-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body style="border:1px solid black;">
+&nbsp;&nbsp;Hello<br>
+&nbsp;&nbsp;Hello<br>
+<br>
+Hello
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-1a.html b/layout/reftests/bugs/495385-1a.html
new file mode 100644
index 0000000000..715ddaddb1
--- /dev/null
+++ b/layout/reftests/bugs/495385-1a.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that changes to 'white-space' create frames when necessary -->
+<head>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.getElementById('d1').style.whiteSpace = 'pre';
+ document.getElementById('d2').style.whiteSpace = 'pre-wrap';
+ document.getElementById('d3').style.whiteSpace = 'pre-line';
+}
+</script>
+</head>
+<body onload="loaded()" style="border:1px solid black;">
+ <div id="d1"> <span>Hello</span> </div>
+ <div id="d2"> <span>Hello</span> </div>
+ <div id="d3">
+ <span>Hello</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-1b.html b/layout/reftests/bugs/495385-1b.html
new file mode 100644
index 0000000000..59b68bacc0
--- /dev/null
+++ b/layout/reftests/bugs/495385-1b.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that 'white-space' creates frames when necessary -->
+<body style="border:1px solid black;">
+ <div style="white-space:pre"> <span>Hello</span> </div>
+ <div style="white-space:pre-wrap"> <span>Hello</span> </div>
+ <div style="white-space:pre-line">
+ <span>Hello</span>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-1c.html b/layout/reftests/bugs/495385-1c.html
new file mode 100644
index 0000000000..c406ddb900
--- /dev/null
+++ b/layout/reftests/bugs/495385-1c.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that 'white-space' creates text frames between blocks when necessary -->
+<body style="border:1px solid black; white-space:pre"> Hello<div></div> Hello
+<div></div>
+Hello</body></html>
diff --git a/layout/reftests/bugs/495385-1d.html b/layout/reftests/bugs/495385-1d.html
new file mode 100644
index 0000000000..c5bf32988b
--- /dev/null
+++ b/layout/reftests/bugs/495385-1d.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that 'white-space' creates text frames between blocks when necessary -->
+<body style="border:1px solid black; white-space:pre-wrap"> Hello<div></div> Hello
+<div></div>
+Hello</body></html>
diff --git a/layout/reftests/bugs/495385-1e.html b/layout/reftests/bugs/495385-1e.html
new file mode 100644
index 0000000000..29adcb1b4a
--- /dev/null
+++ b/layout/reftests/bugs/495385-1e.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that 'white-space' creates between text frames blocks (dynamically) when necessary -->
+<head>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.body.style.whiteSpace = 'pre';
+}
+</script>
+</head>
+<body onload="loaded()" style="border:1px solid black;"> Hello<div></div> Hello
+<div></div>
+Hello</body></html>
diff --git a/layout/reftests/bugs/495385-1f.html b/layout/reftests/bugs/495385-1f.html
new file mode 100644
index 0000000000..c0f4e3d7d1
--- /dev/null
+++ b/layout/reftests/bugs/495385-1f.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that 'white-space' creates text frames between blocks (dynamically) when necessary -->
+<head>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.body.style.whiteSpace = 'pre-wrap';
+}
+</script>
+</head>
+<body onload="loaded()" style="border:1px solid black;"> Hello<div></div> Hello
+<div></div>
+Hello</body></html>
diff --git a/layout/reftests/bugs/495385-2-ref.html b/layout/reftests/bugs/495385-2-ref.html
new file mode 100644
index 0000000000..bc8ca2db01
--- /dev/null
+++ b/layout/reftests/bugs/495385-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+</head>
+<body>
+ <div><span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2a.html b/layout/reftests/bugs/495385-2a.html
new file mode 100644
index 0000000000..8905c15cf1
--- /dev/null
+++ b/layout/reftests/bugs/495385-2a.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that removing a block element can create frames for text around it -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+<script>
+function remove(id) {
+ var e = document.getElementById(id);
+ e.remove();
+}
+function loaded() {
+ document.body.offsetHeight;
+ remove("d1");
+ remove("d2");
+ remove("d3");
+ remove("d4");
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div><span>Hello</span><div id="d1">X</div> <span>Kitty</span></div>
+ <div><span>Hello</span> <div id="d2">X</div><span>Kitty</span></div>
+ <!-- we'll create frames here, but they won't make a difference to the rendering -->
+ <div><div id="d3">X</div> <span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span> <div id="d4">X</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2b.html b/layout/reftests/bugs/495385-2b.html
new file mode 100644
index 0000000000..d749ccdeba
--- /dev/null
+++ b/layout/reftests/bugs/495385-2b.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<!-- Test that inserting inline content can create frames for text around it -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+<script>
+function makeSpan(text) {
+ var e = document.createElement("span");
+ e.textContent = text;
+ return e;
+}
+function loaded() {
+ document.body.offsetHeight;
+ var d1 = document.getElementById("d1");
+ d1.insertBefore(makeSpan("Hello"), d1.firstChild);
+ var d2 = document.getElementById("d2");
+ d2.appendChild(makeSpan("Kitty"));
+ var d3 = document.getElementById("d3");
+ d3.insertBefore(makeSpan("Hello"), d3.firstChild.nextSibling);
+ var d4 = document.getElementById("d4");
+ d4.insertBefore(makeSpan("Kitty"), d4.lastChild);
+ document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", loaded);
+</script>
+</head>
+<body>
+ <div id="d1"> <span>Kitty</span></div>
+ <div id="d2"><span>Hello</span> </div>
+ <div id="d3"><div></div> <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> <div></div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2c.html b/layout/reftests/bugs/495385-2c.html
new file mode 100644
index 0000000000..1d35576718
--- /dev/null
+++ b/layout/reftests/bugs/495385-2c.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that insertions work in the presence of display:none elements that
+ separate whitespace from block boundaries -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+em { display:none; }
+</style>
+<script>
+function makeSpan(text) {
+ var e = document.createElement("span");
+ e.textContent = text;
+ return e;
+}
+function loaded() {
+ document.body.offsetHeight;
+ var d1 = document.getElementById("d1");
+ d1.insertBefore(makeSpan("Hello"), d1.firstChild);
+ var d2 = document.getElementById("d2");
+ d2.appendChild(makeSpan("Kitty"));
+ var d3 = document.getElementById("d3");
+ d3.insertBefore(makeSpan("Hello"), d3.firstChild.nextSibling);
+ var d4 = document.getElementById("d4");
+ d4.insertBefore(makeSpan("Kitty"), d4.lastChild);
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div id="d1"><em>X</em> <span>Kitty</span></div>
+ <div id="d2"><span>Hello</span> <em>X</em></div>
+ <div id="d3"><div></div><em>X</em> <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> <em>X</em><div></div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2d.html b/layout/reftests/bugs/495385-2d.html
new file mode 100644
index 0000000000..c2b61a66d0
--- /dev/null
+++ b/layout/reftests/bugs/495385-2d.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that before/after generated content stops suppression correctly,
+ both statically and dynamically -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+#d1:before { content:"Hello"; }
+#d2:after { content:"Kitty"; }
+#d3.c:before { content:"Hello"; }
+#d4.c:after { content:"Kitty"; }
+</style>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.getElementById("d3").setAttribute("class", "c");
+ document.getElementById("d4").setAttribute("class", "c");
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div id="d1"> <span>Kitty</span></div>
+ <div id="d2"><span>Hello</span> </div>
+ <div id="d3"> <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2e.html b/layout/reftests/bugs/495385-2e.html
new file mode 100644
index 0000000000..292132cc55
--- /dev/null
+++ b/layout/reftests/bugs/495385-2e.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that reframing content stops suppression around it correctly
+ and that setting text content twice works. Setting text node contents
+ twice may fail if we create a frame, then reframe, and botch the second
+ reframe. -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.getElementById("d1").style.display = 'inline';
+ document.getElementById("d2").style.display = 'inline';
+ document.getElementById("d3").firstChild.data = "H ";
+ document.getElementById("d3").firstChild.data = "Hello ";
+ document.getElementById("d4").lastChild.data = " K";
+ document.getElementById("d4").lastChild.data = " Kitty";
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div><div id="d1">Hello</div> <span>Kitty</span></div>
+ <div><span>Hello</span> <div id="d2">Kitty</div></div>
+ <div id="d3"> <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2g.html b/layout/reftests/bugs/495385-2g.html
new file mode 100644
index 0000000000..5fed301ebd
--- /dev/null
+++ b/layout/reftests/bugs/495385-2g.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that removing a <br> can create frames for text around it -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+<script>
+function remove(id) {
+ var e = document.getElementById(id);
+ e.remove();
+}
+function loaded() {
+ document.body.offsetHeight;
+ remove("b1");
+ remove("b2");
+ remove("b3");
+ remove("b4");
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div><span>Hello</span><br id="b1"> <span>Kitty</span></div>
+ <div><span>Hello</span> <br id="b2"><span>Kitty</span></div>
+ <!-- we'll create frames here, but they won't make a difference to the rendering -->
+ <div><br id="b3"> <span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span> <br id="b4"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2h.html b/layout/reftests/bugs/495385-2h.html
new file mode 100644
index 0000000000..bd7a385ca3
--- /dev/null
+++ b/layout/reftests/bugs/495385-2h.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test appends -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+#d2:after { content:"Kitty"; }
+#d3:after { content:"ty"; }
+</style>
+<script>function flush() { document.body.offsetHeight; }</script>
+</head>
+<body>
+ <div id="d1"><span>Hello</span> <script>flush();</script><span>Kitty</span></div>
+ <div id="d2"><script>flush();</script><span>Hello</span> </div>
+ <div id="d3"><span>Hello</span> <script>flush();</script><span>Kit</span></div>
+ <div id="d4"><span>Hello</span><script>flush();</script> <span>Kitty</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-2i.html b/layout/reftests/bugs/495385-2i.html
new file mode 100644
index 0000000000..86340008fb
--- /dev/null
+++ b/layout/reftests/bugs/495385-2i.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that setting a block element to display:none can create frames
+ for text around it -->
+<style>
+body > div { border:1px solid black; margin:1em;
+ font-family:sans-serif; letter-spacing:2px; }
+</style>
+<script>
+function hide(id) {
+ var e = document.getElementById(id);
+ e.style.display = 'none';
+}
+function loaded() {
+ document.body.offsetHeight;
+ hide("d1");
+ hide("d2");
+ hide("d3");
+ hide("d4");
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div><span>Hello</span><div id="d1">X</div> <span>Kitty</span></div>
+ <div><span>Hello</span> <div id="d2">X</div><span>Kitty</span></div>
+ <!-- we'll create frames here, but they won't make a difference to the rendering -->
+ <div><div id="d3">X</div> <span>Hello</span> <span>Kitty</span></div>
+ <div><span>Hello</span> <span>Kitty</span><div id="d4">X</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-3-ref.html b/layout/reftests/bugs/495385-3-ref.html
new file mode 100644
index 0000000000..2240982ed5
--- /dev/null
+++ b/layout/reftests/bugs/495385-3-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html>
+<body style="border:1px solid black;">X</body>
+</html>
diff --git a/layout/reftests/bugs/495385-3.html b/layout/reftests/bugs/495385-3.html
new file mode 100644
index 0000000000..0ae05e6ca7
--- /dev/null
+++ b/layout/reftests/bugs/495385-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<!-- Test that changes to text contents create frames when necessary -->
+<head>
+<script>
+function loaded() {
+ document.body.offsetHeight;
+ document.body.firstChild.data = 'X';
+}
+</script>
+</head>
+<body onload="loaded()" style="border:1px solid black;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-4-ref.html b/layout/reftests/bugs/495385-4-ref.html
new file mode 100644
index 0000000000..bc650ce837
--- /dev/null
+++ b/layout/reftests/bugs/495385-4-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body > div { border:1px solid black; margin:1em; }
+</style>
+</head>
+<body>
+ <div id="d3"><br>Hello <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> Kitty<br></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-4.html b/layout/reftests/bugs/495385-4.html
new file mode 100644
index 0000000000..2cdc764c81
--- /dev/null
+++ b/layout/reftests/bugs/495385-4.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<!-- Test that inserting inline content can create frames for text around it
+ when there are <br>s -->
+<style>
+body > div { border:1px solid black; margin:1em; }
+</style>
+<script>
+function makeSpan(text) {
+ var e = document.createElement("span");
+ e.textContent = text;
+ return e;
+}
+function loaded() {
+ var d3 = document.getElementById("d3");
+ d3.insertBefore(makeSpan("Hello"), d3.firstChild.nextSibling);
+ var d4 = document.getElementById("d4");
+ d4.insertBefore(makeSpan("Kitty"), d4.lastChild);
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div id="d3"><br> <span>Kitty</span></div>
+ <div id="d4"><span>Hello</span> <br></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-5-ref.html b/layout/reftests/bugs/495385-5-ref.html
new file mode 100644
index 0000000000..f615bc7c2d
--- /dev/null
+++ b/layout/reftests/bugs/495385-5-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body > div { border:1px solid black; margin:1em; }
+div:first-line { color:green; }
+div:first-letter { color:lime; }
+.f:first-letter { float:left; }
+</style>
+</head>
+<body>
+ <div>Hello<br>Kitty</div>
+ <div class="f">Hello<br>Kitty</div>
+ <div>Hello<br>Kitty</div>
+ <div class="f">Hello<br>Kitty</div>
+ <div>Hello Hello<br>Kitty</div>
+ <div class="f">Hello Hello<br>Kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/495385-5.html b/layout/reftests/bugs/495385-5.html
new file mode 100644
index 0000000000..dc6d663dc3
--- /dev/null
+++ b/layout/reftests/bugs/495385-5.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body > div { border:1px solid black; margin:1em; }
+div:first-line { color:green; }
+div:first-letter { color:lime; }
+.f:first-letter { float:left; }
+</style>
+<script>
+function setH(id) {
+ document.getElementById(id).firstChild.data = "H";
+}
+function insertSpan(id) {
+ var d = document.getElementById(id);
+ var span = document.createElement("span");
+ span.textContent = "Hello";
+ d.insertBefore(span, d.firstChild);
+}
+function loaded() {
+ setH("d1");
+ setH("d2");
+ insertSpan("d3");
+ insertSpan("d4");
+}
+</script>
+</head>
+<body onload="loaded()">
+ <div> Hello<br>Kitty</div>
+ <div class="f"> <span>Hello</span><br>Kitty</div>
+ <div id="d1"> <span>ello</span><br>Kitty</div>
+ <div id="d2" class="f"> <span>ello</span><br>Kitty</div>
+ <div id="d3"> <span>Hello</span><br>Kitty</div>
+ <div id="d4" class="f"> <span>Hello</span><br>Kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/496032-1-ref.html b/layout/reftests/bugs/496032-1-ref.html
new file mode 100644
index 0000000000..faed2e13d1
--- /dev/null
+++ b/layout/reftests/bugs/496032-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div { color:lime; }
+div:first-letter { font-size:200%; }
+</style>
+</head>
+<body>
+<button><div>Hello</div></button>
+</body>
+</html>
diff --git a/layout/reftests/bugs/496032-1.html b/layout/reftests/bugs/496032-1.html
new file mode 100644
index 0000000000..ae0b489819
--- /dev/null
+++ b/layout/reftests/bugs/496032-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+button { display:inline-block; }
+button:first-letter { font-size:200%; }
+button:first-line { color:lime; }
+</style>
+</head>
+<body>
+<button>Hello</button>
+</body>
+</html>
diff --git a/layout/reftests/bugs/496840-1-ref.html b/layout/reftests/bugs/496840-1-ref.html
new file mode 100644
index 0000000000..f96396ca5e
--- /dev/null
+++ b/layout/reftests/bugs/496840-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<fieldset id="fs1"><legend>#1</legend><legend>#2</legend></fieldset>
+<fieldset id="fs2"><legend>#2</legend></fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/496840-1.html b/layout/reftests/bugs/496840-1.html
new file mode 100644
index 0000000000..3901069e7d
--- /dev/null
+++ b/layout/reftests/bugs/496840-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+<fieldset id="fs1"><legend>#2</legend></fieldset>
+<fieldset id="fs2"><legend>#1</legend><legend>#2</legend></fieldset>
+<script>
+document.body.offsetHeight;
+
+var fs1 = document.getElementById("fs1");
+var l = document.createElement("legend");
+l.textContent = "#1";
+fs1.insertBefore(l, fs1.firstChild);
+
+var fs2 = document.getElementById("fs2");
+fs2.firstChild.remove();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/501037-ref.html b/layout/reftests/bugs/501037-ref.html
new file mode 100644
index 0000000000..30b16a92df
--- /dev/null
+++ b/layout/reftests/bugs/501037-ref.html
@@ -0,0 +1,12 @@
+<html>
+<head></head>
+
+<body>
+
+<ol>
+ <li id="a"></li>
+ <li id="b">b</li>
+</ol>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/501037.html b/layout/reftests/bugs/501037.html
new file mode 100644
index 0000000000..b02f945248
--- /dev/null
+++ b/layout/reftests/bugs/501037.html
@@ -0,0 +1,12 @@
+<html>
+<head></head>
+
+<body onload="document.getElementById('a').firstChild.data = '';">
+
+<ol>
+ <li id="a">a</li>
+ <li id="b">b</li>
+</ol>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/501257-1-ref.html b/layout/reftests/bugs/501257-1-ref.html
new file mode 100644
index 0000000000..e80b55984b
--- /dev/null
+++ b/layout/reftests/bugs/501257-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="color: green;">
+ This should be green
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/501257-1-ref.xhtml b/layout/reftests/bugs/501257-1-ref.xhtml
new file mode 100644
index 0000000000..09719f760d
--- /dev/null
+++ b/layout/reftests/bugs/501257-1-ref.xhtml
@@ -0,0 +1,7 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <div style="color: green;">
+ This should be green
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/501257-1.xhtml b/layout/reftests/bugs/501257-1.xhtml
new file mode 100644
index 0000000000..2629a5ff37
--- /dev/null
+++ b/layout/reftests/bugs/501257-1.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style><![CDATA[
+ .green { color: green; }
+ .toremove { color: red !important; }
+ ]]></style>
+ </head>
+ <body>
+ <div class="foo toremove">
+ This should be green
+ </div>
+ <script>
+ var div = document.getElementsByTagName("div")[0];
+ div.classList.toggle("toremove");
+ div.classList.toggle("green");
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/501257-1a.html b/layout/reftests/bugs/501257-1a.html
new file mode 100644
index 0000000000..013b804153
--- /dev/null
+++ b/layout/reftests/bugs/501257-1a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .green { color: green; }
+ </style>
+ </head>
+ <body>
+ <div>
+ This should be green
+ </div>
+ <script>
+ document.body.firstElementChild.classList.add("green");
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/501257-1b.html b/layout/reftests/bugs/501257-1b.html
new file mode 100644
index 0000000000..ed83afa377
--- /dev/null
+++ b/layout/reftests/bugs/501257-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > div { color: green; }
+ .toremove { color: red; }
+ </style>
+ </head>
+ <body>
+ <div class="toremove">
+ This should be green
+ </div>
+ <script>
+ document.body.firstElementChild.classList.remove("toremove");
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/501627-1-ref.html b/layout/reftests/bugs/501627-1-ref.html
new file mode 100644
index 0000000000..3266618369
--- /dev/null
+++ b/layout/reftests/bugs/501627-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2">
+<body style="overflow:hidden"
+background="data:image/gif;base64,R0lGODlhEgASALMAANbv9////8bp9LXi8aTc7pPV6////////////////////////////////////////ywAAAAAEgASAAAEIlCASaul8uo6tgfdpxHiWF7FaaVqe2YqfIYqfZItrrK7K0YAOw==">
+<div style="height: 2000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/501627-1.html b/layout/reftests/bugs/501627-1.html
new file mode 100644
index 0000000000..719e90b5de
--- /dev/null
+++ b/layout/reftests/bugs/501627-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="2">
+<body style="overflow:hidden"
+background="data:image/gif;base64,R0lGODlhEgASALMAANbv9////8bp9LXi8aTc7pPV6////////////////////////////////////////ywAAAAAEgASAAAEIlCASaul8uo6tgfdpxHiWF7FaaVqe2YqfIYqfZItrrK7K0YAOw==">
+<div style="height: 100000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/502288-1-ref.html b/layout/reftests/bugs/502288-1-ref.html
new file mode 100644
index 0000000000..7088fbd675
--- /dev/null
+++ b/layout/reftests/bugs/502288-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div id="x" style="padding-top: 2em">
+ Some text
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/502288-1.html b/layout/reftests/bugs/502288-1.html
new file mode 100644
index 0000000000..d0d787ce56
--- /dev/null
+++ b/layout/reftests/bugs/502288-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ document.getElementById("x").style.paddingTop = "2em";
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body>
+ <div id="x">
+ Some text
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/502447-1-ref.html b/layout/reftests/bugs/502447-1-ref.html
new file mode 100644
index 0000000000..5a928ed389
--- /dev/null
+++ b/layout/reftests/bugs/502447-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%'>
+ <body style='margin: 0; padding: 0; height: 100%'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/502447-1.html b/layout/reftests/bugs/502447-1.html
new file mode 100644
index 0000000000..6b42eed164
--- /dev/null
+++ b/layout/reftests/bugs/502447-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%'>
+ <body style='margin: 0; padding: 0; height: 100%'
+ onload='document.documentElement.style.overflow = &quot;hidden&quot;;
+ document.body.offsetWidth;
+ document.documentElement.style.overflow=&quot;&quot;'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/502447-2-ref.html b/layout/reftests/bugs/502447-2-ref.html
new file mode 100644
index 0000000000..bb168d4c25
--- /dev/null
+++ b/layout/reftests/bugs/502447-2-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html></html>"></iframe>
diff --git a/layout/reftests/bugs/502447-2.html b/layout/reftests/bugs/502447-2.html
new file mode 100644
index 0000000000..0f5f5c4e0f
--- /dev/null
+++ b/layout/reftests/bugs/502447-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%; overflow: visible'>
+ <body style='margin: 0; padding: 0; height: 100%'
+ onload='document.body.offsetWidth;
+ document.documentElement.style.overflow=&quot;hidden&quot;'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/502795-1-ref.html b/layout/reftests/bugs/502795-1-ref.html
new file mode 100644
index 0000000000..61b366c8b8
--- /dev/null
+++ b/layout/reftests/bugs/502795-1-ref.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>bug 502795 - letterspace with downloaded font</title>
+</head>
+<style type="text/css">
+@font-face {
+ font-family: test;
+ src: url(../fonts/MarkA.ttf);
+}
+p {
+ font-family: test;
+ font-size: 24pt;
+}
+</style>
+<body>
+<p>A</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/502795-1.html b/layout/reftests/bugs/502795-1.html
new file mode 100644
index 0000000000..25d8b498db
--- /dev/null
+++ b/layout/reftests/bugs/502795-1.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<title>bug 502795 - letterspace with downloaded font</title>
+</head>
+<style type="text/css">
+@font-face {
+ font-family: test;
+ src: url(../fonts/MarkA.ttf);
+}
+p {
+ font-family: test;
+ font-size: 24pt;
+ letter-spacing: 10px;
+}
+</style>
+<!-- with letterspacing, the downloaded font will fail to render
+ via coretext due to bug 502795 -->
+<body>
+<p>A</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/502942-1-ref.html b/layout/reftests/bugs/502942-1-ref.html
new file mode 100644
index 0000000000..dba025cb28
--- /dev/null
+++ b/layout/reftests/bugs/502942-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body style="line-height: 100px">
+ <div style="display: inline-block; height: 100px; border: none">bbb</div>bbb
+</body>
+</html>
diff --git a/layout/reftests/bugs/502942-1.html b/layout/reftests/bugs/502942-1.html
new file mode 100644
index 0000000000..50046a739d
--- /dev/null
+++ b/layout/reftests/bugs/502942-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body style="line-height: 100px">
+ <fieldset style="display: inline; height: 100px; border: none; padding: 0; margin:0">bbb</fieldset>bbb
+</body>
+</html>
diff --git a/layout/reftests/bugs/503364-1-ref.html b/layout/reftests/bugs/503364-1-ref.html
new file mode 100644
index 0000000000..7087eda4db
--- /dev/null
+++ b/layout/reftests/bugs/503364-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table style="position: absolute; top: 100px; left: 100px;">
+ <tr>
+ <td>
+ <div style="position: absolute; left: 20px; top: 20px; background: black; height: 20px; width: 20px"></div>
+ </td>
+ </tr>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/503364-1a.html b/layout/reftests/bugs/503364-1a.html
new file mode 100644
index 0000000000..a6bc481a5a
--- /dev/null
+++ b/layout/reftests/bugs/503364-1a.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ var div = document.createElement('div');
+ div.setAttribute("style", "position: absolute; left: 20px; top: 20px; background: black; height: 20px; width: 20px");
+ document.getElementById("t").appendChild(div);
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <table style="position: absolute; top: 100px; left: 100px;">
+ <tr>
+ <td id="t">
+ </td>
+ </tr>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/503364-1b.html b/layout/reftests/bugs/503364-1b.html
new file mode 100644
index 0000000000..3d66e5863b
--- /dev/null
+++ b/layout/reftests/bugs/503364-1b.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait" style="display: none">
+ <head>
+ <script>
+ function doTest() {
+ document.documentElement.style.display = "";
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <body>
+ <table style="position: absolute; top: 100px; left: 100px;">
+ <tr>
+ <td>
+ <div style="position: absolute; left: 20px; top: 20px; background: black; height: 20px; width: 20px"></div>
+ </td>
+ </tr>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/503531-1-ref.html b/layout/reftests/bugs/503531-1-ref.html
new file mode 100644
index 0000000000..e04c3886da
--- /dev/null
+++ b/layout/reftests/bugs/503531-1-ref.html
@@ -0,0 +1,23 @@
+<html class="reftest-wait"><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase #1 for bug 503531</title>
+<script>
+function boom() {
+ var caret = document.getElementById('caret');
+
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ var range = document.createRange();
+ range.selectNode(caret);
+ sel.addRange(range);
+ sel.collapseToStart();
+
+ setTimeout(function(){document.documentElement.className = '';}, 50)
+}
+</script>
+</head>
+<body contenteditable="true" onload="document.body.focus(); boom()">
+<div>BLOCK</div>
+<div id="caret"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/503531-1.html b/layout/reftests/bugs/503531-1.html
new file mode 100644
index 0000000000..3587d85b07
--- /dev/null
+++ b/layout/reftests/bugs/503531-1.html
@@ -0,0 +1,25 @@
+<html class="reftest-wait"><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase #1 for bug 503531</title>
+<script>
+function boom() {
+ var emptyText = document.createTextNode('x');
+ document.body.appendChild(emptyText);
+
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ var range = document.createRange();
+ range.selectNode(emptyText);
+ sel.addRange(range);
+ sel.collapseToStart();
+
+ emptyText.nodeValue='';
+
+ setTimeout(function(){document.documentElement.className = '';}, 50)
+}
+</script>
+</head>
+<body contenteditable="true" onload="document.body.focus(); boom()">
+<div>BLOCK</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/504032-1-ref.html b/layout/reftests/bugs/504032-1-ref.html
new file mode 100644
index 0000000000..1c9bc0fb57
--- /dev/null
+++ b/layout/reftests/bugs/504032-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ body { color: green }
+ </style>
+ </head>
+ <body>test</body>
+</html>
diff --git a/layout/reftests/bugs/504032-1.html b/layout/reftests/bugs/504032-1.html
new file mode 100644
index 0000000000..92a34fe3bc
--- /dev/null
+++ b/layout/reftests/bugs/504032-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ body { color: green }
+ </style>
+ <link rel="stylesheet"
+ href="data:text/css,@media no-such-medium { body { color: red } }"
+ type="text/css">
+ <link rel="stylesheet"
+ href="data:text/css,@media no-such-medium { body { color: red } }"
+ type="text/css">
+ <script>
+ // Force cloning of the second linked sheet
+ document.styleSheets[2].cssRules[0];
+ </script>
+ </head>
+ <body>test</body>
+</html>
diff --git a/layout/reftests/bugs/505743-1.html b/layout/reftests/bugs/505743-1.html
new file mode 100644
index 0000000000..df6cd0f5af
--- /dev/null
+++ b/layout/reftests/bugs/505743-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+#a {
+ display: block;
+ opacity:1;
+ overflow:hidden;
+ width: 100px;
+ height: 100px;
+ background-color: lime;
+}
+</style>
+</head>
+<body>
+<span id="a"></span>
+<script>
+function doe() {
+ document.getElementById('a').style.opacity = '0';
+ document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doe);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-1-ref.html b/layout/reftests/bugs/50630-1-ref.html
new file mode 100644
index 0000000000..e60c760f3e
--- /dev/null
+++ b/layout/reftests/bugs/50630-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for float placement rules (reference)</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style>
+.left { float:left; }
+.right { float:right; }
+.left, .right { width:50px; height:50px; background:yellow; }
+p { overflow:auto; }
+</style>
+</head>
+<body style="width:400px;">
+<p><span class="left"></span>HelloKitty
+<p><span class="right"></span>HelloKitty
+<p dir="rtl"><span class="left"></span>HelloKitty
+<p dir="rtl"><span class="right"></span>HelloKitty
+<p style="text-align:right;"><span class="left"></span>HelloKitty
+<p style="text-align:right;"><span class="right"></span>HelloKitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-1a.html b/layout/reftests/bugs/50630-1a.html
new file mode 100644
index 0000000000..e5cef0b2f8
--- /dev/null
+++ b/layout/reftests/bugs/50630-1a.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for float placement rules</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+<meta name="assert" content="A floating box must be placed as high as possible. " />
+<meta name="flags" content="" />
+<style>
+.left { float:left; }
+.right { float:right; }
+.left, .right { width:50px; height:50px; background:yellow; }
+p { overflow:auto; }
+</style>
+</head>
+<body style="width:400px;">
+<p>Hello<span class="left"></span>Kitty
+<p>Hello<span class="right"></span>Kitty
+<p dir="rtl">Hello<span class="left"></span>Kitty
+<p dir="rtl">Hello<span class="right"></span>Kitty
+<p style="text-align:right;">Hello<span class="left"></span>Kitty
+<p style="text-align:right;">Hello<span class="right"></span>Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-1b.html b/layout/reftests/bugs/50630-1b.html
new file mode 100644
index 0000000000..8426e59484
--- /dev/null
+++ b/layout/reftests/bugs/50630-1b.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for float placement rules</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+<meta name="assert" content="A floating box must be placed as high as possible. " />
+<meta name="flags" content="" />
+<style>
+.left { float:left; }
+.right { float:right; }
+.left, .right { width:50px; height:50px; background:yellow; }
+p { overflow:auto; }
+</style>
+</head>
+<body style="width:400px">
+<p><span>Hello<span class="left"></span></span>Kitty
+<p><span>Hello<span class="right"></span></span>Kitty
+<p dir="rtl"><span>Hello<span class="left"></span></span>Kitty
+<p dir="rtl"><span>Hello<span class="right"></span></span>Kitty
+<p style="text-align:right;"><span>Hello<span class="left"></span></span>Kitty
+<p style="text-align:right;"><span>Hello<span class="right"></span></span>Kitty
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-1c.html b/layout/reftests/bugs/50630-1c.html
new file mode 100644
index 0000000000..b346e45659
--- /dev/null
+++ b/layout/reftests/bugs/50630-1c.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for float placement rules</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+<meta name="assert" content="A floating box must be placed as high as possible. " />
+<meta name="flags" content="" />
+<style>
+.left { float:left; }
+.right { float:right; }
+.left, .right { width:50px; height:50px; background:yellow; }
+p { overflow:auto; }
+</style>
+</head>
+<body style="width:400px;">
+<p>Hello<span><span class="left"></span>Kitty</span>
+<p>Hello<span><span class="right"></span>Kitty</span>
+<p dir="rtl">Hello<span><span class="left"></span>Kitty</span>
+<p dir="rtl">Hello<span><span class="right"></span>Kitty</span>
+<p style="text-align:right;">Hello<span><span class="left"></span>Kitty</span>
+<p style="text-align:right;">Hello<span><span class="right"></span>Kitty</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-2-ref.html b/layout/reftests/bugs/50630-2-ref.html
new file mode 100644
index 0000000000..f4b2984e1b
--- /dev/null
+++ b/layout/reftests/bugs/50630-2-ref.html
@@ -0,0 +1,17 @@
+<html>
+<body style="width:400px;">
+<div style="float:left; width:200px; height:100px; background:yellow;"></div>
+Hello
+<br clear=all><table><tr><td>
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-2.html b/layout/reftests/bugs/50630-2.html
new file mode 100644
index 0000000000..18ba7f22eb
--- /dev/null
+++ b/layout/reftests/bugs/50630-2.html
@@ -0,0 +1,17 @@
+<html>
+<body style="width:400px;">
+<div style="float:left; width:200px; height:100px; background:yellow;"></div>
+Hello
+<table style="float:left;"><tr><td>
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+This is some very long text. This is some very long text.
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-3-ref.html b/layout/reftests/bugs/50630-3-ref.html
new file mode 100644
index 0000000000..85f4cd038d
--- /dev/null
+++ b/layout/reftests/bugs/50630-3-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for float placement rules (reference)</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="width:100px; font-size:5px;">
+<!-- Check that we don't allow floats to reorder -->
+H
+<div style="background:blue; width:100px; height:100px;"></div>
+<div style="background:yellow; width:30px; height:30px; float:left;"></div>
+<div style="background:yellow; width:30px; height:30px; float:right;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-3.html b/layout/reftests/bugs/50630-3.html
new file mode 100644
index 0000000000..6228201930
--- /dev/null
+++ b/layout/reftests/bugs/50630-3.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for float placement rules</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+<meta name="assert" content="The outer top of a floating box may not be higher than the outer top of any block or floated box generated by an element earlier in the source document." />
+<meta name="assert" content="A floating box must be placed as high as possible. " />
+<meta name="flags" content="" />
+<body style="width:100px; font-size:5px;">
+<!-- Check that we don't allow floats to reorder -->
+H
+<div style="background:blue; width:100px; height:100px; float:left;"></div>
+<div style="background:yellow; width:30px; height:30px; float:left;"></div>
+<div style="background:yellow; width:30px; height:30px; float:right;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-4-ref.html b/layout/reftests/bugs/50630-4-ref.html
new file mode 100644
index 0000000000..ff602c309c
--- /dev/null
+++ b/layout/reftests/bugs/50630-4-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for float placement rules (reference)</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="width:200px; font-size:5px;">
+<div style="background:green; width:100px; height:100px; float:left;"></div>
+H<br>
+<div style="background:blue; width:100px; height:100px; float:left;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-4-ref2.html b/layout/reftests/bugs/50630-4-ref2.html
new file mode 100644
index 0000000000..7d3387eb55
--- /dev/null
+++ b/layout/reftests/bugs/50630-4-ref2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for float placement rules (reference)</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<body style="width:200px; font-size:5px;">
+<div style="position:absolute; background:green; width:100px; height:100px;"></div>
+<div style="position:relative; left:100px; width:100px; height:100px;">
+ H
+ <div style="background:blue; width:100px; height:100px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-4.html b/layout/reftests/bugs/50630-4.html
new file mode 100644
index 0000000000..f6fbb4f7ff
--- /dev/null
+++ b/layout/reftests/bugs/50630-4.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<title>CSS 2.1 Test Suite: Test for float placement rules</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+<meta name="assert" content="A floating box must be placed as high as possible. " />
+<meta name="flags" content="" />
+<body style="width:200px; font-size:5px;">
+<!-- Check that we're actually taking inline content already in the line into account
+ when we check whether the blue float fits -->
+<div style="background:green; width:100px; height:100px; float:left;"></div>
+H
+<div style="background:blue; width:100px; height:100px; float:left;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-5-ref.html b/layout/reftests/bugs/50630-5-ref.html
new file mode 100644
index 0000000000..e439b805ab
--- /dev/null
+++ b/layout/reftests/bugs/50630-5-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+html, body, ul, li {
+ margin: 0; padding: 0;
+}
+ul {
+ list-style-position: inside;
+}
+li {
+ margin: 1em;
+}
+span {
+ position: absolute;
+ top: 1em; right: 1em;
+}
+</style>
+</head>
+<body>
+<ul>
+ <li><span>Float</span>Test</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/50630-5.html b/layout/reftests/bugs/50630-5.html
new file mode 100644
index 0000000000..b05a67325f
--- /dev/null
+++ b/layout/reftests/bugs/50630-5.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+html, body, ul, li {
+ margin: 0; padding: 0;
+}
+ul {
+ list-style-position: inside;
+}
+li {
+ margin: 1em;
+}
+span {
+ float: right;
+}
+</style>
+</head>
+<body>
+<ul>
+ <li><span>Float</span>Test</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/506481-1-ref.html b/layout/reftests/bugs/506481-1-ref.html
new file mode 100644
index 0000000000..fcd2aceb57
--- /dev/null
+++ b/layout/reftests/bugs/506481-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html><body>
+<select multiple="multiple" size="10">
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option selected>option 12</option>
+</select>
+</body></html>
diff --git a/layout/reftests/bugs/506481-1.html b/layout/reftests/bugs/506481-1.html
new file mode 100644
index 0000000000..f8b10bc56f
--- /dev/null
+++ b/layout/reftests/bugs/506481-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html><body>
+<select multiple="multiple" size="10"><script>document.body.offsetHeight;</script>
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option selected>option 12</option>
+</select>
+</body></html>
diff --git a/layout/reftests/bugs/507187-1-ref.html b/layout/reftests/bugs/507187-1-ref.html
new file mode 100644
index 0000000000..2d2375d39a
--- /dev/null
+++ b/layout/reftests/bugs/507187-1-ref.html
@@ -0,0 +1,2 @@
+<style type="text/css">a { visibility: hidden }</style>
+<body><ul><li><a>Hello</a></li><li><a>Hello</a></li><li><a>Hello</a></li><li><a>Hello</a></li></ul></body></html>
diff --git a/layout/reftests/bugs/507187-1.html b/layout/reftests/bugs/507187-1.html
new file mode 100644
index 0000000000..066491a3b3
--- /dev/null
+++ b/layout/reftests/bugs/507187-1.html
@@ -0,0 +1 @@
+<body><ul><li><a></a></li><li><a></a></li><li><a></a></li><li><a></a></li></ul></body></html>
diff --git a/layout/reftests/bugs/507487-1-ref.html b/layout/reftests/bugs/507487-1-ref.html
new file mode 100644
index 0000000000..e2b451602f
--- /dev/null
+++ b/layout/reftests/bugs/507487-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<div style="display:block; width:100px; height:100px; background: blue;"></div>
+<div style="display:block; width:100px; height:100px; background: green;"></div>
+<div style="display:block; width:100px; height:100px; background: blue;"></div>
+<div style="display:block; width:100px; height:100px; background: purple;"></div>
+</html>
diff --git a/layout/reftests/bugs/507487-1.html b/layout/reftests/bugs/507487-1.html
new file mode 100644
index 0000000000..412b4843b0
--- /dev/null
+++ b/layout/reftests/bugs/507487-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=507487
+-->
+<head>
+<style>
+#content > * {
+ display:block; width:100px; height:100px; background: purple;
+}
+#content > teST {
+ display:block; width:100px; height:100px; background: green;
+}
+
+#content > test {
+ display:block; width:100px; height:100px; background: blue;
+}
+
+</style>
+<script>
+ function f() {
+ document.getElementById('content').appendChild(document.createElementNS("test", "test"));
+ document.getElementById('content').appendChild(document.createElementNS("test", "teST"));
+ document.getElementById('content').appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "test"));
+ document.getElementById('content').appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "teST"));
+ }
+</script>
+</head>
+<body onload="f();">
+<div id=content></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/507487-2-ref.xhtml b/layout/reftests/bugs/507487-2-ref.xhtml
new file mode 100644
index 0000000000..6ccb5048d7
--- /dev/null
+++ b/layout/reftests/bugs/507487-2-ref.xhtml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=507487
+-->
+<body>
+<div style="display:block; width:100px; height:100px; background: blue;"></div>
+<div style="display:block; width:100px; height:100px; background: green;"></div>
+<div style="display:block; width:100px; height:100px; background: blue;"></div>
+<div style="display:block; width:100px; height:100px; background: green;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/507487-2.xhtml b/layout/reftests/bugs/507487-2.xhtml
new file mode 100644
index 0000000000..84bf023e1b
--- /dev/null
+++ b/layout/reftests/bugs/507487-2.xhtml
@@ -0,0 +1,32 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=507487
+-->
+<head>
+ <style>
+ #content > * {
+ display:block; width:100px; height:100px; background: purple;
+ }
+ #content > teST {
+ display:block; width:100px; height:100px; background: green;
+ }
+
+ #content > test {
+ display:block; width:100px; height:100px; background: blue;
+ }
+ </style>
+ <script type="application/javascript">
+ <![CDATA[
+ function f() {
+ document.getElementById('content').appendChild(document.createElementNS("test", "test"));
+ document.getElementById('content').appendChild(document.createElementNS("test", "teST"));
+ document.getElementById('content').appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "test"));
+ document.getElementById('content').appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "teST"));
+ }
+ ]]>
+ </script>
+</head>
+<body onload="f();">
+<div id="content"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-1-ref.html b/layout/reftests/bugs/507762-1-ref.html
new file mode 100644
index 0000000000..7b42104f33
--- /dev/null
+++ b/layout/reftests/bugs/507762-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+<span style="background-color: green">text</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-1.html b/layout/reftests/bugs/507762-1.html
new file mode 100644
index 0000000000..9f811e0448
--- /dev/null
+++ b/layout/reftests/bugs/507762-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@namespace url(test);
+div {
+background-color: red;
+}
+div[mixedCase=true] {
+background-color: green !important;
+}
+</style>
+<script>
+function f() {
+var elem = document.createElementNS("test","div");
+elem.setAttribute("mixedCase",true);
+elem.appendChild(document.createTextNode("text"));
+document.getElementsByTagName("body")[0].appendChild(elem); }
+</script>
+</head>
+<body onload="f();">
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-2-ref.html b/layout/reftests/bugs/507762-2-ref.html
new file mode 100644
index 0000000000..44a399f66e
--- /dev/null
+++ b/layout/reftests/bugs/507762-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+<body>
+<div style="background-color: green">text</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-2.html b/layout/reftests/bugs/507762-2.html
new file mode 100644
index 0000000000..f840a47e66
--- /dev/null
+++ b/layout/reftests/bugs/507762-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+background-color: red;
+}
+div[mixedCase=true] {
+background-color: green !important;
+}
+</style>
+<script>
+function f() {
+var elem = document.createElement("div");
+elem.setAttribute("mixedcase",true);
+elem.appendChild(document.createTextNode("text"));
+document.getElementsByTagName("body")[0].appendChild(elem); }
+</script>
+</head>
+<body onload="f();">
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-3.html b/layout/reftests/bugs/507762-3.html
new file mode 100644
index 0000000000..ce4c7ab8e9
--- /dev/null
+++ b/layout/reftests/bugs/507762-3.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@namespace url(test);
+div {
+background-color: green;
+}
+div[dir=RTL ]
+{background-color: red !important;
+}
+</style>
+<script>
+function f() {
+var elem = document.createElementNS("test","div");
+elem.setAttribute("dir","rtl");
+elem.appendChild(document.createTextNode("text"));
+document.getElementsByTagName("body")[0].appendChild(elem); }
+</script>
+</head>
+<body onload="f();">
+</body>
+</html>
diff --git a/layout/reftests/bugs/507762-4.html b/layout/reftests/bugs/507762-4.html
new file mode 100644
index 0000000000..5c91e2bdc1
--- /dev/null
+++ b/layout/reftests/bugs/507762-4.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+background-color: red;
+}
+div[dir=ltr]
+{background-color: green !important;
+}
+</style>
+<script>
+function f() {
+var elem = document.createElement("div");
+elem.setAttribute("dir","LTR");
+elem.appendChild(document.createTextNode("text"));
+document.getElementsByTagName("body")[0].appendChild(elem); }
+</script>
+</head>
+<body onload="f();">
+</body>
+</html>
diff --git a/layout/reftests/bugs/508919-1-ref.xhtml b/layout/reftests/bugs/508919-1-ref.xhtml
new file mode 100644
index 0000000000..2cf718a41d
--- /dev/null
+++ b/layout/reftests/bugs/508919-1-ref.xhtml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml" style="border-color: black">
+ <head>
+ <style>
+ html { color: black; border-width: 10px; border-style: solid; }
+ </style>
+ </head>
+ <body>
+ <html style="border-color: green;">Test</html>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/508919-1.xhtml b/layout/reftests/bugs/508919-1.xhtml
new file mode 100644
index 0000000000..57e7cdf576
--- /dev/null
+++ b/layout/reftests/bugs/508919-1.xhtml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <style>
+ html { color: black; border-color: inherit; border-width: 10px;
+ border-style: solid; }
+ </style>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ document.getElementById("x").removeAttribute("style");
+ document.documentElement.className = "";
+ },
+ false);
+ </script>
+ </head>
+ <body style="border-color: green;">
+ <html id="x" style="display:none">Test</html>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/509155-1-ref.xhtml b/layout/reftests/bugs/509155-1-ref.xhtml
new file mode 100644
index 0000000000..1c468a7348
--- /dev/null
+++ b/layout/reftests/bugs/509155-1-ref.xhtml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml" style="outline-color: black;">
+ <head>
+ <style>
+ html { color: black; outline-width: 10px; outline-style: solid; }
+ </style>
+ </head>
+ <body>
+ <html style="outline-color: green;">Test</html>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/509155-1.xhtml b/layout/reftests/bugs/509155-1.xhtml
new file mode 100644
index 0000000000..a6d020fb75
--- /dev/null
+++ b/layout/reftests/bugs/509155-1.xhtml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <style>
+ html { color: black; outline-color: inherit; outline-width: 10px;
+ outline-style: solid; }
+ </style>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ document.getElementById("x").removeAttribute("style");
+ document.documentElement.className = "";
+ },
+ false);
+ </script>
+ </head>
+ <body style="outline-color: green;">
+ <html id="x" style="display: none">Test</html>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/512410-ref.html b/layout/reftests/bugs/512410-ref.html
new file mode 100644
index 0000000000..ccf2123b07
--- /dev/null
+++ b/layout/reftests/bugs/512410-ref.html
@@ -0,0 +1,17 @@
+<html><head>
+<title>Bug 506481 - selected item not showing in listbox box</title>
+</head><body>
+<select multiple="multiple">
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option>option 12</option><option>option 13</option><option>option 14</option><option>option 15</option><option>option 16</option><option>option 17</option><option>option 18</option><option>option 19</option><option>option 20</option><option>option 21</option><option>option 22</option><option>option 23</option><option>option 24</option><option>option 25</option><option>option 26</option><option>option 27</option><option>option 28</option><option>option 29</option><option>option 30</option><option>option 31</option><option>option 32</option><option>option 33</option><option>option 34</option><option>option 35</option><option>option 36</option><option>option 37</option><option>option 38</option><option>option 39</option><option>option 40</option><option>option 41</option><option>option 42</option><option>option 43</option><option>option 44</option><option>option 45</option><option>option 46</option><option>option 47</option><option>option 48</option><option>option 49</option><option>option 50</option>
+</select>
+<select multiple="multiple">
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option>option 12</option><option>option 13</option><option>option 14</option><option>option 15</option><option>option 16</option><option>option 17</option><option>option 18</option><option>option 19</option><option>option 20</option><option>option 21</option><option>option 22</option><option>option 23</option><option>option 24</option><option>option 25</option><option>option 26</option><option>option 27</option><option>option 28</option><option>option 29</option><option>option 30</option><option>option 31</option><option>option 32</option><option>option 33</option><option>option 34</option><option>option 35</option><option>option 36</option><option>option 37</option><option>option 38</option><option>option 39</option><option>option 40</option><option>option 41</option><option>option 42</option><option>option 43</option><option>option 44</option><option>option 45</option><option>option 46</option><option>option 47</option><option>option 48</option><option>option 49</option><option>option 50</option>
+</select>
+
+<script>
+var sel = document.getElementsByTagName('select')
+sel[0].selectedIndex=50
+sel[1].selectedIndex=50
+document.body.offsetHeight;
+</script>
+</body></html>
diff --git a/layout/reftests/bugs/512410.html b/layout/reftests/bugs/512410.html
new file mode 100644
index 0000000000..ce41c78e33
--- /dev/null
+++ b/layout/reftests/bugs/512410.html
@@ -0,0 +1,10 @@
+<html><head>
+<title>Bug 506481 - selected item not showing in listbox box</title>
+</head><body>
+<select multiple="multiple"><script>document.body.offsetHeight;</script>
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option>option 12</option><option>option 13</option><option>option 14</option><option>option 15</option><option>option 16</option><option>option 17</option><option>option 18</option><option>option 19</option><option>option 20</option><option>option 21</option><option>option 22</option><option>option 23</option><option>option 24</option><option>option 25</option><option>option 26</option><option>option 27</option><option>option 28</option><option>option 29</option><option>option 30</option><option>option 31</option><option>option 32</option><option>option 33</option><option>option 34</option><option>option 35</option><option>option 36</option><option>option 37</option><option>option 38</option><option>option 39</option><option>option 40</option><option>option 41</option><option>option 42</option><option>option 43</option><option>option 44</option><option>option 45</option><option>option 46</option><option>option 47</option><option>option 48</option><option>option 49</option><option selected>option 50</option>
+</select>
+<select multiple="multiple"><script></script>
+<option>option 0</option><option>option 1</option><option>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option><option>option 7</option><option>option 8</option><option>option 9</option><option>option 10</option><option>option 11</option><option>option 12</option><option>option 13</option><option>option 14</option><option>option 15</option><option>option 16</option><option>option 17</option><option>option 18</option><option>option 19</option><option>option 20</option><option>option 21</option><option>option 22</option><option>option 23</option><option>option 24</option><option>option 25</option><option>option 26</option><option>option 27</option><option>option 28</option><option>option 29</option><option>option 30</option><option>option 31</option><option>option 32</option><option>option 33</option><option>option 34</option><option>option 35</option><option>option 36</option><option>option 37</option><option>option 38</option><option>option 39</option><option>option 40</option><option>option 41</option><option>option 42</option><option>option 43</option><option>option 44</option><option>option 45</option><option>option 46</option><option>option 47</option><option>option 48</option><option>option 49</option><option selected>option 50</option>
+</select>
+</body></html>
diff --git a/layout/reftests/bugs/512631-1-ref.html b/layout/reftests/bugs/512631-1-ref.html
new file mode 100644
index 0000000000..17cf98e15e
--- /dev/null
+++ b/layout/reftests/bugs/512631-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<style type="text/css">
+html {
+ color: rgb(10,10,10);
+ background: rgb(150,150,150);
+
+ font-family:sans-serif;
+ }
+ul, li { display: block; }
+a {display:block; float:left; width:100px; height:50px; text-align:center; background: #ccc;}
+
+</style>
+
+<title>test</title>
+</head>
+<body>
+<ul>
+<li><a href="/">abc</a></li>
+<li><a href="/">abc</a></li>
+<li><a href="/">abc</a></li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/512631-1.html b/layout/reftests/bugs/512631-1.html
new file mode 100644
index 0000000000..d35b019d08
--- /dev/null
+++ b/layout/reftests/bugs/512631-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<style type="text/css">
+html {
+ color: rgb(10,10,10);
+ background: rgb(150,150,150);
+
+ font-family:sans-serif;
+ }
+ul {list-style:none;}
+a {display:block; float:left; width:100px; height:50px; text-align:center; background: #ccc;}
+
+</style>
+
+<title>test</title>
+</head>
+<body>
+<ul>
+<li><a href="/">abc</a></li>
+<li><a href="/">abc</a></li>
+<li><a href="/">abc</a></li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-1-ref.html b/layout/reftests/bugs/513153-1-ref.html
new file mode 100644
index 0000000000..506af83534
--- /dev/null
+++ b/layout/reftests/bugs/513153-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <form>
+ <input type="submit" name="foo" value="foo" style="font-size: 3em; color: green;">
+ <input type="image" name="bar" value="bar" style="color: purple;">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-1a.html b/layout/reftests/bugs/513153-1a.html
new file mode 100644
index 0000000000..d8ccea9770
--- /dev/null
+++ b/layout/reftests/bugs/513153-1a.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ input { color: purple; }
+ :default { font-size: 3em; color: green; }
+ </style>
+ <script type="text/javascript">
+ function boom()
+ {
+ var toRemove = document.getElementById("toremove");
+ toRemove.remove();
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", boom);
+ </script>
+</head>
+<body>
+ <form>
+ <span id="toremove">
+ <input type="submit">
+ <input type="submit">
+ </span>
+ <input type="submit" name="foo" value="foo">
+ <input type="image" name="bar" value="bar">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-1b.html b/layout/reftests/bugs/513153-1b.html
new file mode 100644
index 0000000000..48149852d4
--- /dev/null
+++ b/layout/reftests/bugs/513153-1b.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ input { color: purple; }
+ :default { font-size: 3em; color: green; }
+ </style>
+ <script type="text/javascript">
+ function boom()
+ {
+ var toRemove = document.getElementById("toremove");
+ toRemove.remove();
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", boom);
+ </script>
+</head>
+<body>
+ <form>
+ <span id="toremove">
+ <input type="image">
+ <input type="image">
+ </span>
+ <input type="submit" name="foo" value="foo">
+ <input type="image" name="bar" value="bar">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-2-ref.html b/layout/reftests/bugs/513153-2-ref.html
new file mode 100644
index 0000000000..198d022c6e
--- /dev/null
+++ b/layout/reftests/bugs/513153-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <form>
+ <input type="image" name="bar" value="bar" style="font-size: 3em; color: green;">
+ <input type="submit" name="foo" value="foo" style="color: purple">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-2a.html b/layout/reftests/bugs/513153-2a.html
new file mode 100644
index 0000000000..dbab3e9e1e
--- /dev/null
+++ b/layout/reftests/bugs/513153-2a.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ input { color: purple; }
+ :default { font-size: 3em; color: green; }
+ </style>
+ <script type="text/javascript">
+ function boom()
+ {
+ var toRemove = document.getElementById("toremove");
+ toRemove.remove();
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", boom);
+ </script>
+</head>
+<body>
+ <form>
+ <span id="toremove">
+ <input type="submit">
+ <input type="submit">
+ </span>
+ <input type="image" name="bar" value="bar">
+ <input type="submit" name="foo" value="foo">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513153-2b.html b/layout/reftests/bugs/513153-2b.html
new file mode 100644
index 0000000000..1257a4f591
--- /dev/null
+++ b/layout/reftests/bugs/513153-2b.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <style>
+ input { color: purple; }
+ :default { font-size: 3em; color: green; }
+ </style>
+ <script type="text/javascript">
+ function boom()
+ {
+ var toRemove = document.getElementById("toremove");
+ toRemove.remove();
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", boom);
+ </script>
+</head>
+<body>
+ <form>
+ <span id="toremove">
+ <input type="image">
+ <input type="image">
+ </span>
+ <input type="image" name="bar" value="bar">
+ <input type="submit" name="foo" value="foo">
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/513318-1-ref.xhtml b/layout/reftests/bugs/513318-1-ref.xhtml
new file mode 100644
index 0000000000..40b12a6074
--- /dev/null
+++ b/layout/reftests/bugs/513318-1-ref.xhtml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<window title="XUL Layout"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+</window>
diff --git a/layout/reftests/bugs/513318-1.xhtml b/layout/reftests/bugs/513318-1.xhtml
new file mode 100644
index 0000000000..a1b758629c
--- /dev/null
+++ b/layout/reftests/bugs/513318-1.xhtml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<window title="XUL Layout"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <vbox style="overflow:auto; height:100px">
+ <hbox style="visibility:collapse">
+ <label>
+ <label value="0"/>
+ <label value="1"/>
+ <label value="2"/>
+ <label value="3"/>
+ <label value="4"/>
+ <label value="5"/>
+ <label value="6"/>
+ <label value="7"/>
+ <label value="8"/>
+ <label value="9"/>
+ <label value="0"/>
+ <label value="1"/>
+ <label value="2"/>
+ <label value="3"/>
+ <label value="4"/>
+ <label value="5"/>
+ <label value="6"/>
+ <label value="7"/>
+ <label value="8"/>
+ <label value="9"/>
+ <label value="0"/>
+ <label value="1"/>
+ <label value="2"/>
+ <label value="3"/>
+ <label value="4"/>
+ <label value="5"/>
+ <label value="6"/>
+ <label value="7"/>
+ <label value="8"/>
+ <label value="9"/>
+ <label value="0"/>
+ <label value="1"/>
+ <label value="2"/>
+ <label value="3"/>
+ <label value="4"/>
+ <label value="5"/>
+ <label value="6"/>
+ <label value="7"/>
+ <label value="8"/>
+ <label value="9"/>
+ </label>
+ </hbox>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/513318-2-ref.xhtml b/layout/reftests/bugs/513318-2-ref.xhtml
new file mode 100644
index 0000000000..647545792d
--- /dev/null
+++ b/layout/reftests/bugs/513318-2-ref.xhtml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<window title="XUL Layout"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox style="overflow:auto; height:200px">
+ <html:span style="color:blue;">Hello Kitty</html:span>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/513318-2.xhtml b/layout/reftests/bugs/513318-2.xhtml
new file mode 100644
index 0000000000..db5fb89fca
--- /dev/null
+++ b/layout/reftests/bugs/513318-2.xhtml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<window title="XUL Layout"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <vbox style="overflow:auto; height:200px">
+ <html:span style="color:blue; position:relative">Hello Kitty<html:span style="position: absolute; top: 300px; left: 0">should not appear</html:span></html:span>
+ </vbox>
+</window>
diff --git a/layout/reftests/bugs/514917-1-ref.html b/layout/reftests/bugs/514917-1-ref.html
new file mode 100644
index 0000000000..63c93580d5
--- /dev/null
+++ b/layout/reftests/bugs/514917-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 514917</title>
+<style type="text/css">
+
+body > div > div {
+ width: 100px;
+ height: 100px;
+ box-shadow: blue 50px 50px;
+}
+
+body > div > div > div {
+ width: 160px;
+ height: 160px;
+ border: medium solid;
+}
+
+</style>
+<body>
+<div><div><div></div></div></div>
+</body>
diff --git a/layout/reftests/bugs/514917-1.html b/layout/reftests/bugs/514917-1.html
new file mode 100644
index 0000000000..5f7ec084a1
--- /dev/null
+++ b/layout/reftests/bugs/514917-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 514917</title>
+<style type="text/css">
+
+body > div {
+ overflow: auto; /* to detect too much overflow, which is the bug here */
+ width: 200px;
+ height: 200px;
+}
+
+body > div > div {
+ width: 100px;
+ height: 100px;
+ box-shadow: blue 50px 50px;
+}
+
+body > div > div > div {
+ width: 160px;
+ height: 160px;
+ border: medium solid;
+}
+
+</style>
+<body>
+<div><div><div></div></div></div>
+</body>
diff --git a/layout/reftests/bugs/518172-1a.html b/layout/reftests/bugs/518172-1a.html
new file mode 100644
index 0000000000..9054fdbc8d
--- /dev/null
+++ b/layout/reftests/bugs/518172-1a.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+@font-face {
+ font-family: "MarkA";
+ src: url(../fonts/markA.ttf);
+}
+
+html, body { margin: 0; padding: 0; }
+body { font: 200px/200px MarkA; }
+div#one { width: 200px; height:200px; padding: 100px;
+ transform: rotate(90deg); }
+
+div.box { background: green; position: absolute; }
+
+</style>
+<div id="one">A</div>
+
+<!-- draw green boxes slightly larger (2px extra) than the area that should
+ be covered by the font -->
+<div class="box" style="top: 118px; left: 118px; width: 44px; height: 264px;"></div>
+<div class="box" style="top: 158px; left: 178px; width: 44px; height: 184px;"></div>
+<div class="box" style="top: 198px; left: 238px; width: 44px; height: 104px;"></div>
diff --git a/layout/reftests/bugs/518172-1b.html b/layout/reftests/bugs/518172-1b.html
new file mode 100644
index 0000000000..8a439b2e75
--- /dev/null
+++ b/layout/reftests/bugs/518172-1b.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+@font-face {
+ font-family: "MarkA";
+ src: url(../fonts/markA.ttf);
+}
+
+html, body { margin: 0; padding: 0; }
+body { font: 200px/200px MarkA; }
+div#one { width: 200px; height:200px; padding: 100px;
+ transform: rotate(90deg); }
+
+div.box { background: red; position: absolute; }
+
+</style>
+<!-- draw red boxes slightly larger (2px extra) than the area that should
+ be covered by the font -->
+<div class="box" style="top: 122px; left: 122px; width: 36px; height: 256px;"></div>
+<div class="box" style="top: 162px; left: 182px; width: 36px; height: 176px;"></div>
+<div class="box" style="top: 202px; left: 242px; width: 36px; height: 96px;"></div>
+
+<div id="one">A</div>
diff --git a/layout/reftests/bugs/518172-2a.html b/layout/reftests/bugs/518172-2a.html
new file mode 100644
index 0000000000..c168e766e7
--- /dev/null
+++ b/layout/reftests/bugs/518172-2a.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+@font-face {
+ font-family: "MarkA";
+ src: url(../fonts/markA.ttf);
+}
+
+html, body { margin: 0; padding: 0; }
+body { font: 200px/200px MarkA; }
+div#one { width: 200px; height:200px; padding: 100px;
+ transform: rotate(90deg); }
+div#two { color: transparent; }
+
+div.box { background: green; position: absolute; }
+
+</style>
+<div id="one">A</div><div id="two">A</div>
+
+<!-- draw green boxes slightly larger (2px extra) than the area that should
+ be covered by the font -->
+<div class="box" style="top: 118px; left: 118px; width: 44px; height: 264px;"></div>
+<div class="box" style="top: 158px; left: 178px; width: 44px; height: 184px;"></div>
+<div class="box" style="top: 198px; left: 238px; width: 44px; height: 104px;"></div>
diff --git a/layout/reftests/bugs/518172-2b.html b/layout/reftests/bugs/518172-2b.html
new file mode 100644
index 0000000000..5e85781963
--- /dev/null
+++ b/layout/reftests/bugs/518172-2b.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+@font-face {
+ font-family: "MarkA";
+ src: url(../fonts/markA.ttf);
+}
+
+html, body { margin: 0; padding: 0; }
+body { font: 200px/200px MarkA; }
+div#one { width: 200px; height:200px; padding: 100px;
+ transform: rotate(90deg); }
+div#two { color: transparent; }
+
+div.box { background: red; position: absolute; }
+
+</style>
+<!-- draw red boxes slightly larger (2px extra) than the area that should
+ be covered by the font -->
+<div class="box" style="top: 122px; left: 122px; width: 36px; height: 256px;"></div>
+<div class="box" style="top: 162px; left: 182px; width: 36px; height: 176px;"></div>
+<div class="box" style="top: 202px; left: 242px; width: 36px; height: 96px;"></div>
+
+<div id="one">A</div><div id="two">A</div>
diff --git a/layout/reftests/bugs/518172-a-ref.html b/layout/reftests/bugs/518172-a-ref.html
new file mode 100644
index 0000000000..ed8a767fc7
--- /dev/null
+++ b/layout/reftests/bugs/518172-a-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+html, body { margin: 0; padding: 0; }
+div.box { background: green; position: absolute; }
+
+</style>
+
+<!-- draw green boxes slightly larger (2px extra) than the area that should
+ be covered by the font -->
+<div class="box" style="top: 118px; left: 118px; width: 44px; height: 264px;"></div>
+<div class="box" style="top: 158px; left: 178px; width: 44px; height: 184px;"></div>
+<div class="box" style="top: 198px; left: 238px; width: 44px; height: 104px;"></div>
diff --git a/layout/reftests/bugs/518172-b-ref.html b/layout/reftests/bugs/518172-b-ref.html
new file mode 100644
index 0000000000..b1ef557e98
--- /dev/null
+++ b/layout/reftests/bugs/518172-b-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<title>Testcase, bug 518172</title>
+<style type="text/css">
+
+@font-face {
+ font-family: "MarkA";
+ src: url(../fonts/markA.ttf);
+}
+
+html, body { margin: 0; padding: 0; }
+body { font: 200px/200px MarkA; }
+div#one { width: 200px; height:200px; padding: 100px;
+ transform: rotate(90deg); }
+
+</style>
+<div id="one">A</div>
+
diff --git a/layout/reftests/bugs/520421-1-ref.html b/layout/reftests/bugs/520421-1-ref.html
new file mode 100644
index 0000000000..62917b5810
--- /dev/null
+++ b/layout/reftests/bugs/520421-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="background-color: green">text</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/520421-1.html b/layout/reftests/bugs/520421-1.html
new file mode 100644
index 0000000000..399a89e50e
--- /dev/null
+++ b/layout/reftests/bugs/520421-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ background-color: red;
+ }
+ div[mixedCase=true] {
+ background-color: green !important;
+ }
+ </style>
+ <script>
+ function f() {
+ document.getElementById("t").setAttribute("mixedCase", "true");
+ document.documentElement.className = "";
+ }
+ window.addEventListener("MozReftestInvalidate", f);
+ </script>
+ </head>
+ <body>
+ <div id="t">text</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/520563-1-ref.xhtml b/layout/reftests/bugs/520563-1-ref.xhtml
new file mode 100644
index 0000000000..c62488e428
--- /dev/null
+++ b/layout/reftests/bugs/520563-1-ref.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body style="color:green">
+ <div>Test</div>
+ <div>Test</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/520563-1.xhtml b/layout/reftests/bugs/520563-1.xhtml
new file mode 100644
index 0000000000..fc3fc2b675
--- /dev/null
+++ b/layout/reftests/bugs/520563-1.xhtml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ @namespace foo "test";
+ div { color: green; }
+ div[xml|lang="foo"] { color: red; }
+ div[xmlns|lang="foo"] { color: red; }
+ </style>
+ </head>
+ <body>
+ <div xml:lang="foo">Test</div>
+ <div xmlns:lang="foo">Test</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/521525-1-ref.html b/layout/reftests/bugs/521525-1-ref.html
new file mode 100644
index 0000000000..6cdf049e9a
--- /dev/null
+++ b/layout/reftests/bugs/521525-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<form><fieldset></fieldset></form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/521525-1.html b/layout/reftests/bugs/521525-1.html
new file mode 100644
index 0000000000..82af745995
--- /dev/null
+++ b/layout/reftests/bugs/521525-1.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body onload="document.getElementById('f').style.removeProperty('height');">
+<form><fieldset id="f" style="height: 200px;"></fieldset></form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/521525-2-ref.html b/layout/reftests/bugs/521525-2-ref.html
new file mode 100644
index 0000000000..a7f8ef488f
--- /dev/null
+++ b/layout/reftests/bugs/521525-2-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<div><div style="height: 100%; background: green"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/521525-2.html b/layout/reftests/bugs/521525-2.html
new file mode 100644
index 0000000000..6ffdd97efe
--- /dev/null
+++ b/layout/reftests/bugs/521525-2.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body onload="document.getElementById('f').style.removeProperty('height');">
+<div id="f" style="height: 200px;"><div style="height: 100%; background: green"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/521539-1-ref.html b/layout/reftests/bugs/521539-1-ref.html
new file mode 100644
index 0000000000..96c5cf5bd7
--- /dev/null
+++ b/layout/reftests/bugs/521539-1-ref.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<input type="file">
+</body>
+</html>
diff --git a/layout/reftests/bugs/521539-1.html b/layout/reftests/bugs/521539-1.html
new file mode 100644
index 0000000000..4ab25cda9d
--- /dev/null
+++ b/layout/reftests/bugs/521539-1.html
@@ -0,0 +1,5 @@
+<html>
+<body onload="document.getElementById('f').style.height = '';">
+<input id="f" type="file" style="height: 0;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/521542-1-ref.xhtml b/layout/reftests/bugs/521542-1-ref.xhtml
new file mode 100644
index 0000000000..43c82db018
--- /dev/null
+++ b/layout/reftests/bugs/521542-1-ref.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head></head>
+
+<body>
+
+<table id="table">
+ BeginningOfTable
+ <tbody>
+ <tr>
+ <td>Cell</td>
+ </tr>
+ </tbody>
+ <span></span>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/521542-1.xhtml b/layout/reftests/bugs/521542-1.xhtml
new file mode 100644
index 0000000000..79b0b4cd49
--- /dev/null
+++ b/layout/reftests/bugs/521542-1.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head></head>
+
+<body onload="document.getElementById('table').firstChild.data = ' BeginningOfTable ';">
+
+<table id="table">
+
+ <tbody>
+ <tr>
+ <td>Cell</td>
+ </tr>
+ </tbody>
+ <span></span>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/521602-ref.html b/layout/reftests/bugs/521602-ref.html
new file mode 100644
index 0000000000..0e0c9a39e0
--- /dev/null
+++ b/layout/reftests/bugs/521602-ref.html
@@ -0,0 +1,4 @@
+<body>
+<div style="outline: 1px solid black">
+<img>
+</div>
diff --git a/layout/reftests/bugs/521602.html b/layout/reftests/bugs/521602.html
new file mode 100644
index 0000000000..4ef57ea9c8
--- /dev/null
+++ b/layout/reftests/bugs/521602.html
@@ -0,0 +1,5 @@
+<body onload="document.getElementById('i').removeAttribute('src');">
+<div style="outline: 1px solid black">
+<!-- FIXME: alt=" " is a workaround for bug 1505657 -->
+<img id="i" alt=" " src="data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%C8%00%00%00%C8%04%03%00%00%00_v%B3%AD%00%00%000PLTE%9D%0B%08%1F%20%1E231%3F%40%3EOQNefdnpm%7F%81~%97%99%96%9F%A1%9E%AE%B0%AD%CC%CE%CB%DE%E0%DD%FE%FF%FC%00%01%00%0F%11%0Di%C4%2B%A9%00%00%00%01tRNS%00%40%E6%D8%0f%00%00%00%01bKGD%00%88%05%1DH%00%00%00%10acTl%00%00%00%0B%00%00%00%00_v%B3%ADi%C4%2B%A9%0D%7Biv%00%00%09RIDATx%9C%ED%9C%7Dl%1Bg%1D%C7%7F%8E%ED8%CE%F9r%99x%1B*k3%95n%7Ft%0D%A1%A1%A4UI%14Q%10%8C%0D%16%A6%F1%07bJ%B32%40%1A%D2%9A%B5%EB%3A%A8%D6%1A1i%7FtL%E9%10%FFP%91%1A%A11%ED%0F2%B7i%95i%DE%1C%0B%26U%02%AD%98l%EAx%99%8A%9Bvi%DAd%97g%0C%8DVE9%9E%B7%7B%B3%EF.%CFs%F6y%DA%C8%CF9%FB%9E%97%BB%CF%3Do%DF%E7wO%7C%06%A8%B6%0E%C7%FEO%BF%C0%3E%2B5%B9%EA4'%A4%D8%D3%18%88%5Em%B3%8E%C4%EE%9CO%269%0B%BC%80%D6%A5%7C%9DE%10%B0%89%BD%D1CR%FF%8AG%0Fi%D1%9BP%12(%9Ch%02%04%3A%1A%04%09%3CM%B1!%90'%E0p%D0y%8A%8D%60(w%C0%9B%D7%03%D2%CF%EC%2F%D5%0FI%E2b%7C%2B%20%3D%B1%3CR%3F%24%8E%B7%23%F5%9FfeHC%EA%3D%C8%12%B8%BA~%135%24%DD%03%E5%AFF%0DQ7%C0rO%E8%A3%DBG%C5%F2%BD%0Ec%A1%19%B0%7B%BBX%BEc0%18%9A%A1%5C%FF%7DI%24_r%00%A4j%EB~%A7%3C%A4%86~%FB5%91%83~%B2S%0A2%F3%C0%0F%1D%A1D%EE%D5%1D%02%07)%0B%EB%E1%AA%04%E4qx%C5%11Jf%D5%B7%04%0E%8A%0D-%C0%F4%9D%E2%90%EDp%0EZ%07%CDP%BA%A7mA%E0%A0%F1%3Fu%822%F0ia%C8%1Dp(%F3%99%9C%19%CA%CC%1D%12%E9%C3%3B%D2r%83%E4%E7Ss%CFo%B4B%F1%E1%1F%8B%1Ct)5%24%C3P%EF%D37%5C%B3%83%FB%9E%12%99%D2%94%2B)%C11%CB%2Cq%B1w%5B%D9%0E%F6%AC%13%19%C8%CA%A2%24d%D1%19j%BFsN%A4%1E%14%24%07%99%D0%9D%C3%24%F9%E8%8D%5D%02%07%A9y%0C)%BC%2C%CAP%8D%D3%CB%B7%DB%CD%10%7Bv%7BE%E8%B8%D4w%40_%1A%14%84%A4%16%E0%AFw%CD%DEk%06%3B%A6%FAE%86%09%40%9B%0E%1BAPK!F%DAy*k%06%8BS%5D%97%C4%0E%9C%04%ED%85M%82%90Iw%B08U%E9%15%3C%12%E2%FF.%AF%9C%89%DA%14%C0%1F%0F8%20%85%C5%DD%A2%90%E7%07Es%9E%84_%9F%DF%60%07%CF%E4%173%A2%87%BE%2B%DC%8B%13%BB%B6%E6%1DU%D6%D2%BF%BE%E4%97%F5%25%D5%99t%02%DE%10%86%A8%FB%B6%FCj%AF3b%E6%B2O%CEV%FD%9B%D9%87%0Ffy%E8%95K%10%CF%89B%C4%ED%E0%93kwe%E3%5C%0F%D2%E7%F3pN%B4%DD%25l%1E%BAg!1%C2%02%1D%FD%00%BFh%3C%03%DEV%DE%99-'x%3B%A4%AE%00%049%F5am%B1u%EF%DA%B1%E9%2C%0F%3D%9E%86%91%08%20%0B%DAk%5B%F4Y%AB%1D%C6%23%40%00%7C%F9%A1%13%07%E6%BB%CCP%E6%3F%91%40%5E%D7%F5%BE%CB%D6%B8Mv%06%DF3%86%B4%17t%5D_%3A%96%E5!%AD%0F%A4fyA%D37%8D%8F%8E%FFm%9E7J%FB%8E%DA%B5%99J%FD%90K%AFI%2C%E0%84%86t%E0%B9%1D%94R%24'7%EDZ%C7%CAy%EA%B7%F7%05%12E%C3C%BC%09%0D%BFj%AB%B6j%0D4%03Id%C6y5y%84%06%12%0C%24%93%B9%E9%10%8DT%17%02%03%0C%03%13I%5D%E0%18%12%89%0C%92%8Ew4%BE%917D3%19%B2%10zq%F8%94%1A%D28%84%9D%1C%0C%8D7%80%C1_%F4ZH6%E9%E2%D8%10%00%C4%20%C8%8C%E7%10D%03l%8Ff%0C%09%D1%B4*%08%AE%3B%D6%00%B8%9A%0C%C3%A0%9B%05%09Y%5D%1A%3D%BD%0D%D1%CC%92%D8E%05%1B%02%B2e%E1%10%DC%9E%B4U%C85%1A%24%D6%B0!%3C%CE%0D%91%C2%F0%1AF%B4%86p%BB%02%EF%5Df%9B%D0%9Ee%D0%8D%D4%1D%85%90%FD0%7DY%F6%98%10%C3%1E%B4p%83L%C0J%F6%AElw%11%B7f%FC%1B%EB%FD5%EFF%8D%AC%D5%82%20!%D4%25Z%88F%86%BA%C1%86%B2%C6D_%A3C%90%C9%B2)%F9d%18%D2%D1jP9%23%8A%AF%89O%A9%9A%25!H%B3%F4%98%08%3BW%19%A6%F1Ts%90%C6%B5%07%D84%20U%12%AE%E5%F4hS%CB5%06A%A6%B6%819%178%B4KfJ5%5C%10*%FAD%D8%11BL%E5%5D%10%83H%3F%92%87%A0*%88y%F1%A4%FAL%95w%96%C2%9A%D0%24%20%06%B2%9B%00%98%E8%5B%CD%C0%E7%5C%ABMX%B3%85%80h%5C%CF%11%BFLD%3D%056%BF%D0%1D%C4.%C5%EC%5Df_%94r%D8%C2%88%B6%B4E'%C0%B6E7%93%ACZc%8Du%5B%AA%87d%DC%D0%DE%1B%19%04%8F%15%EE%86%D7%D7%3FL%99%A7%E2M%AFY%A3%0A%C5%05%07%19a%9C%DF*%E3%9Aj%EB%06%D1s%AEW4%1E5%10%E2%D6r%13B%D5%98%EExs%F4%0Bb%14%03%F9%40%0C%26%C7%B8%26%03%D4Pt%BDK%F3%830q%C4%82%D8%18%88%E6~%01%9FGp%83%B0%3B%3D%FF%DE%25%061e%DE%D9%BB%D8%9D%22%A2%FD%8BBxl%1D%25%E1%C5%09%25%FA%A2%0D_%17D%CE%9A%02%F9%F0Xuu!%9F%FDp%0A%A3yA%D0%07%15%C2%E4%9Dm%40%BD-%B2P%C3g*%EEq%D9%DE%BF%E1%9C%14%C4%98%1Au%0F%C1!%F4%60.%D4P%7F%D1%99%60y%9An%87R%0C%E2%12G%C7B%0D_%C1%B1%12%98%B3_%E5%E0%87%80%B0%5B%1E%06%A1%F3%A3%E5%CB%23%B6%8Ac%03%88%C7%1A%16%82%1C%25%01%2B%91O%C6U%A5%90%818d%9EM%81%F6%8D%17XUop%1F%DF%D9%1E%C2%10%C3p%F6.v%1C%5D%A8%01%E6N%B0%DE%85%98%F7o%B8z%97puy%94%ACA%99%02L%C8%8B%AB%13%22%D6%F3%FF%7F'%05%E9%95%D1P%90%95%D3%EB%BF%17k%0A%C4%1C%8B%88%DF%C2k%C4%8F%A7%1B%5B%BC1%EF%B1%EB2%8D%2B%3DX%8B%CE%86%F5%0Av%1E%E5%20%96%04%3A%97s%EC%AD%B1%10%B3%BA%22%858%A7%26'%A4~%B3%17%CA%18%C4p%BD%04%20g%F5%AF%0B%40%2C%97%9D%2F%D6%BBz%17h%2B%F5%AE%BDpJ%A40Uf%FF'C%C8%AEC%98%C7J%24!%15h%ED%8C%1Cr%13%B4W%E4!%92%F6%BDr%BC'r%C8%99O%0C%0FE%0Ei%BF%B0%24%F2%DD%EB%FALYX%FC%C6H%E4%90%8BC%13b_%5D%0Dk*%FE%5B%CA%17%A3%AD%AF%C4%85%3C%5C%80%89%EEH%FF%A9%14%FF%E5%BB%E5%05%18%9E%0C1%1C%C5-14%BD%06%D4ee%3EJH%1A)7%40%EB%5B%B03J%88%BA%003%A3%E3%A3P%1C%8B%12%F2N%EF%E6%F7.%03%B4t%F1%88(%BEzu%9F%CCC%93am%DDp%B9%3DGv%A2%AC%AEO6%E3%EBpG%9A%019S%FD%80Y%14%0D%1F%FBn%13%1A%3E%CC%F4.m%99%2BM%80%C0%96f%40%8A%A5%26%40%E2%D1%3B%11%003%A2%0Fi%D4c%0F5%81%01%DB%9A%01%F9%F0%7Fcd%D5%3E%80%F6%CC%A9%B1%18%D0_%7B%88n%DESo%82%DBN%12H%E1eYH%06r%829%D3%230%F5m%FCyq%FD%E6%A7%24!%007%0B%8E%CEd%0E%E2X%F6T%3C%1F%3D(%0D%99%F8%AFX%3E%7C%5B%FEg%7C%3D%A9%0A%C09I%D5%98%06%5DP%95%139%20%B5%15%C7%90%8EQ9%C8fxR0gzP!%EEA%82%40%B2r%90%BE%C0TW%B5%7Cq%80%04%DB%B0%E7%D9%91%93%83%7C%3F(Quy6%CA%F1%DE%DE%CF%1F(%DC%06p%7C%AE%2C%059%1E%94X%F5Tp%9C%BE%17%BF%B2%E7%ED%3F%C8%3C%5BM%0E%1C%018%FD%A8%F7%95%25%DD%0D%DCB%DF%D5%FD%3F%C2%D7%B6%D1%2B%BF%9F%A9%F0%B1%F2%D9%8F%3F%5C%EB%F1%3D%87%B7%98%BB%AB%C6%1D%FB%87e%20%00g%AF%DER%F6x%B6%ED%9F%25x%E3%A0%BB%80%F1%9AL%C2%A6%90%DF%A3%F8TMtr%0C%EE%D9%D5%D5(%C8%F4Q%F2%94q-%BBS%E9T%DD%0FE%86%5E%DC%CC%C0%1A%FCn%3F%F3n%DB%B6%B6Q%F8%9C%2B%26%B4%C2%B7%02i%F3X%B66e%FA%F4(%B8%1E%F6%0C_%5D1z%EF%E8%E5%1F%A7o%1D%82%FB%DD%90%B0%DE%D44%7D%FF%92W%D2%D3%F3%2F%5EsE%C4%7F%F7%C4c%A1%20%CF%90%B7%CC%7C%C1%23IY%BB4%E2%8AH%AD%EB%DB%E7u%8E%A9%FD%3F%0B%86%3CBO%A7%EB%9E5%D1%EF%0Ef%0Aw%7B%3E%F5%DAW%B8'%B0%22'u%D8%EA%2Fv%0FTG%A4%0Fz%9D%AD%07%5E%AA%04A%D6%FF%03%F6%F8OZ%8FTG%24%1E%2Cyd%EB%F7%1Ag%0E%23%BF%0F%B0%D57%F5%E9%EA%88%9D%7B%BC%B2%1D%3F%BC3%87%3FR~7%8Ad)%F2%07%BE%90bUM%26%E7o%F7%CA%96%B9%FB%3C%F98r%D2%A7e%F4%1C%A8%FE%0F%FE%9E%CB%B9%C3%C3%A3%DE%F7%E73K%25%DC%7B%E6%8E%FA%2Ci%DF2%00%9F%F5%BF%87%8C%8D%B4%3B%2F%EE%E4u%C5%F34jw%1F%1E%D1%A9%8Ft%FB%2C%D1%1E*%C3%A4%7F%EFJl%DA%B0%DBNM%CD%96%DA%3C%2Fh%E6%BD%03%B8%84'%F2%99%81%C7%DE%F4J%FF%CB%10(%83%BE%90%D4%F9%7CK%D6%0AM%AC%81%96%8F%96js%FD%DD8z%F5%C6%C2%A99%DC%86K%9E%3F%13%82%FB%5E%CD%02%8E%FD%B5)%E52hlYl%A0%26%97%94%E1%CEQuu%B6%A2%AB%CBc%C7XuU%7CK%CB%EC%D9%15%D2k%CC9ml%E7%8FQ%AF%04Y%C1%FE%07o%F8A%AA-%A1%E6%92%00%00%00%19fcTl%00%00%00%00%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%94'%03%1A%00%00%00%07tIME%07%D7%03%10%13'06*4%98%00%00%09%FAfdAt%00%00%00%01x%9C%ED%9C%7Fl%13%E7%19%C7%1F%9C%B3%7D%B1%CF%17%CARu%A0%8C%98%B6%ACe%A2%FC%A82Z%AD%40L%E3B%60%2Cf%1B%9DhG%87)%EA4%8D%AC%09P%B6I%9D%C6%A5%FCJiJ%A2%89J%FC%01%E5%A0%D34ihN%A7%89U%FBc9%13%83%C2f%E2%AC%B4%1A%D3%D8r%10RX%D7.8%09%E4%97%C3%ED%CE%B1%E3_w%E7%E7%3D%E7%22M%CAW%89%7D%EF%FB%3E%EF%FBy%7D%AF%EF%7D%DF%7B%EE%7D%0D%90%AD%92%B4%E3c%DF%98x%BF%93cU%A0%D2!%11%CF%D4%40%A4l%0D%A4%25V%B6j%18%91I%B7%02%F6%A8P%E0G%40%A8%ED%80%F9%10%FA%0B%94%F9%90%22i%1A%3E%09%84%DB%A7%01%02%25S%04%D1-%262%25%90%E3pB%AF%9C%C8T0%98%AD%F0y%99NzwcW%E1%10%9B%00%F0%7D%9Dtky%7D%E1%10J%FE%3FSx1%F9!Sr%DE%F5d%15%00~o6%C4%E1%01%F1%05%B3!%EC%0A(%F7%18%CE%ED%E4pv%BD%C0%1Bf%C0%AE%8D8%BB%D3%B0%C90%83)%BB%82%BA%8Al%3E%F0%90%94%BBWH%0B%D0%FE%3F%7C%17%93%E9%17%DB%89%20%3D%AF%FF%2C-dm%FD%D7fD%26%26V%01s%09%20%EF%C0%C7i!%5B%0B%7B%0F%91%C9%E2%8FA%F0%25%3Cd%23%F4%81%7D%B2%11%1D%9E%E2%18%22S%E0%9A%1B%18%DFW%D1%90%AD%D0%E0Z%DE%9A%0C%B9%86%1A8D%A6%CD%F2%C5H%A2_v%0C%BD%BFr2D%D5%BD%85%C94L%FBI%18%ECni%C5%BCT%F0%D0)%01%91%89%19%A39%12%88%F5%AEw%83%98%0Az%16%F0%18%C88!d%3C%3D%E4%7Ci%C8%8F%81%CC%26%83%B4I%E9%97%89%ED%CDE%CB%10%99XA%86%84%3B%B1%0C%F6%81%AB%E5%2F%0A%93A%CB%07%1Bq%F3p%BA%16%A4(%B6%F7%A2c%F0%EFo%0E%FC(%19%2C%E9%A8%C1%5C%26%00%C5%12%AC%04d_%0A%16%5E~%E9hI%06%23%1D%CB%86q%19C0%EB%D2j%24%24%94%19%8Ct%DC%F1%22s%02%F5%A0%88%B4%EC%00%F8GS%1A%24%3C%BE%0B%0By%1F%3D%A0%5C%80%DF%F5%AFH%05%BB%85q%176k)%87%B5%B4%EEY%2F%A4%9D%B2%A2%9A%0A%CD1%EB2%9B%9E%D4%0E%B7%D1%10%F6%D0%DA%DF%1EH%8F%E8%19%D5%B0%B4K%2F%B7%1ClN~E%3E%1E%06%AAU%C3RE%CC%B6%91%8Cp%1D%AFn%D7%7Cr%E9%9E%16%CA%3F%11p%F4%0B%D0'%E2!%CA%A5%92%AEnN%D5%8A%1D%81%CA%01%B0%26f%B8%255%00%BF%22%60%00%9Dy%8D%2FW%3F%0B%CC%7Df%CE%80hM%D4%80%1E%03%D0%9B%D4%E7%C86%3B%3D%E4%A8%10%D4!%E3%F6%03K%F9%60%B2M%DEq%00%D1%B4%3D%E8I%0FY%02%EA%1066%EB%E6Zi%40L%86%03%24%08%B0%0FnI%2F%B6M%EBF%EC%3Bo%B47%8DLv%D1%AE%2F%12A%EA%3C%19%C1%DDZ7%04%BD%92T%3D%3Ay%DD%DA%DC%FA%F7%8C%99r%0C%8B%19a%AF%16%E4%92%24I%D1%D3%C96%99U%0D~%3C%C4%16%F5fT%E9%91%C8QU%BBbiu%80%0B%7C%3A%92%A8%92ss%AEoF%AD%FF%D6%F2%CCDU!%F4%F0%CD%7C%0E%9C%92%DC(%0DWT8%D4%A7%1A%EF%1C%96%CB%60%80%D1%99%8E%E3!%EA%B6%B2%E6i%C4O)D3%DETHA%0D%3F%A8%01%A1%08%3Cw3%9A%D1%8Cf4%A3%2C9%1B%09%26%C8%86!%DER%D1%7C%0A%04%B9i%80%D8%3D%D3%00%A1%DD%26%03%AE%5DZ%07%1F%1AwM%A2%C4%94zO%09%DB%04s!%96z%B0%BC%FA%A0%B9%0C%F9%D6%19l%D5%F3a%0A%9Ei%E8H%BE%E9%B0%97%B7%C2%9A%96%FC%A6%C6UR%0F%1F%0E%C9S-%A4%E3%C4%98%1C%83%87%97%0B%00%C3%CBE3)%17%7C%FDr%83%BC%10!%FF%16%B3%AF-F%DB%B6y%FD%F2%AD%B7%7D%24%AFa%B6%ECo%7F%0Bm%DB%F07%B9%FC%EB%FF%5Dpm3Y%E3%3B%7F%0D%01%1Ek%FC44%D7%82%7DYd%CD%A0%88'%1C%F0z%2Bc%40qHs%D7%7D%F9%AE%AF%C2%5B%E6(%F7%E3%190%B6M%AA%1D%03%3B%16R%2C%B7%F8%ED%A5%D1!%F8%8C%E4%82%F4%F5%BF%0D%83%C2u%01i%5E4%D1%12%01%A2%06q%CE%A9%07%B8W%8Ey%0C%11W%F7Dm%AC8_iB%96%A62%0E%C6%F0%F6%FB%26%DE%98%BB%24%90%12%08%B8a%1D%DE%FE%91%C4%7B%A5H%00)%E2%B7%FB%A1%01m%CE%0C%25%0E%EAH%A6%2C%CC%C2G%1F%96%AA%FCXs%F6d%E2%A0%99%23%80%C0%8D%C0%CE%F6W%7D%D5%24Y%14%B5%11A%E0e%A8%13%5CaRH%84%0C%F25%03%9D%1D)%84%99%7FZ0%1DB%BD%B5%CA%00C%07%C2%AE%C9%7DRq*%C4%1B%81%04j%B5R%EC%AD%B6%9C%B8%3A%A9T0%00i%93%BE%A4%91R%222%9Ff%C7%FD%FD%DD%E3%22%BE%EC%12%15G%0D%97i%12%01%B8%19%3F%A0Tl%F5%1C%3B)H%F2%80I%C5e%B9%A2%FA%00%0E%02%B3%CC%5C%7F%17%C5%7DR%E6%AC%AC7%17%C2H%2B%FE%D9%5C%ABS%D8T%40%AC%D1%CA%E8%CF%F5%0A%CB%0F%C9%DF%F0E%AB%98%CB%F1%03%C3%0D%8FP7%99%F7%DD%98%827%F13E%C3%0AA%F3%D7M%87%5C%01W%83%A9w%16%8A%A6aQ%A1%3C%C9%22%98%FB%18S%F8%CF%C30%CA%9B%CB%E8%ADx6%BA%F2%CENS%19%EC3%E0%DA10%FB%03S!%B4%3C%1B%BF%E1%F3%FF%D4D%82%DCc%08%F2%DBa%C1%DC%8BQY%E3I%BB%8B%3D%E6Bx%00%DB%9Dv%D1%5C%88%3C%F1%09%C5%B0%2B%1E%8CB%22%5B%F6%CF%8F%95%A2V%8F%19%87%B0%8DG%1Cf%3F%DCQ%C6%3C%B2u%3B3%90%19%C8%0C%E4%FF%19%12%EE4%1F%D2%5BQu%1C%01%B9%25%7D%AF%00%C83%00%BB%10%90%03p%B1%00%882%C6%23%20e%86g%80%891%9EB%40%EE%80%DDm%0C%02%133T%0A1%0F%5E%02N%E3%BB%95(%1E7%15%FE%B1Hy%8CC%9E%C0m%18%E9~%BC%CEo%1C%D2%BCe%FF%00%02%E2%1C%8C%A2%9D%9E%99%A2G%80%EAl%3C%829%5DLl%7C%9B%B1%1D%1F%3B%7B'%1A%1E%03%B9%EBo%23r%C7%26%E5%E4%E8%16%14%84%95%FF%A2B%C4%D0%F9%B2%8A%EC%12%14%C4%3A(%C0%20%B4U%E6%B3S%13%05%CC%7C%14%84%FAM%A9%18%83%BA%90%DB%00%C4%D6U%C4%E1%3E%89%3F%B8%18%D8r%C6%88S%92%AD%BC%87kx%C7l%E6a%B0%DF%83%ED%06%20%E0%9C%8F%83%B01%E8%E1%02%1CDx%03%90%9EE%13%90%1F46%EAC%E6x%AB%1E%1A%05(J.SD-%BDJ%E8%F4%93%22%0A%B2%3B%AB%C8%5C%0B%1D7%D2%B1%E7%9B%02%F5%F9O%17%B3%A0Nt%C6%1D%FD%BC%96%89%0E%24%D4.Uq%E1%CE%7C%90%E0W%0C9%D5%12%BA%02%9F%DC%DE%5BQu%2C%0Fd%EB%99B%20%96.%D7%C21%80%7Dy%20%7Cw%F6RO%92%86w%3E%06%ED%CA%18%9F%EF%C1%8A%E5%B5%7C%0D%AF%A7%F5%9B(%0E1%C6%170%BC%CB%3AW%AB%ACg%CE%3B%C6%BB%0A%F2%22Y%8E%2B%B3%C7%FC%E3%C9%DAB%20t5%8D%1A%E3%23%85%ACKp%C5h%1Ff%8CO.w7%24%FB%E3%F4Q%CC%18%DFS%88%CB%A2%3D%84k%937%0A%60%B8V%1D%C2A6%14%00%B1%09%1B%14%88%25o%B3%E6%AD%85%8E%FA%3AG%2Fr%08w%7FA%FAH%EE%22%FCfC%9C%7C%FC)%87%B9%10%BAe%1A%20v%C1l%08s%19%A8.%B3!%E7.%F2%160%19%C2.%81U%17%14H%B8%93%14%E2%02%EC%F2%01G%3Dt%FCP~%BF%5BQu%8A%10%02%F0%A4%80%B3%B3%B5%02%25w%7B%EC%D8%E4J%0D%02%B5i%3D%E0%CD%92%DCa%FDU%98%D8%15%D4%87%ACWRA%90%90%BD%B2%B5%15%94%B3E)%0D%CF%91A%AA%E0d~%A3%B8%1C%9B%18%B7%C2R%20%84%CF%B3%F4Wg%08%E9%81o%FB%94%601%2FC%08%97%C7%FED%2F%91u%A7%87%98%F3%5E%EF%BA%A6%F0*%80%F3C%22%11%E4%BC%5Eb%D6%AE%60*%FE%1A%D9%B2%FF%FEG%24%7B%AB%95%8C%F2%2C%FD%EA%9B%EA5%B3q%19%C1%A2%F8%2B%DBxD%AE%DBJ%15sM%B1%F0e%F1%D6c%07%DD9%09%7F%94%FF-BV%85R%3AA%02%01%B85%F7)Qeo%DB%F5.%B8%DD%2CjB%08%C5(%BFG%F1DN%B4%8D%87W%F6d%EE%EB-%00%12%3C%AB%EC2%CEe%BB%197%9B%B9)r%96Q%84%0B%94%E7l%A9%3D%EF)m(%E6%E0%B9%8C%18%C3%3D%BC%1D%DC%F2%ABE%E5%12%0E%5E%E5%20c%B3%A7%F1%D3e%89%DF%3B%AA%CD%8F%1DO%FBao%26D0%08%09%C6_%9FWKzo%E4%2F%F32%22%A8%3F%1DW%DF%2B%97O%E7%94%17%D7%88%DA%DA%2Ffi4%D3%2BF%2F%A8%3E%A4VFG%E3%BB%FA%90%C3%F1%E2%E2%8E%D8%5C%D5d%06%5D%E1%1D%AA%BB%5E%AB%C3%AF%A8fO*%24%C1z%B5%7C%13z%3D%3B%C2%D1%ACV%9A%07.%EBzg%2B%3E%83%FD%DA%83%D6%E1%EC%08%EB%3E%B5%A9v%8D%DAu%96%26%E5%F7%01%D6k%A6%BE%97%1D%B1%7D%BF%9A%D9%F9%13%DB%95%01%86%D6%BAQT%5C%91%DA%8F%D6%23bf%D86%F2%A2%9A%99kG%BF%F2v%E6%82%A0%5E%8C%D4%0A%AC%F6%C6%DF%BE%AC%11%B0%8Es%AB%DA%F5D%BB%945%9Ag%3D%EA%C5%3C%E5%83g%FD%9A%10K%BD3%BDr%17%CA%18%D5b%D8%CAj%5E%3E%5B%8FVj%B8h%1BD%08%89%9A%10%EB%EA%15%BBR%A9%F4%40W%B1j%85z%1Ejr%CB%B7%93%82%CBw%F4s%B5%F4%1B~%60%B4%17%9D%D3%FDBQ%AAWk%5B%0CE%0BU%BE%5D%FFy%E0%EC%DCE%E1%8BCr%1BFU%7F%26D%FE%EE%E9%2C%9BbFa%16%1F%3F%F2i%2C%B1BJ%FErd%D5.%D5%A3%B3%E5%FCi1~%94%EFQ%08%F1%0A%93%F4accb!W%81%BF%0E%F7%3FB%09%85%E9%1Cj%D9V%00%00%00%19fcTl%00%00%00%02%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%BAw%CA%9A%00%00%0A%13fdAt%00%00%00%03x%9C%ED%9Cml%14%C7%19%C7%1F%EE%D6%F7%BA%BBg%A5%14%C2K%B0!%B4%B4%89%83%1D%C5%16%B4%25p%0EN!%C1%C1(%15%C1m%1A%7C%A5m%40%0D%89%1D%88H%3E%B4b%C1%07v%89%5B%13%8A%E0K%80%B3jW%FD%80bS%C0%FD%12%D5k%03%09%A9%AE%9C%23%DA%A6%A9%D2%B0%60%14%91%C8*%18%1B%02%B6%F1v%F6%DE%7C%B7w%B3%FB%EC%9E%D7%AD*%FF%A5%BB%9D%9Byv%7F%BB%3B%3B%2F%CF%EC%CC%01%A8%E5K%86%5CB%22t%23%C3*G%A5%40%02%13%05%91%D5%1AL%26y%FDT%23c%D2%E2sc9%5E%00J%0FM%06%248%19%90%CB%22%17%7C%DAj%88%7Bqg%F8%98%D5%10x%F2%19%B8.Y%0D%E9%0B%8A%1B%ACf%00%F0%8B%16%5B%0F%81Z%D1z%06%7B%D3z%06%7CX%3BQG%E2%7F%22%D0RJ%7D%94%14%C3r%15%8FPR%F2%96G%26%0A%D2%FD%FE%5DJJm%E5)%AD%1D%CF%8Bx%C8%1F%A1%86b%7D%B0%E0%EB%1A%FBy%1E%5D%8B%874%C2%95u%94%24%F6%9B%1A%FB%F9%FA%9F3%02q%E6S%92%F8%7B%AA%88%FE%0BG%92%E1%AB%60%13%D1%90Np%15R%92%3C%25%AA%88%0D%DB%9B%85D%F8lJ%03%AD%AB%1E%F1%C4~J%12%A3N%A8%04G%B2%C1%BF%08N%DAm%CE%D4N%99z%E7%BB%25UD%1B%B0I%88%EDxw%08%CBp%0C%88%D4%B4%D5%19%C6K%EB%13g%CF5L_%85e%40%F3p%1D-%C9%3D%AA%8A%60W%0C%7C_%F2T%C6x%E5%F8%9B%C5%CD%CC%F7%D3%D2%9C%EA%8Bl%3F%B0)%E4)%0ED%C3%D3n%0Bh%88%7B%8B%9F%5E%A6%3EN%87%B0%A3%D7%8F%2F%5Cp4%F6%23%B2%10%0FaN%D5%ED%C3%DA%BA%96w%F5%F6'%B8%ED%15%06%20g%EB%DE%C3%DA%B2%C5%0B%C6%7Flz%CD%00%A4%CD%3FM%C2Sf%25%C3%8F%06%03h%88%AB%2C%3F%2F%84%B6~*%19%E2%E5%06%3Fz7%A8%1A%C9%A8%3C%E8%AAL%86X%B9%9AV%E3)%A9K%1B%D2%BA%20%9F%17%ACy%00%0D!%0Fb%7F%2C%E4%1E%A8T%D7%9E)%3A%D3%0Bei%11%C7B%7B%D1%90J%F8%2C%EE%090O.%1E%A6%DB%FD%0E%60wZ%84k%EEU4d%87%EB%AB%BB%E2%90g%EE%D0%CF%ED%DC%80%04%DB%D3%A3%9E%08%A1!%EE%07%3F%8D7%96%CE%B1M%7F%A1Z%C9%F3E%A7%AAJ%DA6%D4%8B%858%03%8Ex%06%F2G%18%EA%ED%3A%F6m%9B%3C%24%A6%C7%ED93%17%0B%E1%FD%5D%1D%890'%0B%D9%8D%B8%19%A0%BE%0E%C5%D9%D9%84%85%C0%E1%94%EA%FDG%94%A7%D2%B1%18%BCC%EA%C8%0Dp%85rN%99%B2%0D%04%92%E1%AE%17)6%A4%ED(8%9E%1E%C7%CF%06%8FF%B9J%97%E7%FE_%25%F7%7B%EC%20%05%12%20%F5%8F%9C%9E%CF%EEy%00%F8%E2X%94%0C1sfRN%E4fQ%D5%80%AA%AB%DE-%00%FC%0C%0D%19%2F%1C%5D%7B2r7%AE6%F9%8D%DA4%EF%9D%ED%1C%94%94%BE%17V%E3%BD%E3%9A.%3F%CD%E8%87'%E4gS%7F%17%CB%1B%C1%08%C4%96%7C%84%CB%BBB4%23%AF%BC%7BSG%CAo%B9I%F9%DE%FB%5BjoB%A5%BC%ADR%3C4%BDV%A2%19%D9n%AE%9A%99%DA%CD%A8%8A%9E%CE%EE%E7%91%0Cp%25%8A%20%2F%D3%FBR%5C%D5%CC%3B)%05%3Cc%B4%E5N%96%7Dh%233%19%25..Fo%00'%9BoE%1B%8A%A2%F9a%BA%FE%D9%14D%2B%FE%BF%93%F1S%9A%D2%94%A64%A5)%E5%AA%9E%8Awr%D9%9Do%C2X5%3F1(%E6%00%E9%3B%89%F1%D8%FA%E1%04%BE%7B%9F%A9%8D%9C%88%B2%F3%DEV%BE%3D!3%0C%B2%D7K8%CB*%E5%CBv%DB%0C%24O%84%3D8%CBf%91%7C%F9%0AD%13%10F%C4%BDj%F3%1E%8D%08dc%0B%FAM%40%1C%FBa3%C2%8C%DD%5E%DE%A3%F4%F8%99%26%9A%0F%A5%A1%FE%F3%0Fx%E7!%ECZ%BF%F8%F8%2B~P%DE%FAj%8D%D1g%D7%DF%0Bd%0D_%22EkH%C6%2B%10%B6%B0E2%C8p%DD%16%23%EB%2F%60%2C_!%19%AF%40%A0%E8r%C8%20%E4-%11J%BBQ%96%D7D%A8%89%BAu%87%9C%85%06!_%03%CF(%D3%A1oG%BC%B0%C7V%16oU%02%7D%DCp%D8%18%E4%1B%60%F7%BBq%A3%D1l%B8%BFf%E6%F1p%B8%FD%E5bT%26%8E%AB6t)%C4j%0C%E5%A5%C9%FB%CE%01%D2%D9%9F~h%FA%CB%86%18%E0%1Ai%97%E0~%AC%B1%00%5C%98%DC*%03%2Fyb%FA%D7%1E%F5%88%A0%06%24~_%0D%3F%5Ep0%0C%97E%24%C4%1F%DB%BA%D1%E3F%09%D9%E5%3A%2F%EA%F1%22%F5u%DC%3F%E4%D1%83y%09%B1%B4%81%BC%2C%A6%89%D9%17o%18%85%40%15%F2%3AHQIT%8D%7F5%0C%89%88h%D3%C4%10%A9%DD0%E4z%00m%9Axv%1D%A2QH%3B~%9E%CB%B1x%8F%C3m%18%B2%9E%F6%9E%3AS%97%84%D8%96%0D%19dp%23%F8%F9%14v%7F%1C%22%18%840%25%BFA%DB%26*y%EEM%D1%18%E4-%F1%92%84%B5u%C5K%23%2B%DF4Fi%BEyr%8B%80%B4%F5e%19%A8%A1%ED%CBd%B1%D5%1A%D8%19%87d%89C%0EEqB%F6%F8%09%85%E8%C6%FFoB%3E%C9%09%82%CBxvh%E3%2F~y%D6l%C6%23E%1A%C1%D2%83%E2%04%1D%8C%A6%C3%00%AB%B5%A6%82L%88%D6%00_%80%1D%DE7%A8q%9F%B0%12v%15i%18%E6%A2E%C9P%B0%FCK%C9%22%C8%C5%C7%13!%FB%BB%E8w%93%86%F5j(%1C%F3%0F%AA-C%90%E2q_%E9Je%C2%8C%13%FFv%DD%B8%F8%EF%00%EC%00C%3D%13%E3Rz%B1W%08%60%A9%85%8C%E8%3C(%D2'%7F%BF%D0J%88%2F%06%A9Aw%16MAB%A4G%16%80z%AB%0Ab%0CB%0AJ%E4.T%A3%A7%BA%98%82D%AA%EB%07%E7%FFi%EE%DF%2C%85%F0%8D%FB%98%0F%A6%E7%7F%D7R%08(%035%C1%86%5C%86%C5%90%10h%11%AD%87x%F0%5Dk%B3%10%1F%1C%0BM%02%A4%FC%05%EB!V%BF%3A%F4%01%A2W5%05%89%8A%25%99!N%C2%950b%F8%82%F5%90%D3%A5%2B%AD%5D%99%C0%EF%07f%0E%C0N%84)%5B%F1s%93%903%3F%00%86%B4%F1%D7E%7DS%DB%DB%A7i%D3%83u%B4%CC!2%02%C9xA%DF%D4%0Ep%D4%14%C3%13%80%E5y%0A%04q%8E%8C2%B5%D8%8CH%07%A2RYV%A5t%26%F4d3%FB%A4%BB%05X%ECz%24u%CA%92%C6%09%05%E0%B2)%08%B7%CE%1DpUU%D7cjGn%A8%A1L%DF*%9B%DA%07E%D7%AF%1B%F7a%EE%03%FB%D4%AEW%CDu%FB%D9%92%E8R7%14%24%FF%E4%B5%80)%88c%1D%0E%C2%92%CF%EC%22%97%89w0D%BE%19%BD(%88o%19%40M%C8%85%9F%F7%98%AA%C8%BE%19%9D%18%88%A3%ED%15%E8%07%FB%7B%82%19%C8%89u_%EC%F5%23%20%5C%E19%11%A0%95%C3%BE%1FHS%F0%E1%5E%16%03%81%87%A0%09%F8G%E053%90%86%ABC%2BQ%90Vpu8%04%E8%0B%99%804%C2'%1F%A0%20%B6%8A%8A%BB%07%C9S%96%98a%9D1%F8%92m%EAU%12%02%A8%DB%E5%5D%A17%F5J%E3%10-%15GQ%90%96.%3D%0B%8DCpKO%B1~D%1B%AF_%F1h%1987%B3e%886%BE)'%08lfG%10m%7C%C6%95%18%C9x%D2%00%2B%AB%87t%DB%F8%CE%9C%E6%DC9%C6%98%1B%B1%D1%60M3%BBd%EC%B0%E9%3A%EC%CF%BB%91e5%92Z%1E%FC%12%9BLyWu%B8oD%DD9%1Dm%C9%012%ED%7Be%9F%DE%C3%0C%DE8rXc%1B%CDO%E2%C7%EBB%E0u%F3%10Ec%C4%8F%D7%87%20g%7D%D0%84%CA%130%B0%3C%D0%3C%24%C7%B5%EE8H%8E%FA%3F%81%FC%3B%0A%B1Y7%22%AC%E8%CD(%C4b%9F%F1%5B%93%00%E1G'%01%E2%19%B3%1A%D2%2FA%5E%80%40%AC%F4%E3%F9%D5%0D%81K%E4%B1%BAe%A5%1F%EF%0Ap%A3%7B%09%0B%D3%C6%9B%16%23%40%E7%9C%D8%9Ba%8C%1Fo%1A%D2UH67p~%BC9%11'%BE%8A%1C%5Ci%E31~%BCI%AD%DF%A3%BC%A2t%87H%2B%2CZ%06ak%95%01g%FEqe%0D%B6u%90%19%D1M%A4%BA%1E3%7B%CF%A4%5C%3B%25e%C37%D6%5B%F4%0ESQ%DE%B9x~s%86g%19%E1e%FFga%3Ct%40%B2%0C%E2%E3%17%86b!%C6%EC%FDbu%E7%F1%9D%81%CF%0Bb%5D~S%F7%8B%0F%AE%BE%D0%B2b%96%8E%D5ir%26%8D%B1l9%60%02%C2%AC%09W%2F%E3%C7%FF%8B%20%BBRV%D7%B1%26%20%1F%91%82%BC%1F%D8y%E75%AD~j%E2%C8%E3%F2%06%08%84%E4%E5%8Fgk%9Au%97Vl%A5%24%B1%CF5J%DA%0CNY3%A9L%82%FB%87%A8m%F8%FB%BD2%C5%82%11%CF%0A%DA%FB%06%E5%00%F9V%5D%05%1F%7DJ%C3%AA%0E%D6%12%CA%B3%CB%80%23%A4%C9%E0f%0D%2F!%9B%F5%E9%B1%D1%09%A0%7D%AF%2B%CBo%9Db%D2t%99%3F%FB1%CE%C2%87%92%5B%0B%E2%DEV%12%E9%CD%F8%9F%23%5E%A9%04%9F%87V!%15%D2%F6g%8A%2F%D8%DA%F84%D4j%BD%0Dv%15%EFW%C6y%D5S%7DOJJ%EFG%19%E4%88%24%EE%D9g%82C%C8~%0C%F6V%80%1F.%D4%80xeI%81%A8%C7z%1Dk%A3%5D%AC%7C%F0%26%96%DD%B2E%F4%D6jt%98-%D1r%13%F9%5B%B0M%CA%D2a%7BV%84%22%F0%D6As%3C%B3%D9r%11.R%8E%C1%8D%95%E7%F5%EE%3ABIU%0CdY%99%A9%3FM%1D%EF%98%05%AD%E2%D5%DE%EEe%F1%DF-%95%00%B4%D2%EA%2Ci%DE%E1%91_%5C%24%D2%20%EC%BDp%0F%D90%19%15%E4%1F%1E%F6%CA%95m%C9%3F%AE%F9%92%7C%0EQjQ%7B%5D%E4%CE%EE3%FE%8F%EE%7B%A9%2F%FB%A3%E1%C9%07%3B%C9Zf0%23%E5%F4%92%F9%F2-)%F1k%C1%0B%00%ED%94%D1%8E%EB%1D%EE%81%8D%CE%DBp%AD%802%5DZc%DA%14%BB%B61%BEO%15e%8A%15R%D0%23%A8%A8%E3%8F%80%3BY%C0u%9CYR%2B%BF%ABm%A1%96%05%7FA%F7%1F%B0%1AU%A1%96%23%FD%A5%00%00%00%19fcTl%00%00%00%04%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%C8%86%90%1A%00%00%09%E3fdAt%00%00%00%05x%9C%ED%9C%7Fp%14g%19%C7%1F%92%FB%B1w%D9%DDcFPD0A%98%14%0A6%94FE%25%E4%0C%A9M-m%C8%B4NQ%DBr%AD%ADSmf%8E%AA0%C5q%9A%85%80%0D%90%9A%40%DB%992%83f%83%0C%A3%D3%D6%04A%FD%07%CDB%00%83%9E%5CZ%CB%F4%C7%3F%D9%90d%AC%8ECBr%F9E%92%AE%EF%DEBH%B2%EF%BE%EF%BB%BB%B7%94*%DF%3F.w%CF%FB%EC~v%EF%7D%EF%FD%F1%BC%CF%06%60%A6%22%26%0B%40%1F%C6%E6J%5E%40%B4%99%1A%60q%B2'%E2%05%F0%AA%CB%3B%20%EBo%06%E4%01O!%87%14%9Dq%E0%88%A7%10~%A9%0A%F0%2F%E8%F4%14%02%3D%CB%01%9E%C7%B6%B4Lj%DF%A3%B0%19z%3D%86%88%8FK%2Ba%8B%C7%10%10v.%7Da-%40B%C9%E09%FFn6%BD%D0%A6%FF%926d%8E!%2C%92M%B6Jt%1F%89%F6%CC1%20%10%BEb%B2%AD%CF%E0%F9%D3j%83%0Au%A6-%E3%7Do-t4%7B%0E%89B%B6d%1B%F2j%BD%5D%88%CF%04%B9%DF%C2%F7%F8%DDj%FAo%F6%D2%9F%D8%83%3C%02%B3%E4%99%B6%EF%AB9%B9cfW~%E4%9C%E1%FA%0A%F0%F6%20%07%60%9F%3A%D3%D6%94%DAu%E2%5BfWn3%ACL%BFy%14%7C%8A-%C8%C5%C4Z%93M%DC%B1%B8%CCl%05%BF%A4%D7%16j%26%B3%81%BF%C3%16%A4c%9Bj6%0AjR1%5B%031~6%F8c%3A%04~c%87!%AE%C2%9A%F9%5C%0C%84%1F%3D%13%E3%EFlN%F7%08mv%20%D9)%AC%F9%E4*L%AF%C2%17h%85%05E%E8%CD%5B%AAp%AF%1DH%D2%DC%A9%E8%FA%D2K%18c%BCp%F9Ce*z%F3%AE%A6%D9%AA%93%96%09%AC9%B5%C0l%E3%06%3A6%A7%EF%8F%5Bt%E0E%C2)%DB%24%D3%D5%E5a%1D%1B%9E7%DB%92k%9B%FE%3C%9C~S%2C%13%18%C1%2F%1FS%A6%5B%04-%86s%14o%C3%18%2B%D4%E2pz%BA%16%2F%97%08%90cjx%7C%06v%D5%40-%A6%8A%83%2B1G%8F%08%83%81%5C%FDMi%01i%3C%FB%01%C0%BA%E9%96%CE%C3%B5%F1!%D5%E4%D8%A4%98%0F%E6%C7%C3%23Y%F1p%19%C0%3DC%B3%09%90%EF%A0%C3%A7%5B%1A%03%92xx%B3%C9q%10s0%9F%0A%8E%F7%B6%C4Q%93%9F7%3A%8E)%BF%E6%B6%15%B5%A6i%16%F1%D3!3%01).c%8C%C7%DF%9E8%96%1C%FD%24%FA%DE%C6pUfH%D8tY%991%D7%09%E6%F1%B8o%1F8%EC%A5%FA%FA%B6%C5%13%A8w%1E%99%D7h%099%B9%E8%AF%A9%D2%85%D3L%DD%0A%AC%C0%FA%FE%09g%8CD%97h%DFD%D5%91%FF%DD%2C%D9%82%11%BE%7F5%2C%DEmjJ%C5)%C5%F2%B2f(%FB%5E%AD%E1%D9%18%C0%8E%8E%D7%F3%2C%5C%B6%C0%044%9A%9Bk%D7%FC%7BX!~%ED%CA%FBz%EF%DCu%E4C%EC%9D%A2%1B%99%40%FD%B4%CF%5C%03%E2%5DY%AC%10%40s%B1%1D%FA%DF%EE%01%05%EF%C0%8F%F1Q%FF%DCy%E6%82%AE%0Af%08%92q%DB%F1%CFZ%14%EF%E2%FA%5ENV%99%2FA%9Cc%83!%8E%A4%BF%F0%CEQ%2B%07n%7Ca%D3%19%D3%F7%F5%FE%93%C36%209Z%FA%C7%CE%8DX%3A%F4%7F%BB%BC%F6S%D3m%C2%8F%B4%C5%F8%CE%1E%2F%D1%98%EB%8B%96%10AK%A5*Z%94i6~%E8%0D.j%03rU3%FB%D9)%DA%9FH%A5%F4y%C0T%0Da%A6%5Dte%11%EE%9E%D3L%D3%CB9%D0%A8%DA%87%B4%60%3B%23CUkL%A6K%90o%9F%01%E5%8AeQ%8F%86%2B%1B%F8%ADmF%CE%90uY%1Dv%89v%16%17S%A1%400%13%E5kzWKM%E9%BBL%D1%16%5C%B3%B4%8A%CC%E0gkh4%A0%05p%EC%84%A2%AC%82%09%11%C81-%A9%3C%80P%F4%B1%85%7C4%15%7FK%B7tK%B7%F4%7F%A8s%AA%F7%8CP%05%26%BE%90i%1D1V%15%9E%8A%DF%00h%7D%94%C9X2F%BEv%04%09%10%96%DE%99P%2F%40R%AD%8B%91%5C%3E%A89%E8%12%D2%0AP%1D%26L%2C%D1r%23W%D3nw%07yS%11%E7%9F%8C%91%3C84%ED%2C%8F%BAa%B4U%CF)YM%B8%91%D3%A52%87f%3E%C1%81%7Fc69%18%F5%D6mm%C35%BB%15k%87%BAr)%BDpj%CCu%DE6%0E%A9%BE%3C%A2CEv%94%BF%2C%A3%D5%DEA%E7%AD%FC%1FkZ%C8%D1%FBD0%1A%EA'%B6%0B%BA%C4%1DZ%E1s%C4k%E4%A2%FEh%95%EC%8E%02%9F%AB%A9!BB%7D%BD%F5%1Dy%EE%18%02-%18%C0%F75%AAn%3B%04%1E%1F%5E%9Er%15%E3%B7%93%16%E6l%10%EA%F1%051%06'%0A%84%BAy%A4%EF%20%B8%84%88%CBX%AE%E4Cw%10%A8%AA%A4%FB%E4%90%22%BD%2Cj%AD%5BN%2C%0F%CD%F9%FA%DE%60%CC%25d%3B%1C*%22%95%A3a%F3%D9N%C5%25%A4%04%B8%85%A4%F2%9Dh%3D9%D7%25%03%86DB%BC%C5%80%C4%DD%26%5E%84%C6%BB%C8%BF%F9%93%EDP%F0%15%97%90%8E%BC'%88%91%88w%8A%E7%AC%1B.%C6%07%BA%99U~%8E%1Cd%7CB%DE4%A8%84%0B%247%0Ca%D0O%EC%BC%04%A3%F4%9F%98%5D%14v%05%26%F8%87I%E5%5C%9E%F1%F7%D4c.%20%9D1r%F9%AC%AB%15%26%7C%D1%05%A4%E1%11F%C7%8B%E4%40%15Q%174%89%CD1%DC%84%09%D4X%1D%EB%C3%F8%92%02%3B%93%FA%D8%C6%BB%FE%97!7%A2%E2o%0Aq7%02%E2u%F6%DAG%06%B9%E49Dh%B7%97%EF%C1%AC%E4%F9%EB%EF9%05%CEx%C1%E8)%5Cw%7D5%E5W%E0%B4%07%0C%F1%AB%00%5B'%3F%F9%00%FE%E2%01%84%DB%80%86%1Ce%0A%E4%D7%1E%40%F4%3C(N%BA%F6)R%DF%BE%D7s%C8%D9%E3%17%AC%F6%98%5DAd4)%B9%06%E17%408%CF%0B%C8%E7Q%23%9E%84H%10%C8x%F6%9F%0E%A9%DBX%3D%2CA87%3D%DF%90%C0%EDz%19%ABY%97j%F6%04d%98U%12%D5%3F%EDM%94%CB%1E%40%F4NE%AF%FC%60%1A%12(dX%BE9%87%08%E9%85%9FO%F5%821%09%81%9F%E9%9F%9E%F6%80%C0%1B%3BmiHNiY%E2%1869%C8%BD%26%EF%04%20%BB%86%94%A8%96!%88%CF%23%C44%88'%23%09%AA%93W%EA%A7%400%19%A5%99P%0F%E4%E9%10c%00%0Ea2J3%A1%B3%B0%FE*%24%BC%2CQ%ADx%03%D9%0D%D1%08%24%CE%23%08%3F%AFF%F6%86%01%AF%89%B1%08%1A%E3%1B%20%9D%FC%EA%91%82K%D4%08%1A%E3%AB%D0o2F%F6%14k%14%A7%10q%25D%D0%18%DFK%3F%01%F7%F4V%A7%14%1F%82%A0c%23%12%DDS%81%03%0E!%1D%F9%06%84%9E%84%EEk%87%1C%D9%19%E4%A5%C2%C7%22%E8P%1DDQ%B0%DEqZ%FE%C6%3D_%AB%D2%C7x%BA'%3F%1FDB~%0EIe%3D%1F%14%E7n%ACfH%AC%10%3FQ%AE-R%1CA*sb%11%B1f%0F%CB%0Ae%BB%CA%17%13%12%B3%08%3A%03%F7%5D%EF%BB%C8%EA%AD%FF%5D%2B%26G%91A%5C%F3%A9%24%0B%C4_%09%FEeW%7C%DB%1D%ED%C4%08%D5%CF%C4Y%20%D9w%CA%FC%A2%E6%AC%EE%A8%13%08%08%F9%0D%2C%90%C0%0A%7D%93%AF%95%B7%93%908E%EB%8BY%20%FCx%97%0C%F0%1C%7C%CF%11C%98%60%82%C0%12%F1%1B%00k%E1MG%95%C2%3D%D9%C4%04I*%AD2W%AF%3F%DF%E1%40%5D%FB%D9%9A%F0)MK%FD*%DDk%1B2%05_%2CSA%91v.%60%82%04si%A9W%A4S%94%DF%C1%049%9A%D4%1F%2B!y%10O%F1%60%D2%18%E3%C9%3A%E1(%A8vU%1C%BA%F5%DF%1Bc%3CQ%097%10%24%DFg%D0%18O%3B%05%E7(%E7n%0A%84e%8C%0Ft%D3*%9E%2C%7D%8AJ%1D%E3%05%9A%03%0B%84%3A%C6%B7%A9%EE%202%CB%18%2F%B0%06%ED-%20lc%FCEw%90%3A%A61%DE%EF%0Er%9Ei%8C%B7%F9P%DDL%88%02%90%E5utY%87%D8%7C%2C%EF%26%85%F8%9Bo%00D%0F%A8%DD%82%DC%7C%90%EC%1B%01%F1%7C%DF%81%93%18%C6x%E7%12%AA%EFF%E3%08%B7%85a%8Cw%AE%80%22%A2%A1%F7%F11%861%DE%B9%DE%01x%00%B8%2F%B0%AD%E3%B1z%88%FE%3C%7F%1B%C0%1A8%FA%B6%C4%B4%8E%C7)%24%BF%A7%D2%7CN%83%D0%C7%AF%F0KL%EBx%9C%DE%03%FC%B3%86S%E5%3B%D1%FA%DA%83JH%06%98%A58%82%1C%04a%98%B6%96%10_%EE%CF%FD9%88E%E0t%F3%A7%16%BA%86%E6%AA%14%A7%D0%FE%D7%91%CB%A6%8D%D5%0Ew3.%D4%14o%E8%A6%85%FB%BArJ%91%D6%0F%EFq%C6%00~%C7.%19%96R%9C%5EM%BF%3Ay2%ED%AA%3A%B2%148E%F11%9E%EE%B2%C8i%22%2FG%0C%EDB%FDQ6%D9%C5%D8%02%D0S%8E0%E2w2%3C%FA%BD%3C%0B-%C2%C8.%7CT%7F%15%F1)%DA%CF%C0%1F%A8%8C%40%9E%8F%BA%07nTF(%8A%2B%CB%891%B4%EB%A4%84%08%94%87L%0D%88%88%FD9%05%258L%85%FCP%15%A8%A3*%A9Y%05W%C2%7DTH%99%FE%E2%8B%91!%ABw%96ZuZ%E2S%BB%C8%07%EB%3A%91%86%FC%94%E8%C3k%DA%80%E5%B3%C1%E26*%C3P6m%AF8%D1%B0%C4%F2%0AX%9F%0B%E8%A4%FCP%D0%BDZ%E6%13_d%7D%E6%F2%B0%8F%D2%11%8Bu%96%5D%E3S%97%FF%A30A%1E%E6%C8YW%7C%FC%C7%92E%91pe%A8%CA%AAl%9A%C4%B10%D9%EF%D4%2FN%AA%16E%81%85%2B%06%A3%2C%90%F0l%9E8%D0%87%17%88%96%99%FD%BD%95Ec%A9_2%40%FC%92H%CC%B1m%92%02%96%17%D1%90%18.%E9%EFW%A8%0C%E1%A8%AA%FF%5B%06k%DD%05%B8%7FYb%A8%84%EF%DFW%DA%B4%94J%E1%D0Z%B3%89%10W%E1%B5m%DB-w%2FG%A1%BF%A8w%F8P%FE%1F-%1C%98%D2%A6%CA-R%AC%18e%3E%A1%93%7F%DCV%0FoP%3C2%00%A1%E8%BF%9A%1Ah%826%3A%E2E%00%00%00%19fcTl%00%00%00%06%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%E6%D6Y%9A%00%00%09%DFfdAt%00%00%00%07x%9C%ED%9C%7Dl%DC%E4%1D%C7%7FI%EE%FD%7C%BE%B6%8CV%5B%D2%5EV%3AVJ%A3%EB%D2j%82B%93k%12(%DB%BA%BE%20%D8%8AV%20%84%F4EZ%D7%04%08b%7F%C0%E2%D0v%0D%A5U%C2%84%A6j%AA%88%E9%0A%AA%26%B6t%1B%AD%F8%03-N%D2%D0%97%99%CB1%C8%A6I%95p%08%D9K%D5%A9%B9%BC%BF%E2%3D%BE%5C%12_%F3%7Bl%C7gWj%95%AF%14%9F%FD%FC~~%3E%8E%FD%D8%BF%E7%F9%DDs%06%B8Q%C1Y%25%00%3DHYZ%B2%03%22%DF%A8%3E%23NsS%9A%878%AFy%CD%EB%D6U%E0%C3%9B%00%E9%DA~%C6~%C8%8B%AE%5C%DB%19%81%A50f%3B%C4U%09%3F%B6%AE%B6%7F%1EE%8B%B3%CE%C0Ac%15%B0%1F%EB%BA%F8%96%1C%8Ea%E5%24%26%1EN)%B8F%AB%AB%B9%98%D7%83%B4%C4%BC%5Bp%08%BBzj%7D%3F%F9%F3%F7n%AC%C4kX%19%C8%99%5C9N%85%AD%02%B8%1F%2B%CFz%EA%CB%C8%D4%FA%B3%12%40%26%CF%E6%A0%150%3D%D0%24)%2B%EE%1D%CFR%18%CC%04%E0%E7%3E%10%EA%97%A6%D6%1D%05%00g%01%BE%8F%D7%B0%00%82%82%B2r%5D%F2%F0%14%C8W%00%EFc%86%BF%F5%CF%AC%B3k%01j%01~%88%D6%C0%8E'!m%C0PN%E8%FB%A3%E4%B6%C3%0C%8F%C5U%1B%CD%95p%F0%BD%B3%B9x%15%2FHu%E2!r%00%1F%01l%40%1D%98x%9F%C4~%1D%3B%BE%BC%01N%E56%20%D6%C9K%24%1C%E2T%3A%3A%A5%00%9D%12lF%1D%9A%07%E4%FB%0E%60%7C%DF%CE%F1e%AA%CDVy%E02%8E%00%B6lT%14%05%B2%E2.%20%97%07%D3%D6%B1%C1%F0%20v%84%AE%A3%3D%E5%EAmf%A2%8D%02q%AE%CFM%AEm%CF%170%07%7F%7F%0F%E5%01%E5xo%C2%A9%BE%7F%1C%5C%06%8F%7B%FE%AA%BB4%F1%D9%16%96%0BQ%87%AC%EC%9E%FB%F0%5D%83%E2(%3C%AF%AA%F6O%92o%F0%2F%A8%E7%EA%8AI%B7%D03%83%ED%A8%C3%E7%2F%F7%3CD%81D%07%81)%E2%A6%B7%F7%00%9C%0B%C9%C8%85e%BE%2B%0B%C0%9C%E7!Z%B1%E5U%B4%AA%06%B1%A7%86%02%E1%2Bb%C0%CE%3C%D5%EEM%2C%C5%D9%8E%9E%FE%0A%F0%87%E2%DB%EF%3E%24%FFo%10%AD%AA%8C%E9i%12p%08%D7%C9%A9%B7%C7%F1cQ%D4%CC%96%93%3A.%84%E2%CE%09%D4%FE03%91%85%DF%A5%0E%8E%E1S%20Lm%3D%05%F2Y%8B%2C%0F%82%7F%14%9Ax%D4%FE%3Dv%2CP%40%D9%D7%F7%23A%B55P%5E%F2%0D%8Ac%C6%B0X7%0E%9D%BC%9F%E2%B0%13%96P%F6%24w%CA%87%DBT%5BUb%80v%C6%5C%C2%BFe%1E~W%BE%91%DA%F1(%A3B2%EB%7F%A3%DA%BAZ%B8%22B%F3d%C2J%B3%A8%C0%23%81%A2%F6%C5%7F%A0X%3E%17R%EEq%A6%B0%94%E2%C8V'%CESw%9C%A7A%9C%FD%A1%1F%E0%96%C6X%A6z%D35%B2%9CR%85g%40J%7C%B6QG%AC%EC%DA%AB%85%02j)%02%87%DAP%C1_%C7%FD%C8%5D%F2%A4%F2%11%A8%C9%A5A%E0%93%CA%2C%B4m%92%26%99%12%E8%06%A1%5D%A2T%D12%A0%2C%DF%90y%8A%9D%9C%EB%EC%0A%F4%08%9B%D7%80%B7T%B5%FD%F4O%FB17El%94%2CZ%97%8FR%19%E4%DC%A3Ff!y%22%E5%AA%0A%DC!%8D%9B%9E%FC%E3%C3u%BC%86%B9b)V%FA%C7%9CD%3FdF%1Dq%CD%FEw%D3%09%FC%C1%95%DCY%C6%8E%B0%A3W%00%F0%AA%2C%07%E5%FDZ%0Ch%AC%8A%D0%8D%7F%97%EFG%3A%90%AC%FC%14Y%FA%0B%A7%BBw%9F%C9%B4%87JRY%F2%1A%AA%CD%DF%BB%08%2B%F6N%FE%EF%CC%91%A9%82%AB%FD%826%04%DE%A1%B6%0Bp%8C%0F%A97ge%5B%86%A7%2C%1F%08t%A7%A4h%14%87%5E%02g.%A9(%CC7Y.%0A%14%9B%95%10m%DD%B2%10%FA%85%D7rJ%F7%C2%CFk%5E%F3%9A%D7%BCni%097%81%D1%BD%F3%26%40%5Eg%F4s%87i%2B%17N%DB%CE%60%22J%9E%EC6%81%AC%B7%1D%02K%7D%F4~%B8U%F2%2F%2FF%93%CEV%8A%C9%DF%F8%1606c%DE%E6VpP-%D8%CA%F0%8D%07%C6%22%0C%7D%DCb%89%1C%95%DE-y%ED%B4%04%91E%F2%AEr%D4W%24%D3%15%F6%E9%7C8vM%40%CA%19%D1%CA%C6%D0%84~%A1%E1%0F%CB%B4%04%9D%19%05_%C3J%BD%2Fo%97%2C%8488%B4%98%5Dl!%03%7C%0F%A2%C5%1E%3C%23jV%CF%95%94%F0%B3K3%22%96B%A0e%EF%B6%D9%85A%04%9C%96%EA%90%ACx%B0%94%2C%FEZk%5D%3Bv%20%17%D99%22%8A%1F%ED*%D6%CCm%CDIMH%3A%8D-%96%E5%BE%1Cx%DC*%06%13B%AE%09%88%A2%18%3B)%18%FC%B2T_%5DX%26%C0%2B%CB%7B%05O%8Ee%90%E7%B0%7C%9Fg%F8pX%96%87%AD%820h%82%D3%3B%0A%CC%E9%DA%A3%BB%ADa%B0-r%1F%F6%2C%8C%26%8Cw%BEe%09%C45%7Ci%2352%3AW%DE%15%BB%5C%B5U%96%C3H%A2%86%A3%EC%E4%40%7C%B5%12%3Bo%C4%1A%8B%BE%F6%08ih%D7%11%A3E%F9.%DF%10%9C%1A%A1%3AX%04%E9%FC%098%EA%ED%86%FC%FA%08%B4%0BvC~%DEz%ED%EE%A4%83%7D%17~%8FSF%7B%00%96%AAY%B8b%3B%03%7C%3A%89%F9%14%05%CCR%1A%E7%D0%B7%EC%14LB%98%BB%8C%FBV%99d%00%7CZj%D4%93I%A3%7Bs%C2%98%9B%18up%E6!%C6%D4%BD%AE%F8Q%C9f%06%FB%00%C0.%9B%19%E0!%9D%84%2F%04%9B!%CAW%AA%1E%EEv%80d%F1%24%C2%DA%0D%09n%00h%B7%15%E2!O%F1%F6%1D%07%86l%85%10%05%D9%DA%23%B6_%13%25%E6%D9%0B%F1%3D%92%80%A4%CC%0C%B0%5C%AD%DD%9C%FD%90'%FD%B93%90%B6%90%95%23%F3i%05J%A1%40%F5%9F4Kv%40%FC%1ClQA%D0%AC%40%DA%F2%D4%B3kT%90%23%9A%CE%A6!B%8B0%0D%F1m%3Eg%0B%C4%BF%EE%C1%E9%26%EC_%98%93%A9%E7oN%1D0s%9FD%7F%EB.%9D*g%AC%84%3C%A1%40H%8CW%20%E0%BE%E7%A5d%AF%80%DC%A3%16%8A%8C-%82%24%C6%BF%99%80%C0%9F%E5E%11%E5%93%E9%B0%92%C1%F4%F2%10%241%BEZJ%16%B0%D9%CA%E2%F9e%1A%FB%CC%1D2%20%AF%A8%231~f%1ASK%8C%5C%A1%C3%7B%11%DF%0F%F0%C9%D5%06%20%3D%FB%12%B3k%83%DCT%89%2F%07%E0%DC%FAO%10%DFM%87L%0E%12%D8%89%7F%9DI%40f%1EZm%FB%A1%5C%C0%86%3C%118o%0E%02%C5%F0%D2u%1E%92s%85'u%AEv%01t%22%AE%9B%C1o%F2%F9%E9%FA%D6%CE%A7%95%18%9F2%ED!%07%B0%16%FCn%CC%8B%CF%24%D6Wk%5E%90%C4%F8%D4%89%15%0F%1F%C0%92B%9D%B9%19q%C1%1C%24%F0%95%12%E3S%AF%C1%15q%0F%92%8F%F3%C9%BD%BB%F1%A9%C4%BAr%E5(%80%1B%2F4%BBk%D3%AC%06%EB%A8l%F9Xk%1E%9B%86%DE%DD%87A%C8pb%D6%B7~%8E%D7%B3!%DF%1Cd%F3%02%1C2%5B%EEo%0A%EC%1D%E6~h%B2Q0%0A%09%1C%03%FFf%ACE%E8%2B%9Cg%14%02J%B7%F9%B8%19%86%D2M%15%0CC~%09%0E%C9%0Ce2%60%E9C%D8%E3%B5%92%2F%02%BER%3B!5%FD%F2%03%BB%24%60%A7%12%3F%86%A6%5E%CD%11%E2%0A%E9M%BD%D2%AE%C2%10%E4%02%96%FD%9B%13D%8C%EAB.%9B%9A%0E%A7%82%9C%5DW%DC%A0W%85%3B%5D%08%09%EB%D5zU%B8L%CD%B9SARb%3C%0D%F2%A5%DE%85%D7V%E2%C2s%3ANf%83b%0AD%B7%8EH%9A%10%3E5%C6%E3%DA%97%26%24%8F%C4x%5D%AF%B3iB%EAn%8C%F1%A8W%9A%90%E8%8D1%DE%06%88%F3%8C%91%07%A4%D9%8E%5DRJ%A2%40%1F%E2%BA%19%904GE%C6%20i%EA%F6%82d%D0%BF%B4%B2%0Ebo%02%C7%12%08%23%D9%0AI4lf%C71%03%90%A9q%FC%DC%E5%E0%C8%E2%1F%06%1C%3D%2FN%8F%E3%E7%0E%89%90%05%0F%20i%F8%9C%FA%85%02%193%10%E3)%F2(%BF%08%E1%20%C0%D1%5D%02%E3%FF!%0FG%B7%91%18OSu%BD%124%5D%F5%F4%A8%E6%8E%C0%D2%C9%F3%AA%1B%E3ib%F2O%88%BB%C5%E6%18%F8WS%3CH%E0%1DOBL%F7%13%7C%8F%95%D4%C8%2B%E1%BFa%DA%C8%85%B4%A9q%7F%EDV%02%C9%10%CCB%88%DA%2F%1C%BD%B82J%B3%BA%24%FFP8~lC%9A!%E9%10%9C~M%A2Z%3D%D1%EAM%85%3F%032%8EO'%2B%84On%98%96%FB%3B%D9%DEW%C8%F8%A66%AD%04%A73W%CB%CA%16%AD%93%1A%84t%EAO(%A89%22%EE%DA%BF%D8%3D%97%AFn)%D2%EE%B3%BD%7Duh%91%A0%5D%C1IZ%EB7%0Cy%B5%26%CEi%EF%CF%E4%B5%EAOz%D2n%FE%17%17%E2%BFf%9E%91%83%F7%A1%BF%C9K%91%A7T%CB%AA%D3%F6%20q%B7%EE%D0%85%B0%9A%F3%7C%95%F7%03h%CA%F3L%BD%91%E9%C8_%AC%D5%98%84%C3%8C%5C%AA*%114%F6n%18.%AA%BDG%1F%C2%EC%2B%A3%D7%C2%86%E3%B2%9CG%DF9%10Z%E5)1%92%16z%82%7D%85n%BC%22%B0%974f%B39z%2F%1A%20%10uj%7F%F1%C2%9E%D4%804%0Ci%FDNS%A5L%A0%FC%20xR-%7D%F4%17S1%0BG%B4%7F%2C%3A%25%F6%F1%80Vn%D2s%AF%8B%9E%25%CBz4%3F%1E1%02%E9*pr%1A%E6%0A%A1%93%A7%1Ak%DA%E5%B0%91%17p%B1k%A5%17%24%BA%D99%02eT33%DEpg%99%11HWA%AB%D6%DC%95%EB%DB4n%FA%AC%CA%86S%A7%0C%A4%1C%C9%3FR%F4%7B%0D%7B%BB%E4%1A%93(%B6%C0Z%A9%23%EBS%CAk%3ER%0Ef%19%BC%19%FE6%DD%5E%F7%D0%3Br.%ED%00I%CF%20%D8x%07%ED%18f'p%B0%A1%C7V%CA%14%2B%83%9A%A9%88I%BE%CC%C1%F4%8B%DB%18%FD%EE%FA%B4lx%3B%DC%FF%01%1C0w%1Fb%1D%1A%C7%00%00%00%19fcTl%00%00%00%08%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02-d%25%1A%00%00%0A%15fdAt%00%00%00%09x%9C%ED%9C%7Fl%13%E7%19%C7%1F%92%B3%7D%B6_%DF%01%0Bj%A1%94%98.%ABh%96%90%90Fm%B7%011!PJ%D3%26%AB%D8%94%AD%A9%F04%D6Ri(i%AB%22Vm%8A%93%00u%A1%5B%22%D6%7FZ!b%B6%96v%D2Z%D2%C1~I%D3r!)M%A9%89%1D%986mc%E2%E8%C8%CAVJ~%92%90%C4%F4v%E7%1F%18%DB%F7%BE%F7%CBg%A9%15_%25%8E%EF%9E%E7%F5%E7%F2%DE%DD%FB%BC%3F%9E3%40%BA%D8%8C%3D%00%A32%FB%0C%C9%0C%88%90%AE%095N%DAd%F0%10o%E9%96n%C9%88%BA%0A%7C%A63%98e%D0h%3A%04%D5%C3%99%80%D9%10%BB%0F%ACYo%BB%D3%E5l%06%BB%E9%10%E4%06z%BE%E9%90k%40y%09v%A6%E2Q%E3%10j%EC%D0%F7x%92%3D%B8%CB0%83i%89%D4%11%0F%F5%2C%7CK%F1CPe1%D1%EE%10%14%CE%FA%AF%E0BX%09Bu%DA%F7%90%ECyJ%90%1F%82%CDGtp%9D%86%100%23%3C%C1%A5g%82%00%F9%DF%3AA%98%05%9A%0C%E9%12jC%1C%88%3Fx5M%E2!%D6%05%2F%9C%14%E6%C0J%AE%AE%B6O%EB%B6%DE%16%EE%22%B9%14%CC%E2!!%1F%B4T%1D%A8y%9C%C8%80%1E%AFs%81%20%2C%25x0%D3%91%CF%B0%C6.%0EM%173A%9E%0Cq%DC%03%5D%EB%0F%DA%97%E0%3D%D0%B5H%04kl%0D%E7o%AA'%13b%AA%B6xC%CB%F1%95%8Af%E6%DE%C6%1A%AF%00%7B%98S%03%99b%EE%5D%FE%B1%17%0F%89%3C%40*%1D%0A%A9a%A0%19%B80%83%AEc%ED%CEH%3F%11%D2%A7%0A%12%81%D0S%CD%B7c%ED%B6%08%1B%20AzUBj%00%B6D%DF%0FJ%DB%7C%AA%9D%1A%A5H%A7vdP%15d%0E%DD%09%D0%11%7D%BF%5D%AC%9D%86%CET%BB%BD%9E%22%05%13%CA%93%BA%ED%E8%96u%AB%A8%10%F7%C7%EE%F9%5E%1E%FA%F8%D7%D2%ECaz%8Ex%8C%A9%DBC%F2%D7%E9%C7%D2(%E6%CCX%00%80%B7%D6C)%9CIw%A0%A7%09%10%A8%E6b%7F%99%D8%9F71n%7DbS%1F%BDk72%C5%C8%939%3Cs%8C%93%20%7D%0Bc%15%24%05%CF_l%E0Kp~%1D%F1%98t%C2%DB%FB%AA%072%AEX%24p%24%CA%B6%CA%A8%19%DD%0D%AE%D2%B3%AB%3D87%B4*V%91%CC%BDoW%AF%86%1FeB%7C%24%88%B5!v%F4%FF%F6%DA%7C%CC8%B6%E9pE%EF%92%2B%00%97%16%3E%2B%7CX%9E%01%99%C8%D8%95%A2%BBjcn3%14%97y%847D%B9%A5%D7%3E%B1n%3F%D9%7B%F5%25%3E%DDLO%E3%DB%03%F1%B3%9B%26%3D%B1wu'%A4(%89S%07'%BD%B2%B3b%85%B5vf%9A%A9R%7C3%0C%A8n%AC%3A%5EE%F9_z-%88%BF%A5VD_%AD%85%9B%FC%5B%E5.%8E%D0%11%C2%DD%D84%DE%968%04%A6U%A8%E1p~%CEhP%3Aw*RX%F4%5D9%7Bu%C8%8Be%5C%9C%3C%B7*%F9%C1%EF%E1%0F%C6%EA%11cl%8D%20%8C%97%C9FH%E7%ECr%1E%5B%B6enher%EB%05%3C%84-%05%B8vbbb%A3%FFe935y%0D_%B6%AA%3Bt0y%08w%E2%1Dm%C2%83p%3F%BB%ECo%98%3E%DEy%A1%91%97%B7%88*%EC%EE%17J%13%1Bb%CF%1C%AF%93%1B%E0%18%3D%C6%05%E5%ADH%10nn%EB3f%5B%26%B9%84%C9Q%8FuJ%08s%9DRJ%138%C9%B6.%D9%C7%C3u%A2%E4%A6%ADH%FBe%1C%2C%B9%80P%B9%81%F46g%07%92q.%93%178%E5%7F%DA%83qJ%5C%24%18%88%E2%89O%8A%5Eb%F5%91%ECY%91%EB%ABC%BC%9Er%9Fj%F2%EE%DD%A4%87%01%03%80%E4%FB8%B2%B2.%D3%09%E9%D0%00%C9%23%04%1E%82N%C2%8C%06%EF%03%BA%C6%DA%FF%DD%E3%D3pph%D6%AF%07%D2%C8%2C%D12%E1Q%F6%BA%0E%06*%87gU%0D%A4%E2%BA%DC%AE8%A0%97%81%F8%A0G%A6g%81U%3F%B9%EF%84%814C%0F%A7%DE%DD9%A6%C19%A9%95%F0%8C%06%EF!%D2(%1A%AF%F6%CE%BB5x%7FS%C7%19%11uQ%20u%1E%D3%D5%D1%AC%0Bb)%F2i%F1%D67%BF%97%FF'%5D%C5%B4I1%2CfC%F9%B9%80%10%E7%09%3EW%90Wr%01%D9%FD%85%81%B4%E5%02B%9C%9C%CC%96%88%D3%AC%D9%12%AB%25d%E9%95%C5%9B%03%08%5D%9B%03%08Z%94%03%08%94i%E8%3F%EAV%97%3B%07%90%0B%FAz%B7%DAd-%C8%01%84%DE%AA%AF%07%A2%0D%D2%96%833oi%0F%98%0F9%7F%D8%7C%06l%CBAlD%91%15%E6C%F2%1Asp%9Ft%FC%D5m%3A%03M%E5%F9L%87%D0%93%BD%BC%E9%10W%95%B4%18%A1%20Vf%A2%C6%87%F1%A5d%7CI%13%3BI%88%CC%3E%8DSQ%83J%1D%7B%E7%88q%88%E2%E8!t%3E%07%90%07%B3P%5DJ%10%C7%B2%1C%9C%F8%BC%00%D9%9E%15%E9%99M%D1*W.%FA%00%B1E%24%D34%B0%1F%E0%9F%7C%97%A9%D1%99.Z%B7%96%5EPD%CEF1%AA%EF%F3%F0%83%F6%CB%05%3C%D1%09q%E2KP%D5%12%B4l%F1%EB%E2%20%7F%25s%8C%EC5%D4%FE8%0CW%AE%D7%3B%FE%B0%94%8B%BF%CD%A0%B0%18%FF%01%F3%EE%95o%00%EC%04Fv%8DII%AC'%BA%92q%9C%EC5%08%B6%81z%80%8F%06%5Bu%0DAXN%FC%AD%87%CDd%AFn%B0%9E%10%1D%E9U%FA%869%F9%9D%AE%D3l%C1%1E%859G%1F%7C%24%1D%0D%BDZ%17%03hA%B8%C6%BE%FA%12%A0%17I%B7%BC%FFT%89%94%60%A1g-%C2%B6C%84%AC%0D%EE%B2x%60%A0L%F0%12%3C%877p%EC%9Ah2%90f%CD%BB%0AR%12%DEvW%A10%F94%B9%D3%EF%036%D4%D0%3E%AD%03%C2%0A%1C%E4%7B%E1%0E%B8%8CY4%BC!T%0F%2C%E3%DF%A7%90%99%25%AB%D0%B1%A5%D0%C2%11%F2in%C8%D2%1D%8Dyz%20%87Q%A1%B0%14%1Cne%CF%11%BF%BFC'%E4T%B4%9E(%15%25%7B%FE%FC%87%8Ep%F4%1F%D2%A9wye%9F%B6%95%D1%EA%A28%9D%0C%BB%9A%C5%9B%DD%CF%F1%86%20%A1Y5%10%EBm%1DF%20%CE%87T8%1D%80%DDu%BC%01%88*%85%C2%C6%CE%89*%E5%ED%7B%C7%7C%08%AA%7D%CB%7C%08%D8%B6%B3b%8C7%19%E2%9Ae%C5%18%FF%8A%B9%10(a%C5%18%DF%12%87%0C%9B%03%A3%23%AC%14%E3%E3%CD%0A%E5%C3%7B%FEe%A3%EE%B6%A7o%B5%14~%13%1FN%1AJ%9F%0C%FEX'%03%15%97G!%F1%8E%17K8%D8%F7%E1%22%AF%0Fbm%EB%96b%FC%3C.%B69%8F%E0J%01M%C8%DF!B%26b1%3E%BEIJ%FE%CC%0B3%3AG!.%E1%11)%C6%17%C67%CFpxW%E7%8A%3Dj%9A%5C%19IC%C4A%FF%BE%C4%B0%D3%E6!%F8%B6%D6%D4%E9%BE%BE%A4%BB%3D%0EA%FF%22%A4%25%C3%8A%7F%3C%A7%F3%A4%A4%40%9A%7C%A1%80%BC%13z%02%1CS%8B)%E5%F4%7CE%88u%91%CF%85%E9%3B%D3w%05%D0f~%5E%BF%DE%FA%8AB%A2%03u%CB%B0%07%8E%CA%3B%D9%1F%F9%9A%F8%3Ar%D9%AD%13b%0D%DC%A8.%BA%1C%EA%02%B2N.%F7%B0%17%C4q%08!%9D%8E(%A9%CF%15%87%B8f%3F%F8%BA%5B%DE%AB%16%9E%04h%80a%E3%10x%0F%9B%1F%FBK%7F%FBZT%0E4g%1C%22%EA%0DY'W%93%20%8C%EF%E6%81%F1%C6w%10R%AFT%40%F2%C2%7F%7F'%D3%E9%C2%3A%A5%D4%2B%F24R%1A%C4%B1%7F%E2%CB%7C%86%D3OY%A5%F1%81%12%24%982%F9W%F1%98%B0%26%C3%A9VC%3A%9C%2C%E4%F9%CA%F57%2F%89%FE%0EP%DD%CF%D2%9D%1E2%0A%99%13c%FCM%DBbs%FF%F2%1B%814%A7%BD%1Ar%EE%E4d%13c%FC%08%97%DC%CEo%0C%EE%80%F4%A9%83%DFh%C8%B9%93%13%E5%13%FFW_r%9B)%1B%CF%9C%05!%3E%C9%A3B%D2%9Ak%CA%E2%EE%1F%E5%9C8c%10%BB'6%7DqC6%3E%D3I%EF%9D%9E%10*M%C6%F8%98d%D2t%1C%3E%83%90%C2%86%F6%D4%13y%89%CFt2%0Ay4%19%E3cb~%92%E9%E45%08%F1%A8%C8%E3%91%9CL%87%D8s%01q%1AL%60P%051%AA%2F%0E%84%99%9F%8B%2C%B1%D1%5B%10uB%9D%9FH%90%A0%E2%02%9F%01%D9v.%3B*F%B9%AB%A91%3E%CB%F2%C3%E6m%D7%81I%8B%F1Y%D6J8%F0%157%D0%A3%A91%3E%CB%1A%85%D0%FD%5E%A0Fc%A3%3A%93%20%F3a%A4%2F%00%16%11%92g%5E%02%D7%13%D0%1F%E2%C1%1EH%8E%E3M%D0%EF%3F%5C%BCSlV%D6d%25%9B%12%9D%96%DFo%AFzs-%A0%A08%8E%C7%A6%F4%23%15%0BD%C7k%BE%C3%81%FD%01%5C%1Ec%EFF%1E%A4%3B%05%FF%10a%EFo%953%8C%DF%0A%06%9F%3F4%14%B6q%F2fi%C4%FC%A4%EBH%D9%1D%B8%F2L1%FCZ%11%22%E9%F8%16%C8%0F%C8%9B%A4%C7%05H%D3%03%60m%C6%3D%C8%99v0%5B%A6%E1%3C'o%13%AB%11%11%9F%B0%10%87%DF%F9%98%B2)%EA%5D%D4~%F0%DB%18%5B%9B%D8~y%F1E%1D%82%C0%C1Q%5E%05%A4%86G%15%B8y%84%AE0%B4r%F8%A2%3D%3F%AF%9Cz%91%F8%F8jB%0F%03%9C%C1%1D%CC%F9%A2%1A%B9o%FAI%E8%BE%91%E0.%BF%AA%89%8EZ%B1K%EE%C5%D8%9Ce%C2%C4%0ElI%D7gmHes%F3%14%9C%0Bb%9F%D1A%83%CE%AD%D8%92%8E%F2%7B%D4%F6%B3%87%AA%85%F1%FFx%F1v%16%7B%89%A2%E9%EBG%3C%EA%20%AE%C7%BA%F7%C2~%BC%BD%8B%C7%9A%8E.%D8%E2V%07%01t%1F%F6qbQ%8E)%BC%AD%A5R%E9%BB%23%92%0A%11%D6%7F%5DM%84%19%BFP%F8%AC%DA%F9S%87%10%C0%DA%DE%2F%9B%24%B4%1A%3D%CEB%B5%0B%CF%CFT%60M6%E1vR%CB%D4%BEu%FA%90%3A%C6%C5%12%FCs%EDU%F8%9BDR%97%E0%E5U1%06V8%B0%F5j%237%19L%D5bU%08%60%84n%8B%1Bgd%97%12%9Bq%EBB%8F%3A%084%95%B0%9Bq%1Fe%11%88%F3%E2%97%CA%04%FCZ%BE%AA%B4%A9%3AL%8A%95Je~%E0%E7%F5%DB%E1%FE%0F%95l%83%C1J%7D%EDy%00%00%00%19fcTl%00%00%00%0A%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%034%EC%9A%00%00%0A7fdAt%00%00%00%0Bx%9C%ED%9C%7Fl%14%C7%15%C7%9F%CF%EB%FB%B9%3BWJBi%A1%B6%95%D0%D4!%04%9B%E0%22%D2%108%FF%08%18J1%B4Ph%EB%D6GK%5BTQl%14%A8%92%06%85%0BN%E8%85%10%1FHP%A1%A8%09G%09%89%2B%91%18%08%10%A9%AD%F0%DA%1C%95)%17%9F%A1%FC%D1%FF%BC5%01%14)%8A%8Dm%82%81%C3%DB%5Dl%EC%BB%DB%9D%D9%99%DD%3D%AB%7F%F0%FD%8B%9B%F7f%3E%DE_%F3%DE%BC%9D%05%20S~M%0B%40%AFN%9B%25e%03%22g%AA%9F%C6%89M%16%FF%C4%07z%20%AD%D0%DF%A4%ECCr%3F%08f%1Fr%18%AE%8AY%87%FC%0C%7C%81%ACC%02%80%EE%8E%03%04%92%E3%00%11%86%B2%0E%99%0F%CE%FAl3%CEN%8A%FF%3A%DB%8C%D8%ED%1F%F4%1D%CD2%83%7F%F8%8B%89b%96%19%D0%15%F2%16%05%B2%0D%D9%07y%5B-%DF%C0%E8%DC%9BD%FB1%A9%E7%F4%A0U%08%F7%C2%2C%91d%CF%09%B5t%0EXCt%40%0CN%14%92%3C%5C%F9%9B%C0%1A%C4%F3T(%0C%9DSI.%C2%E4Jx%C4%12%C4%BDu%F6%3A%80%A5D%9F%C8%20%D4Z%82x%F3%AF%16%BC%CC%93%A7%D8%DCAh%16%AD%40%84A%A8%93%AF%93%9Fg%3E%09%DD%92n%E7w()eR%F9%D2O%0C%7C%92%20%E8%B6%0Bk%1B%E9%20%17B%EBf%18%F9%AC%C6%19%F8%B2%DDT%10%3E%D0pL2%F09%8E%EF%5D%1E%05%EFsF%FD%15%B5%E4-7%F0%D8%16%C4%18%C2%E1%ED%7D%1F%1EF%BF3%86%24%3A%E6%18x%CC%F9%8D%A4o%D8%5C!%CB%D7gB%5B%A7!%24'%DA%1A%24%3A%A0%5B%9F%3E%81%B3%F1'%E5%00%E4%8A%86%10~%DE%17%E4C%F1%25%85Y%18%93g%81%5C5G%DAn%7C%24%D0%3A%EF3%89dw%DD%5C%80%BB%01%23%8F%9D%06O1qV%1A%11%3FA%24%9A%D7%F6%2F%C1%FD%11%1FQ%0C%3F%A2%B6%7C%E5%9C%E0%0E%D9%5B%2C%87%B0%3D%2F%04%A9!%E8%97%1F%0A%A5_J%FAF%B7%5C%87%9Fu%F8%8A%CA%CA%DFR%5C%11U%DE%C1%83%C1%E3%B8%F3~%A0%40%24t%AD%ED%2B%1F%20%D9ST%B1%11%60OH%DF%96%2BK%84%9E%C2%F6%9Akw%A8%18%CE%89A%C5%7D%91rH%3A%87%8EH%0Bk%14%3F_%0A%DDT%90%BA%88%A4%CC%11MAp%88Z%23%AFW%0F%B8o%2B%96%E5%97%F9WhrX%E7%D4%E7%15%FF%2F%0B%DF%97%F4%8A%18%17%F0gC8%F4%AD%5D%E7_%95%9F%A6%60%40%AB%A8%B8u%D7%F4%FA%E7%FB%25%AD5%81%9F%CE%5D%FD%12W%F4%0F%91%86%01U%C2%CDF8%10O%E6%DC%F2%EBth%C5'%5D%BE%02%D1%19%A5B%00%9Ap%B2%EAMx%0Bns%93%F5%20hs%CA8%9Aj%CB%A0%CEq%E2*3jbU%94%BB%8E%0B%01%C4%DF%8E%8F%C5n%CE%A8%80%C3R%8AR%7DWr%09w%09%1C%9FV%F0pcZ%3BQ%AC%90wOq%1F%DC%E5%07%F9%94%E0q5a7%E4%E2b~%E6%EA%BCza%E6X%F3%5E%DB%8F%C4%99%0F%3B.%5E%12%E1%BD%B1%E6%A2%CC1%B4%17%5Eg0%D2%85W9%8B%D7*%AB%9EQo!ix%E1%D3%84%0C%EC%23%3A%BBV%84%9E%D1_%7C%D2%1D%A2%EB7%AC%5CJ%3FW%10%F5%8DAz%DDF%E9R%9A.R%FA%A1%D9%E5%CBF%7F%F8J%DC%01%16%C8%3EZG%3E%3E%F6%EF%83%CFpL%90%9F%B08%DF%E7M%85c%94%A7%0B%DD%0BDO%9A%80%B8%EB%A18D%ED%AA%E8%2B%26%20%B9%22%2F%8Bt%AE%BC%92%F0%B8%16%06L%40z%80%A7%AEi%BF%06%F0%07SU%9E%84%12.i%7Ds%A3B%907SSHHn%EA%82%1D%3F%D5s%14%D6%9B%80tu%14%D4%FB%DE%A0tnk%3F%0Aa%13%10%FF%B4A%E8%AE%0E%D19%F3O%04%0D%96%EA%98~%93D%08S%3F%8E%B1%D2%E7i%5DS%25%F4%02%9AO%0DA%2B%E2%C6NZyK%94%87%8C~b1%0Cp%BARfG%87H%0F%89%99%82(%E3w%01%17%CA%3A%E4%10%03%E4%3Dc%17%1D%B9za%9B%94K%0D1%F3%94(%D7%24%E9%91%03~%BA%CA%86i%88%20%CB%A5w%13%22%AD%FB%EB%A6%20pb%89%3By%E04%ADw%8D9%88z%C6%16%5C%17)%7D%CDL*%C3%90%3B%95%95%B4%90%C7i%1D5%10%86%10%B1ev4%FB%90%2B%DE%87(%97%F4%19r2%BC%F6v%89%D7%98R%C1Q9%18%BA%F1%F5%9E%A0)H%22%CA%E0%5C%12%11MA%CA%24%06%E7%A1%9B%A6%18.%A6%D7%0D%83%E6%DE%13F%E638%7B%E7%9A%DB%1CQ%BB%CC%D8gT%5CS%A1)%C8eB%5DE%A3%1Eg%C0%14%04%F63%3C%5E%EF%0A%8B%CDAXd%26%7Fd%16%B6xl%A3%F8%9B%D28P6%8B%E3%00y%A0%FF%13%F9u%0A5!%8C%2F%A7%E3%9BR%D8!%40t%DAH%A5(%96%F6%07%10%93%90%F1%B8%F0%A8%D0%C8%C3%0E%8D%0B%04%9Ff%C7%16%9AK(u%B4%15g%10f%C4%96%D8%05%D9%8538wC%7B%D6!%0E%80%7Ff%1D%C2%014%01%C4%3B%EC%80%04%08%90%EF%C3%95%D2%0A%EA%85-A%D8%F4%CF)y%EB%D13%00%BF%B7%CE8%23%071%16a%FD%8B%A0%D6%AE%BBE%AB%0C4%1D%A6%E3lNe%C6P%00l%95x%DD%81%EAa%15%D6V%03%EA%EB%2Bw%A1UH%8E%04%7F%C4%D9%B8O%C1%1Fe%5B%11%EA%2B%06%C27%B1%10O%D0%FF%AC%E2b%19%D2%16%BD%1C%C5B%D0B%7FbM%C3%90E%88%F0%0By%E0%DBXk%1E%5C%AEC%E1%9D%5E%E3%97%3BDm%BA%F1%97%1A%11ku%8B%D0%DCi%F9%EE%12n%88%11%C2l%EE%8B%DE%0B%AC%16!%7C%12%91%CA%EC(h%0B%A4%E0%3B%C4%F5%AE-%10%B8%24%CB%B7%09%E6%B2N%3B%20%D0u%E4%9C%88%B7%FEk%99-%90f%D8%F35%BC%F5%AF%A7l%81l%87%E9-%22%D6z%D6a%0B%A4%C1%5B%D8%83%1F%23%C6%25%EC%80D%1C%A2%03%3F%C6%89%E6.%3B%20%CD%DB%E3%1C%BE%22%F6%CA%14%BF%12%E3-C%12%B2%BC%A8%E8%E78k%B5%E4Wb%FC~%0A%88C%26d%02%8E%A9%F1%AFb%E3%2F%14%CF%EDQb%FC%26%0AH%D7'%84%CA%B5'%08%11%FC%AB%99%BBM%5Dj%8C%A7%81H%DE%20%DE%CA%D7%DE%C2%DA%DC%C31%9E%A3%808D%7C%FE%06%A8%F61bZ%C5%A9%10%8A%C4%CB%BD%1B%FE%835%5E6(%1Fr%D1a%90%91%84%99%E0%C2%1AW%18%0C%C0%3D%A9%DC%81%14%10%D8%01%9B%24%8C%897%AA%83r%915%0D%FD4%90%FFn%C0nU%13%FA%0C%F6%D9r%1D%E1%9D4%A7%0B%9A%DB%1E%C5%BE%9D%3EF%0A'0r%E1i%20%15%B3%3F7%BD%E3%9D%0A%12%DB%08P%B0%91%2F%97%B2%099%A0dUo%81wG(%9B%90%EE%B0%BA%FCp5bSQ%3B%20%DE%FC3Q%E5%A1%EF%FCS6!h2Z%25%C1%C7%90crENwwE%C2%0D%F3%F8gMG%B7%7B%90%F5%E1%94%D7%9Czs%F6%B6%87*%9F%3B%2B%01*%19%F9M%B5%F5%8A%04%B9%02%9A%AD%ED%BE%09F%5B%AF%C8e%24uoa%FA%E9%CA%EB%8461%DD%E9%C5%1E%A3%8BA%86%B8C%F1%8ET%08*~%A4%A9%E3%7B%19N%01SE%B5%14%C8%96%D2%8A%BD)%10%E7w%0F%CArf%FE%BC%D4*%E4%8ErYS%20%FF%96%CEj%9D%E6%99%DAs7%26%97%1A%E3S%F64%EF%87%CCs%A5h%88m%CF%9DF%5C(%3D%C6%FF%98%D7n%9C%12%AC.%5C%F3B%E91%BE%ED%E3%90%C6%C7%F2%07%86%EAC%9Cvw%ED%0Dj%7D%ACVx%DC%991%9E%0Fh%7C%A8%82%1A%11R%9D%11%E3u%20z%BB%AD%D9%20%8D%191%DE%A5M%CF%F5%B6%0F%B3AB%19%A7Cg%83%8A%FD%10%9D%11%3D%16%19%F7%20%8E%D4%E9%AF%D5%EA%88%99B%C3%90%B4I%23%06%ED%B6~%1A%89%B6)SD0%03%D2%EE%7Ba%9E%9D%90%3Cu%F3Go%E6%91%D4%D8W%2CV%D5%7C%BEP%0B%B9%B2U8%2C%D9%08Y%09w%B5%90%F6%F8%BE%9F%06%ECc%F8%A6%C0%12-d%17%F8N2%7C~c%A4%F7%E3%2F%855%10%F4%B8rYx%DB%18J~sH%85%C4%3BR!%DE%86%AA%F0%AF%EE%FF%B8V%19%B2%08%F1%84%20%B1%01%E0Fi%C5%81%94VGGSxt%05%FA%3A%B2%FAY%B4%F2%18%EE)%01%A4%C6%F8%94%D6%B4%07%BE%10%A2%AC%A3J%99%10T%10%05%B7rMz%C4%B1%D6%D7R%3C%94H%CCx%24he%C6%1EV~%EE%ABOI%12%A7%5E%F8%14Cj%DD%C1%13%60%DDv%E6%12%FF%5E%98%DE%D2%5E%7D%14%B6mQ!)%E15%F5%F3L%F7r%60%9Ca%9C%DA%B75%AB%00%CA%AFG%15%88%FE%8C%886m%F42n%0Bj%07M%B2%F34%C0%E2b%25%C6%B7%E9o%D08x%BD%AF%9A1%85%E0%A4%CB%19%3D%04e5%9B%8C%D4%ADi%18%BA%F4u%9D%0E%CE%81)%1B%18w%E5%FA%D6%CA%99%23%F1C%CA%C19%1E%1D%DC%A9%1C%8B%F6%DC%A3%B2%E3G%02%8C%8C%89%0Bn%C5%CF%95%A7%A5%AC%7C%2Fx%96%F3%C3%DF%13%FDY%DB%23%D9%AA%93%B8%90%84~tbF%7B8%FC%86%98%06%B9%0D%8E%85%95QL%97%9C%E0%5E%9E-%3D%FD(%3EI%D2%B6%D6%AD.%18(%C7%7D3%E0%ED%5C%CD%06%F1%E4%EB~%2F%C6%C9KQ%1D%FE%99%5E%C4%F8_S%08%B8%0AK%CB%14%7C%A7%95%40%F3%D5%E8%98%94%F5%85n%91%D0I%AAB%AD%90%AA%98%20-%2F%A1%B9%3A%CD%A8v%23%A1S%F5%FC%BDL%90%1Fv%9E%09%EA4s%FD%F8%E2%A5%F2%C4Wy%99%20%B1~%DDE%9DC%96%09%89%9C%03%FB%12TW%A8%60%81%A8%DB%1Eo%D2m%1F%96%8Fe%CF%A0Z2UWm%CC%AA%95X%BC%9D%CB%0D%3F~%D7SK%89%B1%CF%98P%19%DB%1D%3F%A2%3A%B6i%C5%115%C1%10d%A6%CD%C5%A7%BEa%82%01y%D3B%D4%BE%9FU%16%17%89f%20%CD%84%0Fd3%D5%10%3Eb%06%01%C2D%C2%1B%B7L%99%FB%F6%40%097%03%B3%24%9CMS%C0%E9%D3q%AA%C6l%B1%A2%94v%40%D3%FFq%DB%E7q%91%C6%CD%1A%04%AF%FF%01%D5%B3%93%8A%C0%85b%9C%00%00%00%19fcTl%00%00%00%0C%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02q%C5%B6%1A%00%00%09%E7fdAt%00%00%00%0Dx%9C%ED%9C%7Dp%14g%1D%C7%7F%09%7B%97%BB%BDg%F7(P%0A%92r%87Ti5%85T%228%25%90%0B9%C2%8B%91%0B%82%8AH%CB)%B5vF%A7%094Ef%7C%C9%A6I%3A%5BL%09%20%FA%8F%CCd%A1%C5Qg4%99%3A%3A8%83%C3%E6%A5j%86%2Bw%D2%81%EA%1F%CAB%A0%14eJ%5E%20%40%DE%D6%BD%23o%DE%EE%3E%CF%DE%ED%3E%FF%F1%9D!%EC%3E%BF%DF%3E%9F%BD%7Dn%9F%DF%F3%FC%F6%D9%03H%97_W%02%D0kPfK4%20j%BA%06%AC8e%26%9B%A7%F8P%0Fe%A8_%2B%F4%19%AE%C5%AB%E9Cj%94%13%D4%19h!%DCj%A3%0Dq%0B%E0%17hCr%12p%86%3AD%EBk%ABd%FA%10v%906%03r%5E%DA%B5%86%3A%C4%D7%B7A%A1%0Eq%A9%B2%ED%3A%D0%D7%08%0E%AD%25!%DB%90%AE%96(%DE%E1%89%B2%11%BB%0C%3E%3Fo%18%EB%80%86%D6%DF%25W%13K%E0%ACl5%FC%0C%7B8%3B%9A%7F%9B%C8x%A7v3%CE%CC%080%03%7B%BC%A7w%24Lbpk%7C%F7%B1%90j8O%82%EC%C5%99%B7%85%C3%1B~%DE%06%DBpux%E7w%3FJ%82%9C%C1%98%AF%865%95%C8%F0%22%AE%8E%8F%02%FD%12%16%E2%EE%1D%CE%C1%3Ah%B7%EB%3C%E9%3A%EE%DB%E3%9B%AB%3E%8F%AF!%B7%F0%9E%9B%00%D9%F3%7Cm%FF!%8C%BD%B5ix%B6%82%AD!%5Ey%8F%C0%B8%B6J%C0%DA%D1%10%3B%F3%FD%7C%AC%CB-a%03%9E%C1%2F%FF%8F%8Cu%98%11%F2%84%F8H5%CE%C5%A7%AC%C7C%DCk%3CxH%5Cv%87%80%7BQ%C1%3A%D5%E0!%DF%94%7DQ%ACC%030!%7C%15%DA%E5x%06k%F6%0E%01%7C%01%EB%B1%11%18%FCYh%E2%F0%0D%EF%2F%8EA%FB%CB8%8F%02%60%04%12%04%F5c%CD%1D%DA%CD%18y%06%D3%3Fr%020%07c%0A%1E%E2U%25%9CY%E4bGg%FF%0B%DB%09%03%A3%AA%95x%08%B3%18%E7%F0%CF%80%AA%CE%95%F15%00%BF%F7%2C%09R%8E%99l%EEU%D5%DB%3F%24%204%A1Y%841h%EE%1B%18%C8%E1%3E%85%8C%D0t)J%B0%9F%C6%40%F8y%96%18%D0%12%C2%DB%5Bob%20y%85%D6%20%CB%04%BC%BD%8C%C3%40%E2%B2%25%06%22%8CA%D1%7D0%1F%AD%F0%16%C6%18I%F5%10%12%15%AEQ%0C%C4%15%B2%06%A9%0A%E2%ED%ED!d%0E9%A2Xbx%07%87%B0v%14%90%D1%E0%9B%C66%97Z%60%89%01n%B5D%C0%D9%3D%EALxaQjS%97m%E9%1F%D4%F7%26f%99%19%93%B1%1B%EA%22%25p%FC%DB%F5ef-l%94%B6%D2%22%E2%B2f%13%7F%EC%81%99A%E2%C5%C6%E5NBNF%DA%A8C%7Ck%3EX%18O%2B%D35%A6Q%C8%CC%A4%E1g%24%E03%CD%B43w%5D%00%AF%8A%E0%0A%A8%D8%E1%92%7DH%D7%06%F0%EEZH%91%01%ED%1A%E4%A9%E4%EDN%13%92%D3%06%BF%1F%FD%5E%AB%C5n%23Ky%16%F2%25Qu%40%A1%0A%81%B5e%C57UuI%02hr%BC%0DA%A4%FEy%CF%3D4%9B%22%04%3C%23H%95P%A4%14%3B%02%CDX%C9Y%06%F7%DE%E4%AE%16%11%03%02%B0M%8E2%E0%C4%0B2%EC%9D%9A%C42AP%05g%09%9A%1A%7CCl%A5K%99%D8u%8DADr%1CR%07%9DoK%DCdj%8B%1D%86-%0A%C6%3D%1B%89b%95X%AF%B6%C1%8A%89%02~N7%3E%E9%92%85%3EY%AA%F6%AD%DF%25%C3%2B%CADI%7B%9F%E00%03%15A%AE%94%ECL%B6%2Cp%B8%E6I%B1M%97c%2F%BB%0B%C1%5D%C9%8E%1E%7F%8E%12%E4%CC%B7n%C3%3BgG%81%AFU%0Fq%BB%BEA%07%B2%D6%A7J%AE%E0%F8%40%11%95%D0%E9%7B%0F%5C%F9%C1%8A%7F%E7%EF%A4R%F7%94%EA%94%1B%25%23%F8%C9%A5mq%16%E7K%E6%F2%AE%93I.n%DB%A1%BC%FD%AF%F8q%BB%A6%CB%82%5D%C8%B7%A1%93%E4rX%B1%0By%0A%18%C2%24%9A%7F%D2.%E3%E4%20%5CQ%F0.h%CC%26%E3%84%FA)%11%9F)%82d%1E%C7%96.%A8%F9%3DspI%C8%94%08i3%82P%60K%1BO%FC%20p%C1%16%A4%FD%EEQm%12MH%CA%DA%14%17%906i_%9E%ADT%3B%8C%9E%BB%A9%89%BE%87%EA%90%B69%0A%A98%FD%AEL%11R%A6%E0%9F%068%A2%8F%B5n)%0A%A8T%A0%CCA%8B%CB%23%FB%B1OP%9C%10%5B%13%9E3%8B6%04%92%F9%13%E2%3Do_%F1%3F%3EN%9D%E1Y%C0%CF%A5%8C%60%1Bg'%A0%96.%C3%B7l%40%B2%9C%8F%CCV%F1%3B%C9%FA%E3ET!%17%D4d%A3_'%3C%CD%C9N~%83D%8D%60%E2%CBd%96%D1%9B%061(%CB%2C%A9f%5E%FE%10%92%25%C4%B4%E1%B9%7Dr%9Ao%D6%0Do%AE%8E%EE%AFg%7F%B0U%15%C3e%85%3A%A4%10%FC2uH%25%DC%A2%3C%A5%D2%14%02q%09u%C8%EB%DDK%DF%A7%BE%BC%0D%95%CA%B0G%8A%9D%A3K%D9%BD%5Dl%E8%2F*%A3%1B%F6%CB%F7%8BM%AB%00%F6Q%85%F4n%06O%25%C0%15%99%22%83%EB%EDTr5%80G%A0%08AAv%B3%9F6%C4%13%82%8B%CDRj%E5!%3DqZ%CC%F7k7J%9C%26%04%5E%87%9A%DA%F8%F6%FA%01%99%26d%C6%EC%0A%95%17%0F0N%40L%EB%F05%B6%95h%FF9%02Y%A0%7D%91%D6)F%16%24D%9C%82%BC%06%F0%D6)%C3%BE%C3%2B-s%0Ar%09%F8B%8F%E1s%7F%97%1C%00%0B%C3%04%2B%F2%CB%5E%09%89%DA%C6o%D3-%B9)%80%23%10%CF%1Aw%5B%F2!%DB%F5%D1tK%D7%03%88%13%8F%0E%F9rw%B5V_W%9F.%D9%F5%7D%E7%3E%09%5C%DD8%06%3B%D0bIg%88%0C%3B%07%81%23%03%8D%CF%D5%C8%06%86s%0EB%F8_%95%19%3C%FA%07%A45%86%EC%18%24921%16%23%C7%CE%D1%87%FC%A1%A8%AC%C5%C2%F1%FC%B6%1F%D9%80h%7D%8E%95%091Z%DDM%5EQo%0A%D1b%FC-%D9%02D%00%F2%F2%ED%A0%19D%00K%0B%F25%C8O%88N%DA%B4G1*w%25!%16%06%5E%1AD%B4%00a%EF%18%95'%07%11V%C6%F6%A8%12%0E%10%9Df%C2%E1%B7%0D!Ok1%9E%CC%004%88%C8%E9%CB%0Ao%FE%2F%0D!%91%ED%F5%96z%C7%06v%808%CF%D8%D4q%EEiC%C8A%F1%80%A5%9Bq_%5E%5D%94%E4%F3%EAc%8D%15%8A%11D%B0%D8%AD%CC%FB*%1B%24%F9%1C%17%9B%D7~)%5BH%DEA%40%7D%02%22%E6%2Fo%C0%C9%EEg%B3%850%B3%DA%B87%C1%BB%5B!%F8%F1G%03%FDF%FD%825H%C1%7C%ED%AF%FB7%84%B5%98%7C%5D%60%83a%DF%83B%16%20%ECh%8F%94%5C%EFS%8Cw%EB(h6%FE%02Z%82%C0%A7%F9%15Z%E4%83%0E%BCW%F3%B9Y%92%0DH%EB%E9%CE(_%40%1A%A0%9D%0F%F9%BE%98%3D%84%AFU%D5%BE.%01Pt%BC%C0d%E9%95%D99X%82tn%25-%BD%C2Wa%09R%E0%17%81Up%1E%24%089%C6%7B*%B3J%AAM%83%7C%9E%1C%E3%2F%CBv!%C3%E4%18_%A3%AB%C3%A4%E1%CD%E4%09%12c%BCo%24%3D%A3G8)%9D%98%DE%07IA%8C%CB%E5h%A6%95%A6%CB%95%84%E0c%7C%C4vR%CC%DBK%9Ai%DD%B0%B8%DA%18%23~%94%F0%20%02El%BE%9B%E5I%B6%22i%1E%DFe3SuQ%FB7%E6%D0%3C%DEL%D7%9F%94R%A3%3E%AA%90R1D%1D%C2%0E%AC%1C%A3%0E%B9%00%C7G%A8C~%01%F1%FB%D4!Q%C8y%F0Ir)%E6%B9C%C0%14%A6%20%86%FD4r%06%B2%19%98%C4%CD%84%19%24Wq%04%B2%1F%AEA%CB%981%E4F%B8Tr%04r%FEt%05l%196%84%A0E%C7%DE38%22%0B%A1%E5%87%E0%B1y%BDF1%3E%D7%89%B5%AE%1F%85%92%7F%8F%01w%7F%FD%1D%A3%18%FFw%E0m%7D%E38%B1%09%D0%13rr%B3B%8B%AC%AF%18%C6%F8.%E8%98%995%A1%23%BC%E4%A7%A7%EB%C2eRjo%04%5Cc%CD%BDF1%BE%91%2B%26%0C%AE1%EA9%BB%F7%1E%C4%BE2%5E%E9%10%5C%9A%99%84%E8%E7%F1%A7%18%A1br%E7%1F%A2%EE%24%B0%3A1'%BCN%EBF%C6%F7%EE%C2%F2%A5)%88.%2Cum%82I%88o~%F7%FCL%18%EE%C1M%E09vvb%F9%ECn%EF%C8%5B%BB%24%80%1C%DD%99%E6V%C3%E4%E5%D2%AC%F87u%D3%D4%12%FD%10%E0%DD%F0%EF%C6w%E3j5zdu%EA%1D%804%5D%92%A7%9E%DCvj%1FU%B1%CE%E0%E7%023%DD%9D%8B%01%B4Wm%AF%D7%AFJ%D4%C6%D7%C1%F1%CDS%DFI.R%B6.v%A1%EF%CB%E9%97%1F%E5%8B%5BuoJ%A0B%C8%1D%9F%F5%FB6%D6%2B%3E%E2%C2%C6i%F2%3C%BB%D3%A5%BB%C7Z%7F%FCY%DD%3B%B2%1D%09%B8%FA%A7%07%9B%3D%81Y%EA%A3r%06%10vk%DB5%7D%E1%23%C1%FF%7B%C5%CA%1B%DE1-%7F%EC%09%ECpe%82HJ%DC%A1%2F%BBX%C9L%BB%5E%1F%AC%8C%B5%DC%9E%AC%96%2F%A9%02W%A6%BF%81%E15%1C%E2sS%D7%EB%C3%BB%C5%E0%9D%A3L%EC%CE(%F6'%BC%A1%0C!%CCk%B2Q%F1%91%C9%AD%FA%C4K%00%E5%93I%A7%3A%D9%25p%83%8A%D11%18%88%F1%CF'L%85%DA%8F%A1g%E7_%F2'2c%FC%7C%E0%3E%01%7F%2B%FAn%2C%13%08%BF%92xV%7C%C3zy%E2W%05%7CA%ED%5E%94%015%86%0D%CF%CDD%17-E%89%FFN%B4%11%5B%14%5Eg%F2F%9E%B9%D0R%2B%5E%DC%B2%C9%3B%B6'%0A%26%E9%12s%E5%60%7F%18aB%ECT%8A%8F%2F%86%BCLg%0E%E8s%B2%05%2F%DF%B4%1BC%04%97%94!%24%E3%11%1BZ%85%1C%7F_C%A7%E6%A6*%BAKf5u%E6%9F%A1%BD%8C%1F%3C%03%09%FAk3%17%1D%82E%B4%AF%16%F3%B8%06%A2%F5v%C8%84%F2%EE%C9f%26K%CB%A6%22%26K%AC%2CJ_a%F6%3F%DC%86%14Kn%F6%20%A6%FA%1Fc%CAy%EBp%20Wn%00%00%00%19fcTl%00%00%00%0E%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02_%95%7F%9A%00%00%09%C3fdAt%00%00%00%0Fx%9C%ED%9C%7Fp%14%E5%19%C7%9F%E46%B9%CBfw%2FB%D4%A0%81%DC%20%12u%A2%80%0D%15%DB(Grc%22Pr%D5%B4%8D%9DTO%E9%20T%2C%88%80Lma%01%81%83A%2F%F2c%FAcl%B3%A0V%FFp%9A%03%87%D6N3%C3%9B%842%09%04.%22%C5a%C6iVB%D0q%18%F3%13BB%F0%BAw%094%3Fv%F7y%F7%EE%DE%FC%95%EFL2%B7%FB%3E%EF%FB%D9%BDw%F7%7D%DE%F7%D9g%0F%60%B4%9Cc%F6%00t%E8%EC%8BK%2C%20%E1%D1%EA%A61%B2%A68%0FqB%13%D2%95%D04%0E%90C%AF%FA%983%C4%3C!%9F9%24U%81%0B%845%24I%05Nf%0D%D1%C6%C1%0B%CA8%406%AB%AC!%B6%CA%C6%EB%AC%19%20%84%BB%14%E6%108%B8%C2%1Bg%0B%F6%E2f%C4B%C8%DB%FD%20EC%A2%C9%B8%F0%8F%E3w%23%B59o%C5%06%9C!%BD%E0)0%2C%DC%0D%87%90S9%A0%96%7C%AA%A2%90%14%1Fl1%2C%F4BJ%A5im%E9%01X%C8%C9(%A4E%853%C4%A8p%258%CC%5Bp%B8!%9B%9F%86BB%1A%C7%10%B2%13%83p%B9%CD%03%F0%04%82%F8%E6%B5UD%9AkT*%3DUS%174%AD%2F%AC%E9%EE%23!%F3~K%CF%E9%CE%EFY%F0%B8Q%B1%AD3%E7*r%94p%BE%DB%B3M6%B5%A8~%13%0A%9E%DF%A9%1A%15o%BE%86!4%0D%808%DB%D4%E0NHw%B5%FE%02x%FD%FBI%BC%D2C%05%01%F3%AFk%00%EC%5EiU8%EC%D2-M%C9%D2%9Bk%8E%96%F1%5D6%A4%B2fN%06%C1%EF%D7%3F%94%967J)%20%8B1%83%DAl%0Db%A8%EA%B3%ABT%1C%B2%103%10%7Fn%06y%81%0B%10%94!mWP%1B%BB%0F%F6%19%B5%E4q%3Cm%3E%A8D%F5%FE%0FP%13!%03%16%0C%18%94%15%0By%DF%C7!%A9%3F%C6%DC%01%C0%FDP2%DD%A0%A8D%BA~%06o%40%CA%F1%A16%B5%A7oT%11%FD%A2b1%E7%D7h%7D%80%C0w%A8%09%7F%5Be%BB%A2_%F4K%08u%1B%F0%87k%0F%DE)%B0'%98%EA%D3%2F%F9%04%F8I%A8%03o%3A%99%B5%D7%DCB*%26%20L%E3%5D%86%06%B5n%84%E1%88%AC%18%CD%3B.%AD%A7'%08OJ%C63%A7j%0C%12~)g%83%1F9%8E%8E%FA%AB%A4%04f%19%0D%E8b%8E%82%40%02%FF%C9F%2C%80%EF%80%BD%E1%3E(%DCiP%9E%8A%0E%C3%97J%B1%C3%00%A1%1F%E0%8B%D3%C6%E5!%A3%FB%F4%96%CE%F7c%16%00%2F%99%17o%F2%E9%EF'%B7%3EQ%DC%89%98rd%DD%DD%9F_Qo~%0C%D3%DC%AE%A6%12%C2%F7%A9z%BB%A7TU%F8%FD%A7%A2%9F%DF%EE%7C%2B%5E%CA%81%B0Og%AF%C3g%0F%CF%98%1F%8E%F2%C5%B5%AB%A3%FB%C6D%5B%F4%A6%07F%91%19%BD%CB%2B9X7%C0a%01%1C%2B%A1(%3D%DB%10%993%D0%BE%DA%A0B%A2%20%01xo%00%F5%99%F1B%3C%10r%CFB%18qC%0A%FD%B7%9D%1C%DD%0B%09%EF%F8%BAp%BF%BD%8By%E4.%E9%AA%CD5g%99%87A%CB%C3%C4%3D%B7%E9%C3%AE.t.%1E'd%FB%15%5BI%23%3Ax%C6'%FBl%C2%C9%17%EEQU%96%10%C7%0D%E0*_%A9%7D%9A%E9%B9%F0%7D%90%DCtM%C8%A1%98_%C6.%E9v%A8%E7%A6%01%CD%9C%3F%0EU%D7dW)%D0%C0%16%C2%E7%FCm%12%5BBT%A9%14%BE%3Dn%B5%F4%8E%03%A4a%962%0E%94%CB%F8%A2bB%13%9A%D0%84%10%7D%BDs%1C%86%92%E5%7F%7D%8C%3D%C4%05%3B%983%04%2F%1Cf%0A%90%F6y%3C%85r%24R%CDP%17%BB%96o%99%EF%86v%EB5%8F%D1_%2C%DA%9A'%A9fY%D3%3C%EB%10%E1Qj%D3%7Cm%A5B%C4%22%C5%3A%04%DA%D0p%EBM%95f%A9%1C%81%A31%DD'%076R%1A%D6%9D%CB%D6%20%C9%EEX%20%D2%E6JH%CF%FF)~%80%9CRn'%C0%DF%88%05%02%E2R%92%A2%A6%60%0F%AE%B4)c%EE%03%0E%19%A4%FBc%82%80%B8n%03%C0Z%CCJz%B7%9B%F0%3E%0AC%1D%C0%09%FF%0E%8FG%5B%95%9D%C5%2C%AB%BA3%40p%01%D4Z%87%B4%F4x%FC%BB%9B.%95o%C1%BE%AEK%FDv%1F%08%DFi3%60%EB%90Z%15%C4%FD%C5%CA%BFk%B0%8E%AF%F2~I%00b%7B%C6%FB%D5%5Dp%F4Z%7D%86%F4g%CC%D0%EE%5D%AF%FD%A7y%2C%A4%A3s%99%9D%CB%BFG%C0%F1%5B%CC0-%F2%94%EF%C9%D8%20p%99T%BD%E8y%86%B4%E5!v%D1p%CD%7Fc%84%88%87%0B%40%DA%D3%F9%0C%96%16R%1Cc%FB%11%09%83%09R%0D%9E%DF!%86%99%A7%2C%B7%ED%D4%09%D4%C8%06%B6%9C%8E%ADQ%60g%24Dg%DF%60(J*%AB%A0%B05%DBO%01q%B8%8F%9F%C6m%E3%84%D8%09%DFJXC4%9F%C1%25%0Ab%D8%F1%BCW%AD%1E9%C6%C4%DC%F1%C6%92%F2'%DF%15%7BmZq%25%25%1F5%19%A73%24F!R%5B%E2%0F0%86%2C%04!%1B%EF%D48%D5%01%D2%7C%95%3D%C4%11%C8c%0D%99%0A%B5%ED%5B%8E%9A%3C%80J%84%B6C%81%F3b~%11%D3%E0%22%D8%5E%ACt%FE%10%60%3DS%88%D6%BC3%03X%E7%EA%B5%92%E4%20%60y7%F1JpEFH%C6%10%E8%E0%14m%12%C7%18%92%C1%3D%A8%8D.l!%82%CC%05%CA%B7%F6%B2%85%B4%AAI%DF%FAw%A5*L!%EFG%87%C7Q%EE1%C1J%CF%1B%07%88%E3%DE%B7%C6%E1L%06%9F%B4%B1%85%00%8C%C3%D75%01%89%05%C2%DA%01'%1E%22%AAz%90%A6%D3%09%85%24%13%1DH%5B~Q%15Me%CF%E8%B5%8C%AE%048%A8%EA%404%1F%BFI%BB'u%F8%23%24f%1F%C6LR%9AAj%5C%F2%23%9D%12%A7%17%A0%1D%AB%1E9D7%92%C9%19m%A6%FE%BD.%97%1ED%038e%0A%88%0B%5EGLR%7CP%20U%E9%A5lD!%14%13%2F%E1%06%1CGL%C4%01%DE%07N%BD%A0%8AS%19%04%A1%EA%85c%98%C9V%BB%0C%87%F4%0A%9C%8F%01%5D%FC%B7%AB%7C%26fb%DB%26knP%0F%12*%DFJ%95X%D1%11%E8T%11%13if%D6%0E%DD%243%A7%E4%DFEu3%CE%16%9ER0%9B%BA%C2.%A2%0B%01%8AaE%D0%FE%96%AC%FF%1AM%11%17f%B9u%F7SA%9C%DA%1DV%B8%DAA%F1(%5B%3F%E7%88%0E2'%A8%9D%8D%BD%0Ce%08r%9A%5E%EC%99%0A%C2-%BAC%FBo%C3%E7g%82%7C%E6%F9%87%C7ZQA%F8%81%CF%9E%8DDa%97%E0%90%DF%B7%7F46fM%E7OfHKU%F8%15%1CS1%88wqu%E5%D8%D4%13%3AH%B5g%C1C%92%0B%1C%3E%0C%E2%EE%98%2B%C7%0A%09%F4x%8A%8E%13%90%A6%0Em%1B%A5%5EI%19%FD%BB*b%84%EC%5B%8A%A5%5E%DDl%22%AF'-olB1%15%E4%11%EAx%D7%F6%5C%A1ol%86%1A%8D%8F%17%5D%D4%90%B6%EB%D0U%40F%14%B5i%A7~%04%F7%F1%8EJ%2B%91%BBM3F%A66%17%11%E0%EE%D6v%23-%D8%C8h%88Q%C7G%D4%A2%8C0%15%F3%B2%81%A3%F0%F1u%A3%23z%A6%D6%81%91%BE%D1%E1%CD%8FNQ1%1Fo)%E2-M%1A%05%91%2F%90(%C4%DC%C7%8B%96%9Em%F1%B7w%8Fx%1D%A7~%A3%5D%89%AC%E3%11%1F%2FdX%81D%9E%3B%0C%DB%10%17%1FnP%A2%EBx%F3JB%3C%2FU%A7%06%F9%19%24%B2%8EG%7C%FCAw%1C%10%ED%BA%EC%04%EE4%E6%E3%C57%E3%60D%20W%A3WWr%5C%D1esq%CD%E9S%A3%10%96%2B-%E1%F5%CD%F5%3E%D6%10%98S%B1%A5%3C%25%C8%16%22%E5%C1%94C%91%80%1AKH%9A%2F%FDF%A8%811%C4.%DB%BD%CC!%C92%A7%84%D6%B2%84%88%05%DA%90%95%04-%9Dr%C4_0%82%D4%3E%0B%CEw%EA6%DA6%C8%EC%82%05%7C%96%B6%C6%0B%87s%B5%E1%3E%C1%EB%F8!%A5%97%AD%84%B7%23c~%D3%A9%10q%AC%A3%5C%C7%5B%94%ED%9DU%EB%86%DE%18%E4%DC%8E%EB%B8%8F%8FE%C7%E0_%7DC%1F%C5~%3B%E5%3A%DE%AA%1A%00nen%BDrQ%A6%5B%C7%5B%D5%B9%C8%802%A4%2F%D7%C9t%EBxk%92%D6%96%D6%7C%EC%BE%B9%95%D6%AB%00%24%91DCZk%E6%05z%D5%5B%9B%D3%B3%01%8F%02XV%7DhD%8E%C4%C7%9A%8F%C7_%7C%B6%AA%B6Q%EF%C4%8A%BD%BB%12%CE%00a%F2%7D%EA%FEa%DB%0Ew%E2%19%90*%9F%9F%5C4l%3B%92%08%93pi%97%D2%DC%23%C3%B6%DF%60%C0%D0%86%5C%BB%3C%EC%0D%3D%09%7D%AD%EF%96%3E%FC%8B%05%C8%D1%AB%C3%5E%2COs%D3V%3C%FB%9B%AD%D4%10%7B%FE%9D%9C%EF%FF%9B%12%5Db%DD%17%8D%FE%02%90%5E%A6%A6%FC)Xk%F9%B7%20%0E%86%F3%3D%DA%CAy%1F%7D%0D%E9Q%97E%86-%8B%80%D0%ADJ%DB%E8%AB%A4eZ%5C%0B%08%99eA%E0%97e.%A0%BFH%40%FC%E3Jk%90%B3%1D%E2OT%D1u%B2G%B5R%0B%0B%BE%8E%14%9F%1B%84%D4J%98%07%F5S%ACP%92%E9.%A9%C1%F7%BF%85%7B%9B%E1%AB%E9%04%AA%09%FC%FD%8A%7F%115%24-%C7%E4%A7%1C%A4%9B%E9_%8E%0Fd%ED%FF%F9%87%15%E0%EF%20%DA%B5%AF%B9%D3o%CA%F4B%F11h%CDkC%0D%7D%CE%3F%A4u%E0L%02%D2%1A%12%D9nLL%FB%11%09%8F%C3g%97%A3.%E7%89%A2%C9%04Z%23K%0Bw%E2%9A%1F%D4%FE%20%A4%AF8%E1%D3%FA%7Ba%F3%1F%16E%BD%E6%A7%8F%246%2F%5Dz%F7%08%01%FB%CF%88%02P%A7B%DBs%25%1FH%DAW%F6%89%92H%06%3F%FF%E54%1F%EC%FDv%FE%8A%A6%13%DA%FC%2F%7D%F7%AB%5Bu%93%8C%A9%D2%A6J%0DR%AC(5%B6%C1%18~%B8%ED%9F%96%FB%80%C1%AF%C3%FD%0F%BA%CCn%86%20%12%A6%14%00%00%00%19fcTl%00%00%00%10%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%3D%D0I%5B%00%00%09%92fdAt%00%00%00%11x%9C%ED%9Cml%14%C7%19%C7%1F%DBk%DF%FA%3C%B7G%12J%A1q%8C%8B%5CJh%08%A6qy)5%BE%D8n%E2%26%10(%B4*%8D%D2r%A9S%02%91%8D%5DAS%A9%85zi%EC%E8HL%0C%09Q%F8%105g%E2H%E9%07%DE%83%C4%87H%EC%81%A1%94%5C%7D%84%B4%A1j*y%C1%18%DAH%15%B1%8D%DF%C0t%3B%7BN%EB%BB%DDY%E6%B9%97%B9%AA%92%FF%92-%EF%B3%CF%CCo%BD3%BB3%F3%CC%CC%02X%E5%B5Y%00%3Ec%D8R%92%08%88a%D5%00%C6)1%A5x%89%93%9A%D4%FFR%E4e%F1%0C%CF%B7%9B_%11%0E%91T%F2%BAp%C8I%80N%E1%10JxG8%84%FE'%1B%85C%AEk%CA2%E1%10y%C6%E9C%A9%E5%B0%B7%95%EF%D3q35Fhk%B3%CEu%CA%1A%C3dE%02%3B%1C%B2%9A%0BW%FD%DC%E4%FBn%60%20%BB%8F%3F%EBPt%B4Q~%80%9B%7CZ%13%82A%C6%40%BB%9F%7D%AA%14%609%2F%B9%FB%7B%BF%D1%10%90b%80_%40%98u%AA%0E%94%FBx%C9s_%EB%08%22%20%3EP%1E%F70olg%B0%B3%91%97%DC%1B9%AB%F2!%CA7%C2G%FD%DB%99%F5%F0%9D%01%87%FB%18%A3%88%F7%03%04%04%FEa%7C%F5%D5%C1%F3%8C%13%05%83%A3%3A7%F5%D1%EE0%06B%3B%5DC%1A%CB~%E9'%B7%F8%89%9B%23%1A%06B*%C3%3A%F3D%DB%89%1A%14%84%9D%DA%02%A9v%F0%9A%F56%02%D2%11%D1%10%0C%20%8F%06%D9%F6%A1%E6G%F8%A9%3F%F1%A2%20%EE%E5%B4%12%97%3Dn%87%8C%AC%ADF%24%97P%2Fa%D97%17r%FC%1Dv%C8%CD%9Ag0%C9%FD8H%FB%F9Z%D8c%B3%2Bc5%DB%11%C9%F3%FF%85%81%B8%7C%D2%C2%22%B0%DF%19%F7%ED%EA%08%229%19%C5%40%24%9F%D2T%B5%D5%EE*%7F%D6%F01%06%C2%1A%EF0%20%40%60%BB%FDm%EF)%3DQ%8AH%AE%18%AC%B7%85U%B2%8F%FE%CA%F63%CE%14%0C%23%92%83%B1%0Bs)f%1D%CCc%16%9F%C1%AE%9ED%8B%3D%9A%E9%C7%5C%8A)%F7T%CDnTJ%D8%CDI%E8%EEX%E7%95%C5X%08TM%B1%DBr%8B%BE%CF%F4%ED%24%F3%26%0E%8E%0C%E1%87%CE%E5%0C%DBA%F5gL%DF%10%F4%B4%19%F5%E3%7F_%EDSQ%DD%15S%1E%D6%E5%AC%FBt%88%E9%9C%7D%DE%BB%89%7CW%8F%FE%5D%F1%0A%A0!%B4%1E%DB5%18awc%E4%5D%17%00r%A2%95%CAE%2B%E0%1C%2C%24%12%B4%DB%C8%F0%5D%1A%D3%D9c%D0%AC%AF%AB%D1t%AB%00%D6%60!%5E%BF%DD%D6k%14%B2%9D%E5%E1%16%80%86%E8%05%AC%D6i%D1a!%11F%07%AB%CD%08%B2%9D%B3%DAv%D7%9D%194!%C4%7C%5COt!!.F%9F%C85%B0%C2%E1%8A%5C%85%15%FD%FB%17%D4t%81%AB%9F%A2%0E%0E%DBc3%23%8CdN%91%19v%3F7%A27%F0%028%89%84%A2X%BE%F4v%05%B9mn%EA%10%D7%83l%7BZ!%B00%13%90H%83%C5%20%A0%E0A%EE%CF%40%E4%CE%3D2%DF%18%14%92s%8C%B2%7D%E4%CB%AAhHd%E7%CAz%D1%0Cxk%DD%AF%853%A0m~P%3Cd%7BhD%17%CDP%CA%3CM%F7%0Af%5C%9C%FF%18x%FE(%96q%ED%C6o%C5%02LET%F1%0C%90%B4%0C%40H0%03%90I%FD%9F%2B%3F%13%90Kj%06%20%F9%B73%00%81E%99%80%5C%C0%8C%8DSU%BE%F8%20%3B%D5%FAL%40rUb%0C%EB%82!%CA7%AF%E8!Lh%23%25%F5%EC%85%7F%CE%15%CCP%5E%2B%018%23%18rx(r%00N%8Be%F4%0E%9F%CF%5DP-%B6o%A3%3C%AD%81%BB%9E9%13%90%3E%C9%F7%01bVa%5C%24%DC%05%7F%A9%0E%26%01%F1%D3_%9Bq%8C%0A%A3o%C3%E8%19F%20%89%0B1%A7-z%FC%18%D7%AC_%85O%1AAH%A2%B6%13%F3V%91i%18W%3Atl8%B1%0B0ab%AB%9E6'%F8z%1C%A2%0Eq%8A%C0%955%DE%D9%CD%A8%0B%B2%884o%A3E%BF%C3j%DEo%F7%ECV%16gK%CF%F4oJ%02%02J%05%23%10*%AD%D7l%B6%DC5%8D%D7%25%BF%3D%9C%8FR%FE%B0%3D%C3'YW3%B3%FF%A1%AB%C5%1F%EAIA%3Cw%0F%04-%26%E20U%D64u%2C%CF%9F%0C%83%AC%2B%FF%B3%19K%8A%95%EB%3C%C8v%CFs%81Yw%8D%12T%E8%DF%22e%DDt%1D%3A-Ql%09%E0%3D%9Bg%A7a%DC%A8%AB%02%FE%5C%9D%5D%3D%D1%E8_%DBSZ%AC1%B7%F5%AC%3D(%B8Z%23%23%87B%DAO%93%804%2C%D1%C1%7Ce%F8c%8D%9E%E6G%EC%9D%98%FC%EA%B01%E6%5E%F6%09%3Eo%2F%23P%A3%FE%F7%AC%F2%86%1E%E3%2B%25%16%D8%89%810l%13%A1%A8%93%FD%B1%CF%8ES%5C%2B%B5x%97%7B%FA%D82%8Eo%EA%90%C3%A7%1B%03%A2!J%A1W%ED%D6%D2%01%B9C%C1%BB%7C%11M~p%C27%E9%82%BF%E3%05h%11%0Dj%F5T%B2%E0%8B%40%8E%1A%3E%3BG%13K%01%D7%2Cc%ECcV%2C4%9D%92%0E%C1%0F%E1%92%26%18%A2%C11%D8%22%96%019%1At%13%D1%A3%C9n%08%87%BE%AE%0A%86%AC%EF-%AB%EC%D7%C52%0A%C6%96%02%24%D3n%24%A2%D0%BB%AB%00.kB%19%9E%2F%98q9Y%15%0A%F9h%95x%88%E7%1E%C8%09%02%E4%09%85%90!%F0%96%8B%8E%97%CA%F4-%1EY%FB%C2%B0P%08%95W%09%BC%24%B8%E0%C7%DB%BC%8C%40%84%87%97'!%93%90I%08%06%12%EE%C2AR%88%2Fy%7B%CB%AA%F6%60%20%D2%E6%E4W%3C%7Bi%1B%DF%A4%23%1C%03%04%19%C6bAV%99%8B%BF%11%8E%2B%A0%25y%08%05xU%BE%9F%FB%09%DAEK%09%82X%7B%E6%FD%25d%25%0F%09%8E%83x%CA%3E%A2%E7%24%0F1%DBx%C4%B2%07%E9%DC%D2S%C9Ch%1B%8FYX!i%9DCj%D2%10%DA%C6s%87%9D%60%AE%F1%3A%D6P%944%04%10c%5B%13%D22%9A%B7P(D%DA%04%EE%BE%A0%DC%AC%09%85%D4j%9EV%90w%AEBdx1YH%DEV3D%9C%B3%EB%25%8E%9FF%7F%DA%ACFE%C3A%DC%B7%3F%0A%02%7C%A8K%FA%1D%DD%3C%E6%B0%F0%05%AB%B5%97%3E%20%1A%A6%E0%D7%2B%1B%CD%1D4D%E5%B8%D1%1F%DBz%CD%9A%23%D1%06%8B%0F%E9~%FF%B4J%7C%00%9CHqH%07%5B%EC%9D%14I%3A%0Er%D80F%3Ai%0E%7F%FD%FC%D8a%E9%95%D4x%AD%DA%BA%14%93%F8%24%0D%05%F9%FB%02%DE%D2%AB%F1%2C%3C%B77%9E%B3Af%B8p%90%A3%D7y%1E%9Fg%D1%EC%07k%5C%FC%F0%A9%D7)%24%DC%C5%85%1C%C7%06%D5%A4F%08X%CE%DCO%EE%D1%A4ceUo%F1%B2h%C5B%DCcn%CB.%032%05%1At%E9%5E%DA%C6%F3%B2%A8%B3B%1C%0A%1E%94%F9%86e%91%16%AD%93%DD%20a%DA%F8%15%12%AF%E0%FF%A3%02%EB%A6%22R%0A%9D%E3%CF%89%CA%81%14s%CE%C7%C86%0FVD%1F%CF(%84%D7%C6'%B0%17%D9%E6z%A4r%05HA~%1Bo%3E%EBX%15%2BK%E2%0D%9E%E7h%A5%9BgNa%A5%0DB%7C%B2uq~%2B%85%B4%F1%DB%F8%04F%C7%C4w%A9%5D%B7C%BA%F8m%FC%E5%20%1A%02%BE%E7O%2C%8D%B7%BC%0C%90%7B%88%FFZy%03%CF%80y%03%AB%2B%B48K%60%FCV%60%3A%12XM-%CC-%B3%40%C8%8F%D2%0D%D9%A2%C9%7Dz%9C%A5%E5rm%BA!%B4%EC%FB%AA%B7%C5%1Ew%2C%89%BC%9B~%C8%D4%0D%3Bc%8F%23%A5%DE%40%DA!%92%1A%7F%DC%7D(%C7%84d%A58w%11%2F%B3%A1%8F%95%17%24%13%92%DE%D1%EFW%2C%90%9C%A0%B46%DD%90%7Cc%5E%BCAY%2C%97%A4%1B%02ak%BF%A9%E7%C0j%15%3B%8EOZd%8A%FCs%E48%3E%05%DD%92o!%DA%F8%145%C7%85%1D%C7%A7%A0QI%C5%8D%E3S%90r3%0A%C1%EC!K%5E%9E%99%15%14%92%A5%09%CA%9ED%F7%DCx%16%EC%2C%17%F8%11%82Ef%9FUi%A8%07%3A%8EOz%E8%CC%11)%26O%D0%FE%DE%97((%C0%1B%09%26%0F%F1%C1%EF%00%5E%15%BB%FC%92B%CE%C2%9F~%2C%94%01%EER8~%8C%BF%E3%3E5%B5%F7W%97%B0%16%F88%09%F1%C5%04%9B%3A%8D%C4%D6%A9%9E%1A%D0%13f%90i%0B%12%2B%F2%A1%83%C1%84!%A1%F5%AC%3D%93%F1%F2%3E%FC%B7%89%03-%CB%9F(CY%B4%5B'%25%9C%FF%E5b%5E_L%E5%93%8B%80T%F4%D5%25%00%E990%0A%ED%BFw%0C%F9%EC%8D%E2%CF%16%DC%9E%1Dc%9C%0D%A7%1F%08%EF%F3%E3!%8F%C9%C5%05%83%C7%7D%0Eg%DD%3F%88n%BD%0C%9F%DC%3D%3F%E6%9F%0DU%CE%7D%16%94D%A6%A2%0B%0A%B7%04%E68A%24%B8b.%2C%7B%FF%3B%9E%EC%98%05fJ%D8%9C%87%CEnyNGS%F6l%82%19N%90%2B%E3%BB%5Cw%14%83%7Bz%DC%AE%7C%DA%DFp%7F%8B%7C%1ADS%40y%CA%09rA%8B%8Ev%DF%A6%99%BD%19%B7%073%5B%83%BC%F2%84%86%C2y%FB%9D%20%EE%2F%BEh~%85%E1y%DDz%A2%19%E0%D2%E6z%25%81%C5%A4%11%E7%2B%3AS%D9OK%7C%83%D5%EC)%04x%B1%B1%BD%D61%9D%5D%1Dw%18%9CK5%B4z%2F%B6Zs%1AA)%DAg%18%DC%2FsL%E8Ix%C8%F1%8B%24%EDG%DE%5B%EE%B1%EDS%AE%8D.%D4%0D%7FP%A2%A3!%2B%07%3B%B69%9C%DA7%40%BE%D6%5Bi%7DV%F3%87%5BA%DA%10h%85k%85%8C%00%0Ek%E8%B1%D2a%89%15R%F6%0C%13%FCp%5B%C1%0E%F39%FFC%82%0D%88%80%AF%C3%FD%1B_%F5Z%E6%C3%146%83%00%00%00%19fcTl%00%00%00%12%00%00%00%C8%00%00%00%C8%00%00%00%00%00%00%00%00%00%01%00%0A%02%13%80%80%DB%00%00%09~fdAt%00%00%00%13x%9C%ED%9C%7Fl%13%E7%19%C7%9F%24%17%FBl%BF%3E%93%852%AA%04%C8%986h%C5fh%23F%5BJ%9C%C4PF%19A%5B%B61%86%16WC%A8%D3h%13%A4l%AB%04%5D%5C%02%AD%C9%10%89(%7F%A0%0E%81%5BZ%A9R%D7%25%AD%26TU%A3%9C%13%08t%F3r%01%FA%C7%26*%E5%08%23%AB%26%A4%C4%24)-%24%BB%BD%8E%A1%F1%FD%F2%3Dw%E7%8B%D4-_%C9I%FC%DC%F3%DE%E7%EE%DE%F7%DE%E7%7D%9F%7B%2F%00J%05T%16%80%11%0D%9B-9%01%91%94%1A%C58%99%93%CDC%9C%D5%AC%FE%0F%F4%F7%B8%F3%0C%AE%ECG%CEC%BC%9B%0B%9D%87%B0q%AF%F3%10%17%3F%03%90b%DEe%A78%89%89%08%2F%96%B7U'%FE%AAr%84%97%E7%F9%D7%EC%40%5C%3B%ABE%C4%A1%94%AE%B6%03%E9%85%C2.%84%5B%7D%C4%0Ed%2B0Q%84%DB%FC%10~%977%FA%95%96r%60%3A%8C%CB%91%F0r4%C3%5D%BFLa%E1%26%A1%40%05V%CB%D3%8C%1F%86%5C%86%17D%B9%85%8C%C0%EB%88%82%C5G%F0%90W%C0%BDYa*%23%98%26%5C%94%C0C%0E%A6%8F%5C%A6%E1%96%D18%A2%60%40%A8%40%22Hr'x%2B%FCI1%CB%D6%3E%86%A8%11%0A%09lDB%F6%EE%BF%05%EF%CE%AD%92%F8%2C%5B%B0%16U40%80%84pk%12%3F%D82Wn%F3I%02%EEL%84%9D8%88%E7%F8%A3%DCQ%C5%3D%E1%92%8A%E2(%C8%E0A%1C%C4%5B%DB%A4%B2%15J%8C%B2%B9iC%DC%BF%C0A%B8R%B5m8%F8%C9%1CL%D9b%EFz%1C%04%5E%7D%5Ee%12v%1D%9CD%95umEB%12%C1G%94%A63m%0B%CAPeY%F5%A5%D6V7%E1%95%A6%F6%BE%D5%CF%A1%CA%BAPW5%ED%B8'%A9%82%F0uaTY%E6%0E%12%02%8D%D2(%2F%B7%9C%E0%13%25%EA%9A%D2P%D1%A7X%C8%8D7R%13r%8B%C0%93%FB%EBxMg*%DFt%DF%19x%18%0B%A1%01e%5C%FE%DDO%DB%DC7u%BD%D9%87%C4%2F%20%9Dx%88%FFkq%A5)q%5B%D7%DB%B5%23r%EFO%A1%0A%0F%19%DA%BA%40%89-%7DU%C7%B7%7D%F4pr%9E%94%E9%87%FCu%F7%A3%19%E7J%F8%7D%0A%D3%D5%09%BD~x%99%B7%AE%FFaq%9B%98%FE%5B%90D%2C%83%95%9E%81%A2%A8%DC%D6%D0%A6w%B9%26%A0%FB%81%DB%F0n%FATH%C9%09%2C%03Z%9E%A1%FE%F2h%EB%19m%D4%1B%87L%C0%BE%A1%C5%C0%A6%0F%EA%E2m%01%CB%F0N%1D%B3%7C%DC%C0%A4R%A2.%E4%25%B2%82w%A5%CF%E4%CCr4%84%99%3A%09!v%3C%CBF%82%BA%8D%EB%BBd%15W%D9%D1%B9%9B%1E%84%2F*%7C%0F%09%F1%06%D3%B1%83%0D%1F%CA6%5E%D4%EB%94%C8%CD%A0%24%95%3CQvj%EE%01%9E~%3B%A4%CE%CD%7C%A6QJ%2F33%A6%0D%F1%18%26p%CC%A4%A2%B4%7C%E9i%97T%F5o%D3)%917%08%FBt%5DnD%3E%20%9Ep%8B%F3%10%08(%EF%3F'*%5E%F8h%062w%3Fwd%A">
+</div>
diff --git a/layout/reftests/bugs/521685-1-ref.html b/layout/reftests/bugs/521685-1-ref.html
new file mode 100644
index 0000000000..791dc08578
--- /dev/null
+++ b/layout/reftests/bugs/521685-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+background-color: green;
+}
+</style>
+</head>
+<body>
+<div id="d">text</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/521685-1.html b/layout/reftests/bugs/521685-1.html
new file mode 100644
index 0000000000..9c8d8b9934
--- /dev/null
+++ b/layout/reftests/bugs/521685-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+background-color: green;
+}
+div[mixedCase=true] {
+background-color: red ! important;
+}
+</style>
+</head>
+<body onload="document.getElementById('d').removeAttribute('mixedcase');">
+<div id="d" mixedcase="true">text</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/522632-1-ref.html b/layout/reftests/bugs/522632-1-ref.html
new file mode 100644
index 0000000000..c73a5b484d
--- /dev/null
+++ b/layout/reftests/bugs/522632-1-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+<body>
+ <table border="1">
+ <tr>
+ <td style="height: 200px; padding: 0; margin: 0; border: none">
+ <img style="height: 100px;" src="solidblue.png">
+ </td>
+ <tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/522632-1.html b/layout/reftests/bugs/522632-1.html
new file mode 100644
index 0000000000..a70eb2c189
--- /dev/null
+++ b/layout/reftests/bugs/522632-1.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+<body>
+ <table border="1">
+ <tr>
+ <td style="height: 200px; padding: 0; margin: 0; border: none">
+ <img style="height: 50%;" src="solidblue.png">
+ </td>
+ <tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/523096-1-ref.html b/layout/reftests/bugs/523096-1-ref.html
new file mode 100644
index 0000000000..aaa998c319
--- /dev/null
+++ b/layout/reftests/bugs/523096-1-ref.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <style>
+ table { empty-cells: show; }
+ </style>
+ </head>
+ <body>
+ <table border="1" id="thetable">
+ <thead>
+ <tr>
+ <th>col1</th>
+ <th>col2</th>
+ <th>col3</th>
+ <th>col4</th>
+ <th>col5</th>
+ </tr>
+ </thead>
+ <tbody style="overflow-y:auto;overflow-x:hidden;">
+ <tr>
+ <td>val1</td>
+ <td></td>
+ <td><input maxlength="6" type="text" id="input" value="text" size="6" /></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>val2</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/523096-1.html b/layout/reftests/bugs/523096-1.html
new file mode 100644
index 0000000000..ac90650c36
--- /dev/null
+++ b/layout/reftests/bugs/523096-1.html
@@ -0,0 +1,43 @@
+<html>
+ <head>
+ <style>
+ table { empty-cells: show; }
+ </style>
+ <script>
+ window.onload = function() {
+ var thetable = document.getElementById("thetable");
+ var input = document.getElementById("input");
+ thetable.rows[1].cells[2].appendChild(input);
+ }
+ </script>
+ </head>
+ <body>
+ <table border="1" id="thetable">
+ <thead>
+ <tr>
+ <th>col1</th>
+ <th>col2</th>
+ <th>col3</th>
+ <th>col4</th>
+ <th>col5</th>
+ </tr>
+ </thead>
+ <tbody style="overflow-y:auto;overflow-x:hidden;">
+ <tr>
+ <td>val1</td>
+ <td><input maxlength="6" type="text" id="input" value="text" size="6" /></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>val2</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/523468-1-ref.html b/layout/reftests/bugs/523468-1-ref.html
new file mode 100644
index 0000000000..d396cde11f
--- /dev/null
+++ b/layout/reftests/bugs/523468-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+c<br>
+da<br>
+b
+</body>
+</html>
diff --git a/layout/reftests/bugs/523468-1.html b/layout/reftests/bugs/523468-1.html
new file mode 100644
index 0000000000..4d428d927d
--- /dev/null
+++ b/layout/reftests/bugs/523468-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html style="width:1px">
+<body><span><span id="y"></span>a b</span>
+<script>
+var y = document.getElementById("y");
+document.documentElement.offsetHeight;
+y.appendChild(document.createTextNode("c d"));
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/524175-1-ref.html b/layout/reftests/bugs/524175-1-ref.html
new file mode 100644
index 0000000000..d40a8cab42
--- /dev/null
+++ b/layout/reftests/bugs/524175-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+ <span style="color: green">This text should be green</span>
+</body>
diff --git a/layout/reftests/bugs/524175-1.html b/layout/reftests/bugs/524175-1.html
new file mode 100644
index 0000000000..b571b3758d
--- /dev/null
+++ b/layout/reftests/bugs/524175-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+ #foo::before { color: green; content: "This text should be green"; }
+ span::before { color: red; }
+</style>
+<body>
+ <span id="foo"></span>
+</body>
diff --git a/layout/reftests/bugs/526463-1-ref.html b/layout/reftests/bugs/526463-1-ref.html
new file mode 100644
index 0000000000..52e5d2d162
--- /dev/null
+++ b/layout/reftests/bugs/526463-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Testcase, bug 526463</title>
+ </head>
+ <body>
+ <div style="border-radius: 50px;overflow:hidden;background:gold">
+ outer div
+ <div>inner div</div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/526463-1.html b/layout/reftests/bugs/526463-1.html
new file mode 100644
index 0000000000..f3465766db
--- /dev/null
+++ b/layout/reftests/bugs/526463-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>Testcase, bug 526463</title>
+ <script>
+ window.addEventListener("MozReftestInvalidate",
+ function() {
+ var div = document.getElementById("div");
+ div.style.display = "";
+ document.documentElement.className = "";
+ });
+ </script>
+ </head>
+ <body>
+ <div style="border-radius: 50px;overflow:hidden;background:gold">
+ outer div
+ <div id="div" style="display:none">inner div</div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/527464-1.html b/layout/reftests/bugs/527464-1.html
new file mode 100644
index 0000000000..b624e03900
--- /dev/null
+++ b/layout/reftests/bugs/527464-1.html
@@ -0,0 +1 @@
+<table><tr><td width="1" nowrap>x x</td></td></tr></table> \ No newline at end of file
diff --git a/layout/reftests/bugs/527464-ref.html b/layout/reftests/bugs/527464-ref.html
new file mode 100644
index 0000000000..f650aed2d9
--- /dev/null
+++ b/layout/reftests/bugs/527464-ref.html
@@ -0,0 +1 @@
+<table><tr><td width="1">x x</td></td></tr></table> \ No newline at end of file
diff --git a/layout/reftests/bugs/528038-1-ref.html b/layout/reftests/bugs/528038-1-ref.html
new file mode 100644
index 0000000000..dc4b471428
--- /dev/null
+++ b/layout/reftests/bugs/528038-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+ <body style="position: relative"><div style="position: absolute; top: 200px">This text should be 200px from the top of the body</div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1a.html b/layout/reftests/bugs/528038-1a.html
new file mode 100644
index 0000000000..9488844e2e
--- /dev/null
+++ b/layout/reftests/bugs/528038-1a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.body.style.top = "100px";
+ };
+ </script>
+ </head>
+ <body><div style="position: relative; top: inherit"><div style="position: absolute; top: inherit">This text should be 200px from the top of the body</div></div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1b.html b/layout/reftests/bugs/528038-1b.html
new file mode 100644
index 0000000000..b55d67bf1e
--- /dev/null
+++ b/layout/reftests/bugs/528038-1b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.body.style.top = "100px";
+ };
+ </script>
+ </head>
+ <body><div style="position: relative; top: inherit"><div style="position: relative; top: inherit">This text should be 200px from the top of the body</div></div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1c.html b/layout/reftests/bugs/528038-1c.html
new file mode 100644
index 0000000000..14ca71d0f8
--- /dev/null
+++ b/layout/reftests/bugs/528038-1c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.body.style.top = "200px";
+ };
+ </script>
+ </head>
+ <body><div style="position: relative; top: inherit">This text should be 200px from the top of the body</div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1d.html b/layout/reftests/bugs/528038-1d.html
new file mode 100644
index 0000000000..87d4fe6544
--- /dev/null
+++ b/layout/reftests/bugs/528038-1d.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.getElementById("foo").style.top = "200px";
+ };
+ </script>
+ </head>
+ <body><div style="display: table" id="foo"><div style="position: relative; top: inherit">This text should be 200px from the top of the body</div></div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1e.html b/layout/reftests/bugs/528038-1e.html
new file mode 100644
index 0000000000..382a4f8b89
--- /dev/null
+++ b/layout/reftests/bugs/528038-1e.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.getElementById("foo").style.top = "200px";
+ };
+ </script>
+ </head>
+ <body><div style="display: table-row" id="foo"><div style="position: relative; top: inherit">This text should be 200px from the top of the body</div></body>
+</html>
diff --git a/layout/reftests/bugs/528038-1f.html b/layout/reftests/bugs/528038-1f.html
new file mode 100644
index 0000000000..edc91dec2b
--- /dev/null
+++ b/layout/reftests/bugs/528038-1f.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.offsetWidth;
+ document.getElementById("foo").style.top = "200px";
+ };
+ </script>
+ </head>
+ <body style="font-size: 0"><span id="foo"><span style="position: relative; top: inherit; display: block; font-size: medium">This text should be 200px from the top of the body</span></span></body>
+</html>
diff --git a/layout/reftests/bugs/528038-2-ref.html b/layout/reftests/bugs/528038-2-ref.html
new file mode 100644
index 0000000000..da8e19b2ff
--- /dev/null
+++ b/layout/reftests/bugs/528038-2-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html>
+ <body style="position: relative"><table style="position: absolute; top: 200px"><tr><td>This text should be 200px from the top of the body</td></tr></table></body>
+</html>
diff --git a/layout/reftests/bugs/528038-2.html b/layout/reftests/bugs/528038-2.html
new file mode 100644
index 0000000000..96472c6332
--- /dev/null
+++ b/layout/reftests/bugs/528038-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ window.onload = function() {
+ document.body.style.top = "100px";
+ document.body.offsetWidth;
+ };
+ </script>
+ </head>
+ <body><div style="position: relative; top: inherit"><table style="position: absolute; top: inherit"><tr><td>This text should be 200px from the top of the body</td></tr></table></div></body>
+</html>
diff --git a/layout/reftests/bugs/530686-1-ref.html b/layout/reftests/bugs/530686-1-ref.html
new file mode 100644
index 0000000000..1660933d4a
--- /dev/null
+++ b/layout/reftests/bugs/530686-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+#rear {
+ width: 500px;
+ height: 1500px;
+ box-shadow: 0 0 71px #667;
+ display: block;
+}
+</style>
+</head>
+<body>
+<div id="rear"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/530686-1.html b/layout/reftests/bugs/530686-1.html
new file mode 100644
index 0000000000..2a774eefef
--- /dev/null
+++ b/layout/reftests/bugs/530686-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style type="text/css">
+#rear {
+ width: 500px;
+ height: 1500px;
+ box-shadow: 0 0 71px #667;
+ display: block;
+}
+.cover {
+ position: absolute;
+ width: 520px;
+ height: 100px;
+ background: yellow;
+}
+</style>
+<script>
+function doTest() {
+ var es = document.getElementsByClassName("cover");
+ for (var i = 0; i < es.length; ++i) {
+ es[i].style.display = 'none';
+ }
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<div id="rear"></div>
+<div class="cover" style="top:100px"></div>
+<div class="cover" style="top:300px"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/531200-1-ref.html b/layout/reftests/bugs/531200-1-ref.html
new file mode 100644
index 0000000000..9d63492787
--- /dev/null
+++ b/layout/reftests/bugs/531200-1-ref.html
@@ -0,0 +1,38 @@
+<html class="reftest-paged">
+<head>
+<title>push rowspan on to next page if it can't be splitted</title>
+<style>
+img {
+ width: 10px;
+ height: 30px;
+}
+</style>
+</head>
+<body>
+ <div style="height: 110px"></div>
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td></td>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr style="page-break-after:always">
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ <td rowspan="2"></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/531200-1.html b/layout/reftests/bugs/531200-1.html
new file mode 100644
index 0000000000..3320054c98
--- /dev/null
+++ b/layout/reftests/bugs/531200-1.html
@@ -0,0 +1,38 @@
+<html class="reftest-paged">
+<head>
+<title>push rowspan on to next page if it can't be splitted</title>
+<style>
+img {
+ width: 10px;
+ height: 30px;
+}
+</style>
+</head>
+<body>
+ <div style="height: 110px"></div>
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td></td>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ <td rowspan="2"></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/531371-1-ref.html b/layout/reftests/bugs/531371-1-ref.html
new file mode 100644
index 0000000000..2634ffa254
--- /dev/null
+++ b/layout/reftests/bugs/531371-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<html style="display:table; background:lime;">
+</html>
diff --git a/layout/reftests/bugs/531371-1.html b/layout/reftests/bugs/531371-1.html
new file mode 100644
index 0000000000..726f9b206d
--- /dev/null
+++ b/layout/reftests/bugs/531371-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<body style="display:table; background:lime;">
+</body>
+</html>
diff --git a/layout/reftests/bugs/534526-1-ref.html b/layout/reftests/bugs/534526-1-ref.html
new file mode 100644
index 0000000000..9044d86706
--- /dev/null
+++ b/layout/reftests/bugs/534526-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <span style="color: green">This should be green</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/534526-1a.html b/layout/reftests/bugs/534526-1a.html
new file mode 100644
index 0000000000..705c25e62e
--- /dev/null
+++ b/layout/reftests/bugs/534526-1a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: green; }
+ [style*=red] + * { color: red; }
+ </style>
+ </head>
+ <body onload="document.getElementById('x').style.color = 'blue'">
+ <span id="x" style="color: red"></span><span>This should be green</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/534526-1b.html b/layout/reftests/bugs/534526-1b.html
new file mode 100644
index 0000000000..5d3cb99068
--- /dev/null
+++ b/layout/reftests/bugs/534526-1b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: red; }
+ [style*=red] + * { color: green; }
+ </style>
+ </head>
+ <body onload="document.getElementById('x').style.color = 'red'">
+ <span id="x" style="color: blue"></span><span>This should be green</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/534804-1-ref.html b/layout/reftests/bugs/534804-1-ref.html
new file mode 100644
index 0000000000..4a44463179
--- /dev/null
+++ b/layout/reftests/bugs/534804-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset='utf-8'>
+ <title>dynamic sibling selector testcase</title>
+ <style>
+ #adjacent, #general {
+ background: #cfc;
+ }
+ </style>
+</head>
+<body>
+ <div>
+ <div id="adjacent">PASS: You should see this</div>
+ </div>
+
+ <div>
+ <div id="general">PASS: You should also see this</div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/534804-1.html b/layout/reftests/bugs/534804-1.html
new file mode 100644
index 0000000000..0b8ba0a675
--- /dev/null
+++ b/layout/reftests/bugs/534804-1.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset='utf-8'>
+ <title>dynamic sibling selector testcase</title>
+ <script>
+ window.onload = function() {
+ document.getElementById("adjacent").appendChild(document.createTextNode("PASS: You should see this"));
+ document.getElementById("general").appendChild(document.createTextNode("PASS: You should also see this"));
+ };
+ </script>
+ <style>
+ .test {
+ background: #fcc;
+ }
+ #adjacent:not(:empty), #general:not(:empty) {
+ background: #cfc;
+ }
+ #adjacent:not(:empty) + .test {
+ display: none;
+ }
+ #general:not(:empty) ~ .test {
+ display: none;
+ }
+ </style>
+</head>
+<body>
+ <div>
+ <div id="adjacent"></div>
+ <div class="test">
+ FAIL: You should NOT see me.
+ </div>
+ </div>
+
+ <div>
+ <div id="general"></div>
+ <div class="test">
+ FAIL: You should NOT see me either.
+ </div>
+ <div class="test">
+ FAIL: You should NOT even see me.
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/534808-1-ref.html b/layout/reftests/bugs/534808-1-ref.html
new file mode 100644
index 0000000000..ddb8a855f8
--- /dev/null
+++ b/layout/reftests/bugs/534808-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { border-spacing: 0; }
+td { padding: 0; border: 1px solid; line-height: 1px; }
+img { visibility: hidden; vertical-align: bottom; }
+
+</style>
+</head>
+<body>
+
+<table><tr><td>
+ <img src="solidblue.png">
+</td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/534808-1.html b/layout/reftests/bugs/534808-1.html
new file mode 100644
index 0000000000..c112098dc1
--- /dev/null
+++ b/layout/reftests/bugs/534808-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { border-spacing: 0; }
+td { padding: 0; border: 1px solid; line-height: 1px; }
+img { visibility: hidden; vertical-align: bottom; }
+
+</style>
+</head>
+<body onload="document.getElementById('forty').style.height = '';">
+
+<table><tr><td><div style="height: 40px" id="forty"><div style="height: 100%">
+ <img src="solidblue.png" style="height: 75%">
+</div></div></td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/534808-2-ref.html b/layout/reftests/bugs/534808-2-ref.html
new file mode 100644
index 0000000000..decfe46718
--- /dev/null
+++ b/layout/reftests/bugs/534808-2-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { border-spacing: 0; }
+td { padding: 0; border: 1px solid; line-height: 1px; }
+img { visibility: hidden; vertical-align: bottom; }
+
+</style>
+</head>
+<body>
+
+<!-- solidblue.png is a 16x16 image -->
+
+<table><tr><td><div style="height: 40px">
+ <img src="solidblue.png" style="width: 32px">
+</div></td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/534808-2.html b/layout/reftests/bugs/534808-2.html
new file mode 100644
index 0000000000..c4a6bd458b
--- /dev/null
+++ b/layout/reftests/bugs/534808-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css">
+
+table { border-spacing: 0; }
+td { padding: 0; border: 1px solid; line-height: 1px; }
+img { visibility: hidden; vertical-align: bottom; }
+
+</style>
+</head>
+<body>
+
+<!-- solidblue.png is a 16x16 image -->
+
+<table><tr><td><div style="height: 40px" id="forty"><div style="height: 100%">
+ <img src="solidblue.png" style="height: 80%">
+</div></div></td></tr></table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/534919-1-ref.html b/layout/reftests/bugs/534919-1-ref.html
new file mode 100644
index 0000000000..2604fbf38f
--- /dev/null
+++ b/layout/reftests/bugs/534919-1-ref.html
@@ -0,0 +1,17 @@
+<html lang="ar">
+<head>
+<style type="text/css">
+body {
+ font-family: foo, sans-serif;
+ font-size: 300%;
+ line-height: 2em;
+}
+</style>
+<body>
+<p>&#x06AF; &#x0632;</p>
+<p>&#x06AF; &#x0632;</p>
+<p>&#x06AF; &#x0632;</p>
+<p>&#x06AF; &#x0632;</p>
+<p>&#x06AF; &#x0632;</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/534919-1.html b/layout/reftests/bugs/534919-1.html
new file mode 100644
index 0000000000..da308b9c35
--- /dev/null
+++ b/layout/reftests/bugs/534919-1.html
@@ -0,0 +1,17 @@
+<html lang="ar">
+<head>
+<style type="text/css">
+body {
+ font-family: foo, sans-serif;
+ font-size: 300%;
+ line-height: 2em;
+}
+</style>
+<body>
+<p>&#x06AF; &#x0632;</p>
+<p>&#x200c;&#x06AF; &#x0632;</p>
+<p>&#x06AF;&#x200c; &#x0632;</p>
+<p>&#x06AF; &#x200c;&#x0632;</p>
+<p>&#x06AF; &#x0632;&#x200c;</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/536061-ref.html b/layout/reftests/bugs/536061-ref.html
new file mode 100644
index 0000000000..62fbaa749c
--- /dev/null
+++ b/layout/reftests/bugs/536061-ref.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Bugs with transform: rotate() and box-shadow</title>
+
+ <style>
+ body {
+ overflow: hidden;
+ }
+
+ .label {
+ position: absolute;
+ top: 200px;
+ left: 196px;
+ margin: 0;
+ height:16px;
+ width: 300px;
+ box-shadow: 0 0 .7em black;
+ border: 1px black solid;
+ }
+ .vlabel {
+ position: absolute;
+ top: 58px;
+ left: 42px;
+ margin: 0;
+ width: 16px;
+ height: 300px;
+ box-shadow: 0 0 .7em black;
+ border: 1px black solid;
+ }
+ </style>
+</head>
+
+<body>
+
+<p class="label"></p>
+<p class="label" style="top: 400px; box-shadow:none; outline: 3px dashed blue;"></p>
+<p class="vlabel" style="box-shadow:none; outline: 3px dashed blue;"></p>
+<p class="vlabel" style="left:102px; "></p>
+<p class="vlabel" style="top:454px; box-shadow:none; outline: 3px dashed blue; "></p>
+<p class="vlabel" style="top:454px; left:102px;"></p>
+
+<!-- cover a few shadow corners which are a bit different -->
+<div style="position:absolute; top:40px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:340px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:420px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:730px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/536061.html b/layout/reftests/bugs/536061.html
new file mode 100644
index 0000000000..ce652a2203
--- /dev/null
+++ b/layout/reftests/bugs/536061.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Bugs with transform: rotate() and box-shadow</title>
+
+ <style>
+ body {
+ overflow: hidden;
+ }
+
+ .label {
+ position: absolute;
+ top: 200px;
+ left: 100px;
+ margin: 0;
+ height: 16px;
+ width: 300px;
+ transform: translate(96px);
+ box-shadow: 0 0 .7em black;
+ border: 1px black solid;
+ }
+ .vlabel {
+ position: absolute;
+ top: 40px;
+ left: 40px;
+ margin: 0;
+ width: 16px;
+ height: 300px;
+ box-shadow: 0 0 .7em black;
+ border: 1px black solid;
+ }
+ </style>
+</head>
+
+<body>
+
+<p class="label"></p>
+<p class="label" style="top: 400px; box-shadow:none; outline: 3px dashed blue;"></p>
+<p class="label" style="left:-100px; top: 200px; box-shadow:none; outline: 3px dashed blue; transform: rotate(90deg);"></p>
+<p class="label" style="left:-40px; top: 200px; transform: rotate(90deg);"></p>
+<p class="label" style="left:-100px; top: 200px; box-shadow:none; outline: 3px dashed blue; transform: translate(0,396px) rotate(90deg);"></p>
+<p class="label" style="left:-40px; top: 200px; transform: translate(0,396px) rotate(90deg);"></p>
+
+<!-- cover a few shadow corners which are a bit different -->
+<div style="position:absolute; top:40px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:340px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:420px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+<div style="position:absolute; top:730px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/537471-1-ref.html b/layout/reftests/bugs/537471-1-ref.html
new file mode 100644
index 0000000000..ea4c8093d7
--- /dev/null
+++ b/layout/reftests/bugs/537471-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width: 200px; height: 10px; border: 1px solid black;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/537471-1.html b/layout/reftests/bugs/537471-1.html
new file mode 100644
index 0000000000..7f7b20d87f
--- /dev/null
+++ b/layout/reftests/bugs/537471-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width: 200px; height: 10px; border: 1px solid black; box-shadow: 15px 15px 10.5px -15px red;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/537507-1-frame.xhtml b/layout/reftests/bugs/537507-1-frame.xhtml
new file mode 100644
index 0000000000..20d5b9774a
--- /dev/null
+++ b/layout/reftests/bugs/537507-1-frame.xhtml
@@ -0,0 +1 @@
+<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'><label value='Here'/></window>
diff --git a/layout/reftests/bugs/537507-1-ref.xhtml b/layout/reftests/bugs/537507-1-ref.xhtml
new file mode 100644
index 0000000000..4e80af28cf
--- /dev/null
+++ b/layout/reftests/bugs/537507-1-ref.xhtml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ orient="vertical">
+<label value="The iframe below should show the string 'Here'"/>
+<iframe src="537507-1-frame.xhtml"></iframe>
+</window>
diff --git a/layout/reftests/bugs/537507-1.xhtml b/layout/reftests/bugs/537507-1.xhtml
new file mode 100644
index 0000000000..14896f060b
--- /dev/null
+++ b/layout/reftests/bugs/537507-1.xhtml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ orient="vertical">
+<label value="The iframe below should show the string 'Here'"/>
+<iframe src="537507-1-frame.xhtml" style="display: none" onload="this.style.display = ''"></iframe>
+</window>
diff --git a/layout/reftests/bugs/537507-2-frame.xhtml b/layout/reftests/bugs/537507-2-frame.xhtml
new file mode 100644
index 0000000000..20d5b9774a
--- /dev/null
+++ b/layout/reftests/bugs/537507-2-frame.xhtml
@@ -0,0 +1 @@
+<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'><label value='Here'/></window>
diff --git a/layout/reftests/bugs/537507-2-ref.html b/layout/reftests/bugs/537507-2-ref.html
new file mode 100644
index 0000000000..fa0917226d
--- /dev/null
+++ b/layout/reftests/bugs/537507-2-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<body>
+ The iframe below should show the text 'Here'<br>
+ <iframe src="537507-2-frame.xhtml"></iframe>
+</body>
diff --git a/layout/reftests/bugs/537507-2.html b/layout/reftests/bugs/537507-2.html
new file mode 100644
index 0000000000..ea150b0f7f
--- /dev/null
+++ b/layout/reftests/bugs/537507-2.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<body>
+ The iframe below should show the text 'Here'<br>
+ <iframe src="537507-2-frame.xhtml" style="display: none" onload="this.style.display = ''"></iframe>
+</body>
diff --git a/layout/reftests/bugs/538909-1-ref.html b/layout/reftests/bugs/538909-1-ref.html
new file mode 100644
index 0000000000..2cd6072834
--- /dev/null
+++ b/layout/reftests/bugs/538909-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div {
+ width: 260px;
+ height: 260px;
+ background-size: 100px 100px;
+ background-position: -20px -20px;
+ background-image: linear-gradient(to bottom right, yellow, blue);
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/538909-1.html b/layout/reftests/bugs/538909-1.html
new file mode 100644
index 0000000000..7e9af84c61
--- /dev/null
+++ b/layout/reftests/bugs/538909-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div {
+ border: 80px solid transparent;
+ width: 100px;
+ height: 100px;
+ background-image: linear-gradient(to bottom right, yellow, blue);
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/538935-1-ref.html b/layout/reftests/bugs/538935-1-ref.html
new file mode 100644
index 0000000000..98d150ac02
--- /dev/null
+++ b/layout/reftests/bugs/538935-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div>Hello</div>
+<div style="padding-left:2px;">Hello</div>
+<div>Hello</div>
+<div style="padding-left:2px;">Hello</div>
+<div style="padding-left:2px;">Hello</div>
+
+<div>Hello</div>
+<div style="padding-left:2px;">Hello</div>
+<div>Hello</div>
+<div style="padding-left:2px;">Hello</div>
+<div style="padding-left:2px;">Hello</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/538935-1.html b/layout/reftests/bugs/538935-1.html
new file mode 100644
index 0000000000..2cab32382d
--- /dev/null
+++ b/layout/reftests/bugs/538935-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div><span></span> Hello</div>
+<div><span style="border:1px solid transparent"></span> Hello</div>
+<div><span style="outline:1px transparent"></span> Hello</div>
+<div><span style="padding:1px"></span> Hello</div>
+<div><span style="margin:1px"></span> Hello</div>
+
+<div><span> </span> Hello</div>
+<div><span style="border:1px solid transparent"> </span> Hello</div>
+<div><span style="outline:1px transparent"> </span> Hello</div>
+<div><span style="padding:1px"> </span> Hello</div>
+<div><span style="margin:1px"> </span> Hello</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539226-1.html b/layout/reftests/bugs/539226-1.html
new file mode 100644
index 0000000000..bf86081411
--- /dev/null
+++ b/layout/reftests/bugs/539226-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script>
+function doTest() {
+ document.getElementById("inner").style.height = "0";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<div style="overflow:auto; width:100px; height:100px;">
+ <div id="inner" style="height:200px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-1-ref.html b/layout/reftests/bugs/539323-1-ref.html
new file mode 100644
index 0000000000..76534c4444
--- /dev/null
+++ b/layout/reftests/bugs/539323-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:250px; height:200px; border:10px solid red; padding:5px">
+ <div id="input" contenteditable="true" style="height:200px; outline:none"></div>
+</div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-1.html b/layout/reftests/bugs/539323-1.html
new file mode 100644
index 0000000000..d09c8dc686
--- /dev/null
+++ b/layout/reftests/bugs/539323-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="input" style="width:250px; height:200px; border:10px solid red; padding:5px; outline:none" contentEditable="true"></div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-2-ref.html b/layout/reftests/bugs/539323-2-ref.html
new file mode 100644
index 0000000000..c17ef9465e
--- /dev/null
+++ b/layout/reftests/bugs/539323-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:0; height:200px; border:10px solid red; padding:5px">
+ <div id="input" contenteditable="true" style="height:200px; outline:none"></div>
+</div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-2.html b/layout/reftests/bugs/539323-2.html
new file mode 100644
index 0000000000..c938c1f1d9
--- /dev/null
+++ b/layout/reftests/bugs/539323-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="input" style="width:0; height:200px; border:10px solid red; padding:5px; outline:none" contentEditable="true"></div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-3-ref.html b/layout/reftests/bugs/539323-3-ref.html
new file mode 100644
index 0000000000..1e65b4a928
--- /dev/null
+++ b/layout/reftests/bugs/539323-3-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:0; height:200px;">
+ <div id="input" contenteditable="true" style="height:200px; outline:none"></div>
+</div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539323-3.html b/layout/reftests/bugs/539323-3.html
new file mode 100644
index 0000000000..07bd0c274e
--- /dev/null
+++ b/layout/reftests/bugs/539323-3.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="input" style="width:0; height:200px; outline:none" contentEditable="true"></div>
+<script>
+window.focus();
+document.getElementById("input").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539880-1-dynamic.html b/layout/reftests/bugs/539880-1-dynamic.html
new file mode 100644
index 0000000000..ea1efef31e
--- /dev/null
+++ b/layout/reftests/bugs/539880-1-dynamic.html
@@ -0,0 +1,58 @@
+<html>
+<body>
+
+<table cellpadding="10">
+ <tr>
+ <th>0</th>
+ <td><table cellpadding="4" border="7"><tr><td>border="0"</td></tr></table></td>
+ <td><table cellpadding="4" border="7"><tr><td>border="0px"</td></tr></table></td>
+ <td><table cellpadding="4" border="7"><tr><td>border="0em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>1</th>
+ <td><table cellpadding="4" border="0"><tr><td>border="1"</td></tr></table></td>
+ <td><table cellpadding="4" border="0"><tr><td>border="1px"</td></tr></table></td>
+ <td><table cellpadding="4" border="0"><tr><td>border="1em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>2</th>
+ <td><table cellpadding="4" border="3em"><tr><td>border="2"</td></tr></table></td>
+ <td><table cellpadding="4" border="3em"><tr><td>border="2px"</td></tr></table></td>
+ <td><table cellpadding="4" border="3em"><tr><td>border="2em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>3</th>
+ <td><table cellpadding="4" border="0em"><tr><td>border="3"</td></tr></table></td>
+ <td><table cellpadding="4" border="0em"><tr><td>border="3px"</td></tr></table></td>
+ <td><table cellpadding="4" border="0em"><tr><td>border="3em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>10</th>
+ <td><table cellpadding="4" border="0foo"><tr><td>border="10"</td></tr></table></td>
+ <td><table cellpadding="4" border="0foo"><tr><td>border="10px"</td></tr></table></td>
+ <td><table cellpadding="4" border="0foo"><tr><td>border="10em"</td></tr></table></td>
+ </tr>
+</table>
+
+<script>
+
+var tables = document.getElementsByTagName("table");
+var values = [ null, "0", "0px", "0em", "1", "1px", "1em",
+ "2", "2px", "2em", "3", "3px", "3em", "10", "10px", "10em" ];
+if (tables.length == values.length) {
+ for (var i in values) {
+ var table = tables[i];
+ var value = values[i];
+ if (value != null) {
+ // flush
+ getComputedStyle(table.firstChild.firstChild.firstChild, "").borderWidth;
+
+ table.setAttribute("border", value);
+ }
+ }
+}
+
+</script>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/539880-1-ref.html b/layout/reftests/bugs/539880-1-ref.html
new file mode 100644
index 0000000000..8f8a8ac947
--- /dev/null
+++ b/layout/reftests/bugs/539880-1-ref.html
@@ -0,0 +1,38 @@
+<html>
+<body>
+
+<table cellpadding="10">
+ <tr>
+ <th>0</th>
+ <td><table cellpadding="4" border="0"><tr><td>border="0"</td></tr></table></td>
+ <td><table cellpadding="4" border="0"><tr><td>border="0px"</td></tr></table></td>
+ <td><table cellpadding="4" border="0"><tr><td>border="0em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>1</th>
+ <td><table cellpadding="4" border="1"><tr><td>border="1"</td></tr></table></td>
+ <td><table cellpadding="4" border="1"><tr><td>border="1px"</td></tr></table></td>
+ <td><table cellpadding="4" border="1"><tr><td>border="1em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>2</th>
+ <td><table cellpadding="4" border="2"><tr><td>border="2"</td></tr></table></td>
+ <td><table cellpadding="4" border="2"><tr><td>border="2px"</td></tr></table></td>
+ <td><table cellpadding="4" border="2"><tr><td>border="2em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>3</th>
+ <td><table cellpadding="4" border="3"><tr><td>border="3"</td></tr></table></td>
+ <td><table cellpadding="4" border="3"><tr><td>border="3px"</td></tr></table></td>
+ <td><table cellpadding="4" border="3"><tr><td>border="3em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>10</th>
+ <td><table cellpadding="4" border="10"><tr><td>border="10"</td></tr></table></td>
+ <td><table cellpadding="4" border="10"><tr><td>border="10px"</td></tr></table></td>
+ <td><table cellpadding="4" border="10"><tr><td>border="10em"</td></tr></table></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/539880-1.html b/layout/reftests/bugs/539880-1.html
new file mode 100644
index 0000000000..3747c749ab
--- /dev/null
+++ b/layout/reftests/bugs/539880-1.html
@@ -0,0 +1,38 @@
+<html>
+<body>
+
+<table cellpadding="10">
+ <tr>
+ <th>0</th>
+ <td><table cellpadding="4" border="0"><tr><td>border="0"</td></tr></table></td>
+ <td><table cellpadding="4" border="0px"><tr><td>border="0px"</td></tr></table></td>
+ <td><table cellpadding="4" border="0em"><tr><td>border="0em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>1</th>
+ <td><table cellpadding="4" border="1"><tr><td>border="1"</td></tr></table></td>
+ <td><table cellpadding="4" border="1px"><tr><td>border="1px"</td></tr></table></td>
+ <td><table cellpadding="4" border="1em"><tr><td>border="1em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>2</th>
+ <td><table cellpadding="4" border="2"><tr><td>border="2"</td></tr></table></td>
+ <td><table cellpadding="4" border="2px"><tr><td>border="2px"</td></tr></table></td>
+ <td><table cellpadding="4" border="2em"><tr><td>border="2em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>3</th>
+ <td><table cellpadding="4" border="3"><tr><td>border="3"</td></tr></table></td>
+ <td><table cellpadding="4" border="3px"><tr><td>border="3px"</td></tr></table></td>
+ <td><table cellpadding="4" border="3em"><tr><td>border="3em"</td></tr></table></td>
+ </tr>
+ <tr>
+ <th>10</th>
+ <td><table cellpadding="4" border="10"><tr><td>border="10"</td></tr></table></td>
+ <td><table cellpadding="4" border="10px"><tr><td>border="10px"</td></tr></table></td>
+ <td><table cellpadding="4" border="10em"><tr><td>border="10em"</td></tr></table></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/539949-1-ref.html b/layout/reftests/bugs/539949-1-ref.html
new file mode 100644
index 0000000000..3f72d9f711
--- /dev/null
+++ b/layout/reftests/bugs/539949-1-ref.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<div style="height: 10000px;"></div>
+<div style="position: relative;">
+ <div id="test2" style="position:absolute; top:-200px;"></div>
+ <div style="height: 100px; width: 100px; background: blue;"></div>
+</div>
+<div style="height: 10000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/539949-1.html b/layout/reftests/bugs/539949-1.html
new file mode 100644
index 0000000000..c8634788b4
--- /dev/null
+++ b/layout/reftests/bugs/539949-1.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<div style="height: 10000px;"></div>
+<div style="position: relative; overflow:hidden;">
+ <div id="test2" style="position:absolute; top:-200px;"></div>
+ <div style="height: 100px; width: 100px; background: blue;"></div>
+</div>
+<div style="height: 10000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/541382-1-ref.html b/layout/reftests/bugs/541382-1-ref.html
new file mode 100644
index 0000000000..4f6db950dd
--- /dev/null
+++ b/layout/reftests/bugs/541382-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <button style="height: 20px; overflow: hidden; text-indent: 300px; width: 200px;">a</button><br>
+ <button style="height: 20px; overflow: scroll; text-indent: 300px; width: 200px;">b</button><br>
+ <button style="height: 20px; overflow: auto; text-indent: 300px; width: 200px;">c</button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/541382-1.html b/layout/reftests/bugs/541382-1.html
new file mode 100644
index 0000000000..c4ce5919fd
--- /dev/null
+++ b/layout/reftests/bugs/541382-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <button style="height: 20px; overflow: hidden; text-indent: 300px; width: 200px;">text</button><br>
+ <button style="height: 20px; overflow: scroll; text-indent: 300px; width: 200px;">text</button><br>
+ <button style="height: 20px; overflow: auto; text-indent: 300px; width: 200px;">text</button>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-1-ref.html b/layout/reftests/bugs/542116-1-ref.html
new file mode 100644
index 0000000000..1b0852b297
--- /dev/null
+++ b/layout/reftests/bugs/542116-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {
+ -moz-appearance: none;
+ margin: 0;
+ padding: 10px;
+ font-size: 20px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <input type="text" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-1.html b/layout/reftests/bugs/542116-1.html
new file mode 100644
index 0000000000..02cf77b013
--- /dev/null
+++ b/layout/reftests/bugs/542116-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {
+ -moz-appearance: none;
+ margin: 0;
+ padding: 10px;
+ font-size: 40px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <input type="text" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-2-ref.html b/layout/reftests/bugs/542116-2-ref.html
new file mode 100644
index 0000000000..3475b14058
--- /dev/null
+++ b/layout/reftests/bugs/542116-2-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {
+ -moz-appearance: none;
+ margin: 0;
+ padding: 10px;
+ font-size: 20px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <input type="password" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-2.html b/layout/reftests/bugs/542116-2.html
new file mode 100644
index 0000000000..e4c247fb53
--- /dev/null
+++ b/layout/reftests/bugs/542116-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ input {
+ -moz-appearance: none;
+ margin: 0;
+ padding: 10px;
+ font-size: 40px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <input type="password" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-3-ref.html b/layout/reftests/bugs/542116-3-ref.html
new file mode 100644
index 0000000000..07297dc21d
--- /dev/null
+++ b/layout/reftests/bugs/542116-3-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div {
+ margin: 0;
+ padding: 10px;
+ font-size: 20px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ outline: none;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <div contenteditable id="i"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542116-3.html b/layout/reftests/bugs/542116-3.html
new file mode 100644
index 0000000000..b2c935c7f9
--- /dev/null
+++ b/layout/reftests/bugs/542116-3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div {
+ margin: 0;
+ padding: 10px;
+ font-size: 40px;
+ height: 100px;
+ width: 100px;
+ border: 1px solid red;
+ outline: none;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus()">
+ <div contenteditable id="i"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/542317-1-ref.html b/layout/reftests/bugs/542317-1-ref.html
new file mode 100644
index 0000000000..8672c4efd5
--- /dev/null
+++ b/layout/reftests/bugs/542317-1-ref.html
@@ -0,0 +1 @@
+<body onload="frames[0].document.designMode = 'on'; frames[0].focus()"><iframe></iframe></body>
diff --git a/layout/reftests/bugs/542317-1.html b/layout/reftests/bugs/542317-1.html
new file mode 100644
index 0000000000..fdccad6d96
--- /dev/null
+++ b/layout/reftests/bugs/542317-1.html
@@ -0,0 +1 @@
+<body onload="frames[0].focus(); frames[0].document.designMode = 'on'"><iframe></iframe></body>
diff --git a/layout/reftests/bugs/542620-1-ref.html b/layout/reftests/bugs/542620-1-ref.html
new file mode 100644
index 0000000000..c01b176175
--- /dev/null
+++ b/layout/reftests/bugs/542620-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table>
+ <tr><td style="background:lime; width:100px; height:100px;"></td></tr>
+</table>
+<table>
+ <tr><td style="background:lime; width:100px; height:100px;"></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/542620-1.html b/layout/reftests/bugs/542620-1.html
new file mode 100644
index 0000000000..cd6677b44a
--- /dev/null
+++ b/layout/reftests/bugs/542620-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table>
+ <col style="background: lime"></col>
+ <tr><td style="width:100px; height:100px;"></td></tr>
+</table>
+<table>
+ <colgroup style="background: lime"></colgroup>
+ <tr><td style="width:100px; height:100px;"></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/545049-1-ref.html b/layout/reftests/bugs/545049-1-ref.html
new file mode 100644
index 0000000000..3314fbe1ad
--- /dev/null
+++ b/layout/reftests/bugs/545049-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<table>
+ <td style="transform:translateX(10px); width:20px; height:20px; background:lime;">
+ </td>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/545049-1.html b/layout/reftests/bugs/545049-1.html
new file mode 100644
index 0000000000..e8752201bd
--- /dev/null
+++ b/layout/reftests/bugs/545049-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<table>
+ <td id="d" style="transform:translateX(400px); width:20px; height:20px; background:lime;">
+ </td>
+</table>
+<script>
+function doTest() {
+ document.getElementById("d").style.transform = "translateX(10px)";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/546033-1-ref.html b/layout/reftests/bugs/546033-1-ref.html
new file mode 100644
index 0000000000..f0e4395f93
--- /dev/null
+++ b/layout/reftests/bugs/546033-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body style="height:3000px; overflow:hidden;">
+<script>
+document.documentElement.scrollTop = 100;
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/546033-1.html b/layout/reftests/bugs/546033-1.html
new file mode 100644
index 0000000000..ac6c4895d3
--- /dev/null
+++ b/layout/reftests/bugs/546033-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body style="height:3000px; overflow:hidden;">
+<script>
+function doTest() {
+ document.documentElement.scrollTop = 100;
+ document.documentElement.removeAttribute('class');
+}
+window.focus();
+document.documentElement.focus();
+document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/549184-1-ref.html b/layout/reftests/bugs/549184-1-ref.html
new file mode 100644
index 0000000000..bd5610195a
--- /dev/null
+++ b/layout/reftests/bugs/549184-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<span style="border-left:10px solid lime;">&nbsp;</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/549184-1.html b/layout/reftests/bugs/549184-1.html
new file mode 100644
index 0000000000..4898ce8ef7
--- /dev/null
+++ b/layout/reftests/bugs/549184-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<span style="background:lime; padding-left:10px;"></span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/550325-1-ref.html b/layout/reftests/bugs/550325-1-ref.html
new file mode 100644
index 0000000000..d9ebba31fd
--- /dev/null
+++ b/layout/reftests/bugs/550325-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html>
+<body style="padding-left: 30%;"><div style="position: absolute;">X</div></body>
+</html>
diff --git a/layout/reftests/bugs/550325-1.html b/layout/reftests/bugs/550325-1.html
new file mode 100644
index 0000000000..0ea4f154de
--- /dev/null
+++ b/layout/reftests/bugs/550325-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html style="overflow-x: auto;">
+<body style="overflow-x: auto; padding-left: 30%;"><div style="position: absolute;">X</div></body>
+</html>
diff --git a/layout/reftests/bugs/550325-2.html b/layout/reftests/bugs/550325-2.html
new file mode 100644
index 0000000000..4a83be9dd5
--- /dev/null
+++ b/layout/reftests/bugs/550325-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="overflow-x: auto;margin-left:0;margin-right:0">
+<div style="overflow-x: auto; padding-left: 30%;margin-left:8px"><div style="position: absolute;">X</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/550325-3.html b/layout/reftests/bugs/550325-3.html
new file mode 100644
index 0000000000..e40025ba22
--- /dev/null
+++ b/layout/reftests/bugs/550325-3.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html style="overflow-x: auto;">
+<body style="position: absolute; padding-left: 30%;">X</body>
+</html>
diff --git a/layout/reftests/bugs/550716-1-ref.html b/layout/reftests/bugs/550716-1-ref.html
new file mode 100644
index 0000000000..308e5830c0
--- /dev/null
+++ b/layout/reftests/bugs/550716-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="opacity:0.5; margin-top:101px; width:200px; height:100px; background:yellow;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/550716-1.html b/layout/reftests/bugs/550716-1.html
new file mode 100644
index 0000000000..fef3360b62
--- /dev/null
+++ b/layout/reftests/bugs/550716-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="opacity:0.5; margin-top:100.5px; width:200px; height:100px; background:yellow;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/550882-1-ref.html b/layout/reftests/bugs/550882-1-ref.html
new file mode 100644
index 0000000000..5a928ed389
--- /dev/null
+++ b/layout/reftests/bugs/550882-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%'>
+ <body style='margin: 0; padding: 0; height: 100%'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/550882-1.html b/layout/reftests/bugs/550882-1.html
new file mode 100644
index 0000000000..3a129aed16
--- /dev/null
+++ b/layout/reftests/bugs/550882-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%'>
+ <body style='margin: 0; padding: 0; height: 100%; overflow: hidden'
+ onload='document.body.offsetWidth;
+ document.body.style.overflow=&quot;&quot;'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/550882-2-ref.html b/layout/reftests/bugs/550882-2-ref.html
new file mode 100644
index 0000000000..bb168d4c25
--- /dev/null
+++ b/layout/reftests/bugs/550882-2-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html></html>"></iframe>
diff --git a/layout/reftests/bugs/550882-2.html b/layout/reftests/bugs/550882-2.html
new file mode 100644
index 0000000000..300808f341
--- /dev/null
+++ b/layout/reftests/bugs/550882-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<iframe src="data:text/html,<html style='height: 100%'>
+ <body style='margin: 0; padding: 0; height: 100%; overflow: visible'
+ onload='document.body.offsetWidth;
+ document.body.style.overflow=&quot;hidden&quot;'>
+ <div style='width: 200%; height: 200%'></div>
+ </body>
+</html>"></iframe>
diff --git a/layout/reftests/bugs/551463-1-ref.html b/layout/reftests/bugs/551463-1-ref.html
new file mode 100644
index 0000000000..f67e6b784b
--- /dev/null
+++ b/layout/reftests/bugs/551463-1-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="display:-moz-box; width:400px;">
+ <div id="d" style="overflow:auto; height:100px; width:400px; font-size:20px;">
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ <span style="font-size:22px;">Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.</span>
+ </div>
+</div>
+<script>
+var d = document.getElementById("d");
+d.scrollTop = 200;
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/551463-1.html b/layout/reftests/bugs/551463-1.html
new file mode 100644
index 0000000000..326f796e1e
--- /dev/null
+++ b/layout/reftests/bugs/551463-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="display:-moz-box; width:400px;">
+ <div id="d" style="overflow:auto; height:100px; width:400px; font-size:20px;">
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ <span id="s">Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.
+ Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty. Hello Kitty.</span>
+ </div>
+</div>
+<script>
+var d = document.getElementById("d");
+d.scrollTop = 200;
+/* Force the scrolled div d to be reflowed. We want to check that calculation
+ of the XUL preferred width doesn't temporarily give d a small height
+ and cause d to clamp the scroll position */
+var s = document.getElementById("s");
+s.style.fontSize = "22px";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/551699-1-ref.html b/layout/reftests/bugs/551699-1-ref.html
new file mode 100644
index 0000000000..1f81b34f38
--- /dev/null
+++ b/layout/reftests/bugs/551699-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table>
+ <tr>
+ <td>
+ <div style="position: absolute;">Text</div>
+ <div style="display: block; width: 100px; height: 100px;"></div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/551699-1.html b/layout/reftests/bugs/551699-1.html
new file mode 100644
index 0000000000..a97921c4fd
--- /dev/null
+++ b/layout/reftests/bugs/551699-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table>
+ <tr>
+ <td>
+ <div style="position: absolute;">Text</div>
+ <div style="display: inline-block; width: 100px; height: 100px;"></div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/552334-1-ref.html b/layout/reftests/bugs/552334-1-ref.html
new file mode 100644
index 0000000000..a139827f2c
--- /dev/null
+++ b/layout/reftests/bugs/552334-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { position: absolute; top: 0; left: 0; width: 100px; height: 100px; }
+ div.offset { left: 100px; }
+ div.offset2 { left: 200px; }
+ </style>
+ </head>
+ <body>
+ <div style="background: green"></div>
+ <div class="offset" style="background: green"></div>
+ <div class="offset2" style="background: green"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/552334-1.html b/layout/reftests/bugs/552334-1.html
new file mode 100644
index 0000000000..66f426e09b
--- /dev/null
+++ b/layout/reftests/bugs/552334-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { position: absolute; top: 0; left: 0; width: 100px; height: 100px; }
+ div.offset { left: 100px; }
+ div.offset2 { left: 200px; }
+ </style>
+ </head>
+ <body>
+ <!-- Make sure the difference of the two z-index values overflows a 32-bit
+ signed int. So set the positive one to 2^30 + 1 and the negative one to
+ -(2^30 + 1). Then the difference is 2^31 + 2 which is negative when
+ treated as a 32-bit signed int. -->
+ <div style="background: green; z-index: 1073741825"></div>
+ <div style="background: red; z-index: -1073741825"></div>
+ <!-- Test clamping on the high end by setting the high z-index to
+ 2^32 + 1 -->
+ <div class="offset" style="background: green; z-index: 4294967297"></div>
+ <div class="offset" style="background: red; z-index: 2"></div>
+ <!-- Test clamping on the low end by setting the low z-index to
+ -(2^32 + 1) -->
+ <div class="offset2" style="background: green; z-index: -2"></div>
+ <div class="offset2" style="background: red; z-index: -4294967297"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/553571-1-notref.html b/layout/reftests/bugs/553571-1-notref.html
new file mode 100644
index 0000000000..c3bf1f8f7e
--- /dev/null
+++ b/layout/reftests/bugs/553571-1-notref.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+&#xD94;&#x200C;&#xDD8;
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/553571-1.html b/layout/reftests/bugs/553571-1.html
new file mode 100644
index 0000000000..0eb6faa48b
--- /dev/null
+++ b/layout/reftests/bugs/553571-1.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+&#xD94;&#xDD8;
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/555388-1-ref.html b/layout/reftests/bugs/555388-1-ref.html
new file mode 100644
index 0000000000..bc524566a7
--- /dev/null
+++ b/layout/reftests/bugs/555388-1-ref.html
@@ -0,0 +1,27 @@
+<html>
+ <head>
+ <script type="application/javascript">
+function draw() {
+ var canvas = document.getElementById("canvas");
+ var ctx = canvas.getContext("2d");
+
+ ctx.fillStyle = "red";
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(300, 0);
+ ctx.lineTo(300, 300);
+ ctx.lineTo(0, 300);
+ ctx.lineTo(0, 0);
+ ctx.moveTo(30, 30);
+ ctx.lineTo(30, 150);
+ ctx.lineTo(150, 150);
+ ctx.lineTo(149, 30);
+ ctx.lineTo(30, 30);
+ ctx.fill();
+}
+ </script>
+ </head>
+<body onload="draw()">
+ <canvas id="canvas" width="300" height="300"></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/555388-1.html b/layout/reftests/bugs/555388-1.html
new file mode 100644
index 0000000000..3b7f103da3
--- /dev/null
+++ b/layout/reftests/bugs/555388-1.html
@@ -0,0 +1,33 @@
+<html>
+ <head>
+ <script type="application/javascript">
+function draw() {
+ var canvas = document.getElementById("canvas");
+ var ctx = canvas.getContext("2d");
+
+ ctx.fillStyle = "red";
+ ctx.fillRect(0, 0, 500, 500);
+ ctx.save();
+ ctx.beginPath();
+ ctx.moveTo(30, 30);
+ ctx.lineTo(149, 30);
+ ctx.lineTo(150, 150);
+ ctx.lineTo(30, 150);
+ ctx.lineTo(30, 30);
+ ctx.clip();
+ ctx.clearRect(0, 0, 500, 500);
+ /**
+ * Work around a strange left edge offset problem in D2D.
+ */
+ ctx.restore();
+ ctx.fillStyle = "red";
+ ctx.fillRect(0, 0, 1, 500);
+ ctx.fillStyle = "white";
+ ctx.fillRect(30, 30, 1, 120);
+}
+ </script>
+ </head>
+<body onload="draw()">
+ <canvas id="canvas" width="300" height="300"></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/556661-1-ref.html b/layout/reftests/bugs/556661-1-ref.html
new file mode 100644
index 0000000000..f960b6c84f
--- /dev/null
+++ b/layout/reftests/bugs/556661-1-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html><head><title>Dynamic manipulation of !important</title>
+<style>
+div { float: left; width: 50px; height: 50px; margin: 5px;
+ background-color: green }
+div#control { width: 230px }
+p { clear: left }
+</style>
+<body>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<p></p>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<p></p>
+<div id="control"></div>
+<p>There should be two rows of four green squares and one solid green
+ bar above.</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/556661-1.html b/layout/reftests/bugs/556661-1.html
new file mode 100644
index 0000000000..1941e0b876
--- /dev/null
+++ b/layout/reftests/bugs/556661-1.html
@@ -0,0 +1,63 @@
+<!doctype html>
+<html><head><title>Dynamic manipulation of !important</title>
+<style>
+div { float: left; width: 50px; height: 50px; margin: 5px }
+div#control {
+ width: 230px;
+ background-color: green !important;
+ background-color: red;
+}
+div#a { background-color: green }
+div#b { background-color: orange }
+div.c { background-color: orange }
+div#d { background-color: orange }
+div#e { background-color: green }
+div#f { background-color: orange }
+div.g { background-color: orange }
+div#h { background-color: orange }
+p { clear: left }
+</style>
+<style>
+div.a { background-color: red !important }
+div.b { background-color: red !important }
+div#c { background-color: red }
+div.d { background-color: red }
+div.e { background-color: red !important }
+div.f { background-color: red !important }
+div#g { background-color: red }
+div.h { background-color: red }
+</style>
+<script>
+window.onload = function() {
+ var r = document.styleSheets[1].cssRules;
+ r[0].style.setProperty("background-color", "yellow", "");
+ r[1].style.setProperty("background-color", "green", "important");
+ r[2].style.setProperty("background-color", "green", "");
+ r[3].style.setProperty("background-color", "green", "important");
+
+ r[4].style.removeProperty("background-color");
+ r[4].style.setProperty("background-color", "yellow", "");
+ r[5].style.removeProperty("background-color");
+ r[5].style.setProperty("background-color", "green", "important");
+ r[6].style.removeProperty("background-color");
+ r[6].style.setProperty("background-color", "green", "");
+ r[7].style.removeProperty("background-color");
+ r[7].style.setProperty("background-color", "green", "important");
+}
+</script>
+<body>
+<div class="a" id="a"></div>
+<div class="b" id="b"></div>
+<div class="c" id="c"></div>
+<div class="d" id="d"></div>
+<p></p>
+<div class="e" id="e"></div>
+<div class="f" id="f"></div>
+<div class="g" id="g"></div>
+<div class="h" id="h"></div>
+<p></p>
+<div id="control"></div>
+<p>There should be two rows of four green squares and one solid green
+ bar above.</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/557087-1.html b/layout/reftests/bugs/557087-1.html
new file mode 100644
index 0000000000..f860dafef7
--- /dev/null
+++ b/layout/reftests/bugs/557087-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset disabled>
+ <input type='file'>
+ <input type='checkbox'>
+ <input type='radio'>
+ <input type='number'>
+ <input>
+ <button>foo</button>
+ <textarea></textarea>
+ <select><option>foo</option></select>
+ <fieldset></fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/557087-2.html b/layout/reftests/bugs/557087-2.html
new file mode 100644
index 0000000000..dfb0eccf9f
--- /dev/null
+++ b/layout/reftests/bugs/557087-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <body onload="document.getElementsByTagName('fieldset')[0].disabled = true;
+ document.documentElement.className='';">
+ <fieldset>
+ <input type='file'>
+ <input type='checkbox'>
+ <input type='radio'>
+ <input type='number'>
+ <input>
+ <button>foo</button>
+ <textarea></textarea>
+ <select><option>foo</option></select>
+ <fieldset></fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/557087-ref.html b/layout/reftests/bugs/557087-ref.html
new file mode 100644
index 0000000000..5a60c625d7
--- /dev/null
+++ b/layout/reftests/bugs/557087-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset disabled>
+ <input type='file' disabled>
+ <input type='checkbox' disabled>
+ <input type='radio' disabled>
+ <input type='number' disabled>
+ <input disabled>
+ <button disabled>foo</button>
+ <textarea disabled></textarea>
+ <select disabled><option>foo</option></select>
+ <fieldset disabled></fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/557736-1-ref.html b/layout/reftests/bugs/557736-1-ref.html
new file mode 100644
index 0000000000..c4c3fae7a7
--- /dev/null
+++ b/layout/reftests/bugs/557736-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>557736 Test Page</title>
+</head>
+<body>
+ <font face="bogus">bogus</font>
+ <font face="bogus">bogus</font>
+</body></html>
diff --git a/layout/reftests/bugs/557736-1.html b/layout/reftests/bugs/557736-1.html
new file mode 100644
index 0000000000..3cbf2dd1e4
--- /dev/null
+++ b/layout/reftests/bugs/557736-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>557736 Test Page</title>
+</head>
+<body>
+ <!-- This ends up as ["bogus", "serif"] -->
+ <font face="bogus">bogus</font>
+ <!-- This ends up as ["bogus", ",serif"] -->
+ <font face="bogus,">bogus</font>
+</body></html>
diff --git a/layout/reftests/bugs/558011-1-ref.xhtml b/layout/reftests/bugs/558011-1-ref.xhtml
new file mode 100644
index 0000000000..5a6c019f06
--- /dev/null
+++ b/layout/reftests/bugs/558011-1-ref.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox flex="1" style="direction: rtl;">
+<richlistbox style="width: 100px; direction: ltr;">
+<item>this is a really really really really long test sentence</item>
+</richlistbox>
+<splitter/>
+<browser flex="1" src="" type="content" primary="true"/>
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/558011-1.xhtml b/layout/reftests/bugs/558011-1.xhtml
new file mode 100644
index 0000000000..3c972995df
--- /dev/null
+++ b/layout/reftests/bugs/558011-1.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox flex="1" style="direction: rtl;">
+<richlistbox style="width: 100px; direction: rtl;">
+<item>this is a really really really really long test sentence</item>
+</richlistbox>
+<splitter/>
+<browser flex="1" src="" type="content" primary="true"/>
+</hbox>
+
+</window>
diff --git a/layout/reftests/bugs/559284-1-ref.html b/layout/reftests/bugs/559284-1-ref.html
new file mode 100644
index 0000000000..85298a9183
--- /dev/null
+++ b/layout/reftests/bugs/559284-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<body>
+ -<div>section</div>
+ -<div>nav</div>
+ -<div>article</div>
+ -<div>aside</div>
+ -<div>hgroup</div>
+ -<div>header</div>
+ -<div>footer</div>
+ -
+</body>
+
diff --git a/layout/reftests/bugs/559284-1.html b/layout/reftests/bugs/559284-1.html
new file mode 100644
index 0000000000..43b7198936
--- /dev/null
+++ b/layout/reftests/bugs/559284-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<body>
+ -<section>section</section>
+ -<nav>nav</nav>
+ -<article>article</article>
+ -<aside>aside</aside>
+ -<hgroup>hgroup</hgroup>
+ -<header>header</header>
+ -<footer>footer</footer>
+ -
+</body>
diff --git a/layout/reftests/bugs/561981-1-ref.html b/layout/reftests/bugs/561981-1-ref.html
new file mode 100644
index 0000000000..1f2d3710a2
--- /dev/null
+++ b/layout/reftests/bugs/561981-1-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-1.html b/layout/reftests/bugs/561981-1.html
new file mode 100644
index 0000000000..f9f9acf278
--- /dev/null
+++ b/layout/reftests/bugs/561981-1.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<head>
+<script>
+function runtest() {
+ var i = document.getElementById("i");
+ i.style.display = "none";
+ i.style.display = "";
+ document.documentElement.offsetLeft;
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="runtest();">
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-2-ref.html b/layout/reftests/bugs/561981-2-ref.html
new file mode 100644
index 0000000000..5d5c322559
--- /dev/null
+++ b/layout/reftests/bugs/561981-2-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" style="display: none;" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-2.html b/layout/reftests/bugs/561981-2.html
new file mode 100644
index 0000000000..76ab9cc899
--- /dev/null
+++ b/layout/reftests/bugs/561981-2.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<head>
+<script>
+function runtest() {
+ var i = document.getElementById("i");
+ i.style.display = "";
+ i.style.display = "none";
+ document.documentElement.offsetLeft;
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="runtest();">
+<iframe id="i" style="display: none;" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-3-ref.html b/layout/reftests/bugs/561981-3-ref.html
new file mode 100644
index 0000000000..1f2d3710a2
--- /dev/null
+++ b/layout/reftests/bugs/561981-3-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-3.html b/layout/reftests/bugs/561981-3.html
new file mode 100644
index 0000000000..1e02995aab
--- /dev/null
+++ b/layout/reftests/bugs/561981-3.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<head>
+<script>
+function runtest() {
+ var i = document.getElementById("i");
+ i.parentNode.style.display = "none";
+ i.parentNode.style.display = "";
+ document.documentElement.offsetLeft;
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body onload="runtest();">
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-4-ref.html b/layout/reftests/bugs/561981-4-ref.html
new file mode 100644
index 0000000000..2d6a3fde77
--- /dev/null
+++ b/layout/reftests/bugs/561981-4-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body style="display: none;">
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-4.html b/layout/reftests/bugs/561981-4.html
new file mode 100644
index 0000000000..a0845b52dd
--- /dev/null
+++ b/layout/reftests/bugs/561981-4.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<head>
+<script>
+function runtest() {
+ var i = document.getElementById("i");
+ i.parentNode.style.display = "";
+ i.parentNode.style.display = "none";
+ document.documentElement.offsetLeft;
+ document.documentElement.className = "";
+}
+</script>
+</head>
+<body style="display: none;" onload="runtest();">
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-5-ref.html b/layout/reftests/bugs/561981-5-ref.html
new file mode 100644
index 0000000000..1f2d3710a2
--- /dev/null
+++ b/layout/reftests/bugs/561981-5-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-5.html b/layout/reftests/bugs/561981-5.html
new file mode 100644
index 0000000000..96d3eee5c5
--- /dev/null
+++ b/layout/reftests/bugs/561981-5.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+<script>
+var i = document.getElementById("i");
+i.style.display = "none";
+i.style.display = "";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-6-ref.html b/layout/reftests/bugs/561981-6-ref.html
new file mode 100644
index 0000000000..5d5c322559
--- /dev/null
+++ b/layout/reftests/bugs/561981-6-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" style="display: none;" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-6.html b/layout/reftests/bugs/561981-6.html
new file mode 100644
index 0000000000..a634d512dd
--- /dev/null
+++ b/layout/reftests/bugs/561981-6.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" style="display: none;" src="data:text/html,text">
+<script>
+var i = document.getElementById("i");
+i.style.display = "";
+i.style.display = "none";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-7-ref.html b/layout/reftests/bugs/561981-7-ref.html
new file mode 100644
index 0000000000..1f2d3710a2
--- /dev/null
+++ b/layout/reftests/bugs/561981-7-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-7.html b/layout/reftests/bugs/561981-7.html
new file mode 100644
index 0000000000..5920bbfca5
--- /dev/null
+++ b/layout/reftests/bugs/561981-7.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+</head>
+<body>
+<iframe id="i" src="data:text/html,text">
+<script>
+var i = document.getElementById("i");
+i.parentNode.style.display = "none";
+i.parentNode.style.display = "";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-8-ref.html b/layout/reftests/bugs/561981-8-ref.html
new file mode 100644
index 0000000000..2d6a3fde77
--- /dev/null
+++ b/layout/reftests/bugs/561981-8-ref.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body style="display: none;">
+<iframe id="i" src="data:text/html,text">
+</body>
+</html>
diff --git a/layout/reftests/bugs/561981-8.html b/layout/reftests/bugs/561981-8.html
new file mode 100644
index 0000000000..6ed4ade9da
--- /dev/null
+++ b/layout/reftests/bugs/561981-8.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+</head>
+<body style="display: none;">
+<iframe id="i" src="data:text/html,text">
+<script>
+ var i = document.getElementById("i");
+ i.parentNode.style.display = "";
+ i.parentNode.style.display = "none";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/562835-1.html b/layout/reftests/bugs/562835-1.html
new file mode 100644
index 0000000000..26b3d6b80d
--- /dev/null
+++ b/layout/reftests/bugs/562835-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Fonts and margins of HTML headers</title>
+<style type="text/css">
+
+div { border: medium solid blue }
+
+</style>
+
+<div><h1>Level 1</h1></div>
+<div><h2>Level 2</h2></div>
+<div><h3>Level 3</h3></div>
+<div><h4>Level 4</h4></div>
+<div><h5>Level 5</h5></div>
+<div><h6>Level 6</h6></div>
diff --git a/layout/reftests/bugs/562835-2.html b/layout/reftests/bugs/562835-2.html
new file mode 100644
index 0000000000..c0bb55f0b3
--- /dev/null
+++ b/layout/reftests/bugs/562835-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<title>Fonts and margins of HTML headers</title>
+<style type="text/css">
+
+div { border: medium solid blue }
+
+</style>
+
+<div><h1>Level 1</h1></div>
+<article>
+<div><h1>Level 2</h1></div>
+<nav>
+<div><h1>Level 3</h1></div>
+</nav>
+<section>
+<aside>
+<div><h1>Level 4</h1></div>
+</aside>
+</section>
+<section>
+<nav>
+<nav>
+<div><h1>Level 5</h1></div>
+<aside>
+<div><h1>Level 6</h1></div>
+</aside>
+</nav>
+</nav>
+</section>
+</article>
diff --git a/layout/reftests/bugs/562835-ref.html b/layout/reftests/bugs/562835-ref.html
new file mode 100644
index 0000000000..b8ee4c7100
--- /dev/null
+++ b/layout/reftests/bugs/562835-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<title>Fonts and margins of HTML headers</title>
+<style type="text/css">
+
+body > div { border: medium solid blue }
+body > div > div { font-weight: bold }
+
+</style>
+
+<div><div style="font-size: 2.00em; margin: 0.67em 0">Level 1</div></div>
+<div><div style="font-size: 1.50em; margin: 0.83em 0">Level 2</div></div>
+<div><div style="font-size: 1.17em; margin: 1.00em 0">Level 3</div></div>
+<div><div style="font-size: 1.00em; margin: 1.33em 0">Level 4</div></div>
+<div><div style="font-size: 0.83em; margin: 1.67em 0">Level 5</div></div>
+<div><div style="font-size: 0.67em; margin: 2.33em 0">Level 6</div></div>
diff --git a/layout/reftests/bugs/563584-1-ref.html b/layout/reftests/bugs/563584-1-ref.html
new file mode 100644
index 0000000000..70612e44e2
--- /dev/null
+++ b/layout/reftests/bugs/563584-1-ref.html
@@ -0,0 +1,24 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, reftest-print version of original testcase</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in">
+ <div style="width:1in; height:2.5in;">A</div>
+ <div style="width:1in; height:0.4in;">B</div>
+</div>
+
+
+<div style="width:3in; height: 0.4in">C</div>
+
+<div style="width:3in; height: 0.4in">D</div>
diff --git a/layout/reftests/bugs/563584-1.html b/layout/reftests/bugs/563584-1.html
new file mode 100644
index 0000000000..7dc6cb41ea
--- /dev/null
+++ b/layout/reftests/bugs/563584-1.html
@@ -0,0 +1,24 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, reftest-print version of original testcase</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in; float:left">
+ <div style="width:1in; height:2.5in;">A</div>
+ <div style="width:1in; height:0.4in;">B</div>
+</div>
+
+
+<div style="float:left; width:3in; height: 0.4in">C</div>
+
+<div style="float:left; width:3in; height: 0.4in">D</div>
diff --git a/layout/reftests/bugs/563584-10-ref.html b/layout/reftests/bugs/563584-10-ref.html
new file mode 100644
index 0000000000..87f2dfda63
--- /dev/null
+++ b/layout/reftests/bugs/563584-10-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test that nsFloatManager::ClearFloats calls ClearContinues</title>
+<body style="margin: 0">
+<div style="background: aqua; height: 1in; width: 1in"></div>
+<div style="page-break-before: always; background: fuchsia; height: 1.5in; width: 1in"></div>
+<div style="height: 0.25in; background: yellow; width: 1in"></div>
diff --git a/layout/reftests/bugs/563584-10a.html b/layout/reftests/bugs/563584-10a.html
new file mode 100644
index 0000000000..9dbbc06f6b
--- /dev/null
+++ b/layout/reftests/bugs/563584-10a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test that nsFloatManager::ClearFloats calls ClearContinues</title>
+<body style="margin: 0">
+<div style="float: left;">
+ <div>
+ <div style="display:inline-block; vertical-align: top; background: aqua; height: 1in; width: 1in"></div>
+ </div>
+ <div>
+ <div style="display:inline-block; vertical-align: top; background: fuchsia; height: 1.5in; width: 1in"></div>
+ </div>
+</div>
+<div style="float: left; clear: left; height: 0.25in; background: yellow; width: 1in"></div>
diff --git a/layout/reftests/bugs/563584-10b.html b/layout/reftests/bugs/563584-10b.html
new file mode 100644
index 0000000000..7f5dc7c854
--- /dev/null
+++ b/layout/reftests/bugs/563584-10b.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test that nsFloatManager::ClearFloats calls ClearContinues</title>
+<body style="margin: 0">
+<div style="float: left;">
+ <div>
+ <div style="display:inline-block; vertical-align: top; background: aqua; height: 1in; width: 1in"></div>
+ </div>
+ <div>
+ <div style="display:inline-block; vertical-align: top; background: fuchsia; height: 1.5in; width: 1in"></div>
+ </div>
+</div>
+<div style="clear: left; height: 0.25in; background: yellow; width: 1in"></div>
diff --git a/layout/reftests/bugs/563584-11-ref.html b/layout/reftests/bugs/563584-11-ref.html
new file mode 100644
index 0000000000..8494766abd
--- /dev/null
+++ b/layout/reftests/bugs/563584-11-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test that mIsTopOfPage is not set when clearing</title>
+<body style="margin: 0">
+<div style="background: aqua; height: 1in; width: 1in"></div>
+<div style="background: fuchsia; height: 1.5in; width: 1in; page-break-before: always"></div>
diff --git a/layout/reftests/bugs/563584-11.html b/layout/reftests/bugs/563584-11.html
new file mode 100644
index 0000000000..789d44c889
--- /dev/null
+++ b/layout/reftests/bugs/563584-11.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test that mIsTopOfPage is not set when clearing</title>
+<body style="margin: 0">
+<div style="float: left; background: aqua; height: 1in; width: 1in"></div>
+<div style="clear: left">
+ <div style="display:inline-block; vertical-align: top; background: fuchsia; height: 1.5in; width: 1in"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-2-ref.html b/layout/reftests/bugs/563584-2-ref.html
new file mode 100644
index 0000000000..05e9fdf8c0
--- /dev/null
+++ b/layout/reftests/bugs/563584-2-ref.html
@@ -0,0 +1,25 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, reftest-print version of original testcase, with anchor points</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="height: 0; margin-left: 2in; border: none; padding-left: 2px">c d e</div>
+<div style="width:2in;">
+ <div style="width:1in; height:2.5in;">A</div>
+ <div style="width:1in; height:0.4in;">B</div>
+</div>
+
+
+<div style="width:3in; height: 0.4in">C</div>
+
+<div style="width:3in; height: 0.4in">D</div>
diff --git a/layout/reftests/bugs/563584-2.html b/layout/reftests/bugs/563584-2.html
new file mode 100644
index 0000000000..4e2d77ebea
--- /dev/null
+++ b/layout/reftests/bugs/563584-2.html
@@ -0,0 +1,26 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, reftest-print version of original testcase, with anchor points</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in; float:left">
+ <div style="width:1in; height:2.5in;">A</div>
+ <div style="width:1in; height:0.4in;">B</div>
+</div>
+c
+
+<div style="float:left; width:3in; height: 0.4in">C</div>
+d
+
+<div style="float:left; width:3in; height: 0.4in">D</div>
+e
diff --git a/layout/reftests/bugs/563584-3-ref.html b/layout/reftests/bugs/563584-3-ref.html
new file mode 100644
index 0000000000..5f0563fcf1
--- /dev/null
+++ b/layout/reftests/bugs/563584-3-ref.html
@@ -0,0 +1,24 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, variant split over three pages</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in">
+ <div style="width:1in; height:3.5in;">A</div>
+ <div style="width:1in; height:0.5in;">B</div>
+</div>
+
+
+<div style="width:3in; height: 0.5in">C</div>
+
+<div style="width:3in; height: 0.5in">D</div>
diff --git a/layout/reftests/bugs/563584-3.html b/layout/reftests/bugs/563584-3.html
new file mode 100644
index 0000000000..c70013c617
--- /dev/null
+++ b/layout/reftests/bugs/563584-3.html
@@ -0,0 +1,24 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, variant split over three pages</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in; float:left">
+ <div style="width:1in; height:3.5in;">A</div>
+ <div style="width:1in; height:0.5in;">B</div>
+</div>
+
+
+<div style="float:left; width:3in; height: 0.5in">C</div>
+
+<div style="float:left; width:3in; height: 0.5in">D</div>
diff --git a/layout/reftests/bugs/563584-4-ref.html b/layout/reftests/bugs/563584-4-ref.html
new file mode 100644
index 0000000000..5cc6c3aef3
--- /dev/null
+++ b/layout/reftests/bugs/563584-4-ref.html
@@ -0,0 +1,24 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, variant split over three pages, with anchor points</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="height: 0; margin-left: 2in; border: none; padding-left: 2px">c d e</div>
+<div style="width:2in;">
+ <div style="width:1in; height:3.5in;">A</div>
+ <div style="width:1in; height:0.5in;">B</div>
+</div>
+
+<div style="width:3in; height: 0.5in">C</div>
+
+<div style="width:3in; height: 0.5in">D</div>
diff --git a/layout/reftests/bugs/563584-4.html b/layout/reftests/bugs/563584-4.html
new file mode 100644
index 0000000000..5e5c14dff5
--- /dev/null
+++ b/layout/reftests/bugs/563584-4.html
@@ -0,0 +1,26 @@
+<html class="reftest-paged">
+<head>
+<title>Bug 563584, variant split over three pages, with anchor points</title>
+<style type="text/css">
+
+ div{
+ border: 1px solid green;
+ }
+
+
+ </style>
+</head>
+<body>
+
+
+<div style="width:2in; float:left">
+ <div style="width:1in; height:3.5in;">A</div>
+ <div style="width:1in; height:0.5in;">B</div>
+</div>
+c
+
+<div style="float:left; width:3in; height: 0.5in">C</div>
+d
+
+<div style="float:left; width:3in; height: 0.5in">D</div>
+e
diff --git a/layout/reftests/bugs/563584-5-ref.html b/layout/reftests/bugs/563584-5-ref.html
new file mode 100644
index 0000000000..5b1b8fefcc
--- /dev/null
+++ b/layout/reftests/bugs/563584-5-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for handling of float that is reflowed and then entirely pushed</title>
+<body style="margin: 0">
+<div style="background: blue; height: 1.75in"></div>
+<div style="page-break-before: always; background: yellow; padding-top: 1in; width: 3in">
+ <div>hello</div>
+</div>
diff --git a/layout/reftests/bugs/563584-5.html b/layout/reftests/bugs/563584-5.html
new file mode 100644
index 0000000000..9b9b8ed5ec
--- /dev/null
+++ b/layout/reftests/bugs/563584-5.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for handling of float that is reflowed and then entirely pushed</title>
+<body style="margin: 0">
+<div style="background: blue; height: 1.75in"></div>
+<div style="float: left; background: yellow; width: 3in">
+ <span style="display:inline-block; height: 1in; width: 1in; vertical-align: top"></span>
+ <div>hello</div>
+</div>
diff --git a/layout/reftests/bugs/563584-6-columns-ref.html b/layout/reftests/bugs/563584-6-columns-ref.html
new file mode 100644
index 0000000000..56ecf414f7
--- /dev/null
+++ b/layout/reftests/bugs/563584-6-columns-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>Testcase for float breaking</title>
+<body style="margin: 0">
+ <div style="position: absolute; top: 0; left: 0; width: 150px; height: 100px; background: blue"></div>
+ <div style="position: absolute; top: 100px; left: 0; width: 75px; height: 125px; background: aqua"></div>
+ <div style="position: absolute; top: 100px; left: 75px; width: 100px; height: 125px; background: fuchsia"></div>
+ <div style="position: absolute; top: 0px; left: 200px; width: 75px; height: 75px; background: aqua"></div>
+ <div style="position: absolute; top: 0; left: 275px; width: 100px; height: 225px; background: fuchsia"></div>
diff --git a/layout/reftests/bugs/563584-6-columns.html b/layout/reftests/bugs/563584-6-columns.html
new file mode 100644
index 0000000000..92025f3d3c
--- /dev/null
+++ b/layout/reftests/bugs/563584-6-columns.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<title>Testcase for float breaking</title>
+<body style="column-count: 2; column-gap: 0; margin: 0; width: 400px; height: 400px">
+<!-- two columns, each 200px wide and 400px tall -->
+ <div style="float: left; width: 150px; height: 100px; background: blue"></div>
+ <div style="float: left; width: 75px; height: 200px; background: aqua"></div>
+ <!-- test to see where this float goes -->
+ <div style="float: left; width: 100px; height: 350px; background: fuchsia"></div>
+
diff --git a/layout/reftests/bugs/563584-6-printing-ref.html b/layout/reftests/bugs/563584-6-printing-ref.html
new file mode 100644
index 0000000000..8b0d6905ab
--- /dev/null
+++ b/layout/reftests/bugs/563584-6-printing-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Testcase for float breaking (reference)</title>
+<body style="margin: 0">
+<div style="width: 3.5in; height: 0.5in; background: blue"></div>
+<div>
+ <div style="display: inline-block; vertical-align: top; height: 1in; width: 1in; background: aqua"></div
+ ><div style="display: inline-block; vertical-align: top; height: 1in; width: 2in; background: fuchsia"></div>
+</div>
+<div>
+ <div style="display: inline-block; vertical-align: top; height: 0.5in; width: 1in"></div
+ ><div style="display: inline-block; vertical-align: top; height: 0.5in; width: 2in; background: fuchsia"></div>
+</div>
+<div style="page-break-before: always">
+ <!-- FIXME: uncomment this when bug 511551 is fixed
+ <div style="display: inline-block; vertical-align: top; height: 0.25in; width: 1in"></div
+ >--><div style="display: inline-block; vertical-align: top; height: 0.25in; width: 2in; background: fuchsia"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-6-printing.html b/layout/reftests/bugs/563584-6-printing.html
new file mode 100644
index 0000000000..ad019ff0bc
--- /dev/null
+++ b/layout/reftests/bugs/563584-6-printing.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Testcase for float breaking</title>
+<body style="margin: 0">
+<div style="float: left; width: 3.5in; height: 0.5in; background: blue"></div>
+<div style="float: left; width: 1in; height: 1in; background: aqua"></div>
+<!-- test to see where this float goes -->
+<div style="float: left; width: 2in; height: 1.75in; background: fuchsia"></div>
+
diff --git a/layout/reftests/bugs/563584-7-ref.html b/layout/reftests/bugs/563584-7-ref.html
new file mode 100644
index 0000000000..b90c7d7d7f
--- /dev/null
+++ b/layout/reftests/bugs/563584-7-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body style="margin: 0">
+<div>
+ <div style="display: inline-block; background: yellow; width: 1in; height: 1in; vertical-align: top"></div
+ ><div style="display: inline-block; background: aqua; width: 2in; height: 1in; vertical-align: top"></div>
+</div>
+<div>
+ <div style="display: inline-block; width: 1in; height: 1in; vertical-align: top"></div
+ ><div style="display: inline-block; background: aqua; width: 2in; height: 1in; vertical-align: top"></div>
+</div>
+<div style="page-break-before:always">
+ <!-- FIXME: uncomment this when bug 511551 is fixed
+ <div style="display: inline-block; width: 1in; height: 2in; vertical-align: top"></div
+ >--><div style="display: inline-block; background: aqua; width: 2in; height: 2in; vertical-align: top"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-7.html b/layout/reftests/bugs/563584-7.html
new file mode 100644
index 0000000000..156d56dcc3
--- /dev/null
+++ b/layout/reftests/bugs/563584-7.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<body style="margin: 0">
+<div style="float: left; background: yellow; width: 1in; height: 1in"></div>
+<div style="float: left; background: aqua; width: 2in; height: 4in"></div>
diff --git a/layout/reftests/bugs/563584-8a-ref.html b/layout/reftests/bugs/563584-8a-ref.html
new file mode 100644
index 0000000000..60e5fdc1ed
--- /dev/null
+++ b/layout/reftests/bugs/563584-8a-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="height: 2in; width: 1in; background: aqua"></div>
+<div style="height: 1in; width: 1in; background: aqua; page-break-before: always"></div>
+<div style="height: 1in; width: 1in; background: yellow"></div>
diff --git a/layout/reftests/bugs/563584-8a.html b/layout/reftests/bugs/563584-8a.html
new file mode 100644
index 0000000000..eceb8378e5
--- /dev/null
+++ b/layout/reftests/bugs/563584-8a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="float: left">
+ <div><div style="display:inline-block; vertical-align: top; height: 3in; width: 1in; background: aqua"></div></div>
+ <div><div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: yellow"></div></div>
+</div>
diff --git a/layout/reftests/bugs/563584-8b-ref.html b/layout/reftests/bugs/563584-8b-ref.html
new file mode 100644
index 0000000000..681edfc60e
--- /dev/null
+++ b/layout/reftests/bugs/563584-8b-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div>
+ <div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: fuchsia"></div
+ ><div style="display:inline-block; vertical-align: top; height: 2in; width: 1in; background: aqua"></div>
+</div>
+<div style="page-break-before:always">
+ <div style="display:inline-block; vertical-align: top; height: 1in; width: 1in"></div><div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: aqua"></div>
+ </div><div style="height: 1in; width: 1in; background: yellow"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-8b.html b/layout/reftests/bugs/563584-8b.html
new file mode 100644
index 0000000000..23ac5dd8e1
--- /dev/null
+++ b/layout/reftests/bugs/563584-8b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="float: left; height: 1in; width: 1in; background: fuchsia"></div>
+<div style="float: left">
+ <div><div style="display:inline-block; vertical-align: top; height: 3in; width: 1in; background: aqua"></div></div>
+ <div><div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: yellow"></div></div>
+</div>
diff --git a/layout/reftests/bugs/563584-8c-ref.html b/layout/reftests/bugs/563584-8c-ref.html
new file mode 100644
index 0000000000..920285d7ad
--- /dev/null
+++ b/layout/reftests/bugs/563584-8c-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="height: 2in"></div>
+<div style="height: 2in; width: 1in; background: aqua; page-break-before: always"></div>
+<div style="height: 1in; width: 1in; background: aqua; page-break-before: always"></div>
+<div style="height: 1in; width: 1in; background: yellow"></div>
diff --git a/layout/reftests/bugs/563584-8c.html b/layout/reftests/bugs/563584-8c.html
new file mode 100644
index 0000000000..d636191cc3
--- /dev/null
+++ b/layout/reftests/bugs/563584-8c.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="height: 1in"></div>
+<div style="float: left">
+ <div><div style="display:inline-block; vertical-align: top; height: 3in; width: 1in; background: aqua"></div></div>
+ <div><div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: yellow"></div></div>
+</div>
diff --git a/layout/reftests/bugs/563584-8d-ref.html b/layout/reftests/bugs/563584-8d-ref.html
new file mode 100644
index 0000000000..cff90efc18
--- /dev/null
+++ b/layout/reftests/bugs/563584-8d-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="height: 1in"></div>
+<div style="height: 1in; width: 1in; background: fuchsia"></div>
+<div style="height: 2in; width: 1in; background: aqua; page-break-before: always"></div>
+<div style="height: 1in; width: 1in; background: aqua; page-break-before: always"></div>
+<div style="height: 1in; width: 1in; background: yellow"></div>
diff --git a/layout/reftests/bugs/563584-8d.html b/layout/reftests/bugs/563584-8d.html
new file mode 100644
index 0000000000..b4fd057869
--- /dev/null
+++ b/layout/reftests/bugs/563584-8d.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html class="reftest-paged">
+<title>Test for setting and handling of mIsTopOfPage on floats</title>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<body style="margin: 0">
+<div style="height: 1in"></div>
+<div style="float: left; height: 1in; width: 1in; background: fuchsia"></div>
+<div style="float: left">
+ <div><div style="display:inline-block; vertical-align: top; height: 3in; width: 1in; background: aqua"></div></div>
+ <div><div style="display:inline-block; vertical-align: top; height: 1in; width: 1in; background: yellow"></div></div>
+</div>
diff --git a/layout/reftests/bugs/563584-9a-ref.html b/layout/reftests/bugs/563584-9a-ref.html
new file mode 100644
index 0000000000..ff6bd415c2
--- /dev/null
+++ b/layout/reftests/bugs/563584-9a-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="margin: 0;">
+<div style="position: absolute; top: 0; left: 0; width: 200px; height: 300px; background: yellow"></div>
diff --git a/layout/reftests/bugs/563584-9a.html b/layout/reftests/bugs/563584-9a.html
new file mode 100644
index 0000000000..057c19d83a
--- /dev/null
+++ b/layout/reftests/bugs/563584-9a.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="column-width: 200px; margin: 0; column-gap: 0; height: 200px;">
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 300px; width: 200px; background: yellow"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-9b-ref.html b/layout/reftests/bugs/563584-9b-ref.html
new file mode 100644
index 0000000000..9e8637ccc5
--- /dev/null
+++ b/layout/reftests/bugs/563584-9b-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="margin: 0;">
+<div style="position: absolute; top: 0; left: 200px; width: 200px; height: 300px; background: yellow"></div>
diff --git a/layout/reftests/bugs/563584-9b.html b/layout/reftests/bugs/563584-9b.html
new file mode 100644
index 0000000000..93ab70c10c
--- /dev/null
+++ b/layout/reftests/bugs/563584-9b.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="column-width: 200px; margin: 0; column-gap: 0; height: 200px;">
+<div style="height: 10px"></div>
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 300px; width: 200px; background: yellow"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-9c.html b/layout/reftests/bugs/563584-9c.html
new file mode 100644
index 0000000000..c3e8bfcd34
--- /dev/null
+++ b/layout/reftests/bugs/563584-9c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="column-width: 200px; column-fill: auto; margin: 0; column-gap: 0; height: 200px;">
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: yellow"></div>
+</div>
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: aqua"></div>
+</div>
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: fuchsia"></div>
+</div>
diff --git a/layout/reftests/bugs/563584-9cd-ref.html b/layout/reftests/bugs/563584-9cd-ref.html
new file mode 100644
index 0000000000..9c9dcf35cb
--- /dev/null
+++ b/layout/reftests/bugs/563584-9cd-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="margin: 0;">
+<div style="position: absolute; top: 0; left: 0px; width: 200px; height: 150px; background: yellow"></div>
+<div style="position: absolute; top: 0; left: 200px; width: 200px; height: 150px; background: aqua"></div>
+<div style="position: absolute; top: 0; left: 400px; width: 200px; height: 150px; background: fuchsia"></div>
diff --git a/layout/reftests/bugs/563584-9d.html b/layout/reftests/bugs/563584-9d.html
new file mode 100644
index 0000000000..e5bb149ccc
--- /dev/null
+++ b/layout/reftests/bugs/563584-9d.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Test for pushing of floats to next column when float breaking in columns is disabled</title>
+<body style="column-width: 200px; margin: 0; column-fill: auto; column-gap: 0; height: 200px;">
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: yellow"></div>
+</div>
+<div>&nbsp;</div>
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: aqua"></div>
+</div>
+<div>&nbsp;</div>
+<div style="float: left;">
+ <div style="display: inline-block; vertical-align: top; height: 150px; width: 200px; background: fuchsia"></div>
+</div>
diff --git a/layout/reftests/bugs/563884-1-ref.html b/layout/reftests/bugs/563884-1-ref.html
new file mode 100644
index 0000000000..50447fd9f2
--- /dev/null
+++ b/layout/reftests/bugs/563884-1-ref.html
@@ -0,0 +1,11 @@
+<html>
+ <head>
+ </head>
+ <body>
+ <table>
+ <tr><td>foo</td></tr>
+ <tr><td>foo</td></tr>
+ </table>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/563884-1.html b/layout/reftests/bugs/563884-1.html
new file mode 100644
index 0000000000..01c249942f
--- /dev/null
+++ b/layout/reftests/bugs/563884-1.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <script type="text/javascript">
+ window.addEventListener('load', function() {
+ document.getElementsByTagName('tr')[1].insertBefore(document.createElement('link'), document.getElementsByTagName('tr')[1].firstChild);
+ });
+ </script>
+ </head>
+ <body>
+ <table>
+ <tr><td>foo</td></tr>
+ <tr><td>foo</td></tr>
+ </table>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/564002-1-ref.html b/layout/reftests/bugs/564002-1-ref.html
new file mode 100644
index 0000000000..145b676276
--- /dev/null
+++ b/layout/reftests/bugs/564002-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<div style="float:left">
+ <div style="padding-bottom:1em">
+ <div style="float:left">test</div>
+ </div>
+ <div style="margin-top:0.5em; background:gold;">
+ test
+ </div>
+</div>
diff --git a/layout/reftests/bugs/564002-1.html b/layout/reftests/bugs/564002-1.html
new file mode 100644
index 0000000000..1ad5157638
--- /dev/null
+++ b/layout/reftests/bugs/564002-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<div style="float:left">
+ <div style="padding-bottom:1em">
+ <div style="float:left">test</div>
+ </div>
+ <table style="margin-top:0.5em; background:gold;" cellpadding=0 cellspacing=0>
+ <tr><td>test
+ </table>
+</div>
diff --git a/layout/reftests/bugs/564054-1-ref.html b/layout/reftests/bugs/564054-1-ref.html
new file mode 100644
index 0000000000..71570012bc
--- /dev/null
+++ b/layout/reftests/bugs/564054-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<style>
+td {width: 30px; height: 30px;}
+
+</style>
+</head>
+
+<body ">
+ <table border cellspacing="10px" cellpadding="10px">
+ <tbody id="tbody">
+ <tr><td rowspan="0"></td></tr>
+ <tr></tr>
+ <tr>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/564054-1.html b/layout/reftests/bugs/564054-1.html
new file mode 100644
index 0000000000..40ce2fc616
--- /dev/null
+++ b/layout/reftests/bugs/564054-1.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+
+function boom()
+{
+ var tbody = document.getElementById("tbody");
+ var trX = document.createElement('tr');
+ tbody.insertBefore(trX, tbody.getElementsByTagName("tr")[0]);
+ var trY = document.createElement('tr');
+ tbody.insertBefore(trY, trX);
+ var tdY1 = document.createElement('td');
+ tdY1.setAttribute('rowspan', 0);
+ trY.appendChild(tdY1);
+}
+</script>
+<style>
+td {width: 30px; height: 30px;}
+
+</style>
+</head>
+
+<body onload="boom();">
+ <table border cellspacing="10px" cellpadding="10px">
+ <tbody id="tbody">
+ <tr>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/564991-1-ref.html b/layout/reftests/bugs/564991-1-ref.html
new file mode 100644
index 0000000000..83dd419534
--- /dev/null
+++ b/layout/reftests/bugs/564991-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="opacity:0.1">HELLO</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/564991-1.html b/layout/reftests/bugs/564991-1.html
new file mode 100644
index 0000000000..d0b27d0a61
--- /dev/null
+++ b/layout/reftests/bugs/564991-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<div id="d" style="opacity:0.9">HELLO</div>
+<script>
+function finishTest() {
+ var d = document.getElementById("d");
+ d.style.opacity = 0.1;
+
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", finishTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/565819-1.html b/layout/reftests/bugs/565819-1.html
new file mode 100644
index 0000000000..e0c3271712
--- /dev/null
+++ b/layout/reftests/bugs/565819-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { color: green; }
+ div:empty { color: red; }
+ </style>
+ <script>
+ window.onload = function () {
+ document.getElementById("x").appendChild(document.createTextNode("This should be green"));
+ }
+ </script>
+ </head>
+ <body>
+ <div id="x"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/565819-2.html b/layout/reftests/bugs/565819-2.html
new file mode 100644
index 0000000000..61c98ea2f2
--- /dev/null
+++ b/layout/reftests/bugs/565819-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { color: red; }
+ div:last-child { color: green; }
+ </style>
+ <script>
+ window.onload = function() {
+ var r = document.getElementById("r");
+ r.remove();
+ }
+ </script>
+ </head>
+ <body>
+ <!-- Need extra wrapper div, because whitespace inside <body> is all weird -->
+ <div><div>This should be green</div><div id="r"></div></div></body>
+</html>
diff --git a/layout/reftests/bugs/565819-ref.html b/layout/reftests/bugs/565819-ref.html
new file mode 100644
index 0000000000..49a236e111
--- /dev/null
+++ b/layout/reftests/bugs/565819-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body style="color: green">
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/568441-ref.html b/layout/reftests/bugs/568441-ref.html
new file mode 100644
index 0000000000..0e039f72c1
--- /dev/null
+++ b/layout/reftests/bugs/568441-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE>
+<html class="reftest-wait">
+ <body onload="document.getElementById('i').focus();">
+ <input id='i' onfocus="document.documentElement.className = '';">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/568441.html b/layout/reftests/bugs/568441.html
new file mode 100644
index 0000000000..ae7ad55220
--- /dev/null
+++ b/layout/reftests/bugs/568441.html
@@ -0,0 +1,14 @@
+<!DOCTYPE>
+<html class="reftest-wait">
+ <script>
+ function onfocusHandler()
+ {
+ i.disabled = true;
+ i.disabled = false;
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload="document.getElementById('i').focus();">
+ <input id='i' onfocus='setTimeout(onfocusHandler,0);'>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/569006-1-ref.html b/layout/reftests/bugs/569006-1-ref.html
new file mode 100644
index 0000000000..c62d2728dc
--- /dev/null
+++ b/layout/reftests/bugs/569006-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ This text should be visible
+ </body>
+</html>
diff --git a/layout/reftests/bugs/569006-1.html b/layout/reftests/bugs/569006-1.html
new file mode 100644
index 0000000000..a6a9a280be
--- /dev/null
+++ b/layout/reftests/bugs/569006-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body::before { content: inherit; }
+ </style>
+ </head>
+ <body onload="document.body.style.content = '&quot;This text should be visible&quot;';">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/571281-1-ref.html b/layout/reftests/bugs/571281-1-ref.html
new file mode 100644
index 0000000000..6ff84ad11d
--- /dev/null
+++ b/layout/reftests/bugs/571281-1-ref.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+<head>
+<style>
+li {
+ list-style-position: inside;
+}
+</style>
+</head>
+<body>
+
+<ul>
+ <li>Test (inside).</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/571281-1a.html b/layout/reftests/bugs/571281-1a.html
new file mode 100644
index 0000000000..0860fd5708
--- /dev/null
+++ b/layout/reftests/bugs/571281-1a.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html>
+<head>
+<style>
+li {
+ list-style-position: inside;
+ overflow: hidden;
+}
+</style>
+</head>
+<body>
+
+<ul>
+ <li>Test (inside).</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/571281-1b.html b/layout/reftests/bugs/571281-1b.html
new file mode 100644
index 0000000000..d2e1c08dee
--- /dev/null
+++ b/layout/reftests/bugs/571281-1b.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html>
+<head>
+<style>
+li {
+ list-style-position: inside;
+ column-count: 2;
+}
+</style>
+</head>
+<body>
+
+<ul>
+ <li>Test (inside).</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/571281-1c.html b/layout/reftests/bugs/571281-1c.html
new file mode 100644
index 0000000000..da9cf0a016
--- /dev/null
+++ b/layout/reftests/bugs/571281-1c.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+<head>
+<style>
+li {
+ list-style-position: inside;
+ column-count: 2;
+ overflow: hidden;
+}
+</style>
+</head>
+<body>
+
+<ul>
+ <li>Test (inside).</li>
+</ul>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/571347-1-ref.html b/layout/reftests/bugs/571347-1-ref.html
new file mode 100644
index 0000000000..08d20638cf
--- /dev/null
+++ b/layout/reftests/bugs/571347-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<head>
+ <body style="color: green">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-1a.html b/layout/reftests/bugs/571347-1a.html
new file mode 100644
index 0000000000..c2ca8ae09d
--- /dev/null
+++ b/layout/reftests/bugs/571347-1a.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ body { color: red; }
+ .Foo { color: green; }
+ </style>
+ <body onload="document.body.className = 'abc Foo'" class="abc">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-1b.html b/layout/reftests/bugs/571347-1b.html
new file mode 100644
index 0000000000..842e104fcf
--- /dev/null
+++ b/layout/reftests/bugs/571347-1b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ body { color: green; }
+ .Foo { color: red; }
+ </style>
+ <body onload="document.body.className = 'abc foo'" class="Foo">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-2-ref.html b/layout/reftests/bugs/571347-2-ref.html
new file mode 100644
index 0000000000..66d0d452c8
--- /dev/null
+++ b/layout/reftests/bugs/571347-2-ref.html
@@ -0,0 +1,6 @@
+<!-- Quirks on purpose -->
+<head>
+ <body style="color: green">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-2a.html b/layout/reftests/bugs/571347-2a.html
new file mode 100644
index 0000000000..fb9e23eece
--- /dev/null
+++ b/layout/reftests/bugs/571347-2a.html
@@ -0,0 +1,10 @@
+<!-- Quirks on purpose -->
+<head>
+ <style>
+ body { color: red; }
+ .Foo { color: green; }
+ </style>
+ <body onload="document.body.className = 'abc Foo'" class="abc">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-2b.html b/layout/reftests/bugs/571347-2b.html
new file mode 100644
index 0000000000..43610b1b42
--- /dev/null
+++ b/layout/reftests/bugs/571347-2b.html
@@ -0,0 +1,10 @@
+<!-- Quirks on purpose -->
+<head>
+ <style>
+ body { color: green; }
+ .Foo { color: red; }
+ </style>
+ <body onload="document.body.className = 'abc bar'" class="Foo">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-2c.html b/layout/reftests/bugs/571347-2c.html
new file mode 100644
index 0000000000..fa8df1179d
--- /dev/null
+++ b/layout/reftests/bugs/571347-2c.html
@@ -0,0 +1,10 @@
+<!-- Quirks on purpose -->
+<head>
+ <style>
+ body { color: red; }
+ .Foo { color: green; }
+ </style>
+ <body onload="document.body.className = 'abc foO'" class="abc">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-2d.html b/layout/reftests/bugs/571347-2d.html
new file mode 100644
index 0000000000..06d78f8dca
--- /dev/null
+++ b/layout/reftests/bugs/571347-2d.html
@@ -0,0 +1,10 @@
+<!-- Quirks on purpose -->
+<head>
+ <style>
+ body { color: green; }
+ .Foo { color: red; }
+ </style>
+ <body onload="document.body.className = 'abc bar'" class="fOo">
+ This should be green
+ </body>
+</head>
diff --git a/layout/reftests/bugs/571347-3-ref.html b/layout/reftests/bugs/571347-3-ref.html
new file mode 100644
index 0000000000..12ec487a3d
--- /dev/null
+++ b/layout/reftests/bugs/571347-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>This text should appear</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/571347-3.html b/layout/reftests/bugs/571347-3.html
new file mode 100644
index 0000000000..217b76a1dd
--- /dev/null
+++ b/layout/reftests/bugs/571347-3.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div:not(.foo) { display: none; }
+ </style>
+ </head>
+ <body onload="document.getElementById('x').className = 'foo'">
+ <div id="x">This text should appear</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/572598-1.html b/layout/reftests/bugs/572598-1.html
new file mode 100644
index 0000000000..89017915d6
--- /dev/null
+++ b/layout/reftests/bugs/572598-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html contenteditable="true" class="reftest-wait">
+<head>
+<script>
+
+function boom()
+{
+ document.getElementById("i").select();
+ document.execCommand("forecolor", false, "green");
+ try { document.execCommand("insertunorderedlist", false, null); } catch(e){ }
+ document.execCommand("selectAll", false, null);
+ document.execCommand("contentReadOnly", false, null);
+ document.getElementById("d").contentEditable = "true";
+ document.getElementById("d").style.position = "absolute";
+ document.documentElement.focus();
+ document.execCommand("superscript", false, null);
+ window.getSelection().removeAllRanges();
+ document.documentElement.removeAttribute("class");
+}
+
+</script>
+</head>
+
+<body onload="boom();" contenteditable="false"><div id="d"><input id="i"></div></body>
+
+</html>
diff --git a/layout/reftests/bugs/572598-ref.html b/layout/reftests/bugs/572598-ref.html
new file mode 100644
index 0000000000..fa57c8b0a3
--- /dev/null
+++ b/layout/reftests/bugs/572598-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+
+<body><div><input readonly></div></body>
+
+</html>
diff --git a/layout/reftests/bugs/574898-1.html b/layout/reftests/bugs/574898-1.html
new file mode 100644
index 0000000000..df15ae5866
--- /dev/null
+++ b/layout/reftests/bugs/574898-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+
+function boom()
+{
+ var q = document.getElementById("q");
+ q.spellcheck = true;
+ q.setAttribute("value", "x");
+ document.documentElement.className = "";
+}
+
+</script>
+</head>
+
+<body onload="boom();"><input id="q"></body>
+</html>
diff --git a/layout/reftests/bugs/574898-ref.html b/layout/reftests/bugs/574898-ref.html
new file mode 100644
index 0000000000..cb23ab3c35
--- /dev/null
+++ b/layout/reftests/bugs/574898-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body><input value="x"></body>
+</html>
diff --git a/layout/reftests/bugs/574907-1-ref.html b/layout/reftests/bugs/574907-1-ref.html
new file mode 100644
index 0000000000..95200fdd92
--- /dev/null
+++ b/layout/reftests/bugs/574907-1-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:16px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/574907-1.html b/layout/reftests/bugs/574907-1.html
new file mode 100644
index 0000000000..ec8ebfd534
--- /dev/null
+++ b/layout/reftests/bugs/574907-1.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:16.4px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/574907-2-ref.html b/layout/reftests/bugs/574907-2-ref.html
new file mode 100644
index 0000000000..a3f09d8968
--- /dev/null
+++ b/layout/reftests/bugs/574907-2-ref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:17px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/574907-2.html b/layout/reftests/bugs/574907-2.html
new file mode 100644
index 0000000000..b137278c00
--- /dev/null
+++ b/layout/reftests/bugs/574907-2.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:16.6px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/574907-3-notref.html b/layout/reftests/bugs/574907-3-notref.html
new file mode 100644
index 0000000000..5f1b011fb6
--- /dev/null
+++ b/layout/reftests/bugs/574907-3-notref.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:26px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/574907-3.html b/layout/reftests/bugs/574907-3.html
new file mode 100644
index 0000000000..ecd36407f8
--- /dev/null
+++ b/layout/reftests/bugs/574907-3.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p style="font-family:MS PGothic;font-size:26.4px">
+&#x3053;&#x3093;&#x306b;&#x3061;&#x306f;
+</p>
+</body>
+</html>
+
+
diff --git a/layout/reftests/bugs/577838-1-ref.html b/layout/reftests/bugs/577838-1-ref.html
new file mode 100644
index 0000000000..486e72129e
--- /dev/null
+++ b/layout/reftests/bugs/577838-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ td { vertical-align: baseline; }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td>text</td>
+ <td>
+ <div>
+ <div>
+ fieldset<br>
+ fieldset
+ </div>
+ after
+ </div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/577838-1.html b/layout/reftests/bugs/577838-1.html
new file mode 100644
index 0000000000..27127250be
--- /dev/null
+++ b/layout/reftests/bugs/577838-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ td { vertical-align: baseline; }
+ fieldset { border: none; padding: 0; margin: 0; }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td>text</td>
+ <td>
+ <div>
+ <fieldset>
+ fieldset<br>
+ fieldset
+ </fieldset>
+ after
+ </div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/577838-2-ref.html b/layout/reftests/bugs/577838-2-ref.html
new file mode 100644
index 0000000000..e94491ee87
--- /dev/null
+++ b/layout/reftests/bugs/577838-2-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ td { vertical-align: baseline; }
+ td > div > div { padding-top: 50px; }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td>text</td>
+ <td>
+ <div>
+ <div>
+ fieldset<br>
+ fieldset
+ </div>
+ after
+ </div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/577838-2.html b/layout/reftests/bugs/577838-2.html
new file mode 100644
index 0000000000..6e706353e4
--- /dev/null
+++ b/layout/reftests/bugs/577838-2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ td { vertical-align: baseline; }
+ fieldset { border: none; padding: 50px 0 0 0; margin: 0; }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td>text</td>
+ <td>
+ <div>
+ <fieldset>
+ fieldset<br>
+ fieldset
+ </fieldset>
+ after
+ </div>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/579323-1-ref.html b/layout/reftests/bugs/579323-1-ref.html
new file mode 100644
index 0000000000..178d76ba79
--- /dev/null
+++ b/layout/reftests/bugs/579323-1-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body {
+ margin: 0;
+}
+#main {
+ width: 500px;
+ height: 500px;
+ opacity: 0.999;
+ background: lime;
+ border: 1px solid black;
+}
+.censor {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ background: cyan;
+}
+</style>
+</head>
+<body>
+<div id="main"></div>
+<div class="censor" style="left:0; top:0;"></div>
+<div class="censor" style="left:501px; top:0;"></div>
+<div class="censor" style="left:0; top:101px;"></div>
+<div class="censor" style="left:501px; top:101px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579323-1.html b/layout/reftests/bugs/579323-1.html
new file mode 100644
index 0000000000..fa00c11b7c
--- /dev/null
+++ b/layout/reftests/bugs/579323-1.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+body {
+ margin: 0;
+ display: flex;
+ width: 400px;
+}
+canvas {
+ flex: 1;
+ opacity: 0.999;
+ border: 1px solid black;
+}
+.censor {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ background: cyan;
+}
+</style>
+</head>
+<body>
+<canvas id="c" width="100" height="100"></canvas>
+<script>
+var ctx = document.getElementById("c").getContext('2d');
+ctx.fillStyle = "lime";
+ctx.fillRect(0, 0, 100, 100);
+function doTest() {
+ document.body.style.width = "502px";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+<div class="censor" style="left:0; top:0;"></div>
+<div class="censor" style="left:501px; top:0;"></div>
+<div class="censor" style="left:0; top:101px;"></div>
+<div class="censor" style="left:501px; top:101px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579349-1-ref.html b/layout/reftests/bugs/579349-1-ref.html
new file mode 100644
index 0000000000..d4f0d360e4
--- /dev/null
+++ b/layout/reftests/bugs/579349-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="width:500px; height:200px; background:blue;"></div>
+<div style="position:absolute; left:0; top:0; height:100px; width:100%; background:yellow"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579349-1.html b/layout/reftests/bugs/579349-1.html
new file mode 100644
index 0000000000..d2e9239b88
--- /dev/null
+++ b/layout/reftests/bugs/579349-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id="c" width="500" height="200"></canvas>
+<div style="position:absolute; left:0; top:0; height:100px; width:100%; background:yellow"></div>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext("2d");
+ctx.fillStyle = "blue";
+ctx.fillRect(0, 0, c.width, c.height);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579655-1-ref.html b/layout/reftests/bugs/579655-1-ref.html
new file mode 100644
index 0000000000..d4ade91983
--- /dev/null
+++ b/layout/reftests/bugs/579655-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<body style="white-space:pre">
+ <table>
+ <td>
+ <p>Hello</p>
+ <body>
+ </body>
+ </td>
+ <td>
+ <body>
+ </body>
+ </td>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579655-1.html b/layout/reftests/bugs/579655-1.html
new file mode 100644
index 0000000000..48803307da
--- /dev/null
+++ b/layout/reftests/bugs/579655-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table>
+ <td>
+ <p>Hello</p>
+ <body style="white-space:pre">
+ </body>
+ </td>
+ <td>
+ <body contenteditable="true">
+ </body>
+ </td>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579808-1-ref.html b/layout/reftests/bugs/579808-1-ref.html
new file mode 100644
index 0000000000..5eedd78b7c
--- /dev/null
+++ b/layout/reftests/bugs/579808-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="background:rgb(0,255,0); width:200px; height:200px;"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/579985-1-ref.html b/layout/reftests/bugs/579985-1-ref.html
new file mode 100644
index 0000000000..90d88cf620
--- /dev/null
+++ b/layout/reftests/bugs/579985-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:100px; height:100px; background:blue; opacity:0.5;">Hello</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/579985-1.html b/layout/reftests/bugs/579985-1.html
new file mode 100644
index 0000000000..2e1288dacd
--- /dev/null
+++ b/layout/reftests/bugs/579985-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script>
+function doTest() {
+ var d = document.getElementById("d");
+ d.style.opacity = 0.5;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<div id="d" style="width:100px; height:100px; background:blue;">Hello</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/580863-1-ref.html b/layout/reftests/bugs/580863-1-ref.html
new file mode 100644
index 0000000000..d3d440a4ce
--- /dev/null
+++ b/layout/reftests/bugs/580863-1-ref.html
@@ -0,0 +1,14 @@
+<!-- based on input-text-size-1.html, but using a CFF font with 2048-unit em square -->
+<html lang="en">
+<head>
+<style type="text/css">
+@font-face {
+ font-family: test;
+ src: url(../fonts/DejaVuSansMono.otf);
+}
+</style>
+</head>
+<body>
+ <input size="5" value="1 3 5" style="font-family: test">
+</body>
+</html>
diff --git a/layout/reftests/bugs/580863-1.html b/layout/reftests/bugs/580863-1.html
new file mode 100644
index 0000000000..9b18ced053
--- /dev/null
+++ b/layout/reftests/bugs/580863-1.html
@@ -0,0 +1,14 @@
+<!-- based on input-text-size-1.html, but using a CFF font with 2048-unit em square -->
+<html lang="en">
+<head>
+<style type="text/css">
+@font-face {
+ font-family: test;
+ src: url(../fonts/DejaVuSansMono.otf);
+}
+</style>
+</head>
+<body>
+ <input size="5" value="1 3 5!" style="font-family: test">
+</body>
+</html>
diff --git a/layout/reftests/bugs/581317-1-ref.html b/layout/reftests/bugs/581317-1-ref.html
new file mode 100644
index 0000000000..27bdbc29d5
--- /dev/null
+++ b/layout/reftests/bugs/581317-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#d { width:200px; border:10px solid rgba(200,200,200,0.99); }
+#e { width:196px; height:196px; opacity:0.99; background-color:rgb(200,200,200); padding:2px; }
+#f { width:200px; height:10px; opacity:0.8; }
+</style>
+</head>
+<body>
+<div id="d">
+ <div id="e">
+ <div style="width:80px; height:80px; background:yellow;"></div>
+ <div id="f">
+ <div style="width:80px; height:80px; background:blue;"></div>
+ </div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/581317-1.html b/layout/reftests/bugs/581317-1.html
new file mode 100644
index 0000000000..08e498cfce
--- /dev/null
+++ b/layout/reftests/bugs/581317-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+#d { width:200px; }
+#e { width:196px; height:196px; opacity:0.99; border:2px solid rgb(200,200,200); }
+#f { width:200px; height:10px; }
+</style>
+</head>
+<body onload="step()">
+<div id="d">
+ <div id="e">
+ <div style="width:80px; height:80px; background:yellow;"></div>
+ <div id="f">
+ <div style="width:80px; height:80px; background:blue;"></div>
+ </div>
+ </div>
+</div>
+<script>
+var d = document.getElementById("d");
+var e = document.getElementById("e");
+var f = document.getElementById("f");
+var v = 0;
+function step() {
+ v += 40;
+ d.style.border = "10px solid rgba(" + v + "," + v + "," + v + ", 0.99)";
+ e.style.backgroundColor = "rgb(" + v + "," + v + "," + v + ")";
+ f.style.opacity = v/250.0;
+ if (v < 200) {
+ setTimeout(step, 50);
+ } else {
+ document.documentElement.removeAttribute("class");
+ }
+}
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/581579-1-ref.html b/layout/reftests/bugs/581579-1-ref.html
new file mode 100644
index 0000000000..664d69977c
--- /dev/null
+++ b/layout/reftests/bugs/581579-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>p { color: black; }</style>
+<p>This text should be black.</p>
+<p>This text should be black.</p>
+<p>This text should be black.</p>
diff --git a/layout/reftests/bugs/581579-1.html b/layout/reftests/bugs/581579-1.html
new file mode 100644
index 0000000000..2cae1cc60d
--- /dev/null
+++ b/layout/reftests/bugs/581579-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>p { color: black; }</style>
+<style> #a { color: fuchsia { ; color: red } </style>
+<style> #b { color: fuchsia ! { ; color: red } </style>
+<style> #c { color: fuchsia ! important { ; color: red } </style>
+<p id="a">This text should be black.</p>
+<p id="b">This text should be black.</p>
+<p id="c">This text should be black.</p>
diff --git a/layout/reftests/bugs/582037-1-ref.html b/layout/reftests/bugs/582037-1-ref.html
new file mode 100644
index 0000000000..d92058201d
--- /dev/null
+++ b/layout/reftests/bugs/582037-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html style="background: green">
+</html>
diff --git a/layout/reftests/bugs/582037-1a.html b/layout/reftests/bugs/582037-1a.html
new file mode 100644
index 0000000000..cefabe914e
--- /dev/null
+++ b/layout/reftests/bugs/582037-1a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<!-- This test assumes that the document is 800px wide by 1000px high,
+ as documented in the readme. In particular, it assumes that
+ height > width. -->
+<html style="margin: 0; padding: 0; border: none; overflow: hidden">
+ <body style="margin: 0; padding: 0; border: none">
+ <div style="position: fixed; height: 100%; background: green">
+ <img src="solidblue.png" style="height: 100%; visibility: hidden;">
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/582037-1b.html b/layout/reftests/bugs/582037-1b.html
new file mode 100644
index 0000000000..897285b9d9
--- /dev/null
+++ b/layout/reftests/bugs/582037-1b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<!-- This test assumes that the document is 800px wide by 1000px high,
+ as documented in the readme. In particular, it assumes that
+ height > width. -->
+<html style="margin: 0; padding: 0; border: none; height: 100%; overflow: hidden">
+ <body style="margin: 0; padding: 0; border: none; height: 100%">
+ <div style="float: left; height: 100%; background: green">
+ <img src="solidblue.png" style="height: 100%; visibility: hidden;">
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/582037-2-ref.html b/layout/reftests/bugs/582037-2-ref.html
new file mode 100644
index 0000000000..6f935f24d3
--- /dev/null
+++ b/layout/reftests/bugs/582037-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged" style="margin: 0; padding: 0; border: none">
+ <body style="margin: 0; padding: 0; border: none">
+ <div style="width: 2in; height: 2in; background: green;">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/582037-2a.html b/layout/reftests/bugs/582037-2a.html
new file mode 100644
index 0000000000..c0d928d8aa
--- /dev/null
+++ b/layout/reftests/bugs/582037-2a.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<!-- This test assumes that the document is 2in tall by 4in wide. -->
+<html style="margin: 0; padding: 0; border: none; overflow: hidden"
+ class="reftest-paged">
+ <body style="margin: 0; padding: 0; border: none">
+ <div style="position: fixed; height: 100%; background: green">
+ <img src="solidblue.png" style="height: 100%; visibility: hidden;">
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/582037-2b.html b/layout/reftests/bugs/582037-2b.html
new file mode 100644
index 0000000000..518524fc16
--- /dev/null
+++ b/layout/reftests/bugs/582037-2b.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>@page { size:5in 3in; margin:0.5in; }</style>
+<html style="margin: 0; padding: 0; border: none; height: 100%"
+ class="reftest-paged">
+ <body style="margin: 0; padding: 0; border: none; height: 100%">
+ <div style="float: left; height: 100%; background: green">
+ <img src="solidblue.png" style="height: 100%; visibility: hidden; vertical-align:top;">
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/582146-1.html b/layout/reftests/bugs/582146-1.html
new file mode 100644
index 0000000000..53cea0a91c
--- /dev/null
+++ b/layout/reftests/bugs/582146-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html style="overflow:hidden">
+<body>
+<iframe height="44058520" style="border: none"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/582476-1-helper.html b/layout/reftests/bugs/582476-1-helper.html
new file mode 100644
index 0000000000..1b726dc27b
--- /dev/null
+++ b/layout/reftests/bugs/582476-1-helper.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<div style="height: 10000px;"></div>
+<div id="x" style="height: 100px; width: 100px; background: red;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/582476-1-ref-helper.html b/layout/reftests/bugs/582476-1-ref-helper.html
new file mode 100644
index 0000000000..73a328c231
--- /dev/null
+++ b/layout/reftests/bugs/582476-1-ref-helper.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<div style="height: 10000px;"></div>
+<div id="x" style="height: 100px; width: 100px; background: blue;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/582476-1-ref.svg b/layout/reftests/bugs/582476-1-ref.svg
new file mode 100644
index 0000000000..96b6e19027
--- /dev/null
+++ b/layout/reftests/bugs/582476-1-ref.svg
@@ -0,0 +1,30 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <script>
+ iframeLoadedFirst = false;
+ parentLoadedFirst = false;
+
+ function iframeLoad() {
+ if (parentLoadedFirst) {
+ setup();
+ } else {
+ iframeLoadedFirst = true;
+ }
+ }
+
+ window.onload = function() {
+ if (iframeLoadedFirst) {
+ setup();
+ } else {
+ parentLoadedFirst = true;
+ }
+ }
+
+ function setup() {
+ var scrollTarget = document.getElementById("ifrm").contentWindow;
+ scrollTarget.scrollTo(0,100000);
+ }
+ </script>
+ <foreignObject height="100%" width="100%">
+ <iframe id="ifrm" onload="iframeLoad();" width="100%" height="100%" xmlns="http://www.w3.org/1999/xhtml" src="582476-1-ref-helper.html"/>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/582476-1.svg b/layout/reftests/bugs/582476-1.svg
new file mode 100644
index 0000000000..8622e31eb0
--- /dev/null
+++ b/layout/reftests/bugs/582476-1.svg
@@ -0,0 +1,37 @@
+<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait">
+ <script>
+ window.addEventListener("MozReftestInvalidate", doTest, false);
+
+ iframeLoadedFirst = false;
+ parentLoadedFirst = false;
+
+ function iframeLoad() {
+ if (parentLoadedFirst) {
+ setup();
+ } else {
+ iframeLoadedFirst = true;
+ }
+ }
+
+ window.onload = function() {
+ if (iframeLoadedFirst) {
+ setup();
+ } else {
+ parentLoadedFirst = true;
+ }
+ }
+
+ function setup() {
+ var scrollTarget = document.getElementById("ifrm").contentWindow;
+ scrollTarget.scrollTo(0,100000);
+ }
+
+ function doTest() {
+ document.getElementById("ifrm").contentDocument.getElementById("x").style.background = "blue";
+ document.documentElement.removeAttribute('class');
+ }
+ </script>
+ <foreignObject height="100%" width="100%">
+ <iframe id="ifrm" onload="iframeLoad();" width="100%" height="100%" xmlns="http://www.w3.org/1999/xhtml" src="582476-1-helper.html"/>
+ </foreignObject>
+</svg>
diff --git a/layout/reftests/bugs/584400-dash-length-ref.svg b/layout/reftests/bugs/584400-dash-length-ref.svg
new file mode 100644
index 0000000000..ed26d94a82
--- /dev/null
+++ b/layout/reftests/bugs/584400-dash-length-ref.svg
@@ -0,0 +1,16 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <style>
+ rect { stroke: blue; stroke-width: 15px; }
+ </style>
+
+ <rect x="70px" y="20px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+ <rect x="270px" y="20px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+
+ <line x1="60px" y1="280px" x2="440px" y2="280px"
+ style="stroke: blue; stroke-width: 200px; stroke-dasharray: 165px, 40px">
+ </line>
+</svg>
diff --git a/layout/reftests/bugs/584400-dash-length.svg b/layout/reftests/bugs/584400-dash-length.svg
new file mode 100644
index 0000000000..b658d26c30
--- /dev/null
+++ b/layout/reftests/bugs/584400-dash-length.svg
@@ -0,0 +1,25 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <style>
+ rect { stroke: blue; stroke-width: 15px; }
+ </style>
+ <rect x="90px" y="80px" width="245px" height="45px"
+ style="fill: none; stroke-dasharray: 120px, 89px">
+ </rect>
+
+ <rect x="70px" y="20px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+ <rect x="270px" y="20px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+
+ <rect x="70px" y="220px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+ <rect x="270px" y="220px" width="145px" height="145px"
+ style="stroke: none; stroke-dasharray: 20px, 5px">
+ </rect>
+ <line x1="60px" y1="280px" x2="440px" y2="280px"
+ style="stroke: blue; stroke-width: 200px; stroke-dasharray: 165px, 40px">
+ </line>
+</svg>
diff --git a/layout/reftests/bugs/584699-1-ref.html b/layout/reftests/bugs/584699-1-ref.html
new file mode 100644
index 0000000000..8d1f53bdf5
--- /dev/null
+++ b/layout/reftests/bugs/584699-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<canvas style="position: absolute; top:20px; opacity:0.5; border:1px solid black; width:200px; height:200px;"></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/584699-1.html b/layout/reftests/bugs/584699-1.html
new file mode 100644
index 0000000000..588008a904
--- /dev/null
+++ b/layout/reftests/bugs/584699-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script>
+function doTest() {
+ var c = document.getElementById("c");
+ c.style.top = "20px";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<canvas id="c" style="position: absolute; top:0; opacity:0.5; border:1px solid black; width:200px; height:200px;"></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/585598-2-ref.xhtml b/layout/reftests/bugs/585598-2-ref.xhtml
new file mode 100644
index 0000000000..63b5e37969
--- /dev/null
+++ b/layout/reftests/bugs/585598-2-ref.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+<div style="page-break-before: always;">
+<select style="display:block">
+</select>
+</div>
+</html>
diff --git a/layout/reftests/bugs/585598-2.xhtml b/layout/reftests/bugs/585598-2.xhtml
new file mode 100644
index 0000000000..50ee587a49
--- /dev/null
+++ b/layout/reftests/bugs/585598-2.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-paged">
+<span style="float: left;page-break-before: always;">
+<select style="float: left;">
+</select>
+</span>
+</html>
diff --git a/layout/reftests/bugs/586400-1-ref.html b/layout/reftests/bugs/586400-1-ref.html
new file mode 100644
index 0000000000..5feef98d64
--- /dev/null
+++ b/layout/reftests/bugs/586400-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ div.spacer {width:20px; height: 20px;}
+ table {background-color: lime;}
+ td {background-color: green;}
+ </style>
+ </head>
+ <body>
+ <table cellpadding="30px"><tr>
+ <td> <div class="spacer"></div> </td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/586400-1.html b/layout/reftests/bugs/586400-1.html
new file mode 100644
index 0000000000..107079738c
--- /dev/null
+++ b/layout/reftests/bugs/586400-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ div.spacer {width:20px; height: 20px;}
+ table {background-color: lime;}
+ td {background-color: green;}
+ </style>
+ <script>
+ function testIt() {
+ document.body.offsetWidth;
+ var table = document.getElementsByTagName("TABLE")[0];
+ table.setAttribute("cellpadding", "30px");
+ }
+ </script>
+ </head>
+ <body onload="testIt();">
+ <table><tr>
+ <td> <div class="spacer"></div> </td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/586683-1-ref.html b/layout/reftests/bugs/586683-1-ref.html
new file mode 100644
index 0000000000..e3c473f1e8
--- /dev/null
+++ b/layout/reftests/bugs/586683-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+<style>
+body,html { width: 100%; height: 100%; padding: 0; }
+#scale {
+ position: absolute;
+ left: 300px;
+ top: 300px;
+ width: 100px;
+ height: 100px;
+ transform: scale(4);
+ border: 1px solid #888;
+}
+</style>
+</head>
+<body>
+<div id="scale"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/586683-1.html b/layout/reftests/bugs/586683-1.html
new file mode 100644
index 0000000000..f1e0d7b715
--- /dev/null
+++ b/layout/reftests/bugs/586683-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+<style>
+body,html { width: 100%; height: 100%; padding: 0; }
+div {
+ position: absolute;
+ left: 300px;
+ top: 300px;
+ width: 100px;
+ height: 100px;
+ transform: scale(4) perspective(1px);
+ border: 1px solid #888;
+}
+</style>
+</head>
+<body>
+<div></div>
+
+</body></html>
diff --git a/layout/reftests/bugs/589615-1-ref.html b/layout/reftests/bugs/589615-1-ref.html
new file mode 100644
index 0000000000..fe7e842870
--- /dev/null
+++ b/layout/reftests/bugs/589615-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ * { color: pink ! important }
+ </style>
+ </head>
+ <body>
+ <a href="">This should be pink</a>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/589615-1a.xhtml b/layout/reftests/bugs/589615-1a.xhtml
new file mode 100644
index 0000000000..ed79c4f259
--- /dev/null
+++ b/layout/reftests/bugs/589615-1a.xhtml
@@ -0,0 +1,5 @@
+<html xmlns='http://www.w3.org/1999/xhtml'>
+ <body link="pink" vlink="pink">
+ <a href="">This should be pink</a>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/589615-1b.html b/layout/reftests/bugs/589615-1b.html
new file mode 100644
index 0000000000..f7c5cdce4d
--- /dev/null
+++ b/layout/reftests/bugs/589615-1b.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body link="pink" vlink="pink">
+ <a href="">This should be pink</a>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/589672-1-ref.html b/layout/reftests/bugs/589672-1-ref.html
new file mode 100644
index 0000000000..710f04e79f
--- /dev/null
+++ b/layout/reftests/bugs/589672-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { color: green; }
+ </style>
+ </head>
+ <body>This should be green</body>
+</html>
diff --git a/layout/reftests/bugs/589672-1.html b/layout/reftests/bugs/589672-1.html
new file mode 100644
index 0000000000..b4a2845405
--- /dev/null
+++ b/layout/reftests/bugs/589672-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body { color: red; }
+ </style>
+ <style>
+ @namespace;
+ body { color: green }
+ </style>
+ </head>
+ <body>This should be green</body>
+</html>
diff --git a/layout/reftests/bugs/589682-1-notref.html b/layout/reftests/bugs/589682-1-notref.html
new file mode 100644
index 0000000000..ee17fc4bf3
--- /dev/null
+++ b/layout/reftests/bugs/589682-1-notref.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<style type="text/css">
+body {
+ font-family: Times New Roman, serif;
+ font-style: italic;
+}
+.white {
+ color: white;
+}
+</style>
+</head>
+<body>
+<!-- bug 589682 - check that double-quote in TNR Italic has width -->
+<p>foo <span class="white">foobar</span> bar</p>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/589682-1.html b/layout/reftests/bugs/589682-1.html
new file mode 100644
index 0000000000..881ce27875
--- /dev/null
+++ b/layout/reftests/bugs/589682-1.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<style type="text/css">
+body {
+ font-family: Times New Roman, serif;
+ font-style: italic;
+}
+.white {
+ color: white;
+}
+</style>
+</head>
+<body>
+<!-- bug 589682 - check that double-quote in TNR Italic has width -->
+<p>foo <span class="white">foo&quot;bar</span> bar</p>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/593243-1-ref.html b/layout/reftests/bugs/593243-1-ref.html
new file mode 100644
index 0000000000..dd2106a688
--- /dev/null
+++ b/layout/reftests/bugs/593243-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width: 600px; height: 400px;">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width=600px height=600px">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width: 600px; height: 400px;
+ background-color: green;"></div>
+ <div style="position: absolute; left: 300px; top: 400px;
+ width: 100px; height: 100px;
+ background-color: red;"></div>
+ <div style="position: absolute; left: 0px; top: 500px;
+ width: 600px; height: 100px;
+ background-color: yellow;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/593243-1.html b/layout/reftests/bugs/593243-1.html
new file mode 100644
index 0000000000..d4050a72a0
--- /dev/null
+++ b/layout/reftests/bugs/593243-1.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"
+ reftest-scrollport-w="800" reftest-scrollport-h="1000"
+ reftest-displayport-w="800" reftest-displayport-h="1000"
+ reftest-no-sync-layers>
+<head>
+ <meta name="viewport" content="width=600; height=400; initial-scale=1.0">
+ <title></title>
+<script type="text/javascript">
+function initialPaint() {
+ window.removeEventListener("MozAfterPaint", initialPaint);
+ setTimeout(moveBox, 0);
+}
+
+function moveBox() {
+ var box = document.getElementById("box");
+ box.style.left = "300px";
+ window.addEventListener("MozAfterPaint", repaint);
+}
+
+function repaint() {
+ window.removeEventListener("MozAfterPaint", repaint);
+ setTimeout(finish, 0);
+}
+
+function finish() {
+ document.documentElement.removeAttribute("class");
+}
+
+window.addEventListener("MozAfterPaint", initialPaint);
+</script>
+</head>
+
+<body style="width: 600px; height: 400px;">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width=600px height=600px">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width: 600px; height: 400px;
+ background-color: green;"></div>
+ <div id="box"
+ style="position: absolute; left: 0px; top: 400px;
+ width: 100px; height: 100px;
+ background-color: red;"></div>
+ <div style="position: absolute; left: 0px; top: 500px;
+ width: 600px; height: 100px;
+ background-color: yellow;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/593243-2-ref.html b/layout/reftests/bugs/593243-2-ref.html
new file mode 100644
index 0000000000..36d027b281
--- /dev/null
+++ b/layout/reftests/bugs/593243-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<body style="width: 600px; height: 400px;">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width=600px height=600px">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width: 600px; height: 400px;
+ background-color: green;"></div>
+ <div style="position: absolute; left: 0px; top: 400px;
+ width: 100px; height: 100px;">
+ <input type="text" id="input" size="20" style="border: none;" value="Hello kitty"></input>
+ </div>
+ <div style="position: absolute; left: 0px; top: 500px;
+ width: 600px; height: 100px;
+ background-color: yellow;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/593243-2.html b/layout/reftests/bugs/593243-2.html
new file mode 100644
index 0000000000..bab5dc0aba
--- /dev/null
+++ b/layout/reftests/bugs/593243-2.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"
+ reftest-scrollport-w="800" reftest-scrollport-h="1000"
+ reftest-displayport-w="800" reftest-displayport-h="1000"
+ reftest-no-sync-layers>
+<head>
+ <meta name="viewport" content="width=600; height=400; initial-scale=1.0">
+ <title></title>
+<script type="text/javascript">
+function initialPaint() {
+ window.removeEventListener("MozAfterPaint", initialPaint);
+ setTimeout(type, 0);
+}
+
+function type() {
+ var box = document.getElementById("input");
+ box.value = "Hello kitty";
+ window.addEventListener("MozAfterPaint", repaint);
+}
+
+function repaint() {
+ window.removeEventListener("MozAfterPaint", repaint);
+ setTimeout(finish, 0);
+}
+
+function finish() {
+ document.documentElement.removeAttribute("class");
+}
+
+window.addEventListener("MozAfterPaint", initialPaint);
+</script>
+</head>
+
+<body style="width: 600px; height: 400px;">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width=600px height=600px">
+ <div style="position: absolute; left: 0px; top: 0px;
+ width: 600px; height: 400px;
+ background-color: green;"></div>
+ <div style="position: absolute; left: 0px; top: 400px;
+ width: 100px; height: 100px;">
+ <input type="text" id="input" size="20" style="border: none;"></input>
+ </div>
+ <div style="position: absolute; left: 0px; top: 500px;
+ width: 600px; height: 100px;
+ background-color: yellow;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/593544-1-ref.html b/layout/reftests/bugs/593544-1-ref.html
new file mode 100644
index 0000000000..5cc73428fc
--- /dev/null
+++ b/layout/reftests/bugs/593544-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { color: white; background: black; }
+ html { font-size: 2em; color: black; background: white; }
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <legend><span>L</span>egend text</legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/593544-1.html b/layout/reftests/bugs/593544-1.html
new file mode 100644
index 0000000000..026ddda1f1
--- /dev/null
+++ b/layout/reftests/bugs/593544-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ legend:first-letter { color: white; background: black; }
+ html { font-size: 2em; color: black; background: white; }
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <legend>Legend text</legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/594333-1-ref.html b/layout/reftests/bugs/594333-1-ref.html
new file mode 100644
index 0000000000..acfdb37a9e
--- /dev/null
+++ b/layout/reftests/bugs/594333-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+ float: left;
+ width: 300px;
+ height: 200px;
+ background: url(repeatable-diagonal-gradient.png);
+}
+</style>
+</head>
+<body>
+ <div id="a" style="width:0"></div>
+ <div id="b" style="opacity:0.999"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/594333-1.html b/layout/reftests/bugs/594333-1.html
new file mode 100644
index 0000000000..f8d2173e90
--- /dev/null
+++ b/layout/reftests/bugs/594333-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+div {
+ float: left;
+ width: 300px;
+ height: 200px;
+ background: url(repeatable-diagonal-gradient.png);
+}
+</style>
+<script type="text/javascript">
+var i = 32;
+function test() {
+ document.getElementById("a").style.width = (i*10)+'px';
+ document.getElementById("b").style.opacity = 0.999 - i/64.0;
+ i--;
+ if (i >= 0) {
+ setTimeout(test, 10);
+ } else {
+ document.documentElement.removeAttribute("class");
+ }
+}
+</script>
+</head>
+<body onload="test()">
+ <div id="a"></div>
+ <div id="b"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/594624-1-ref.html b/layout/reftests/bugs/594624-1-ref.html
new file mode 100644
index 0000000000..710153806b
--- /dev/null
+++ b/layout/reftests/bugs/594624-1-ref.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+ <style>
+ #TB_window
+ {
+ border: 1px solid red;
+ position: fixed;
+ top: 0;
+ left: 0;
+ }
+
+ #TB_overlay {
+ height: 200px;
+ left: 10px;
+ position: fixed;
+ top: 80px;
+ width: 200px;
+
+ opacity: 0.1;
+
+ background-color: green;
+ }
+ </style>
+</head>
+<body>
+ SOME CONTENT
+ <div id="TB_overlay">
+ </div>
+ <div id="TB_window"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/594624-1.html b/layout/reftests/bugs/594624-1.html
new file mode 100644
index 0000000000..c1cd8480bd
--- /dev/null
+++ b/layout/reftests/bugs/594624-1.html
@@ -0,0 +1,41 @@
+<html class="reftest-wait">
+<head>
+ <script>
+ function doTest() {
+ var x = document.getElementById('TB_overlay');
+ x.style.display = 'block';
+ document.documentElement.removeAttribute('class');
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ <style>
+ #TB_window
+ {
+ border: 1px solid red;
+ position: fixed;
+ top: 0;
+ left: 0;
+ }
+
+ #TB_overlay {
+ height: 200px;
+ left: 10px;
+ position: fixed;
+ top: 80px;
+ width: 200px;
+ display: none;
+
+ opacity: 0.1;
+
+ background-color: green;
+ }
+ </style>
+</head>
+<body>
+ SOME CONTENT
+ <div id="TB_overlay">
+ </div>
+ <div id="TB_window"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/594737-1-ref.html b/layout/reftests/bugs/594737-1-ref.html
new file mode 100644
index 0000000000..1200060686
--- /dev/null
+++ b/layout/reftests/bugs/594737-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+ <select disabled size="4">
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+ <option>Four</option>
+ </select>
+</body>
diff --git a/layout/reftests/bugs/594737-1.html b/layout/reftests/bugs/594737-1.html
new file mode 100644
index 0000000000..c32d6d6fdc
--- /dev/null
+++ b/layout/reftests/bugs/594737-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+ <select disabled multiple size="4">
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+ <option>Four</option>
+ </select>
+</body>
diff --git a/layout/reftests/bugs/597721-1-ref.html b/layout/reftests/bugs/597721-1-ref.html
new file mode 100644
index 0000000000..878552a61c
--- /dev/null
+++ b/layout/reftests/bugs/597721-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>HR elements should have circular ends, not elliptical</title>
+<body style="margin:0; font-size: 0">
+<hr size="100" color="blue">
+<div style="position: absolute; background: red; height: 5px; width: 5px; top: 1px; left: 51px; z-index: -1"></div>
+<div style="position: absolute; background: red; height: 5px; width: 5px; top: 1px; right: 51px; z-index: -1"></div>
+<div style="position: absolute; background: red; height: 5px; width: 5px; top: 94px; left: 51px; z-index: -1"></div>
+<div style="position: absolute; background: red; height: 5px; width: 5px; top: 94px; right: 51px; z-index: -1"></div>
diff --git a/layout/reftests/bugs/597721-1.html b/layout/reftests/bugs/597721-1.html
new file mode 100644
index 0000000000..f759da482f
--- /dev/null
+++ b/layout/reftests/bugs/597721-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<title>HR elements should have circular ends, not elliptical</title>
+<body style="margin:0; font-size: 0">
+<hr size="100" color="blue">
diff --git a/layout/reftests/bugs/598726-1-ref.html b/layout/reftests/bugs/598726-1-ref.html
new file mode 100644
index 0000000000..c3066b56a0
--- /dev/null
+++ b/layout/reftests/bugs/598726-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="text" placeholder="foo">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/598726-1.html b/layout/reftests/bugs/598726-1.html
new file mode 100644
index 0000000000..63248805da
--- /dev/null
+++ b/layout/reftests/bugs/598726-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-snapshot-all">
+ <head>
+ <style type="text/css">
+ input {
+ -webkit-transition: -webkit-transform 200ms ease-in-out;
+ transition: transform 200ms ease-in-out;
+ }
+ input:focus {
+ -webkit-transform: scale(1.05);
+ transform: scale(1.05);
+ }
+ </style>
+ <script>
+ function boom() {
+ var i = document.querySelector("input");
+ i.addEventListener("transitionend", function(aEvent) {
+ if (aEvent.propertyName != 'transform' &&
+ aEvent.propertyName != '-webkit-transform') {
+ return;
+ }
+ i.removeEventListener("transitionend", arguments.callee, true);
+ i.value = "test";
+ i.getClientRects();
+ i.value = "";
+ i.getClientRects();
+ i.addEventListener("transitionend", function(aEvent) {
+ if (aEvent.propertyName != 'transform' &&
+ aEvent.propertyName != '-webkit-transform') {
+ return;
+ }
+ i.removeEventListener("transitionend", arguments.callee, true);
+ i.getClientRects();
+ document.documentElement.setAttribute("class", "reftest-snapshot-all");
+ }, true);
+ i.blur();
+ i.getClientRects();
+ }, true);
+ i.focus();
+ i.getClientRects();
+ }
+ </script>
+ </head>
+ <body onload="boom()">
+ <input type="text" placeholder="foo">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/599113-1-ref.html b/layout/reftests/bugs/599113-1-ref.html
new file mode 100644
index 0000000000..6beb3e6311
--- /dev/null
+++ b/layout/reftests/bugs/599113-1-ref.html
@@ -0,0 +1,6 @@
+<html>
+<body style="overflow: hidden;">
+<div style="position: absolute; left: 0; top: 0; width: 100px; height: 100px; background: blue;"></div>
+<div style="height: 10000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/599113-1.html b/layout/reftests/bugs/599113-1.html
new file mode 100644
index 0000000000..4995ff1e32
--- /dev/null
+++ b/layout/reftests/bugs/599113-1.html
@@ -0,0 +1,29 @@
+<html class="reftest-wait">
+<head>
+<script>
+ function doTest() {
+ window.scrollTo(0,101);
+ // make sure we serve the invalidate the scroll caused, so the invalidate
+ // doesn't get served later in our test (which would just make us pass when
+ // we should actually fail)
+ setTimeout("continueTest();", 0);
+ }
+ function continueTest() {
+ document.getElementById("x").style.background = "blue";
+ // make sure the invalidate for that change happens now, while we are
+ // scrolled down
+ document.documentElement.offsetLeft;
+ setTimeout("finishTest();", 0);
+ }
+ function finishTest() {
+ window.scrollTo(0,0);
+ document.documentElement.removeAttribute('class');
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body style="overflow: hidden;">
+<div id="x" style="position: absolute; left: 0px; top: 0px; width: 100px; height: 100px; background: red;"></div>
+<div style="height: 10000px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/599882-1-ref.html b/layout/reftests/bugs/599882-1-ref.html
new file mode 100644
index 0000000000..a6155400f0
--- /dev/null
+++ b/layout/reftests/bugs/599882-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ .positioned {
+ display:block;
+ }
+
+ .container {
+ display:inline-block;
+ }
+</style>
+</head>
+<body>
+<span style="vertical-align: baseline">Baseline aligned</span>
+<span class="container"><span class="positioned">&nbsp;</span></span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/599882-1a.html b/layout/reftests/bugs/599882-1a.html
new file mode 100644
index 0000000000..b29aa3db61
--- /dev/null
+++ b/layout/reftests/bugs/599882-1a.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ .positioned {
+ display:block;
+ position: relative;
+ top:200px;
+ }
+
+ .container {
+ display:inline-block;
+ }
+
+</style>
+</head>
+<body>
+<span style="vertical-align: baseline">Baseline aligned</span>
+<span class="container"><span class="positioned">&nbsp;</span></span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/599882-1b.html b/layout/reftests/bugs/599882-1b.html
new file mode 100644
index 0000000000..5675e39850
--- /dev/null
+++ b/layout/reftests/bugs/599882-1b.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ .positioned {
+ display:block;
+ position: relative;
+ top:200px;
+ }
+
+ .container {
+ display:inline-table;
+ }
+
+</style>
+</head>
+<body>
+<span style="vertical-align: baseline">Baseline aligned</span>
+<span class="container"><span class="positioned">&nbsp;</span></span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/599882-2-ref.html b/layout/reftests/bugs/599882-2-ref.html
new file mode 100644
index 0000000000..e73528e715
--- /dev/null
+++ b/layout/reftests/bugs/599882-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+<ul>
+ <li>
+ <div class="positioned">&nbsp;</div>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/599882-2.html b/layout/reftests/bugs/599882-2.html
new file mode 100644
index 0000000000..4c3862e73c
--- /dev/null
+++ b/layout/reftests/bugs/599882-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ .positioned {
+ position: relative;
+ top:200px;
+ }
+
+</style>
+</head>
+<body>
+<ul>
+ <li>
+ <div class="positioned">&nbsp;</div>
+ </li>
+</ul>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/600045-1-ref.html b/layout/reftests/bugs/600045-1-ref.html
new file mode 100644
index 0000000000..e8ed6301c4
--- /dev/null
+++ b/layout/reftests/bugs/600045-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<canvas width="100" height="100" id="c" style="background: #0f0"></canvas>
diff --git a/layout/reftests/bugs/600045-1.html b/layout/reftests/bugs/600045-1.html
new file mode 100644
index 0000000000..0091c491cf
--- /dev/null
+++ b/layout/reftests/bugs/600045-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<canvas width="100" height="100" id="c" style="background: #f00"></canvas>
+<script>
+ window.onload = function () {
+ var ctx = document.getElementById('c').getContext('2d');
+
+ ctx.globalCompositeOperation = 'lighter';
+ ctx.scale(5, 5);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 10;
+ ctx.strokeRect(5, 5, 10, 10);
+ }
+</script>
diff --git a/layout/reftests/bugs/600803-1-ref.html b/layout/reftests/bugs/600803-1-ref.html
new file mode 100644
index 0000000000..876a893a64
--- /dev/null
+++ b/layout/reftests/bugs/600803-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <body onload="onLoad()">
+ <textarea></textarea>
+ <div id="start"></div>
+ <div id="end"></div>
+ <script>
+ function onLoad() {
+ var t = document.querySelector("textarea");
+ t.value = "Xaa\nbbb";
+ t.value = "aaa\nbbb\n";
+ t.value += "X";
+ document.getElementById("start").textContent = t.selectionStart;
+ document.getElementById("end").textContent = t.selectionEnd;
+ }
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/600803-1.html b/layout/reftests/bugs/600803-1.html
new file mode 100644
index 0000000000..6b73a21560
--- /dev/null
+++ b/layout/reftests/bugs/600803-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <body onload="onLoad()">
+ <textarea></textarea>
+ <div id="start"></div>
+ <div id="end"></div>
+ <script>
+ function onLoad() {
+ var t = document.querySelector("textarea");
+ t.value = "aaa\nbbb";
+ t.value = "aaa\nbbb\n";
+ t.value += "X";
+ document.getElementById("start").textContent = t.selectionStart;
+ document.getElementById("end").textContent = t.selectionEnd;
+ }
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/600974-1-ref.html b/layout/reftests/bugs/600974-1-ref.html
new file mode 100644
index 0000000000..b8515f1e7e
--- /dev/null
+++ b/layout/reftests/bugs/600974-1-ref.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML>
+<html lang="en" style="font-family: serif; font-size: 16px; overflow: hidden;">
+<head>
+ <meta http-equiv="Content-Type"
+ content="text/html; charset=ISO-8859-1">
+ <title></title>
+</head>
+<body>
+<p>&#120443;&#120472;&#120475;&#120462;&#120470; &#120466;&#120473;&#120476;&#120478;&#120470; &#120461;&#120472;&#120469;&#120472;&#120475; &#120476;&#120466;&#120477; &#120458;&#120470;&#120462;&#120477;,
+&#120460;&#120472;&#120471;&#120476;&#120462;&#120460;&#120477;&#120462;&#120477;&#120478;&#120475; &#120458;&#120461;&#120466;&#120473;&#120466;&#120476;&#120460;&#120466;&#120471;&#120464; &#120462;&#120469;&#120466;&#120477;. &#120432;&#120469;&#120466;&#120474;&#120478;&#120458;&#120470;
+&#120479;&#120462;&#120469; &#120458;&#120475;&#120460;&#120478; &#120471;&#120466;&#120459;&#120465;, &#120479;&#120462;&#120469; &#120461;&#120466;&#120460;&#120477;&#120478;&#120470; &#120477;&#120472;&#120475;&#120477;&#120472;&#120475;. &#120434;&#120475;&#120458;&#120476;
+&#120466;&#120458;&#120460;&#120478;&#120469;&#120466;&#120476; &#120462;&#120469;&#120466;&#120477; &#120462;&#120464;&#120462;&#120477; &#120471;&#120478;&#120471;&#120460; &#120476;&#120472;&#120469;&#120469;&#120466;&#120460;&#120466;&#120477;&#120478;&#120461;&#120466;&#120471; &#120462;&#120477;
+&#120460;&#120472;&#120470;&#120470;&#120472;&#120461;&#120472; &#120479;&#120462;&#120469;&#120466;&#120477; &#120458;&#120469;&#120466;&#120474;&#120478;&#120458;&#120470;. &#120448;&#120478;&#120466;&#120476;&#120474;&#120478;&#120462; &#120479;&#120462;&#120469;
+&#120459;&#120466;&#120459;&#120462;&#120471;&#120461;&#120478;&#120470; &#120470;&#120458;&#120478;&#120475;&#120466;&#120476;. &#120445;&#120478;&#120469;&#120469;&#120458;&#120470; &#120471;&#120462;&#120460; &#120463;&#120462;&#120469;&#120466;&#120476; &#120461;&#120466;&#120458;&#120470;,
+&#120479;&#120462;&#120469; &#120479;&#120478;&#120469;&#120473;&#120478;&#120477;&#120458;&#120477;&#120462; &#120473;&#120478;&#120475;&#120478;&#120476;. &#120434;&#120475;&#120458;&#120476; &#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458;,
+&#120479;&#120462;&#120469;&#120466;&#120477; &#120479;&#120466;&#120477;&#120458;&#120462; &#120473;&#120478;&#120469;&#120479;&#120466;&#120471;&#120458;&#120475; &#120460;&#120478;&#120475;&#120476;&#120478;&#120476;, &#120471;&#120466;&#120476;&#120469;
+&#120473;&#120478;&#120475;&#120478;&#120476; &#120473;&#120472;&#120475;&#120477;&#120477;&#120466;&#120477;&#120472;&#120475; &#120474;&#120478;&#120458;&#120470;, &#120471;&#120472;&#120471; &#120458;&#120461;&#120466;&#120473;&#120466;&#120476;&#120460;&#120466;&#120471;&#120464;
+&#120462;&#120475;&#120472;&#120476; &#120470;&#120458;&#120478;&#120475;&#120466;&#120476; &#120462;&#120478; &#120463;&#120462;&#120469;&#120466;&#120476;. &#120445;&#120478;&#120469;&#120469;&#120458;&#120470; &#120469;&#120478;&#120460;&#120477;&#120478;&#120476;
+&#120471;&#120466;&#120476;&#120466; &#120476;&#120466;&#120477; &#120458;&#120470;&#120462;&#120477; &#120471;&#120466;&#120476;&#120469; &#120476;&#120472;&#120461;&#120458;&#120469;&#120462;&#120476; &#120466;&#120471;&#120477;&#120462;&#120475;&#120461;&#120478;&#120470;.
+&#120447;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120479;&#120478;&#120469;&#120473;&#120478;&#120477;&#120458;&#120477;&#120462; &#120458;&#120469;&#120466;&#120474;&#120478;&#120458;&#120470; &#120469;&#120462;&#120472;, &#120466;&#120461;
+&#120475;&#120465;&#120472;&#120471;&#120460;&#120478;&#120476; &#120476;&#120462;&#120470; &#120460;&#120472;&#120470;&#120470;&#120472;&#120461;&#120472; &#120466;&#120461;. &#120450;&#120462;&#120461; &#120469;&#120458;&#120472;&#120475;&#120462;&#120462;&#120477;
+&#120466;&#120471;&#120477;&#120462;&#120475;&#120461;&#120478;&#120470; &#120460;&#120472;&#120471;&#120461;&#120466;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470;. &#120445;&#120478;&#120469;&#120469;&#120458;&#120470; &#120472;&#120475;&#120471;&#120458;&#120475;&#120462;
+&#120479;&#120462;&#120476;&#120477;&#120466;&#120459;&#120478;&#120469;&#120478;&#120470; &#120473;&#120472;&#120475;&#120477;&#120458;. &#120432;&#120462;&#120471;&#120462;&#120458;&#120471; &#120466;&#120461; &#120461;&#120472;&#120469;&#120472;&#120475;
+&#120461;&#120472;&#120469;&#120472;&#120475;, &#120471;&#120462;&#120460; &#120462;&#120469;&#120462;&#120466;&#120463;&#120462;&#120471;&#120461; &#120471;&#120462;&#120474;&#120478;&#120462;. &#120435;&#120472;&#120471;&#120462;&#120460;
+&#120477;&#120466;&#120471;&#120460;&#120466;&#120461;&#120478;&#120471;&#120477; &#120460;&#120472;&#120470;&#120470;&#120472;&#120461;&#120472; &#120471;&#120466;&#120476;&#120469;, &#120471;&#120472;&#120471;
+&#120476;&#120460;&#120462;&#120469;&#120462;&#120475;&#120466;&#120476;&#120474;&#120478;&#120462; &#120461;&#120472;&#120469;&#120472;&#120475; &#120458;&#120460;&#120460;&#120478;&#120470;&#120476;&#120458;&#120471; &#120466;&#120461;.
+&#120447;&#120475;&#120458;&#120462;&#120476;&#120462;&#120471;&#120477; &#120459;&#120466;&#120459;&#120462;&#120471;&#120461;&#120478;&#120470; &#120479;&#120466;&#120479;&#120462;&#120475;&#120475;&#120458; &#120476;&#120478;&#120476;&#120460;&#120466;&#120473;&#120466;&#120477;.
+&#120445;&#120478;&#120471;&#120460; &#120460;&#120472;&#120471;&#120461;&#120466;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470;, &#120458;&#120471;&#120477;&#120462; &#120479;&#120466;&#120477;&#120458;&#120462;
+&#120460;&#120472;&#120471;&#120461;&#120466;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470; &#120475;&#120465;&#120472;&#120471;&#120460;&#120478;&#120476;, &#120471;&#120478;&#120471;&#120460; &#120471;&#120466;&#120459;&#120465;
+&#120473;&#120478;&#120469;&#120479;&#120466;&#120471;&#120458;&#120475; &#120477;&#120478;&#120475;&#120473;&#120466;&#120476;, &#120466;&#120471; &#120469;&#120472;&#120459;&#120472;&#120475;&#120477;&#120466;&#120476; &#120469;&#120458;&#120460;&#120478;&#120476; &#120469;&#120462;&#120472;
+&#120478;&#120477; &#120475;&#120466;&#120476;&#120478;&#120476;. &#120450;&#120462;&#120461; &#120466;&#120471; &#120462;&#120471;&#120466;&#120470; &#120477;&#120472;&#120475;&#120477;&#120472;&#120475;, &#120479;&#120466;&#120477;&#120458;&#120462;
+&#120458;&#120460;&#120460;&#120478;&#120470;&#120476;&#120458;&#120471; &#120475;&#120466;&#120476;&#120478;&#120476;. &#120432;&#120469;&#120466;&#120474;&#120478;&#120458;&#120470; &#120470;&#120466; &#120462;&#120475;&#120458;&#120477;,
+&#120460;&#120472;&#120470;&#120470;&#120472;&#120461;&#120472; &#120471;&#120462;&#120460; &#120469;&#120472;&#120459;&#120472;&#120475;&#120477;&#120466;&#120476; &#120471;&#120472;&#120471;, &#120461;&#120466;&#120464;&#120471;&#120466;&#120476;&#120476;&#120466;&#120470;
+&#120462;&#120464;&#120462;&#120477; &#120462;&#120475;&#120472;&#120476;. &#120437;&#120478;&#120476;&#120460;&#120462; &#120469;&#120458;&#120460;&#120478;&#120476; &#120470;&#120458;&#120476;&#120476;&#120458;,
+&#120460;&#120472;&#120471;&#120476;&#120462;&#120460;&#120477;&#120462;&#120477;&#120478;&#120475; &#120479;&#120466;&#120477;&#120458;&#120462; &#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458; &#120476;&#120462;&#120461;,
+&#120479;&#120466;&#120479;&#120462;&#120475;&#120475;&#120458; &#120466;&#120471; &#120474;&#120478;&#120458;&#120470;.
+&#120434;&#120478;&#120475;&#120458;&#120459;&#120466;&#120477;&#120478;&#120475; &#120471;&#120462;&#120460; &#120458;&#120475;&#120460;&#120478; &#120474;&#120478;&#120458;&#120470;, &#120476;&#120466;&#120477; &#120458;&#120470;&#120462;&#120477;
+&#120477;&#120466;&#120471;&#120460;&#120466;&#120461;&#120478;&#120471;&#120477; &#120469;&#120458;&#120460;&#120478;&#120476;. &#120450;&#120462;&#120461; &#120470;&#120472;&#120469;&#120462;&#120476;&#120477;&#120466;&#120462;
+&#120461;&#120466;&#120464;&#120471;&#120466;&#120476;&#120476;&#120466;&#120470; &#120471;&#120466;&#120476;&#120469;, &#120458;&#120477; &#120463;&#120462;&#120475;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470; &#120470;&#120458;&#120478;&#120475;&#120466;&#120476;
+&#120462;&#120464;&#120462;&#120476;&#120477;&#120458;&#120476; &#120471;&#120462;&#120460;. &#120450;&#120462;&#120461; &#120470;&#120466; &#120474;&#120478;&#120458;&#120470;, &#120478;&#120469;&#120477;&#120475;&#120466;&#120460;&#120466;&#120462;&#120476; &#120478;&#120477;
+&#120477;&#120466;&#120471;&#120460;&#120466;&#120461;&#120478;&#120471;&#120477; &#120479;&#120462;&#120469;, &#120459;&#120466;&#120459;&#120462;&#120471;&#120461;&#120478;&#120470; &#120458;&#120460; &#120470;&#120458;&#120476;&#120476;&#120458;.
+&#120453;&#120462;&#120476;&#120477;&#120466;&#120459;&#120478;&#120469;&#120478;&#120470; &#120479;&#120462;&#120469; &#120475;&#120466;&#120476;&#120478;&#120476; &#120473;&#120472;&#120475;&#120477;&#120458; &#120470;&#120458;&#120478;&#120475;&#120466;&#120476;
+&#120477;&#120462;&#120470;&#120473;&#120472;&#120475; &#120459;&#120469;&#120458;&#120471;&#120461;&#120466;&#120477; &#120462;&#120478; &#120479;&#120462;&#120469; &#120461;&#120466;&#120458;&#120470;. &#120448;&#120478;&#120466;&#120476;&#120474;&#120478;&#120462;
+&#120462;&#120475;&#120472;&#120476; &#120469;&#120466;&#120459;&#120462;&#120475;&#120472;, &#120477;&#120462;&#120470;&#120473;&#120472;&#120475; &#120478;&#120477; &#120462;&#120464;&#120462;&#120476;&#120477;&#120458;&#120476; &#120471;&#120462;&#120460;,
+&#120458;&#120469;&#120466;&#120474;&#120478;&#120462;&#120477; &#120462;&#120464;&#120462;&#120477; &#120462;&#120469;&#120466;&#120477;. &#120435;&#120472;&#120471;&#120462;&#120460; &#120459;&#120469;&#120458;&#120471;&#120461;&#120466;&#120477; &#120472;&#120461;&#120466;&#120472;
+&#120458;&#120477; &#120471;&#120466;&#120459;&#120465; &#120479;&#120458;&#120475;&#120466;&#120478;&#120476; &#120477;&#120475;&#120466;&#120476;&#120477;&#120466;&#120474;&#120478;&#120462;. &#120450;&#120462;&#120461; &#120475;&#120465;&#120472;&#120471;&#120460;&#120478;&#120476;
+&#120473;&#120472;&#120475;&#120477;&#120458; &#120472;&#120475;&#120460;&#120466;, &#120473;&#120469;&#120458;&#120460;&#120462;&#120475;&#120458;&#120477; &#120460;&#120472;&#120471;&#120461;&#120466;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470; &#120472;&#120475;&#120460;&#120466;
+&#120466;&#120470;&#120473;&#120462;&#120475;&#120461;&#120466;&#120462;&#120477; &#120479;&#120466;&#120477;&#120458;&#120462;. &#120436;&#120477;&#120466;&#120458;&#120470; &#120462;&#120478; &#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458;
+&#120462;&#120475;&#120472;&#120476;. &#120440;&#120471; &#120479;&#120462;&#120471;&#120462;&#120471;&#120458;&#120477;&#120466;&#120476; &#120473;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120469;&#120466;&#120459;&#120462;&#120475;&#120472;
+&#120476;&#120462;&#120461; &#120462;&#120464;&#120462;&#120476;&#120477;&#120458;&#120476;. &#120435;&#120478;&#120466;&#120476; &#120477;&#120466;&#120471;&#120460;&#120466;&#120461;&#120478;&#120471;&#120477; &#120470;&#120472;&#120469;&#120462;&#120476;&#120477;&#120466;&#120462;
+&#120475;&#120466;&#120476;&#120478;&#120476; &#120466;&#120461; &#120475;&#120478;&#120477;&#120475;&#120478;&#120470;. &#120445;&#120478;&#120469;&#120469;&#120458; &#120463;&#120458;&#120460;&#120466;&#120469;&#120466;&#120476;&#120466;. &#120435;&#120478;&#120466;&#120476;
+&#120479;&#120462;&#120469; &#120473;&#120478;&#120475;&#120478;&#120476; &#120458;&#120460; &#120469;&#120466;&#120459;&#120462;&#120475;&#120472; &#120475;&#120478;&#120477;&#120475;&#120478;&#120470; &#120478;&#120469;&#120477;&#120475;&#120466;&#120460;&#120462;&#120476;
+&#120476;&#120462;&#120461; &#120479;&#120462;&#120469; &#120458;&#120478;&#120464;&#120478;&#120462;. &#120435;&#120472;&#120471;&#120462;&#120460; &#120462;&#120464;&#120462;&#120477; &#120461;&#120466;&#120458;&#120470; &#120462;&#120477;
+&#120469;&#120466;&#120459;&#120462;&#120475;&#120472; &#120473;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120479;&#120462;&#120471;&#120462;&#120471;&#120458;&#120477;&#120466;&#120476; &#120471;&#120472;&#120471; &#120462;&#120477;
+&#120473;&#120478;&#120475;&#120478;&#120476;. &#120452;&#120477; &#120462;&#120478; &#120469;&#120462;&#120460;&#120477;&#120478;&#120476; &#120473;&#120478;&#120475;&#120478;&#120476;, &#120462;&#120464;&#120462;&#120477; &#120464;&#120475;&#120458;&#120479;&#120466;&#120461;&#120458;
+&#120462;&#120475;&#120458;&#120477;. &#120450;&#120462;&#120461; &#120471;&#120462;&#120460; &#120463;&#120462;&#120469;&#120466;&#120476; &#120469;&#120466;&#120464;&#120478;&#120469;&#120458;, &#120462;&#120464;&#120462;&#120477; &#120469;&#120478;&#120460;&#120477;&#120478;&#120476;
+&#120462;&#120475;&#120458;&#120477;. &#120444;&#120458;&#120478;&#120475;&#120466;&#120476; &#120476;&#120458;&#120473;&#120466;&#120462;&#120471; &#120462;&#120476;&#120477;, &#120470;&#120458;&#120477;&#120477;&#120466;&#120476; &#120478;&#120477;
+&#120463;&#120458;&#120478;&#120460;&#120466;&#120459;&#120478;&#120476; &#120462;&#120477;, &#120463;&#120458;&#120478;&#120460;&#120466;&#120459;&#120478;&#120476; &#120471;&#120462;&#120460; &#120471;&#120478;&#120471;&#120460;. &#120445;&#120478;&#120471;&#120460;
+&#120477;&#120462;&#120470;&#120473;&#120478;&#120476; &#120466;&#120458;&#120460;&#120478;&#120469;&#120466;&#120476; &#120478;&#120475;&#120471;&#120458; &#120479;&#120466;&#120477;&#120458;&#120462; &#120461;&#120466;&#120464;&#120471;&#120466;&#120476;&#120476;&#120466;&#120470;.
+&#120440;&#120471; &#120471;&#120478;&#120471;&#120460; &#120471;&#120466;&#120476;&#120466;, &#120478;&#120469;&#120469;&#120458;&#120470;&#120460;&#120472;&#120475;&#120473;&#120462;&#120475; &#120479;&#120462;&#120469; &#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458;
+&#120479;&#120472;&#120469;&#120478;&#120477;&#120473;&#120458;&#120477;, &#120466;&#120470;&#120473;&#120462;&#120475;&#120461;&#120466;&#120462;&#120477; &#120458; &#120461;&#120466;&#120458;&#120470;.
+&#120447;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120479;&#120462;&#120469; &#120469;&#120466;&#120464;&#120478;&#120469;&#120458; &#120462;&#120464;&#120462;&#120477; &#120469;&#120462;&#120472;
+&#120458;&#120478;&#120460;&#120477;&#120472;&#120475; &#120475;&#120465;&#120472;&#120471;&#120460;&#120478;&#120476; &#120460;&#120472;&#120471;&#120479;&#120458;&#120469;&#120469;&#120466;&#120476; &#120458; &#120477;&#120472;&#120475;&#120477;&#120472;&#120475;.
+&#120436;&#120477;&#120466;&#120458;&#120470; &#120458;&#120477; &#120469;&#120462;&#120460;&#120477;&#120478;&#120476; &#120479;&#120466;&#120477;&#120458;&#120462; &#120458;&#120471;&#120477;&#120462; &#120477;&#120462;&#120470;&#120473;&#120478;&#120476;
+&#120478;&#120469;&#120477;&#120475;&#120466;&#120460;&#120466;&#120462;&#120476; &#120478;&#120477; &#120479;&#120466;&#120477;&#120458;&#120462; &#120462;&#120469;&#120466;&#120477;. &#120445;&#120458;&#120470; &#120466;&#120471; &#120477;&#120478;&#120475;&#120473;&#120466;&#120476;
+&#120466;&#120473;&#120476;&#120478;&#120470;, &#120458;&#120477; &#120470;&#120458;&#120477;&#120477;&#120466;&#120476; &#120477;&#120472;&#120475;&#120477;&#120472;&#120475;. &#120445;&#120478;&#120469;&#120469;&#120458; &#120462;&#120477;
+&#120473;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120471;&#120462;&#120474;&#120478;&#120462;. &#120435;&#120472;&#120471;&#120462;&#120460; &#120469;&#120458;&#120460;&#120466;&#120471;&#120466;&#120458;,
+&#120477;&#120478;&#120475;&#120473;&#120466;&#120476; &#120478;&#120477; &#120461;&#120466;&#120460;&#120477;&#120478;&#120470; &#120476;&#120472;&#120461;&#120458;&#120469;&#120462;&#120476;, &#120461;&#120478;&#120466; &#120471;&#120466;&#120476;&#120466;
+&#120463;&#120458;&#120460;&#120466;&#120469;&#120466;&#120476;&#120466;&#120476; &#120475;&#120466;&#120476;&#120478;&#120476;, &#120476;&#120462;&#120461; &#120459;&#120469;&#120458;&#120471;&#120461;&#120466;&#120477; &#120470;&#120466; &#120462;&#120469;&#120466;&#120477; &#120478;&#120477;
+&#120471;&#120466;&#120459;&#120465;. &#120432;&#120469;&#120466;&#120474;&#120478;&#120458;&#120470; &#120462;&#120475;&#120458;&#120477; &#120479;&#120472;&#120469;&#120478;&#120477;&#120473;&#120458;&#120477;.
+&#120447;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462; &#120471;&#120462;&#120460; &#120462;&#120469;&#120466;&#120477; &#120466;&#120461; &#120467;&#120478;&#120476;&#120477;&#120472;
+&#120466;&#120471;&#120477;&#120462;&#120475;&#120461;&#120478;&#120470; &#120472;&#120475;&#120471;&#120458;&#120475;&#120462; &#120458; &#120466;&#120471; &#120461;&#120466;&#120458;&#120470;. &#120444;&#120472;&#120475;&#120459;&#120466; &#120458;&#120477;
+&#120463;&#120475;&#120466;&#120471;&#120464;&#120466;&#120469;&#120469;&#120458; &#120469;&#120462;&#120460;&#120477;&#120478;&#120476;. &#120435;&#120472;&#120471;&#120462;&#120460; &#120460;&#120472;&#120471;&#120479;&#120458;&#120469;&#120469;&#120466;&#120476;
+&#120462;&#120469;&#120462;&#120466;&#120463;&#120462;&#120471;&#120461; &#120463;&#120462;&#120469;&#120466;&#120476;, &#120466;&#120461; &#120476;&#120458;&#120464;&#120466;&#120477;&#120477;&#120466;&#120476; &#120478;&#120475;&#120471;&#120458;
+&#120470;&#120458;&#120477;&#120477;&#120466;&#120476; &#120471;&#120462;&#120460;. &#120452;&#120477; &#120460;&#120472;&#120471;&#120476;&#120462;&#120474;&#120478;&#120458;&#120477; &#120477;&#120478;&#120475;&#120473;&#120466;&#120476; &#120479;&#120462;&#120469;
+&#120474;&#120478;&#120458;&#120470; &#120477;&#120462;&#120470;&#120473;&#120472;&#120475; &#120462;&#120464;&#120462;&#120477; &#120478;&#120469;&#120477;&#120475;&#120466;&#120460;&#120462;&#120476; &#120471;&#120462;&#120474;&#120478;&#120462;
+&#120470;&#120472;&#120469;&#120462;&#120476;&#120477;&#120466;&#120462;. &#120450;&#120478;&#120476;&#120473;&#120462;&#120471;&#120461;&#120466;&#120476;&#120476;&#120462; &#120477;&#120462;&#120469;&#120469;&#120478;&#120476; &#120471;&#120466;&#120476;&#120466;,
+&#120465;&#120462;&#120471;&#120461;&#120475;&#120462;&#120475;&#120466;&#120477; &#120479;&#120466;&#120477;&#120458;&#120462; &#120473;&#120472;&#120476;&#120478;&#120462;&#120475;&#120462; &#120462;&#120464;&#120462;&#120477;, &#120473;&#120469;&#120458;&#120460;&#120462;&#120475;&#120458;&#120477;
+&#120476;&#120462;&#120461; &#120470;&#120462;&#120477;&#120478;&#120476;. &#120440;&#120471;&#120477;&#120462;&#120464;&#120462;&#120475; &#120473;&#120469;&#120458;&#120460;&#120462;&#120475;&#120458;&#120477; &#120466;&#120470;&#120473;&#120462;&#120475;&#120461;&#120466;&#120462;&#120477;
+&#120473;&#120469;&#120458;&#120460;&#120462;&#120475;&#120458;&#120477;. &#120444;&#120472;&#120475;&#120459;&#120466; &#120477;&#120462;&#120470;&#120473;&#120478;&#120476; &#120471;&#120478;&#120471;&#120460; &#120471;&#120478;&#120471;&#120460;.
+&#120440;&#120471;&#120477;&#120462;&#120464;&#120462;&#120475; &#120474;&#120478;&#120466;&#120476; &#120472;&#120475;&#120460;&#120466; &#120463;&#120462;&#120469;&#120466;&#120476;. &#120445;&#120478;&#120471;&#120460; &#120476;&#120462;&#120470;&#120473;&#120462;&#120475;,
+&#120458;&#120475;&#120460;&#120478; &#120471;&#120472;&#120471; &#120460;&#120472;&#120471;&#120476;&#120462;&#120474;&#120478;&#120458;&#120477; &#120461;&#120466;&#120464;&#120471;&#120466;&#120476;&#120476;&#120466;&#120470;, &#120469;&#120472;&#120475;&#120462;&#120470;
+&#120478;&#120475;&#120471;&#120458; &#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458; &#120470;&#120466;, &#120471;&#120462;&#120460; &#120458;&#120460;&#120460;&#120478;&#120470;&#120476;&#120458;&#120471; &#120462;&#120471;&#120466;&#120470; &#120470;&#120466;
+&#120458; &#120473;&#120478;&#120475;&#120478;&#120476;. &#120434;&#120478;&#120475;&#120458;&#120459;&#120466;&#120477;&#120478;&#120475; &#120462;&#120477; &#120462;&#120469;&#120466;&#120477; &#120466;&#120471; &#120476;&#120462;&#120470;
+&#120476;&#120472;&#120461;&#120458;&#120469;&#120462;&#120476; &#120466;&#120471;&#120477;&#120462;&#120475;&#120461;&#120478;&#120470;. &#120447;&#120462;&#120469;&#120469;&#120462;&#120471;&#120477;&#120462;&#120476;&#120474;&#120478;&#120462;
+&#120476;&#120458;&#120464;&#120466;&#120477;&#120477;&#120466;&#120476; &#120475;&#120478;&#120477;&#120475;&#120478;&#120470; &#120469;&#120462;&#120460;&#120477;&#120478;&#120476; &#120460;&#120472;&#120470;&#120470;&#120472;&#120461;&#120472;
+&#120460;&#120472;&#120471;&#120461;&#120466;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470;. &#120436;&#120477;&#120466;&#120458;&#120470; &#120463;&#120475;&#120466;&#120471;&#120464;&#120466;&#120469;&#120469;&#120458;, &#120474;&#120478;&#120458;&#120470; &#120471;&#120462;&#120460;
+&#120478;&#120469;&#120469;&#120458;&#120470;&#120460;&#120472;&#120475;&#120473;&#120462;&#120475; &#120476;&#120472;&#120469;&#120469;&#120466;&#120460;&#120466;&#120477;&#120478;&#120461;&#120466;&#120471;, &#120477;&#120478;&#120475;&#120473;&#120466;&#120476; &#120471;&#120466;&#120476;&#120466;
+&#120458;&#120469;&#120466;&#120474;&#120478;&#120462;&#120477; &#120475;&#120466;&#120476;&#120478;&#120476;, &#120476;&#120466;&#120477; &#120458;&#120470;&#120462;&#120477; &#120462;&#120469;&#120462;&#120470;&#120462;&#120471;&#120477;&#120478;&#120470;
+&#120461;&#120472;&#120469;&#120472;&#120475; &#120469;&#120472;&#120475;&#120462;&#120470; &#120479;&#120466;&#120477;&#120458;&#120462; &#120469;&#120466;&#120464;&#120478;&#120469;&#120458;. &#120447;&#120475;&#120458;&#120462;&#120476;&#120462;&#120471;&#120477;
+&#120473;&#120465;&#120458;&#120475;&#120462;&#120477;&#120475;&#120458; &#120458;&#120469;&#120466;&#120474;&#120478;&#120462;&#120477; &#120479;&#120462;&#120469;&#120466;&#120477; &#120476;&#120462;&#120461; &#120473;&#120469;&#120458;&#120460;&#120462;&#120475;&#120458;&#120477;. </p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/600974-1.html b/layout/reftests/bugs/600974-1.html
new file mode 100644
index 0000000000..941a3e841a
--- /dev/null
+++ b/layout/reftests/bugs/600974-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- This is a test for decoding supplementary characters. It contains text in
+ Unicode plane 1 encoded as UTF-8. Don't reencode it in any way. -->
+<html lang="en" style="font-family: serif; font-size: 16px; overflow: hidden;">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+<p>ð™»ðš˜ðš›ðšŽðš– ðš’ðš™ðšœðšžðš– ðšðš˜ðš•ðš˜ðš› ðšœðš’ðš ðšŠðš–ðšŽðš, ðšŒðš˜ðš—ðšœðšŽðšŒðšðšŽðšðšžðš› ðšŠðšðš’ðš™ðš’ðšœðšŒðš’ðš—ðš ðšŽðš•ðš’ðš. ð™°ðš•ðš’ðššðšžðšŠðš– ðšŸðšŽðš• ðšŠðš›ðšŒðšž ðš—ðš’ðš‹ðš‘, ðšŸðšŽðš• ðšðš’ðšŒðšðšžðš– ðšðš˜ðš›ðšðš˜ðš›. ð™²ðš›ðšŠðšœ ðš’ðšŠðšŒðšžðš•ðš’𚜠ðšŽðš•ðš’ðš ðšŽðšðšŽðš ðš—ðšžðš—𚌠ðšœðš˜ðš•ðš•ðš’ðšŒðš’ðšðšžðšðš’ðš— ðšŽðš ðšŒðš˜ðš–ðš–ðš˜ðšðš˜ ðšŸðšŽðš•ðš’ðš ðšŠðš•ðš’ðššðšžðšŠðš–. ðš€ðšžðš’ðšœðššðšžðšŽ ðšŸðšŽðš• ðš‹ðš’ðš‹ðšŽðš—ðšðšžðš– ðš–ðšŠðšžðš›ðš’ðšœ. ð™½ðšžðš•ðš•ðšŠðš– ðš—ðšŽðšŒ ðšðšŽðš•ðš’𚜠ðšðš’ðšŠðš–, ðšŸðšŽðš• ðšŸðšžðš•ðš™ðšžðšðšŠðšðšŽ ðš™ðšžðš›ðšžðšœ. ð™²ðš›ðšŠðšœ ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ, ðšŸðšŽðš•ðš’ðš ðšŸðš’ðšðšŠðšŽ ðš™ðšžðš•ðšŸðš’ðš—ðšŠðš› ðšŒðšžðš›ðšœðšžðšœ, ðš—ðš’ðšœðš• ðš™ðšžðš›ðšžðšœ ðš™ðš˜ðš›ðšðšðš’ðšðš˜ðš› ðššðšžðšŠðš–, ðš—ðš˜ðš— ðšŠðšðš’ðš™ðš’ðšœðšŒðš’ðš—ðš ðšŽðš›ðš˜ðšœ ðš–ðšŠðšžðš›ðš’𚜠ðšŽðšž ðšðšŽðš•ðš’ðšœ. ð™½ðšžðš•ðš•ðšŠðš– ðš•ðšžðšŒðšðšžðšœ ðš—ðš’ðšœðš’ ðšœðš’ðš ðšŠðš–ðšŽðš ðš—ðš’ðšœðš• ðšœðš˜ðšðšŠðš•ðšŽðšœ ðš’ðš—ðšðšŽðš›ðšðšžðš–. ð™¿ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðšŸðšžðš•ðš™ðšžðšðšŠðšðšŽ ðšŠðš•ðš’ðššðšžðšŠðš– ðš•ðšŽðš˜, ðš’ðš ðš›ðš‘ðš˜ðš—ðšŒðšžðšœ ðšœðšŽðš– ðšŒðš˜ðš–ðš–ðš˜ðšðš˜ ðš’ðš. ðš‚ðšŽðš ðš•ðšŠðš˜ðš›ðšŽðšŽðš ðš’ðš—ðšðšŽðš›ðšðšžðš– ðšŒðš˜ðš—ðšðš’ðš–ðšŽðš—ðšðšžðš–. ð™½ðšžðš•ðš•ðšŠðš– ðš˜ðš›ðš—ðšŠðš›ðšŽ ðšŸðšŽðšœðšðš’ðš‹ðšžðš•ðšžðš– ðš™ðš˜ðš›ðšðšŠ. ð™°ðšŽðš—ðšŽðšŠðš— ðš’ðš ðšðš˜ðš•ðš˜ðš› ðšðš˜ðš•ðš˜ðš›, ðš—ðšŽðšŒ ðšŽðš•ðšŽðš’ðšðšŽðš—ðš ðš—ðšŽðššðšžðšŽ. ð™³ðš˜ðš—ðšŽðšŒ ðšðš’ðš—ðšŒðš’ðšðšžðš—ðš ðšŒðš˜ðš–ðš–ðš˜ðšðš˜ ðš—ðš’ðšœðš•, ðš—ðš˜ðš— ðšœðšŒðšŽðš•ðšŽðš›ðš’ðšœðššðšžðšŽ ðšðš˜ðš•ðš˜ðš› ðšŠðšŒðšŒðšžðš–ðšœðšŠðš— ðš’ðš. ð™¿ðš›ðšŠðšŽðšœðšŽðš—ðš ðš‹ðš’ðš‹ðšŽðš—ðšðšžðš– ðšŸðš’ðšŸðšŽðš›ðš›ðšŠ ðšœðšžðšœðšŒðš’ðš™ðš’ðš. ð™½ðšžðš—𚌠ðšŒðš˜ðš—ðšðš’ðš–ðšŽðš—ðšðšžðš–, ðšŠðš—ðšðšŽ ðšŸðš’ðšðšŠðšŽ ðšŒðš˜ðš—ðšðš’ðš–ðšŽðš—ðšðšžðš– ðš›ðš‘ðš˜ðš—ðšŒðšžðšœ, ðš—ðšžðš—𚌠ðš—ðš’ðš‹ðš‘ ðš™ðšžðš•ðšŸðš’ðš—ðšŠðš› ðšðšžðš›ðš™ðš’ðšœ, ðš’ðš— ðš•ðš˜ðš‹ðš˜ðš›ðšðš’𚜠ðš•ðšŠðšŒðšžðšœ ðš•ðšŽðš˜ ðšžðš ðš›ðš’ðšœðšžðšœ. ðš‚ðšŽðš ðš’ðš— ðšŽðš—ðš’ðš– ðšðš˜ðš›ðšðš˜ðš›, ðšŸðš’ðšðšŠðšŽ ðšŠðšŒðšŒðšžðš–ðšœðšŠðš— ðš›ðš’ðšœðšžðšœ. ð™°ðš•ðš’ðššðšžðšŠðš– ðš–ðš’ ðšŽðš›ðšŠðš, ðšŒðš˜ðš–ðš–ðš˜ðšðš˜ ðš—ðšŽðšŒ ðš•ðš˜ðš‹ðš˜ðš›ðšðš’𚜠ðš—ðš˜ðš—, ðšðš’ðšðš—ðš’ðšœðšœðš’ðš– ðšŽðšðšŽðš ðšŽðš›ðš˜ðšœ. ð™µðšžðšœðšŒðšŽ ðš•ðšŠðšŒðšžðšœ ðš–ðšŠðšœðšœðšŠ, ðšŒðš˜ðš—ðšœðšŽðšŒðšðšŽðšðšžðš› ðšŸðš’ðšðšŠðšŽ ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ ðšœðšŽðš, ðšŸðš’ðšŸðšŽðš›ðš›ðšŠ ðš’ðš— ðššðšžðšŠðš–.
+
+ð™²ðšžðš›ðšŠðš‹ðš’ðšðšžðš› ðš—ðšŽðšŒ ðšŠðš›ðšŒðšž ðššðšžðšŠðš–, ðšœðš’ðš ðšŠðš–ðšŽðš ðšðš’ðš—ðšŒðš’ðšðšžðš—ðš ðš•ðšŠðšŒðšžðšœ. ðš‚ðšŽðš ðš–ðš˜ðš•ðšŽðšœðšðš’𚎠ðšðš’ðšðš—ðš’ðšœðšœðš’ðš– ðš—ðš’ðšœðš•, ðšŠðš ðšðšŽðš›ðš–ðšŽðš—ðšðšžðš– ðš–ðšŠðšžðš›ðš’𚜠ðšŽðšðšŽðšœðšðšŠðšœ ðš—ðšŽðšŒ. ðš‚ðšŽðš ðš–ðš’ ðššðšžðšŠðš–, ðšžðš•ðšðš›ðš’ðšŒðš’ðšŽðšœ ðšžðš ðšðš’ðš—ðšŒðš’ðšðšžðš—ðš ðšŸðšŽðš•, ðš‹ðš’ðš‹ðšŽðš—ðšðšžðš– ðšŠðšŒ ðš–ðšŠðšœðšœðšŠ. ðš…ðšŽðšœðšðš’ðš‹ðšžðš•ðšžðš– ðšŸðšŽðš• ðš›ðš’ðšœðšžðšœ ðš™ðš˜ðš›ðšðšŠ ðš–ðšŠðšžðš›ðš’𚜠ðšðšŽðš–ðš™ðš˜ðš› ðš‹ðš•ðšŠðš—ðšðš’ðš ðšŽðšž ðšŸðšŽðš• ðšðš’ðšŠðš–. ðš€ðšžðš’ðšœðššðšžðšŽ ðšŽðš›ðš˜ðšœ ðš•ðš’ðš‹ðšŽðš›ðš˜, ðšðšŽðš–ðš™ðš˜ðš› ðšžðš ðšŽðšðšŽðšœðšðšŠðšœ ðš—ðšŽðšŒ, ðšŠðš•ðš’ðššðšžðšŽðš ðšŽðšðšŽðš ðšŽðš•ðš’ðš. ð™³ðš˜ðš—ðšŽðšŒ ðš‹ðš•ðšŠðš—ðšðš’ðš ðš˜ðšðš’𚘠ðšŠðš ðš—ðš’ðš‹ðš‘ ðšŸðšŠðš›ðš’ðšžðšœ ðšðš›ðš’ðšœðšðš’ðššðšžðšŽ. ðš‚ðšŽðš ðš›ðš‘ðš˜ðš—ðšŒðšžðšœ ðš™ðš˜ðš›ðšðšŠ ðš˜ðš›ðšŒðš’, ðš™ðš•ðšŠðšŒðšŽðš›ðšŠðš ðšŒðš˜ðš—ðšðš’ðš–ðšŽðš—ðšðšžðš– ðš˜ðš›ðšŒðš’ ðš’ðš–ðš™ðšŽðš›ðšðš’ðšŽðš ðšŸðš’ðšðšŠðšŽ. ð™´ðšðš’ðšŠðš– ðšŽðšž ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ ðšŽðš›ðš˜ðšœ. ð™¸ðš— ðšŸðšŽðš—ðšŽðš—ðšŠðšðš’𚜠ðš™ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðš•ðš’ðš‹ðšŽðš›ðš˜ ðšœðšŽðš ðšŽðšðšŽðšœðšðšŠðšœ. ð™³ðšžðš’𚜠ðšðš’ðš—ðšŒðš’ðšðšžðš—ðš ðš–ðš˜ðš•ðšŽðšœðšðš’𚎠ðš›ðš’ðšœðšžðšœ ðš’ðš ðš›ðšžðšðš›ðšžðš–. ð™½ðšžðš•ðš•ðšŠ ðšðšŠðšŒðš’ðš•ðš’ðšœðš’. ð™³ðšžðš’𚜠ðšŸðšŽðš• ðš™ðšžðš›ðšžðšœ ðšŠðšŒ ðš•ðš’ðš‹ðšŽðš›ðš˜ ðš›ðšžðšðš›ðšžðš– ðšžðš•ðšðš›ðš’ðšŒðšŽðšœ ðšœðšŽðš ðšŸðšŽðš• ðšŠðšžðšðšžðšŽ. ð™³ðš˜ðš—ðšŽðšŒ ðšŽðšðšŽðš ðšðš’ðšŠðš– ðšŽðš ðš•ðš’ðš‹ðšŽðš›ðš˜ ðš™ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðšŸðšŽðš—ðšŽðš—ðšŠðšðš’𚜠ðš—ðš˜ðš— ðšŽðš ðš™ðšžðš›ðšžðšœ. ðš„ðš ðšŽðšž ðš•ðšŽðšŒðšðšžðšœ ðš™ðšžðš›ðšžðšœ, ðšŽðšðšŽðš ðšðš›ðšŠðšŸðš’ðšðšŠ ðšŽðš›ðšŠðš. ðš‚ðšŽðš ðš—ðšŽðšŒ ðšðšŽðš•ðš’𚜠ðš•ðš’ðšðšžðš•ðšŠ, ðšŽðšðšŽðš ðš•ðšžðšŒðšðšžðšœ ðšŽðš›ðšŠðš. ð™¼ðšŠðšžðš›ðš’𚜠ðšœðšŠðš™ðš’ðšŽðš— ðšŽðšœðš, ðš–ðšŠðšðšðš’𚜠ðšžðš ðšðšŠðšžðšŒðš’ðš‹ðšžðšœ ðšŽðš, ðšðšŠðšžðšŒðš’ðš‹ðšžðšœ ðš—ðšŽðšŒ ðš—ðšžðš—ðšŒ. ð™½ðšžðš—𚌠ðšðšŽðš–ðš™ðšžðšœ ðš’ðšŠðšŒðšžðš•ðš’𚜠ðšžðš›ðš—𚊠ðšŸðš’ðšðšŠðšŽ ðšðš’ðšðš—ðš’ðšœðšœðš’ðš–.
+
+ð™¸ðš— ðš—ðšžðš—𚌠ðš—ðš’ðšœðš’, ðšžðš•ðš•ðšŠðš–ðšŒðš˜ðš›ðš™ðšŽðš› ðšŸðšŽðš• ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ ðšŸðš˜ðš•ðšžðšðš™ðšŠðš, ðš’ðš–ðš™ðšŽðš›ðšðš’ðšŽðš 𚊠ðšðš’ðšŠðš–. ð™¿ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðšŸðšŽðš• ðš•ðš’ðšðšžðš•ðšŠ ðšŽðšðšŽðš ðš•ðšŽðš˜ ðšŠðšžðšŒðšðš˜ðš› ðš›ðš‘ðš˜ðš—ðšŒðšžðšœ ðšŒðš˜ðš—ðšŸðšŠðš•ðš•ðš’𚜠𚊠ðšðš˜ðš›ðšðš˜ðš›. ð™´ðšðš’ðšŠðš– ðšŠðš ðš•ðšŽðšŒðšðšžðšœ ðšŸðš’ðšðšŠðšŽ ðšŠðš—ðšðšŽ ðšðšŽðš–ðš™ðšžðšœ ðšžðš•ðšðš›ðš’ðšŒðš’ðšŽðšœ ðšžðš ðšŸðš’ðšðšŠðšŽ ðšŽðš•ðš’ðš. ð™½ðšŠðš– ðš’ðš— ðšðšžðš›ðš™ðš’𚜠ðš’ðš™ðšœðšžðš–, ðšŠðš ðš–ðšŠðšðšðš’𚜠ðšðš˜ðš›ðšðš˜ðš›. ð™½ðšžðš•ðš•ðšŠ ðšŽðš ðš™ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðš—ðšŽðššðšžðšŽ. ð™³ðš˜ðš—ðšŽðšŒ ðš•ðšŠðšŒðš’ðš—ðš’ðšŠ, ðšðšžðš›ðš™ðš’𚜠ðšžðš ðšðš’ðšŒðšðšžðš– ðšœðš˜ðšðšŠðš•ðšŽðšœ, ðšðšžðš’ ðš—ðš’ðšœðš’ ðšðšŠðšŒðš’ðš•ðš’ðšœðš’𚜠ðš›ðš’ðšœðšžðšœ, ðšœðšŽðš ðš‹ðš•ðšŠðš—ðšðš’ðš ðš–ðš’ ðšŽðš•ðš’ðš ðšžðš ðš—ðš’ðš‹ðš‘. ð™°ðš•ðš’ðššðšžðšŠðš– ðšŽðš›ðšŠðš ðšŸðš˜ðš•ðšžðšðš™ðšŠðš. ð™¿ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðš—ðšŽðšŒ ðšŽðš•ðš’ðš ðš’ðš ðš“ðšžðšœðšðš˜ ðš’ðš—ðšðšŽðš›ðšðšžðš– ðš˜ðš›ðš—ðšŠðš›ðšŽ 𚊠ðš’ðš— ðšðš’ðšŠðš–. ð™¼ðš˜ðš›ðš‹ðš’ ðšŠðš ðšðš›ðš’ðš—ðšðš’ðš•ðš•ðšŠ ðš•ðšŽðšŒðšðšžðšœ. ð™³ðš˜ðš—ðšŽðšŒ ðšŒðš˜ðš—ðšŸðšŠðš•ðš•ðš’𚜠ðšŽðš•ðšŽðš’ðšðšŽðš—ðš ðšðšŽðš•ðš’ðšœ, ðš’ðš ðšœðšŠðšðš’ðšðšðš’𚜠ðšžðš›ðš—𚊠ðš–ðšŠðšðšðš’𚜠ðš—ðšŽðšŒ. ðš„ðš ðšŒðš˜ðš—ðšœðšŽðššðšžðšŠðš ðšðšžðš›ðš™ðš’𚜠ðšŸðšŽðš• ðššðšžðšŠðš– ðšðšŽðš–ðš™ðš˜ðš› ðšŽðšðšŽðš ðšžðš•ðšðš›ðš’ðšŒðšŽðšœ ðš—ðšŽðššðšžðšŽ ðš–ðš˜ðš•ðšŽðšœðšðš’ðšŽ. ðš‚ðšžðšœðš™ðšŽðš—ðšðš’ðšœðšœðšŽ ðšðšŽðš•ðš•ðšžðšœ ðš—ðš’ðšœðš’, ðš‘ðšŽðš—ðšðš›ðšŽðš›ðš’ðš ðšŸðš’ðšðšŠðšŽ ðš™ðš˜ðšœðšžðšŽðš›ðšŽ ðšŽðšðšŽðš, ðš™ðš•ðšŠðšŒðšŽðš›ðšŠðš ðšœðšŽðš ðš–ðšŽðšðšžðšœ. ð™¸ðš—ðšðšŽðšðšŽðš› ðš™ðš•ðšŠðšŒðšŽðš›ðšŠðš ðš’ðš–ðš™ðšŽðš›ðšðš’ðšŽðš ðš™ðš•ðšŠðšŒðšŽðš›ðšŠðš. ð™¼ðš˜ðš›ðš‹ðš’ ðšðšŽðš–ðš™ðšžðšœ ðš—ðšžðš—𚌠ðš—ðšžðš—ðšŒ. ð™¸ðš—ðšðšŽðšðšŽðš› ðššðšžðš’𚜠ðš˜ðš›ðšŒðš’ ðšðšŽðš•ðš’ðšœ. ð™½ðšžðš—𚌠ðšœðšŽðš–ðš™ðšŽðš›, ðšŠðš›ðšŒðšž ðš—ðš˜ðš— ðšŒðš˜ðš—ðšœðšŽðššðšžðšŠðš ðšðš’ðšðš—ðš’ðšœðšœðš’ðš–, ðš•ðš˜ðš›ðšŽðš– ðšžðš›ðš—𚊠ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ ðš–ðš’, ðš—ðšŽðšŒ ðšŠðšŒðšŒðšžðš–ðšœðšŠðš— ðšŽðš—ðš’ðš– ðš–𚒠𚊠ðš™ðšžðš›ðšžðšœ. ð™²ðšžðš›ðšŠðš‹ðš’ðšðšžðš› ðšŽðš ðšŽðš•ðš’ðš ðš’ðš— ðšœðšŽðš– ðšœðš˜ðšðšŠðš•ðšŽðšœ ðš’ðš—ðšðšŽðš›ðšðšžðš–. ð™¿ðšŽðš•ðš•ðšŽðš—ðšðšŽðšœðššðšžðšŽ ðšœðšŠðšðš’ðšðšðš’𚜠ðš›ðšžðšðš›ðšžðš– ðš•ðšŽðšŒðšðšžðšœ ðšŒðš˜ðš–ðš–ðš˜ðšðš˜ ðšŒðš˜ðš—ðšðš’ðš–ðšŽðš—ðšðšžðš–. ð™´ðšðš’ðšŠðš– ðšðš›ðš’ðš—ðšðš’ðš•ðš•ðšŠ, ðššðšžðšŠðš– ðš—ðšŽðšŒ ðšžðš•ðš•ðšŠðš–ðšŒðš˜ðš›ðš™ðšŽðš› ðšœðš˜ðš•ðš•ðš’ðšŒðš’ðšðšžðšðš’ðš—, ðšðšžðš›ðš™ðš’𚜠ðš—ðš’ðšœðš’ ðšŠðš•ðš’ðššðšžðšŽðš ðš›ðš’ðšœðšžðšœ, ðšœðš’ðš ðšŠðš–ðšŽðš ðšŽðš•ðšŽðš–ðšŽðš—ðšðšžðš– ðšðš˜ðš•ðš˜ðš› ðš•ðš˜ðš›ðšŽðš– ðšŸðš’ðšðšŠðšŽ ðš•ðš’ðšðšžðš•ðšŠ. ð™¿ðš›ðšŠðšŽðšœðšŽðš—ðš ðš™ðš‘ðšŠðš›ðšŽðšðš›ðšŠ ðšŠðš•ðš’ðššðšžðšŽðš ðšŸðšŽðš•ðš’ðš ðšœðšŽðš ðš™ðš•ðšŠðšŒðšŽðš›ðšŠðš. </p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/600974-2.html b/layout/reftests/bugs/600974-2.html
new file mode 100644
index 0000000000..747d009e66
--- /dev/null
+++ b/layout/reftests/bugs/600974-2.html
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML>
+<!-- This is a test for decoding supplementary characters. It contains text in
+ Unicode plane 1 encoded as GB18030. Don't reencode it in any way. -->
+<html lang="en" style="font-family: serif; font-size: 16px; overflow: hidden;">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=gb18030">
+ <title></title>
+</head>
+<body>
+<p>”3É7”3Ì6”3Ì9”3Ë6”3Ì4 ”3Ì0”3Ì7”3Í0”3Í2”3Ì4 ”3Ë5”3Ì6”3Ì3”3Ì6”3Ì9 ”3Í0”3Ì0”3Í1 ”3Ë2”3Ì4”3Ë6”3Í1,
+”3Ë4”3Ì6”3Ì5”3Í0”3Ë6”3Ë4”3Í1”3Ë6”3Í1”3Í2”3Ì9 ”3Ë2”3Ë5”3Ì0”3Ì7”3Ì0”3Í0”3Ë4”3Ì0”3Ì5”3Ë8 ”3Ë6”3Ì3”3Ì0”3Í1. ”3È6”3Ì3”3Ì0”3Ì8”3Í2”3Ë2”3Ì4
+”3Í3”3Ë6”3Ì3 ”3Ë2”3Ì9”3Ë4”3Í2 ”3Ì5”3Ì0”3Ë3”3Ë9, ”3Í3”3Ë6”3Ì3 ”3Ë5”3Ì0”3Ë4”3Í1”3Í2”3Ì4 ”3Í1”3Ì6”3Ì9”3Í1”3Ì6”3Ì9. ”3È8”3Ì9”3Ë2”3Í0
+”3Ì0”3Ë2”3Ë4”3Í2”3Ì3”3Ì0”3Í0 ”3Ë6”3Ì3”3Ì0”3Í1 ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ì5”3Í2”3Ì5”3Ë4 ”3Í0”3Ì6”3Ì3”3Ì3”3Ì0”3Ë4”3Ì0”3Í1”3Í2”3Ë5”3Ì0”3Ì5 ”3Ë6”3Í1
+”3Ë4”3Ì6”3Ì4”3Ì4”3Ì6”3Ë5”3Ì6 ”3Í3”3Ë6”3Ì3”3Ì0”3Í1 ”3Ë2”3Ì3”3Ì0”3Ì8”3Í2”3Ë2”3Ì4. ”3Ê2”3Í2”3Ì0”3Í0”3Ì8”3Í2”3Ë6 ”3Í3”3Ë6”3Ì3
+”3Ë3”3Ì0”3Ë3”3Ë6”3Ì5”3Ë5”3Í2”3Ì4 ”3Ì4”3Ë2”3Í2”3Ì9”3Ì0”3Í0. ”3É9”3Í2”3Ì3”3Ì3”3Ë2”3Ì4 ”3Ì5”3Ë6”3Ë4 ”3Ë7”3Ë6”3Ì3”3Ì0”3Í0 ”3Ë5”3Ì0”3Ë2”3Ì4,
+”3Í3”3Ë6”3Ì3 ”3Í3”3Í2”3Ì3”3Ì7”3Í2”3Í1”3Ë2”3Í1”3Ë6 ”3Ì7”3Í2”3Ì9”3Í2”3Í0. ”3È8”3Ì9”3Ë2”3Í0 ”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2,
+”3Í3”3Ë6”3Ì3”3Ì0”3Í1 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ì7”3Í2”3Ì3”3Í3”3Ì0”3Ì5”3Ë2”3Ì9 ”3Ë4”3Í2”3Ì9”3Í0”3Í2”3Í0, ”3Ì5”3Ì0”3Í0”3Ì3
+”3Ì7”3Í2”3Ì9”3Í2”3Í0 ”3Ì7”3Ì6”3Ì9”3Í1”3Í1”3Ì0”3Í1”3Ì6”3Ì9 ”3Ì8”3Í2”3Ë2”3Ì4, ”3Ì5”3Ì6”3Ì5 ”3Ë2”3Ë5”3Ì0”3Ì7”3Ì0”3Í0”3Ë4”3Ì0”3Ì5”3Ë8
+”3Ë6”3Ì9”3Ì6”3Í0 ”3Ì4”3Ë2”3Í2”3Ì9”3Ì0”3Í0 ”3Ë6”3Í2 ”3Ë7”3Ë6”3Ì3”3Ì0”3Í0. ”3É9”3Í2”3Ì3”3Ì3”3Ë2”3Ì4 ”3Ì3”3Í2”3Ë4”3Í1”3Í2”3Í0
+”3Ì5”3Ì0”3Í0”3Ì0 ”3Í0”3Ì0”3Í1 ”3Ë2”3Ì4”3Ë6”3Í1 ”3Ì5”3Ì0”3Í0”3Ì3 ”3Í0”3Ì6”3Ë5”3Ë2”3Ì3”3Ë6”3Í0 ”3Ì0”3Ì5”3Í1”3Ë6”3Ì9”3Ë5”3Í2”3Ì4.
+”3Ê1”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Í3”3Í2”3Ì3”3Ì7”3Í2”3Í1”3Ë2”3Í1”3Ë6 ”3Ë2”3Ì3”3Ì0”3Ì8”3Í2”3Ë2”3Ì4 ”3Ì3”3Ë6”3Ì6, ”3Ì0”3Ë5
+”3Ì9”3Ë9”3Ì6”3Ì5”3Ë4”3Í2”3Í0 ”3Í0”3Ë6”3Ì4 ”3Ë4”3Ì6”3Ì4”3Ì4”3Ì6”3Ë5”3Ì6 ”3Ì0”3Ë5. ”3Ê4”3Ë6”3Ë5 ”3Ì3”3Ë2”3Ì6”3Ì9”3Ë6”3Ë6”3Í1
+”3Ì0”3Ì5”3Í1”3Ë6”3Ì9”3Ë5”3Í2”3Ì4 ”3Ë4”3Ì6”3Ì5”3Ë5”3Ì0”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4. ”3É9”3Í2”3Ì3”3Ì3”3Ë2”3Ì4 ”3Ì6”3Ì9”3Ì5”3Ë2”3Ì9”3Ë6
+”3Í3”3Ë6”3Í0”3Í1”3Ì0”3Ë3”3Í2”3Ì3”3Í2”3Ì4 ”3Ì7”3Ì6”3Ì9”3Í1”3Ë2. ”3È6”3Ë6”3Ì5”3Ë6”3Ë2”3Ì5 ”3Ì0”3Ë5 ”3Ë5”3Ì6”3Ì3”3Ì6”3Ì9
+”3Ë5”3Ì6”3Ì3”3Ì6”3Ì9, ”3Ì5”3Ë6”3Ë4 ”3Ë6”3Ì3”3Ë6”3Ì0”3Ë7”3Ë6”3Ì5”3Ë5 ”3Ì5”3Ë6”3Ì8”3Í2”3Ë6. ”3È9”3Ì6”3Ì5”3Ë6”3Ë4
+”3Í1”3Ì0”3Ì5”3Ë4”3Ì0”3Ë5”3Í2”3Ì5”3Í1 ”3Ë4”3Ì6”3Ì4”3Ì4”3Ì6”3Ë5”3Ì6 ”3Ì5”3Ì0”3Í0”3Ì3, ”3Ì5”3Ì6”3Ì5
+”3Í0”3Ë4”3Ë6”3Ì3”3Ë6”3Ì9”3Ì0”3Í0”3Ì8”3Í2”3Ë6 ”3Ë5”3Ì6”3Ì3”3Ì6”3Ì9 ”3Ë2”3Ë4”3Ë4”3Í2”3Ì4”3Í0”3Ë2”3Ì5 ”3Ì0”3Ë5.
+”3Ê1”3Ì9”3Ë2”3Ë6”3Í0”3Ë6”3Ì5”3Í1 ”3Ë3”3Ì0”3Ë3”3Ë6”3Ì5”3Ë5”3Í2”3Ì4 ”3Í3”3Ì0”3Í3”3Ë6”3Ì9”3Ì9”3Ë2 ”3Í0”3Í2”3Í0”3Ë4”3Ì0”3Ì7”3Ì0”3Í1.
+”3É9”3Í2”3Ì5”3Ë4 ”3Ë4”3Ì6”3Ì5”3Ë5”3Ì0”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4, ”3Ë2”3Ì5”3Í1”3Ë6 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6
+”3Ë4”3Ì6”3Ì5”3Ë5”3Ì0”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4 ”3Ì9”3Ë9”3Ì6”3Ì5”3Ë4”3Í2”3Í0, ”3Ì5”3Í2”3Ì5”3Ë4 ”3Ì5”3Ì0”3Ë3”3Ë9
+”3Ì7”3Í2”3Ì3”3Í3”3Ì0”3Ì5”3Ë2”3Ì9 ”3Í1”3Í2”3Ì9”3Ì7”3Ì0”3Í0, ”3Ì0”3Ì5 ”3Ì3”3Ì6”3Ë3”3Ì6”3Ì9”3Í1”3Ì0”3Í0 ”3Ì3”3Ë2”3Ë4”3Í2”3Í0 ”3Ì3”3Ë6”3Ì6
+”3Í2”3Í1 ”3Ì9”3Ì0”3Í0”3Í2”3Í0. ”3Ê4”3Ë6”3Ë5 ”3Ì0”3Ì5 ”3Ë6”3Ì5”3Ì0”3Ì4 ”3Í1”3Ì6”3Ì9”3Í1”3Ì6”3Ì9, ”3Í3”3Ì0”3Í1”3Ë2”3Ë6
+”3Ë2”3Ë4”3Ë4”3Í2”3Ì4”3Í0”3Ë2”3Ì5 ”3Ì9”3Ì0”3Í0”3Í2”3Í0. ”3È6”3Ì3”3Ì0”3Ì8”3Í2”3Ë2”3Ì4 ”3Ì4”3Ì0 ”3Ë6”3Ì9”3Ë2”3Í1,
+”3Ë4”3Ì6”3Ì4”3Ì4”3Ì6”3Ë5”3Ì6 ”3Ì5”3Ë6”3Ë4 ”3Ì3”3Ì6”3Ë3”3Ì6”3Ì9”3Í1”3Ì0”3Í0 ”3Ì5”3Ì6”3Ì5, ”3Ë5”3Ì0”3Ë8”3Ì5”3Ì0”3Í0”3Í0”3Ì0”3Ì4
+”3Ë6”3Ë8”3Ë6”3Í1 ”3Ë6”3Ì9”3Ì6”3Í0. ”3É1”3Í2”3Í0”3Ë4”3Ë6 ”3Ì3”3Ë2”3Ë4”3Í2”3Í0 ”3Ì4”3Ë2”3Í0”3Í0”3Ë2,
+”3Ë4”3Ì6”3Ì5”3Í0”3Ë6”3Ë4”3Í1”3Ë6”3Í1”3Í2”3Ì9 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2 ”3Í0”3Ë6”3Ë5,
+”3Í3”3Ì0”3Í3”3Ë6”3Ì9”3Ì9”3Ë2 ”3Ì0”3Ì5 ”3Ì8”3Í2”3Ë2”3Ì4.
+”3È8”3Í2”3Ì9”3Ë2”3Ë3”3Ì0”3Í1”3Í2”3Ì9 ”3Ì5”3Ë6”3Ë4 ”3Ë2”3Ì9”3Ë4”3Í2 ”3Ì8”3Í2”3Ë2”3Ì4, ”3Í0”3Ì0”3Í1 ”3Ë2”3Ì4”3Ë6”3Í1
+”3Í1”3Ì0”3Ì5”3Ë4”3Ì0”3Ë5”3Í2”3Ì5”3Í1 ”3Ì3”3Ë2”3Ë4”3Í2”3Í0. ”3Ê4”3Ë6”3Ë5 ”3Ì4”3Ì6”3Ì3”3Ë6”3Í0”3Í1”3Ì0”3Ë6
+”3Ë5”3Ì0”3Ë8”3Ì5”3Ì0”3Í0”3Í0”3Ì0”3Ì4 ”3Ì5”3Ì0”3Í0”3Ì3, ”3Ë2”3Í1 ”3Ë7”3Ë6”3Ì9”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4 ”3Ì4”3Ë2”3Í2”3Ì9”3Ì0”3Í0
+”3Ë6”3Ë8”3Ë6”3Í0”3Í1”3Ë2”3Í0 ”3Ì5”3Ë6”3Ë4. ”3Ê4”3Ë6”3Ë5 ”3Ì4”3Ì0 ”3Ì8”3Í2”3Ë2”3Ì4, ”3Í2”3Ì3”3Í1”3Ì9”3Ì0”3Ë4”3Ì0”3Ë6”3Í0 ”3Í2”3Í1
+”3Í1”3Ì0”3Ì5”3Ë4”3Ì0”3Ë5”3Í2”3Ì5”3Í1 ”3Í3”3Ë6”3Ì3, ”3Ë3”3Ì0”3Ë3”3Ë6”3Ì5”3Ë5”3Í2”3Ì4 ”3Ë2”3Ë4 ”3Ì4”3Ë2”3Í0”3Í0”3Ë2.
+”3Ê7”3Ë6”3Í0”3Í1”3Ì0”3Ë3”3Í2”3Ì3”3Í2”3Ì4 ”3Í3”3Ë6”3Ì3 ”3Ì9”3Ì0”3Í0”3Í2”3Í0 ”3Ì7”3Ì6”3Ì9”3Í1”3Ë2 ”3Ì4”3Ë2”3Í2”3Ì9”3Ì0”3Í0
+”3Í1”3Ë6”3Ì4”3Ì7”3Ì6”3Ì9 ”3Ë3”3Ì3”3Ë2”3Ì5”3Ë5”3Ì0”3Í1 ”3Ë6”3Í2 ”3Í3”3Ë6”3Ì3 ”3Ë5”3Ì0”3Ë2”3Ì4. ”3Ê2”3Í2”3Ì0”3Í0”3Ì8”3Í2”3Ë6
+”3Ë6”3Ì9”3Ì6”3Í0 ”3Ì3”3Ì0”3Ë3”3Ë6”3Ì9”3Ì6, ”3Í1”3Ë6”3Ì4”3Ì7”3Ì6”3Ì9 ”3Í2”3Í1 ”3Ë6”3Ë8”3Ë6”3Í0”3Í1”3Ë2”3Í0 ”3Ì5”3Ë6”3Ë4,
+”3Ë2”3Ì3”3Ì0”3Ì8”3Í2”3Ë6”3Í1 ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ë6”3Ì3”3Ì0”3Í1. ”3È9”3Ì6”3Ì5”3Ë6”3Ë4 ”3Ë3”3Ì3”3Ë2”3Ì5”3Ë5”3Ì0”3Í1 ”3Ì6”3Ë5”3Ì0”3Ì6
+”3Ë2”3Í1 ”3Ì5”3Ì0”3Ë3”3Ë9 ”3Í3”3Ë2”3Ì9”3Ì0”3Í2”3Í0 ”3Í1”3Ì9”3Ì0”3Í0”3Í1”3Ì0”3Ì8”3Í2”3Ë6. ”3Ê4”3Ë6”3Ë5 ”3Ì9”3Ë9”3Ì6”3Ì5”3Ë4”3Í2”3Í0
+”3Ì7”3Ì6”3Ì9”3Í1”3Ë2 ”3Ì6”3Ì9”3Ë4”3Ì0, ”3Ì7”3Ì3”3Ë2”3Ë4”3Ë6”3Ì9”3Ë2”3Í1 ”3Ë4”3Ì6”3Ì5”3Ë5”3Ì0”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4 ”3Ì6”3Ì9”3Ë4”3Ì0
+”3Ì0”3Ì4”3Ì7”3Ë6”3Ì9”3Ë5”3Ì0”3Ë6”3Í1 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6. ”3É0”3Í1”3Ì0”3Ë2”3Ì4 ”3Ë6”3Í2 ”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2
+”3Ë6”3Ì9”3Ì6”3Í0. ”3É4”3Ì5 ”3Í3”3Ë6”3Ì5”3Ë6”3Ì5”3Ë2”3Í1”3Ì0”3Í0 ”3Ì7”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Ì3”3Ì0”3Ë3”3Ë6”3Ì9”3Ì6
+”3Í0”3Ë6”3Ë5 ”3Ë6”3Ë8”3Ë6”3Í0”3Í1”3Ë2”3Í0. ”3È9”3Í2”3Ì0”3Í0 ”3Í1”3Ì0”3Ì5”3Ë4”3Ì0”3Ë5”3Í2”3Ì5”3Í1 ”3Ì4”3Ì6”3Ì3”3Ë6”3Í0”3Í1”3Ì0”3Ë6
+”3Ì9”3Ì0”3Í0”3Í2”3Í0 ”3Ì0”3Ë5 ”3Ì9”3Í2”3Í1”3Ì9”3Í2”3Ì4. ”3É9”3Í2”3Ì3”3Ì3”3Ë2 ”3Ë7”3Ë2”3Ë4”3Ì0”3Ì3”3Ì0”3Í0”3Ì0. ”3È9”3Í2”3Ì0”3Í0
+”3Í3”3Ë6”3Ì3 ”3Ì7”3Í2”3Ì9”3Í2”3Í0 ”3Ë2”3Ë4 ”3Ì3”3Ì0”3Ë3”3Ë6”3Ì9”3Ì6 ”3Ì9”3Í2”3Í1”3Ì9”3Í2”3Ì4 ”3Í2”3Ì3”3Í1”3Ì9”3Ì0”3Ë4”3Ë6”3Í0
+”3Í0”3Ë6”3Ë5 ”3Í3”3Ë6”3Ì3 ”3Ë2”3Í2”3Ë8”3Í2”3Ë6. ”3È9”3Ì6”3Ì5”3Ë6”3Ë4 ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ë5”3Ì0”3Ë2”3Ì4 ”3Ë6”3Í1
+”3Ì3”3Ì0”3Ë3”3Ë6”3Ì9”3Ì6 ”3Ì7”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Í3”3Ë6”3Ì5”3Ë6”3Ì5”3Ë2”3Í1”3Ì0”3Í0 ”3Ì5”3Ì6”3Ì5 ”3Ë6”3Í1
+”3Ì7”3Í2”3Ì9”3Í2”3Í0. ”3Ê6”3Í1 ”3Ë6”3Í2 ”3Ì3”3Ë6”3Ë4”3Í1”3Í2”3Í0 ”3Ì7”3Í2”3Ì9”3Í2”3Í0, ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ë8”3Ì9”3Ë2”3Í3”3Ì0”3Ë5”3Ë2
+”3Ë6”3Ì9”3Ë2”3Í1. ”3Ê4”3Ë6”3Ë5 ”3Ì5”3Ë6”3Ë4 ”3Ë7”3Ë6”3Ì3”3Ì0”3Í0 ”3Ì3”3Ì0”3Ë8”3Í2”3Ì3”3Ë2, ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ì3”3Í2”3Ë4”3Í1”3Í2”3Í0
+”3Ë6”3Ì9”3Ë2”3Í1. ”3É8”3Ë2”3Í2”3Ì9”3Ì0”3Í0 ”3Í0”3Ë2”3Ì7”3Ì0”3Ë6”3Ì5 ”3Ë6”3Í0”3Í1, ”3Ì4”3Ë2”3Í1”3Í1”3Ì0”3Í0 ”3Í2”3Í1
+”3Ë7”3Ë2”3Í2”3Ë4”3Ì0”3Ë3”3Í2”3Í0 ”3Ë6”3Í1, ”3Ë7”3Ë2”3Í2”3Ë4”3Ì0”3Ë3”3Í2”3Í0 ”3Ì5”3Ë6”3Ë4 ”3Ì5”3Í2”3Ì5”3Ë4. ”3É9”3Í2”3Ì5”3Ë4
+”3Í1”3Ë6”3Ì4”3Ì7”3Í2”3Í0 ”3Ì0”3Ë2”3Ë4”3Í2”3Ì3”3Ì0”3Í0 ”3Í2”3Ì9”3Ì5”3Ë2 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ë5”3Ì0”3Ë8”3Ì5”3Ì0”3Í0”3Í0”3Ì0”3Ì4.
+”3É4”3Ì5 ”3Ì5”3Í2”3Ì5”3Ë4 ”3Ì5”3Ì0”3Í0”3Ì0, ”3Í2”3Ì3”3Ì3”3Ë2”3Ì4”3Ë4”3Ì6”3Ì9”3Ì7”3Ë6”3Ì9 ”3Í3”3Ë6”3Ì3 ”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2
+”3Í3”3Ì6”3Ì3”3Í2”3Í1”3Ì7”3Ë2”3Í1, ”3Ì0”3Ì4”3Ì7”3Ë6”3Ì9”3Ë5”3Ì0”3Ë6”3Í1 ”3Ë2 ”3Ë5”3Ì0”3Ë2”3Ì4.
+”3Ê1”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Í3”3Ë6”3Ì3 ”3Ì3”3Ì0”3Ë8”3Í2”3Ì3”3Ë2 ”3Ë6”3Ë8”3Ë6”3Í1 ”3Ì3”3Ë6”3Ì6
+”3Ë2”3Í2”3Ë4”3Í1”3Ì6”3Ì9 ”3Ì9”3Ë9”3Ì6”3Ì5”3Ë4”3Í2”3Í0 ”3Ë4”3Ì6”3Ì5”3Í3”3Ë2”3Ì3”3Ì3”3Ì0”3Í0 ”3Ë2 ”3Í1”3Ì6”3Ì9”3Í1”3Ì6”3Ì9.
+”3É0”3Í1”3Ì0”3Ë2”3Ì4 ”3Ë2”3Í1 ”3Ì3”3Ë6”3Ë4”3Í1”3Í2”3Í0 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ë2”3Ì5”3Í1”3Ë6 ”3Í1”3Ë6”3Ì4”3Ì7”3Í2”3Í0
+”3Í2”3Ì3”3Í1”3Ì9”3Ì0”3Ë4”3Ì0”3Ë6”3Í0 ”3Í2”3Í1 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ë6”3Ì3”3Ì0”3Í1. ”3É9”3Ë2”3Ì4 ”3Ì0”3Ì5 ”3Í1”3Í2”3Ì9”3Ì7”3Ì0”3Í0
+”3Ì0”3Ì7”3Í0”3Í2”3Ì4, ”3Ë2”3Í1 ”3Ì4”3Ë2”3Í1”3Í1”3Ì0”3Í0 ”3Í1”3Ì6”3Ì9”3Í1”3Ì6”3Ì9. ”3É9”3Í2”3Ì3”3Ì3”3Ë2 ”3Ë6”3Í1
+”3Ì7”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Ì5”3Ë6”3Ì8”3Í2”3Ë6. ”3È9”3Ì6”3Ì5”3Ë6”3Ë4 ”3Ì3”3Ë2”3Ë4”3Ì0”3Ì5”3Ì0”3Ë2,
+”3Í1”3Í2”3Ì9”3Ì7”3Ì0”3Í0 ”3Í2”3Í1 ”3Ë5”3Ì0”3Ë4”3Í1”3Í2”3Ì4 ”3Í0”3Ì6”3Ë5”3Ë2”3Ì3”3Ë6”3Í0, ”3Ë5”3Í2”3Ì0 ”3Ì5”3Ì0”3Í0”3Ì0
+”3Ë7”3Ë2”3Ë4”3Ì0”3Ì3”3Ì0”3Í0”3Ì0”3Í0 ”3Ì9”3Ì0”3Í0”3Í2”3Í0, ”3Í0”3Ë6”3Ë5 ”3Ë3”3Ì3”3Ë2”3Ì5”3Ë5”3Ì0”3Í1 ”3Ì4”3Ì0 ”3Ë6”3Ì3”3Ì0”3Í1 ”3Í2”3Í1
+”3Ì5”3Ì0”3Ë3”3Ë9. ”3È6”3Ì3”3Ì0”3Ì8”3Í2”3Ë2”3Ì4 ”3Ë6”3Ì9”3Ë2”3Í1 ”3Í3”3Ì6”3Ì3”3Í2”3Í1”3Ì7”3Ë2”3Í1.
+”3Ê1”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6 ”3Ì5”3Ë6”3Ë4 ”3Ë6”3Ì3”3Ì0”3Í1 ”3Ì0”3Ë5 ”3Ì1”3Í2”3Í0”3Í1”3Ì6
+”3Ì0”3Ì5”3Í1”3Ë6”3Ì9”3Ë5”3Í2”3Ì4 ”3Ì6”3Ì9”3Ì5”3Ë2”3Ì9”3Ë6 ”3Ë2 ”3Ì0”3Ì5 ”3Ë5”3Ì0”3Ë2”3Ì4. ”3É8”3Ì6”3Ì9”3Ë3”3Ì0 ”3Ë2”3Í1
+”3Ë7”3Ì9”3Ì0”3Ì5”3Ë8”3Ì0”3Ì3”3Ì3”3Ë2 ”3Ì3”3Ë6”3Ë4”3Í1”3Í2”3Í0. ”3È9”3Ì6”3Ì5”3Ë6”3Ë4 ”3Ë4”3Ì6”3Ì5”3Í3”3Ë2”3Ì3”3Ì3”3Ì0”3Í0
+”3Ë6”3Ì3”3Ë6”3Ì0”3Ë7”3Ë6”3Ì5”3Ë5 ”3Ë7”3Ë6”3Ì3”3Ì0”3Í0, ”3Ì0”3Ë5 ”3Í0”3Ë2”3Ë8”3Ì0”3Í1”3Í1”3Ì0”3Í0 ”3Í2”3Ì9”3Ì5”3Ë2
+”3Ì4”3Ë2”3Í1”3Í1”3Ì0”3Í0 ”3Ì5”3Ë6”3Ë4. ”3Ê6”3Í1 ”3Ë4”3Ì6”3Ì5”3Í0”3Ë6”3Ì8”3Í2”3Ë2”3Í1 ”3Í1”3Í2”3Ì9”3Ì7”3Ì0”3Í0 ”3Í3”3Ë6”3Ì3
+”3Ì8”3Í2”3Ë2”3Ì4 ”3Í1”3Ë6”3Ì4”3Ì7”3Ì6”3Ì9 ”3Ë6”3Ë8”3Ë6”3Í1 ”3Í2”3Ì3”3Í1”3Ì9”3Ì0”3Ë4”3Ë6”3Í0 ”3Ì5”3Ë6”3Ì8”3Í2”3Ë6
+”3Ì4”3Ì6”3Ì3”3Ë6”3Í0”3Í1”3Ì0”3Ë6. ”3Ê4”3Í2”3Í0”3Ì7”3Ë6”3Ì5”3Ë5”3Ì0”3Í0”3Í0”3Ë6 ”3Í1”3Ë6”3Ì3”3Ì3”3Í2”3Í0 ”3Ì5”3Ì0”3Í0”3Ì0,
+”3Ë9”3Ë6”3Ì5”3Ë5”3Ì9”3Ë6”3Ì9”3Ì0”3Í1 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ì7”3Ì6”3Í0”3Í2”3Ë6”3Ì9”3Ë6 ”3Ë6”3Ë8”3Ë6”3Í1, ”3Ì7”3Ì3”3Ë2”3Ë4”3Ë6”3Ì9”3Ë2”3Í1
+”3Í0”3Ë6”3Ë5 ”3Ì4”3Ë6”3Í1”3Í2”3Í0. ”3É4”3Ì5”3Í1”3Ë6”3Ë8”3Ë6”3Ì9 ”3Ì7”3Ì3”3Ë2”3Ë4”3Ë6”3Ì9”3Ë2”3Í1 ”3Ì0”3Ì4”3Ì7”3Ë6”3Ì9”3Ë5”3Ì0”3Ë6”3Í1
+”3Ì7”3Ì3”3Ë2”3Ë4”3Ë6”3Ì9”3Ë2”3Í1. ”3É8”3Ì6”3Ì9”3Ë3”3Ì0 ”3Í1”3Ë6”3Ì4”3Ì7”3Í2”3Í0 ”3Ì5”3Í2”3Ì5”3Ë4 ”3Ì5”3Í2”3Ì5”3Ë4.
+”3É4”3Ì5”3Í1”3Ë6”3Ë8”3Ë6”3Ì9 ”3Ì8”3Í2”3Ì0”3Í0 ”3Ì6”3Ì9”3Ë4”3Ì0 ”3Ë7”3Ë6”3Ì3”3Ì0”3Í0. ”3É9”3Í2”3Ì5”3Ë4 ”3Í0”3Ë6”3Ì4”3Ì7”3Ë6”3Ì9,
+”3Ë2”3Ì9”3Ë4”3Í2 ”3Ì5”3Ì6”3Ì5 ”3Ë4”3Ì6”3Ì5”3Í0”3Ë6”3Ì8”3Í2”3Ë2”3Í1 ”3Ë5”3Ì0”3Ë8”3Ì5”3Ì0”3Í0”3Í0”3Ì0”3Ì4, ”3Ì3”3Ì6”3Ì9”3Ë6”3Ì4
+”3Í2”3Ì9”3Ì5”3Ë2 ”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2 ”3Ì4”3Ì0, ”3Ì5”3Ë6”3Ë4 ”3Ë2”3Ë4”3Ë4”3Í2”3Ì4”3Í0”3Ë2”3Ì5 ”3Ë6”3Ì5”3Ì0”3Ì4 ”3Ì4”3Ì0
+”3Ë2 ”3Ì7”3Í2”3Ì9”3Í2”3Í0. ”3È8”3Í2”3Ì9”3Ë2”3Ë3”3Ì0”3Í1”3Í2”3Ì9 ”3Ë6”3Í1 ”3Ë6”3Ì3”3Ì0”3Í1 ”3Ì0”3Ì5 ”3Í0”3Ë6”3Ì4
+”3Í0”3Ì6”3Ë5”3Ë2”3Ì3”3Ë6”3Í0 ”3Ì0”3Ì5”3Í1”3Ë6”3Ì9”3Ë5”3Í2”3Ì4. ”3Ê1”3Ë6”3Ì3”3Ì3”3Ë6”3Ì5”3Í1”3Ë6”3Í0”3Ì8”3Í2”3Ë6
+”3Í0”3Ë2”3Ë8”3Ì0”3Í1”3Í1”3Ì0”3Í0 ”3Ì9”3Í2”3Í1”3Ì9”3Í2”3Ì4 ”3Ì3”3Ë6”3Ë4”3Í1”3Í2”3Í0 ”3Ë4”3Ì6”3Ì4”3Ì4”3Ì6”3Ë5”3Ì6
+”3Ë4”3Ì6”3Ì5”3Ë5”3Ì0”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4. ”3É0”3Í1”3Ì0”3Ë2”3Ì4 ”3Ë7”3Ì9”3Ì0”3Ì5”3Ë8”3Ì0”3Ì3”3Ì3”3Ë2, ”3Ì8”3Í2”3Ë2”3Ì4 ”3Ì5”3Ë6”3Ë4
+”3Í2”3Ì3”3Ì3”3Ë2”3Ì4”3Ë4”3Ì6”3Ì9”3Ì7”3Ë6”3Ì9 ”3Í0”3Ì6”3Ì3”3Ì3”3Ì0”3Ë4”3Ì0”3Í1”3Í2”3Ë5”3Ì0”3Ì5, ”3Í1”3Í2”3Ì9”3Ì7”3Ì0”3Í0 ”3Ì5”3Ì0”3Í0”3Ì0
+”3Ë2”3Ì3”3Ì0”3Ì8”3Í2”3Ë6”3Í1 ”3Ì9”3Ì0”3Í0”3Í2”3Í0, ”3Í0”3Ì0”3Í1 ”3Ë2”3Ì4”3Ë6”3Í1 ”3Ë6”3Ì3”3Ë6”3Ì4”3Ë6”3Ì5”3Í1”3Í2”3Ì4
+”3Ë5”3Ì6”3Ì3”3Ì6”3Ì9 ”3Ì3”3Ì6”3Ì9”3Ë6”3Ì4 ”3Í3”3Ì0”3Í1”3Ë2”3Ë6 ”3Ì3”3Ì0”3Ë8”3Í2”3Ì3”3Ë2. ”3Ê1”3Ì9”3Ë2”3Ë6”3Í0”3Ë6”3Ì5”3Í1
+”3Ì7”3Ë9”3Ë2”3Ì9”3Ë6”3Í1”3Ì9”3Ë2 ”3Ë2”3Ì3”3Ì0”3Ì8”3Í2”3Ë6”3Í1 ”3Í3”3Ë6”3Ì3”3Ì0”3Í1 ”3Í0”3Ë6”3Ë5 ”3Ì7”3Ì3”3Ë2”3Ë4”3Ë6”3Ì9”3Ë2”3Í1. </p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/600974-3.html b/layout/reftests/bugs/600974-3.html
new file mode 100644
index 0000000000..687a61b38c
--- /dev/null
+++ b/layout/reftests/bugs/600974-3.html
Binary files differ
diff --git a/layout/reftests/bugs/602200-1-ref.html b/layout/reftests/bugs/602200-1-ref.html
new file mode 100644
index 0000000000..10b364f400
--- /dev/null
+++ b/layout/reftests/bugs/602200-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; top:10px; left:0; height:1px; width:200px; background:black"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-1.html b/layout/reftests/bugs/602200-1.html
new file mode 100644
index 0000000000..35a1ab42a2
--- /dev/null
+++ b/layout/reftests/bugs/602200-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<canvas id="c" width="200" height="20" style="position:absolute; top:10.4px; left:0"></canvas>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 200, 1);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-2-ref.html b/layout/reftests/bugs/602200-2-ref.html
new file mode 100644
index 0000000000..51b9d46786
--- /dev/null
+++ b/layout/reftests/bugs/602200-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; top:10px; left:0; width:200px; height:19px;
+ opacity:0.999; border:1px solid black; border-top:2px solid black; background-color:white"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-2.html b/layout/reftests/bugs/602200-2.html
new file mode 100644
index 0000000000..e3c9172193
--- /dev/null
+++ b/layout/reftests/bugs/602200-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="opacity:0.999;">
+ <canvas id="c" width="200" height="20" style="position:absolute; top:10.4px; left:0; border:1px solid black"></canvas>
+</div>
+<div style="position:absolute; top:10px; left:0; width:200px; height:19px;
+ opacity:0.999; border:1px solid black; border-top:2px solid black; background-color:white"></div>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 200, 1);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-3-ref.html b/layout/reftests/bugs/602200-3-ref.html
new file mode 100644
index 0000000000..86dc4e038a
--- /dev/null
+++ b/layout/reftests/bugs/602200-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:12px; height:12px; background:black; position:absolute; top:0px"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-3.html b/layout/reftests/bugs/602200-3.html
new file mode 100644
index 0000000000..0c155681b5
--- /dev/null
+++ b/layout/reftests/bugs/602200-3.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:translate(0.4px); position:absolute; top:0px;">
+ <canvas style="margin-left:0.4px; border:1px solid black; display:block" width="10" height="10" id="c"></canvas>
+</div>
+<div style="position:absolute; top:0px; width:12px; height:12px; background:black;"></div>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext('2d');
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, c.width, c.height);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-4-ref.html b/layout/reftests/bugs/602200-4-ref.html
new file mode 100644
index 0000000000..dd4db76737
--- /dev/null
+++ b/layout/reftests/bugs/602200-4-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="opacity:0.999; border-left:1px solid red; width:12px;">
+ <div style="position:relative; left:1px; opacity:0.999; border-left:1px solid rgb(0,255,0);">
+ <div style="width:10px; height:10px; background:black"></div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/602200-4.html b/layout/reftests/bugs/602200-4.html
new file mode 100644
index 0000000000..f4b6a1b755
--- /dev/null
+++ b/layout/reftests/bugs/602200-4.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:translate(0.4px); opacity:0.999; border-left:1px solid red; width:12px;">
+ <div style="transform:translate(0.4px); opacity:0.999; border-left:1px solid rgb(0,255,0);">
+ <canvas width="10" height="10" id="c" style="display:block"></canvas>
+ </div>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 10, 10);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/603423-1-ref.html b/layout/reftests/bugs/603423-1-ref.html
new file mode 100644
index 0000000000..2f1c3a7e1b
--- /dev/null
+++ b/layout/reftests/bugs/603423-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Testcase for bug 603423</title>
+ </head>
+ <body><p><iframe src="data:text/html;charset=windows-1252,Hello World"</iframe></p></body>
+</html>
diff --git a/layout/reftests/bugs/603423-1.html b/layout/reftests/bugs/603423-1.html
new file mode 100644
index 0000000000..76fec100df
--- /dev/null
+++ b/layout/reftests/bugs/603423-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Testcase for bug 603423</title>
+ </head>
+ <body><p><iframe src="data:text/html;charset=x-mac-arabic,Hello World"</iframe></p></body>
+</html>
diff --git a/layout/reftests/bugs/604737-ref.html b/layout/reftests/bugs/604737-ref.html
new file mode 100644
index 0000000000..2f800d23e1
--- /dev/null
+++ b/layout/reftests/bugs/604737-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset disabled>
+ <legend>
+ <input>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/604737.html b/layout/reftests/bugs/604737.html
new file mode 100644
index 0000000000..0bc4a4a12f
--- /dev/null
+++ b/layout/reftests/bugs/604737.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <body onload="document.getElementsByTagName('fieldset')[0].removeChild(document.getElementById('l'));
+ document.documentElement.className = '';">
+ <fieldset disabled>
+ <legend id='l'>
+ <input>
+ </legend>
+ <legend>
+ <input>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/605138-1-ref.html b/layout/reftests/bugs/605138-1-ref.html
new file mode 100644
index 0000000000..5d26487535
--- /dev/null
+++ b/layout/reftests/bugs/605138-1-ref.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+ <link href="data:text/css,%23master{display:table; width: 100%;}"
+ rel="stylesheet" type="text/css" media="screen">
+ <style>
+ #master { outline: 1px dashed black; }
+ </style>
+</head>
+<body>
+<div id="master">
+<div style="height:10000px; background: linear-gradient(to left top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);">
+</div>
+
+<div style="height:100px"></div>
+
+</div>
+</html>
diff --git a/layout/reftests/bugs/605138-1.html b/layout/reftests/bugs/605138-1.html
new file mode 100644
index 0000000000..365e00351e
--- /dev/null
+++ b/layout/reftests/bugs/605138-1.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <link href="data:text/css,%23master{display:table; width: 100%; outline: 1px dashed black; }"
+ rel="stylesheet" type="text/css" media="screen">
+</head>
+<body>
+<div id="master">
+<div style="height:10000px; background: linear-gradient(to left top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);">
+</div>
+
+<textarea style="height:100px; margin:0; border:0;"></textarea>
+<script> </script>
+
+</div>
+</html>
diff --git a/layout/reftests/bugs/605157-1-ref.xhtml b/layout/reftests/bugs/605157-1-ref.xhtml
new file mode 100644
index 0000000000..cad35a5e76
--- /dev/null
+++ b/layout/reftests/bugs/605157-1-ref.xhtml
@@ -0,0 +1,8 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <style>body { color: green; }</style>
+</head>
+<body>
+This should be green.
+</body>
+</html>
diff --git a/layout/reftests/bugs/605157-1.xhtml b/layout/reftests/bugs/605157-1.xhtml
new file mode 100644
index 0000000000..112bcba1bc
--- /dev/null
+++ b/layout/reftests/bugs/605157-1.xhtml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+</head>
+<body>
+This should be green.
+<script>
+ <![CDATA[
+ document.head.innerHTML = "<style>body { color: green; }</style>";
+ ]]>
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/607267-1-ref.html b/layout/reftests/bugs/607267-1-ref.html
new file mode 100644
index 0000000000..e23c4dc2b4
--- /dev/null
+++ b/layout/reftests/bugs/607267-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+Some text on one line
diff --git a/layout/reftests/bugs/607267-1.html b/layout/reftests/bugs/607267-1.html
new file mode 100644
index 0000000000..1d53243101
--- /dev/null
+++ b/layout/reftests/bugs/607267-1.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+Some text <map></map> on one line
diff --git a/layout/reftests/bugs/608636-1-ref.html b/layout/reftests/bugs/608636-1-ref.html
new file mode 100644
index 0000000000..8f9c9f5619
--- /dev/null
+++ b/layout/reftests/bugs/608636-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html style="background:white">
+<body>
+<canvas id="b" style="position:absolute; left:0; top:0" width="20" height="20"></canvas>
+<div style="position:absolute; left:0; top:0; transform:rotate(45deg); height:400px; width:400px; opacity:0.5; border:1px solid black;"></div>
+<div style="position:absolute; left:-3px; top:-3px; transform:rotate(45deg); height:390px; width:390px; border:10px solid red;"></div>
+<script>
+function fillCanvas(id) {
+ var ctx = document.getElementById(id).getContext("2d");
+ ctx.fillStyle = "black";
+ ctx.fillRect(0, 0, 10, 10);
+}
+fillCanvas("b");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/608636-1.html b/layout/reftests/bugs/608636-1.html
new file mode 100644
index 0000000000..6f54b53464
--- /dev/null
+++ b/layout/reftests/bugs/608636-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html style="background:white;">
+<body>
+<canvas id="b" style="position:absolute; left:0; top:0" width="20" height="20"></canvas>
+<div style="position:absolute; left:0; top:0; transform:rotate(45deg); height:400px; width:400px; opacity:0.5; border:1px solid black;">
+ <canvas id="c" style="display:block;" width="20" height="20"></canvas>
+</div>
+<div style="position:absolute; left:-3px; top:-3px; transform:rotate(45deg); height:390px; width:390px; border:10px solid red;"></div>
+<script>
+function fillCanvas(id) {
+ var ctx = document.getElementById(id).getContext("2d");
+ ctx.fillStyle = "black";
+ ctx.fillRect(0, 0, 10, 10);
+}
+fillCanvas("c");
+fillCanvas("b");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/608756-1-ref.html b/layout/reftests/bugs/608756-1-ref.html
new file mode 100644
index 0000000000..d62c43d9ed
--- /dev/null
+++ b/layout/reftests/bugs/608756-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+<span style="border: 1px solid green;">Test<br>Test</span>
+</body>
diff --git a/layout/reftests/bugs/608756-1a.html b/layout/reftests/bugs/608756-1a.html
new file mode 100644
index 0000000000..aacca22b92
--- /dev/null
+++ b/layout/reftests/bugs/608756-1a.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ span { position: absolute; }
+ </style>
+</head>
+<body>
+<span></span>
+<span style="position: static; border: 1px solid green">Test<br>Test</span>
+</body>
diff --git a/layout/reftests/bugs/608756-1b.html b/layout/reftests/bugs/608756-1b.html
new file mode 100644
index 0000000000..98ffe0a809
--- /dev/null
+++ b/layout/reftests/bugs/608756-1b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ span { float: left; }
+ </style>
+</head>
+<body>
+<span></span>
+<span style="float: none; border: 1px solid green;">Test<br>Test</span>
+</body>
diff --git a/layout/reftests/bugs/608756-2-ref.html b/layout/reftests/bugs/608756-2-ref.html
new file mode 100644
index 0000000000..c68452f522
--- /dev/null
+++ b/layout/reftests/bugs/608756-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ span { float: left; border: 1px solid green }
+ </style>
+</head>
+<body>
+<span style="position: static; border: 1px solid green">Test<br>Test</span>
+</body>
diff --git a/layout/reftests/bugs/608756-2.html b/layout/reftests/bugs/608756-2.html
new file mode 100644
index 0000000000..558462b9d8
--- /dev/null
+++ b/layout/reftests/bugs/608756-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ span { position: absolute; float: left; }
+ </style>
+</head>
+<body>
+<span></span>
+<span style="position: static; border: 1px solid green">Test<br>Test</span>
+</body>
diff --git a/layout/reftests/bugs/609272-1-ref.html b/layout/reftests/bugs/609272-1-ref.html
new file mode 100644
index 0000000000..f057b7cf8b
--- /dev/null
+++ b/layout/reftests/bugs/609272-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ This text should show up
+</html>
diff --git a/layout/reftests/bugs/609272-1.html b/layout/reftests/bugs/609272-1.html
new file mode 100644
index 0000000000..b15df8abdb
--- /dev/null
+++ b/layout/reftests/bugs/609272-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html class="reftest-paged" style="height: 0; overflow: hidden">
+ This text should show up
+</html>
diff --git a/layout/reftests/bugs/613433-1-ref.html b/layout/reftests/bugs/613433-1-ref.html
new file mode 100644
index 0000000000..f4a2ab3b6f
--- /dev/null
+++ b/layout/reftests/bugs/613433-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ }
+ </style>
+ <script>
+ function test() {
+ document.querySelector("div").focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/613433-1.html b/layout/reftests/bugs/613433-1.html
new file mode 100644
index 0000000000..cdb4b3948a
--- /dev/null
+++ b/layout/reftests/bugs/613433-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ overflow-x: auto;
+ }
+ </style>
+ <script>
+ function test() {
+ document.querySelector("div").focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/613433-2-ref.html b/layout/reftests/bugs/613433-2-ref.html
new file mode 100644
index 0000000000..7bb9d9f153
--- /dev/null
+++ b/layout/reftests/bugs/613433-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ }
+ </style>
+ <script>
+ function test() {
+ var d = document.querySelector("div");
+ d.appendChild(document.createTextNode(""));
+ d.focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/613433-2.html b/layout/reftests/bugs/613433-2.html
new file mode 100644
index 0000000000..9f962e2630
--- /dev/null
+++ b/layout/reftests/bugs/613433-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ overflow-y: auto;
+ }
+ </style>
+ <script>
+ function test() {
+ document.querySelector("div").focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/613433-3-ref.html b/layout/reftests/bugs/613433-3-ref.html
new file mode 100644
index 0000000000..dee9b61955
--- /dev/null
+++ b/layout/reftests/bugs/613433-3-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ }
+ </style>
+ <script>
+ function test() {
+ document.querySelector("div").focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"><br></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/613433-3.html b/layout/reftests/bugs/613433-3.html
new file mode 100644
index 0000000000..129419b781
--- /dev/null
+++ b/layout/reftests/bugs/613433-3.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ min-height: 36px;
+ overflow: auto;
+ }
+ </style>
+ <script>
+ function test() {
+ document.querySelector("div").focus();
+ }
+ function focusTriggered() {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+ <div contenteditable onfocus="focusTriggered()"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/614272-1-ref.svg b/layout/reftests/bugs/614272-1-ref.svg
new file mode 100644
index 0000000000..1d576a698a
--- /dev/null
+++ b/layout/reftests/bugs/614272-1-ref.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <image xlink:href="solidblue.png" width="50" height="50" x="25" y="50"/>
+</svg>
diff --git a/layout/reftests/bugs/614272-1.svg b/layout/reftests/bugs/614272-1.svg
new file mode 100644
index 0000000000..898595a860
--- /dev/null
+++ b/layout/reftests/bugs/614272-1.svg
@@ -0,0 +1,44 @@
+<svg class="reftest-wait"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ onload="setTimeout(go, 0);">
+<script>
+ function setMatrixForElem(id, matrix) {
+ var elem = document.getElementById(id);
+ elem.setAttribute("transform", "matrix("+matrix+")");
+ }
+
+ function go() {
+ // This moves image1 completely offscreen
+ setMatrixForElem("image1", "0.5 -1 0 1 0 -30");
+
+ // This flattens image2 to take up 0 space
+ setMatrixForElem("image2", "1 0 0 0 0 0");
+
+ // NOTE: The third image should be unaffected by the above
+ // and should still render.
+
+ document.documentElement.removeAttribute('class');
+ }
+</script>
+<defs>
+ <path id="P1" d="M 0 50 h50 v-50 h-50 z"/>
+ <path id="P2" d="M 50 100 h50 v-50 h-50 z"/>
+ <path id="P3" d="M 0 100 h50 v-50 h-50 z"/>
+ <clipPath id="Q1"><use x="25" xlink:href="#P1"/></clipPath>
+ <clipPath id="Q2"><use x="25" xlink:href="#P2"/></clipPath>
+ <clipPath id="Q3"><use x="25" xlink:href="#P3"/></clipPath>
+</defs>
+
+<image xlink:href="solidblue.png" id="image1"
+ width="100" height="100"
+ x="25" clip-path="url(#Q1)"/>
+
+<image xlink:href="solidblue.png" id="image2"
+ width="100" height="100"
+ x="25" y="50" clip-path="url(#Q2)"/>
+
+<image xlink:href="solidblue.png"
+ width="100" height="100"
+ x="25" clip-path="url(#Q3)"/>
+</svg>
diff --git a/layout/reftests/bugs/615121-1-ref.html b/layout/reftests/bugs/615121-1-ref.html
new file mode 100644
index 0000000000..c1993abcfb
--- /dev/null
+++ b/layout/reftests/bugs/615121-1-ref.html
@@ -0,0 +1,22 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: schz;
+ src: url(../fonts/sil/ScheherazadeRegOT.ttf);
+}
+div {
+ font-family: schz;
+ font-size: 32px;
+ margin: 32px;
+}
+</style>
+</head>
+<body>
+<div>
+<p>The letter and diacritic should be hidden by the black box:<br>
+<span style="background:black;padding:0 .5em;margin-right:-1em;">
+</span>&nbsp;
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/615121-1.html b/layout/reftests/bugs/615121-1.html
new file mode 100644
index 0000000000..93e0937af6
--- /dev/null
+++ b/layout/reftests/bugs/615121-1.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: schz;
+ src: url(../fonts/sil/ScheherazadeRegOT.ttf);
+}
+div {
+ font-family: schz;
+ font-size: 32px;
+ margin: 32px;
+}
+</style>
+</head>
+<body>
+<!-- test for bug 615121: flipped sign for diacritic y-offset
+ will make it project above the em-height box -->
+<div>
+<p>The letter and diacritic should be hidden by the black box:<br>
+<span style="background:black;padding:0 .5em;margin-right:-1em;">
+</span>&nbsp;&#x628;&#x651;&#x64c;&nbsp;
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/615121-2-notref.html b/layout/reftests/bugs/615121-2-notref.html
new file mode 100644
index 0000000000..af23943c7c
--- /dev/null
+++ b/layout/reftests/bugs/615121-2-notref.html
@@ -0,0 +1,22 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: schz;
+ src: url(../fonts/sil/ScheherazadeRegOT.ttf);
+}
+div {
+ font-family: schz;
+ font-size: 32px;
+ margin: 32px;
+}
+</style>
+</head>
+<body>
+<div>
+<p>Diacritics should stack above the black box:<br>
+<span style="background:black;padding:0 .5em;margin-right:-1em;">
+</span>&nbsp;
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/615121-2.html b/layout/reftests/bugs/615121-2.html
new file mode 100644
index 0000000000..7fb9e3791f
--- /dev/null
+++ b/layout/reftests/bugs/615121-2.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: schz;
+ src: url(../fonts/sil/ScheherazadeRegOT.ttf);
+}
+div {
+ font-family: schz;
+ font-size: 32px;
+ margin: 32px;
+}
+</style>
+</head>
+<body>
+<!-- test for bug 615121: diacritics should stack to project above the em-height;
+ sign error will make them overprint the base letter instead -->
+<div>
+<p>Diacritics should stack above the black box:<br>
+<span style="background:black;padding:0 .5em;margin-right:-1em;">
+</span>&nbsp;&#x679;&#x651;&#x64c;&#x610;&nbsp;
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/617242-1-ref.html b/layout/reftests/bugs/617242-1-ref.html
new file mode 100644
index 0000000000..2cacadea1e
--- /dev/null
+++ b/layout/reftests/bugs/617242-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="border:1px solid black; width:200px; height:200px;">
+ <div style="background:blue; height:50px; margin-top:150px;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/617242-1.html b/layout/reftests/bugs/617242-1.html
new file mode 100644
index 0000000000..c314627534
--- /dev/null
+++ b/layout/reftests/bugs/617242-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<canvas id="c" width="200" height="200" style="border:1px solid black; transform:scaleY(-1);"></canvas>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "blue";
+ctx.fillRect(0, 0, 200, 50);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/618071-notref.html b/layout/reftests/bugs/618071-notref.html
new file mode 100644
index 0000000000..1ca77310d6
--- /dev/null
+++ b/layout/reftests/bugs/618071-notref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.8">
+<title>Testcase, bug 618071</title>
+
+<select size="5">
+ <option id="one">one</option>
+ <option id="two">two</option>
+ <option id="three">three</option>
+ <option id="four">four</option>
+ <option id="five">five</option>
+</select>
+
+<script>
+document.getElementById("three").parentNode.focus();
+</script>
diff --git a/layout/reftests/bugs/618071.html b/layout/reftests/bugs/618071.html
new file mode 100644
index 0000000000..298e5e621a
--- /dev/null
+++ b/layout/reftests/bugs/618071.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="0.8">
+<title>Testcase, bug 618071</title>
+
+<select size="5">
+ <option id="one">one</option>
+ <option id="two">two</option>
+ <option id="three">three</option>
+ <option id="four">four</option>
+ <option id="five">five</option>
+</select>
+
+<span id="s" style="display: inline-block; background: blue; height: 50px; width: 50px; margin-left: -2.5em;"></span>
+
+<script>
+document.getElementById("three").parentNode.focus();
+</script>
diff --git a/layout/reftests/bugs/619117-1-ref.html b/layout/reftests/bugs/619117-1-ref.html
new file mode 100644
index 0000000000..023669dd61
--- /dev/null
+++ b/layout/reftests/bugs/619117-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+ position: absolute;
+ padding: 2px;
+ left: 100px;
+ top: 700px;
+ width: 100px;
+ height: 100px;
+ background: yellow;
+ transform: translate(0, -400px);
+ transform: translate(0, -400px);
+}
+</style>
+</head>
+<body>
+<div>Hello</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/619117-1.html b/layout/reftests/bugs/619117-1.html
new file mode 100644
index 0000000000..adf5841fbb
--- /dev/null
+++ b/layout/reftests/bugs/619117-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+div {
+ position: absolute;
+ padding: 2px;
+ left: 100px;
+ top: 700px;
+ width: 100px;
+ height: 100px;
+ background: yellow;
+ transform: scale(1.5);
+ transform: scale(1.5);
+}
+body.toggle div {
+ transform: translate(0, -400px);
+ transform: translate(0, -400px);
+}
+</style>
+</head>
+<body>
+<div>Hello</div>
+<script>
+function doTest() {
+ document.body.setAttribute("class", "toggle");
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/619511-1-ref.html b/layout/reftests/bugs/619511-1-ref.html
new file mode 100644
index 0000000000..9e9476486c
--- /dev/null
+++ b/layout/reftests/bugs/619511-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dl1;
+ src: url(../fonts/DeLarge/DeLarge.woff);
+}
+body {
+ font-family: dl1, serif;
+ font-size: 36px;
+ line-height: 2em;
+ letter-spacing: 3px;
+}
+</style>
+</head>
+<body>
+<p>foobar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/619511-1.html b/layout/reftests/bugs/619511-1.html
new file mode 100644
index 0000000000..6c22292140
--- /dev/null
+++ b/layout/reftests/bugs/619511-1.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dl1;
+ src: url(../fonts/DeLarge/DeLarge.woff);
+}
+body {
+ font-family: dl1, serif;
+ font-size: 36px;
+ line-height: 2em;
+ letter-spacing: 3px;
+}
+</style>
+</head>
+<body>
+<p>foo&zwj;bar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-1-externalFilter.html b/layout/reftests/bugs/621253-1-externalFilter.html
new file mode 100644
index 0000000000..ecc0aea23e
--- /dev/null
+++ b/layout/reftests/bugs/621253-1-externalFilter.html
@@ -0,0 +1,20 @@
+<html class="reftest-wait"
+ reftest-zoom="0.5">
+<head>
+<script>
+ function doTest() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.setAttribute("onload", "snapshot()");
+ iframe.contentWindow.location.reload();
+ }
+
+ function snapshot() {
+ document.documentElement.removeAttribute("class");
+ }
+</script>
+</head>
+<body onload="doTest()" style="margin: 0">
+<iframe scrolling="no" src="621253-helper-externalFilter.xhtml"
+ style="border: 0"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-1-internalFilter.html b/layout/reftests/bugs/621253-1-internalFilter.html
new file mode 100644
index 0000000000..a561b103e2
--- /dev/null
+++ b/layout/reftests/bugs/621253-1-internalFilter.html
@@ -0,0 +1,20 @@
+<html class="reftest-wait"
+ reftest-zoom="0.5">
+<head>
+<script>
+ function doTest() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.setAttribute("onload", "snapshot()");
+ iframe.contentWindow.location.reload();
+ }
+
+ function snapshot() {
+ document.documentElement.removeAttribute("class");
+ }
+</script>
+</head>
+<body onload="doTest()" style="margin: 0">
+<iframe src="621253-helper-internalFilter.xhtml"
+ style="border: 0; overflow: hidden"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-1-ref.html b/layout/reftests/bugs/621253-1-ref.html
new file mode 100644
index 0000000000..ad19623688
--- /dev/null
+++ b/layout/reftests/bugs/621253-1-ref.html
@@ -0,0 +1,6 @@
+<html>
+<body style="margin: 0">
+ <div style="background: black;
+ width: 50px; height: 50px"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-2-externalFilter.html b/layout/reftests/bugs/621253-2-externalFilter.html
new file mode 100644
index 0000000000..93d97fbb29
--- /dev/null
+++ b/layout/reftests/bugs/621253-2-externalFilter.html
@@ -0,0 +1,20 @@
+<html class="reftest-wait"
+ reftest-zoom="1.5">
+<head>
+<script>
+ function doTest() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.setAttribute("onload", "snapshot()");
+ iframe.contentWindow.location.reload();
+ }
+
+ function snapshot() {
+ document.documentElement.removeAttribute("class");
+ }
+</script>
+</head>
+<body onload="doTest()" style="margin: 0">
+<iframe scrolling="no" src="621253-helper-externalFilter.xhtml"
+ style="border: 0"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-2-internalFilter.html b/layout/reftests/bugs/621253-2-internalFilter.html
new file mode 100644
index 0000000000..b8a49ab0ad
--- /dev/null
+++ b/layout/reftests/bugs/621253-2-internalFilter.html
@@ -0,0 +1,20 @@
+<html class="reftest-wait"
+ reftest-zoom="1.5">
+<head>
+<script>
+ function doTest() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.setAttribute("onload", "snapshot()");
+ iframe.contentWindow.location.reload();
+ }
+
+ function snapshot() {
+ document.documentElement.removeAttribute("class");
+ }
+</script>
+</head>
+<body onload="doTest()" style="margin: 0">
+<iframe src="621253-helper-internalFilter.xhtml"
+ style="border: 0; overflow: hidden"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-2-ref.html b/layout/reftests/bugs/621253-2-ref.html
new file mode 100644
index 0000000000..6fcf0bbeb1
--- /dev/null
+++ b/layout/reftests/bugs/621253-2-ref.html
@@ -0,0 +1,6 @@
+<html>
+<body style="margin: 0">
+ <div style="background: black;
+ width: 150px; height: 150px"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-helper-externalFilter.xhtml b/layout/reftests/bugs/621253-helper-externalFilter.xhtml
new file mode 100644
index 0000000000..b74d6152d6
--- /dev/null
+++ b/layout/reftests/bugs/621253-helper-externalFilter.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body style="margin: 0px">
+ <div style="filter: url(../filters.svg#NonWhiteToBlack);
+ background: lime;
+ height: 100px; width: 100px">
+ </div>
+ <svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- use an empty g to force filters.svg to load before onload -->
+ <use xlink:href="../filters.svg#empty" />
+ </svg>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621253-helper-internalFilter.xhtml b/layout/reftests/bugs/621253-helper-internalFilter.xhtml
new file mode 100644
index 0000000000..7625a16a38
--- /dev/null
+++ b/layout/reftests/bugs/621253-helper-internalFilter.xhtml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body style="margin: 0px">
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: block; height: 0px">
+ <defs>
+ <!-- Copied verbatim from layout/reftests/filters.svg: -->
+ <filter id="NonWhiteToBlack" x="0%" y="0%" width="100%" height="100%">
+ <feComponentTransfer>
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ <feColorMatrix type="matrix" values="255 255 255 0 0
+ 255 255 255 0 0
+ 255 255 255 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ </filter>
+ </defs>
+ </svg>
+ <div style="filter: url(#NonWhiteToBlack);
+ background: lime;
+ height: 100px; width: 100px">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/621918-1-ref.svg b/layout/reftests/bugs/621918-1-ref.svg
new file mode 100644
index 0000000000..995a4bbfd3
--- /dev/null
+++ b/layout/reftests/bugs/621918-1-ref.svg
@@ -0,0 +1,10 @@
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ height="800px"
+ width="800px">
+ <text style="font-size:48px;" transform="translate(40,100)">
+ <tspan>Fire&#x301;fo&#x302;x</tspan></text>
+ <text style="font-size:48px;" transform="translate(40,140) rotate(45)">
+ <tspan>Fire&#x301;fo&#x302;x</tspan></text>
+</svg>
diff --git a/layout/reftests/bugs/621918-1.svg b/layout/reftests/bugs/621918-1.svg
new file mode 100644
index 0000000000..821c24f5e0
--- /dev/null
+++ b/layout/reftests/bugs/621918-1.svg
@@ -0,0 +1,11 @@
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ height="800px"
+ width="800px">
+ <text style="font-size:48px;" transform="translate(40,100)">
+ <tspan>Fire&#x301;fo&#x302;x</tspan></text>
+ <path id="path1" d="M 0,0 L 500,500"/>
+ <text style="font-size:48px;" transform="translate(40,140)"><textPath xlink:href="#path1">
+ <tspan>Fire&#x301;fo&#x302;x</tspan></textPath></text>
+</svg>
diff --git a/layout/reftests/bugs/621918-2-ref.svg b/layout/reftests/bugs/621918-2-ref.svg
new file mode 100644
index 0000000000..eb789dd483
--- /dev/null
+++ b/layout/reftests/bugs/621918-2-ref.svg
@@ -0,0 +1,17 @@
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ height="800px"
+ width="800px">
+
+ <!-- use an empty g to force filters.svg to load before onload -->
+ <use xlink:href="../filters.svg#empty" />
+
+ <g filter="url(../filters.svg#NonWhiteToBlack)">
+ <rect x="0" y="0" height="100%" width="100%" fill="#FFFFFF"/>
+ <text style="font-size:12px;" transform="translate(40,100)">
+ <tspan>सà¥à¤µà¤¤à¤¨à¥à¤¤à¥à¤°à¤¤à¤¾ और समानता पà¥à¤°à¤¾à¤ªà¥à¤¤</tspan></text>
+ <text style="font-size:12px;" transform="translate(40,140) rotate(45)">
+ <tspan>सà¥à¤µà¤¤à¤¨à¥à¤¤à¥à¤°à¤¤à¤¾ और समानता पà¥à¤°à¤¾à¤ªà¥à¤¤</tspan></text>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/621918-2.svg b/layout/reftests/bugs/621918-2.svg
new file mode 100644
index 0000000000..b89f4377ec
--- /dev/null
+++ b/layout/reftests/bugs/621918-2.svg
@@ -0,0 +1,20 @@
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ height="800px"
+ width="800px">
+
+ <!-- use an empty g to force filters.svg to load before onload -->
+ <use xlink:href="../filters.svg#empty" />
+
+ <!-- filters.svg#NonWhiteToBlack is used here to mask antialiasing
+ issues where glyphs touch -->
+ <g filter="url(../filters.svg#NonWhiteToBlack)">
+ <rect x="0" y="0" height="100%" width="100%" fill="#FFFFFF"/>
+ <text style="font-size:12px;" transform="translate(40,100)">
+ <tspan>सà¥à¤µà¤¤à¤¨à¥à¤¤à¥à¤°à¤¤à¤¾ और समानता पà¥à¤°à¤¾à¤ªà¥à¤¤</tspan></text>
+ <path id="path1" d="M 0,0 L 500,500"/>
+ <text style="font-size:12px;" transform="translate(40,140)"><textPath xlink:href="#path1">
+ <tspan>सà¥à¤µà¤¤à¤¨à¥à¤¤à¥à¤°à¤¤à¤¾ और समानता पà¥à¤°à¤¾à¤ªà¥à¤¤</tspan></textPath></text>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/622585-1-ref.html b/layout/reftests/bugs/622585-1-ref.html
new file mode 100644
index 0000000000..7fdc1d9a89
--- /dev/null
+++ b/layout/reftests/bugs/622585-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>
+ #rot {
+ width: 300px; /* the div is partially outside of the viewport */
+ height: 300px;
+ background: red;
+ position: absolute;
+ left: -150px;
+ top: -150px;
+ }
+</style>
+</head><body><div style="transform: rotate(72deg);" id="rot"></div>
+<script>
+</script></body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/622585-1.html b/layout/reftests/bugs/622585-1.html
new file mode 100644
index 0000000000..4d42dc9344
--- /dev/null
+++ b/layout/reftests/bugs/622585-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>
+ #rot {
+ width: 300px; /* the div is partially outside of the viewport */
+ height: 300px;
+ background: red;
+ position: absolute;
+ left: -150px;
+ top: -150px;
+ }
+</style>
+</head><body><div style="transform: rotate(72deg);" id="rot">
+ <canvas width="1" height="1" id="c" style="display:block"></canvas>
+</div>
+<script>
+</script></body></html> \ No newline at end of file
diff --git a/layout/reftests/bugs/625409-1-ref.html b/layout/reftests/bugs/625409-1-ref.html
new file mode 100644
index 0000000000..c1f18659c5
--- /dev/null
+++ b/layout/reftests/bugs/625409-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:rgb(0,0,0);">
+ <div style="position:fixed;left:0;top:0;width:200px;height:300px;background:rgba(255,255,255,0.5);">
+ <div style="margin-top:200px;height:100px;background:rgb(0,0,0);"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/625409-1.html b/layout/reftests/bugs/625409-1.html
new file mode 100644
index 0000000000..55340a4b43
--- /dev/null
+++ b/layout/reftests/bugs/625409-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:rgb(0,0,0);">
+ <div style="position:fixed;left:0;top:0;width:200px;height:200px;background:rgba(255,255,255,0.5);"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/627393-1.html b/layout/reftests/bugs/627393-1.html
new file mode 100644
index 0000000000..95e3b81d29
--- /dev/null
+++ b/layout/reftests/bugs/627393-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d" style="background:black; width:300px; height:300px; opacity:0.5;"></div>
+<script>
+function doTest() {
+ document.getElementById('d').style.opacity = 0.001;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/630835-1.html b/layout/reftests/bugs/630835-1.html
new file mode 100644
index 0000000000..e877e4adf5
--- /dev/null
+++ b/layout/reftests/bugs/630835-1.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+#d {
+ background: red;
+ position: absolute;
+ top: 8px;
+ left: 8px;
+ height: 200px;
+ width: 800px;
+ transform: rotate(40deg);
+}
+#d2 {
+ background: white;
+ position: absolute;
+ top: 6px;
+ left: 6px;
+ height: 204px;
+ width: 804px;
+ transform: rotate(45deg);
+}
+</style>
+</head>
+<body>
+<script>
+function doTest() {
+ // The first rotation here makes the transform active. The second rotation
+ // sets it back where it belongs.
+ var d = document.getElementById("d");
+ d.style.transform = 'rotate(45deg)';
+ document.documentElement.removeAttribute('class');
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+<div id="d">test</div>
+<!-- d2 covers up d completely so that we don't get a reftest failure due to a difference
+ between the rendering of an 'active transform' (transformed via layers) vs an inactive
+ transform (transformed via D2D or cairo) -->
+<div id="d2">test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/631352-1-ref.html b/layout/reftests/bugs/631352-1-ref.html
new file mode 100644
index 0000000000..4a375d4ba3
--- /dev/null
+++ b/layout/reftests/bugs/631352-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>This text should be visible</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/631352-1.html b/layout/reftests/bugs/631352-1.html
new file mode 100644
index 0000000000..197e0aadc9
--- /dev/null
+++ b/layout/reftests/bugs/631352-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div:not(:lang(foo)) { display: none; }
+ </style>
+ </head>
+ <body onload="document.body.offsetWidth; document.body.lang = 'foo'">
+ <div>This text should be visible</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/632781-normalsize.html b/layout/reftests/bugs/632781-normalsize.html
new file mode 100644
index 0000000000..0d5ab8958b
--- /dev/null
+++ b/layout/reftests/bugs/632781-normalsize.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <!--
+ This test makes sure that scrolling a normal sized canvas would correctly
+ scroll its contents. Normal sized canvases are accelerated, so this test
+ makes sure that the accelerated code path for this operaton works correctly.
+
+ The padding in this test is added mostly to make sure that scrollLeft/Top
+ correctly skip the padding.
+ -->
+ <div id="container" style="width: 100px; height: 100px; padding: 10px; overflow: hidden">
+ <canvas width="300" height="300" id="c"></canvas>
+ </div>
+ <script>
+ var ctx = document.getElementById("c").getContext("2d");
+ ctx.fillStyle = "red";
+ ctx.fillRect(0, 0, 300, 100);
+ ctx.fillStyle = "green";
+ ctx.fillRect(0, 100, 300, 200);
+ var container = document.getElementById("container");
+ container.scrollLeft = 10;
+ container.scrollTop = 110;
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/632781-ref.html b/layout/reftests/bugs/632781-ref.html
new file mode 100644
index 0000000000..30b26fa5b3
--- /dev/null
+++ b/layout/reftests/bugs/632781-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="width: 120px; height: 120px; overflow: hidden">
+ <canvas width="120" height="120" id="c"></canvas>
+ </div>
+ <script>
+ var ctx = document.getElementById("c").getContext("2d");
+ ctx.fillStyle = "green";
+ ctx.fillRect(0, 0, 120, 120);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/632781-verybig.html b/layout/reftests/bugs/632781-verybig.html
new file mode 100644
index 0000000000..5ba1db9a86
--- /dev/null
+++ b/layout/reftests/bugs/632781-verybig.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <!--
+ This test makes sure that scrolling a huge canvas would correctly scroll
+ its contents. We don't accelerate extremely large canvases because of
+ GPU maximum texture size limits, so this test makes sure that the
+ non-accelerated code path for this operation works correctly.
+
+ The padding in this test is added mostly to make sure that scrollLeft/Top
+ correctly skip the padding.
+ -->
+ <div id="container" style="width: 100px; height: 100px; padding: 10px; overflow: hidden">
+ <canvas width="10000" height="120" id="c"></canvas>
+ </div>
+ <script>
+ var ctx = document.getElementById("c").getContext("2d");
+ ctx.fillStyle = "red";
+ ctx.fillRect(0, 0, 10000, 5000);
+ ctx.fillStyle = "green";
+ ctx.fillRect(5000, 0, 10000, 5000);
+ var container = document.getElementById("container");
+ container.scrollLeft = 5010;
+ container.scrollTop = 10;
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/633344-1-ref.html b/layout/reftests/bugs/633344-1-ref.html
new file mode 100644
index 0000000000..91960fc34a
--- /dev/null
+++ b/layout/reftests/bugs/633344-1-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.outer {
+ background:yellow;
+ position:absolute;
+ left:100px;
+ top:100px;
+ width:420px;
+ height:140px;
+ line-height:28px;
+}
+.inner {
+ float:left;
+ width:140px;
+ height:15.4px;
+ background:black;
+}
+canvas {
+ display:block;
+ float:left;
+}
+</style>
+</head>
+<body>
+<div class="outer"><div class="inner"></div><canvas id="c" width="10" height="10" style="width:14px; height:14px;"></canvas></div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 10, 10);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/633344-1.html b/layout/reftests/bugs/633344-1.html
new file mode 100644
index 0000000000..2713a6db4d
--- /dev/null
+++ b/layout/reftests/bugs/633344-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.outer {
+ background:yellow;
+ position:absolute;
+ left:100px;
+ top:100px;
+ width:300px;
+ height:100px;
+ transform:scale(1.4);
+ transform-origin:top left;
+ transform:scale(1.4);
+ transform-origin:top left;
+}
+.inner {
+ float:left;
+ width:100px;
+ height:11px;
+ background:black;
+}
+canvas {
+ display:block;
+ float:left;
+}
+</style>
+</head>
+<body>
+<div class="outer"><div class="inner"></div><canvas id="c" width="10" height="10"></canvas></div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 10, 10);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/634232-1-ref.html b/layout/reftests/bugs/634232-1-ref.html
new file mode 100644
index 0000000000..b3acc12cf4
--- /dev/null
+++ b/layout/reftests/bugs/634232-1-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+ .wackeddiv {
+ position: absolute;
+ left: 20px;
+ top: 20px;
+ width: 50px;
+ height: 50px;
+ border: 2px solid highlight;
+ background-color: transparent;
+ }
+
+ .posabssemitransparentblack {
+ position:absolute;
+ left: 0px;
+ top: 50px;
+ width: 100px;
+ height: 100px;
+ background: lime;
+ opacity: 0.1;
+ }
+</style>
+</head>
+<body>
+ <div class="posabssemitransparentblack"></div>
+ <div class="wackeddiv"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/634232-1.html b/layout/reftests/bugs/634232-1.html
new file mode 100644
index 0000000000..d85b032021
--- /dev/null
+++ b/layout/reftests/bugs/634232-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+ .wackeddiv {
+ position: fixed;
+ left: 20px;
+ top: 20px;
+ width: 50px;
+ height: 50px;
+ border: 2px solid highlight;
+ background-color: transparent;
+ transform: rotate(90deg);
+ }
+
+ .posabssemitransparentblack {
+ position:absolute;
+ left: 0px;
+ top: 50px;
+ width: 100px;
+ height: 100px;
+ background: lime;
+ opacity: 0.1;
+ }
+</style>
+</head>
+<body>
+ <div class="posabssemitransparentblack"></div>
+ <div class="wackeddiv"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635302-1-ref.html b/layout/reftests/bugs/635302-1-ref.html
new file mode 100644
index 0000000000..9421f50575
--- /dev/null
+++ b/layout/reftests/bugs/635302-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+#outer {
+ opacity: 0.8;
+ background-color:red;
+ width: 200px;
+}
+
+#inner {
+ opacity: 0.6;
+ background-color:white;
+ color:white;
+}
+
+</style>
+</head>
+<body>
+ <div id="outer">
+ <div style="width:200px; height:200px; background:black;"></div>
+ <div id="inner">
+ <div style="width:200px; height:200px; background:black;"></div>
+ <div style="width:200px; height:200px; background:rgb(50,50,50);"></div>
+ </div>
+ </div>
+</body></html>
+
diff --git a/layout/reftests/bugs/635302-1.html b/layout/reftests/bugs/635302-1.html
new file mode 100644
index 0000000000..1834924797
--- /dev/null
+++ b/layout/reftests/bugs/635302-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html><head>
+<style>
+#outer {
+ opacity: 0.8;
+ background-color:red;
+ width: 200px;
+}
+
+#inner {
+ opacity: 0.6;
+ background-color:black;
+ color:white;
+}
+
+</style>
+</head>
+<body>
+ <div id="outer">
+ <canvas width="200" height="200" style="display:block;" id="c1"></canvas>
+ <div id="inner">
+ <canvas width="200" height="400" style="display:block;" id="c2"></canvas>
+ </div>
+ </div>
+
+
+<script>
+var ctx = document.getElementById("c1").getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 200, 200);
+var ctx = document.getElementById("c2").getContext("2d");
+ctx.fillStyle = "black";
+ctx.fillRect(0, 0, 200, 200);
+ctx.fillStyle = "rgb(50,50,50)";
+ctx.fillRect(0, 200, 200, 200);
+</script>
+
+</body></html>
diff --git a/layout/reftests/bugs/635373-1-ref.html b/layout/reftests/bugs/635373-1-ref.html
new file mode 100644
index 0000000000..d36beaf579
--- /dev/null
+++ b/layout/reftests/bugs/635373-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+ background:url(100x80-white-rect-top-right.png);
+}
+canvas { display:block; }
+span { display:block; background:rgb(200,200,200); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas></span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635373-1.html b/layout/reftests/bugs/635373-1.html
new file mode 100644
index 0000000000..68e1ab7864
--- /dev/null
+++ b/layout/reftests/bugs/635373-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testing compositing of opaque layer with complex visible region</title>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+}
+canvas { display:block; }
+span { display:block; background:rgb(200,200,200); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas></span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635373-2-ref.html b/layout/reftests/bugs/635373-2-ref.html
new file mode 100644
index 0000000000..b105f6cf56
--- /dev/null
+++ b/layout/reftests/bugs/635373-2-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testing compositing of translucent layer with complex visible region</title>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+ background:url(100x80-white-rect-top-right.png);
+}
+canvas { display:block; }
+span { display:block; background:rgba(200,200,200, 0.4); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas></span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635373-2.html b/layout/reftests/bugs/635373-2.html
new file mode 100644
index 0000000000..e89b2b3123
--- /dev/null
+++ b/layout/reftests/bugs/635373-2.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testing compositing of translucent layer with complex visible region</title>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+}
+canvas { display:block; }
+span { display:block; background:rgba(200,200,200, 0.4); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas></span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635373-3-ref.html b/layout/reftests/bugs/635373-3-ref.html
new file mode 100644
index 0000000000..71b1eed1e2
--- /dev/null
+++ b/layout/reftests/bugs/635373-3-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testing compositing of component alpha layer with complex visible region</title>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+ background:url(100x80-white-rect-top-right.png);
+}
+canvas { display:block; }
+span { display:block; background:rgba(200,200,200, 0.4); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas>XYZ</span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635373-3.html b/layout/reftests/bugs/635373-3.html
new file mode 100644
index 0000000000..c440a19f8c
--- /dev/null
+++ b/layout/reftests/bugs/635373-3.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testing compositing of component alpha layer with complex visible region</title>
+<style>
+body { background:white; }
+#d {
+ position:absolute;
+ top:200px;
+ left:200px;
+ font-size:30px;
+ transform:rotate(30deg);
+ transform:rotate(30deg);
+}
+canvas { display:block; }
+span { display:block; background:rgba(200,200,200, 0.4); height:40px; }
+</style>
+</head>
+<body>
+<div id="d"><span style="width:20px"><canvas id="c" width="20" height="20"></canvas>XYZ</span>
+<span style="width:100px;"></span>
+</div>
+<script>
+var ctx = document.getElementById("c").getContext("2d");
+ctx.fillStyle = "lime";
+ctx.fillRect(5,5,5,5);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635639-1-ref.html b/layout/reftests/bugs/635639-1-ref.html
new file mode 100644
index 0000000000..d9e3d1b1cb
--- /dev/null
+++ b/layout/reftests/bugs/635639-1-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dvsm;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+body {
+ font-family: dvsm;
+}
+</style>
+</head>
+<body>
+<p>foo <span style="color:white">xyzzy</span> bar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635639-1.html b/layout/reftests/bugs/635639-1.html
new file mode 100644
index 0000000000..6405a4e628
--- /dev/null
+++ b/layout/reftests/bugs/635639-1.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dvsm;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+body {
+ font-family: dvsm;
+}
+</style>
+</head>
+<body>
+<p>foo <span style="color:white">x&#x301;y&#x302;z&#x303;z&#x304;y</span> bar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635639-2-ref.html b/layout/reftests/bugs/635639-2-ref.html
new file mode 100644
index 0000000000..6d3a5b491b
--- /dev/null
+++ b/layout/reftests/bugs/635639-2-ref.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dvsm;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+body {
+ font-family: dvsm;
+}
+</style>
+</head>
+<body>
+<p>foo <span style="color:white">&#x628;&#x633;&#x645; &#x671;&#x644;&#x644;&#x647;</span> bar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/635639-2.html b/layout/reftests/bugs/635639-2.html
new file mode 100644
index 0000000000..0852d41bd6
--- /dev/null
+++ b/layout/reftests/bugs/635639-2.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<style type="text/css">
+@font-face {
+ font-family: dvsm;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+body {
+ font-family: dvsm;
+}
+</style>
+</head>
+<body>
+<p>foo <span style="color:white">&#x628;&#x650;&#x633;&#x652;&#x645;&#x650; &#x671;&#x644;&#x644;&#x647;&#x650;</span> bar</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/637597-1-ref.html b/layout/reftests/bugs/637597-1-ref.html
new file mode 100644
index 0000000000..a52c15944d
--- /dev/null
+++ b/layout/reftests/bugs/637597-1-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+#parent {
+ position: absolute;
+ top: 100.8px;
+ transform: scale(1.1232,1.1232);
+ transform: scale(1.1232,1.1232);
+}
+#b1 {
+ position: absolute;
+ width: 100px;
+ height: 109px;
+ background: #c00;
+ transform: translate(100px,100px);
+ transform: translate(100px,100px);
+}
+#b2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100px;
+ height: 100px;
+ background: white;
+ transform: translate(400px,0);
+ transform: translate(400px,0);
+}
+</style>
+</head>
+<body>
+<div id="parent">
+ <div id="b1"></div>
+ <div id="b2"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/637597-1.html b/layout/reftests/bugs/637597-1.html
new file mode 100644
index 0000000000..92fd056ad1
--- /dev/null
+++ b/layout/reftests/bugs/637597-1.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<style>
+html { background:white; }
+#parent {
+ position: absolute;
+ top: 100.8px;
+ transform: scale(1.1232,1.1232);
+ transform: scale(1.1232,1.1232);
+}
+#b1 {
+ position: absolute;
+ width: 100px;
+ height: 109px;
+ background: #c00;
+ transform: translate(100px,100px);
+ transform: translate(100px,100px);
+}
+#b2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100px;
+ height: 100px;
+ background: white;
+ transform: translate(400px,200px);
+ transform: translate(400px,200px);
+}
+#b2.done {
+ transform: translate(400px,0);
+ transform: translate(400px,0);
+}
+</style>
+</head>
+<body>
+<div id="parent">
+ <div id="b1"></div>
+ <div id="b2"></div>
+</div>
+<script>
+function doTest() {
+ document.getElementById('b2').setAttribute("class", "done");
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/637852-1-ref.html b/layout/reftests/bugs/637852-1-ref.html
new file mode 100644
index 0000000000..a273d24a68
--- /dev/null
+++ b/layout/reftests/bugs/637852-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body { margin-top:101px; }
+.outer {
+ transform:scale(1.4);
+ transform-origin:top left;
+ line-height:40px;
+}
+</style>
+</head>
+<body>
+<div class="outer"><div class="inner">Hello Kitty</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/637852-1.html b/layout/reftests/bugs/637852-1.html
new file mode 100644
index 0000000000..ffd8b419f0
--- /dev/null
+++ b/layout/reftests/bugs/637852-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body { margin-top:100.9px; }
+.outer {
+ transform:scale(1.4);
+ transform-origin:top left;
+ line-height:40px;
+}
+</style>
+</head>
+<body>
+<div class="outer"><div class="inner">Hello Kitty</div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/637852-2-ref.html b/layout/reftests/bugs/637852-2-ref.html
new file mode 100644
index 0000000000..ea5da67d44
--- /dev/null
+++ b/layout/reftests/bugs/637852-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:scale(0.5); transform-origin:top left; border:10px solid black; border-radius:20px;">
+<div style="width:100px; height:100px; background:yellow"></div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/637852-2.html b/layout/reftests/bugs/637852-2.html
new file mode 100644
index 0000000000..ea9e079bdb
--- /dev/null
+++ b/layout/reftests/bugs/637852-2.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:scale(0.5); transform-origin:top left; border:10px solid black; border-radius:20px;">
+<canvas width="100" height="100" id="c" style="display:block"></canvas>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext("2d");
+ctx.fillStyle = "yellow";
+ctx.fillRect(0, 0, c.width, c.height);
+</script>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/637852-3-ref.html b/layout/reftests/bugs/637852-3-ref.html
new file mode 100644
index 0000000000..b3e82984ad
--- /dev/null
+++ b/layout/reftests/bugs/637852-3-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="d" style="border:20px solid black; height:200px; width:200px;">
+ <div style="width:200px; height:50px; background:yellow"></div>
+ <div style="height:100px; background:blue;"></div>
+ <div style="height:50px; background:orange;"></div>
+</div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/637852-3.html b/layout/reftests/bugs/637852-3.html
new file mode 100644
index 0000000000..e7a26ab8ca
--- /dev/null
+++ b/layout/reftests/bugs/637852-3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="d" style="transform:scale(2); transform-origin:top left; border:10px solid black; height:100px; width:100px; overflow:hidden">
+ <canvas width="100" height="100" id="c" style="display:block"></canvas>
+ <div style="height:50px; background:blue;"></div>
+ <div style="height:50px; background:orange;"></div>
+</div>
+<script>
+var c = document.getElementById("c");
+var ctx = c.getContext("2d");
+ctx.fillStyle = "yellow";
+ctx.fillRect(0, 0, c.width, c.height);
+var d = document.getElementById("d");
+d.scrollTop = 75;
+</script>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/641770-1-ref.html b/layout/reftests/bugs/641770-1-ref.html
new file mode 100644
index 0000000000..fcbe8a905a
--- /dev/null
+++ b/layout/reftests/bugs/641770-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; background:green; width:1500px; height:1500px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/641770-1.html b/layout/reftests/bugs/641770-1.html
new file mode 100644
index 0000000000..fac0a4ea00
--- /dev/null
+++ b/layout/reftests/bugs/641770-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img style="position:fixed; width:1500px;" src="repeatable-diagonal-gradient.png">
+<div style="position:absolute; background:green; width:1500px; height:1500px;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/641856-1-ref.html b/layout/reftests/bugs/641856-1-ref.html
new file mode 100644
index 0000000000..6b14c62ef5
--- /dev/null
+++ b/layout/reftests/bugs/641856-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ p {
+ background:gold;
+ width: 24em;
+
+ columns: 2;
+
+ column-rule: solid;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Some<br>text</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/641856-1.html b/layout/reftests/bugs/641856-1.html
new file mode 100644
index 0000000000..152dc75816
--- /dev/null
+++ b/layout/reftests/bugs/641856-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ p {
+ background:gold;
+ width: 24em;
+ overflow: hidden;
+
+ columns: 2;
+
+ column-rule: solid;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Some<br>text</p>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/645491-1-ref.html b/layout/reftests/bugs/645491-1-ref.html
new file mode 100644
index 0000000000..27adb2b12f
--- /dev/null
+++ b/layout/reftests/bugs/645491-1-ref.html
@@ -0,0 +1,6 @@
+<!-- This test needs to be in quirks mode -->
+<html>
+ <body style="color: green">
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/645491-1.html b/layout/reftests/bugs/645491-1.html
new file mode 100644
index 0000000000..d301d2d0c5
--- /dev/null
+++ b/layout/reftests/bugs/645491-1.html
@@ -0,0 +1,12 @@
+<!-- This test needs to be in quirks mode -->
+<html>
+ <head>
+ <style>
+ body { color: red; }
+ body#foo { color: green; }
+ </style>
+ </head>
+ <body onload="document.body.offsetWidth; document.body.id = 'FOO'">
+ This should be green
+ </body>
+</html>
diff --git a/layout/reftests/bugs/645647-1-ref.html b/layout/reftests/bugs/645647-1-ref.html
new file mode 100644
index 0000000000..c35d5520f2
--- /dev/null
+++ b/layout/reftests/bugs/645647-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<body>
+ <div style="border: 1px solid green; width: -moz-fit-content">Some text</div>
+ <div style="border: 1px solid green; width: -moz-fit-content">Some text</div>
+</body>
diff --git a/layout/reftests/bugs/645647-1.html b/layout/reftests/bugs/645647-1.html
new file mode 100644
index 0000000000..6b8e76c4ab
--- /dev/null
+++ b/layout/reftests/bugs/645647-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body>
+ <div style="display: list-item; list-style-type: none;
+ list-style-position: inside;
+ border: 1px solid green; width: -moz-fit-content">Some text</div>
+ <div style="display: list-item; list-style-type: none;
+ list-style-position: outside;
+ border: 1px solid green; width: -moz-fit-content">Some text</div>
+</body>
diff --git a/layout/reftests/bugs/645647-2-ref.html b/layout/reftests/bugs/645647-2-ref.html
new file mode 100644
index 0000000000..64690fd7ee
--- /dev/null
+++ b/layout/reftests/bugs/645647-2-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<htm><head>
+<style>
+.li {
+ background: red;
+ float: left;
+ line-height: 0;
+}
+
+.ul {
+ list-style-type: none;
+ list-style-position: inside;
+}
+</style>
+</head>
+<body>
+
+<pre>There should be no red areas.</pre>
+
+<div class="ul">
+ <div class="li"><a href="#">
+ <img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" height="75" width="75">
+ </a></div>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/645647-2.html b/layout/reftests/bugs/645647-2.html
new file mode 100644
index 0000000000..922e21161b
--- /dev/null
+++ b/layout/reftests/bugs/645647-2.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<htm><head>
+<style>
+.li {
+ display: list-item;
+ background: red;
+ float: left;
+ line-height: 0;
+}
+
+.ul {
+ list-style-type: none;
+ list-style-position: inside;
+}
+</style>
+</head>
+<body>
+
+<pre>There should be no red areas.</pre>
+
+<div class="ul">
+ <div class="li"><a href="#">
+ <img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" height="75" width="75">
+ </a></div>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/645768-1-ref.html b/layout/reftests/bugs/645768-1-ref.html
new file mode 100644
index 0000000000..94bcf3b3fc
--- /dev/null
+++ b/layout/reftests/bugs/645768-1-ref.html
@@ -0,0 +1,8 @@
+<!-- This test needs to be in quirks mode -->
+<body>
+ <div>
+ <table style="color: green">
+ <tr><td>This should be green</td></tr>
+ </table>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/645768-1.html b/layout/reftests/bugs/645768-1.html
new file mode 100644
index 0000000000..b649a8f56f
--- /dev/null
+++ b/layout/reftests/bugs/645768-1.html
@@ -0,0 +1,12 @@
+<!-- This test needs to be in quirks mode -->
+<body style="display: none; color: green">
+ <div style="color: red">
+ <table>
+ <tr><td>This should be green</td></tr>
+ </table>
+ </div>
+ <script>
+ document.body.offsetWidth;
+ document.body.style.display = "";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/647-1-ref.html b/layout/reftests/bugs/647-1-ref.html
new file mode 100644
index 0000000000..83c50c2a44
--- /dev/null
+++ b/layout/reftests/bugs/647-1-ref.html
@@ -0,0 +1,22 @@
+<HTML><BODY>
+<table border>
+ <tr>
+ <td valign=top>
+ <center>
+ <TABLE BORDER=1 WIDTH=100>
+ <TR>
+ <TD>
+ <font size = "-2">
+ <center>
+ inside
+ </center>
+ </font>
+ </td>
+ </tr>
+ </table>
+ outside table
+ </center>
+ </td>
+ </tr>
+</table>
+</BODY></HTML>
diff --git a/layout/reftests/bugs/647-1.html b/layout/reftests/bugs/647-1.html
new file mode 100644
index 0000000000..1ae362d0d2
--- /dev/null
+++ b/layout/reftests/bugs/647-1.html
@@ -0,0 +1,22 @@
+<HTML><BODY>
+<table border>
+ <tr>
+ <td valign=top>
+ <center>
+ <TABLE BORDER=1 WIDTH=100>
+ <TR>
+ <TD>
+ <font size = "-2">
+ <center>
+ inside
+ </font>
+ </center>
+ </td>
+ </tr>
+ </table>
+ outside table
+ </center>
+ </td>
+ </tr>
+</table>
+</BODY></HTML>
diff --git a/layout/reftests/bugs/650228-1-ref.html b/layout/reftests/bugs/650228-1-ref.html
new file mode 100644
index 0000000000..2eb39ab490
--- /dev/null
+++ b/layout/reftests/bugs/650228-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="d1" style="width:100px; height:200px; background:lime;"></div>
+<div id="d2" style="width:100px; height:100px; background:cyan; opacity:0.4;">Hello Kitty</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/650228-1.html b/layout/reftests/bugs/650228-1.html
new file mode 100644
index 0000000000..34384205a9
--- /dev/null
+++ b/layout/reftests/bugs/650228-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d1" style="width:100px; height:100px; background:lime;"></div>
+<div id="d2" style="width:100px; height:100px; background:cyan; opacity:0.8;">Hello Kitty</div>
+<script>
+var d1 = document.getElementById("d1");
+var d2 = document.getElementById("d2");
+document.body.offsetTop;
+d1.style.height = "150px";
+d2.style.opacity = "0.6";
+function doTest() {
+ d1.style.height = "200px";
+ d2.style.opacity = 0.4;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/652301-1-ref.html b/layout/reftests/bugs/652301-1-ref.html
new file mode 100644
index 0000000000..c587207949
--- /dev/null
+++ b/layout/reftests/bugs/652301-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body onload='document.getElementById("focusme").focus();'>
+ <span id="focusme" tabindex="0"
+ onfocus="document.documentElement.className=''">Some text</span>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/652301-1a.html b/layout/reftests/bugs/652301-1a.html
new file mode 100644
index 0000000000..a9f8b00c46
--- /dev/null
+++ b/layout/reftests/bugs/652301-1a.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body onload='document.getElementById("focusme").focus();'>
+ <a id="focusme" tabindex="0"
+ onfocus="document.documentElement.className=''">Some text</a>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/652301-1b.html b/layout/reftests/bugs/652301-1b.html
new file mode 100644
index 0000000000..2643832e55
--- /dev/null
+++ b/layout/reftests/bugs/652301-1b.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body onload='document.getElementById("focusme").focus();'>
+ <nosuchtageverwillexist
+ id="focusme" tabindex="0"
+ onfocus="document.documentElement.className=''">Some text</nosuchtageverwillexist>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/652775-1-ref.html b/layout/reftests/bugs/652775-1-ref.html
new file mode 100644
index 0000000000..3017a11099
--- /dev/null
+++ b/layout/reftests/bugs/652775-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="width: 0px">
+ <fieldset>
+ <legend style="white-space:normal">There is some longish text here; there really is</legend>
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/652775-1.html b/layout/reftests/bugs/652775-1.html
new file mode 100644
index 0000000000..435302da83
--- /dev/null
+++ b/layout/reftests/bugs/652775-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="width: 0px">
+ <fieldset>
+ <legend>There is some longish text here; there really is</legend>
+ </fieldset>
+</body>
diff --git a/layout/reftests/bugs/652991-1-ref.html b/layout/reftests/bugs/652991-1-ref.html
new file mode 100644
index 0000000000..bc6145d366
--- /dev/null
+++ b/layout/reftests/bugs/652991-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <svg width="200" height="200">
+ <defs>
+ <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+ <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+ </pattern>
+ </defs>
+ <circle id="circle" cx="101" cy="101" r="50" fill="url(#pattern-id)" stroke="#000"/>
+ </svg>
+</html>
diff --git a/layout/reftests/bugs/652991-1a.html b/layout/reftests/bugs/652991-1a.html
new file mode 100644
index 0000000000..4dfed12b78
--- /dev/null
+++ b/layout/reftests/bugs/652991-1a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <svg width="200" height="200">
+ <defs>
+ <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+ <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+ </pattern>
+ </defs>
+ <circle id="drawPath" cx="101" cy="101" r="50" fill="url(#pattern-id)" stroke="#000">
+ </circle>
+ </svg>
+ <script>
+ function doTest() {
+ window.history.pushState(null, "", "new-page");
+
+ drawPath.style.display = "none";
+ window.setTimeout(() => {
+ drawPath.style.display = "inline";
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+
+ drawPath = document.getElementById("drawPath");
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+</html>
diff --git a/layout/reftests/bugs/652991-1b.html b/layout/reftests/bugs/652991-1b.html
new file mode 100644
index 0000000000..32ea91b843
--- /dev/null
+++ b/layout/reftests/bugs/652991-1b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <svg width="200" height="200">
+ <defs>
+ <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+ <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+ </pattern>
+ </defs>
+ <circle id="drawPath" cx="101" cy="101" r="50" style="fill: url(&quot;#pattern-id&quot;);" stroke="#000">
+ </circle>
+ </svg>
+ <script>
+ function doTest() {
+ window.history.pushState(null, "", "new-page");
+
+ drawPath.style.display = "none";
+ window.setTimeout(() => {
+ drawPath.style.display = "inline";
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+
+ drawPath = document.getElementById("drawPath");
+ window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
diff --git a/layout/reftests/bugs/652991-2-ref.html b/layout/reftests/bugs/652991-2-ref.html
new file mode 100644
index 0000000000..286fbe92cd
--- /dev/null
+++ b/layout/reftests/bugs/652991-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<svg width="200" height="200">
+ <defs>
+ <clipPath id="myClip">
+ <circle cx="30" cy="30" r="20"/>
+ <circle cx="70" cy="70" r="20"/>
+ </clipPath>
+ </defs>
+ <rect x="10" y="10" width="100" height="100" clip-path="url(#myClip)"/>
+</svg>
+</html>
diff --git a/layout/reftests/bugs/652991-2.html b/layout/reftests/bugs/652991-2.html
new file mode 100644
index 0000000000..fb8a829d23
--- /dev/null
+++ b/layout/reftests/bugs/652991-2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <svg width="200" height="200">
+ <defs>
+ <clipPath id="myClip">
+ <circle cx="30" cy="30" r="20"/>
+ <circle cx="70" cy="70" r="20"/>
+ </clipPath>
+ </defs>
+ <rect id="drawPath" x="10" y="10" width="100" height="100" clip-path="url(#myClip)"/>
+ </svg>
+ <script>
+ function doTest() {
+ window.history.pushState(null, "", "new-page");
+
+ drawPath.style.display = "none";
+ window.setTimeout(() => {
+ drawPath.style.display = "inline";
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+
+ drawPath = document.getElementById("drawPath");
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+</html>
diff --git a/layout/reftests/bugs/652991-3-ref.html b/layout/reftests/bugs/652991-3-ref.html
new file mode 100644
index 0000000000..524c8f38e5
--- /dev/null
+++ b/layout/reftests/bugs/652991-3-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<svg width="200" height="200">
+ <defs>
+ <marker id="markerCircle" markerWidth="8" markerHeight="8" refX="5" refY="5">
+ <circle cx="5" cy="5" r="2" style="stroke: none; fill:#000000;"/>
+ </marker>
+ </defs>
+ <path id="drawPath" d="M10,10 L60,10 L110,10" style="stroke: #6666ff; stroke-width: 1px; fill: none; marker-start: url(#markerCircle); marker-mid: url(#markerCircle); marker-end: url(#markerCircle);"/>
+</svg>
+</html>
diff --git a/layout/reftests/bugs/652991-3.html b/layout/reftests/bugs/652991-3.html
new file mode 100644
index 0000000000..72ff5d99e6
--- /dev/null
+++ b/layout/reftests/bugs/652991-3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <svg width="200" height="200">
+ <defs>
+ <marker id="markerCircle" markerWidth="8" markerHeight="8" refX="5" refY="5">
+ <circle cx="5" cy="5" r="2" style="stroke: none; fill:#000000;"/>
+ </marker>
+ </defs>
+ <path id="drawPath" d="M10,10 L60,10 L110,10"
+ style="stroke: #6666ff; stroke-width: 1px; fill: none; marker-start: url(#markerCircle); marker-mid: url(#markerCircle);; marker-end: url(#markerCircle);"/>
+ </svg>
+ <script>
+ function doTest() {
+ window.history.pushState(null, "", "new-page");
+
+ drawPath.style.display = "none";
+ window.setTimeout(() => {
+ drawPath.style.display = "inline";
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+
+ drawPath = document.getElementById("drawPath");
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+</html>
diff --git a/layout/reftests/bugs/652991-4-ref.html b/layout/reftests/bugs/652991-4-ref.html
new file mode 100644
index 0000000000..fb1723ad47
--- /dev/null
+++ b/layout/reftests/bugs/652991-4-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <svg width="200" height="200">
+ <defs>
+ <mask id="mask1" x="0" y="0" width="100" height="100" >
+ <circle cx="100" cy="100" r="50" style="stroke:none; fill: #ffffff"/>
+ </mask>
+ </defs>
+ <rect id="drawPath" x="50" y="50" width="100" height="100" fill="blue" stroke="blue" mask="url(#mask1)"/>
+ </svg>
+</html>
diff --git a/layout/reftests/bugs/652991-4.html b/layout/reftests/bugs/652991-4.html
new file mode 100644
index 0000000000..92ff3e2fc3
--- /dev/null
+++ b/layout/reftests/bugs/652991-4.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <svg width="200" height="200">
+ <defs>
+ <mask id="mask1" x="0" y="0" width="100" height="100" >
+ <circle cx="100" cy="100" r="50" style="stroke:none; fill: #ffffff"/>
+ </mask>
+ </defs>
+ <rect id="drawPath" x="50" y="50" width="100" height="100" fill="blue" stroke="blue" mask="url(#mask1)"/>
+ </svg>
+ <script>
+ function doTest() {
+ window.history.pushState(null, "", "new-page");
+
+ drawPath.style.display = "none";
+ window.setTimeout(() => {
+ drawPath.style.display = "inline";
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+
+ drawPath = document.getElementById("drawPath");
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+</html>
diff --git a/layout/reftests/bugs/653930-1-iframe.html b/layout/reftests/bugs/653930-1-iframe.html
new file mode 100644
index 0000000000..63208b7ff9
--- /dev/null
+++ b/layout/reftests/bugs/653930-1-iframe.html
@@ -0,0 +1,7 @@
+<html>
+ <head>
+ </head>
+ <body>
+ Sputterances!
+ </body>
+</html>
diff --git a/layout/reftests/bugs/653930-1-ref.html b/layout/reftests/bugs/653930-1-ref.html
new file mode 100644
index 0000000000..d89fbf2976
--- /dev/null
+++ b/layout/reftests/bugs/653930-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ </head>
+ <body>
+ <iframe id="testframe" marginWidth="30px" marginHeight="20px" src="653930-1-iframe.html">
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/653930-1.html b/layout/reftests/bugs/653930-1.html
new file mode 100644
index 0000000000..277ec420bf
--- /dev/null
+++ b/layout/reftests/bugs/653930-1.html
@@ -0,0 +1,21 @@
+<html class="reftest-wait">
+ <head>
+ <script type="text/javascript">
+ window.onload = function() {
+
+ // Get the frame
+ var frame = document.getElementById("testframe");
+
+ // Set margin* attributes
+ frame.marginWidth = "30px";
+ frame.marginHeight = "20px";
+
+ // Trigger the reftest snapshot
+ document.documentElement.className = '';
+ }
+ </script>
+ </head>
+ <body>
+ <iframe id="testframe" src="653930-1-iframe.html">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/654057-1-ref.html b/layout/reftests/bugs/654057-1-ref.html
new file mode 100644
index 0000000000..8b05c82f32
--- /dev/null
+++ b/layout/reftests/bugs/654057-1-ref.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style type="text/css">
+/* This test is really intended for Segoe UI on Windows7;
+ we provide a known fallback font for other platforms where
+ the default font might not handle the diacritic (WinXP) */
+@font-face {
+ font-family: fallback;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+p.test {
+ font-family: "Segoe UI", fallback, sans-serif;
+ font-size: 60px;
+}
+span.test {
+ background: black;
+}
+</style>
+</head>
+<body>
+<p>Diacritic should be hidden by the black background:</p>
+<p class="test">x<span class="test">x</span>x</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/654057-1.html b/layout/reftests/bugs/654057-1.html
new file mode 100644
index 0000000000..0a2cf5fcb6
--- /dev/null
+++ b/layout/reftests/bugs/654057-1.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style type="text/css">
+/* This test is really intended for Segoe UI on Windows7;
+ we provide a known fallback font for other platforms where
+ the default font might not handle the diacritic (WinXP) */
+@font-face {
+ font-family: fallback;
+ src: url(../fonts/DejaVuSansMono.woff);
+}
+p.test {
+ font-family: "Segoe UI", fallback, sans-serif;
+ font-size: 60px;
+}
+span.test {
+ background: black;
+}
+</style>
+</head>
+<body>
+<p>Diacritic should be hidden by the black background:</p>
+<p class="test">x<span class="test">x&#x302;</span>x</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/654950-1-ref.html b/layout/reftests/bugs/654950-1-ref.html
new file mode 100644
index 0000000000..5016ba5512
--- /dev/null
+++ b/layout/reftests/bugs/654950-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="opacity:0.8; background-color: gray;">
+ <span style="display:inline-block; width:256px; height:256px; background:lime; position:relative; top:10px;">
+ <div style="background:yellow; height:50px;"></div>
+ </span>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/654950-1.html b/layout/reftests/bugs/654950-1.html
new file mode 100644
index 0000000000..fc1d5cd7a7
--- /dev/null
+++ b/layout/reftests/bugs/654950-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="opacity:0.8; background-color: gray;">
+ <div style="overflow: hidden; transform: translate(0,10px);">
+ <canvas id="canvas" width="256" height="256"></canvas>
+ </div>
+</div>
+<script>
+var ctx = document.getElementById("canvas").getContext("2d");
+ctx.fillStyle = "yellow";
+ctx.fillRect(0, 0, 256, 50);
+ctx.fillStyle = "lime";
+ctx.fillRect(0, 50, 256, 206);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/655549-1-ref.html b/layout/reftests/bugs/655549-1-ref.html
new file mode 100644
index 0000000000..94bcf3b3fc
--- /dev/null
+++ b/layout/reftests/bugs/655549-1-ref.html
@@ -0,0 +1,8 @@
+<!-- This test needs to be in quirks mode -->
+<body>
+ <div>
+ <table style="color: green">
+ <tr><td>This should be green</td></tr>
+ </table>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/655549-1.html b/layout/reftests/bugs/655549-1.html
new file mode 100644
index 0000000000..33fe2cce05
--- /dev/null
+++ b/layout/reftests/bugs/655549-1.html
@@ -0,0 +1,12 @@
+<!-- This test needs to be in quirks mode -->
+<body style="color: red">
+ <div>
+ <table>
+ <tr><td>This should be green</td></tr>
+ </table>
+ </div>
+ <script>
+ document.body.offsetWidth;
+ document.body.style.color = "green";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/655836-1-ref.html b/layout/reftests/bugs/655836-1-ref.html
new file mode 100644
index 0000000000..75359a3370
--- /dev/null
+++ b/layout/reftests/bugs/655836-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id="A" width=200 height=50></canvas><br />
+<canvas id="B" width=200 height=50></canvas>
+<script>
+ var canvasA = document.getElementById("A"),
+ ctxA = canvasA.getContext('2d'),
+ canvasB = document.getElementById("B"),
+ ctxB = canvasB.getContext('2d'),
+ width = canvasA.width,
+ height = canvasA.height;
+
+ ctxB.fillStyle = 'green';
+ ctxB.fillRect(0, 0, width, height);
+
+ ctxA.fillStyle = 'red';
+ ctxA.fillRect(0, 0, width, height);
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/655836-1.html b/layout/reftests/bugs/655836-1.html
new file mode 100644
index 0000000000..65dcb62342
--- /dev/null
+++ b/layout/reftests/bugs/655836-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id="A" width=200 height=50></canvas><br />
+<canvas id="B" width=200 height=50></canvas>
+<script>
+ var canvasA = document.getElementById("A"),
+ ctxA = canvasA.getContext('2d'),
+ canvasB = document.getElementById("B"),
+ ctxB = canvasB.getContext('2d'),
+ width = canvasA.width,
+ height = canvasA.height;
+
+ ctxA.fillStyle = 'green';
+ ctxA.fillRect(0, 0, width, height);
+
+ ctxB.drawImage(canvasA, 0, 0);
+
+ ctxA.fillStyle = 'red';
+ ctxA.fillRect(0, 0, width, height);
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/656875.html b/layout/reftests/bugs/656875.html
new file mode 100644
index 0000000000..2142ea5eda
--- /dev/null
+++ b/layout/reftests/bugs/656875.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+
+<div>test</div>
+
+<style>
+ body {
+ width: 100px; height: 300px;
+ position: absolute;
+ transform: scale(0.5);
+ }
+ div { position: absolute; }
+</style>
diff --git a/layout/reftests/bugs/658952-ref.html b/layout/reftests/bugs/658952-ref.html
new file mode 100644
index 0000000000..69fd14e3cf
--- /dev/null
+++ b/layout/reftests/bugs/658952-ref.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=KSC5601">
+</head>
+<body>
+<p>&#xCA25;&#xCA25;&#xC774; &#xC0AC;&#xC8FC;&#xC138;&#xC694; - IE &#xAE30;&#xB85D;<br>&#xCA25;&#xCA25;&#xC774; &#xC0AC;&#xC8FC;&#xC138;&#xC694; - ie9 &#xAE30;&#xB85D;</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/658952.html b/layout/reftests/bugs/658952.html
new file mode 100644
index 0000000000..1a83de36aa
--- /dev/null
+++ b/layout/reftests/bugs/658952.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=KSC5601">
+</head>
+<body>
+<p>¤z¤zÀÌ »çÁÖ¼¼¿ä - IE ±â·Ï<br>¤z¤zÀÌ »çÁÖ¼¼¿ä - ie9 ±â·Ï</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/660682-1-ref.html b/layout/reftests/bugs/660682-1-ref.html
new file mode 100644
index 0000000000..50ddc46980
--- /dev/null
+++ b/layout/reftests/bugs/660682-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body style="opacity:0.4;">
+Alpha
+<div>Gamma</div>
+Delta
+</body>
+</html>
diff --git a/layout/reftests/bugs/660682-1.html b/layout/reftests/bugs/660682-1.html
new file mode 100644
index 0000000000..35efb27525
--- /dev/null
+++ b/layout/reftests/bugs/660682-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body>
+<span style="opacity:0.4;">
+Alpha
+<div>Gamma</div>
+Delta
+</span>
+</body>
+</html>
diff --git a/layout/reftests/bugs/664127-1-ref.xhtml b/layout/reftests/bugs/664127-1-ref.xhtml
new file mode 100644
index 0000000000..671ea703ec
--- /dev/null
+++ b/layout/reftests/bugs/664127-1-ref.xhtml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css" href="664127-1.css"?>
+<?xml-stylesheet type="text/css" href="data:text/css,
+tree { opacity: 0.5; }
+"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <body xmlns="http://www.w3.org/1999/xhtml">
+ <img src="solidblue.png"/>
+ </body>
+ <tree>
+ <treecols>
+ <treecol flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label=" "/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/664127-1.css b/layout/reftests/bugs/664127-1.css
new file mode 100644
index 0000000000..9541a2b241
--- /dev/null
+++ b/layout/reftests/bugs/664127-1.css
@@ -0,0 +1,11 @@
+/* This external stylesheet is needed to be able to use a cached image
+ (solidblue.png) through a relative path */
+tree {
+ height: 100px; -moz-appearance: none; border: none; background-color: transparent;
+}
+treecol, treecolpicker {
+ visibility: hidden;
+}
+treechildren::-moz-tree-image {
+ list-style-image: url('solidblue.png');
+}
diff --git a/layout/reftests/bugs/664127-1.xhtml b/layout/reftests/bugs/664127-1.xhtml
new file mode 100644
index 0000000000..84ee6b058a
--- /dev/null
+++ b/layout/reftests/bugs/664127-1.xhtml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css" href="664127-1.css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <body xmlns="http://www.w3.org/1999/xhtml">
+ <style><![CDATA[
+ treechildren::-moz-tree-image { opacity: 0.5; }
+ ]]></style>
+ <img src="solidblue.png"/>
+ </body>
+ <tree>
+ <treecols>
+ <treecol flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label=" "/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/665597-1-ref.html b/layout/reftests/bugs/665597-1-ref.html
new file mode 100644
index 0000000000..e006597b1a
--- /dev/null
+++ b/layout/reftests/bugs/665597-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<title>Test that overflowing margins and padding on scrollable element add</title>
+<style>
+#scroll {
+ overflow: scroll; background: yellow;
+ height: 111px; width: 116px;
+}
+
+#content {
+ height: 223px;
+ margin-right: 5px;
+ margin-left: 11px;
+ background: aqua;
+}
+#gap {
+ /* In test file: #content's margin-bottom: 35px + #scroll's padding-bottom: 7px */
+ height: 42px;
+}
+
+</style>
+<div id="scroll"><div id="content"></div><div id="gap"></div></div>
+<script>
+document.getElementById("scroll").scrollTop = "1000";
+</script>
diff --git a/layout/reftests/bugs/665597-1.html b/layout/reftests/bugs/665597-1.html
new file mode 100644
index 0000000000..4660f7b908
--- /dev/null
+++ b/layout/reftests/bugs/665597-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<title>Test that overflowing margins and padding on scrollable element add</title>
+<style>
+#scroll {
+ overflow: scroll; background: yellow;
+ height: 100px; width: 100px;
+ padding: 4px 5px 7px 11px;
+}
+
+#content {
+ margin-top: 19px;
+ margin-bottom: 35px;
+ height: 200px;
+ background: aqua;
+}
+
+</style>
+<div id="scroll"><div id="content"></div></div>
+<script>
+document.getElementById("scroll").scrollTop = "1000";
+</script>
diff --git a/layout/reftests/bugs/665597-2-ref.html b/layout/reftests/bugs/665597-2-ref.html
new file mode 100644
index 0000000000..f1007e064c
--- /dev/null
+++ b/layout/reftests/bugs/665597-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 665597</title>
+ <style type="text/css">
+
+.o { width:100px; height:100px; padding:100px; background:green; }
+.i { width:100px; height:200px; background:yellow; }
+
+ </style>
+</head>
+<body>
+<div class="o" style="overflow:visible">
+ <div class="i"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/665597-2.html b/layout/reftests/bugs/665597-2.html
new file mode 100644
index 0000000000..bf35c08176
--- /dev/null
+++ b/layout/reftests/bugs/665597-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Testcase for bug 665597</title>
+ <style type="text/css">
+
+.o { width:100px; height:100px; padding:100px; background:green; }
+.i { width:100px; height:200px; background:yellow; }
+
+ </style>
+</head>
+<body>
+<div class="o" style="overflow:auto">
+ <div class="i"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/667079-1-ref.html b/layout/reftests/bugs/667079-1-ref.html
new file mode 100644
index 0000000000..7a862b53f6
--- /dev/null
+++ b/layout/reftests/bugs/667079-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<body style="font-size: 100px;">
+ <div style="position: relative; display: inline; background: red;">X<table style="height: 100%; position: absolute; width: 100%; background: green; top: 0; left: 0"></table></div>
+</body>
diff --git a/layout/reftests/bugs/667079-1.html b/layout/reftests/bugs/667079-1.html
new file mode 100644
index 0000000000..7edbd926ab
--- /dev/null
+++ b/layout/reftests/bugs/667079-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<body onload="document.body.style.fontSize = '100px'"
+ style="font-size: 50px;">
+ <div style="position: relative; display: inline; background: red;">X<table style="height: 100%; position: absolute; width: 100%; background: green; top: 0; left: 0"></table></div>
+</body>
diff --git a/layout/reftests/bugs/668319-1.xhtml b/layout/reftests/bugs/668319-1.xhtml
new file mode 100644
index 0000000000..7795695cd4
--- /dev/null
+++ b/layout/reftests/bugs/668319-1.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <style xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
+ tree { height: 100px; -moz-appearance: none; border: none; background-color: transparent; }
+ treecol, treecolpicker { visibility: hidden; }
+ treechildren::-moz-tree-cell-text { opacity: 0; }
+ ]]></style>
+ <tree>
+ <treecols>
+ <treecol flex="1"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="test"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
diff --git a/layout/reftests/bugs/669015-1-notref.xhtml b/layout/reftests/bugs/669015-1-notref.xhtml
new file mode 100644
index 0000000000..4c79103e97
--- /dev/null
+++ b/layout/reftests/bugs/669015-1-notref.xhtml
@@ -0,0 +1,3 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <label style="margin: 0px 300px;" value="Shadow"/>
+</box>
diff --git a/layout/reftests/bugs/669015-1.xhtml b/layout/reftests/bugs/669015-1.xhtml
new file mode 100644
index 0000000000..5226833adf
--- /dev/null
+++ b/layout/reftests/bugs/669015-1.xhtml
@@ -0,0 +1,3 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <label style="margin: 0px 300px; text-shadow: blue 4px 10px 2px" value="Shadow"/>
+</box>
diff --git a/layout/reftests/bugs/670442-1-ref.html b/layout/reftests/bugs/670442-1-ref.html
new file mode 100644
index 0000000000..6766643a2d
--- /dev/null
+++ b/layout/reftests/bugs/670442-1-ref.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>
+ <canvas id="c1" width="400" height="400"></canvas>
+ <canvas id="c2" width="400" height="400"></canvas>
+ </div>
+ <script type="text/javascript">
+ var canv1 = document.getElementById('c1');
+ var canv2 = document.getElementById('c2');
+ var ctx1 = canv1.getContext('2d');
+ var ctx2 = canv2.getContext('2d');
+
+ ctx1.strokeStyle = '#FF0000';
+ ctx1.moveTo(10, 10);
+ ctx1.lineTo(390, 390);
+ ctx1.stroke();
+
+ function doTest()
+ {
+ // Save img data
+ var imgData = ctx1.getImageData(0, 0, canv1.width, canv1.height);
+
+ // Resize canvas - seems to cause the bug
+ canv1.width = 0;
+ canv1.height = 0;
+ canv1.width = 400;
+ canv1.height = 400;
+
+ // Put image data from ctx1 to ctx2
+ ctx2.putImageData(imgData, 0, 0);
+
+ // Draw canvas2 on canvas1
+ ctx1.drawImage(canv2, 0, 0);
+ };
+
+ doTest();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/670442-1.html b/layout/reftests/bugs/670442-1.html
new file mode 100644
index 0000000000..3823cd2ff0
--- /dev/null
+++ b/layout/reftests/bugs/670442-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>
+ <canvas id="c1" width="400" height="400"></canvas>
+ <canvas id="c2" width="400" height="400"></canvas>
+ </div>
+ <script type="text/javascript">
+ var canv1 = document.getElementById('c1');
+ var canv2 = document.getElementById('c2');
+ var ctx1 = canv1.getContext('2d');
+ var ctx2 = canv2.getContext('2d');
+
+ ctx1.strokeStyle = '#FF0000';
+ ctx1.moveTo(10, 10);
+ ctx1.lineTo(390, 390);
+ ctx1.stroke();
+
+ function doTest()
+ {
+ // Save img data
+ var imgData = ctx1.getImageData(0, 0, canv1.width, canv1.height);
+
+ // Resize canvas - seems to cause the bug
+ canv1.width = 0;
+ canv1.height = 0;
+ canv1.width = 400;
+ canv1.height = 400;
+
+ // Put image data from ctx1 to ctx2
+ ctx2.putImageData(imgData, 0, 0);
+
+ // Draw canvas2 on canvas1
+ ctx1.drawImage(canv2, 0, 0);
+ };
+
+ doTest();
+ doTest();
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/670467-1-ref.html b/layout/reftests/bugs/670467-1-ref.html
new file mode 100644
index 0000000000..819dff384c
--- /dev/null
+++ b/layout/reftests/bugs/670467-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<body style="color: green">
+ <div style="display: inline;">
+ Line 1
+ <div>Line 2</div>
+ Line 3
+ <div>Line 4</div>
+ Line 5
+ </div>
+</body>
diff --git a/layout/reftests/bugs/670467-1.html b/layout/reftests/bugs/670467-1.html
new file mode 100644
index 0000000000..ef6da737ec
--- /dev/null
+++ b/layout/reftests/bugs/670467-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<body style="color: red">
+ <div id="x" style="display: inline; visibility: hidden">
+ Line 1
+ <div>Line 2</div>
+ Line 3
+ <div>Line 4</div>
+ Line 5
+ </div><script type="text/javascript">
+ document.body.offsetWidth;
+ document.getElementById("x").style.visibility = "visible";
+ document.body.style.color = "green";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/670467-2-ref.html b/layout/reftests/bugs/670467-2-ref.html
new file mode 100644
index 0000000000..ce55f3e303
--- /dev/null
+++ b/layout/reftests/bugs/670467-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<style>
+ body::first-line { color: purple; }
+</style>
+<body style="width: 0; color: green"><span>This is some text</span>
+</body>
diff --git a/layout/reftests/bugs/670467-2.html b/layout/reftests/bugs/670467-2.html
new file mode 100644
index 0000000000..7d40b5f424
--- /dev/null
+++ b/layout/reftests/bugs/670467-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+ body::first-line { color: purple; }
+</style>
+<body style="width: 0; color: red"><span id="x" style="visibility: hidden">This is some text</span>
+ <script type="text/javascript">
+ document.body.offsetWidth;
+ document.getElementById("x").style.visibility = "visible";
+ document.body.style.color = "green";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/67752-1-ref.html b/layout/reftests/bugs/67752-1-ref.html
new file mode 100644
index 0000000000..f21044d0e3
--- /dev/null
+++ b/layout/reftests/bugs/67752-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { display: inline-block; width: 1em; height: 10px; background: green; }
+ </style>
+ </head>
+ <body style="position: relative; font-size: 20px">
+ Test
+ <div style="position: absolute; left: 0; width: 25px; height: 0; top: 0;">
+ <span></span>
+ <span></span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/67752-1.html b/layout/reftests/bugs/67752-1.html
new file mode 100644
index 0000000000..16487b7ff9
--- /dev/null
+++ b/layout/reftests/bugs/67752-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function f() {
+ document.body.style.fontSize = "20px";
+ // End the test asynchronously so we get a chance to do a reflow before
+ // that happens.
+ setTimeout("document.documentElement.className = ''", 0);
+ }
+ </script>
+ <style>
+ span { display: inline-block; width: 1em; height: 10px; background: green; }
+ </style>
+ </head>
+ <body onload="f()" style="position: relative; font-size: 10px">
+ Test
+ <div style="position: absolute; left: 0; width: 25px; height: 0; top: 0;">
+ <span></span>
+ <span></span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/67752-2-ref.html b/layout/reftests/bugs/67752-2-ref.html
new file mode 100644
index 0000000000..328e1a15b6
--- /dev/null
+++ b/layout/reftests/bugs/67752-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span { display: inline-block; width: 1em; height: 10px; background: green; }
+ </style>
+ </head>
+ <body style="font-size: 20px">
+ Test
+ <div style="position: absolute; left: 0; width: 25px; height: 0; top: 0;">
+ <span></span>
+ <span></span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/67752-2.html b/layout/reftests/bugs/67752-2.html
new file mode 100644
index 0000000000..52f63cccc4
--- /dev/null
+++ b/layout/reftests/bugs/67752-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function f() {
+ document.body.style.fontSize = "20px";
+ // End the test asynchronously so we get a chance to do a reflow before
+ // that happens.
+ setTimeout("document.documentElement.className = ''", 0);
+ }
+ </script>
+ <style>
+ span { display: inline-block; width: 1em; height: 10px; background: green; }
+ </style>
+ </head>
+ <body onload="f()" style="font-size: 10px">
+ Test
+ <div style="position: absolute; left: 0; width: 25px; height: 0; top: 0;">
+ <span></span>
+ <span></span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/68061-1-ref.xml b/layout/reftests/bugs/68061-1-ref.xml
new file mode 100644
index 0000000000..711d32b4df
--- /dev/null
+++ b/layout/reftests/bugs/68061-1-ref.xml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body bgcolor="#FFFFFF">
+
+<table border="1" bgcolor="green">
+<tbody>
+<tr>
+<td>Some text</td>
+<td>Some text</td>
+<td>Some text</td>
+</tr>
+</tbody>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/68061-1.xml b/layout/reftests/bugs/68061-1.xml
new file mode 100644
index 0000000000..3f78359972
--- /dev/null
+++ b/layout/reftests/bugs/68061-1.xml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body bgcolor="#FFFFFF">
+
+<table border="1" bgcolor="green">
+<tr>
+<td>Some text</td>
+<td>Some text</td>
+<td>Some text</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/68061-2-ref.xml b/layout/reftests/bugs/68061-2-ref.xml
new file mode 100644
index 0000000000..78dc8e21c6
--- /dev/null
+++ b/layout/reftests/bugs/68061-2-ref.xml
@@ -0,0 +1,21 @@
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <table border="1">
+ <tbody>
+ <tr>
+ <th>Division</th><th>Revenue</th><th>Growth</th><th>Bonus</th>
+ </tr>
+ <tr>
+ <td><em>North</em></td><td>10</td><td>9</td><td>7</td>
+ </tr>
+ <tr>
+ <td><em>West</em></td><td>6</td><td>-1.5</td><td>2</td>
+ </tr>
+ <tr>
+ <td><em>South</em></td><td>4</td><td>3</td><td>4</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/68061-2.xml b/layout/reftests/bugs/68061-2.xml
new file mode 100644
index 0000000000..2f9191d29e
--- /dev/null
+++ b/layout/reftests/bugs/68061-2.xml
@@ -0,0 +1,19 @@
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <table border="1">
+ <tr>
+ <th>Division</th><th>Revenue</th><th>Growth</th><th>Bonus</th>
+ </tr>
+ <tr>
+ <td><em>North</em></td><td>10</td><td>9</td><td>7</td>
+ </tr>
+ <tr>
+ <td><em>West</em></td><td>6</td><td>-1.5</td><td>2</td>
+ </tr>
+ <tr>
+ <td><em>South</em></td><td>4</td><td>3</td><td>4</td>
+ </tr>
+ </table>
+ </body>
+</html>
+
diff --git a/layout/reftests/bugs/690164-1-ref.html b/layout/reftests/bugs/690164-1-ref.html
new file mode 100644
index 0000000000..1b129917de
--- /dev/null
+++ b/layout/reftests/bugs/690164-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<ul>
+<li>
+<p>Test</p>
+</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/690164-1.html b/layout/reftests/bugs/690164-1.html
new file mode 100644
index 0000000000..5f784104a7
--- /dev/null
+++ b/layout/reftests/bugs/690164-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<ul>
+<li>
+<p style="display:none">Invisible</p>
+<p style="display:none">Invisible</p>
+<p>Test</p>
+</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/690643-1-ref.html b/layout/reftests/bugs/690643-1-ref.html
new file mode 100644
index 0000000000..bc077f0f9e
--- /dev/null
+++ b/layout/reftests/bugs/690643-1-ref.html
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ </head>
+<body>
+ <canvas id="canvas" width="300" height="300"></canvas>
+ <script type="application/javascript">
+ var canvas = document.getElementById("canvas");
+ var ctx = canvas.getContext("2d");
+
+ ctx.fillStyle = '#eeeeee';
+ ctx.strokeStyle = '#000000';
+
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.lineTo(50, 50);
+ ctx.lineTo(150, 100);
+
+ ctx.stroke();
+ ctx.fill();
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/690643-1.html b/layout/reftests/bugs/690643-1.html
new file mode 100644
index 0000000000..70852f957b
--- /dev/null
+++ b/layout/reftests/bugs/690643-1.html
@@ -0,0 +1,24 @@
+<html>
+ <head>
+ </head>
+<body>
+ <canvas id="canvas" width="300" height="300"></canvas>
+ <script type="application/javascript">
+ var canvas = document.getElementById("canvas");
+ var ctx = canvas.getContext("2d");
+
+ ctx.fillStyle = '#eeeeee';
+ ctx.strokeStyle = '#000000';
+
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.lineTo(50, 50);
+
+ ctx.translate(100, 100);
+ ctx.lineTo(50, 0);
+
+ ctx.stroke();
+ ctx.fill();
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/691087-1-ref.html b/layout/reftests/bugs/691087-1-ref.html
new file mode 100644
index 0000000000..c73d42af6a
--- /dev/null
+++ b/layout/reftests/bugs/691087-1-ref.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />
+<style>
+
+div.text_layer {
+ position:absolute;
+ top:0;
+ left:0;
+ transform:scale(0.200000);
+ transform-origin:top left;
+ -webkit-transform:scale(0.200000);
+ -webkit-transform-origin:top left;
+ -o-transform:scale(0.200000);
+ -o-transform-origin:top left;
+}
+
+span.a {
+ position:absolute;
+ left:0;
+}
+
+</style>
+</head>
+<body>
+
+<div class="text_layer">
+
+ <div style="font-size:153px">
+ <span class=a style="left:545px; top:585px;">ELENA VÃŽLCU</span>
+ </div>
+
+ <div style="font-size:117px">
+ <span class=a style="left:3116px; top:3757px;"> </span>
+ </div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/691087-1.html b/layout/reftests/bugs/691087-1.html
new file mode 100644
index 0000000000..41e2984df2
--- /dev/null
+++ b/layout/reftests/bugs/691087-1.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />
+<style>
+
+div.text_layer {
+ position:absolute;
+ top:0;
+ left:0;
+ transform:scale(0.200000);
+ transform-origin:top left;
+ -webkit-transform:scale(0.200000);
+ -webkit-transform-origin:top left;
+ -o-transform:scale(0.200000);
+ -o-transform-origin:top left;
+}
+
+span.a {
+ position:absolute;
+ left:0;
+}
+
+</style>
+</head>
+<body>
+
+<div class="text_layer">
+
+ <div style="font-size:153px">
+ <span class=a style="left:545px; top:585px;">ELENA VÃŽLCU</span>
+ </div>
+
+ <div style="font-size:117px">
+ <span class=a style="left:3116px; top:3757px;"> </span>
+ </div>
+
+ <div style="font-size:123px">
+ <span class=a style="left:813px;">Cadrul didactic trebuie să fie o călăuză care să</span>
+ </div>
+
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/691571-1-ref.html b/layout/reftests/bugs/691571-1-ref.html
new file mode 100644
index 0000000000..6952890846
--- /dev/null
+++ b/layout/reftests/bugs/691571-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id="A" width=200 height=50></canvas><br />
+<canvas id="B" width=200 height=50></canvas>
+<script>
+ var canvasA = document.getElementById("A"),
+ ctxA = canvasA.getContext('2d'),
+ canvasB = document.getElementById("B"),
+ ctxB = canvasB.getContext('2d'),
+ width = canvasA.width,
+ height = canvasA.height;
+
+ ctxB.fillStyle = 'red';
+ ctxB.fillRect(0, 0, width, height);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/691571-1.html b/layout/reftests/bugs/691571-1.html
new file mode 100644
index 0000000000..c2c1ae103d
--- /dev/null
+++ b/layout/reftests/bugs/691571-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id="A" width=200 height=50></canvas><br />
+<canvas id="B" width=200 height=50></canvas>
+<script>
+ var canvasA = document.getElementById("A"),
+ ctxA = canvasA.getContext('2d'),
+ canvasB = document.getElementById("B"),
+ ctxB = canvasB.getContext('2d'),
+ width = canvasA.width,
+ height = canvasA.height;
+
+ ctxA.fillStyle = 'red';
+ ctxA.fillRect(0, 0, width, height);
+ var pat = ctxB.createPattern(canvasA, "repeat");
+
+ ctxA.clearRect(0, 0, width, height);
+
+ ctxB.fillStyle = pat;
+ ctxB.fillRect(0, 0, width, height);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/696307-1-ref.html b/layout/reftests/bugs/696307-1-ref.html
new file mode 100644
index 0000000000..e773a90cba
--- /dev/null
+++ b/layout/reftests/bugs/696307-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html><body>
+<div style="float:left; width:200px;">X</div>
+<div style="float:left; background:rgba(0,0,0,0.5); width:210px;">Y</div>
+</body></html>
diff --git a/layout/reftests/bugs/696307-1.html b/layout/reftests/bugs/696307-1.html
new file mode 100644
index 0000000000..ca66165f7c
--- /dev/null
+++ b/layout/reftests/bugs/696307-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<html><body>
+<div style="column-count:3; column-gap:0; width:600px;">X<div style="float:left; background:rgba(0,0,0,0.5);"><div style="position:absolute;">Y</div><span style="padding-left:210px;"></span></div></div>
+</body></html>
diff --git a/layout/reftests/bugs/696739-1-ref.html b/layout/reftests/bugs/696739-1-ref.html
new file mode 100644
index 0000000000..1001d88b7d
--- /dev/null
+++ b/layout/reftests/bugs/696739-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+fieldset {
+ display: inline; background: rgba(255, 255, 0, 0.7); color: black;
+}
+div { background: green; position:relative; z-index:1; }
+div#one { float: left; }
+</style>
+</head>
+<body>
+ <form>
+ <fieldset>
+ <div id="one">I should be black text on a green background</div>
+ </fieldset>
+ <fieldset>
+ <div>I should be black text on a green background</div>
+ </fieldset>
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/696739-1.html b/layout/reftests/bugs/696739-1.html
new file mode 100644
index 0000000000..efc5c38d76
--- /dev/null
+++ b/layout/reftests/bugs/696739-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+fieldset {
+ display: inline; background: rgba(255, 255, 0, 0.7); color: black;
+}
+div { background: green; }
+div#one { float: left; }
+</style>
+</head>
+<body>
+ <form>
+ <fieldset>
+ <div id="one">I should be black text on a green background</div>
+ </fieldset>
+ <fieldset>
+ <div>I should be black text on a green background</div>
+ </fieldset>
+ </form>
+</body>
+</html>
diff --git a/layout/reftests/bugs/703186-1-ref.html b/layout/reftests/bugs/703186-1-ref.html
new file mode 100644
index 0000000000..418c401446
--- /dev/null
+++ b/layout/reftests/bugs/703186-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script type="text/javascript">
+ function init()
+ {
+ document.getElementById("link").focus();
+ setTimeout(finish, 0);
+ }
+
+ function finish()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="requestAnimationFrame(_ => setTimeout(init, 0));">
+ <img src="100x80-white-rect-top-right.png" usemap="#map">
+ <map name="map">
+ <area id="link" shape="rect" coords="10,10,30,30" href="about:blank">
+ </map>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/703186-1.html b/layout/reftests/bugs/703186-1.html
new file mode 100644
index 0000000000..424f190073
--- /dev/null
+++ b/layout/reftests/bugs/703186-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script type="text/javascript">
+ function init()
+ {
+ window.addEventListener("focus", function (e) { e.stopPropagation(); },
+ true);
+ document.getElementById("link").focus();
+ setTimeout(finish, 0);
+ }
+
+ function finish()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="requestAnimationFrame(_ => setTimeout(init, 0));">
+ <img src="100x80-white-rect-top-right.png" usemap="#map">
+ <map name="map">
+ <area id="link" shape="rect" coords="10,10,30,30" href="about:blank">
+ </map>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/703186-2-ref.html b/layout/reftests/bugs/703186-2-ref.html
new file mode 100644
index 0000000000..7a9ed8c804
--- /dev/null
+++ b/layout/reftests/bugs/703186-2-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script type="text/javascript">
+ function init()
+ {
+ document.getElementById("link").focus();
+ setTimeout(doTest, 0);
+ }
+
+ function doTest()
+ {
+ document.getElementById("link").blur();
+ setTimeout(finish, 0);
+ }
+
+ function finish()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="requestAnimationFrame(_ => setTimeout(init, 0));">
+ <img src="100x80-white-rect-top-right.png" usemap="#map">
+ <map name="map">
+ <area id="link" shape="rect" coords="10,10,30,30" href="about:blank">
+ </map>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/703186-2.html b/layout/reftests/bugs/703186-2.html
new file mode 100644
index 0000000000..9689ccddd5
--- /dev/null
+++ b/layout/reftests/bugs/703186-2.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script type="text/javascript">
+ function init()
+ {
+ window.addEventListener("blur", function (e) { e.stopPropagation(); },
+ true);
+ document.getElementById("link").focus();
+ setTimeout(doTest, 0);
+ }
+
+ function doTest()
+ {
+ document.getElementById("link").blur();
+ setTimeout(finish, 0);
+ }
+
+ function finish()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </head>
+ <body onload="requestAnimationFrame(_ => setTimeout(init, 0));">
+ <img src="100x80-white-rect-top-right.png" usemap="#map">
+ <map name="map">
+ <area id="link" shape="rect" coords="10,10,30,30" href="about:blank">
+ </map>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/711359-1-ref.html b/layout/reftests/bugs/711359-1-ref.html
new file mode 100644
index 0000000000..1c66a54dd3
--- /dev/null
+++ b/layout/reftests/bugs/711359-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<body>
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="reference">
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/711359-1.html b/layout/reftests/bugs/711359-1.html
new file mode 100644
index 0000000000..871d6c1793
--- /dev/null
+++ b/layout/reftests/bugs/711359-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <script>
+ var lastLang = "";
+ function LangSelect(aLang) {
+ var tbody = document.getElementById("l10ntbody");
+ var child = tbody.firstChild;
+ while (child) {
+ if (child.nodeType == Node.ELEMENT_NODE) {
+ if (aLang == "*" || aLang == child.getAttribute("language"))
+ child.removeAttribute("style");
+ else
+ child.setAttribute("style", "display: none");
+ }
+ child = child.nextSibling;
+ }
+ }
+</script>
+</head>
+
+<body onload="LangSelect('cs');">
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="l10ntbody">
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/712130-1-ref.html b/layout/reftests/bugs/712130-1-ref.html
new file mode 100644
index 0000000000..6d07ca0482
--- /dev/null
+++ b/layout/reftests/bugs/712130-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<link rel="stylesheet" href="nothing"><!-- Empty stylesheet to delay PresShell init -->
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
+<input type="text">
diff --git a/layout/reftests/bugs/712130-1.html b/layout/reftests/bugs/712130-1.html
new file mode 100644
index 0000000000..ffbc823093
--- /dev/null
+++ b/layout/reftests/bugs/712130-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<link rel="stylesheet" href="nothing"><!-- Empty stylesheet to delay PresShell init -->
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
diff --git a/layout/reftests/bugs/712130-2-ref.html b/layout/reftests/bugs/712130-2-ref.html
new file mode 100644
index 0000000000..919ac05704
--- /dev/null
+++ b/layout/reftests/bugs/712130-2-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
diff --git a/layout/reftests/bugs/712130-2.html b/layout/reftests/bugs/712130-2.html
new file mode 100644
index 0000000000..232bef4849
--- /dev/null
+++ b/layout/reftests/bugs/712130-2.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<link rel="stylesheet" href="nothing"><!-- Empty stylesheet to delay PresShell init -->
+<input type="text" autofocus="" onfocus="document.documentElement.removeAttribute('class')">
diff --git a/layout/reftests/bugs/712849-1-ref.html b/layout/reftests/bugs/712849-1-ref.html
new file mode 100644
index 0000000000..5c9c909f28
--- /dev/null
+++ b/layout/reftests/bugs/712849-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2" class="nix"><td >&nbsp;</td></tr>
+ <tr id="3" class="ref"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/712849-1.html b/layout/reftests/bugs/712849-1.html
new file mode 100644
index 0000000000..83b4c43405
--- /dev/null
+++ b/layout/reftests/bugs/712849-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+<script>
+
+function test ()
+{
+ document.getElementById ("2").className = "nix";
+ document.getElementById ("3").className = "ref";
+}
+</script>
+</head>
+<body onload="test()">
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2"><td >&nbsp;</td></tr>
+ <tr id="3"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/713856-dynamic.html b/layout/reftests/bugs/713856-dynamic.html
new file mode 100644
index 0000000000..e6bc13d88b
--- /dev/null
+++ b/layout/reftests/bugs/713856-dynamic.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<ul>
+<li id="blub">
+<p>Test</p>
+</li>
+</ul>
+<script>
+ document.getElementById('blub').firstChild.data = document.getElementById('blub').firstChild.data;
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/713856-ref.html b/layout/reftests/bugs/713856-ref.html
new file mode 100644
index 0000000000..4432612dcf
--- /dev/null
+++ b/layout/reftests/bugs/713856-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<ul>
+<li><p>Test</p>
+</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/713856-static.html b/layout/reftests/bugs/713856-static.html
new file mode 100644
index 0000000000..c5e7e4d1d3
--- /dev/null
+++ b/layout/reftests/bugs/713856-static.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<ul>
+<li><!--hello--> <!--hello--><p>Test</p>
+</li>
+</ul>
+</body>
+</html>
diff --git a/layout/reftests/bugs/714519-1-as.html b/layout/reftests/bugs/714519-1-as.html
new file mode 100644
index 0000000000..022e8f0bb1
--- /dev/null
+++ b/layout/reftests/bugs/714519-1-as.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<title>bug 714519: list numbering of nested vertical-align:top in almost standards mode</title>
+
+<style>
+ol {width: 30em; margin-top: 0 }
+span > span { vertical-align: top }
+</style>
+
+<ol>
+<li><span><span>Short line</span></span></li>
+<li><span><span>This is text that needs to wrap to more than one line to cause the list bullet to disappear</span></span></li>
+<li><span><span>Short line</span></span></li>
+</ol>
diff --git a/layout/reftests/bugs/714519-1-q.html b/layout/reftests/bugs/714519-1-q.html
new file mode 100644
index 0000000000..2c63db6edb
--- /dev/null
+++ b/layout/reftests/bugs/714519-1-q.html
@@ -0,0 +1,12 @@
+<title>bug 714519: list numbering of nested vertical-align:top in quirks mode</title>
+
+<style>
+ol {width: 30em; margin-top: 0 }
+span > span { vertical-align: top }
+</style>
+
+<ol>
+<li><span><span>Short line</span></span></li>
+<li><span><span>This is text that needs to wrap to more than one line to cause the list bullet to disappear</span></span></li>
+<li><span><span>Short line</span></span></li>
+</ol>
diff --git a/layout/reftests/bugs/714519-1-ref.html b/layout/reftests/bugs/714519-1-ref.html
new file mode 100644
index 0000000000..93d2440242
--- /dev/null
+++ b/layout/reftests/bugs/714519-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>bug 714519: list numbering of nested vertical-align:top (reference)</title>
+
+<style>
+ol {width: 30em; margin-top: 0 }
+</style>
+
+<ol>
+<li>Short line</li>
+<li>This is text that needs to wrap to more than one line to cause the list bullet to disappear</li>
+<li>Short line</li>
+</ol>
diff --git a/layout/reftests/bugs/714519-2-as.html b/layout/reftests/bugs/714519-2-as.html
new file mode 100644
index 0000000000..f4c2da5a96
--- /dev/null
+++ b/layout/reftests/bugs/714519-2-as.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<title>bug 714519: underline of nested vertical-align:top in almost standards mode</title>
+
+<style>
+div > span { text-decoration: underline }
+span { vertical-align: top }
+</style>
+
+<div><span><span>Short line</span></span></div>
diff --git a/layout/reftests/bugs/714519-2-q.html b/layout/reftests/bugs/714519-2-q.html
new file mode 100644
index 0000000000..f4e7bd6763
--- /dev/null
+++ b/layout/reftests/bugs/714519-2-q.html
@@ -0,0 +1,8 @@
+<title>bug 714519: underline of nested vertical-align:top in quirks mode</title>
+
+<style>
+div > span { text-decoration: underline }
+span { vertical-align: top }
+</style>
+
+<div><span><span>Short line</span></span></div>
diff --git a/layout/reftests/bugs/714519-2-ref.html b/layout/reftests/bugs/714519-2-ref.html
new file mode 100644
index 0000000000..e08aeeeb52
--- /dev/null
+++ b/layout/reftests/bugs/714519-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<title>bug 714519: underline of nested vertical-align:top in almost standards mode</title>
+
+<style>
+div { text-decoration: underline }
+</style>
+
+<div>Short line</div>
diff --git a/layout/reftests/bugs/718521-ref.html b/layout/reftests/bugs/718521-ref.html
new file mode 100644
index 0000000000..fe91af36b4
--- /dev/null
+++ b/layout/reftests/bugs/718521-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Rounded rectangle clipping test</title>
+<style>
+.clipround {
+ left:100px;
+ top:100px;
+ position:absolute;
+ width:700px;
+ height:380px;
+ overflow:hidden;
+ border-radius:45px;
+}
+.greendiv {
+ width:300px;
+ height:230px;
+ background-color:#00ff00;
+ position:absolute;
+}
+#nrcDiv0 {
+ left:0px;
+ top:0px;
+}
+#nrcDiv1 {
+ left:320px;
+ top:0px;
+}
+#nrcDiv2 {
+ left:0px;
+ top:240px;
+}
+</style>
+</head>
+
+<body>
+<div class="clipround">
+<div id="nrcDiv0" class="greendiv"></div>
+</div>
+<div class="clipround">
+<div id="nrcDiv1" class="greendiv"></div>
+</div>
+<div class="clipround">
+<div id="nrcDiv2" class="greendiv"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/718521.html b/layout/reftests/bugs/718521.html
new file mode 100644
index 0000000000..9f018676d8
--- /dev/null
+++ b/layout/reftests/bugs/718521.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Rounded rectangle clipping test</title>
+<style>
+.clipround {
+ left:100px;
+ top:100px;
+ position:absolute;
+ width:700px;
+ height:380px;
+ overflow:hidden;
+ border-radius:45px;
+}
+canvas {
+ position:absolute;
+}
+#nrcCanvas0 {
+ left:0px;
+ top:0px;
+}
+#nrcCanvas1 {
+ left:320px;
+ top:0px;
+}
+#nrcCanvas2 {
+ left:0px;
+ top:240px;
+}
+</style>
+</head>
+
+<body>
+<div class="clipround">
+<canvas id="nrcCanvas0" width="320" height="260"></canvas>
+<canvas id="nrcCanvas1" width="320" height="260"></canvas>
+<canvas id="nrcCanvas2" width="320" height="260"></canvas>
+</div>
+
+<script>
+ drawShapes('nrcCanvas0');
+ drawShapes('nrcCanvas1');
+ drawShapes('nrcCanvas2');
+
+ function drawShapes(elName) {
+ var ctxt = document.getElementById(elName).getContext('2d');
+ ctxt.fillStyle = '#00ff00';
+ ctxt.fillRect(0, 0, 300, 230);
+ }
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/720987-ref.html b/layout/reftests/bugs/720987-ref.html
new file mode 100644
index 0000000000..39b5fbf2e9
--- /dev/null
+++ b/layout/reftests/bugs/720987-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html><body style="padding:100px;">
+<a href="foo" style="outline:1px solid black">a</a>
+</body>
+</html>
diff --git a/layout/reftests/bugs/720987.html b/layout/reftests/bugs/720987.html
new file mode 100644
index 0000000000..c2a85a4324
--- /dev/null
+++ b/layout/reftests/bugs/720987.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<script>
+function doTest() {
+ var e = document.getElementById('a');
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ e.style.outline = ""; document.body.getClientRects();
+ e.style.outline = "1px solid black"; document.body.getClientRects();
+ document.documentElement.removeAttribute("class");
+}
+</script>
+</head>
+<body style="padding:100px;">
+<a id="a" href="foo">a</a>
+<script>
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/722888-1-ref.html b/layout/reftests/bugs/722888-1-ref.html
new file mode 100644
index 0000000000..5e816fba40
--- /dev/null
+++ b/layout/reftests/bugs/722888-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="column-count: 2;
+ height: 50px;
+ width: 100px;
+ background: yellow">
+ a
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/722888-1.html b/layout/reftests/bugs/722888-1.html
new file mode 100644
index 0000000000..a94078eebb
--- /dev/null
+++ b/layout/reftests/bugs/722888-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function tweak() {
+ var b = document.getElementsByTagName("span")[0];
+ b.remove();
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", tweak);
+ </script>
+ </head>
+ <body>
+ <div style="column-count: 2;
+ height: 50px;
+ width: 100px;
+ background: yellow">
+ <span>0 1 2 3 4 5 6 7 8 9 0</span>a
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/722923-1-ref.html b/layout/reftests/bugs/722923-1-ref.html
new file mode 100644
index 0000000000..911c64102c
--- /dev/null
+++ b/layout/reftests/bugs/722923-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<div id="d" style="opacity:0.9; position:absolute; top:100px; width:200px; height:200px; background:lime"></div>
+<script>
+var d = document.getElementById("d");
+
+function doTest() {
+ d.style.opacity = 0.8;
+ setTimeout(function() {
+ d.style.opacity = 0.5;
+ document.documentElement.removeAttribute("class");
+ }, 50);
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/722923-1.html b/layout/reftests/bugs/722923-1.html
new file mode 100644
index 0000000000..f7315f71b2
--- /dev/null
+++ b/layout/reftests/bugs/722923-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<div id="d" style="opacity:0.9; height:10px;">
+ <div style="position:absolute; top:100px; width:200px; height:200px; background:lime"></div>
+</div>
+<script>
+var d = document.getElementById("d");
+
+function doTest() {
+ d.style.opacity = 0.8;
+ setTimeout(function() {
+ d.style.opacity = 0.5;
+ document.documentElement.removeAttribute("class");
+ }, 50);
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/723484-1-ref.html b/layout/reftests/bugs/723484-1-ref.html
new file mode 100644
index 0000000000..124ee0cde0
--- /dev/null
+++ b/layout/reftests/bugs/723484-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:yellow;">
+<img style="opacity:0.001" src="repeatable-diagonal-gradient.png">
+</body>
+</html>
diff --git a/layout/reftests/bugs/723484-1.html b/layout/reftests/bugs/723484-1.html
new file mode 100644
index 0000000000..f2146f6e93
--- /dev/null
+++ b/layout/reftests/bugs/723484-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body style="background:yellow;">
+<img id="i" src="repeatable-diagonal-gradient.png">
+<script>
+function doTest() {
+ document.getElementById("i").style.opacity = 0.001;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/728983-1-ref.html b/layout/reftests/bugs/728983-1-ref.html
new file mode 100644
index 0000000000..31d069262a
--- /dev/null
+++ b/layout/reftests/bugs/728983-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div style="column-count:2; width:300px; height:100px;">
+ <div id="o" style="opacity:0.5; width:100px; height:200px; background:lime;">
+ <div id="d" style="height:50px; width:80px; background:green; padding:2px">Text</div>
+ </div>
+</div>
+<script>
+var o = document.getElementById("o");
+var d = document.getElementById("d");
+document.body.getBoundingClientRect();
+o.style.opacity = 0.8;
+function doTest() {
+ o.style.opacity = 0.9;
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/728983-1.html b/layout/reftests/bugs/728983-1.html
new file mode 100644
index 0000000000..ab4515b870
--- /dev/null
+++ b/layout/reftests/bugs/728983-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div style="column-count:2; width:300px; height:100px;">
+ <div id="o" style="opacity:0.5; width:100px; height:200px; background:lime;">
+ <div id="d" style="height:50px; width:80px; background:red; padding:2px">Text</div>
+ </div>
+</div>
+<script>
+var o = document.getElementById("o");
+var d = document.getElementById("d");
+document.body.getBoundingClientRect();
+o.style.opacity = 0.8;
+function doTest() {
+ o.style.opacity = 0.9;
+ document.body.getBoundingClientRect();
+ d.style.background = "green";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/729143-1-ref.html b/layout/reftests/bugs/729143-1-ref.html
new file mode 100644
index 0000000000..d9a9b752de
--- /dev/null
+++ b/layout/reftests/bugs/729143-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table style="width: 100px; height: 100px;">
+ <tbody style="height: 100%;">
+ <tr style="height: 100%">
+ <td style="height: 100%;">
+ <div style="height: 100%; width: 100%;overflow:scroll;">
+ <div style="height: 200px">
+ </div>
+ Some text
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/729143-1.html b/layout/reftests/bugs/729143-1.html
new file mode 100644
index 0000000000..359a947e11
--- /dev/null
+++ b/layout/reftests/bugs/729143-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table style="width: 100px; height: 100px;">
+ <tbody style="height: 100%;"> <!-- required for older ffox versions -->
+ <tr>
+ <td style="height: 100%;">
+ <div style="height: 100%; width: 100%;overflow:scroll;">
+ <div style="height: 200px">
+ </div>
+ Some text
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/731521-1-ref.html b/layout/reftests/bugs/731521-1-ref.html
new file mode 100644
index 0000000000..841b6706f4
--- /dev/null
+++ b/layout/reftests/bugs/731521-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<body style="border-style: solid;"></body>
+</html>
diff --git a/layout/reftests/bugs/731521-1.html b/layout/reftests/bugs/731521-1.html
new file mode 100644
index 0000000000..901d8ec8ba
--- /dev/null
+++ b/layout/reftests/bugs/731521-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<html style="border-width: 0px;">
+<body style="border-style: inherit;" onload="document.documentElement.offsetHeight; document.documentElement.style.borderStyle='solid';"></body>
+</html>
diff --git a/layout/reftests/bugs/731726-1-ref.html b/layout/reftests/bugs/731726-1-ref.html
new file mode 100644
index 0000000000..34a58f1a9e
--- /dev/null
+++ b/layout/reftests/bugs/731726-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <style type="text/css">input{border: none}</style>
+</head>
+<body>
+ <input id="button2" type="button"/>
+ <div id="target"><div><input id="button" type="button"/></div></div>
+<script>
+document.getElementById("button2").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/731726-1.html b/layout/reftests/bugs/731726-1.html
new file mode 100644
index 0000000000..a016e62ae8
--- /dev/null
+++ b/layout/reftests/bugs/731726-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <style type="text/css">input{border: none}</style>
+</head>
+<body>
+ <div><input id="button" type="button"/></div>
+ <input id="button2" type="button"/>
+ <div id="target"/>
+<script>
+var button = document.getElementById("button");
+button.focus();
+document.getElementById("target").appendChild(button.parentNode);
+document.getElementById("button2").focus();
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/735481-1-ref.html b/layout/reftests/bugs/735481-1-ref.html
new file mode 100644
index 0000000000..058bee68d7
--- /dev/null
+++ b/layout/reftests/bugs/735481-1-ref.html
@@ -0,0 +1,10 @@
+<!-- This test is intentionally in quirks mode -->
+<style>
+ div { color: green; }
+</style>
+<div>
+ <div>This text should be green</div>
+</div>
+<div>
+ <div>This text should be green</div>
+</div>
diff --git a/layout/reftests/bugs/735481-1.html b/layout/reftests/bugs/735481-1.html
new file mode 100644
index 0000000000..e75fa8a7d8
--- /dev/null
+++ b/layout/reftests/bugs/735481-1.html
@@ -0,0 +1,12 @@
+<!-- This test is intentionally in quirks mode -->
+<style>
+ div { color: red; }
+ .TEST1 div { color: green; }
+ #TEST2 div { color: green; }
+</style>
+<div class="test1">
+ <div>This text should be green</div>
+</div>
+<div id="test2">
+ <div>This text should be green</div>
+</div>
diff --git a/layout/reftests/bugs/745934-1-ref.html b/layout/reftests/bugs/745934-1-ref.html
new file mode 100644
index 0000000000..c204fb9164
--- /dev/null
+++ b/layout/reftests/bugs/745934-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div {
+ position: absolute;
+ top: 0; left: 0;
+ width: 600px;
+ height: 500px;
+ background: yellow;
+ opacity: 0.3;
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/745934-1.html b/layout/reftests/bugs/745934-1.html
new file mode 100644
index 0000000000..c82c51026f
--- /dev/null
+++ b/layout/reftests/bugs/745934-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+div {
+ position: absolute;
+ top: 200px; left: 200px;
+ width: 600px;
+ height: 500px;
+ background: yellow;
+ opacity: 0.3;
+ transform-style: preserve-3d;
+ -webkit-transform-style: preserve-3d;
+ transform-style: preserve-3d;
+ transform: translate(-200px, -200px);
+ -webkit-transform: translate(-200px, -200px);
+ transform: translate(-200px, -200px);
+}
+</style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/748692-1-ref.html b/layout/reftests/bugs/748692-1-ref.html
new file mode 100644
index 0000000000..2276bf1481
--- /dev/null
+++ b/layout/reftests/bugs/748692-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ body { color: green; }
+ </style>
+</head>
+<body>
+ This text should be green
+</body>
diff --git a/layout/reftests/bugs/748692-1a.html b/layout/reftests/bugs/748692-1a.html
new file mode 100644
index 0000000000..9e07d09c23
--- /dev/null
+++ b/layout/reftests/bugs/748692-1a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<head>
+ <style>
+ body { color: red; }
+ </style>
+ <script>
+ document.styleSheets[0].insertRule("body { color: green; }", 1);
+ document.querySelector("style").className = "foo";
+ </script>
+</head>
+<body>
+ This text should be green
+</body>
diff --git a/layout/reftests/bugs/748692-1b.html b/layout/reftests/bugs/748692-1b.html
new file mode 100644
index 0000000000..6e017694bc
--- /dev/null
+++ b/layout/reftests/bugs/748692-1b.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<head>
+ <style class="foo">
+ body { color: red; }
+ </style>
+ <script>
+ document.styleSheets[0].insertRule("body { color: green; }", 1);
+ document.querySelector("style").removeAttribute("class");
+ </script>
+</head>
+<body>
+ This text should be green
+</body>
diff --git a/layout/reftests/bugs/748803-1-ref.html b/layout/reftests/bugs/748803-1-ref.html
new file mode 100644
index 0000000000..6dc5198299
--- /dev/null
+++ b/layout/reftests/bugs/748803-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html style="height: 100%;">
+ <body style="height: 100%;">
+ <!-- Make sure the div forces the frame off the screen by default -->
+ <div style="height: 200%"></div>
+ <iframe></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/748803-1.html b/layout/reftests/bugs/748803-1.html
new file mode 100644
index 0000000000..c20235dfc5
--- /dev/null
+++ b/layout/reftests/bugs/748803-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html style="height: 100%;">
+ <body style="height: 100%;">
+ <!-- Make sure the div forces the frame off the screen by default -->
+ <div style="height: 200%"></div>
+ <iframe src="about:neterror"></iframe>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/750551-1-ref.html b/layout/reftests/bugs/750551-1-ref.html
new file mode 100644
index 0000000000..1e9774967f
--- /dev/null
+++ b/layout/reftests/bugs/750551-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body dir="ltr">
+<p>1
+<p>2
+<p>3
+<style>
+body {
+ display: -moz-box;
+ -moz-box-orient: vertical;
+}
+</style>
+</body>
+</html>
diff --git a/layout/reftests/bugs/750551-1.html b/layout/reftests/bugs/750551-1.html
new file mode 100644
index 0000000000..fc7fc6f39f
--- /dev/null
+++ b/layout/reftests/bugs/750551-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<body dir="rtl">
+<p>1
+<p>2
+<p>3
+<style>
+body {
+ display: -moz-box;
+ -moz-box-orient: vertical;
+ text-align: left;
+}
+</style>
+</body>
+</html>
diff --git a/layout/reftests/bugs/751012-1-ref.html b/layout/reftests/bugs/751012-1-ref.html
new file mode 100644
index 0000000000..41e85be41e
--- /dev/null
+++ b/layout/reftests/bugs/751012-1-ref.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<body style="position: relative">
+ <div id="container" style="position: relative; height: 300px">
+ <div style="position:absolute; top: 0; left: 0">
+ <textarea rows="6">
+ You should be seeing the "Should see me" text.
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+ u
+ Should see me.
+ </textarea>
+ </div>
+ </div>
+ <script>
+ var textarea = document.querySelector("textarea");
+ textarea.scrollTop = textarea.scrollHeight
+ document.getElementById("container").style.overflow = "hidden";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/751012-1a.html b/layout/reftests/bugs/751012-1a.html
new file mode 100644
index 0000000000..2d69231b52
--- /dev/null
+++ b/layout/reftests/bugs/751012-1a.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<body style="position: relative">
+ <div id="container" style="height: 300px">
+ <div style="position:absolute; top: 0; left: 0">
+ <textarea rows="6">
+ You should be seeing the "Should see me" text.
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+ u
+ Should see me.
+ </textarea>
+ </div>
+ </div>
+ <script>
+ var textarea = document.querySelector("textarea");
+ textarea.scrollTop = textarea.scrollHeight
+ document.getElementById("container").style.overflow = "hidden";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/751012-1b.html b/layout/reftests/bugs/751012-1b.html
new file mode 100644
index 0000000000..b0c7044bdf
--- /dev/null
+++ b/layout/reftests/bugs/751012-1b.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<body style="position: relative;">
+ <div style="column-count: 2; height: 300px">
+ <div id="container" style="height: 600px">
+ <!-- Make sure the abs-pos div's placeholder is not in the first continuation -->
+ <div style="height: 400px"></div>
+ <div style="position:absolute; top: 0; left: 0">
+ <textarea rows="6">
+ You should be seeing the "Should see me" text.
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+ u
+ Should see me.
+ </textarea>
+ </div>
+ </div>
+ </div>
+ <script>
+ var textarea = document.querySelector("textarea");
+ textarea.scrollTop = textarea.scrollHeight
+ document.getElementById("container").style.overflow = "hidden";
+ </script>
+</body>
diff --git a/layout/reftests/bugs/753329-1.html b/layout/reftests/bugs/753329-1.html
new file mode 100644
index 0000000000..1421e5d5b6
--- /dev/null
+++ b/layout/reftests/bugs/753329-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html style="overflow:hidden" class="reftest-wait"
+ reftest-displayport-w="800" reftest-displayport-h="2000">
+<body>
+<div id="x" style="position:absolute; width:400px; height:400px; background:red;">
+You should not see any red
+</div>
+<script>
+function doTest() {
+ document.getElementById('x').style.visibility = 'hidden';
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/758561-1-ref.html b/layout/reftests/bugs/758561-1-ref.html
new file mode 100644
index 0000000000..0b4b4ba3be
--- /dev/null
+++ b/layout/reftests/bugs/758561-1-ref.html
@@ -0,0 +1 @@
+<!doctype html> <html> <body> </body> </html>
diff --git a/layout/reftests/bugs/758561-1.html b/layout/reftests/bugs/758561-1.html
new file mode 100644
index 0000000000..c9e0e53661
--- /dev/null
+++ b/layout/reftests/bugs/758561-1.html
@@ -0,0 +1 @@
+<!doctype html> <html> <body> <iframe style="border-radius: 10px;border-style: none; transform-style: preserve-3d"> </body> </html>
diff --git a/layout/reftests/bugs/759036-1-ref.html b/layout/reftests/bugs/759036-1-ref.html
new file mode 100644
index 0000000000..8c6bbe68ec
--- /dev/null
+++ b/layout/reftests/bugs/759036-1-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+ <style>
+ #container {
+ height: 300px;
+ width: 300px;
+ overflow:hidden;
+ border-radius:30px;
+ }
+ #inner {
+ width: 380px;
+ height: 260px;
+ background-color: #66ff66;
+ }
+ </style>
+</head>
+<body>
+ <div id="container">
+ <div id="inner">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/759036-1.html b/layout/reftests/bugs/759036-1.html
new file mode 100644
index 0000000000..851f9c7670
--- /dev/null
+++ b/layout/reftests/bugs/759036-1.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+ <style>
+ #container {
+ height: 300px;
+ width: 300px;
+ overflow:hidden;
+ border-radius:30px;
+ opacity: 0.6;
+ }
+ #inner {
+ width: 380px;
+ height: 260px;
+ background-color: #00ff00;
+ }
+ </style>
+</head>
+<body>
+ <div id="container">
+ <div id="inner">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/759036-2-ref.html b/layout/reftests/bugs/759036-2-ref.html
new file mode 100644
index 0000000000..d7adc930c6
--- /dev/null
+++ b/layout/reftests/bugs/759036-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.clipround {
+ width:250px;
+ overflow:hidden;
+ transform: translateX(300px);
+ border-radius:35px;
+ opacity:0.5;
+}
+</style>
+</head>
+<body>
+<img src="mozilla-banner.gif" class="clipround">
+</body>
+</html>
diff --git a/layout/reftests/bugs/759036-2.html b/layout/reftests/bugs/759036-2.html
new file mode 100644
index 0000000000..38f454ddcf
--- /dev/null
+++ b/layout/reftests/bugs/759036-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.clipround {
+ width:250px;
+ overflow:hidden;
+ transform: translateX(300px);
+ border-radius:35px;
+}
+</style>
+</head>
+<body>
+<img src="mozilla-banner-opacity.gif" class="clipround">
+</body>
+</html>
diff --git a/layout/reftests/bugs/76331-1-ref.html b/layout/reftests/bugs/76331-1-ref.html
new file mode 100644
index 0000000000..7a8c26b943
--- /dev/null
+++ b/layout/reftests/bugs/76331-1-ref.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<head><title>bug 76311 table empty-cells:hide</title>
+<style>
+table {
+ empty-cells:show;
+ background-color:red;
+ padding:0;
+ border-spacing:0;
+}
+
+td {
+ background-color:green;
+ padding:0;
+ color:green;
+}
+
+</style>
+</head>
+
+<body>
+ <!-- empty elements should be marked as empty-->
+ <table class="empty">
+ <tr><td class="empty"></td><td>X</td></tr>
+ <tr><td>X</td><td class="empty"></td></tr>
+ </table>
+ <!-- collapsed whitespace: space + CR should be marked as empty-->
+ <table class="empty">
+ <tr><td class="empty"> </td><td>X</td></tr>
+ <tr><td>X</td><td class="empty">
+
+
+ </td></tr>
+ </table>
+ <!-- not collapsed whitespace: space + tab should not be marked as empty-->
+ <table style="white-space: pre">
+ <tr><td> </td><td>X</td></tr>
+ <tr><td>X</td><td> </td></tr>
+ </table>
+
+
+ <!-- div with whitespace, empty span - should not be marked as empty -->
+ <table>
+ <tr><td><div> </div></td><td>X</td></tr>
+ <tr><td>X</td><td><span></span></td></tr>
+ </table>
+
+ <!--float empty or not should not be marked as empty -->
+ <table>
+ <tr><td><div style="float:left;">X</div></td><td>X</td></tr>
+ <tr><td>X</td><td><div style="float:left;"></div></td></tr>
+ </table>
+
+ <!-- position:fixed and position:absolute - both should be marked as empty -->
+ <table class="empty">
+ <tr><td class="empty"><div style="position:fixed; left: 30px;">X</div></td><td>X</td></tr>
+ <tr><td>X</td><td class="empty"><div style="position:absolute; left: 30px;">X</div></td></tr>
+ </table>
+ <!-- font size 0 makes textframes with no extent -->
+ <table>
+ <tr><td style="font-size:0">xxxx</td><td>X</td></tr>
+ <tr><td>X</td><td><img src="" style="width:0; height:0"></td></tr>
+ </table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/76331-1.html b/layout/reftests/bugs/76331-1.html
new file mode 100644
index 0000000000..fe99b67041
--- /dev/null
+++ b/layout/reftests/bugs/76331-1.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<head><title>bug 76311 table empty-cells:hide</title>
+<style>
+table {
+ empty-cells:hide;
+ background-color:red;
+ padding:0;
+ border-spacing:0;
+}
+table.empty {
+ background-color:green;
+}
+td {
+ background-color:green;
+ padding:0;
+ color:green;
+}
+td.empty {
+ background-color:red;
+}
+</style>
+</head>
+
+<body>
+ <!-- empty elements should be marked as empty-->
+ <table class="empty">
+ <tr><td class="empty"></td><td>X</td></tr>
+ <tr><td>X</td><td class="empty"></td></tr>
+ </table>
+ <!-- collapsed whitespace: space + CR should be marked as empty-->
+ <table class="empty">
+ <tr><td class="empty"> </td><td>X</td></tr>
+ <tr><td>X</td><td class="empty">
+
+
+ </td></tr>
+ </table>
+ <!-- not collapsed whitespace: space + tab should not be marked as empty-->
+ <table style="white-space: pre">
+ <tr><td> </td><td>X</td></tr>
+ <tr><td>X</td><td> </td></tr>
+ </table>
+
+
+ <!-- div with whitespace, empty span - should not be marked as empty -->
+ <table>
+ <tr><td><div> </div></td><td>X</td></tr>
+ <tr><td>X</td><td><span></span></td></tr>
+ </table>
+
+ <!--float empty or not should not be marked as empty -->
+ <table>
+ <tr><td><div style="float:left;">X</div></td><td>X</td></tr>
+ <tr><td>X</td><td><div style="float:left;"></div></td></tr>
+ </table>
+
+ <!-- position:fixed and position:absolute - both should be marked as empty -->
+ <table class="empty">
+ <tr><td class="empty"><div style="position:fixed; left: 30px;">X</div></td><td>X</td></tr>
+ <tr><td>X</td><td class="empty"><div style="position:absolute; left: 30px;">X</div></td></tr>
+ </table>
+ <!-- font size 0 makes textframes with no extent -->
+ <table>
+ <tr><td style="font-size:0">xxxx</td><td>X</td></tr>
+ <tr><td>X</td><td><img src="" style="width:0; height:0"></td></tr>
+ </table>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-1-ref.html b/layout/reftests/bugs/776265-1-ref.html
new file mode 100644
index 0000000000..2ab4ad8e6e
--- /dev/null
+++ b/layout/reftests/bugs/776265-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 40px;
+ width: 40px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/776265-1a.html b/layout/reftests/bugs/776265-1a.html
new file mode 100644
index 0000000000..a22867dc10
--- /dev/null
+++ b/layout/reftests/bugs/776265-1a.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks min-height with box-sizing: border-box</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 40px;
+ width: 50px;
+ min-height: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+ box-sizing: border-box;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-1b.html b/layout/reftests/bugs/776265-1b.html
new file mode 100644
index 0000000000..c99f00dc32
--- /dev/null
+++ b/layout/reftests/bugs/776265-1b.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 checks max-height with box-sizing: border-box</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 70px;
+ width: 50px;
+ max-height: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+ box-sizing: border-box;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-1c.html b/layout/reftests/bugs/776265-1c.html
new file mode 100644
index 0000000000..9f956b130c
--- /dev/null
+++ b/layout/reftests/bugs/776265-1c.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks min-width with box-sizing: border-box</title>
+<style type="text/css">
+textarea {
+ float: left;
+ width: 40px;
+ height: 50px;
+ min-width: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+ box-sizing: border-box;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-1d.html b/layout/reftests/bugs/776265-1d.html
new file mode 100644
index 0000000000..b6ade16928
--- /dev/null
+++ b/layout/reftests/bugs/776265-1d.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks max-width with box-sizing: border-box</title>
+<style type="text/css">
+textarea {
+ float: left;
+ width: 70px;
+ height: 50px;
+ max-width: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+ box-sizing: border-box;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-2-ref.html b/layout/reftests/bugs/776265-2-ref.html
new file mode 100644
index 0000000000..79c2f63b3a
--- /dev/null
+++ b/layout/reftests/bugs/776265-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 50px;
+ width: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-2a.html b/layout/reftests/bugs/776265-2a.html
new file mode 100644
index 0000000000..760796fe2d
--- /dev/null
+++ b/layout/reftests/bugs/776265-2a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks min-height</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 30px;
+ width: 50px;
+ min-height: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-2b.html b/layout/reftests/bugs/776265-2b.html
new file mode 100644
index 0000000000..7a741ebc33
--- /dev/null
+++ b/layout/reftests/bugs/776265-2b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks max-height</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 70px;
+ width: 50px;
+ max-height: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-2c.html b/layout/reftests/bugs/776265-2c.html
new file mode 100644
index 0000000000..34736ff31d
--- /dev/null
+++ b/layout/reftests/bugs/776265-2c.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks min-width</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 50px;
+ width: 30px;
+ min-width: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776265-2d.html b/layout/reftests/bugs/776265-2d.html
new file mode 100644
index 0000000000..b092bdf30a
--- /dev/null
+++ b/layout/reftests/bugs/776265-2d.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase for bug 776265 - checks max-width</title>
+<style type="text/css">
+textarea {
+ float: left;
+ height: 50px;
+ width: 70px;
+ max-width: 50px;
+ border: 1px solid #aaa;
+ padding: 4px;
+}
+</style>
+</head>
+<body><textarea></textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/776443-1-ref.html b/layout/reftests/bugs/776443-1-ref.html
new file mode 100644
index 0000000000..b9d60104b6
--- /dev/null
+++ b/layout/reftests/bugs/776443-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+ table { background: yellow; }
+ td { height: 50px; }
+</style>
+<table><tr><td>Should be 50px tall</td></tr></table>
+
diff --git a/layout/reftests/bugs/776443-1.html b/layout/reftests/bugs/776443-1.html
new file mode 100644
index 0000000000..0d3cbe3062
--- /dev/null
+++ b/layout/reftests/bugs/776443-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<style>
+ table { background: yellow; }
+ td { height: calc(25px + 25px); }
+</style>
+<table><tr><td>Should be 50px tall</td></tr></table>
diff --git a/layout/reftests/bugs/776443-2-ref.html b/layout/reftests/bugs/776443-2-ref.html
new file mode 100644
index 0000000000..285098e2d7
--- /dev/null
+++ b/layout/reftests/bugs/776443-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<style>
+ table { background: yellow; }
+ td { width: 500px; }
+</style>
+<table><tr><td>Should be 500px wide</td></tr></table>
diff --git a/layout/reftests/bugs/776443-2.html b/layout/reftests/bugs/776443-2.html
new file mode 100644
index 0000000000..f02bff10a9
--- /dev/null
+++ b/layout/reftests/bugs/776443-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<style>
+ table { background: yellow; }
+ td { width: calc(250px + 250px); }
+</style>
+<table><tr><td>Should be 500px wide</td></tr></table>
diff --git a/layout/reftests/bugs/786254-1-ref.html b/layout/reftests/bugs/786254-1-ref.html
new file mode 100644
index 0000000000..03f6e2fbd9
--- /dev/null
+++ b/layout/reftests/bugs/786254-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+<div style="margin-left: 0.5px; width: 12px; height: 26px; background: red;"><div style="width: 12px; height: 26px; background: lime;"></div></div>
+</body>
diff --git a/layout/reftests/bugs/786254-1.html b/layout/reftests/bugs/786254-1.html
new file mode 100644
index 0000000000..d9a403728e
--- /dev/null
+++ b/layout/reftests/bugs/786254-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<body>
+<div style="margin-left: 0.5px; width: 12px; height: 26px; background: red;"><div style="width: 12px; height: 26px; background: lime; clip-path: url(#clip-path);"></div></div>
+<svg height="0"><clipPath id="clip-path"><rect x="0" y="0" width="12" height="26"/></clipPath></svg>
+</body>
diff --git a/layout/reftests/bugs/787947-1-ref.html b/layout/reftests/bugs/787947-1-ref.html
new file mode 100644
index 0000000000..22e5afad24
--- /dev/null
+++ b/layout/reftests/bugs/787947-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<body style="background:white;">
+<div style="position:absolute; left:10px; top:10px; width:100px; height:100px; border:1px solid black;"></div>
+<p style="position:absolute; left:10px; z-index:2">Hello
diff --git a/layout/reftests/bugs/787947-1.html b/layout/reftests/bugs/787947-1.html
new file mode 100644
index 0000000000..d10dcd71d7
--- /dev/null
+++ b/layout/reftests/bugs/787947-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<body style="background:white;">
+<div style="position:absolute; left:10px; top:10px; width:100px; height:100px; border:1px solid black; background-image:linear-gradient(30deg, white, rgba(255,255,255,0)); background-size:0.3px 100px;"></div>
+<p style="position:absolute; left:10px; z-index:2">Hello
diff --git a/layout/reftests/bugs/796847-1-ref.svg b/layout/reftests/bugs/796847-1-ref.svg
new file mode 100644
index 0000000000..f14279fb8b
--- /dev/null
+++ b/layout/reftests/bugs/796847-1-ref.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <filter id="f" x="0" y="0" width="100%" height="100%">
+ <feGaussianBlur in="SourceGraphic" stdDeviation="0.1"/>
+ </filter>
+ <g filter="url(#f)">
+ <rect x="0" y="0" width="100" height="100" style="fill: lime;"/>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/796847-1.svg b/layout/reftests/bugs/796847-1.svg
new file mode 100644
index 0000000000..d040f2929e
--- /dev/null
+++ b/layout/reftests/bugs/796847-1.svg
@@ -0,0 +1,25 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="reftest-wait">
+ <title>Test that the area that's covered by a filtered element is invalidated when content inside it changes</title>
+ <filter id="f" x="0" y="0" width="100%" height="100%">
+ <feGaussianBlur in="SourceGraphic" stdDeviation="0.1"/>
+ </filter>
+ <script type="text/javascript">//<![CDATA[
+
+function doTest()
+{
+ var e = document.getElementsByTagName("rect")[0];
+ e.style.fill = "lime";
+ document.documentElement.removeAttribute('class');
+}
+
+document.addEventListener("MozReftestInvalidate", doTest, false);
+
+ //]]></script>
+ <g filter="url(#f)">
+ <rect x="0" y="0" width="100" height="100" style="fill: red;"/>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/797797-1-ref.html b/layout/reftests/bugs/797797-1-ref.html
new file mode 100644
index 0000000000..60e388c69f
--- /dev/null
+++ b/layout/reftests/bugs/797797-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="font-size:40px; color:rgba(0,0,0,0.5)">bash</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/797797-1.html b/layout/reftests/bugs/797797-1.html
new file mode 100644
index 0000000000..568e98fe34
--- /dev/null
+++ b/layout/reftests/bugs/797797-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="font-size:40px; opacity:.5;">bash</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/797797-2-ref.html b/layout/reftests/bugs/797797-2-ref.html
new file mode 100644
index 0000000000..0d3cb5bd41
--- /dev/null
+++ b/layout/reftests/bugs/797797-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="color:rgba(0,0,0,0.5)">youtube</div>
+<div style="color:rgba(0,0,0,0.5)">bash</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/797797-2.html b/layout/reftests/bugs/797797-2.html
new file mode 100644
index 0000000000..c19d515bf3
--- /dev/null
+++ b/layout/reftests/bugs/797797-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div style="opacity:0.5; color:black">youtube</div>
+<div style="opacity:0.5; color:black">bash</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/801994-1-ref.html b/layout/reftests/bugs/801994-1-ref.html
new file mode 100644
index 0000000000..72645c67fc
--- /dev/null
+++ b/layout/reftests/bugs/801994-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="height: 200px; float: left; background: green">
+ <img style="height: 120px; opacity: 0.5;" src="solidblue.png">
+</div>
diff --git a/layout/reftests/bugs/801994-1.html b/layout/reftests/bugs/801994-1.html
new file mode 100644
index 0000000000..53d7a7dff7
--- /dev/null
+++ b/layout/reftests/bugs/801994-1.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="height: 200px; float: left; background: green">
+ <img style="height: calc(50% + 20px); opacity: 0.5;" src="solidblue.png">
+</div>
diff --git a/layout/reftests/bugs/804323-1-ref.html b/layout/reftests/bugs/804323-1-ref.html
new file mode 100644
index 0000000000..2608b19c12
--- /dev/null
+++ b/layout/reftests/bugs/804323-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body { margin:0; padding:0; overflow:hidden; }
+#new {
+ position: absolute;
+ left: 200px;
+ top: 100px;
+ width: 100px;
+ height: 100px;
+ background: yellow;
+}
+</style>
+</head>
+<body>
+<div id="new"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/804323-1.html b/layout/reftests/bugs/804323-1.html
new file mode 100644
index 0000000000..8a19fc745b
--- /dev/null
+++ b/layout/reftests/bugs/804323-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body { margin:0; padding:0; overflow:hidden; }
+#new {
+ position: absolute;
+ left: 100px;
+ top: 100px;
+ width: 100px;
+ height: 100px;
+ background: yellow;
+}
+</style>
+</head>
+<body>
+<div id="new" style="display:none"></div>
+<script>
+document.body.getBoundingClientRect().height;
+document.body.style.transform = "translateX(100px)";
+document.body.getBoundingClientRect().width;
+document.getElementById("new").style.display = "";
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/811301-1-ref.html b/layout/reftests/bugs/811301-1-ref.html
new file mode 100644
index 0000000000..95cfe2d345
--- /dev/null
+++ b/layout/reftests/bugs/811301-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="overflow-y:hidden">
+<div style="height:10000px; width:100px; background:yellow; position:relative; top:-200px"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/811301-1.html b/layout/reftests/bugs/811301-1.html
new file mode 100644
index 0000000000..e8ba7a8a8b
--- /dev/null
+++ b/layout/reftests/bugs/811301-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<p>Hello
+<div style="height:10000px; width:100px; background:yellow"></div>
+<script>
+window.scrollTo(0,200);
+document.documentElement.setAttribute("style", "overflow-y:hidden");
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/812824-1-ref.html b/layout/reftests/bugs/812824-1-ref.html
new file mode 100644
index 0000000000..a404637bfc
--- /dev/null
+++ b/layout/reftests/bugs/812824-1-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<style> html { background-color: inherit } </style>
+<p>This document should NOT have a red background.</p>
diff --git a/layout/reftests/bugs/812824-1.html b/layout/reftests/bugs/812824-1.html
new file mode 100644
index 0000000000..e3f9603c98
--- /dev/null
+++ b/layout/reftests/bugs/812824-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<style> html { tab-size: 0 } </style>
+<script> getComputedStyle(document.documentElement, ""); </script>
+<style> html { tab-size: inherit } </style>
+<p>This document should NOT have a red background.</p>
diff --git a/layout/reftests/bugs/814677-ref.html b/layout/reftests/bugs/814677-ref.html
new file mode 100644
index 0000000000..2a9ab492f5
--- /dev/null
+++ b/layout/reftests/bugs/814677-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 814677</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+span { display: table-cell; }
+.t { display:table; }
+ </style>
+</head>
+<body>
+
+<div><span>A</span><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div class="t"><span>A</span></div>&#x0B;<div class="t"><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div class="t"><span>A</span></div>&nbsp;<div class="t"><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+
+<div><span>A</span><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div class="t"><span>A</span></div>&#x0B;<div class="t"><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+<div class="t"><span>A</span></div>&nbsp;<div class="t"><span>B</span></div>
+<div><span>A</span><span>B</span></div>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/814677.html b/layout/reftests/bugs/814677.html
new file mode 100644
index 0000000000..d8a13130c6
--- /dev/null
+++ b/layout/reftests/bugs/814677.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 814677</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+span { display: table-cell; }
+.pre { white-space:pre; }
+ </style>
+</head>
+<body>
+
+<div><span>A</span>&#x09;<span>B</span></div>
+<div><span>A</span>&#x0A;<span>B</span></div>
+<div><span>A</span>&#x0B;<span>B</span></div>
+<div><span>A</span>&#x0C;<span>B</span></div>
+<div><span>A</span>&#x0D;<span>B</span></div>
+<div><span>A</span>&nbsp;<span>B</span></div>
+<div><span>A</span> <span>B</span></div>
+
+<div class="pre"><span>A</span>&#x09;<span>B</span></div>
+<div class="pre"><span>A</span>&#x0A;<span>B</span></div>
+<div class="pre"><span>A</span>&#x0B;<span>B</span></div>
+<div class="pre"><span>A</span>&#x0C;<span>B</span></div>
+<div class="pre"><span>A</span>&#x0D;<span>B</span></div>
+<div class="pre"><span>A</span>&nbsp;<span>B</span></div>
+<div class="pre"><span>A</span> <span>B</span></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/814952-1-ref.html b/layout/reftests/bugs/814952-1-ref.html
new file mode 100644
index 0000000000..04f680c0b2
--- /dev/null
+++ b/layout/reftests/bugs/814952-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>non-scaling-stroke reftest</title>
+</head>
+<body>
+<svg height="2000" width="2000" xmlns="http://www.w3.org/2000/svg">
+ <path fill="red" stroke-width="2" stroke="black" d="m10,18 100,0 0,100 -100,00z"></path>
+</svg>
+</body></html>
diff --git a/layout/reftests/bugs/814952-1.html b/layout/reftests/bugs/814952-1.html
new file mode 100644
index 0000000000..969360b641
--- /dev/null
+++ b/layout/reftests/bugs/814952-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>non-scaling-stroke reftest</title>
+ <style>
+ * {
+ vector-effect: non-scaling-stroke;
+ }
+ </style>
+</head>
+<body>
+<svg height="2000" width="2000" xmlns="http://www.w3.org/2000/svg">
+ <path fill="red" stroke-width="2" stroke="black" d="m10,18 100,0 0,100 -100,00z"></path>
+</svg>
+</body></html>
diff --git a/layout/reftests/bugs/815030-1-ref.html b/layout/reftests/bugs/815030-1-ref.html
new file mode 100644
index 0000000000..7ae415eedb
--- /dev/null
+++ b/layout/reftests/bugs/815030-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyAQMAAACQ%2B%2Bz9AAAAA1BMVEUA%2FwA0XsCoAAAAD0lEQVQoFWNgGAWjYGgCAAK8AAEb3eOQAAAAAElFTkSuQmCC);">
+</body>
+</html>
diff --git a/layout/reftests/bugs/815030-1.html b/layout/reftests/bugs/815030-1.html
new file mode 100644
index 0000000000..7c10a1e213
--- /dev/null
+++ b/layout/reftests/bugs/815030-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs%2B9AAAAAXNSR0IArs4c6QAAADdJREFUGNNjZGD4%2F5%2BBCMDCwMDAwNDQiF9VQz0DEwORgPoKGRkY%2Fv9fe%2BM5XkXBGpID7kZiFAIAEbULDl5w%2F68AAAAASUVORK5CYII%3D); background-attachment:fixed">
+<script>
+function doTest() {
+ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyAQMAAACQ%2B%2Bz9AAAAA1BMVEUA%2FwA0XsCoAAAAD0lEQVQoFWNgGAWjYGgCAAK8AAEb3eOQAAAAAElFTkSuQmCC";
+ document.body.style.backgroundImage = "url(" + img + ")";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/815593-1-ref.html b/layout/reftests/bugs/815593-1-ref.html
new file mode 100644
index 0000000000..0e71b420b7
--- /dev/null
+++ b/layout/reftests/bugs/815593-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img style="transform:translate(20px,0)" id="i" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAE4gCAYAAAA/MefJAAAJaklEQVR4nO3KQREAAAwCIPuX1ghbAI4vSZ9EURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRF8TbU+MCtlWtcNAAAAABJRU5ErkJggg==">
+</body>
+</html>
diff --git a/layout/reftests/bugs/815593-1.html b/layout/reftests/bugs/815593-1.html
new file mode 100644
index 0000000000..915c0ef013
--- /dev/null
+++ b/layout/reftests/bugs/815593-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<img id="i" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAE4gCAYAAAA/MefJAAAJaklEQVR4nO3KQREAAAwCIPuX1ghbAI4vSZ9EURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRF8TbU+MCtlWtcNAAAAABJRU5ErkJggg==">
+<script>
+var i = document.getElementById("i");
+i.getBoundingClientRect();
+i.style.transform = "translate(10px,0)";
+window.addEventListener("MozReftestInvalidate", function() {
+ i.style.transform = "translate(20px,0)";
+ document.documentElement.removeAttribute("class");
+});
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/816359-1-ref.html b/layout/reftests/bugs/816359-1-ref.html
new file mode 100644
index 0000000000..c042d9c9b3
--- /dev/null
+++ b/layout/reftests/bugs/816359-1-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML>
+<div style="position:absolute; left:0; top:0; width:10px; height:10px; background:black;">
diff --git a/layout/reftests/bugs/816359-1.html b/layout/reftests/bugs/816359-1.html
new file mode 100644
index 0000000000..91909e1a34
--- /dev/null
+++ b/layout/reftests/bugs/816359-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<body style="margin:100px;">
+<span style="transform:translate(10px,0)">
+ <div style="position:absolute; left:0; top:0; width:10px; height:10px; background:black;">
+</span>
diff --git a/layout/reftests/bugs/816458-1-ref.html b/layout/reftests/bugs/816458-1-ref.html
new file mode 100644
index 0000000000..64c84be219
--- /dev/null
+++ b/layout/reftests/bugs/816458-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+<table border="1" style="width:100%; transform:rotate(90deg)">
+ <tbody><tr><td></td></tr></tbody>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/816458-1.html b/layout/reftests/bugs/816458-1.html
new file mode 100644
index 0000000000..6db41128ca
--- /dev/null
+++ b/layout/reftests/bugs/816458-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<table id="t" border="1" style="width:100%">
+ <tbody><tr><td></td></tr></tbody>
+</table>
+<script>
+var t = document.getElementById("t");
+window.addEventListener("MozReftestInvalidate", function() {
+ t.style.transform = "rotate(90deg)";
+ document.documentElement.removeAttribute("class");
+});
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/816876-1-ref.xhtml b/layout/reftests/bugs/816876-1-ref.xhtml
new file mode 100644
index 0000000000..e70498b96c
--- /dev/null
+++ b/layout/reftests/bugs/816876-1-ref.xhtml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ .container {
+ width: 40px;
+ height: 14px;
+ border: 2px solid green;
+ margin-bottom: 2px;
+ }
+ .a {
+ width: 16px;
+ height: 10px;
+ background: blue;
+ min-width: 0;
+ border: 2px solid lightblue;
+ }
+ .b {
+ width: 16px;
+ height: 10px;
+ background: purple;
+ min-width: 0;
+ border: 2px solid slateblue;
+ }
+ .aKid {
+ margin-left: 10px;
+ margin-top: 2px;
+ width: 16px;
+ height: 6px;
+ background: yellow;
+ border: 1px solid black;
+ }
+ .a, .b { float: left; }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="a"><div class="aKid"/></div>
+ <div class="b"></div>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/816876-1.xhtml b/layout/reftests/bugs/816876-1.xhtml
new file mode 100644
index 0000000000..f3d8d238c3
--- /dev/null
+++ b/layout/reftests/bugs/816876-1.xhtml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ .container {
+ width: 40px;
+ height: 14px;
+ border: 2px solid green;
+ margin-bottom: 2px;
+ }
+ .a {
+ width: 16px;
+ height: 10px;
+ background: blue;
+ min-width: 0;
+ border: 2px solid lightblue;
+ }
+ .b {
+ width: 16px;
+ height: 10px;
+ background: purple;
+ min-width: 0;
+ border: 2px solid slateblue;
+ }
+ .aKid {
+ margin-left: 10px;
+ margin-top: 2px;
+ width: 16px;
+ height: 6px;
+ background: yellow;
+ border: 1px solid black;
+ }
+ .a, .b { float: left; }
+ </style>
+ </head>
+ <body>
+ <div class="container" style="position: fixed">
+ <div class="a"><div class="aKid"/></div>
+ <div class="b"></div>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/816876-2-ref.xhtml b/layout/reftests/bugs/816876-2-ref.xhtml
new file mode 100644
index 0000000000..e593260ee6
--- /dev/null
+++ b/layout/reftests/bugs/816876-2-ref.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ .container {
+ width: 40px;
+ height: 14px;
+ border: 2px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container"></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/816876-2a.xhtml b/layout/reftests/bugs/816876-2a.xhtml
new file mode 100644
index 0000000000..1087fbed70
--- /dev/null
+++ b/layout/reftests/bugs/816876-2a.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ .container {
+ width: 40px;
+ height: 14px;
+ border: 2px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container" style="position: fixed"></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/816876-2b.xhtml b/layout/reftests/bugs/816876-2b.xhtml
new file mode 100644
index 0000000000..b21c31dc53
--- /dev/null
+++ b/layout/reftests/bugs/816876-2b.xhtml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style>
+ .container {
+ width: 40px;
+ height: 14px;
+ border: 2px solid green;
+ position: fixed;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container"></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/816948-1-ref.html b/layout/reftests/bugs/816948-1-ref.html
new file mode 100644
index 0000000000..607049a494
--- /dev/null
+++ b/layout/reftests/bugs/816948-1-ref.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<iframe id="ifr" src="816948-iframe.html">
+</iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/816948-1.html b/layout/reftests/bugs/816948-1.html
new file mode 100644
index 0000000000..e485e0cd8c
--- /dev/null
+++ b/layout/reftests/bugs/816948-1.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<script>
+function boom() {
+ var ifr = document.getElementById("ifr");
+ ifr.style.display = "none";
+ // flush layout
+ document.documentElement.offsetLeft;
+ ifr.style.display = "block";
+ document.documentElement.removeAttribute("class");
+}
+</script>
+<body onload="boom();">
+<iframe id="ifr" src="816948-iframe.html">
+</iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/816948-iframe.html b/layout/reftests/bugs/816948-iframe.html
new file mode 100644
index 0000000000..6af4206de1
--- /dev/null
+++ b/layout/reftests/bugs/816948-iframe.html
@@ -0,0 +1,3 @@
+<body background="mozilla-banner.gif">
+foopy
+</body>
diff --git a/layout/reftests/bugs/817019-1.html b/layout/reftests/bugs/817019-1.html
new file mode 100644
index 0000000000..1c67c55326
--- /dev/null
+++ b/layout/reftests/bugs/817019-1.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta charset="utf-8" />
+ <title></title>
+ <script type="text/javascript">
+ function paintCanvas() {
+ var elem = document.getElementById("mycanv");
+ var ctx = elem.getContext('2d');
+
+ ctx.fillStyle = 'white';
+ ctx.fillRect(0, 0, 200, 200);
+ ctx.beginPath();
+ ctx.arc(150, 150, 100, 0, Math.PI * 2, true);
+ ctx.closePath();
+ ctx.clip();
+
+ // create radial gradient
+ var grd = ctx.createRadialGradient(110, 110, 42, 110, 110, 121);
+ grd.addColorStop(0, '#FFFFFF');
+ grd.addColorStop(1, '#E5E5E5');
+
+ ctx.fillStyle = grd;
+ // This should be completely clipped out!
+ ctx.fillRect(0, 0, 1, 1);
+ }
+ </script>
+</head>
+<body onload="paintCanvas();">
+ <canvas width=200 height=200 moz-opaque="true" id="mycanv"></canvas>
+</body>
+</html>
diff --git a/layout/reftests/bugs/818276-1-ref.html b/layout/reftests/bugs/818276-1-ref.html
new file mode 100644
index 0000000000..f3e06cc7b6
--- /dev/null
+++ b/layout/reftests/bugs/818276-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<iframe src="data:text/html,<div style='height:1000px; background:yellow'>"></iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/818276-1.html b/layout/reftests/bugs/818276-1.html
new file mode 100644
index 0000000000..1cb045a29c
--- /dev/null
+++ b/layout/reftests/bugs/818276-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<iframe id="f" src="data:text/html,<div style='height:1000px; background:yellow'>" style="overflow:hidden"></iframe>
+<script>
+function doTest() {
+ var f = document.getElementById("f");
+ f.style.overflow = "visible";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/81947-1.html b/layout/reftests/bugs/81947-1.html
new file mode 100644
index 0000000000..feef18a058
--- /dev/null
+++ b/layout/reftests/bugs/81947-1.html
@@ -0,0 +1,17 @@
+
+<html>
+ <head>
+ <title>81947</title>
+ </head>
+ <body bgcolor="#FFFF00">
+ <form name="Login" method="post" action="session.asp">
+ <table border="0" cellpadding="0" cellspacing="0" width="610">
+ <tr valign=top>
+ <td colspan=2 align=right width=27><img src="solidblue.png" width=27 height=45></td>
+ <td><img src="solidblue.png" width=10 height=105><a href=""><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><a href="/registration/intermediate.asp"><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><a href="/aboutus/aboutus.asp"><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><img src="solidblue.png" width=126 height=105><input type=image border = 0 src="solidblue.png" width=75 height=105><img src="solidblue.png" width=10 height=105></td>
+ <td colspan=2 align=left><img src="solidblue.png" width=27 height=45> </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/81947-ref.html b/layout/reftests/bugs/81947-ref.html
new file mode 100644
index 0000000000..92389febbd
--- /dev/null
+++ b/layout/reftests/bugs/81947-ref.html
@@ -0,0 +1,17 @@
+
+<html>
+ <head>
+ <title>81947</title>
+ </head>
+ <body bgcolor="#FFFF00">
+ <form name="Login" method="post" action="session.asp">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr valign=top>
+ <td colspan=2 align=right width=27><img src="solidblue.png" width=27 height=45></td>
+ <td><img src="solidblue.png" width=10 height=105><a href=""><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><a href="/registration/intermediate.asp"><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><a href="/aboutus/aboutus.asp"><img src="solidblue.png" width=105 height=105 border=0></a><img src="solidblue.png" width=10 height=105><img src="solidblue.png" width=126 height=105><input type=image border = 0 src="solidblue.png" width=75 height=105><img src="solidblue.png" width=10 height=105></td>
+ <td colspan=2 align=left><img src="solidblue.png" width=27 height=45> </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/825999-ref.html b/layout/reftests/bugs/825999-ref.html
new file mode 100644
index 0000000000..057d131928
--- /dev/null
+++ b/layout/reftests/bugs/825999-ref.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Testcase for bug 825999</title>
+ <meta charset="utf-8">
+ <style>
+ html,body {
+ color:black; background-color:white; font-family: monospace; font-size:16px; padding:4px; margin:0;
+ }
+
+ button,p,select,span,table,object {
+ width: 14px;
+ text-indent: 20px;
+ overflow: clip;
+ padding-left:6px;
+ padding-right:17px;
+ outline: 1px solid blue;
+ }
+ span {
+ display:inline-block;
+ overflow:visible;
+ outline:none;
+ }
+ x {
+ display:block;
+ overflow:hidden;
+ height:3em;
+ padding:1px;
+ vertical-align:top;
+ background:lime;
+ width:36px;
+ }
+ .bb * {
+ box-sizing: border-box;
+ }
+ .cb * {
+ box-sizing: content-box;
+ }
+ td {
+ max-width:14px;
+ }
+ .bc {
+ border-collapse:collapse;
+ }
+ .it {
+ display:inline-table;
+ }
+ object { height:3em; }
+ </style>
+ </head>
+ <body>
+ <div class="bb">
+ <p>testing</p>
+ <x></x>
+ <button>testing</button>
+ <select size=1><option>testing</select>
+ <select size=3><option>testing<option>testing<option>testing</select>
+ <object type="text/html" data="data:text/html,testing"></object>
+ <table><tr><td>testing</td></tr></table>
+ <table class="bc"><tr><td>testing</td></tr></table>
+ <table class="it"><tr><td>testing</td></tr></table>
+ <table class="bc it"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody style="overflow:hidden"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr style="overflow:hidden"><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr><td style="overflow:hidden">testing</td></tr></table>
+ </div>
+ <div class="cb">
+ <p>testing</p>
+ <x><span>testing</span></x>
+ <button>testing</button>
+ <select size=1><option>testing</select>
+ <select size=3><option>testing<option>testing<option>testing</select>
+ <object type="text/html" data="data:text/html,testing"></object>
+ <table><tr><td>testing</td></tr></table>
+ <table class="bc"><tr><td>testing</td></tr></table>
+ <table class="it"><tr><td>testing</td></tr></table>
+ <table class="bc it"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody style="overflow:hidden"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr style="overflow:hidden"><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr><td style="overflow:hidden">testing</td></tr></table>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/825999.html b/layout/reftests/bugs/825999.html
new file mode 100644
index 0000000000..eef708f888
--- /dev/null
+++ b/layout/reftests/bugs/825999.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Testcase for bug 825999</title>
+ <meta charset="utf-8">
+ <style>
+ html,body {
+ color:black; background-color:white; font-family: monospace; font-size:16px; padding:4px; margin:0;
+ }
+
+ button,p,select,span,table,object {
+ width: 14px;
+ text-indent: 20px;
+ overflow: hidden;
+ padding-left:6px;
+ padding-right:17px;
+ outline: 1px solid blue;
+ }
+ span {
+ display:inline-block;
+ overflow: hidden;
+ outline:none;
+ }
+ x {
+ display:block;
+ overflow:auto;
+ height:3em;
+ padding:1px;
+ vertical-align:top;
+ background:lime;
+ width:36px;
+ }
+ .bb * {
+ box-sizing: border-box;
+ }
+ .cb * {
+ box-sizing: content-box;
+ }
+ td {
+ max-width:14px;
+ }
+ .bc {
+ border-collapse:collapse;
+ }
+ .it {
+ display:inline-table;
+ }
+ object { height:3em; }
+ </style>
+ </head>
+ <body>
+ <div class="bb">
+ <p>testing</p>
+ <x><span>testing</span></x>
+ <button>testing</button>
+ <select size=1><option>testing</select>
+ <select size=3><option>testing<option>testing<option>testing</select>
+ <object type="text/html" data="data:text/html,testing"></object>
+ <table><tr><td>testing</td></tr></table>
+ <table class="bc"><tr><td>testing</td></tr></table>
+ <table class="it"><tr><td>testing</td></tr></table>
+ <table class="bc it"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody style="overflow:hidden"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr style="overflow:hidden"><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr><td style="overflow:hidden">testing</td></tr></table>
+ </div>
+ <div class="cb">
+ <p>testing</p>
+ <x><span>testing</span></x>
+ <button>testing</button>
+ <select size=1><option>testing</select>
+ <select size=3><option>testing<option>testing<option>testing</select>
+ <object type="text/html" data="data:text/html,testing"></object>
+ <table><tr><td>testing</td></tr></table>
+ <table class="bc"><tr><td>testing</td></tr></table>
+ <table class="it"><tr><td>testing</td></tr></table>
+ <table class="bc it"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody style="overflow:hidden"><tr><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr style="overflow:hidden"><td>testing</td></tr></table>
+ <table style="overflow:visible"><tbody><tr><td style="overflow:hidden">testing</td></tr></table>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/82711-1-ref.html b/layout/reftests/bugs/82711-1-ref.html
new file mode 100644
index 0000000000..fafdd9fcc8
--- /dev/null
+++ b/layout/reftests/bugs/82711-1-ref.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: normal">
+ 0 1 2 3
+ 4 5
+
+ 6 7 8
+ 9
+
+
+ This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/82711-1.html b/layout/reftests/bugs/82711-1.html
new file mode 100644
index 0000000000..aacd6d481e
--- /dev/null
+++ b/layout/reftests/bugs/82711-1.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: normal">
+0 1 2 3 4 5 6 7 8 9 This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/82711-2-ref.html b/layout/reftests/bugs/82711-2-ref.html
new file mode 100644
index 0000000000..b4a542c459
--- /dev/null
+++ b/layout/reftests/bugs/82711-2-ref.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: nowrap">
+ 0 1 2 3
+ 4 5
+
+ 6 7 8
+ 9
+
+
+ This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/82711-2.html b/layout/reftests/bugs/82711-2.html
new file mode 100644
index 0000000000..c91029a41f
--- /dev/null
+++ b/layout/reftests/bugs/82711-2.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: nowrap">
+0 1 2 3 4 5 6 7 8 9 This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/82711-3-ref.html b/layout/reftests/bugs/82711-3-ref.html
new file mode 100644
index 0000000000..54fc4f7d5c
--- /dev/null
+++ b/layout/reftests/bugs/82711-3-ref.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: pre-line">
+ 0 1 2 3
+ 4 5
+
+ 6 7 8
+ 9
+
+
+ This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/82711-3.html b/layout/reftests/bugs/82711-3.html
new file mode 100644
index 0000000000..ed03290ea2
--- /dev/null
+++ b/layout/reftests/bugs/82711-3.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+<body>
+<textarea rows="10" cols="25" style="white-space: pre-wrap">
+0 1 2 3
+4 5
+
+6 7 8
+9
+
+
+This is a long line that could wrap.
+</textarea>
+</body>
+</html>
diff --git a/layout/reftests/bugs/827577-1-ref.html b/layout/reftests/bugs/827577-1-ref.html
new file mode 100644
index 0000000000..7afd136a2e
--- /dev/null
+++ b/layout/reftests/bugs/827577-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="margin-left:100px; width:200px; height:200px; border:1px solid black">
+ <div style="margin-left:150px; width:50px; height:80px; background:yellow;">
+ </div>
+</div>
diff --git a/layout/reftests/bugs/827577-1a.html b/layout/reftests/bugs/827577-1a.html
new file mode 100644
index 0000000000..e9da5a819d
--- /dev/null
+++ b/layout/reftests/bugs/827577-1a.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="transform:translateX(100px); width:200px; height:200px; border:1px solid black">
+ <div style="position:absolute;">
+ </div>
+ <div style="position:absolute;">
+ <div style="position:fixed; right:0; width:50px; height:80px; background:yellow;">
+ </div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/827577-1b.html b/layout/reftests/bugs/827577-1b.html
new file mode 100644
index 0000000000..fac209f7da
--- /dev/null
+++ b/layout/reftests/bugs/827577-1b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div style="transform:translateX(100px); width:200px; height:200px; border:1px solid black">
+ <div style="position:absolute;">
+ </div>
+ <div style="position:absolute;">
+ <div id="d" style="display:none; position:fixed; right:0; width:50px; height:80px; background:yellow;">
+ </div>
+ </div>
+</div>
+<script>
+function doTest() {
+ document.getElementById("d").style.display = "";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
diff --git a/layout/reftests/bugs/827577-2.html b/layout/reftests/bugs/827577-2.html
new file mode 100644
index 0000000000..d53d6fd8c8
--- /dev/null
+++ b/layout/reftests/bugs/827577-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait>
+<body>
+<div style="transform:translateX(100px); width:200px; height:200px; border:1px solid black">
+ <div style="position:absolute;">
+ </div>
+ <div style="position:absolute;">
+ <div style="position:fixed; right:0; width:50px; height:80px; background:yellow;">
+ </div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/827799-1.html b/layout/reftests/bugs/827799-1.html
new file mode 100644
index 0000000000..7c3312411d
--- /dev/null
+++ b/layout/reftests/bugs/827799-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<style>
+ .visuallyhidden { clip: rect(0 0 0 0); position: absolute; }
+</style>
+<table class="visuallyhidden">
+ <caption>This is a caption</caption>
+</table>
+
diff --git a/layout/reftests/bugs/828146-1-ref.html b/layout/reftests/bugs/828146-1-ref.html
new file mode 100644
index 0000000000..f5ec280a99
--- /dev/null
+++ b/layout/reftests/bugs/828146-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:100px; height:100px; position:relative; top:60px; -moz-appearance:button"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/828146-1.html b/layout/reftests/bugs/828146-1.html
new file mode 100644
index 0000000000..7aaa7c694d
--- /dev/null
+++ b/layout/reftests/bugs/828146-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="b" style="width:100px; height:100px; position:relative; top:50px; -moz-appearance:button"></div>
+<script>
+var b = document.getElementById("b");
+function doTest() {
+ b.style.top = "60px";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/829958-ref.html b/layout/reftests/bugs/829958-ref.html
new file mode 100644
index 0000000000..cd5ba9b8c3
--- /dev/null
+++ b/layout/reftests/bugs/829958-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<style>
+.container{
+ overflow: hidden;
+ white-space: nowrap;
+ list-style: none;
+ height: 180px;
+ margin: 0;
+ padding: 0;
+}
+
+.container div{
+ display: inline-block;
+ height: 180px;
+ background: #f00;
+}
+
+.container img{ height: 180px; }
+</style>
+<body>
+ <div class='container'>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/829958.html b/layout/reftests/bugs/829958.html
new file mode 100644
index 0000000000..e747c8bbe8
--- /dev/null
+++ b/layout/reftests/bugs/829958.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<!--
+ Test that the intrinsic width is properly calculated for images with
+ percent height with a percent height parent when their container has
+ overflow not visible.
+-->
+<style>
+.container{
+ overflow: hidden;
+ white-space: nowrap;
+ list-style: none;
+ height: 180px;
+ margin: 0;
+ padding: 0;
+}
+
+.container div{
+ display: inline-block;
+ height: 100%;
+ background: #f00;
+}
+
+.container img{ height: 100%; }
+</style>
+<body>
+ <div class='container'>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ <div><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAMAAADaaRXwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowNDBEMjk2RkUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNDBEMjk3MEUwREExMUUyQURFMTlFN0Y5RjRDNTgyQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0MEQyOTZERTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA0MEQyOTZFRTBEQTExRTJBREUxOUU3RjlGNEM1ODJDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KmJqgwAAAAZQTFRFAP8AAAAAbwN+QwAAAI5JREFUeNrswTEBAAAAwqD1T20JT6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBjAgwA1fsAAbWxRKUAAAAASUVORK5CYII='/></div>
+ </div>
+</body>
diff --git a/layout/reftests/bugs/836844-1-ref.html b/layout/reftests/bugs/836844-1-ref.html
new file mode 100644
index 0000000000..bd3c54ee01
--- /dev/null
+++ b/layout/reftests/bugs/836844-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style type="text/css">
+ body {
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAANUlEQVQImWPonzzt/6L5y+B4Yv8UFD4DMgcbhiuYMnni/wULFsAlJkzqJ2DCwuX/F81f9h8Aludb9rn0ffkAAAAASUVORK5CYII=') repeat scroll 0% 0% transparent;
+ }
+</style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/836844-1.html b/layout/reftests/bugs/836844-1.html
new file mode 100644
index 0000000000..ffcd411b06
--- /dev/null
+++ b/layout/reftests/bugs/836844-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style type="text/css">
+ body {
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAANUlEQVQImWPonzzt/6L5y+B4Yv8UFD4DMgcbhiuYMnni/wULFsAlJkzqJ2DCwuX/F81f9h8Aludb9rn0ffkAAAAASUVORK5CYII=') repeat scroll 0% 0% transparent;
+ overflow: hidden;
+ }
+</style>
+<script type="text/javascript">
+ function doScroll() {
+ window.scrollTo(0, 500);
+ document.documentElement.removeAttribute("class");
+ }
+ document.addEventListener("MozReftestInvalidate", doScroll);
+</script>
+</head>
+<body>
+ <div style="height: 2000px;"></div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/841192-1-ref.html b/layout/reftests/bugs/841192-1-ref.html
new file mode 100644
index 0000000000..866ae13574
--- /dev/null
+++ b/layout/reftests/bugs/841192-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="margin:0; position:absolute; left:0; top:0; right:0; bottom:0; padding:10px; border:5px solid lime;">
+<div style="height:100%; background:yellow;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/841192-1.html b/layout/reftests/bugs/841192-1.html
new file mode 100644
index 0000000000..50a0f29b9b
--- /dev/null
+++ b/layout/reftests/bugs/841192-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<frameset>
+<frame style="padding:10px; border:5px solid lime; border-radius:20px"
+ src="data:text/html,<body style='background:yellow'>">
+</frame>
diff --git a/layout/reftests/bugs/84400-1-ref.html b/layout/reftests/bugs/84400-1-ref.html
new file mode 100644
index 0000000000..c7d853384b
--- /dev/null
+++ b/layout/reftests/bugs/84400-1-ref.html
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Testing controls that should match :enabled/:disabled</title>
+ <style type="text/css">
+ input, textarea, button, *.hideme { display: none; }
+ div { margin-bottom: 0.2em; }
+
+ span, option, optgroup { color: lime; background-color: lime; }
+ </style>
+ </head>
+ <body>
+ <div>
+ There should be no red in the following (note: form styling should be enabled).
+ </div>
+
+ <form method="get" action=".">
+ <div>
+ input:
+ <input/> <span class="true">FAIL</span>
+ <input disabled="disabled"/> <span class="false">FAIL</span>
+ <input id="i1"/> <span class="false">FAIL</span>
+ <input id="i2" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ password:
+ <input type="password"/> <span class="true">FAIL</span>
+ <input type="password" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="password" id="i3"/> <span class="false">FAIL</span>
+ <input type="password" id="i4" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ checkbox:
+ <input type="checkbox"/> <span class="true">FAIL</span>
+ <input type="checkbox" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="checkbox" id="i5"/> <span class="false">FAIL</span>
+ <input type="checkbox" id="i6" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ radio:
+ <input type="radio"/> <span class="true">FAIL</span>
+ <input type="radio" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="radio" id="i7"/> <span class="false">FAIL</span>
+ <input type="radio" id="i8" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ submit:
+ <input type="submit"/> <span class="true">FAIL</span>
+ <input type="submit" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="submit" id="i9"/> <span class="false">FAIL</span>
+ <input type="submit" id="i10" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ reset:
+ <input type="reset"/> <span class="true">FAIL</span>
+ <input type="reset" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="reset" id="i11"/> <span class="false">FAIL</span>
+ <input type="reset" id="i12" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ file:
+ <input type="file"/> <span class="true">FAIL</span>
+ <input type="file" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="file" id="i13"/> <span class="false">FAIL</span>
+ <input type="file" id="i14" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ hidden:
+ <input type="hidden"/> <span class="true">FAIL</span>
+ <input type="hidden" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="hidden" id="i15"/> <span class="false">FAIL</span>
+ <input type="hidden" id="i16" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ image:
+ <input type="image"/> <span class="true">FAIL</span>
+ <input type="image" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="image" id="i17"/> <span class="false">FAIL</span>
+ <input type="image" id="i18" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ button (input):
+ <input type="button"/> <span class="true">FAIL</span>
+ <input type="button" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="button" id="i19"/> <span class="false">FAIL</span>
+ <input type="button" id="i20" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ textarea:
+ <textarea cols="5" rows="5"></textarea> <span class="true">FAIL</span>
+ <textarea cols="5" rows="5" disabled="disabled"></textarea> <span class="false">FAIL</span>
+ <textarea cols="5" rows="5" id="i21"></textarea> <span class="false">FAIL</span>
+ <textarea cols="5" rows="5" id="i22" disabled="disabled"></textarea> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ button:
+ <button>bogus</button> <span class="true">FAIL</span>
+ <button disabled="disabled">bogus</button> <span class="false">FAIL</span>
+ <button id="i23">bogus</button> <span class="false">FAIL</span>
+ <button id="i24" disabled="disabled">bogus</button> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ select:
+ <select class="hideme"><option>bogus</option></select> <span class="true">FAIL</span>
+ <select class="hideme" disabled="disabled"><option>bogus</option></select> <span class="false">FAIL</span>
+ <select class="hideme" id="i25"><option>bogus</option></select> <span class="false">FAIL</span>
+ <select class="hideme" id="i26" disabled="disabled"><option>bogus</option></select> <span class="true">FAIL</span>
+
+ </div>
+
+ <div>
+ option:
+ <select size="4">
+ <option class="true">FAIL</option>
+ <option class="false" disabled="disabled">FAIL</option>
+ <option class="false" id="i27">FAIL</option>
+ <option class="true" id="i28" disabled="disabled">FAIL</option>
+ </select>
+ </div>
+
+ <div>
+ optgroup:
+ <select size="4">
+ <optgroup class="true" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="false" disabled="disabled" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="false" id="i29" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="true" disabled="disabled" id="i30" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ </select>
+ </div>
+
+ </form>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/84400-1.html b/layout/reftests/bugs/84400-1.html
new file mode 100644
index 0000000000..e7b8f6942d
--- /dev/null
+++ b/layout/reftests/bugs/84400-1.html
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Testing controls that should match :enabled/:disabled</title>
+ <style type="text/css">
+ input, textarea, button, *.hideme { display: none; }
+ div { margin-bottom: 0.2em; }
+
+ span, option, optgroup { background-color: red; }
+ *:enabled + span.true, option.true:enabled, optgroup.true:enabled { color: lime; background-color: lime; }
+ *:disabled + span.false, option.false:disabled, optgroup.false:disabled { color: lime; background-color: lime; }
+ </style>
+ <script type="text/javascript">
+ // Runs through i1, i2, .... in and toggles the |disabled| attribute
+ function onLoad() {
+ var i = 1;
+ var el = document.getElementById("i1");
+ while (el) {
+ if (el.hasAttribute("disabled")) {
+ el.removeAttribute("disabled");
+ } else {
+ el.setAttribute("disabled", "disabled");
+ }
+ ++i;
+ el = document.getElementById("i" + i);
+ }
+ if (i != 31) {
+ alert("onLoad() handler failed!");
+ }
+ }
+
+ window.addEventListener("load", onLoad);
+ </script>
+ </head>
+ <body>
+ <div>
+ There should be no red in the following (note: form styling should be enabled).
+ </div>
+
+ <form method="get" action=".">
+ <div>
+ input:
+ <input/> <span class="true">FAIL</span>
+ <input disabled="disabled"/> <span class="false">FAIL</span>
+ <input id="i1"/> <span class="false">FAIL</span>
+ <input id="i2" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ password:
+ <input type="password"/> <span class="true">FAIL</span>
+ <input type="password" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="password" id="i3"/> <span class="false">FAIL</span>
+ <input type="password" id="i4" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ checkbox:
+ <input type="checkbox"/> <span class="true">FAIL</span>
+ <input type="checkbox" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="checkbox" id="i5"/> <span class="false">FAIL</span>
+ <input type="checkbox" id="i6" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ radio:
+ <input type="radio"/> <span class="true">FAIL</span>
+ <input type="radio" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="radio" id="i7"/> <span class="false">FAIL</span>
+ <input type="radio" id="i8" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ submit:
+ <input type="submit"/> <span class="true">FAIL</span>
+ <input type="submit" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="submit" id="i9"/> <span class="false">FAIL</span>
+ <input type="submit" id="i10" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ reset:
+ <input type="reset"/> <span class="true">FAIL</span>
+ <input type="reset" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="reset" id="i11"/> <span class="false">FAIL</span>
+ <input type="reset" id="i12" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ file:
+ <input type="file"/> <span class="true">FAIL</span>
+ <input type="file" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="file" id="i13"/> <span class="false">FAIL</span>
+ <input type="file" id="i14" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ hidden:
+ <input type="hidden"/> <span class="true">FAIL</span>
+ <input type="hidden" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="hidden" id="i15"/> <span class="false">FAIL</span>
+ <input type="hidden" id="i16" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ image:
+ <input type="image"/> <span class="true">FAIL</span>
+ <input type="image" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="image" id="i17"/> <span class="false">FAIL</span>
+ <input type="image" id="i18" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ button (input):
+ <input type="button"/> <span class="true">FAIL</span>
+ <input type="button" disabled="disabled"/> <span class="false">FAIL</span>
+ <input type="button" id="i19"/> <span class="false">FAIL</span>
+ <input type="button" id="i20" disabled="disabled"/> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ textarea:
+ <textarea cols="5" rows="5"></textarea> <span class="true">FAIL</span>
+ <textarea cols="5" rows="5" disabled="disabled"></textarea> <span class="false">FAIL</span>
+ <textarea cols="5" rows="5" id="i21"></textarea> <span class="false">FAIL</span>
+ <textarea cols="5" rows="5" id="i22" disabled="disabled"></textarea> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ button:
+ <button>bogus</button> <span class="true">FAIL</span>
+ <button disabled="disabled">bogus</button> <span class="false">FAIL</span>
+ <button id="i23">bogus</button> <span class="false">FAIL</span>
+ <button id="i24" disabled="disabled">bogus</button> <span class="true">FAIL</span>
+ </div>
+
+ <div>
+ select:
+ <select class="hideme"><option>bogus</option></select> <span class="true">FAIL</span>
+ <select class="hideme" disabled="disabled"><option>bogus</option></select> <span class="false">FAIL</span>
+ <select class="hideme" id="i25"><option>bogus</option></select> <span class="false">FAIL</span>
+ <select class="hideme" id="i26" disabled="disabled"><option>bogus</option></select> <span class="true">FAIL</span>
+
+ </div>
+
+ <div>
+ option:
+ <select size="4">
+ <option class="true">FAIL</option>
+ <option class="false" disabled="disabled">FAIL</option>
+ <option class="false" id="i27">FAIL</option>
+ <option class="true" id="i28" disabled="disabled">FAIL</option>
+ </select>
+ </div>
+
+ <div>
+ optgroup:
+ <select size="4">
+ <optgroup class="true" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="false" disabled="disabled" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="false" id="i29" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ <optgroup class="true" disabled="disabled" id="i30" label="FAIL">
+ <option class="hideme">bogus</option>
+ </optgroup>
+ </select>
+ </div>
+
+ </form>
+
+ </body>
+</html>
diff --git a/layout/reftests/bugs/84400-2-ref.html b/layout/reftests/bugs/84400-2-ref.html
new file mode 100644
index 0000000000..08dc502347
--- /dev/null
+++ b/layout/reftests/bugs/84400-2-ref.html
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Testing controls that should not match :enabled/:disabled</title>
+ <style type="text/css">
+ input, label, object, *.hideme { display: none; }
+ div { margin-bottom: 1em; }
+
+ span, legend { color: lime; background-color: lime; }
+
+ #test + span { color: lime; background-color: lime; }
+ </style>
+ </head>
+ <body>
+ <div>
+ There should be no red in the following (note: form styling should be enabled).
+ </div>
+
+ <form method="get" action=".">
+ <div>
+ Make sure that :default is actually implemented:
+ <input id="test"/> <span>FAIL</span>
+ </div>
+
+ <div>
+ label:
+ <label>bogus</label> <span>FAIL</span>
+ <label disabled="disabled">bogus</label> <span>FAIL</span>
+ </div>
+
+ <div>
+ legend:
+ <fieldset><legend>FAIL</legend></fieldset>
+ <fieldset><legend disabled="disabled">FAIL</legend></fieldset>
+ <fieldset disabled="disabled"><legend>FAIL</legend></fieldset>
+ </div>
+
+ <div>
+ div (inside form):
+ <div class="hideme">bogus</div> <span>FAIL</span>
+ <div class="hideme" disabled="disabled">bogus</div> <span>FAIL</span>
+ </div>
+
+ </form>
+
+ <div>
+ div (outside form):
+ <div class="hideme">bogus</div> <span>FAIL</span>
+ <div class="hideme" disabled="disabled">bogus</div> <span>FAIL</span>
+ </div>
+
+ <div>
+ object:
+ <object>bogus</object> <span>FAIL</span>
+ <object disabled="disabled">bogus</object> <span>FAIL</span>
+ </div>
+
+ <div>
+ form:
+ <form class="hideme" method="get" action="."><p><input/></p></form> <span>FAIL</span>
+ <form class="hideme" method="get" action="." disabled="disabled"><p><input/></p></form> <span>FAIL</span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/84400-2.html b/layout/reftests/bugs/84400-2.html
new file mode 100644
index 0000000000..03eb67092f
--- /dev/null
+++ b/layout/reftests/bugs/84400-2.html
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Testing controls that should not match :enabled/:disabled</title>
+ <style type="text/css">
+ input, label, object, *.hideme { display: none; }
+ div { margin-bottom: 1em; }
+
+ span, legend { color: lime; background-color: lime; }
+ *:enabled + span, legend:enabled { background-color: red; }
+ *:disabled + span, legend:disabled { background-color: red; }
+
+ #test + span { background-color: red; }
+ #test:enabled + span { color: lime; background-color: lime; }
+ </style>
+ </head>
+ <body>
+ <div>
+ There should be no red in the following (note: form styling should be enabled).
+ </div>
+
+ <form method="get" action=".">
+ <div>
+ Make sure that :default is actually implemented:
+ <input id="test"/> <span>FAIL</span>
+ </div>
+
+ <div>
+ label:
+ <label>bogus</label> <span>FAIL</span>
+ <label disabled="disabled">bogus</label> <span>FAIL</span>
+ </div>
+
+ <div>
+ legend:
+ <fieldset><legend>FAIL</legend></fieldset>
+ <fieldset><legend disabled="disabled">FAIL</legend></fieldset>
+ <fieldset disabled="disabled"><legend>FAIL</legend></fieldset>
+ </div>
+
+ <div>
+ div (inside form):
+ <div class="hideme">bogus</div> <span>FAIL</span>
+ <div class="hideme" disabled="disabled">bogus</div> <span>FAIL</span>
+ </div>
+
+ </form>
+
+ <div>
+ div (outside form):
+ <div class="hideme">bogus</div> <span>FAIL</span>
+ <div class="hideme" disabled="disabled">bogus</div> <span>FAIL</span>
+ </div>
+
+ <div>
+ object:
+ <object>bogus</object> <span>FAIL</span>
+ <object disabled="disabled">bogus</object> <span>FAIL</span>
+ </div>
+
+ <div>
+ form:
+ <form class="hideme" method="get" action="."><p><input/></p></form> <span>FAIL</span>
+ <form class="hideme" method="get" action="." disabled="disabled"><p><input/></p></form> <span>FAIL</span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/844178-ref.html b/layout/reftests/bugs/844178-ref.html
new file mode 100644
index 0000000000..452aef51df
--- /dev/null
+++ b/layout/reftests/bugs/844178-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 844178</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+body {
+ position: fixed;
+ right: 5px;
+ top: 100px;
+ width: 100px;
+ height: 10px;
+ margin:0;
+ padding:0;
+}
+
+:root { overflow:scroll; }
+
+span {
+ background:lime;
+ display:inline-block;
+ width:100px;
+}
+
+</style>
+</head>
+<body><span>Hello</span></body>
+</html>
diff --git a/layout/reftests/bugs/844178.html b/layout/reftests/bugs/844178.html
new file mode 100644
index 0000000000..fc1f1528c1
--- /dev/null
+++ b/layout/reftests/bugs/844178.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 844178</title>
+ <style type="text/css">
+
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+ }
+
+body {
+ position: fixed;
+ right: 0px;
+ top: 100px;
+ width: 100px;
+ height: 10px;
+ margin:0;
+ padding:0;
+}
+
+:root { overflow:scroll; }
+
+span {
+ background:lime;
+ display:inline-block;
+ width:100px;
+}
+
+</style>
+<script>
+function doTest() {
+ document.body.style.right='5px';
+ document.body.offsetHeight;
+ document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body><span>Hello</span></body>
+</html>
diff --git a/layout/reftests/bugs/846144-1-ref.html b/layout/reftests/bugs/846144-1-ref.html
new file mode 100644
index 0000000000..3cf42de657
--- /dev/null
+++ b/layout/reftests/bugs/846144-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>Border radius issue demo</title>
+ <style type="text/css">
+ .testClass {
+ width: 100px;
+ height: 100px;
+ margin: 20px;
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAADdJREFUWEftzTERACAMADH8VAH+hRUXz5K77Dl39gtxRpwRZ8QZcUacEWfEGXFGnBFnxBlxZPYBKVqrOft7R9EAAAAASUVORK5CYII=);
+ border-radius: 50px;
+ /* Adding compatibility attributes for cross-browser comparison
+ Issue repros fine with just transform set. */
+ transform: translate(0,0);
+ -ms-transform: translate(0,0);
+ -webkit-transform: translate(0,0)
+ transform: translate(0,0);
+}
+
+ </style>
+</head>
+<body>
+ <div class="testClass"></div>
+</body></html>
diff --git a/layout/reftests/bugs/846144-1.html b/layout/reftests/bugs/846144-1.html
new file mode 100644
index 0000000000..080372c67d
--- /dev/null
+++ b/layout/reftests/bugs/846144-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>Border radius issue demo</title>
+ <style type="text/css">
+ .testClass {
+ width: 100px;
+ height: 100px;
+ margin: 20px;
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAADdJREFUWEftzTERACAMADH8VAH+hRUXz5K77Dl39gtxRpwRZ8QZcUacEWfEGXFGnBFnxBlxZPYBKVqrOft7R9EAAAAASUVORK5CYII=);
+ border-radius: 50px;
+ background-size: contain;
+ /* Adding compatibility attributes for cross-browser comparison
+ Issue repros fine with just transform set. */
+ transform: translate(0,0);
+ -ms-transform: translate(0,0);
+ -webkit-transform: translate(0,0)
+ transform: translate(0,0);
+}
+ </style>
+</head>
+<body>
+ <div class="testClass"></div>
+</body></html>
diff --git a/layout/reftests/bugs/847850-1-ref.html b/layout/reftests/bugs/847850-1-ref.html
new file mode 100644
index 0000000000..11df041963
--- /dev/null
+++ b/layout/reftests/bugs/847850-1-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Testcase for Bug 847850</title>
+
+<style>
+div
+{
+ position:absolute;
+ background-color:#ddd;
+ width:400px;
+ height:200px;
+}
+</style>
+
+</head>
+<body>
+
+<p>The placeholder text should not be visible:</p>
+<div></div>
+<input type=text></input>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/847850-1.html b/layout/reftests/bugs/847850-1.html
new file mode 100644
index 0000000000..0a8bce50e7
--- /dev/null
+++ b/layout/reftests/bugs/847850-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Testcase for Bug 847850</title>
+
+<style>
+div
+{
+ position:absolute;
+ background-color:#ddd;
+ width:400px;
+ height:200px;
+}
+</style>
+
+</head>
+<body>
+
+<p>The placeholder text should not be visible:</p>
+<div></div>
+<input type=text placeholder="Placeholder text"></input>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/848421-1-ref.html b/layout/reftests/bugs/848421-1-ref.html
new file mode 100644
index 0000000000..9dc37d3b6f
--- /dev/null
+++ b/layout/reftests/bugs/848421-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+html {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAABVJREFUCNcFwQEBAAAAgBD/TxdQqTAp5AX7Y502AAAAAABJRU5ErkJggg==) no-repeat center center fixed; no-repeat center center fixed;
+ background-size: cover;
+ image-rendering: -moz-crisp-edges; /* Firefox */
+}
+</style>
+</head>
+<body>
+</body>
+</html>
diff --git a/layout/reftests/bugs/848421-1.html b/layout/reftests/bugs/848421-1.html
new file mode 100644
index 0000000000..a54c0e239d
--- /dev/null
+++ b/layout/reftests/bugs/848421-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+html {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAABVJREFUCNcFwQEBAAAAgBD/TxdQqTAp5AX7Y502AAAAAABJRU5ErkJggg==) no-repeat center center fixed; no-repeat center center fixed;
+ background-size: cover;
+ image-rendering: -moz-crisp-edges; /* Firefox */
+}
+</style>
+</head>
+<body style="display:none">
+</body>
+</html>
diff --git a/layout/reftests/bugs/849407-1-ref.html b/layout/reftests/bugs/849407-1-ref.html
new file mode 100644
index 0000000000..e762fd7fb2
--- /dev/null
+++ b/layout/reftests/bugs/849407-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <style>
+ legend {
+ width: 200px;
+ height: 100px;
+ overflow: scroll;
+ border: 2px dashed gray;
+ }
+ div.child {
+ background: lightblue;
+ height: 1000px;
+ }
+ </style>
+</head>
+<body>
+ <fieldset>
+ <legend>
+ <div class="child">
+ There should be scrollbars making this area scrollable.
+ </div>
+ </legend>
+ </fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/849407-1.html b/layout/reftests/bugs/849407-1.html
new file mode 100644
index 0000000000..81309873b0
--- /dev/null
+++ b/layout/reftests/bugs/849407-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <style>
+ legend {
+ display: flex;
+ width: 200px;
+ height: 100px;
+ overflow: scroll;
+ border: 2px dashed gray;
+ }
+ div.child {
+ background: lightblue;
+ height: 1000px;
+ }
+ </style>
+</head>
+<body>
+ <fieldset>
+ <legend>
+ <div class="child">
+ There should be scrollbars making this area scrollable.
+ </div>
+ </legend>
+ </fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/849996-1-ref.html b/layout/reftests/bugs/849996-1-ref.html
new file mode 100644
index 0000000000..7b149f1ac8
--- /dev/null
+++ b/layout/reftests/bugs/849996-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#parent {
+ width: 200px;
+ height: 200px;
+ margin-left: 10px;
+ background: green;
+}
+#child {
+ width: 90px;
+ height: 90px;
+ background: red;
+}
+</style>
+</head>
+<body>
+<div id="parent">
+ <div id="child"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/849996-1.html b/layout/reftests/bugs/849996-1.html
new file mode 100644
index 0000000000..b6cef62c2d
--- /dev/null
+++ b/layout/reftests/bugs/849996-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#parent {
+ width: 200px;
+ height: 200px;
+ overflow: hidden;
+ transform: translateX(10px);
+ background: green;
+}
+#child {
+ position: fixed;
+ top: -10px;
+ left: -10px;
+ width: 100px;
+ height: 100px;
+ background: red;
+}
+</style>
+</head>
+<body>
+<div id="parent">
+ <div id="child"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/858803-1-frame.xhtml b/layout/reftests/bugs/858803-1-frame.xhtml
new file mode 100644
index 0000000000..e56af71b2f
--- /dev/null
+++ b/layout/reftests/bugs/858803-1-frame.xhtml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' style='background:yellow'></window>
diff --git a/layout/reftests/bugs/858803-1-ref.html b/layout/reftests/bugs/858803-1-ref.html
new file mode 100644
index 0000000000..631ccf7dc1
--- /dev/null
+++ b/layout/reftests/bugs/858803-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:absolute; left:100px; top:100px; width:300px; height:300px; border:1px solid black; background:yellow"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/858803-1.html b/layout/reftests/bugs/858803-1.html
new file mode 100644
index 0000000000..caafbb3bcc
--- /dev/null
+++ b/layout/reftests/bugs/858803-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<iframe src="858803-1-frame.xhtml" style="position:absolute; left:100px; top:100px; width:300px; height:300px; border:1px solid black;">
+</iframe>
+</body>
+</html>
diff --git a/layout/reftests/bugs/860242-1-ref.html b/layout/reftests/bugs/860242-1-ref.html
new file mode 100644
index 0000000000..36d8738bef
--- /dev/null
+++ b/layout/reftests/bugs/860242-1-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ .table {
+ display: table;
+ width: 100px;
+ table-layout: fixed;
+ margin-bottom: 2px;
+ }
+
+ .table > * {
+ box-sizing: border-box;
+ display: table-cell;
+ height: 30px;
+ }
+
+ .withBorder { border: 2px solid black; }
+
+ .thin { width: 25px; }
+ .wide { width: 75px; }
+
+ .teal { background: teal; }
+ .purple { background: purple; }
+ </style>
+ </head>
+ <body>
+ <div class="table">
+ <div class="thin teal"></div>
+ <div class="wide purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin teal"></div>
+ <div class="wide purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin withBorder teal"></div>
+ <div class="wide withBorder purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin withBorder teal"></div>
+ <div class="wide withBorder purple"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/860242-1.html b/layout/reftests/bugs/860242-1.html
new file mode 100644
index 0000000000..1e8012efa9
--- /dev/null
+++ b/layout/reftests/bugs/860242-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ .table {
+ display: table;
+ width: 100px;
+ table-layout: fixed;
+ margin-bottom: 2px;
+ }
+
+ .table > * {
+ box-sizing: border-box;
+ display: table-cell;
+ height: 30px;
+ }
+
+ .withPadding { padding: 10px; }
+ .withBorder { border: 2px solid black; }
+
+ .thin { width: 25%; }
+ .wide { width: 75%; }
+
+ .teal { background: teal; }
+ .purple { background: purple; }
+ </style>
+ </head>
+ <body>
+ <div class="table">
+ <div class="thin teal"></div>
+ <div class="wide purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin withPadding teal"></div>
+ <div class="wide withPadding purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin withBorder teal"></div>
+ <div class="wide withBorder purple"></div>
+ </div>
+ <div class="table">
+ <div class="thin withBorder withPadding teal"></div>
+ <div class="wide withBorder withPadding purple"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/860370-notref.html b/layout/reftests/bugs/860370-notref.html
new file mode 100644
index 0000000000..3988abd469
--- /dev/null
+++ b/layout/reftests/bugs/860370-notref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="overflow: auto; position: static; width: 200px; height: 200px; display: -moz-box">
+<input type="button" value="Hello" style="position: absolute; width: 100%; height: 100%">
+</div>
diff --git a/layout/reftests/bugs/860370.html b/layout/reftests/bugs/860370.html
new file mode 100644
index 0000000000..4a5a234b7e
--- /dev/null
+++ b/layout/reftests/bugs/860370.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="overflow: auto; position: relative; width: 200px; height: 200px; display: -moz-box">
+<input type="button" value="Hello" style="position: absolute; width: 100%; height: 100%">
+</div>
diff --git a/layout/reftests/bugs/871338-1-ref.html b/layout/reftests/bugs/871338-1-ref.html
new file mode 100644
index 0000000000..15624910e6
--- /dev/null
+++ b/layout/reftests/bugs/871338-1-ref.html
@@ -0,0 +1 @@
+<!DOCTYPE html><body><div style="float: right"><span> <span id="comment-buttons-tools" style="display:inline-block">Report</span></span> <span>HoverMe</span></div>
diff --git a/layout/reftests/bugs/871338-1.html b/layout/reftests/bugs/871338-1.html
new file mode 100644
index 0000000000..271714a2cd
--- /dev/null
+++ b/layout/reftests/bugs/871338-1.html
@@ -0,0 +1 @@
+<!DOCTYPE html><body onload="document.getElementById('comment-buttons-tools').style.display='inline-block'"><div style="float: right"><span> <span id="comment-buttons-tools" style="display:none">Report</span></span> <span>HoverMe</span></div>
diff --git a/layout/reftests/bugs/872254-1-ref.html b/layout/reftests/bugs/872254-1-ref.html
new file mode 100644
index 0000000000..259a945c9f
--- /dev/null
+++ b/layout/reftests/bugs/872254-1-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<style>
+body { height:5000px; overflow:hidden; }
+div {
+ position:relative;
+ top:500px;
+ width:300px;
+ height:300px;
+ background-color:red;
+}
+</style>
+<script>
+window.scrollTo(0,500);
+</script>
+<table>
+<tr><td><div></div></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/872254-1.html b/layout/reftests/bugs/872254-1.html
new file mode 100644
index 0000000000..6bae102a78
--- /dev/null
+++ b/layout/reftests/bugs/872254-1.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<style>
+body { height:5000px; overflow:hidden; }
+div {
+ position:relative;
+ width:300px;
+ height:300px;
+ background-color:red;
+}
+</style>
+<script>
+window.scrollTo(0,0);
+window.addEventListener("MozReftestInvalidate", function() {
+ document.getElementsByTagName("div")[0].style.top = '500px';
+ window.scrollTo(0,500);
+ document.documentElement.removeAttribute("class");
+});
+</script>
+<table>
+<tr><td><div></div></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+<tr><td></td></tr>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/883568-1-ref.html b/layout/reftests/bugs/883568-1-ref.html
new file mode 100644
index 0000000000..2674573ccb
--- /dev/null
+++ b/layout/reftests/bugs/883568-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#testDiv1 {
+ width: 500px;
+ height: 100px;
+}
+</style>
+</head>
+<body>
+<div id="testDiv1" style="background:yellow;"></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/883568-1.html b/layout/reftests/bugs/883568-1.html
new file mode 100644
index 0000000000..e310442637
--- /dev/null
+++ b/layout/reftests/bugs/883568-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+#wrapper {
+ overflow: hidden;
+}
+#testDiv1 {
+ width: 500px;
+ height: 100px;
+ position: relative;
+ overflow: hidden;
+}
+</style>
+<script>
+window.addEventListener("MozReftestInvalidate", function() {
+ testDiv1.style.left = "-500px";
+ testDiv1.style.transform = "translateX(500px)";
+ document.documentElement.removeAttribute("class");
+});
+</script>
+</head>
+<body>
+<div id="wrapper">
+ <div id="testDiv1" style="background:yellow;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/883987-1-ref.html b/layout/reftests/bugs/883987-1-ref.html
new file mode 100644
index 0000000000..b2e2b10077
--- /dev/null
+++ b/layout/reftests/bugs/883987-1-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+</style>
diff --git a/layout/reftests/bugs/883987-1a.html b/layout/reftests/bugs/883987-1a.html
new file mode 100644
index 0000000000..6deeda0463
--- /dev/null
+++ b/layout/reftests/bugs/883987-1a.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (color: red) or (content: "foo
+) {
+ body { background: red }
+}
+</style>
diff --git a/layout/reftests/bugs/883987-1b.html b/layout/reftests/bugs/883987-1b.html
new file mode 100644
index 0000000000..24fcd2d9d1
--- /dev/null
+++ b/layout/reftests/bugs/883987-1b.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (color: red) or (content: url("foo" "bar")) {
+ body { background: red }
+}
+</style>
diff --git a/layout/reftests/bugs/883987-1c.html b/layout/reftests/bugs/883987-1c.html
new file mode 100644
index 0000000000..fe1ffa7ab6
--- /dev/null
+++ b/layout/reftests/bugs/883987-1c.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (color: red) or (url("foo" "bar")) {
+ body { background: red }
+}
+</style>
diff --git a/layout/reftests/bugs/883987-1d.html b/layout/reftests/bugs/883987-1d.html
new file mode 100644
index 0000000000..bf33adca9f
--- /dev/null
+++ b/layout/reftests/bugs/883987-1d.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (color: red) or ("foo
+) {
+ body { background: red }
+}
+</style>
diff --git a/layout/reftests/bugs/883987-1e.html b/layout/reftests/bugs/883987-1e.html
new file mode 100644
index 0000000000..28e66b718f
--- /dev/null
+++ b/layout/reftests/bugs/883987-1e.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (color: red) or (content: url("foo
+)) {
+ body { background: red }
+}
+</style>
diff --git a/layout/reftests/bugs/883987-1f.html b/layout/reftests/bugs/883987-1f.html
new file mode 100644
index 0000000000..c978dd4017
--- /dev/null
+++ b/layout/reftests/bugs/883987-1f.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+body { background: green }
+@supports (not "foo
+{}
+body { background: red }
+</style>
diff --git a/layout/reftests/bugs/890495-1-ref.html b/layout/reftests/bugs/890495-1-ref.html
new file mode 100644
index 0000000000..336e402c09
--- /dev/null
+++ b/layout/reftests/bugs/890495-1-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+<fieldset>
+ <legend id="leg" style="margin-left: 100px;">Legend</legend>
+ fieldset contents
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/890495-1.html b/layout/reftests/bugs/890495-1.html
new file mode 100644
index 0000000000..7acf6aa7ed
--- /dev/null
+++ b/layout/reftests/bugs/890495-1.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script type="text/javascript">
+function run() {
+ document.documentElement.offsetLeft;
+ var leg = document.getElementById('leg');
+ leg.style.marginLeft = '100px';
+}
+</script>
+</head>
+<body onload="run();">
+<fieldset>
+ <legend id="leg">Legend</legend>
+ fieldset contents
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/894931-1-ref.html b/layout/reftests/bugs/894931-1-ref.html
new file mode 100644
index 0000000000..bed8ffb61f
--- /dev/null
+++ b/layout/reftests/bugs/894931-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="position:relative; margin-top:100px;">
+ <div style="background:yellow; width:100px; height:100px; position:absolute"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/894931-1.html b/layout/reftests/bugs/894931-1.html
new file mode 100644
index 0000000000..83d33e6e4f
--- /dev/null
+++ b/layout/reftests/bugs/894931-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d" style="margin-top:100px;">
+ <div style="background:yellow; width:100px; height:100px; position:absolute; top:0; left:0"></div>
+</div>
+<script>
+function doTest() {
+ document.getElementById("d").style.position = "relative";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/897491-1-ref.html b/layout/reftests/bugs/897491-1-ref.html
new file mode 100644
index 0000000000..e8d89d4426
--- /dev/null
+++ b/layout/reftests/bugs/897491-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<img id="img1" src="about:blank" alt="alt1">
+<img id="img2" src="about:blank">
+</body>
+</html>
diff --git a/layout/reftests/bugs/897491-1.html b/layout/reftests/bugs/897491-1.html
new file mode 100644
index 0000000000..2b989800a1
--- /dev/null
+++ b/layout/reftests/bugs/897491-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<img id="img1" src="about:blank">
+<img id="img2" src="about:blank" alt="alt2">
+<script>
+function doTest() {
+ document.getElementById("img1").setAttribute("alt", "alt1");
+ document.getElementById("img2").removeAttribute("alt");
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("load", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/897491-2-ref.html b/layout/reftests/bugs/897491-2-ref.html
new file mode 100644
index 0000000000..921733e680
--- /dev/null
+++ b/layout/reftests/bugs/897491-2-ref.html
@@ -0,0 +1,7 @@
+<!--quirks mode test-->
+<html>
+<body>
+<img id="img1" src="about:blank" alt="alt1">
+<img id="img2" src="about:blank">
+</body>
+</html>
diff --git a/layout/reftests/bugs/897491-2.html b/layout/reftests/bugs/897491-2.html
new file mode 100644
index 0000000000..2c2365b152
--- /dev/null
+++ b/layout/reftests/bugs/897491-2.html
@@ -0,0 +1,15 @@
+<!--quirks mode test-->
+<html class="reftest-wait">
+<body>
+<img id="img1" src="about:blank">
+<img id="img2" src="about:blank" alt="alt2">
+<script>
+function doTest() {
+ document.getElementById("img1").setAttribute("alt", "alt1");
+ document.getElementById("img2").removeAttribute("alt");
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("load", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/902330-1-ref.html b/layout/reftests/bugs/902330-1-ref.html
new file mode 100644
index 0000000000..fbf6a9b27a
--- /dev/null
+++ b/layout/reftests/bugs/902330-1-ref.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<style>
+canvas {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ width: 300px;
+ height: 300px;
+}
+</style>
+</head>
+<body>
+<canvas id="c" height="300px" width="300px"></canvas>
+<script>
+var c = document.getElementById('c');
+var ctxt = c.getContext('2d');
+ctxt.fillStyle = 'rgb(0,255,0)';
+ctxt.fillRect(0, 0, 300, 300);
+ctxt.fillStyle = 'rgba(255,255,255,0.5)';
+ctxt.fillRect(100, 100, 100, 100);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/902330-1.html b/layout/reftests/bugs/902330-1.html
new file mode 100644
index 0000000000..338908ba6e
--- /dev/null
+++ b/layout/reftests/bugs/902330-1.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<style>
+canvas {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ width: 300px;
+ height: 300px;
+}
+div.inner {
+ position: absolute;
+ top: 200px;
+ left: 200px;
+ width: 100px;
+ height: 100px;
+ opacity: 0.5;
+ background-color: #ffffff;
+}
+</style>
+</head>
+<body>
+<canvas id="c" height="300px" width="300px"></canvas>
+<script>
+var c = document.getElementById('c');
+var ctxt = c.getContext('2d');
+ctxt.fillStyle = 'rgb(0,255,0)';
+ctxt.fillRect(0, 0, 300, 300);
+</script>
+<div class="inner">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/906199-1-ref.html b/layout/reftests/bugs/906199-1-ref.html
new file mode 100644
index 0000000000..c494dce827
--- /dev/null
+++ b/layout/reftests/bugs/906199-1-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+ position:relative;
+ width:300px;
+ height:200px;
+ left:50px;
+ top:50px;
+}
+.grandparentdiv {
+ background:yellow;
+ overflow:hidden;
+}
+.childdiv {
+ background:green;
+}
+.grandchilddiv {
+ background:red;
+}
+</style>
+</head>
+<body>
+<div class="grandparentdiv">
+ <div class="childdiv">
+ <div class="grandchilddiv"></div>
+ </div>
+</div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/906199-1.html b/layout/reftests/bugs/906199-1.html
new file mode 100644
index 0000000000..98f4548a79
--- /dev/null
+++ b/layout/reftests/bugs/906199-1.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+ position:relative;
+ width:300px;
+ height:200px;
+ left:50px;
+ top:50px;
+ transform-style:preserve-3d;
+}
+.grandparentdiv {
+ background:yellow;
+ overflow:hidden;
+}
+.childdiv {
+ background:green;
+}
+.grandchilddiv {
+ background:red;
+}
+</style>
+</head>
+<body>
+<div class="grandparentdiv">
+ <div class="childdiv">
+ <div class="grandchilddiv"></div>
+ </div>
+</div>
+</body>
+</html>
+
diff --git a/layout/reftests/bugs/921716-1-ref.html b/layout/reftests/bugs/921716-1-ref.html
new file mode 100644
index 0000000000..9867757387
--- /dev/null
+++ b/layout/reftests/bugs/921716-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+div {
+ column-count: 3;
+ column-gap: 8px;
+ width: 300px;
+}
+</style>
+<div>
+ <span>This is some content that is still shown within the columns.</span>
+</div>
diff --git a/layout/reftests/bugs/921716-1.html b/layout/reftests/bugs/921716-1.html
new file mode 100644
index 0000000000..8c16057bf1
--- /dev/null
+++ b/layout/reftests/bugs/921716-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+ column-count: 3;
+ column-gap: 8px;
+ column-rule: thick solid red;
+ visibility: hidden;
+ width: 300px;
+ background-color: #fcc;
+}
+span {
+ visibility: visible;
+}
+</style>
+<div>
+ <span>This is some content that is still shown within the columns.</span>
+</div>
diff --git a/layout/reftests/bugs/926155-1-ref.html b/layout/reftests/bugs/926155-1-ref.html
new file mode 100644
index 0000000000..3ad788eb84
--- /dev/null
+++ b/layout/reftests/bugs/926155-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="overflow-x:hidden">
+ <div id="testdiv" style="width:200px;margin-top:50px;height:10px;background-color:green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/926155-1.html b/layout/reftests/bugs/926155-1.html
new file mode 100644
index 0000000000..68ad4fcbdf
--- /dev/null
+++ b/layout/reftests/bugs/926155-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <div style="overflow:hidden;height:100px">
+ <div style="overflow-x:hidden;position:sticky;top:50px">
+ <div id="testdiv" style="width:10px;height:10px;background-color:green"></div>
+ </div>
+ </div>
+ <script>
+ function doTest() {
+ var x = document.getElementById('testdiv');
+ x.style.width = "200px";
+ document.documentElement.className = "";
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/928607-1-ref.html b/layout/reftests/bugs/928607-1-ref.html
new file mode 100644
index 0000000000..d5886c855b
--- /dev/null
+++ b/layout/reftests/bugs/928607-1-ref.html
@@ -0,0 +1,8 @@
+<DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:hidden; border:1px solid black;">
+ <div style="position:relative; left:50px; height:10px; background:blue;"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/928607-1.html b/layout/reftests/bugs/928607-1.html
new file mode 100644
index 0000000000..f35ac902ba
--- /dev/null
+++ b/layout/reftests/bugs/928607-1.html
@@ -0,0 +1,15 @@
+<DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div style="overflow:hidden; border:1px solid black;">
+ <div id="d" style="position:relative; left:10px; height:10px; background:blue;"></div>
+</div>
+<script>
+function doTest() {
+ d.style.left = "50px";
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/931464-1-ref.html b/layout/reftests/bugs/931464-1-ref.html
new file mode 100644
index 0000000000..6c71b339ce
--- /dev/null
+++ b/layout/reftests/bugs/931464-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+<fieldset style="overflow: auto;">Hello Kitty</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/bugs/931464-1.html b/layout/reftests/bugs/931464-1.html
new file mode 100644
index 0000000000..a2168ae544
--- /dev/null
+++ b/layout/reftests/bugs/931464-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+<fieldset id="f" style="overflow: auto;"></fieldset>
+<script>
+function boom()
+{
+ var f = document.getElementById("f");
+ var s = document.createElement("span");
+ s.textContent = "Hello Kitty";
+ f.appendChild(s);
+ document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", boom);
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/931853-quirks-ref.html b/layout/reftests/bugs/931853-quirks-ref.html
new file mode 100644
index 0000000000..0f48c88e26
--- /dev/null
+++ b/layout/reftests/bugs/931853-quirks-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 931853</title>
+ <style type="text/css">
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:10px; margin:0;
+ }
+
+div { height:7em; margin-bottom:2px; overflow:hidden; border:1px solid black;}
+img { margin-left:30px; margin-top:-150px; vertical-align:top; }
+span { display:inline-block; position:relative; height:0; xborder:1px solid red; }
+ </style>
+</head>
+<body>
+
+<div><br><br><br><span style="bottom:50px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></span></div>
+<div><br><br><br><span style="bottom:20px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></div>
+<div><br><br><br><span style="bottom:0px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></div>
+<div><br><br><br><span style="bottom:120px"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:0px"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/931853-quirks.html b/layout/reftests/bugs/931853-quirks.html
new file mode 100644
index 0000000000..1462ae9d1e
--- /dev/null
+++ b/layout/reftests/bugs/931853-quirks.html
@@ -0,0 +1,22 @@
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 931853</title>
+ <style type="text/css">
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:10px; margin:0;
+ }
+
+div { height:7em; margin-bottom:2px; overflow:hidden; border:1px solid black;}
+img { margin-left:30px; }
+
+ </style>
+</head>
+<body>
+
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-200px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-170px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-150px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-120px"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/931853-ref.html b/layout/reftests/bugs/931853-ref.html
new file mode 100644
index 0000000000..5e12f20e43
--- /dev/null
+++ b/layout/reftests/bugs/931853-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 931853</title>
+ <style type="text/css">
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:10px; margin:0;
+ }
+
+
+div { height:7em; margin-bottom:2px; overflow:hidden; border:1px solid black;}
+img { margin-left:30px; margin-top:-150px; }
+span { display:inline-block; height:0px; position:relative; line-height:0; }
+ </style>
+</head>
+<body>
+
+<div><br><br><br><span style="bottom:0px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></span></div>
+<div><br><br><br><span style="bottom:0px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></div>
+<div><br><br><br><span style="bottom:0px "><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150"></div>
+<div><br><br><br><span style="bottom:120px"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:0px"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/931853.html b/layout/reftests/bugs/931853.html
new file mode 100644
index 0000000000..00023c2598
--- /dev/null
+++ b/layout/reftests/bugs/931853.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 931853</title>
+ <style type="text/css">
+ html,body {
+ color:black; background-color:white; font-size:16px; padding:10px; margin:0;
+ }
+
+div { height:7em; margin-bottom:2px; overflow:hidden; border:1px solid black;}
+img { margin-left:30px; }
+
+ </style>
+</head>
+<body>
+
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-200px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-170px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-150px"></div>
+<div><br><br><br><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs=" width="350" height="150" style="margin-top:-120px"></div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/933264-1-ref.html b/layout/reftests/bugs/933264-1-ref.html
new file mode 100644
index 0000000000..4384f065ef
--- /dev/null
+++ b/layout/reftests/bugs/933264-1-ref.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>The Grid in an overflowing div</title>
+ <style type="text/css">
+ html {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ table {
+ padding: 0;
+ margin: 0;
+ border-top: none;
+ border-left: none;
+ border-right: 1px solid black;
+ border-bottom: 1px solid black;
+ }
+ tr {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ td {
+ /* top border counts as part of height, but
+ left border doesn't count as part of width.
+ go figure.
+ */
+ min-height: 99px;
+ height: 99px;
+ max-height: 99px;
+ min-width: 99px;
+ width: 99px;
+ max-width: 99px;
+ padding: 0;
+ border-left: 1px solid black;
+ border-top: 1px solid black;
+ border-right: none;
+ border-bottom: none;
+ margin: 0;
+ font-size: 12px;
+ text-align: left;
+ vertical-align: top;
+ font-family: monospace;
+ }
+ </style>
+ <script type="text/javascript">
+ var val = 900;
+ function scroll() {
+ var div = document.getElementById('nest');
+ div.scrollLeft = val;
+ div.scrollTop = val;
+ document.documentElement.removeAttribute('class');
+ }
+
+ window.onload = scroll;
+ </script>
+ </head>
+ <body>
+ <div style="color: red">this text is above the scrolling div. the div below is 300x400</div>
+ <div id="nest" style="overflow: scroll; height: 400px; width: 300px; border: solid 1px black">
+ <div style="background: blue; width: 5000px; height: 5000px;"></div>
+ </div>
+ <div style="color: red">this text is below the scrolling div</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/933264-1.html b/layout/reftests/bugs/933264-1.html
new file mode 100644
index 0000000000..2d8c66c165
--- /dev/null
+++ b/layout/reftests/bugs/933264-1.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>The Grid in an overflowing div</title>
+ <style type="text/css">
+ html {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ table {
+ padding: 0;
+ margin: 0;
+ border-top: none;
+ border-left: none;
+ border-right: 1px solid black;
+ border-bottom: 1px solid black;
+ }
+ tr {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ td {
+ /* top border counts as part of height, but
+ left border doesn't count as part of width.
+ go figure.
+ */
+ min-height: 99px;
+ height: 99px;
+ max-height: 99px;
+ min-width: 99px;
+ width: 99px;
+ max-width: 99px;
+ padding: 0;
+ border-left: 1px solid black;
+ border-top: 1px solid black;
+ border-right: none;
+ border-bottom: none;
+ margin: 0;
+ font-size: 12px;
+ text-align: left;
+ vertical-align: top;
+ font-family: monospace;
+ }
+ </style>
+ <script type="text/javascript">
+ var val = 100;
+ var max = 1000;
+ function scrollmore() {
+ if (val == max) {
+ document.documentElement.removeAttribute('class');
+ return;
+ }
+ var div = document.getElementById('nest');
+ div.scrollLeft = val;
+ div.scrollTop = val;
+ val += 100;
+ document.documentElement.offsetLeft;
+ setTimeout(scrollmore, 500);
+ }
+
+ window.onload = scrollmore;
+ </script>
+ </head>
+ <body>
+ <div style="color: red">this text is above the scrolling div. the div below is 300x400</div>
+ <div id="nest" style="overflow: scroll; height: 400px; width: 300px; border: solid 1px black">
+ <div style="background: blue; width: 5000px; height: 5000px;">text</div>
+ </div>
+ <div style="color: red">this text is below the scrolling div</div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/935056-1-ref.html b/layout/reftests/bugs/935056-1-ref.html
new file mode 100644
index 0000000000..35adbcddb6
--- /dev/null
+++ b/layout/reftests/bugs/935056-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+* { margin: 3px; }
+p { font: 32px serif; }
+text { font: 16px serif; }
+</style>
+<p>This text should be affected by the minimum font size.</p>
+<svg width="800" height="40">
+ <text x="10" y="20">This text should not be affected by the minimum font size.</text>
+</svg>
diff --git a/layout/reftests/bugs/935056-1.html b/layout/reftests/bugs/935056-1.html
new file mode 100644
index 0000000000..b7e80eca17
--- /dev/null
+++ b/layout/reftests/bugs/935056-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+* { margin: 3px; }
+p, text { font: 16px serif; }
+</style>
+<p>This text should be affected by the minimum font size.</p>
+<svg width="800" height="40">
+ <text x="10" y="20">This text should not be affected by the minimum font size.</text>
+</svg>
diff --git a/layout/reftests/bugs/936670-1-ref.svg b/layout/reftests/bugs/936670-1-ref.svg
new file mode 100644
index 0000000000..76113de856
--- /dev/null
+++ b/layout/reftests/bugs/936670-1-ref.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <path d="M 100,100 l 4,8 h -8 z" fill="red"/>
+ <g transform="translate(100,100)" style="text-anchor: end; font: 16px sans-serif">
+ <text>hello</text>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/936670-1.svg b/layout/reftests/bugs/936670-1.svg
new file mode 100644
index 0000000000..6a16f77eaf
--- /dev/null
+++ b/layout/reftests/bugs/936670-1.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <path d="M 100,100 l 4,8 h -8 z" fill="red"/>
+ <g transform="translate(100,100)" style="text-anchor: end; font: 16px sans-serif">
+ <text> hello</text>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/941940-1-ref.html b/layout/reftests/bugs/941940-1-ref.html
new file mode 100644
index 0000000000..c9b1bac844
--- /dev/null
+++ b/layout/reftests/bugs/941940-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<p><tt>foobar</tt>
+<p><tt>foo bar</tt>
+<pre>
+foo
+bar
+</pre>
diff --git a/layout/reftests/bugs/941940-1.html b/layout/reftests/bugs/941940-1.html
new file mode 100644
index 0000000000..147f48025d
--- /dev/null
+++ b/layout/reftests/bugs/941940-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<p><tt>foo&#13;bar</tt>
+<p><tt>foo&#13;&#10;bar</tt>
+<pre>
+foo&#13;
+bar&#13;
+</pre>
diff --git a/layout/reftests/bugs/942017-ref.html b/layout/reftests/bugs/942017-ref.html
new file mode 100644
index 0000000000..220ae60625
--- /dev/null
+++ b/layout/reftests/bugs/942017-ref.html
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>Bug 942017</title>
+
+ <style type="text/css">
+@font-face {
+ font-family: DejaVuSansMono;
+ src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
+}
+
+ html,body {
+ color:black; background-color:white; font-size:24px; font-family:DejaVuSansMono; padding:20px; margin:0;
+ }
+
+ div {
+ float: left;
+ padding: 1em 2em;
+ outline: 2px solid black;
+ background: black;
+ }
+
+ div.a { line-height: 0.5em; }
+ div.b { line-height: 2em; }
+ div.i l { margin-left:2.84ch; }
+
+ l { display:block; outline:1px solid green; width:1ch; direction:rtl; white-space:nowrap; }
+ x { display:inline-block; width:2.84ch; height:1px; vertical-align:top; }
+ </style>
+</head>
+<body>
+ <div class="a">
+ <l>X<x></x></l>
+ <l>X<x></x></l>
+ </div>
+
+<br clear="all">
+
+ <div class="b">
+ <l>X<x></x></l>
+ <l>X<x></x></l>
+ </div>
+
+<br clear="all">
+
+ <div class="a i">
+ <l>X<x></x></l>
+ <l>X<x></x></l>
+ </div>
+
+<br clear="all">
+
+ <div class="b i">
+ <l>X<x></x></l>
+ <l>X<x></x></l>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/942017.html b/layout/reftests/bugs/942017.html
new file mode 100644
index 0000000000..20260d6a08
--- /dev/null
+++ b/layout/reftests/bugs/942017.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>Bug 942017</title>
+
+ <style type="text/css">
+@font-face {
+ font-family: DejaVuSansMono;
+ src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
+}
+
+ html,body {
+ color:black; background-color:white; font-size:24px; font-family:DejaVuSansMono; padding:20px; margin:0;
+ }
+
+ div {
+ float: left;
+ padding: 1em 2em;
+ outline: 2px solid black;
+ background: black;
+ list-style-type: decimal;
+ }
+
+ div.a { line-height: 0.5em; }
+ div.b { line-height: 2em; }
+ div.i { list-style-position: inside; }
+
+ li { outline:1px solid green; padding:0; margin:0; letter-spacing:0; }
+
+ </style>
+</head>
+<body>
+
+ <div class="a">
+ <li>X</li>
+ <li>X</li>
+ </div>
+
+<br clear="all">
+
+ <div class="b">
+ <li>X</li>
+ <li>X</li>
+ </div>
+
+<br clear="all">
+
+ <div class="a i">
+ <li>X</li>
+ <li>X</li>
+ </div>
+
+<br clear="all">
+
+ <div class="b i">
+ <li>X</li>
+ <li>X</li>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/942672-1-ref.html b/layout/reftests/bugs/942672-1-ref.html
new file mode 100644
index 0000000000..1322684d1d
--- /dev/null
+++ b/layout/reftests/bugs/942672-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:white">
+<div style="opacity:0.5; background:white; height:200px; padding:2px;"><button>Hello</button></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/942672-1.html b/layout/reftests/bugs/942672-1.html
new file mode 100644
index 0000000000..2f21d7afba
--- /dev/null
+++ b/layout/reftests/bugs/942672-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background:white">
+<div style="opacity:0.5; height:200px; padding:2px;"><button>Hello</button></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/944291-1-ref.html b/layout/reftests/bugs/944291-1-ref.html
new file mode 100644
index 0000000000..2beca9acb0
--- /dev/null
+++ b/layout/reftests/bugs/944291-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#d1 {
+ width: 250px;
+ height: 200px;
+ margin: 200px;
+ transform: translateY(10px);
+}
+#d1.hidden {
+ transform: translateY(20px);
+}
+#d2 {
+ background-color: yellow;
+ position: relative;
+ width: 100px;
+ height: 100px;
+ left: 0;
+}
+.hidden > #d2 {
+ left: -100px;
+}
+</style>
+</head>
+<body>
+<div id="d1" class="hidden">
+ <div id="d2"></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/944291-1.html b/layout/reftests/bugs/944291-1.html
new file mode 100644
index 0000000000..a8a6389327
--- /dev/null
+++ b/layout/reftests/bugs/944291-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+#d1 {
+ width: 250px;
+ height: 200px;
+ margin: 200px;
+ transform: translateY(10px);
+}
+#d1.hidden {
+ transform: translateY(20px);
+}
+#d2 {
+ background-color: yellow;
+ position: relative;
+ width: 100px;
+ height: 100px;
+ left: 0;
+}
+.hidden > #d2 {
+ left: -100px;
+}
+</style>
+</head>
+<body>
+<div id="d1">
+ <div id="d2"></div>
+</div>
+<script>
+window.addEventListener("MozReftestInvalidate", function() {
+ d1.classList.toggle("hidden");
+ document.documentElement.removeAttribute("class");
+});
+</script>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-basic-1-ref.html b/layout/reftests/bugs/9458-basic-1-ref.html
new file mode 100644
index 0000000000..379d53de7c
--- /dev/null
+++ b/layout/reftests/bugs/9458-basic-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+</head>
+<body>
+<p>abc</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-basic-1.html b/layout/reftests/bugs/9458-basic-1.html
new file mode 100644
index 0000000000..393111a771
--- /dev/null
+++ b/layout/reftests/bugs/9458-basic-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" />
+<meta name="assert" content="This value causes an element to generate a block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an inline replaced element." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge." />
+<meta name="flags" content="" />
+<style type="text/css">
+span { display: inline-block; }
+</style>
+</head>
+<body>
+<p>a<span>b</span>c</p>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-height-1-ref.html b/layout/reftests/bugs/9458-height-1-ref.html
new file mode 100644
index 0000000000..8ea4c7158a
--- /dev/null
+++ b/layout/reftests/bugs/9458-height-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { width: 10em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>Test<br>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-height-1.html b/layout/reftests/bugs/9458-height-1.html
new file mode 100644
index 0000000000..5fb21e05b7
--- /dev/null
+++ b/layout/reftests/bugs/9458-height-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for height:auto on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height" />
+<meta name="flags" content="" />
+<style type="text/css">
+div { display: inline-block; width: 10em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>Test<br>Test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-height-2-ref.html b/layout/reftests/bugs/9458-height-2-ref.html
new file mode 100644
index 0000000000..043489d715
--- /dev/null
+++ b/layout/reftests/bugs/9458-height-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { height: 5em; width:10em; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-height-2.html b/layout/reftests/bugs/9458-height-2.html
new file mode 100644
index 0000000000..15075e403f
--- /dev/null
+++ b/layout/reftests/bugs/9458-height-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for height:&lt;length&gt; on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height" />
+<meta name="flags" content="" />
+<style type="text/css">
+div { display: inline-block; height: 5em; width:10em; vertical-align: baseline; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>test</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-valign-1-ref.html b/layout/reftests/bugs/9458-valign-1-ref.html
new file mode 100644
index 0000000000..decfc1e76f
--- /dev/null
+++ b/layout/reftests/bugs/9458-valign-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+</head>
+<body>
+<table border height="200"><tr><td valign="bottom">
+<p>abcde</p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-valign-1.html b/layout/reftests/bugs/9458-valign-1.html
new file mode 100644
index 0000000000..2e85c530b4
--- /dev/null
+++ b/layout/reftests/bugs/9458-valign-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for vertical alignment on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" />
+<meta name="assert" content="This value causes an element to generate a block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an inline replaced element." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge." />
+<meta name="flags" content="" />
+<style type="text/css">
+span { display: inline-block; }
+span > span { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<table border height="200"><tr><td valign="bottom">
+<p>a<span><span>x</span>bcd</span>e</p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-valign-2-ref.html b/layout/reftests/bugs/9458-valign-2-ref.html
new file mode 100644
index 0000000000..65aecd0b4f
--- /dev/null
+++ b/layout/reftests/bugs/9458-valign-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+body { background: white; color: black; }
+span { display: inline-block; margin: 3px 0; border: 4px solid white; border-width: 4px 0; padding: 9px 0; }
+span > span { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<table border><tr><td>
+<p><span><span>x</span>abcde</span></p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-valign-2.html b/layout/reftests/bugs/9458-valign-2.html
new file mode 100644
index 0000000000..b57858234c
--- /dev/null
+++ b/layout/reftests/bugs/9458-valign-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for vertical alignment on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" />
+<meta name="assert" content="This value causes an element to generate a block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an inline replaced element." />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" />
+<meta name="assert" content="The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge." />
+<meta name="flags" content="" />
+<style type="text/css">
+body { background: white; color: black; }
+span { display: inline-block; margin: 3px 0; border: 4px solid white; border-width: 4px 0; padding: 9px 0; }
+span > span { display: block; visibility: hidden; }
+</style>
+</head>
+<body>
+<table border><tr><td>
+<p>a<span><span>x</span>bcd</span>e</p>
+</td></tr></table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-1-ref.html b/layout/reftests/bugs/9458-width-1-ref.html
new file mode 100644
index 0000000000..f467568e73
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { background: green; color: white; }
+</style>
+</head>
+<body>
+<div>x<div>This is some text that is wider than 10em but has no words wider than 10em.</div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-1a.html b/layout/reftests/bugs/9458-width-1a.html
new file mode 100644
index 0000000000..6403312c55
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-1a.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width: auto' on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-block; background: green; color: white; }
+</style>
+</head>
+<body>
+<div>x <div>This is some text that is wider than 10em but has no words wider than 10em.</div> z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-1b.html b/layout/reftests/bugs/9458-width-1b.html
new file mode 100644
index 0000000000..8f3869ae06
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-1b.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width: auto' on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-block; background: green; color: white; width: 10em; }
+</style>
+</head>
+<body>
+<div>x <div>This is some text that is wider than 10em but has no words wider than 10em.</div> z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-2-ref.html b/layout/reftests/bugs/9458-width-2-ref.html
new file mode 100644
index 0000000000..0acdfbb811
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-2-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { background: green; color: white; width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div>y</div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-2a.html b/layout/reftests/bugs/9458-width-2a.html
new file mode 100644
index 0000000000..18e905b847
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-2a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width: auto' on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-block; background: green; color: white; }
+body > div > div > div { width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div><div>y</div></div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-width-2b.html b/layout/reftests/bugs/9458-width-2b.html
new file mode 100644
index 0000000000..6b03e8fc81
--- /dev/null
+++ b/layout/reftests/bugs/9458-width-2b.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for 'width: &lt;length&gt;' on inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+<meta name="flags" content="" />
+<style type="text/css">
+body > div { width: 10em; }
+body > div > div { display: inline-block; background: green; color: white; width: 20em; }
+body > div > div > div { width: 20em; }
+</style>
+</head>
+<body>
+<div>x<div><div>y</div></div>z</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-1.html b/layout/reftests/bugs/9458-zorder-1.html
new file mode 100644
index 0000000000..2927e2c21b
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<style type="text/css">
+div { width: 2em; height: 1em; }
+span { display:inline-block; vertical-align: top; width: 2em; height: 1em; background: green; }
+div#after { margin-top:-1em; background: red; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;</span></div>
+<div id="after">&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-2.html b/layout/reftests/bugs/9458-zorder-2.html
new file mode 100644
index 0000000000..e5f1f3ec40
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<style type="text/css">
+div { width: 2em; height: 1em; }
+span { display:inline-block; vertical-align: top; width: 2em; height: 1em; }
+span span { display: block; background: green; }
+div#after { margin-top: -1em; background: red; }
+</style>
+</head>
+<body>
+<div><span><span>&nbsp;</span></span></div>
+<div id="after">&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-3.html b/layout/reftests/bugs/9458-zorder-3.html
new file mode 100644
index 0000000000..23abb0d28a
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<style type="text/css">
+div { height: 1em; }
+div#test span { display:inline-block; vertical-align: top; height: 1em; background: red; color: red; }
+div#after { margin-top:-1em; }
+div#after span { display: inline; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div id="test"><span>&nbsp;x&nbsp;</span></div>
+<div id="after"><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-4.html b/layout/reftests/bugs/9458-zorder-4.html
new file mode 100644
index 0000000000..c0309bd61e
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-4.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<style type="text/css">
+div#test span { display:inline-block; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+div#before { height: 1em; margin-bottom:-1em; }
+div#before span { display: inline; vertical-align: top; background: red; color: red; }
+</style>
+</head>
+<body>
+<div id="before"><span>&nbsp;x&nbsp;</span></div>
+<div id="test"><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-5.html b/layout/reftests/bugs/9458-zorder-5.html
new file mode 100644
index 0000000000..f11aabfc9c
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-5.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Test for z-ordering of inline-block</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" />
+<style type="text/css">
+div#test > span { display:inline-block; vertical-align: top; }
+div#test > span > span { display: block; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+div#before { height: 1em; margin-bottom:-1em; }
+div#before > span { display: inline; vertical-align: top; background: red; color: red; }
+</style>
+</head>
+<body>
+<div id="before"><span>&nbsp;x&nbsp;</span></div>
+<div id="test"><span><span>&nbsp;x&nbsp;</span></span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-ref-inline-block.html b/layout/reftests/bugs/9458-zorder-ref-inline-block.html
new file mode 100644
index 0000000000..dd33a2c10d
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-ref-inline-block.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+span { display: inline-block; vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-ref-inline.html b/layout/reftests/bugs/9458-zorder-ref-inline.html
new file mode 100644
index 0000000000..71c0b8409c
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-ref-inline.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+span { vertical-align: top; background: green; color: green; border-bottom: 0.25em solid green; border-top: 0.25em solid green; }
+</style>
+</head>
+<body>
+<div><span>&nbsp;x&nbsp;</span></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/9458-zorder-ref.html b/layout/reftests/bugs/9458-zorder-ref.html
new file mode 100644
index 0000000000..a5f736d030
--- /dev/null
+++ b/layout/reftests/bugs/9458-zorder-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS 2.1 Test Suite: Reference for inline-block test</title>
+<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+<style type="text/css">
+div { display:block; width: 2em; height: 1em; background: green; }
+</style>
+</head>
+<body>
+<div>&nbsp;</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/950436-1-ref.html b/layout/reftests/bugs/950436-1-ref.html
new file mode 100644
index 0000000000..42ff61d1d3
--- /dev/null
+++ b/layout/reftests/bugs/950436-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+body { background-image: url(950436-1.png); }
+</style>
+<body>
diff --git a/layout/reftests/bugs/950436-1.html b/layout/reftests/bugs/950436-1.html
new file mode 100644
index 0000000000..fbc2e07a4d
--- /dev/null
+++ b/layout/reftests/bugs/950436-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+/* It's important here to reference an image that has not previously been loaded
+ during the reftest run. So don't use 950436-1.png in any other test. */
+body { --a: url(950436-1.png); background-image: var(--a); }
+</style>
+<body>
diff --git a/layout/reftests/bugs/950436-1.png b/layout/reftests/bugs/950436-1.png
new file mode 100644
index 0000000000..4718c00e62
--- /dev/null
+++ b/layout/reftests/bugs/950436-1.png
Binary files differ
diff --git a/layout/reftests/bugs/953334-win32-clipping-ref.html b/layout/reftests/bugs/953334-win32-clipping-ref.html
new file mode 100644
index 0000000000..e07bf159eb
--- /dev/null
+++ b/layout/reftests/bugs/953334-win32-clipping-ref.html
@@ -0,0 +1,22 @@
+<style type="text/css">
+#descdiv{
+overflow: hidden;
+height: 60px;
+border: 1px solid red;
+}
+#descdiv p{
+height:30px;
+margin:0;
+/* The shadow of the text will be inside the overflow-hidden but the text it self will not.
+ This causes the text to be drawn even when it's outside of the clip*/
+text-shadow: #fff 1px -1px 2px;
+}
+
+</style>
+
+<div id="descdiv">
+<p class="um_desc">&nbsp;</p>
+<p class="um_desc">&nbsp;</p>
+<p class="um_desc">&nbsp;</p>
+</div>
+
diff --git a/layout/reftests/bugs/953334-win32-clipping.html b/layout/reftests/bugs/953334-win32-clipping.html
new file mode 100644
index 0000000000..91db71af63
--- /dev/null
+++ b/layout/reftests/bugs/953334-win32-clipping.html
@@ -0,0 +1,22 @@
+<style type="text/css">
+#descdiv{
+overflow: hidden;
+height: 60px;
+border: 1px solid red;
+}
+#descdiv p{
+height:30px;
+margin:0;
+/* The shadow of the text will be inside the overflow-hidden but the text it self will not.
+ This causes the text to be drawn even when it's outside of the clip*/
+text-shadow: #fff 1px -1px 2px;
+}
+
+</style>
+
+<div id="descdiv">
+<p class="um_desc">&nbsp;</p>
+<p class="um_desc">&nbsp;</p>
+<p class="um_desc">sed diam nonummy nibh</p>
+</div>
+
diff --git a/layout/reftests/bugs/956513-1-ref.svg b/layout/reftests/bugs/956513-1-ref.svg
new file mode 100644
index 0000000000..c9f39b5297
--- /dev/null
+++ b/layout/reftests/bugs/956513-1-ref.svg
@@ -0,0 +1,10 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <path id="p" d="M0 100h400"/>
+ <path d="M0 102h400" stroke="blue" stroke-width="1px"/>
+ <circle cx="200" cy="102" r="3" fill="blue"/>
+ <text><textPath font-size="16px" text-anchor="middle" startOffset="50%" xlink:href="#p">Text should be centered on the line.</textPath></text>
+</svg>
diff --git a/layout/reftests/bugs/956513-1.svg b/layout/reftests/bugs/956513-1.svg
new file mode 100644
index 0000000000..f7980a0781
--- /dev/null
+++ b/layout/reftests/bugs/956513-1.svg
@@ -0,0 +1,10 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <path id="p" d="M0 100h400"/>
+ <path d="M0 102h400" stroke="blue" stroke-width="1px"/>
+ <circle cx="200" cy="102" r="3" fill="blue"/>
+ <text xml:space="preserve"> <textPath font-size="16px" text-anchor="middle" startOffset="50%" xlink:href="#p">Text should be centered on the line.</textPath> </text>
+</svg>
diff --git a/layout/reftests/bugs/957770-1-ref.svg b/layout/reftests/bugs/957770-1-ref.svg
new file mode 100644
index 0000000000..b1236d1b51
--- /dev/null
+++ b/layout/reftests/bugs/957770-1-ref.svg
@@ -0,0 +1,10 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+ <text x="80" y="80" font-size="32px" font-family="sans-serif"
+ dominant-baseline="text-before-edge" text-decoration="underline">
+ Hello, out there
+ </text>
+</svg>
diff --git a/layout/reftests/bugs/957770-1.svg b/layout/reftests/bugs/957770-1.svg
new file mode 100644
index 0000000000..0ec3f28b81
--- /dev/null
+++ b/layout/reftests/bugs/957770-1.svg
@@ -0,0 +1,12 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+ <g transform="scale(2)">
+ <text x="40" y="40" font-size="16px" font-family="sans-serif"
+ dominant-baseline="text-before-edge" text-decoration="underline">
+ Hello, out there
+ </text>
+ </g>
+</svg>
diff --git a/layout/reftests/bugs/960277-1-ref.html b/layout/reftests/bugs/960277-1-ref.html
new file mode 100644
index 0000000000..67f8ba33db
--- /dev/null
+++ b/layout/reftests/bugs/960277-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<style>
+#d { overflow:scroll; width:200px; height:200px; background:yellow; transform:translateX(100px); }
+#d2 { right:0; width:100px; height:100px; background:purple; position:absolute; }
+</style>
+<div id="d">
+ <div id="d2"></div>
+</div>
diff --git a/layout/reftests/bugs/960277-1.html b/layout/reftests/bugs/960277-1.html
new file mode 100644
index 0000000000..14ec621353
--- /dev/null
+++ b/layout/reftests/bugs/960277-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<style>
+#d { overflow:scroll; width:200px; height:200px; background:yellow; }
+#d2 { right:0; width:100px; height:100px; background:purple; }
+</style>
+<div id="d">
+ <div id="d2"></div>
+</div>
+<script>
+d.getBoundingClientRect();
+d.style.transform = "translateX(100px)";
+d.getBoundingClientRect();
+d2.style.position = "absolute";
+</script>
diff --git a/layout/reftests/bugs/961887-1-ref.html b/layout/reftests/bugs/961887-1-ref.html
new file mode 100644
index 0000000000..78673a8228
--- /dev/null
+++ b/layout/reftests/bugs/961887-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<title>Don't pull background colors of container layers through DrawAboveRegions of ThebesLayers</title>
+<style>
+
+#outer {
+ transform: translateX(1px);
+}
+
+#above {
+ position: absolute;
+ top: 50px;
+ left: 50px;
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="outer">
+ <div style="height: 100px; width: 200px; background-color: lime;"></div>
+ <div id="above"></div>
+</div>
diff --git a/layout/reftests/bugs/961887-1.html b/layout/reftests/bugs/961887-1.html
new file mode 100644
index 0000000000..65ff8d242c
--- /dev/null
+++ b/layout/reftests/bugs/961887-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<title>Don't pull background colors of container layers through DrawAboveRegions of ThebesLayers</title>
+<style>
+
+#outer {
+ transform: translateX(1px);
+}
+
+#above {
+ position: absolute;
+ top: 50px;
+ left: 50px;
+ width: 100px;
+ height: 100px;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id="outer">
+ <canvas id="canvas" height="100" width="200"></canvas>
+ <div id="above"></div>
+</div>
+
+<script>
+var canvas = document.getElementById("canvas");
+var cx = canvas.getContext("2d");
+cx.fillStyle="lime";
+cx.fillRect(0, 0, 200, 100);
+</script>
diff --git a/layout/reftests/bugs/961887-2-ref.html b/layout/reftests/bugs/961887-2-ref.html
new file mode 100644
index 0000000000..e484b399f9
--- /dev/null
+++ b/layout/reftests/bugs/961887-2-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Make sure that we don't pull background colors into container layers that have effects applied on them</title>
+
+<style>
+
+#outer {
+ background-color: white;
+ border: 1px solid black;
+}
+
+#outer > div {
+ margin: 20px;
+ border: 1px solid black;
+ height: 20px;
+}
+
+</style>
+
+<div id="outer">
+ <div id="inner1"></div>
+ <div id="inner2"></div>
+</div>
diff --git a/layout/reftests/bugs/961887-2.html b/layout/reftests/bugs/961887-2.html
new file mode 100644
index 0000000000..6d499740aa
--- /dev/null
+++ b/layout/reftests/bugs/961887-2.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Make sure that we don't pull background colors into container layers that have effects applied on them</title>
+
+<style>
+
+#outer {
+ background-color: white;
+ border: 1px solid black;
+}
+
+#outer > div {
+ margin: 20px;
+ border: 1px solid white;
+ height: 20px;
+}
+
+#inner1 {
+ mix-blend-mode: difference;
+}
+
+#inner2 {
+ filter: invert(100%);
+}
+
+</style>
+
+<div id="outer">
+ <div id="inner1"></div>
+ <div id="inner2"></div>
+</div>
diff --git a/layout/reftests/bugs/961887-3-ref.html b/layout/reftests/bugs/961887-3-ref.html
new file mode 100644
index 0000000000..0d9b3cb30d
--- /dev/null
+++ b/layout/reftests/bugs/961887-3-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test container background searching with clipped display items</title>
+
+<style>
+
+#box {
+ width: 200px;
+ height: 200px;
+ background-color: lime;
+}
+
+</style>
+
+<div id="box"></div>
diff --git a/layout/reftests/bugs/961887-3.html b/layout/reftests/bugs/961887-3.html
new file mode 100644
index 0000000000..b70f03a188
--- /dev/null
+++ b/layout/reftests/bugs/961887-3.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Test container background searching with clipped display items</title>
+
+<style>
+
+div {
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ margin-bottom: -200px;
+}
+
+#outer {
+ background-color: red;
+}
+
+#container {
+ will-change: opacity;
+}
+
+#backgroundCover {
+ background-color: lime;
+}
+
+#roundedClip {
+ overflow: hidden;
+ border-radius: 20px;
+}
+
+#clippedItem {
+ background-color: lime;
+}
+
+#separatePaintedLayer {
+ position: sticky;
+ border: 1px solid lime;
+}
+
+</style>
+
+<div id="outer">
+ <div id="container">
+ <div id="backgroundCover"></div>
+ <div id="roundedClip">
+ <div id="clippedItem"></div>
+ </div>
+ <div id="separatePaintedLayer"></div>
+ </div>
+</div>
diff --git a/layout/reftests/bugs/966510-1-ref.html b/layout/reftests/bugs/966510-1-ref.html
new file mode 100644
index 0000000000..37a5cec4c1
--- /dev/null
+++ b/layout/reftests/bugs/966510-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll>
+<body>
+ <div reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1000"
+ style="overflow: scroll; position: absolute; top: 0; left: 0; bottom: 0; right: 0; z-index: 3;">
+ <div style="background: purple; height: 50px;"></div>
+ </div>
+ <div style="width: 50px; height: 50px; background: url('solidblue.png'); position: absolute; top: 100px; left: 50px; z-index: 4;">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/966510-1.html b/layout/reftests/bugs/966510-1.html
new file mode 100644
index 0000000000..aa179b1507
--- /dev/null
+++ b/layout/reftests/bugs/966510-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll>
+<body>
+ <div reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1000"
+ style="overflow: scroll; position: absolute; top: 0; left: 0; bottom: 0; right: 0; z-index: 3;">
+ <div style="background: purple; height: 50px;"></div>
+ </div>
+ <div style="width: 50px; height: 50px; background: url('solidblue.png'); position: absolute; top: 100px; left: 50px; z-index: 2;">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/966510-2-ref.html b/layout/reftests/bugs/966510-2-ref.html
new file mode 100644
index 0000000000..98f379490a
--- /dev/null
+++ b/layout/reftests/bugs/966510-2-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+ <div style="width: 50px; height: 50px; background: url('solidblue.png'); position: absolute; top: 100px; left: 50px;">
+ </div>
+ <div id="scrollframe" style="overflow: scroll; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+ <div style="background: purple; height: 50px;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/966510-2.html b/layout/reftests/bugs/966510-2.html
new file mode 100644
index 0000000000..291524b62b
--- /dev/null
+++ b/layout/reftests/bugs/966510-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll>
+<body>
+ <div style="width: 50px; height: 50px; background: url('solidblue.png'); position: absolute; top: 100px; left: 50px;">
+ </div>
+ <div reftest-displayport-x="0" reftest-displayport-y="0"
+ reftest-displayport-w="800" reftest-displayport-h="1000"
+ style="overflow: scroll; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
+ <div style="background: purple; height: 50px;"></div>
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/966992-1-ref.html b/layout/reftests/bugs/966992-1-ref.html
new file mode 100644
index 0000000000..7d9234fa83
--- /dev/null
+++ b/layout/reftests/bugs/966992-1-ref.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcases for overflow-clip-box:content-box</title>
+ <style type="text/css">
+html,body {
+ color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
+}
+
+input {
+ width: 100px; padding:50px; -moz-appearance:none; overflow-clip-box:padding-box;
+ border: 3px solid black;
+ background-color: white;
+ font-family: monospace;
+}
+
+p {
+ position:absolute;
+ margin:0;
+ width:70%;
+ height: 1px;
+ background:magenta;
+}
+.rel p { width:200%; }
+.block {
+ border:1px solid grey; height:50px; width:200px; padding:20px;
+ overflow:auto; overflow-clip-box:padding-box;
+}
+.rel { position:relative; }
+.mask1 { position:absolute; width:20px; background:white; top:0; bottom:0; right:0; }
+.mask2 { position:absolute; width:20px; background:white; top:0px; bottom:-15px; right:220px; z-index:99; }
+.mask3 { position:absolute; width:20px; background:white; top:0; bottom:0; left:200px; }
+.mask4 { position:absolute; height:40px; background:white; top:4px; left:3px; width:210px; z-index:99; }
+.mask5 { position:absolute; height:40px; background:white; top:3px; right:3px; width:50px; }
+.button { width:100px; padding:0 50px; overflow:hidden; }
+ </style>
+</head>
+<body>
+
+<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p style="padding-right:20px"></p><div class=mask1></div></div>
+<div style="float:right">
+
+<div class="rel block" style="box-sizing:border-box;height:90px"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><div class=mask1></div></div>
+
+</div>
+
+<div class="rel block"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><p></p><div class=mask1></div></div>
+<div id="d1" class="rel block"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><span style="position:relative;"><div class=mask2></div><div class=mask1></div></span><p></p></div>
+<script>
+document.getElementById("d1").scrollLeft = "100000";
+</script>
+<div class="block"><span style="padding-right:20px"><span style="position:relative;"><div class=mask3></div>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span></span><p></p></div>
+
+<span style="position:relative"><input spellcheck=false type="text" placeholder="someveryveryveryveryverylongvalue"><div class=mask5></div></span>
+<span style="position:relative"><input spellcheck=false type="text" value="someveryveryveryveryverylongvalue"><div class=mask5></div></span><br>
+<span style="position:relative"><input spellcheck=false type="password" value="someveryveryveryveryverylongpassword"><div class=mask5></div></span>
+<span style="position:relative"><input spellcheck=false type="email" value="someveryveryveryveryverylongvalue"><div class=mask5></div></span>
+<span style="position:relative"><input spellcheck=false type="blah" value="someveryveryveryveryverylongvalue"><div class=mask5></div></span>
+<br>
+<input spellcheck=false type="button" value="button" class="button" style="overflow-clip-box:initial">
+<input spellcheck=false type="button" value="button" class="button">
+<input spellcheck=false type="reset" class="button">
+<input spellcheck=false type="submit" class="button"><br>
+<input spellcheck=false type="button" value="" class="button">
+<input spellcheck=false type="reset" value="" class="button">
+<input spellcheck=false type="submit" value="" class="button"><br>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/966992-1.html b/layout/reftests/bugs/966992-1.html
new file mode 100644
index 0000000000..2038c613ed
--- /dev/null
+++ b/layout/reftests/bugs/966992-1.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcases for overflow-clip-box:content-box</title>
+ <style type="text/css">
+html,body {
+ color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
+}
+
+input {
+ width: 100px; padding:50px; -moz-appearance:none; overflow-clip-box:content-box;
+ border: 3px solid black;
+ background-color: white;
+ font-family: monospace;
+}
+
+p {
+ position:absolute;
+ margin:0;
+ width:70%;
+ height: 1px;
+ background:magenta;
+}
+.rel p { width:200%; }
+.block {
+ border:1px solid grey; height:50px; width:200px; padding:20px;
+ overflow:auto; overflow-clip-box:content-box;
+}
+.rel { position:relative; }
+.button { width:0px; padding:0 50px; overflow:hidden; }
+.pb { overflow-clip-box:padding-box; }
+.cb { overflow-clip-box:content-box; }
+ </style>
+</head>
+<body>
+
+<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
+<div style="float:right">
+
+<div class="block" style="-moz-box-sizing:border-box;height:90px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div>
+</div>
+
+<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
+<div id="d1" class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
+<script>
+document.getElementById("d1").scrollLeft = "100000";
+</script>
+<div class="block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
+
+<input spellcheck=false type="text" placeholder="someveryveryveryveryverylongvalue">
+<input spellcheck=false type="text" value="someveryveryveryveryverylongvalue"><br>
+<input spellcheck=false type="password" value="someveryveryveryveryverylongpassword">
+<input spellcheck=false type="email" value="someveryveryveryveryverylongvalue">
+<input spellcheck=false type="blah" value="someveryveryveryveryverylongvalue"><br>
+<input spellcheck=false type="button" value="button" class="button" style="overflow-clip-box:initial">
+<input spellcheck=false type="button" value="button" class="button pb">
+<input spellcheck=false type="reset" class="button pb">
+<input spellcheck=false type="submit" class="button pb"><br>
+<input spellcheck=false type="button" value="button" class="button cb">
+<input spellcheck=false type="reset" class="button cb">
+<input spellcheck=false type="submit" class="button cb"><br>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/97777-1-ref.html b/layout/reftests/bugs/97777-1-ref.html
new file mode 100644
index 0000000000..8fc7b1792b
--- /dev/null
+++ b/layout/reftests/bugs/97777-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>Bug 97777-1 Reference</title>
+ <style type="text/css">div.top {position: absolute; background: #CCCCCC}</style>
+</head>
+<body>
+<div class="top" style="top: 0.5em"><div>Box 1</div></div>
+<div class="top" style="top: 2.5em"><div>Box 2</div></div>
+<div class="top" style="top: 4.5em"><table><tr><td>Box 3</td></tr></table></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/97777-1.html b/layout/reftests/bugs/97777-1.html
new file mode 100644
index 0000000000..a6734bae8f
--- /dev/null
+++ b/layout/reftests/bugs/97777-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>Bug 97777-1</title>
+ <style type="text/css">div.top {position: absolute; background: #CCCCCC}</style>
+</head>
+<body>
+<div class="top" style="top: 0.5em" align="center"><div>Box 1</div></div>
+<div class="top" style="top: 2.5em"><center><div>Box 2</div></center></div>
+<div class="top" style="top: 4.5em"><table align="center"><tr><td>Box 3</td></tr></table></div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/97777-2-ref.html b/layout/reftests/bugs/97777-2-ref.html
new file mode 100644
index 0000000000..6d469a1529
--- /dev/null
+++ b/layout/reftests/bugs/97777-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>Bug 97777-2 Reference</title>
+ <style type="text/css">
+ table {position: absolute; border-collapse: collapse; background: #CCCCCC}
+ div.sub {border: solid blue}
+ p {border: solid red}
+ td {padding: 0px; text-align: center}
+ </style>
+</head>
+<body>
+<table style="top: 16.5em"><tr><td>
+ <p style="float: left">Float</p>
+ <div class="sub" style="-moz-float-edge: margin-box">Should be shrink-wrapped [align="center", float-edge="margin-box"]</div>
+</table>
+<table style="top: 20.5em"><tr><td>
+ <p style="float: right">Float</p>
+ <div class="sub" style="-moz-float-edge: margin-box">Should be shrink-wrapped [align="center", float-edge="margin-box"]</div>
+</table>
+</body>
+</html>
diff --git a/layout/reftests/bugs/97777-2.html b/layout/reftests/bugs/97777-2.html
new file mode 100644
index 0000000000..b217588ac4
--- /dev/null
+++ b/layout/reftests/bugs/97777-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>Bug 97777-2</title>
+ <style type="text/css">
+ div.top {position: absolute; border: 0px; background: #CCCCCC}
+ div.sub {border: solid blue}
+ p {border: solid red}
+ </style>
+</head>
+<body>
+<div class="top" style="top: 16.5em" align="center">
+ <p style="float: left">Float</p>
+ <div class="sub" style="-moz-float-edge: margin-box">Should be shrink-wrapped [align="center", float-edge="margin-box"]</div>
+</div>
+<div class="top" style="top: 20.5em" align="center">
+ <p style="float: right">Float</p>
+ <div class="sub" style="-moz-float-edge: margin-box">Should be shrink-wrapped [align="center", float-edge="margin-box"]</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/978911-1-ref.svg b/layout/reftests/bugs/978911-1-ref.svg
new file mode 100644
index 0000000000..53329dd781
--- /dev/null
+++ b/layout/reftests/bugs/978911-1-ref.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>The circle should shrink and move to upper-left a bit.
+ It should remain a circle, with no artifacts left behind.</title>
+ <defs>
+ <circle id="smiley" fill="orange" cx="50" cy="50" r="20"/>
+ </defs>
+ <use id="target" xlink:href="#smiley" transform="scale(1.8)"/>
+</svg>
diff --git a/layout/reftests/bugs/978911-1.svg b/layout/reftests/bugs/978911-1.svg
new file mode 100644
index 0000000000..aa4e341a17
--- /dev/null
+++ b/layout/reftests/bugs/978911-1.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="reftest-wait">
+ <title>The circle should shrink and move to upper-left a bit.
+ It should remain a circle, with no artifacts left behind.</title>
+ <script>
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ function doTest() {
+ document.getElementById("target").setAttribute("transform", "scale(1.8)");
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ <defs>
+ <circle id="smiley" fill="orange" cx="50" cy="50" r="20"/>
+ </defs>
+ <use id="target" xlink:href="#smiley" transform="scale(2)"/>
+</svg>
diff --git a/layout/reftests/bugs/98223-1-ref.html b/layout/reftests/bugs/98223-1-ref.html
new file mode 100644
index 0000000000..34b7fa7b19
--- /dev/null
+++ b/layout/reftests/bugs/98223-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+<title>Testcase #1 for bug 98223</title>
+
+<style type="text/css">
+
+ .outer { position:relative; padding-left:50px; height:100px; width:50px; border:thin solid;}
+ .inner { position:absolute; height:50px; width:50px; background-color:lime; }
+
+</style>
+
+
+</head>
+
+<body>
+
+ <div style="position:absolute; width:200px">
+ <div class="outer">
+ <div class="inner"></div>
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/98223-1.html b/layout/reftests/bugs/98223-1.html
new file mode 100644
index 0000000000..7b220a97ec
--- /dev/null
+++ b/layout/reftests/bugs/98223-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+<title>Testcase #1 for bug 98223</title>
+
+<style type="text/css">
+
+ .outer { position:relative; padding-left:25%; height:100px; width:50px; border:thin solid;}
+ .inner { position:absolute; height:50px; width:50px; background-color:lime; }
+ .red { position:absolute; height:50px; width:50px; background-color:red; top:0;right:0}
+
+</style>
+
+
+</head>
+
+<body>
+
+ <div style="position:absolute; width:200px">
+ <div class="outer">
+ <div class="red"></div>
+ <div class="inner"></div>
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/98223-2-ref.html b/layout/reftests/bugs/98223-2-ref.html
new file mode 100644
index 0000000000..7cf3cceca3
--- /dev/null
+++ b/layout/reftests/bugs/98223-2-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+<title>Testcase #2 for bug 98223</title>
+
+<style type="text/css">
+
+ .outer { padding-left:150px; height:100px; width:50px; background: yellow; }
+ .inner { position:absolute; height:50px; width:50px; background-color:lime; }
+
+</style>
+
+
+</head>
+<body>
+
+ <div style="position:absolute; width:200px">
+ <div class="outer">
+ <div class="inner"></div>
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/98223-2.html b/layout/reftests/bugs/98223-2.html
new file mode 100644
index 0000000000..3f28c6c7b1
--- /dev/null
+++ b/layout/reftests/bugs/98223-2.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+<title>Testcase #2 for bug 98223</title>
+
+<style type="text/css">
+
+ .outer { padding-left:75%; height:100px; width:50px; background: yellow; }
+ .inner { position:absolute; height:50px; width:50px; background-color:lime; }
+ .red { position:absolute; height:50px; width:50px; background-color:red; top:0;right:0}
+
+</style>
+
+
+</head>
+<body>
+
+ <div style="position:absolute; width:200px">
+ <div class="outer">
+ <div class="red"></div>
+ <div class="inner"></div>
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/983084-1-ref.html b/layout/reftests/bugs/983084-1-ref.html
new file mode 100644
index 0000000000..6c808407ae
--- /dev/null
+++ b/layout/reftests/bugs/983084-1-ref.html
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <div id="one" style="width:50px; height:50px; background-color:blue; position:absolute"></div>
+ <div id="two" style="width:500px; height:500px; background-color:red"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983084-1.html b/layout/reftests/bugs/983084-1.html
new file mode 100644
index 0000000000..3d00539476
--- /dev/null
+++ b/layout/reftests/bugs/983084-1.html
@@ -0,0 +1,17 @@
+<html class="reftest-wait">
+ <head>
+ <script>
+ function showItem() {
+ var el = document.getElementById("two");
+ getComputedStyle(el).opacity; // flush styles
+ el.style.opacity = 1;
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", showItem);
+ </script>
+ </head>
+ <body>
+ <div id="one" style="width:50px; height:50px; background-color:blue; position:absolute"></div>
+ <div id="two" style="width:500px; height:500px; background-color:red; opacity:0.99"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983084-2-ref.html b/layout/reftests/bugs/983084-2-ref.html
new file mode 100644
index 0000000000..2f7d3b12ed
--- /dev/null
+++ b/layout/reftests/bugs/983084-2-ref.html
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <div id="one" style="width:50px; height:50px; background-color:blue; position:absolute"></div>
+ <div id="two" style="width:500px; height:500px; background-color:red; opacity:0.99"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983084-2.html b/layout/reftests/bugs/983084-2.html
new file mode 100644
index 0000000000..14458580c8
--- /dev/null
+++ b/layout/reftests/bugs/983084-2.html
@@ -0,0 +1,24 @@
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ transition: opacity 0.1s;
+ }
+ </style>
+ <script>
+ function showItem() {
+ var el = document.getElementById("two");
+ getComputedStyle(el).opacity; // flush styles
+ el.style.opacity = 0.99;
+ document.addEventListener("transitionend", function() {
+ document.documentElement.removeAttribute("class");
+ });
+ }
+ window.addEventListener("MozReftestInvalidate", showItem);
+ </script>
+ </head>
+ <body>
+ <div id="one" style="width:50px; height:50px; background-color:blue; position:absolute"></div>
+ <div id="two" style="width:500px; height:500px; background-color:red; opacity:0.5"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983084-3.html b/layout/reftests/bugs/983084-3.html
new file mode 100644
index 0000000000..eedb6b98b1
--- /dev/null
+++ b/layout/reftests/bugs/983084-3.html
@@ -0,0 +1,24 @@
+<html class="reftest-wait">
+ <head>
+ <style>
+ div {
+ transition: opacity 0.1s;
+ }
+ </style>
+ <script>
+ function showItem() {
+ var el = document.getElementById("two");
+ getComputedStyle(el).opacity; // flush styles
+ el.style.opacity = 1;
+ document.addEventListener("transitionend", function() {
+ document.documentElement.removeAttribute("class");
+ });
+ }
+ window.addEventListener("MozReftestInvalidate", showItem);
+ </script>
+ </head>
+ <body>
+ <div id="one" style="width:50px; height:50px; background-color:blue; position:absolute"></div>
+ <div id="two" style="width:500px; height:500px; background-color:red; opacity:0.5"></div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983691-1.html b/layout/reftests/bugs/983691-1.html
new file mode 100644
index 0000000000..94ded1299c
--- /dev/null
+++ b/layout/reftests/bugs/983691-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ @font-face {
+ src: url(../fonts/Ahem.ttf);
+ font-family: AhemReftest;
+ }
+ span { line-height: 1.0; font-family: AhemReftest; font-size: 30px }
+ </style>
+ </head>
+ <body>
+ <div>
+ <span>XXX
+ <span style="vertical-align:text-bottom">XXX</span>
+ <span style="vertical-align:text-top">XXX</span>
+ </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983691-ref.html b/layout/reftests/bugs/983691-ref.html
new file mode 100644
index 0000000000..28f41e5d53
--- /dev/null
+++ b/layout/reftests/bugs/983691-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ @font-face {
+ src: url(../fonts/Ahem.ttf);
+ font-family: AhemReftest;
+ }
+ span { line-height: 1.0; font-family: AhemReftest; font-size: 30px }
+ </style>
+ </head>
+ <body>
+ <div>
+ <span>XXX XXX XXX</span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/bugs/983985-1-ref.html b/layout/reftests/bugs/983985-1-ref.html
new file mode 100644
index 0000000000..4a8d7e94d7
--- /dev/null
+++ b/layout/reftests/bugs/983985-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 983985</title>
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+}
+body {
+ font: 36px test;
+}
+</style>
+</head>
+<body>
+hello &#x530; world
+</body>
+</html>
diff --git a/layout/reftests/bugs/983985-1.html b/layout/reftests/bugs/983985-1.html
new file mode 100644
index 0000000000..44b7837159
--- /dev/null
+++ b/layout/reftests/bugs/983985-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 983985</title>
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+}
+body {
+ font: 36px test;
+}
+</style>
+</head>
+<body>
+hello <i>&#x530;</i> world
+</body>
+</html>
diff --git a/layout/reftests/bugs/983985-2-ref.html b/layout/reftests/bugs/983985-2-ref.html
new file mode 100644
index 0000000000..732bd1c817
--- /dev/null
+++ b/layout/reftests/bugs/983985-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 983985</title>
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+}
+.outer {
+ font: italic 36px test;
+ width: 2.5em; /* enough to display "hello" but not the hexbox */
+ overflow: hidden;
+}
+.inner {
+ width: 10em;
+}
+</style>
+</head>
+<body>
+<div class="outer">
+<div class="inner">
+hello <em>&#x530;</em> world
+</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/983985-2.html b/layout/reftests/bugs/983985-2.html
new file mode 100644
index 0000000000..39a88428f0
--- /dev/null
+++ b/layout/reftests/bugs/983985-2.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug 983985</title>
+<style>
+@font-face {
+ font-family: test;
+ src: url(../fonts/dejavu-sans/DejaVuSans.ttf);
+}
+.outer {
+ font: italic 36px test;
+ width: 2.5em; /* enough to display "hello" but not the hexbox */
+ overflow: hidden;
+}
+.inner {
+ width: 10em;
+}
+</style>
+</head>
+<body>
+<div class="outer">
+<div class="inner">
+hello &#x530; world
+</div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/985303-1-ref.html b/layout/reftests/bugs/985303-1-ref.html
new file mode 100644
index 0000000000..b2744a15bc
--- /dev/null
+++ b/layout/reftests/bugs/985303-1-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#container {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+}
+#image {
+ width: 100px;
+ height: 100px;
+ margin: 100px;
+ background: blue;
+ display: inline-block;
+}
+#cursor {
+ position: absolute;
+ left: 10px;
+ top: 0;
+ width: 10px;
+ height: 10px;
+ background: red;
+}
+</style>
+</head>
+<body>
+<div id='container'>
+ <div id='image'></div>
+ <div id='cursor'></div>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/bugs/985303-1a.html b/layout/reftests/bugs/985303-1a.html
new file mode 100644
index 0000000000..79ca7c199f
--- /dev/null
+++ b/layout/reftests/bugs/985303-1a.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#container {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+}
+#image {
+ width: 100px;
+ height: 100px;
+ margin: 100px;
+ background: blue;
+ display: inline-block;
+}
+#cursor {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 10px;
+ height: 10px;
+ background: red;
+}
+</style>
+</head>
+<body>
+<div id='container'>
+ <div id='image'></div>
+ <div id='cursor'></div>
+</div>
+</body>
+<script>
+var x = image.getBoundingClientRect();
+cursor.style.left = '10px';
+</script>
+</html>
diff --git a/layout/reftests/bugs/985303-1b.html b/layout/reftests/bugs/985303-1b.html
new file mode 100644
index 0000000000..a68f326dc7
--- /dev/null
+++ b/layout/reftests/bugs/985303-1b.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#container {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+}
+#image {
+ width: 100px;
+ height: 100px;
+ margin: 100px;
+ background: blue;
+ display: inline-block;
+}
+#cursor {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 10px;
+ height: 10px;
+ background: red;
+}
+</style>
+</head>
+<body>
+<div id='container'>
+ <div style="position:relative">
+ <div id='image'></div>
+ <div id='cursor'></div>
+ </div>
+</div>
+</body>
+<script>
+var x = image.getBoundingClientRect();
+cursor.style.left = '10px';
+</script>
+</html>
diff --git a/layout/reftests/bugs/987680-1-ref.html b/layout/reftests/bugs/987680-1-ref.html
new file mode 100644
index 0000000000..04ff7d0335
--- /dev/null
+++ b/layout/reftests/bugs/987680-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.container {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+ position: relative;
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div style="width: 10px; height: 10px; left: 0px; top: 60px; background: white; position: absolute; z-index: 1;"></div>
+ <div style="background: green; height: 40px;"></div>
+ <div style="height: 300px;"></div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/987680-1.html b/layout/reftests/bugs/987680-1.html
new file mode 100644
index 0000000000..267c3b2dc6
--- /dev/null
+++ b/layout/reftests/bugs/987680-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.container {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+ position: relative;
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div style="background: green; height: 40px;"></div>
+ <div style="height: 300px;"></div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/bugs/991046-1-ref.html b/layout/reftests/bugs/991046-1-ref.html
new file mode 100644
index 0000000000..e287dfb753
--- /dev/null
+++ b/layout/reftests/bugs/991046-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252"><title>box-shadow + transparent background + opacity =&gt; overflow hidden does not work</title></head>
+<body>
+<style>
+#parent {
+ width: 200px;
+ height: 200px;
+ background-color: #BADA55;
+ overflow: hidden;
+ position: relative;
+}
+
+#child {
+ width: 200px;
+ height: 200px;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ box-shadow: 0 0 5px rgba(0,0,0,0.5);
+}
+</style>
+
+<div id="parent">
+ <div id="child"></div>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/991046-1.html b/layout/reftests/bugs/991046-1.html
new file mode 100644
index 0000000000..f12d8900d5
--- /dev/null
+++ b/layout/reftests/bugs/991046-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252"><title>box-shadow + transparent background + opacity =&gt; overflow hidden does not work</title></head>
+<body>
+<style>
+#parent {
+ width: 200px;
+ height: 200px;
+ background-color: #BADA55;
+ overflow: hidden;
+ position: relative;
+}
+
+#child {
+ width: 200px;
+ height: 200px;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ box-shadow: 0 0 5px rgb(0,0,0);
+ opacity: 0.5;
+}
+</style>
+
+<div id="parent">
+ <div id="child"></div>
+</div>
+
+
+</body></html>
diff --git a/layout/reftests/bugs/992447-ref.html b/layout/reftests/bugs/992447-ref.html
new file mode 100644
index 0000000000..ff8a114ce2
--- /dev/null
+++ b/layout/reftests/bugs/992447-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 992447</title>
+ <style type="text/css">
+
+select { border:solid; width:100px; padding:10px; outline:3px dotted blue; }
+
+ </style>
+</head>
+<body>
+<select size=1><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=1 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/992447.html b/layout/reftests/bugs/992447.html
new file mode 100644
index 0000000000..a2a17d3ea8
--- /dev/null
+++ b/layout/reftests/bugs/992447.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 992447</title>
+ <style type="text/css">
+
+select { border:solid; width:100px; padding:10px; overflow-clip-box:content-box; outline:3px dotted blue; }
+
+ </style>
+</head>
+<body>
+<select size=1><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=1 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+<br>
+<br>
+<select size=2 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select>
+
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/99850-1-ref.html b/layout/reftests/bugs/99850-1-ref.html
new file mode 100644
index 0000000000..b2f73be132
--- /dev/null
+++ b/layout/reftests/bugs/99850-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+
+<body>
+
+<a href="http://mozilla.org/do_not_visit" style="color: #009933;">unvisited link</a>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/99850-1a.html b/layout/reftests/bugs/99850-1a.html
new file mode 100644
index 0000000000..fc6a7f92a7
--- /dev/null
+++ b/layout/reftests/bugs/99850-1a.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="text/javascript">
+
+function change_colors()
+{
+ document.linkColor = "#FF0000";
+ document.linkColor = "#009933";
+}
+
+</script>
+</head>
+
+<body onload="change_colors()">
+
+<a href="http://mozilla.org/do_not_visit">unvisited link</a>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/99850-1b.html b/layout/reftests/bugs/99850-1b.html
new file mode 100644
index 0000000000..662efeff73
--- /dev/null
+++ b/layout/reftests/bugs/99850-1b.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+
+function change_colors()
+{
+ document.linkColor = "#FF0000";
+ setTimeout(change_colors_2, 30);
+}
+
+function change_colors_2()
+{
+ document.linkColor = "#009933";
+ document.documentElement.removeAttribute("class");
+}
+
+</script>
+</head>
+
+<body onload="change_colors()">
+
+<a href="http://mozilla.org/do_not_visit">unvisited link</a>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/99850-1c.html b/layout/reftests/bugs/99850-1c.html
new file mode 100644
index 0000000000..3b87fcf10e
--- /dev/null
+++ b/layout/reftests/bugs/99850-1c.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+
+<body link="#009933">
+
+<a href="http://mozilla.org/do_not_visit">unvisited link</a>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/99850-1d.html b/layout/reftests/bugs/99850-1d.html
new file mode 100644
index 0000000000..a88b29c63b
--- /dev/null
+++ b/layout/reftests/bugs/99850-1d.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="text/javascript">
+
+function change_colors()
+{
+ document.linkColor = "#009933";
+}
+
+</script>
+</head>
+
+<body onload="change_colors()" link="#FF0000">
+
+<a href="http://mozilla.org/do_not_visit">unvisited link</a>
+
+</body>
+
+</html>
diff --git a/layout/reftests/bugs/LongHyphenTest.woff2 b/layout/reftests/bugs/LongHyphenTest.woff2
new file mode 100644
index 0000000000..719b1a3451
--- /dev/null
+++ b/layout/reftests/bugs/LongHyphenTest.woff2
Binary files differ
diff --git a/layout/reftests/bugs/blob-fallback-clip-ref.html b/layout/reftests/bugs/blob-fallback-clip-ref.html
new file mode 100644
index 0000000000..b06abd9c33
--- /dev/null
+++ b/layout/reftests/bugs/blob-fallback-clip-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="UTF-8">
+<style>
+q {
+ text-transform: uppercase;
+ font-size: 2em;
+ font-family: Ahem;
+ display: block;
+ width: 400px;
+ background: red;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+</style>
+<script>
+ document.addEventListener("MozReftestInvalidate", () => {
+ scrollTo(0, 3450);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+</script>
+<body>
+ <q>But these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytelling</q>
+</body>
+</html>
diff --git a/layout/reftests/bugs/blob-fallback-clip.html b/layout/reftests/bugs/blob-fallback-clip.html
new file mode 100644
index 0000000000..823f70ed8e
--- /dev/null
+++ b/layout/reftests/bugs/blob-fallback-clip.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="UTF-8">
+<style>
+q {
+ text-transform: uppercase;
+ font-size: 2em;
+ font-family: Ahem;
+ display: block;
+ width: 400px;
+ background: red;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+</style>
+<script>
+ document.addEventListener("MozReftestInvalidate", () => {
+ requestAnimationFrame(function () {
+ scrollTo(0, 300);
+ requestAnimationFrame(function () {
+ requestAnimationFrame(function () {
+ scrollTo(0, 3450);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+ });
+</script>
+<body>
+ <q>But these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytellingBut these are real problems worth exploring in storytelling</q>
+</body>
+</html>
diff --git a/layout/reftests/bugs/blue-600x58.png b/layout/reftests/bugs/blue-600x58.png
new file mode 100644
index 0000000000..8983ae0ad1
--- /dev/null
+++ b/layout/reftests/bugs/blue-600x58.png
Binary files differ
diff --git a/layout/reftests/bugs/bug1472465-1-ref.html b/layout/reftests/bugs/bug1472465-1-ref.html
new file mode 100644
index 0000000000..7ca316a336
--- /dev/null
+++ b/layout/reftests/bugs/bug1472465-1-ref.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Bug 1472465</title>
+<style type="text/css">
+#container {
+ border: 1px solid;
+ width: 500px;
+ height: 500px;
+ overflow: hidden;
+}
+
+#box {
+ opacity: 1.0;
+ position: absolute;
+ top: 100px
+ left: 100px;
+ z-index:1;
+ background-color: green;
+ width: 100px;
+ height: 100px;
+}
+
+#bg {
+ position:relative;
+ width: 2500px;
+ height: 2500px;
+ left: 0px;
+ top: 0px;
+}
+</style>
+
+</head>
+<body>
+<div id="container">
+ <div id="bg">
+ <div id="box">
+ Text to force layer state to inactive, that will get flattened.
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/bug1472465-1.html b/layout/reftests/bugs/bug1472465-1.html
new file mode 100644
index 0000000000..e49ece7a4b
--- /dev/null
+++ b/layout/reftests/bugs/bug1472465-1.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="UTF-8">
+<title>Bug 1472465</title>
+<style type="text/css">
+#container {
+ border: 1px solid;
+ width: 500px;
+ height: 500px;
+ overflow: hidden;
+}
+
+#box {
+ opacity: 0.1;
+ position: absolute;
+ top: 100px
+ left: 100px;
+ z-index:1;
+ background-color: green;
+ width: 100px;
+ height: 100px;
+}
+
+#bg {
+ position:relative;
+ width: 2500px;
+ height: 2500px;
+ left: 300px;
+ top: 300px;
+}
+</style>
+
+<script type="text/javascript">
+function changeOpacity() {
+ var box = document.querySelector("#box");
+ box.style.opacity = "1.0";
+
+ document.documentElement.removeAttribute("class");
+}
+
+function moveBg() {
+ var bg = document.querySelector("#bg");
+ bg.style.top = "0px";
+ bg.style.left = "0px";
+
+ setTimeout(changeOpacity, 200);
+}
+
+function doTest() {
+ moveBg();
+}
+
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+
+</head>
+<body>
+<div id="container">
+ <div id="bg">
+ <div id="box">
+ Text to force layer state to inactive, that will get flattened.
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/bugs/checkmark.gif b/layout/reftests/bugs/checkmark.gif
new file mode 100644
index 0000000000..b5a677d291
--- /dev/null
+++ b/layout/reftests/bugs/checkmark.gif
Binary files differ
diff --git a/layout/reftests/bugs/mozilla-banner-opacity.gif b/layout/reftests/bugs/mozilla-banner-opacity.gif
new file mode 100644
index 0000000000..bbf66e5104
--- /dev/null
+++ b/layout/reftests/bugs/mozilla-banner-opacity.gif
Binary files differ
diff --git a/layout/reftests/bugs/mozilla-banner.gif b/layout/reftests/bugs/mozilla-banner.gif
new file mode 100644
index 0000000000..dd0f077753
--- /dev/null
+++ b/layout/reftests/bugs/mozilla-banner.gif
Binary files differ
diff --git a/layout/reftests/bugs/passinner.png b/layout/reftests/bugs/passinner.png
new file mode 100644
index 0000000000..ce5c1d9738
--- /dev/null
+++ b/layout/reftests/bugs/passinner.png
Binary files differ
diff --git a/layout/reftests/bugs/passouter.png b/layout/reftests/bugs/passouter.png
new file mode 100644
index 0000000000..3b30b1de7c
--- /dev/null
+++ b/layout/reftests/bugs/passouter.png
Binary files differ
diff --git a/layout/reftests/bugs/pinwheel_logo.svg b/layout/reftests/bugs/pinwheel_logo.svg
new file mode 100644
index 0000000000..f224699d16
--- /dev/null
+++ b/layout/reftests/bugs/pinwheel_logo.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg class="mark style-scope phusion-nav" width="60px" height="60px" viewBox="0 0 60 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title class="style-scope phusion-nav">Phusion logo</title>
+ <defs class="style-scope phusion-nav"></defs>
+ <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" class="style-scope phusion-nav">
+ <g id="PHeader" transform="translate(-250.000000, -50.000000)" fill-rule="nonzero" fill="#4A4A4A" class="style-scope phusion-nav">
+ <g id="Header" class="style-scope phusion-nav">
+ <path d="M272.496278,101.084044 C259.991723,99.5969298 250,88.7779024 250,75.6097561 C250,73.4544985 251.736404,71.7473919 253.891661,71.7473919 C256.046919,71.7473919 257.735328,73.4544985 257.735328,75.6097561 C257.735328,84.6128954 264.421863,92.1152701 273.042052,93.3493116 C271.724126,94.2226399 270.82061,95.6616211 270.82061,97.326422 C270.82061,98.9912228 271.515845,100.208413 272.496278,101.084044 Z M258.724038,75.6097561 C258.724038,73.4544985 260.512068,71.7544779 262.667326,71.7544779 C264.822583,71.7544779 266.455793,73.4544985 266.455793,75.6097561 C266.455793,79.7873026 269.450505,83.5636195 273.251,84.4879002 C271.664801,85.4942359 270.846989,86.8840811 270.846989,88.5773152 C270.846989,90.16831 271.315382,91.2236804 272.394841,92.2637195 C264.826362,90.8367473 258.724038,84.0372535 258.724038,75.6097561 Z M271.150796,71.7706745 C273.549956,71.7706745 275.156607,73.4544985 275.156607,75.6097561 L275.162916,79.7560976 C275.156607,82.2599085 276.867378,83.8496957 277.188572,83.8489663 C277.188726,83.8496955 277.949489,83.8489663 275.794231,83.8489663 C271.079605,83.8489663 267.424852,80.3724038 267.424852,75.6097561 C267.424852,73.4544985 269.23944,71.7706745 271.150796,71.7706745 Z M301.084044,87.5037217 C299.59693,100.008277 288.777902,110 275.609756,110 C273.454499,110 271.747392,108.263596 271.747392,106.108339 C271.747392,103.953081 273.454499,102.264672 275.609756,102.264672 C284.612895,102.264672 292.11527,95.5781369 293.349312,86.9579483 C294.22264,88.2758742 295.661621,89.1793898 297.326422,89.1793898 C298.991223,89.1793898 300.208413,88.4841547 301.084044,87.5037217 Z M275.609756,101.275962 C273.454499,101.275962 271.754478,99.4879319 271.754478,97.3326744 C271.754478,95.1774168 273.454499,93.5442073 275.609756,93.5442073 C279.787303,93.5442073 283.563619,90.549495 284.4879,86.7489996 C285.494236,88.3351991 286.884081,89.1530107 288.577315,89.1530107 C290.16831,89.1530107 291.22368,88.6846179 292.26372,87.6051591 C290.836747,95.1736376 284.037254,101.275962 275.609756,101.275962 Z M271.770675,88.8492045 C271.770675,86.4500445 273.454499,84.8433927 275.609756,84.8433927 L279.756098,84.8370844 C282.259909,84.8433927 283.849696,83.132622 283.848966,82.8114282 C283.849695,82.8112737 283.848966,82.0505113 283.848966,84.2057689 C283.848966,88.9203948 280.372404,92.5751477 275.609756,92.5751477 C273.454499,92.5751477 271.770675,90.7605596 271.770675,88.8492045 Z M287.503722,58.9159561 C300.008277,60.4030702 310,71.2220976 310,84.3902439 C310,86.5455015 308.263596,88.2526081 306.108339,88.2526081 C303.953081,88.2526081 302.264672,86.5455015 302.264672,84.3902439 C302.264672,75.3871046 295.578137,67.8847299 286.957948,66.6506884 C288.275874,65.7773601 289.17939,64.3383789 289.17939,62.673578 C289.17939,61.0087772 288.484155,59.7915873 287.503722,58.9159561 Z M301.275962,84.3902439 C301.275962,86.5455015 299.487932,88.2455221 297.332674,88.2455221 C295.177417,88.2455221 293.544207,86.5455015 293.544207,84.3902439 C293.544207,80.2126974 290.549495,76.4363805 286.749,75.5120998 C288.335199,74.5057641 289.153011,73.1159189 289.153011,71.4226848 C289.153011,69.83169 288.684618,68.7763196 287.605159,67.7362805 C295.173638,69.1632527 301.275962,75.9627465 301.275962,84.3902439 Z M288.849204,88.2293255 C286.450044,88.2293255 284.843393,86.5455015 284.843393,84.3902439 L284.837084,80.2439024 C284.843393,77.7400915 283.132622,76.1503043 282.811428,76.1510337 C282.811274,76.1503045 282.050511,76.1510337 284.205769,76.1510337 C288.920395,76.1510337 292.575148,79.6275962 292.575148,84.3902439 C292.575148,86.5455015 290.76056,88.2293255 288.849204,88.2293255 Z M258.915956,72.4962783 C260.40307,59.991723 271.222098,50 284.390244,50 C286.545501,50 288.252608,51.7364035 288.252608,53.8916611 C288.252608,56.0469187 286.545501,57.7353277 284.390244,57.7353277 C275.387105,57.7353277 267.88473,64.4218631 266.650688,73.0420517 C265.77736,71.7241258 264.338379,70.8206102 262.673578,70.8206102 C261.008777,70.8206102 259.791587,71.5158453 258.915956,72.4962783 Z M284.390244,58.7240377 C286.545501,58.7240377 288.245522,60.5120681 288.245522,62.6673256 C288.245522,64.8225832 286.545501,66.4557927 284.390244,66.4557927 C280.212697,66.4557927 276.436381,69.450505 275.5121,73.2510004 C274.505764,71.6648009 273.115919,70.8469893 271.422685,70.8469893 C269.83169,70.8469893 268.77632,71.3153821 267.73628,72.3948409 C269.163253,64.8263624 275.962746,58.7240377 284.390244,58.7240377 Z M288.229325,71.1507955 C288.229325,73.5499555 286.545501,75.1566073 284.390244,75.1566073 L280.243902,75.1629156 C277.740091,75.1566073 276.150304,76.867378 276.151034,77.1885718 C276.150305,77.1887263 276.151034,77.9494887 276.151034,75.7942311 C276.151034,71.0796052 279.627596,67.4248523 284.390244,67.4248523 C286.545501,67.4248523 288.229325,69.2394404 288.229325,71.1507955 Z" id="Phusion-logo" class="style-scope phusion-nav"></path>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
new file mode 100644
index 0000000000..902e7e63f0
--- /dev/null
+++ b/layout/reftests/bugs/reftest.list
@@ -0,0 +1,2166 @@
+# Please keep this list sorted by bug number (but feel free to use a
+# logical order for the tests for each bug).
+== 105-1.html 105-1-ref.html
+== 647-1.html 647-1-ref.html
+== 9458-basic-1.html 9458-basic-1-ref.html
+== 9458-valign-1.html 9458-valign-1-ref.html
+== 9458-valign-2.html 9458-valign-2-ref.html
+== 9458-height-1.html 9458-height-1-ref.html
+== 9458-height-2.html 9458-height-2-ref.html
+== 9458-width-1a.html 9458-width-1-ref.html
+== 9458-width-1b.html 9458-width-1-ref.html
+== 9458-width-2a.html 9458-width-2-ref.html
+== 9458-width-2b.html 9458-width-2-ref.html
+== 9458-zorder-1.html 9458-zorder-ref.html
+== 9458-zorder-2.html 9458-zorder-ref.html
+== 9458-zorder-3.html 9458-zorder-ref-inline.html
+== 9458-zorder-4.html 9458-zorder-ref-inline-block.html
+== 9458-zorder-5.html 9458-zorder-ref-inline-block.html
+== 10036-1.html 10036-1-ref.html
+== 10209-1.html 10209-ref.html
+== 10209-2.html 10209-ref.html
+== 10209-3.html 10209-3-ref.html
+== 18217-basic-1.html 18217-basic-1-ref.html
+== 18217-basic-2a.html 18217-basic-2-ref.html
+== 18217-basic-2b.html 18217-basic-2-ref.html
+== 18217-valign-1.html 18217-valign-1-ref.html
+== 18217-height-1.html 18217-height-1-ref.html
+== 18217-height-2.html 18217-height-2-ref.html
+== 18217-width-1a.html 18217-width-1-ref.html
+== 18217-width-1b.html 18217-width-1-ref.html
+== 18217-width-2a.html 18217-width-2-ref.html
+== 18217-width-2b.html 18217-width-2-ref.html
+== 18217-zorder-1.html 18217-zorder-ref.html
+== 18217-zorder-2.html 18217-zorder-ref.html
+== 18217-zorder-3.html 18217-zorder-ref-inline.html
+== 18217-zorder-4.html 18217-zorder-ref-inline-table.html
+== 18217-zorder-5.html 18217-zorder-ref-inline-table.html
+== 23604-1.html 23604-1-ref.html
+== 23604-2.html 23604-2-ref.html
+!= 24998-1.html 24998-1-ref.html
+# Debug builds and ASAN builds have larger stack frames, so skipped.
+# 32-bit Windows doesn't have enough run-time stack to deal with the test, so skipped.
+skip-if(isDebugBuild||AddressSanitizer||ThreadSanitizer||(winWidget&&(!is64Bit))) == 256180-1.html 256180-1-ref.html
+# Debug builds have larger stack frames, so skipped.
+# 32-bit Windows doesn't have enough run-time stack to deal with the test, so skipped.
+skip-if(isDebugBuild||(winWidget&&(!is64Bit))) == 256180-2.html 256180-2-ref.html
+# Debug builds and ASAN builds have larger stack frames, so skipped.
+# 32-bit Windows doesn't have enough run-time stack to deal with the test, so skipped.
+skip-if(isDebugBuild||AddressSanitizer||ThreadSanitizer||(winWidget&&(!is64Bit))) fails-if(geckoview) == 256180-3.html 256180-3-ref.html
+# Debug builds have larger stack frames, so skipped.
+skip-if(isDebugBuild) == 256180-4.html 256180-4-ref.html
+skip-if(isDebugBuild) == 256180-6.html 256180-6-ref.html
+skip-if(isDebugBuild) == 256180-5.html 256180-5-ref.html
+== 25888-1l.html 25888-1l-ref.html
+!= 25888-1l.html 25888-1l-notref.html
+== 25888-1r.html 25888-1r-ref.html
+!= 25888-1r.html 25888-1r-notref.html
+== 25888-2l.html 25888-2l-ref.html
+== 25888-2r.html 25888-2r-ref.html
+== 25888-3l.html 25888-3l-ref.html
+== 25888-3r.html 25888-3r-ref.html
+== 25888-1l-block.html 25888-1l-ref.html
+!= 25888-1l-block.html 25888-1l-notref.html
+== 25888-1r-block.html 25888-1r-ref.html
+!= 25888-1r-block.html 25888-1r-notref.html
+== 25888-2l-block.html 25888-2l-ref.html
+== 25888-2r-block.html 25888-2r-ref.html
+== 25888-3l-block.html 25888-3l-ref.html
+== 25888-3r-block.html 25888-3r-ref.html
+fuzzy-if(winWidget||gtkWidget,0-1,0-4) == 28811-1a.html 28811-1-ref.html
+fuzzy-if(gtkWidget,0-6,0-26200) == 28811-1b.html 28811-1-ref.html # Bug 1128229
+fuzzy-if(winWidget||gtkWidget,0-1,0-4) == 28811-2a.html 28811-2-ref.html
+fuzzy-if(gtkWidget,0-6,0-26200) == 28811-2b.html 28811-2-ref.html # Bug 1128229
+== 40596-1a.html 40596-1-ref.html
+!= 40596-1b.html 40596-1-ref.html
+== 40596-1c.html 40596-1-ref.html
+!= 40596-1d.html 40596-1-ref.html
+!= 40596-1e.html 40596-1-ref.html
+!= 40596-1f.html 40596-1-ref.html
+!= 40596-1g.html 40596-1-ref.html
+!= 40596-1h.html 40596-1-ref.html
+== 40596-1i.html 40596-1-ref.html
+!= 40596-1j.html 40596-1-ref.html
+== 50630-1a.html 50630-1-ref.html
+== 50630-1b.html 50630-1-ref.html
+== 50630-1c.html 50630-1-ref.html
+== 50630-2.html 50630-2-ref.html
+== 50630-3.html 50630-3-ref.html
+== 50630-4.html 50630-4-ref.html
+== 50630-4.html 50630-4-ref2.html
+== 50630-5.html 50630-5-ref.html
+== 67752-1.html 67752-1-ref.html
+== 67752-2.html 67752-2-ref.html
+== 68061-1.xml 68061-1-ref.xml
+== 68061-2.xml 68061-2-ref.xml
+== 76331-1.html 76331-1-ref.html
+== 81947-1.html 81947-ref.html
+== 82711-1.html 82711-1-ref.html
+== 82711-2.html 82711-2-ref.html
+== 82711-3.html 82711-3-ref.html
+!= 82711-1-ref.html 82711-2-ref.html
+!= 82711-1-ref.html 82711-3-ref.html
+!= 82711-2-ref.html 82711-3-ref.html
+fuzzy-if(Android,0-4,0-3) == 84400-1.html 84400-1-ref.html
+fuzzy(0-2,0-13) == 84400-2.html 84400-2-ref.html
+== 97777-1.html 97777-1-ref.html
+== 97777-2.html 97777-2-ref.html
+== 98223-1.html 98223-1-ref.html
+== 98223-2.html 98223-2-ref.html
+== 99850-1a.html 99850-1-ref.html
+random == 99850-1b.html 99850-1-ref.html # bug 471629
+== 99850-1c.html 99850-1-ref.html
+== 99850-1d.html 99850-1-ref.html
+== 105030-1.html 105030-1-ref.html
+== 109735-1.html 109735-1-ref.html
+== 116882-1.html 116882-1-ref.html
+== 120834-1a.html 120834-1-ref.html
+== 120834-2a.html 120834-2-ref.html
+== 120834-2b.html 120834-2-ref.html
+== 120834-2c.html 120834-2-ref.html
+== 120834-2d.html 120834-2-ref.html
+== 120834-2e.html 120834-2-ref.html
+== 120834-2f.html 120834-2-ref.html
+== 120834-2g.html 120834-2-ref.html
+== 120834-2h.html 120834-2-ref.html
+== 120834-2i.html 120834-2-ref.html
+== 120834-2j.html 120834-2-ref.html
+== 124903-1.html 124903-1-ref.html
+== 128896.html 128896-ref.html
+== 130767-1.html 130767-1-ref.html
+== 134706-1-left-scrollframe.html 134706-1-left-scrollframe-ref.html
+== 134706-1-left-table.html 134706-1-left-table-ref.html
+== 134706-1-right-scrollframe.html 134706-1-right-scrollframe-ref.html
+== 134706-1-right-table.html 134706-1-right-table-ref.html
+== 134706-2-left-scrollframe.html 134706-2-left-ref.html
+== 134706-2-left-table.html 134706-2-left-ref.html
+== 134706-2-right-scrollframe.html 134706-2-right-ref.html
+== 134706-2-right-table.html 134706-2-right-ref.html
+== 134706-3-left-scrollframe.html 134706-3-left-scrollframe-ref.html
+== 134706-3-left-table.html 134706-3-left-table-ref.html
+== 134706-3-right-scrollframe.html 134706-3-right-scrollframe-ref.html
+== 134706-3-right-table.html 134706-3-right-table-ref.html
+== 134706-4.html 134706-4-ref.html
+== 134706-5.html 134706-5-ref.html
+== 134706-6.html 134706-6-ref.html
+== 134706-7.html 134706-7-ref.html
+== 139550-1a.html 139550-1-ref.html
+== 139550-1b.html 139550-1-ref.html
+== 142233-1.html 142233-1-ref.html
+== 144004-1.html 144004-1-ref.html
+== 144004-2.html 144004-2-ref.html
+!= 144004-3.html 144004-3-ref.html
+test-pref(font.minimum-size.x-western,32) == 1503662.html 1503662-ref.html
+== 163504-1a.html 163504-1-ref.html
+== 163504-1b.html 163504-1-ref.html
+== 163504-2a.html 163504-2-ref.html
+== 163504-2b.html 163504-2-ref.html
+== 167496-1.html 167496-1-ref.html
+== 169749-1.html 169749-1-ref.html
+== 172073-1.html 172073-1-ref.html
+== 175190-1.html 175190-1-ref.html
+== 179596-1a.html 179596-1a-ref.html
+== 179596-1b.html 179596-1b-ref.html
+== 179596-2.html 179596-2-ref.html
+== 179596-2.html 179596-2-ref2.html
+== 179596-2.html 179596-2-ref3.html
+!= 180085-1.html 180085-1-ref.html # fix for 180085 reverted in bug 1010675
+!= 180085-2.html 180085-2-ref.html # fix for 180085 reverted in bug 1010675
+== 185388-1.html 185388-1-ref.html
+== 186317-1.html 186317-1-ref.html
+== 192902-1.html 192902-ref.html
+== chrome://reftest/content/bugs/192767-01.xhtml chrome://reftest/content/bugs/192767-11.xhtml
+== chrome://reftest/content/bugs/192767-02.xhtml chrome://reftest/content/bugs/192767-12.xhtml
+== chrome://reftest/content/bugs/192767-03.xhtml chrome://reftest/content/bugs/192767-13.xhtml
+== chrome://reftest/content/bugs/192767-04.xhtml chrome://reftest/content/bugs/192767-14.xhtml
+== chrome://reftest/content/bugs/192767-05.xhtml chrome://reftest/content/bugs/192767-15.xhtml
+== chrome://reftest/content/bugs/192767-06.xhtml chrome://reftest/content/bugs/192767-16.xhtml
+== chrome://reftest/content/bugs/192767-07.xhtml chrome://reftest/content/bugs/192767-17.xhtml
+== chrome://reftest/content/bugs/192767-21.xhtml chrome://reftest/content/bugs/192767-31.xhtml
+== chrome://reftest/content/bugs/192767-22.xhtml chrome://reftest/content/bugs/192767-32.xhtml
+== chrome://reftest/content/bugs/192767-23.xhtml chrome://reftest/content/bugs/192767-33.xhtml
+== chrome://reftest/content/bugs/192767-24.xhtml chrome://reftest/content/bugs/192767-34.xhtml
+== chrome://reftest/content/bugs/192767-25.xhtml chrome://reftest/content/bugs/192767-35.xhtml
+== chrome://reftest/content/bugs/192767-26.xhtml chrome://reftest/content/bugs/192767-36.xhtml
+== chrome://reftest/content/bugs/192767-27.xhtml chrome://reftest/content/bugs/192767-37.xhtml
+!= chrome://reftest/content/bugs/192767-01.xhtml chrome://reftest/content/bugs/192767-21.xhtml
+!= chrome://reftest/content/bugs/192767-02.xhtml chrome://reftest/content/bugs/192767-22.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-03.xhtml chrome://reftest/content/bugs/192767-23.xhtml
+!= chrome://reftest/content/bugs/192767-04.xhtml chrome://reftest/content/bugs/192767-24.xhtml
+!= chrome://reftest/content/bugs/192767-05.xhtml chrome://reftest/content/bugs/192767-25.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-06.xhtml chrome://reftest/content/bugs/192767-26.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-07.xhtml chrome://reftest/content/bugs/192767-27.xhtml
+!= chrome://reftest/content/bugs/192767-11.xhtml chrome://reftest/content/bugs/192767-31.xhtml
+!= chrome://reftest/content/bugs/192767-12.xhtml chrome://reftest/content/bugs/192767-32.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-13.xhtml chrome://reftest/content/bugs/192767-33.xhtml
+!= chrome://reftest/content/bugs/192767-14.xhtml chrome://reftest/content/bugs/192767-34.xhtml
+!= chrome://reftest/content/bugs/192767-15.xhtml chrome://reftest/content/bugs/192767-35.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-16.xhtml chrome://reftest/content/bugs/192767-36.xhtml
+fails-if(Android&&!asyncPan) != chrome://reftest/content/bugs/192767-17.xhtml chrome://reftest/content/bugs/192767-37.xhtml
+!= 200774-1.html about:blank
+== 201215-1.html 201215-1-ref.html
+== 201293-1a.html 201293-1-ref.html
+== 201293-1b.html 201293-1-ref.html
+== 201293-1c.html 201293-1-ref.html
+== 201293-1d.html 201293-1-ref.html
+== 203727.html 203727-ref.html
+== 206516-1.html 206516-1-ref.html
+== 206631-1.html 206631-1-ref.html
+== 206802.html 206802-ref.html
+== 210094-1a.html 210094-1-ref.html
+== 210094-1b.html 210094-1-ref.html
+!= 210094-1c.html 210094-1-ref.html
+== 210876-1.html 210876-1-ref.html
+== 211931-1.html 211931-1-ref.html
+== 212563-1.html 212563-1-ref.html
+fuzzy(0-1,0-5) == 212563-2.html 212563-2-ref.html
+== 213834-1.html 213834-1-ref.html
+== 214077-1a.html 214077-1-ref.html
+== 214077-1b.html 214077-1-ref.html
+== 218473-1.html 218473-1-ref.html
+fuzzy(0-1,0-4) fuzzy-if(isDebugBuild,0-1,0-8) == 220165-1.svg 220165-1-ref.svg
+== 223809-1.html 223809-1-ref.html
+== 228856-1.html 228856-1-ref.html
+== 228856-2.html 228856-2-ref.html
+== 229591-1.html 229591-1-ref.html
+# == 231823-1.html 231823-1-ref.html
+== 232990-1a.xhtml 232990-1-ref.xhtml
+== 233094-1.html 233094-1-ref.html
+== 233094-2a.html 233094-2-ref.html
+== 233094-2b.html 233094-2-ref.html
+== 233094-2c.html 233094-2-ref.html
+== 234686-1.html 234686-ref.html
+== 234686-2.html 234686-ref.html
+== 234686-3.html 234686-ref.html
+== 234686-4.html 234686-ref.html
+== 234686-5.html 234686-ref.html
+== 234686-6.html 234686-ref.html
+== 234686-7.html 234686-ref.html
+== 234686-8.html 234686-ref.html
+== 234686-9.html 234686-ref.html
+== 234686-10.html 234686-ref.html
+== 234686-11.html 234686-ref.html
+== 234686-12.html 234686-ref.html
+== 234686-13.html 234686-ref.html
+== 234686-14.html 234686-ref.html
+== 234686-15.html 234686-ref.html
+== 234686-16.html 234686-ref.html
+== 234686-17.html 234686-ref.html
+== 234686-18.html 234686-ref.html
+== 234686-19.html 234686-ref.html
+fuzzy(0-3,0-1) == 234964-1.html 234964-1-ref.html
+== 234964-2.html 234964-2-ref.html
+== 235593-1.html 235593-1-ref.html
+fuzzy(0-4,0-2) == 236539-1.html 236539-1-ref.html
+== 240029-1.html 240029-1-ref.html
+== 240470-1.html 240470-1-ref.html
+== 240933-1.html 240933-1-ref.html
+skip-if(Android) == 240933-2.html 240933-2-ref.html
+== 243266-1.html 243266-1-ref.html
+== 243302-1.html 243302-1-ref.html
+skip-if(Android&&asyncPan) == 243519-1.html 243519-1-ref.html
+== 243519-2.html 243519-2-ref.html
+== 243519-3.html 243519-3-ref.html
+== 243519-4a.html 243519-4-ref.html
+== 243519-4b.html 243519-4-ref.html
+== 243519-4c.html 243519-4-ref.html
+== 243519-4d.html 243519-4-ref.html
+== 243519-4e.html 243519-4-ref.html
+== 243519-4f.html 243519-4-ref.html
+== 243519-5a.html 243519-5-ref.html
+== 243519-5b.html 243519-5-ref.html
+== 243519-5c.html 243519-5-ref.html
+== 243519-5d.html 243519-5-ref.html
+== 243519-6.html 243519-6-ref.html
+== 243519-7.html 243519-7-ref.html
+== 243519-8.svg 243519-8-ref.svg
+== 243519-9a.html 243519-9-ref.html
+== 243519-9b.html 243519-9-ref.html
+== 243519-9c.html 243519-9-ref.html
+== 243519-9d.html 243519-9-ref.html
+== 243519-9e.html 243519-9-ref.html
+== 243519-9f.html 243519-9-ref.html
+== 244135-1.html 244135-1-ref.html
+== 244135-2.html 244135-2-ref.html
+== 244932-1.html 244932-1-ref.html
+== 246669-1.html 246669-1-ref.html
+== 249982-1.html 249982-1-ref.html
+== 252920-1.html 252920-1-ref.html
+== 253701-1.html 253701-1-ref.html
+fuzzy(0-1,0-5) == 255820-1.html 255820-1-ref.html
+== 260406-1.html 260406-1-ref.html
+== chrome://reftest/content/bugs/261826-1.xhtml chrome://reftest/content/bugs/261826-1-ref.xhtml
+== 262151-1.html 262151-1-ref.html
+fuzzy(0-1,0-5) == 262998-1.html 262998-1-ref.html
+== 267353-1.html 267353-1-ref.html
+== 269908-1.html 269908-1-ref.html
+== 269908-2.html 269908-2-ref.html
+== 269908-3.html 269908-3-ref.html
+== 269908-4.html 269908-4-ref.html
+== 269908-5.html 269908-5-ref.html
+== 271747-1a.html 271747-1-ref.html
+== 271747-1b.html 271747-1-ref.html
+== chrome://reftest/content/bugs/272646-1.xhtml chrome://reftest/content/bugs/272646-1-ref.xhtml
+== chrome://reftest/content/bugs/272646-2a.xhtml chrome://reftest/content/bugs/272646-2-ref.xhtml
+== chrome://reftest/content/bugs/272646-2b.xhtml chrome://reftest/content/bugs/272646-2-ref.xhtml
+== chrome://reftest/content/bugs/272646-2c.xhtml chrome://reftest/content/bugs/272646-2-ref.xhtml
+fuzzy(0-1,0-133) == 273681-1.html 273681-1-ref.html
+== 278266-1a.html 278266-1-ref.html
+== 278266-1b.html 278266-1-ref.html
+== 280708-1a.html 280708-1-ref.html
+== 280708-1b.html 280708-1-ref.html
+== 281241-1.html 281241-1-ref.html
+== 281241-2.xhtml 281241-1-ref.html
+== 283686-1.html about:blank
+== 283686-2.html 283686-2-ref.html
+== 283686-3.html about:blank
+== 289384-1.xhtml 289384-ref.xhtml
+random-if(d2d) fuzzy(0-25,0-2148) fails-if(useDrawSnapshot) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures
+== 290129-1.html 290129-1-ref.html
+== 291078-1.html 291078-1-ref.html
+== 291078-2.html 291078-2-ref.html
+== 291262-1.html 291262-1-ref.html
+== 294306-1.html 294306-1a-ref.html
+!= 294306-1.html 294306-1b-ref.html
+== 296361-1.html 296361-ref.html
+== 296904-1.html 296904-1-ref.html
+== 299136-1.html 299136-1-ref.html
+== 299837-1.html 299837-1-ref.html
+skip-if(Android) random-if(d2d) == chrome://reftest/content/bugs/299837-3.xhtml chrome://reftest/content/bugs/299837-3-ref.xhtml # bug 587631
+== 300691-1a.html 300691-1-ref.html
+== 300691-1b.html 300691-1-ref.html
+== 300691-1c.html 300691-1-ref.html
+== 300691-1d.html 300691-1-ref.html
+== 300691-1e.html 300691-1-ref.html
+== 300691-1f.html 300691-1-ref.html
+== 301726-1.html 301726-1-ref.html
+fails-if(Android) != 301726-2.html 301726-2-ref.html
+fuzzy-if(Android,0-1,0-6) == 302379.html 302379-ref.html
+== 306630-1.html 306630-1-ref.html
+== 306660-1.html 306660-1-ref.html
+skip-if(useDrawSnapshot) == 306660-2.html 306660-2-ref.html
+== 306660-3.html 306660-3-ref.html
+== 307076-1.html 307076-1-ref.html
+== 307102-1.html 307102-1-ref.html
+== 307102-2.html 307102-2-ref.html
+== 307102-3.html 307102-3-ref.html
+== 307102-4.html 307102-4-ref.html
+== 308406-1.html 308406-1-ref.html
+== 308406-2.html 308406-2-ref.html
+== 309550-1.html 309550-1-ref.html
+== 311366-unknown-inline-1.html 311366-unknown-inline-1-ref.html
+== 311366-unknown-block-1.html 311366-unknown-block-1-ref.html
+== 311366-unknown-block-3.html 311366-unknown-block-3-ref.html
+== 311366-unknown-block-2.html 311366-unknown-block-2-ref.html
+== 311366-unknown-inline-2.html 311366-unknown-inline-2-ref.html
+== 311822-1.html 311822-1-ref-a.html
+== 311822-1.html 311822-1-ref-b.html
+== 315620-1a.html 315620-1-ref.html
+!= 315620-1b.html 315620-1-ref.html
+== 315620-2a.xhtml 315620-2-ref.xhtml
+!= 315620-2b.xhtml 315620-2-ref.xhtml
+== 315920-1a.html 315920-1-ref.html
+== 315920-1b.html 315920-1-ref.html
+!= 315920-1c.html 315920-1-ref.html
+!= 315920-1d.html 315920-1-ref.html
+== 315920-2a.html 315920-2-ref.html
+== 315920-2b.html 315920-2-ref.html
+== 315920-2c.html 315920-2-ref.html
+== 315920-3a.html 315920-3-ref.html
+== 315920-3b.html 315920-3-ref.html
+== 315920-3c.html 315920-3-ref.html
+== 315920-3d.html 315920-3-ref.html
+!= 315920-3e.html 315920-3-ref.html
+!= 315920-3f.html 315920-3-ref.html
+== 315920-4.html 315920-4-ref.html
+fuzzy(0-1,0-1468) == 315920-5.html 315920-5-ref.html
+== 315920-6.html 315920-6-ref.html
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) fuzzy-if(geckoview,0-1,0-14) == 315920-7a.html 315920-7-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-7b.html 315920-7-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-7c.html 315920-7-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-8a.html 315920-8-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-8b.html 315920-8-ref.html # bug 1342240
+fuzzy-if(gtkWidget,0-1,0-41) == 315920-9.html 315920-9-ref.html # bug 1599346
+== 315920-10.html 315920-10-ref.html
+fuzzy-if(geckoview,0-1,0-2) == 315920-11.html 315920-11-ref.html
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-12a.html 315920-12-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-12b.html 315920-12-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-12c.html 315920-12-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-13a.html 315920-13-ref.html # bug 1342240
+fuzzy-if(Android&&isDebugBuild,0-229,0-45) == 315920-13b.html 315920-13-ref.html # bug 1342240
+== 315920-14.html 315920-14-ref.html
+== 315920-15.html 315920-15-ref.html
+== 315920-16.html 315920-16-ref.html
+fuzzy-if(Android,0-2,0-18) == 315920-17.html 315920-17-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18a.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18b.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18c.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18d.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18e.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18f.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18g.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18h.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-18i.html 315920-18-ref.html
+pref(layout.css.moz-broken.content.enabled,true) == 315920-19.html 315920-19-ref.html
+pref(layout.css.moz-broken.content.enabled,true) fuzzy(0-1,0-1) == 315920-20.svg 315920-20-ref.svg
+pref(layout.css.moz-broken.content.enabled,true) == 315920-21.svg 315920-21-ref.svg
+== 315920-22.html 315920-22-ref.html
+== 315920-23.html 315920-23-ref.html
+== 315920-24.html 315920-24-ref.html
+== 315920-25.html 315920-25-ref.html
+== 315920-26.html 315920-26-ref.html
+== 315920-27.html 315920-27-ref.html
+== 315920-28a.html 315920-28-ref.html
+== 315920-28b.html 315920-28-ref.html
+== 315920-28c.html 315920-28-ref.html
+== 315920-29a.html 315920-29-ref.html
+== 315920-29b.html 315920-29-ref.html
+== 315920-30.html 315920-30-ref.html
+== 316057-1.html 316057-1-ref.html
+== 320979-1.html 320979-1-ref.html
+!= 321402-1.html about:blank
+!= 321402-2.html about:blank
+== chrome://reftest/content/bugs/321402-3.xhtml chrome://reftest/content/bugs/321402-3-ref.xhtml
+== chrome://reftest/content/bugs/321402-4.xhtml chrome://reftest/content/bugs/321402-4-ref.xhtml
+== chrome://reftest/content/bugs/321402-5.xhtml chrome://reftest/content/bugs/321402-5-ref.xhtml
+== chrome://reftest/content/bugs/321402-6.xhtml chrome://reftest/content/bugs/321402-6-ref.xhtml
+== 321738-1.html 321738-1-ref.html
+== 322461-1.xml 322461-1-ref.html
+== 323656-1.html 323656-1-ref.html
+== 323656-2.html 323656-2-ref.html
+== 323656-3.html 323656-3-ref.html
+== 323656-4.html 323656-4-ref.html
+== 323656-5.svg 323656-5-ref.svg
+== 323656-6.html 323656-6-ref.html
+fuzzy-if(Android,0-2,0-140) == 325292-1.html 325292-1-ref.html
+== 325486-1.html 325486-1-ref.html
+== 328111-1.html 328111-1-ref.html
+== 328829-1.xhtml 328829-1-ref.xhtml
+== 328829-2.xhtml 328829-2-ref.xhtml
+== 329359-1.html 329359-1-ref.html
+== 331809-1.html 331809-1-ref.html # bug 580499 is blacked out
+== 332360.html 332360-ref.html
+== 332360-ltr.html 332360-ltr-ref.html
+== 332360-width.html 332360-ref.html
+== 332360-width-ltr.html 332360-ltr-ref.html
+== 332557-1.html 332557-1-ref.html
+== 332975-1.html 332975-1-ref.html
+== 333970-1.html 333970-1-ref.html
+== 334829-1a-shadow.xhtml 334829-1-ref.xhtml
+== 334829-1b-shadow.xhtml 334829-1-ref.xhtml
+== 335628-1.html 335628-1-ref.html
+== chrome://reftest/content/bugs/336096-1.xhtml chrome://reftest/content/bugs/336096-1-ref.xhtml
+== 336147-1.html 336147-1-ref.html
+== 336153-1.html 336153-1-ref.html
+!= 338251-p.html about:blank
+== 338251-p-oh.html 338251-p-oh-ref.html
+!= 338251-pre.html about:blank
+== 338251-pre-oh.html 338251-pre-oh-ref.html
+fuzzy(0-2,0-3) == 339289-1.html 339289-1-ref.html
+== 341043-1a.html 341043-1-ref.html
+!= 341043-1b.html 341043-1-ref.html
+== 343538-1.html 343538-1-ref.html
+== 343540-1.html 343540-1-ref.html
+== 345267-1a.html 345267-1-ref.html
+== 345267-1b.html 345267-1-ref.html
+== 345267-1c.html 345267-1-ref.html
+== 345267-1d.html 345267-1-ref.html
+fuzzy(0-4,0-2) == 346774-1a.html 346774-1-ref.html
+fuzzy(0-4,0-2) == 346774-1b.html 346774-1-ref.html
+fuzzy(0-4,0-2) == 346774-1c.html 346774-1-ref.html
+== 347912-1.html 347912-1-ref.html
+== 348049-1.xhtml 348049-1-ref.xhtml
+== 348516-1.html 348516-1-ref.html
+== 348516-2.html 348516-2-ref.html
+!= 348516-2.html 348516-2-notref.html
+!= 348516-3.html 348516-3-notref.html
+== 348597-1.html 348597-ref.html
+== 348809-1a.html 348809-1-ref.html
+== 348809-1b.html 348809-1-ref.html
+== 348809-1c.html 348809-1-ref.html
+== 348809-1d.html 348809-1-ref.html
+== 348809-1e.html 348809-1-ref.html
+== 348809-1f.html 348809-1-ref.html
+== 348809-2a.html 348809-2-ref.html
+== 348809-2b.html 348809-2-ref.html
+== 348809-2c.html 348809-2-ref.html
+== 348809-2d.html 348809-2-ref.html
+== 348809-2e.html 348809-2-ref.html
+== 348809-2f.html 348809-2-ref.html
+== 348809-2g.html 348809-2-ref.html
+== 348809-2h.html 348809-2-ref.html
+== 349695-1a.html 349695-1-ref.html
+== 349695-1b.html 349695-1-ref.html
+# fails with CoreText rendering due to clipping of one subpixel-antialiasing pixel at end of text
+random-if(cocoaWidget) == 350506-1.html 350506-1-ref.html
+== 351641-1a.html 351641-1-ref.html
+== 351641-1b.html 351641-1-ref.html
+== 351641-2a.html 351641-2-ref.html
+== 351641-2b.html 351641-2-ref.html
+== 352980-1a.html 352980-1-ref.html
+== 352980-1b.html 352980-1-ref.html
+== 352980-1c.html 352980-1-ref.html
+== 352980-1d.html 352980-1-ref.html
+== 352980-1e.html 352980-1-ref.html
+== 352980-1f.html 352980-1-ref.html
+== 352980-1g.html 352980-1-ref.html
+== 352980-1h.html 352980-1-ref.html
+== 352980-1i.html 352980-1-ref.html
+== 352980-1j.html 352980-1-ref.html
+== 352980-1k.html 352980-1-ref.html
+== 352980-1l.html 352980-1-ref.html
+== 352980-2a.html 352980-2-ref.html
+== 352980-2b.html 352980-2-ref.html
+== 352980-2c.html 352980-2-ref.html
+== 352980-2d.html 352980-2-ref.html
+== 352980-2e.html 352980-2-ref.html
+== 352980-2f.html 352980-2-ref.html
+== 352980-3a.html 352980-3-ref.html
+== 352980-3b.html 352980-3-ref.html
+== 352980-3c.html 352980-3-ref.html
+== 352980-3d.html 352980-3-ref.html
+== 352980-3e.html 352980-3-ref.html
+== 352980-3f.html 352980-3-ref.html
+== 356774-1.html 356774-1-ref.html
+== 356775-1.html 356775-1-ref.html
+== 359869-1.html 359869-1-ref.html
+!= 359903-1.html 359903-1-ref.html # erosion of padding removed in bug 1010675
+!= 359903-2.html 359903-2-ref.html # erosion of padding removed in bug 1010675
+== 360065-1.html 360065-1-ref.html
+== 360746-1.html 360746-1-ref.html
+== 360757-1a.html 360757-1-ref.html
+== 360757-1b.html 360757-1-ref.html
+== 361091-1.html 361091-1-ref.html
+== 362594-1a.html 362594-1-quirks-ref.html
+== 362594-1b.html 362594-1-quirks-ref.html
+== 362594-1c.html 362594-1-standards-ref.html
+!= 362594-2a.html 362594-1-quirks-ref.html
+== 362594-2a.html 362594-2-quirks-ref.html
+!= 362594-2b.html 362594-1-standards-ref.html
+== 362594-2b.html 362594-2-standards-ref.html
+fuzzy(0-2,0-4) == 362594-2c.html 362594-2-standards-ref.html
+== 362901-1.html 362901-1-ref.html
+== 363247-1.html 363247-1-ref.html
+== 363329-1.html 363329-1-ref.html
+== 363329-2.html 363329-2-ref.html
+== 363370-1.html 363370-1-ref.html
+== 363402-1.html 363402-1-ref.html
+== 363637-1.html 363637-1-ref.html
+== 363706-1.html 363706-1-ref.html
+!= 363706-1.html about:blank
+== 363728-1.html 363728-1-ref.html
+== 363728-2.html 363728-2-ref.html
+fuzzy(0-4,0-11) == 363858-1.html 363858-1-ref.html
+== 363858-2.html 363858-2-ref.html
+fuzzy(0-1,0-4) == 363858-3.html 363858-3-ref.html
+== 363858-4.html 363858-4-ref.html
+# fuzzy-if(OSX,0-45,0-2) fuzzy-if(winWidget,0-116,0-1) == 363858-5a.html 363858-5-ref.html # bug 1452797
+fuzzy-if(Android,0-1,0-4) == 363858-5b.html 363858-5-ref.html
+# fuzzy-if(OSX,0-45,0-2) fuzzy-if(winWidget,0-116,0-1) == 363858-6a.html 363858-6-ref.html # bug 1452797
+== 363858-6b.html 363858-6-ref.html
+== 363874.html 363874-ref.html
+== 363874-max-width.html 363874-max-width-ref.html
+== 364066-1.html 364066-1-ref.html
+== 364079-1.html 364079-1-ref.html
+== 364318-1.xhtml 364318-1-ref.xhtml
+== 364861-1.html 364861-1-ref.html
+== 364862-1.html 364862-1-ref.html
+== chrome://reftest/content/bugs/364968-1.xhtml 364968-1-ref.html
+== 364989-1.html 364989-1-ref.html
+== 365173-1.html 365173-1-ref.html
+== chrome://reftest/content/bugs/366616-1.xhtml chrome://reftest/content/bugs/366616-1-ref.xhtml
+== 367220-1.html 367220-1-ref.html
+== 367247-s-visible.html 367247-s-hidden.html
+== 367247-s-hidden.html 367247-s-auto.html
+fails-if(Android) != 367247-s-auto.html 367247-s-scroll.html
+!= 367247-l-visible.html 367247-l-hidden.html
+fails-if(Android&&!asyncPan) != 367247-l-hidden.html 367247-l-scroll.html
+== 367247-l-scroll.html 367247-l-auto.html
+== 367332-1a.html 367332-1-ref.html
+== 367332-1b.html 367332-1-ref.html
+== 367332-1c.html 367332-1-ref.html
+== 367332-1d.html 367332-1-ref.html
+== 367332-1e.html 367332-1-ref.html
+== 367332-1f.html 367332-1-ref.html
+== 367332-1g.html 367332-1-ref.html
+== 367375-1.html 367375-1-ref.html
+== 367375-2.html 367375-2-ref.html
+== 367489-1.html 367489-1-ref.html
+== 367504-margin-1.html 367504-margin-1-ref.html
+== 367504-float-1.html 367504-float-1-ref.html
+== 367612-1a.html 367612-1-ref.html
+== 367612-1b.html 367612-1-ref.html
+== 367612-1c.html 367612-1-ref.html
+== 367612-1d.html 367612-1-ref.html
+== 367612-1e.html 367612-1-ref.html
+== 367612-1f.html 367612-1-ref.html
+!= 367612-1g.html 367612-1-ref.html
+fuzzy(0-32,0-33) fuzzy-if(d2d,0-5,0-2) == 368020-1.html 368020-1-ref.html
+== 368020-2.html 368020-2-ref.html
+random-if(useDrawSnapshot) == 368020-3.html 368020-3-ref.html # Bug 1715408
+random-if(useDrawSnapshot) == 368020-5.html 368020-5-ref.html # Bug 1715408
+== 368155-1.xhtml 368155-1-ref.xhtml
+asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397
+# we can't test this because there's antialiasing involved, and our comparison
+# is too exact
+# == 368247-1.html 368247-1-ref.html
+== 368247-2.html 368247-2-ref.html
+== 368504-1.html 368504-1-ref.html
+== 368504-2.html 368504-2-ref.html
+== 368504-3a.html 368504-3-ref.html
+== 368504-3b.html 368504-3-ref.html
+== 368504-4.html 368504-4-ref.html
+== 368504-5.html 368504-5-ref.html
+== 368504-6.html 368504-6-ref.html
+== 368622-1.html 368622-1-ref.html
+== 368651-1.html 368651-1-ref.html
+== 369361-1.html 369361-1-ref.html
+== 369361-2.html 369361-2-ref.html
+== chrome://reftest/content/bugs/369882.xhtml chrome://reftest/content/bugs/369882-ref.xhtml
+== 369975-1.html 369975-1.html
+== 370353-1.html 370353-1-ref.html
+fuzzy(0-1,0-4) == 370422-1.html 370422-1-ref.html
+== 370525-1.html 370525-1-ref.html
+!= 370525-1.html 370525-1-notref.html
+== 370525-2.html 370525-2-ref.html
+!= 370525-2.html 370525-2-notref.html
+== 370525-rowspan-1a.html 370525-rowspan-1a-ref.html
+== 370525-rowspan-1b.html 370525-rowspan-1b-ref.html
+== 370525-rowspan-1c.html 370525-rowspan-1c-ref.html
+== 370525-rowspan-2a.html 370525-rowspan-2a-ref.html
+== 370525-rowspan-2b.html 370525-rowspan-2b-ref.html
+== 370525-rowspan-3.html 370525-rowspan-3-ref.html
+== 370525-rowspan-4.html 370525-rowspan-4-ref.html
+== 370525-sib.html 370525-sib-ref.html
+== 370586-1.xhtml 370586-1-ref.xhtml
+== 370629-1.html 370629-1-ref.html
+== 370629-2.html 370629-2-ref.html
+== 371043-1.html 371043-1-ref.html
+== 371354-1.html 371354-1-ref.html
+== 371483-1.html about:blank # assertion test
+fails-if(Android&&!asyncPan) == 371561-1.html 371561-1-ref.html
+!= 371681-1.xhtml about:blank
+== 371925-1a.html 371925-1-ref.html
+== 371925-1b.html 371925-1-ref.html
+== 372037-1.html 372037-1-ref.html
+== 372062-1.html 372062-1-ref.html
+== 372063-1.html 372063-1-ref.html
+== 372553-1.html 372553-1-ref.html
+== 372632-1.html 372632-1-ref.html
+== 372768-1.html 372768-1-ref.html
+fuzzy-if(winWidget,46-92,1-2) == 373295-1.html 373295-1-ref.html
+== 373298-1.html 373298-1-ref.html
+== 373381-1.html 373381-1-ref.html
+fuzzy-if(!Android,0-2,0-40) == 373381-2.html 373381-2-ref.html
+random-if(d2d) == 373381-3.html 373381-3-ref.html
+== 373381-4.html 373381-4-ref.html
+== 373383-1.html 373383-1-ref.html
+== 373433-1.html 373433-1-ref.html
+== chrome://reftest/content/bugs/374038-1.xhtml chrome://reftest/content/bugs/374038-1-ref.xhtml
+== chrome://reftest/content/bugs/374038-2.xhtml chrome://reftest/content/bugs/374038-2-ref.xhtml
+fails == 374927-1.html 374927-1-ref.html # Was broken by patch for bug 368600; fails until bug 400776 is fixed
+== 375508-1.html 375508-1-ref.html
+== 375716-1.html 375716-1-ref.html
+== 375827-1.html 375827-1-ref.html
+== 376375-1.html 376375-1-ref.html
+== 376484-1.html 376484-1-ref.html
+== 376532-1.html 376532-1-ref.html
+fails-if(Android) != 376532-2.html 376532-2-ref.html
+fails-if(Android) != 376532-3.html 376532-3-ref.html
+== 377603-1.html 377603-1-ref.html
+== 377918.html 377918-ref.html
+== 378535-1.html 378535-1-ref.html
+== 378933-1.html 378933-1-ref.html
+== 378935-1.html 378935-1-ref.html
+== 378937-1.html 378937-1-ref.html
+== 379178-xhtml.xhtml 379178-xhtml-ref.xhtml
+== 379178-html.html 379178-html-ref.html
+== 379178-svg.svg 379178-svg-ref.svg
+fuzzy(0-1,0-500) == 379316-1.html 379316-1-ref.html
+fails-if(Android) random-if(cocoaWidget) fuzzy(0-8,0-500) == 379316-2.html 379316-2-ref.html # bug 379786
+== 379328-1.html 379328-1-ref.html
+== 379349-1a.xhtml 379349-1-ref.xhtml
+# fuzzy because of different border rendering approach in bug 1185636
+fuzzy(0-37,0-20) == 379349-1b.xhtml 379349-1-ref.xhtml
+fuzzy(0-37,0-20) == 379349-1c.xhtml 379349-1-ref.xhtml
+== 379349-2a.xhtml 379349-2-ref.xhtml
+== 379349-2b.xhtml 379349-2-ref.xhtml
+fuzzy-if(Android,0-2,0-140) == 379349-3a.xhtml 379349-3-ref.xhtml
+fuzzy-if(Android,0-2,0-140) == 379349-3b.xhtml 379349-3-ref.xhtml
+== 379361-1.html 379361-1-ref.html
+== 379361-2.html 379361-2-ref.html
+== 379361-3.html 379361-3-ref.html
+== 379461-1.xhtml 379461-1.html
+== 379461-2.xhtml 379461-2.html
+== 379461-3-container-xhtml.html 379461-3-container-html.html
+fails-if(Android&&!asyncPan) != 379461-3-container-xhtml.html 379461-3-container-blank.html # there is a scrollbar
+fuzzy(0-1,0-5) == 380004-1.html 380004-1-ref.html
+fuzzy(0-2,0-5) == 380227-1.html 380227-1-ref.html
+== 380825-1.html 380825-1-ref.html
+== 380842-1.html 380842-1-ref.html
+== 381130-1.html 381130-1-ref.html
+fuzzy(0-2,0-5) == 381507-1.html 381507-1-ref.html
+== 381746-1.html 381746-1-ref.html
+== 382600-1.html 382600-1-ref.html
+== 382916-1.html 382916-1-ref.html
+== 383035-1.html about:blank
+== 383035-2.html about:blank
+== 383488-1.html 383488-1-ref.html
+== 383551-1.html 383551-1-ref.html
+== 383883-1.html 383883-1-ref.html
+== 383883-2.html 383883-2-ref.html
+== 383883-3.html 383883-3-ref.html
+== 383883-4.html 383883-4-ref.html
+== 383884-1.html 383884-1-ref.html
+== 383885-1.html 383885-1-ref.html
+== 384322-1.html 384322-1-ref.html
+== 384576-1.html 384576-1-ref.html
+== 384762-1.html about:blank
+== 384876-1.html 384876-1-ref.html
+== 385533-1.html about:blank # assertion test
+== 385569-1a.html 385569-1-ref.html
+== 385569-1b.html 385569-1-ref.html
+== 385607-1.html 385607-1-ref.html
+== 385823-1.html 385823-1-ref.html
+fuzzy(0-1,0-600) == 385823-2a.html 385823-2-ref.html
+fails == 385823-2b.html 385823-2-ref.html
+fuzzy(0-1,0-600) == 385823-2c.html 385823-2-ref.html
+fuzzy(0-2,0-11) == 385870-1.html 385870-1-ref.html
+fuzzy(0-2,0-3) == 385870-2.html 385870-2-ref.html
+== 386014-1a.html 386014-1-ref.html
+== 386014-1b.html 386014-1-ref.html
+== 386014-1c.html 386014-1-ref.html
+== 386065-1.html 386065-1-ref.html
+== 386065-2.html about:blank
+== 386147-1.html 386147-1-ref.html
+== 386310-1a.html 386310-1-ref.html
+== 386310-1b-shadow.html 386310-1-ref.html
+== 386310-1c-shadow.html 386310-1-ref.html
+== 386310-1d-shadow.html 386310-1-ref.html
+== 386401-1.html 386401-1-ref.html
+== 386401-2.html 386401-2-ref.html
+== 386401-3.html 386401-3-ref.html
+== 386470-1a.html 386470-1-ref.html
+== 386470-1b.html 386470-1-ref.html
+== 386470-1c.html 386470-1-ref.html
+== 386920-1.html 386920-1-ref.html
+== 387201-1.html 387201-1-ref.html
+== 387201-2.html about:blank # Really an assertion test rather than a rendering test
+== 387201-3.html about:blank # Really an assertion test rather than a rendering test
+== 387227-1.html 387227-1-ref.html
+== 387227-2.html 387227-2-ref.html
+fails == 387344-1.html 387344-1-ref.html # scrolling rowgroups were removed in bug 28800
+== 387876-1.html 387876-1-ref.html
+== 387876-2.html 387876-2-ref.html
+== 387876-3a.html 387876-3-ref.html
+== 387876-3b.html 387876-3-ref.html
+== 388026-1.html 388026-1-ref.html
+== 389074-1.html 389074-1-ref.html
+== 389224-1.html 389224-1-ref.html
+== 389224-2.html about:blank
+== 389468-1.html 389468-1-ref.html
+== 389623-1.html 389623-1-ref.html
+== 389636-1.html about:blank # assertion test
+== 389924-1a.html 389924-1-ref.html
+== 389924-1b.html 389924-1-ref.html
+!= 389924-1a.html about:blank
+== 390318-1a.html 390318-1-ref.html
+== 390318-1b.html 390318-1-ref.html
+== 390318-1c.html 390318-1-ref.html
+== 390318-1d.html 390318-1-ref.html
+== 390318-1e.html 390318-1-ref.html
+== 390318-1f.html 390318-1-ref.html
+skip-if(!winWidget) == 391045.html 391045-ref.html # windows-specific Uniscribe bug, trailing period is matched against different fonts on Mac/Linux (see 396137)
+== 391140-1.html 391140-1-ref.html
+== 391412-1a.html 391412-1-ref.html
+== 391412-1b.html 391412-1-ref.html
+== 391909-1.html 391909-1-ref.html
+== 391979.html 391979-ref.html
+fuzzy-if(geckoview,0-4,0-1) == 391994-1.html 391994-1-ref.html
+== 392047.html 392047-ref.html
+== 392435-1.html 392435-1-ref.html
+== 393330-1.html 393330-1-ref.html
+== 393490-1.html 393490-1-ref.html
+== 393517-1.xhtml about:blank # crash test
+fuzzy(0-1,0-600) == 393649-1.html 393649-1-ref.html
+== 393655-1.html 393655-1-ref.html
+== 393655-2.html 393655-2-ref.html
+== 393655-3.html 393655-3-ref.html
+== 393655-4.html 393655-4-ref.html
+== 393655-5.html 393655-5-ref.html
+== 393671-1.html 393671-1-ref.html
+== 393671-2.html 393671-2-ref.html
+== 393671-3.html 393671-3-ref.html
+== 394111-1.html about:blank # Really an assertion test rather than a rendering test
+== 394534-1.html 394534-1-ref.html
+fuzzy-if(Android,0-4,0-2) == 395107-1.html 395107-1-ref.html
+fuzzy-if(Android,0-4,0-2) == 395107-2.html 395107-2-ref.html # bug 1309533 fuzzy after test rebucketed
+fuzzy(0-1,0-118) fuzzy-if(geckoview,0-4,0-2) == 395107-3.html 395107-3-ref.html
+fuzzy-if(Android,0-1,0-2) == 395107-4.html 395107-4-ref.html
+fuzzy-if(geckoview,0-4,0-1) == 395107-5.html 395107-5-ref.html
+== 395130-1.html 395130-1-ref.html
+== 395130-2.html 395130-2-ref.html
+== 395390-1.html 395390-1-ref.html
+fuzzy-if(Android,0-5,0-283) == 397428-1.html 397428-1-ref.html
+== 397844-1.xhtml 397844-1-ref.xhtml
+== 398092-1.html 398092-1-ref.html
+== 398101-1.html 398101-1-ref.html
+== 398144-1.html 398144-1-ref.html
+fuzzy(0-2,0-21) == 398682-1.html 398682-1-ref.html
+== 398797-1a.html 398797-1-ref.html
+== 398797-1b.html 398797-1-ref.html
+== 398797-1c.html 398797-1-ref.html
+== 398797-1d.html 398797-1-ref.html
+== 399209-1.html 399209-1-ref.html
+== 399209-2.html 399209-2-ref.html
+== 399258-1.html 399258-1-ref.html
+== 399384-1.html 399384-1-ref.html
+# These tests are expected to fail on Windows and Mac since bug 1756720 deliberately changed behavior here;
+# random elsewhere depending on font availability.
+fails-if(winWidget||cocoaWidget) random-if(!winWidget&&!cocoaWidget) == 399636-standards-css.html 399636-standards-ref.html
+fails-if(winWidget||cocoaWidget) random-if(!winWidget&&!cocoaWidget) == 399636-standards-html.html 399636-standards-ref.html
+fails-if(winWidget||cocoaWidget) random-if(!winWidget&&!cocoaWidget) == 399636-quirks-css.html 399636-quirks-ref.html
+# We can't rely on this test working on platforms other than Windows and
+# Mac because they need not have a font called "Symbol".
+random-if(!cocoaWidget&&!winWidget) != 399636-quirks-html.html 399636-quirks-ref.html
+== 400081-1.html about:blank
+== 400171-1a.html 400171-1-ref.html
+== 400171-1b.html 400171-1-ref.html
+== 400171-1c.html 400171-1-ref.html
+== 400171-2a.html 400171-2-ref.html
+== 400171-2b.html 400171-2-ref.html
+== 400171-2c.html 400171-2-ref.html
+== 400421-1.html 400421-1-ref.html
+== 400813-1.html 400813-1-ref.html
+== 400826-1.html 400826-1-ref.html
+== 401121-1.html 401121-1-ref.html
+== 401121-2.html 401121-2-ref.html
+== chrome://reftest/content/bugs/401946-1.xhtml about:blank
+pref(layout.outline.include-overflow,true) == 402338-1.html 402338-1-ref.html
+== 402567-1.html 402567-1-ref.html
+fuzzy-if(winWidget,0-8,0-1) == 402567-2.html 402567-2-ref.html
+== 402567-3.html 402567-3-ref.html
+fuzzy-if(gtkWidget,0-2,0-40) == 402567-4.html 402567-4-ref.html
+fuzzy(0-2,0-5) == 402629-1.html 402629-1-ref.html
+fuzzy(0-2,0-5) == 402629-2.html 402629-2-ref.html
+fuzzy(0-2,0-5) == 402629-3.html 402629-3-ref.html
+== 402807-1.html 402807-1-ref.html
+== 402940-1.html 402940-1-ref.html
+== 402940-1b.html 402940-1-ref.html
+!= 402940-2.html 402940-2-notref.html
+!= 402940-3.html 402940-3-notref.html
+== 402950-1.html 402950-1-ref.html
+== 403129-1.html 403129-1-ref.html
+== 403129-2.html 403129-2-ref.html
+== 403129-3.html 403129-3-ref.html
+== 403129-4.html 403129-4-ref.html
+random == 403134-1.html 403134-1-ref.html # bug 405377
+fuzzy-if(!useDrawSnapshot,130-131,177-177) skip-if(winWidget&&!isDebugBuild) == 403181-1.xml 403181-1-ref.xml
+== 403249-1a.html 403249-1-ref.html
+== 403249-1b.html 403249-1-ref.html
+== 403249-2a.html 403249-2-ref.html
+== 403249-2b.html 403249-2-ref.html
+== 403328-1.html 403328-1-ref.html
+== 403426-1.html 403426-1-ref.html
+== 403455-1.html 403455-1-ref.html
+== 403505-1.xml chrome://reftest/content/bugs/403505-1-ref.xhtml
+#== 403519-1.html 403519-1-ref.html # Fails on Mac, see also discussion in bug
+== 403519-2.html 403519-2-ref.html
+== 403656-1.html 403656-1-ref.html
+== 403656-2.html 403656-2-ref.html
+== 403656-3.html 403656-3-ref.html
+== 403656-4.html 403656-4-ref.html
+== 403656-5.html 403656-5-ref.html
+#== 403657-1.html 403657-1-ref.html # Fails depending on the fonts...
+== 404030-1.html 404030-1-ref.html
+!= 404030-1-notref.html 404030-1.html
+!= 404030-1-notref2.html 404030-1.html
+fuzzy(0-2,0-4) == 404123-1.html 404123-1-ref.html
+== 404123-2.html 404123-2-ref.html
+!= 404123-3.html 404123-3-ref.html
+# may fail "randomly" on OS X, doesn't seem to be rendering usefully anyhow - bug 602469
+random-if(cocoaWidget) == chrome://reftest/content/bugs/404149-1.xhtml chrome://reftest/content/bugs/404149-1-ref.xhtml # HTTP for fonts directory access
+== 404180-1.html 404180-1-ref.html
+== 404301-1.html 404301-1-ref.html
+== 404309-1a.html 404309-1-ref.html
+== 404309-1b.html 404309-1-ref.html
+# Disabled due to compartments for now.
+#!= data:application/xml,<foo/> data:text/plain, # ensure we pretty-print this XML instead of letting it appear blank (test for bug 404419)
+fuzzy-if(Android,0-8,0-50) == 404553-1.html 404553-1-ref.html # assertion test, also tests that marquee binding is applied correctly
+== 404666-1.html 404666-1-ref.html
+== 404666-2.html 404666-2-ref.html
+== 405305-1.html 405305-1-ref.html
+== 405380-1.html 405380-1-ref.html
+== 405517-1.xhtml 405517-1-ref.xhtml
+== 405577-1.html 405577-1-ref.html
+== 405584-1.html 405584-1-ref.html
+# == 405952-1.html 405952-1-ref.html
+== 406484-1.html 406484-1-ref.html
+== 406568-1.html 406568-1-ref.html
+== 407016-1-a.html 407016-1-ref.html
+== 407016-1-b.html 407016-1-ref.html
+== 407078-1.html 407078-1-ref.html
+== 407095-1.html 407095-1-ref.html
+fuzzy-if(Android,0-13,0-9) == 407111-1.html 407111-1-ref.html # Bug 1128229
+== 407227-1.html 407227-1-ref.html
+== 407243-1.html 407243-1-ref.html
+== 407419-1.html 407419-1-ref.html
+== 407937-1.html 407937-1-ref.html
+== 408493-1.html about:blank
+== 408493-2.html 408493-2-ref.html
+== 408656-1a.html 408656-1-ref.html
+== 408656-1b.html 408656-1-ref.html
+== 408656-1c.html 408656-1-ref.html
+== 408782-1a.html 408782-1-ref.html
+== 408782-1b.html 408782-1-ref.html
+== 408782-2a.html 408782-2-ref.html
+== 408782-2b.html 408782-2-ref.html
+== 409084-1a.html 409084-1-ref.html
+== 409084-1b.html 409084-1-ref.html
+fuzzy-if(winWidget,0-123,0-1600) fuzzy-if(swgl,0-1,0-39) == 409659-1a.html 409659-1-ref.html # Bug 1128229
+!= 409659-1b.html 409659-1-ref.html
+!= 409659-1c.html 409659-1-ref.html
+fuzzy-if(winWidget,0-123,0-1900) fuzzy-if(swgl,0-1,0-39) == 409659-1d.html 409659-1-ref.html # Bug 1128229
+== 410621-1.html 410621-1-ref.html
+== 411059-1.html 411059-1-ref.html
+fuzzy-if(winWidget,46-129,652-770) == 411334-1.xml 411334-1-ref.xml
+== 411585-1.html 411585-1-ref.html
+== 411585-2.html 411585-2-ref.html
+fails == 411585-3.html 411585-3-ref.html # bug 426909
+== 411792-1.html 411792-1-ref.html
+== 412093-1.html 412093-1-ref.html
+== 412352-1.html 412352-1-ref.html
+== 412352-2.html 412352-2-ref.html
+== 412607-1a.html 412607-1-ref.html
+== 412607-1b.html 412607-1-ref.html
+== 412679-1.html 412679-1-ref.html
+fuzzy(0-1,0-17) == 412679-2.html 412679-2-ref.html
+fails == 413027-2.html 413027-2-ref.html
+fails == 413027-3.html 413027-3-ref.html
+== 413286-1a.html 413286-1-ref.html
+== 413286-1b.html 413286-1-ref.html
+== 413286-1c.html 413286-1-ref.html
+== 413286-2a.html 413286-2-ref.html
+== 413286-2b.html 413286-2-ref.html
+== 413286-2c.html 413286-2-ref.html
+== 413286-3.html 413286-3-ref.html
+== 413286-4a.html 413286-4-ref.html
+== 413286-4b.html 413286-4-ref.html
+== 413286-5.html 413286-5-ref.html
+== 413286-6.html 413286-6-ref.html
+skip-if(useDrawSnapshot) == 413292-1.html 413292-1-ref.html
+fuzzy(0-1,0-10) == 413361-1.html 413361-1-ref.html # bug 1128229
+== 413840-background-unchanged.html 413840-background-unchanged-ref.html
+== 413840-ltr-offsets.html 413840-ltr-offsets-ref.html
+== 413840-rtl-offsets.html 413840-rtl-offsets-ref.html
+== 413840-pushed-line-bullet.html 413840-pushed-line-bullet-ref.html
+== 413840-bullet-first-line.html 413840-bullet-first-line-ref.html
+== 413982.html 413982-ref.html
+== 414638.html 414638-ref.html
+== 414851-1.html 414851-1-ref.html
+== 416106-1.xhtml 416106-1-ref.xhtml
+== 416752-1.html 416752-1-ref.html
+== 417178-1.html 417178-1-ref.html
+== 417246-1.html 417246-1-ref.html
+== 417676.html 417676-ref.html
+== 418574-1.html 418574-1-ref.html
+== 418574-2.html 418574-2-ref.html
+== 418766-1a.html 418766-1-ref.html
+== 418766-1b.html 418766-1-ref.html
+== 419060.html 419060-ref.html
+== 419285-1.html 419285-1-ref.html
+== 419531-1.html 419531-1-ref.html
+== 420069-1.html 420069-1-ref.html
+== 420069-2.html 420069-2-ref.html
+== 420351-1.html 420351-1-ref.html
+== 421069.html 421069-ref.html
+== 421069.html 421069-ref2.html
+== 421069-ref.html 421069-ref2.html
+fuzzy(0-92,0-430) == chrome://reftest/content/bugs/421203-1.xhtml 421203-1-ref.html
+fuzzy(0-92,0-430) == chrome://reftest/content/bugs/421203-2.xhtml 421203-1-ref.html
+== chrome://reftest/content/bugs/421203-3.xhtml chrome://reftest/content/bugs/321402-3-ref.xhtml
+== chrome://reftest/content/bugs/421203-4.xhtml chrome://reftest/content/bugs/321402-4-ref.xhtml
+== chrome://reftest/content/bugs/421203-5.xhtml chrome://reftest/content/bugs/321402-5-ref.xhtml
+== chrome://reftest/content/bugs/421203-6.xhtml chrome://reftest/content/bugs/321402-6-ref.xhtml
+== 421234-1.html 421234-1-ref.html
+== 421239-1.html 421239-1-ref.html
+== 421239-2.html 421239-2-ref.html
+== 421419-1.html 421419-1-ref.html
+== 421436-1a.html 421436-1-ref.html
+== 421436-1b.html 421436-1-ref.html
+fuzzy(0-1,0-40) == 421632-1.html 421632-1-ref.html
+!= 421710-1.html about:blank
+fails-if(Android) fuzzy(63-65,1024-1024) fails-if(usesRepeatResampling&&!winWidget) == 421885-1.xml 421885-1-ref.xml
+== 421955-1.html 421955-1-ref.html
+== 422249-1.html 422249-1-ref.html
+== 422394-1.html 422394-1-ref.html
+== 422678-1.html 422678-1-ref.html
+== 423130-1.html 423130-1-ref.html
+== 423385-1.html 423385-1-ref.html
+random-if(gtkWidget||Android) == 423599-1.html 423599-1-ref.html # bug 1309095
+== 423676-1.html 423676-1-ref.html
+fails == 423823-1.html 423823-1-ref.html # scrolling rowgroups were removed in bug 28800
+== chrome://reftest/content/bugs/424074-1.xhtml chrome://reftest/content/bugs/424074-1-ref.xhtml
+fails-if(Android) != chrome://reftest/content/bugs/424074-1.xhtml chrome://reftest/content/bugs/424074-1-ref2.xhtml
+random-if(gtkWidget) == chrome://reftest/content/bugs/424074-1-ref2.xhtml chrome://reftest/content/bugs/424074-1-ref3.xhtml
+== 424236-1.html 424236-1-ref.html
+== 424236-2.html 424236-2-ref.html
+== 424236-3.html 424236-3-ref.html
+== 424236-4.html 424236-4-ref.html
+== 424236-5.html 424236-5-ref.html
+== 424236-6.html 424236-6-ref.html
+== 424236-7.html 424236-7-ref.html
+== 424236-8.html 424236-8-ref.html
+== 424236-9.html 424236-9-ref.html
+== 424236-10.html 424236-10-ref.html
+== 424236-11.html 424236-3-ref.html
+== 424434-1.html 424434-1-ref.html
+== 424465-1.html 424465-1-ref.html
+== 424631-1.html 424631-1-ref.html
+== 424710-1.html 424710-1-ref.html
+fuzzy(0-1,0-160000) == 424766-1.html 424766-1-ref.html
+== 425972-1.html 425972-1-ref.html
+== 425972-2.html 425972-2-ref.html
+!= 425972-1.html 425972-2.html
+== 426629-1.html 426629-1-ref.html
+asserts(3) != 427017-1.xhtml about:blank # crash test (needs reftest-paged). existing assertions are bug 457400.
+== 427129-scrollframe.html 427129-ref.html
+== 427129-table.html 427129-ref.html
+== 427129-image.html 427129-ref.html
+== 427129-table-caption.html 427129-table-caption-ref.html
+fuzzy(0-1,0-60) == 427370-1.html 427370-1-ref.html
+== 427730-1.html 427730-1-ref.html
+== 428278.html 428278-ref.html
+== 428423-1a.html 428423-1-ref.html
+== 428423-1b.html 428423-1-ref.html
+== 428521-1a.html 428521-1-ref.html
+== 428521-1b.html 428521-1-ref.html
+== 428521-1c.html 428521-1-ref.html
+== 428810-1a-ltr.html 428810-1-ltr-ref.html
+== 428810-1b-ltr.html 428810-1-ltr-ref.html
+== 428810-1c-ltr.html 428810-empty-ltr-ref.html
+== 428810-1d-ltr.html 428810-empty-ltr-ref.html
+!= 428810-1-ltr-ref.html about:blank
+== 428810-2a-ltr.html 428810-2-ltr-ref.html
+== 428810-2b-ltr.html 428810-2-ltr-ref.html
+== 428810-2e-ltr.html 428810-empty-ltr-ref.html
+== 428810-2f-ltr.html 428810-empty-ltr-ref.html
+!= 428810-2-ltr-ref.html about:blank
+== 428810-3a-ltr.html 428810-3-ltr-ref.html
+== 428810-3b-ltr.html 428810-3-ltr-ref.html
+== 428810-3e-ltr.html 428810-empty-ltr-ref.html
+== 428810-3f-ltr.html 428810-empty-ltr-ref.html
+!= 428810-3-ltr-ref.html about:blank
+== 428810-1a-rtl.html 428810-1-rtl-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-1b-rtl.html 428810-1-rtl-ref.html # bug 179596
+== 428810-1c-rtl.html 428810-empty-rtl-ref.html
+== 428810-1d-rtl.html 428810-empty-rtl-ref.html
+!= 428810-1-rtl-ref.html about:blank
+!= 428810-1-rtl-ref.html 428810-1-ltr-ref.html
+== 428810-2a-rtl.html 428810-2-rtl-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-2b-rtl.html 428810-2-rtl-ref.html # bug 179596
+== 428810-2e-rtl.html 428810-empty-rtl-ref.html
+== 428810-2f-rtl.html 428810-empty-rtl-ref.html
+!= 428810-2-rtl-ref.html about:blank
+!= 428810-2-rtl-ref.html 428810-2-ltr-ref.html
+== 428810-3a-rtl.html 428810-3-rtl-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-3b-rtl.html 428810-3-rtl-ref.html # bug 179596
+== 428810-3e-rtl.html 428810-empty-rtl-ref.html
+== 428810-3f-rtl.html 428810-empty-rtl-ref.html
+!= 428810-3-rtl-ref.html about:blank
+!= 428810-3-rtl-ref.html 428810-3-ltr-ref.html
+== 428810-1a-ltr-insets.html 428810-1-ltr-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-1b-ltr-insets.html 428810-1-ltr-insets-ref.html # bug 179596
+== 428810-1c-ltr-insets.html 428810-empty-ltr-insets-ref.html
+== 428810-1d-ltr-insets.html 428810-empty-ltr-insets-ref.html
+!= 428810-1-ltr-insets-ref.html about:blank
+== 428810-2a-ltr-insets.html 428810-2-ltr-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-2b-ltr-insets.html 428810-2-ltr-insets-ref.html # bug 179596
+== 428810-2e-ltr-insets.html 428810-empty-ltr-insets-ref.html
+== 428810-2f-ltr-insets.html 428810-empty-ltr-insets-ref.html
+!= 428810-2-ltr-insets-ref.html about:blank
+== 428810-3a-ltr-insets.html 428810-3-ltr-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-3b-ltr-insets.html 428810-3-ltr-insets-ref.html # bug 179596
+== 428810-3e-ltr-insets.html 428810-empty-ltr-insets-ref.html
+== 428810-3f-ltr-insets.html 428810-empty-ltr-insets-ref.html
+!= 428810-3-ltr-insets-ref.html about:blank
+== 428810-1a-rtl-insets.html 428810-1-rtl-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-1b-rtl-insets.html 428810-1-rtl-insets-ref.html # bug 179596
+== 428810-1c-rtl-insets.html 428810-empty-rtl-insets-ref.html
+== 428810-1d-rtl-insets.html 428810-empty-rtl-insets-ref.html
+!= 428810-1-rtl-insets-ref.html about:blank
+!= 428810-1-rtl-insets-ref.html 428810-1-ltr-insets-ref.html
+== 428810-2a-rtl-insets.html 428810-2-rtl-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-2b-rtl-insets.html 428810-2-rtl-insets-ref.html # bug 179596
+== 428810-2e-rtl-insets.html 428810-empty-rtl-insets-ref.html
+== 428810-2f-rtl-insets.html 428810-empty-rtl-insets-ref.html
+!= 428810-2-rtl-insets-ref.html about:blank
+!= 428810-2-rtl-insets-ref.html 428810-2-ltr-insets-ref.html
+== 428810-3a-rtl-insets.html 428810-3-rtl-insets-ref.html
+fails-if(winWidget||cocoaWidget) == 428810-3b-rtl-insets.html 428810-3-rtl-insets-ref.html # bug 179596
+== 428810-3e-rtl-insets.html 428810-empty-rtl-insets-ref.html
+== 428810-3f-rtl-insets.html 428810-empty-rtl-insets-ref.html
+!= 428810-3-rtl-insets-ref.html about:blank
+!= 428810-3-rtl-insets-ref.html 428810-3-ltr-insets-ref.html
+== 430412-1.html 430412-1-ref.html
+== 430813-1.html 430813-1-ref.html
+== 430813-2.html 430813-2-ref.html
+== 430813-3.html 430813-3-ref.html
+== 431341-1.html 431341-1-ref.html
+== 431341-2.html 431341-2-ref.html
+== 431520-1.html 431520-1-ref.html
+== 431948-1.html 431948-1-ref.html
+== 433640-1.html 433640-1-ref.html
+== 433700.html 433700-ref.html
+== 436356-1.html 436356-1-ref.html
+== 436356-2.html 436356-2-ref.html
+fuzzy(0-4,0-2) == 438537-1.html 438537-1-ref.html
+== 438981-1.xhtml about:blank
+== 438987-1.html 438987-1-ref.html
+fuzzy(0-1,0-3280) == 438987-2a.html 438987-2-ref.html
+fuzzy(0-1,0-3280) == 438987-2b.html 438987-2-ref.html
+fuzzy(0-1,0-3280) == 438987-2c.html 438987-2-ref.html
+!= about:blank 438987-2-ref.html # check that backgrounds work at all
+== 439004-1.html 439004-1-ref.html
+== 439639-1.html 439639-1-ref.html
+fuzzy-if(gtkWidget,0-255,0-6) == 439910.html 439910-ref.html
+fuzzy(0-1,0-1) fuzzy-if(Android,0-1,0-3) == 440112.html 440112-ref.html
+== 440149-1.html 440149-1-ref.html
+== 441259-1.html 441259-1-ref.html
+== 441259-2.html 441259-2-ref.html
+fuzzy(0-1,0-3) == 442542-1.html 442542-1-ref.html
+== 444015-1.html 444015-1-ref.html
+== 444375-1.html 444375-1-ref.html
+== 444928-1.html 444928-1-ref.html
+== 444928-2.html 444928-2-ref.html
+== 444928-3.html 444928-3-ref.html
+random == 445004-1.html 445004-1-ref.html # bug 472268
+== 445142-1a.html 445142-1-ref.html
+== 445142-1b.html 445142-1-ref.html
+== 445142-1c.html 445142-1-ref.html
+== 445142-2a.html 445142-2-ref.html
+== 445142-2b.html 445142-2-ref.html
+skip-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(!winWidget) == 446100-1a.html about:blank
+fuzzy-if(winWidget,177-178,127-127) fails-if(usesRepeatResampling) fails-if(!winWidget) == 446100-1b.html about:blank
+fuzzy-if(winWidget,171-172,192-192) fails-if(!winWidget) == 446100-1c.html about:blank
+fails-if(usesRepeatResampling) fails-if(!winWidget) == 446100-1d.html about:blank
+fails-if(usesRepeatResampling) fails-if(!useDrawSnapshot&&!winWidget) == 446100-1e.html about:blank
+== 446100-1f.html about:blank
+fails-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(Android) fails-if(!useDrawSnapshot&&!winWidget) == 446100-1g.html about:blank
+== 446100-1h.html about:blank
+== 447749-1.html 447749-1-ref.html
+fuzzy(0-127,0-2) == 448193.html 448193-ref.html
+== 449171-1.html 449171-ref.html
+== 449362-1.html 449362-1-ref.html
+fuzzy(0-4,0-361) == 449519-1.html 449519-1-ref.html
+== 450670-1.html 450670-1-ref.html
+== 451168-1.html 451168-1-ref.html
+== 451876-1.html 451876-1-ref.html
+== 451876-2.html 451876-2-ref.html
+== 452915-1.html 452915-1-ref.html
+== 452964-1.html 452964-1-ref.html
+== 454361.html about:blank
+== 455105-1.html 455105-ref.html
+== 455105-2.html 455105-ref.html
+== 455171-5.html 455171-5-ref.html
+== 455280-1.xhtml 455280-1-ref.xhtml
+fails-if(Android) == 455826-1.html 455826-1-ref.html
+== chrome://reftest/content/bugs/456147.xhtml 456147-ref.html
+fuzzy(24-110,110-800) == 456219-1a.html 456219-1-ref.html # bug 1128229
+fuzzy(24-110,107-1251) == 456219-1b.html 456219-1-ref.html # bug 1128229
+fuzzy(24-110,107-3800) == 456219-1c.html 456219-1-ref.html # bug 1128229
+fuzzy(0-10,0-8) == 456219-2.html 456219-2-ref.html
+== 456330-1.gif 456330-1-ref.png
+== 456484-1.html 456484-1-ref.html
+== 457398-1.html 457398-1-ref.html
+== 457398-2.html 457398-2-ref.html
+== 458296-1a.html 458296-1-ref.html
+== 458296-1b.html 458296-1-ref.html
+== 458296-1c.html 458296-1-ref.html
+== 458296-1d.html 458296-1-ref.html
+== 458487-1a.html 458487-1-ref.html
+== 458487-1b.html 458487-1-ref.html
+== 458487-1c.html 458487-1-ref.html
+== 458487-1d.html 458487-1-ref.html
+== 458487-1e.html 458487-1-ref.html
+== 458487-1f.html 458487-1-ref.html
+== 458487-1g.html 458487-1-ref.html
+== 458487-1h.html 458487-1-ref.html
+== 458487-2.html 458487-2-ref.html
+== 458487-3.html 458487-3-ref.html
+random-if(useDrawSnapshot) == 458487-4a.html 458487-4-ref.html # Bug 1715406
+random-if(useDrawSnapshot) == 458487-4b.html 458487-4-ref.html # Bug 1715406
+random-if(useDrawSnapshot) == 458487-4c.html 458487-4-ref.html # Bug 1715406
+random-if(useDrawSnapshot) == 458487-5a.html 458487-5-ref.html # Bug 1715406
+random-if(useDrawSnapshot) == 458487-5b.html 458487-5-ref.html # Bug 1715406
+fuzzy(0-1,0-5) == 459443-1.html 459443-1-ref.html
+== 459613-1.html 459613-1-ref.html
+== 460012-1.html 460012-1-ref.html
+== 461266-1.html 461266-1-ref.html
+fuzzy(0-1,0-34360) == 461512-1.html 461512-1-ref.html
+== 462844-1.html 462844-ref.html
+== 462844-2.html 462844-ref.html
+== 462844-3.html 462844-ref.html
+== 462844-4.html 462844-ref.html
+== 463204-1.html 463204-1-ref.html
+== chrome://reftest/content/bugs/463217-1.xhtml chrome://reftest/content/bugs/463217-1-ref.xhtml
+== 463952-1.html 463952-1-ref.html
+== 464811-1.html 464811-1-ref.html
+== 465574-1.html 465574-1-ref.html # bug 421436
+== 466258-1.html 466258-1-ref.html
+== 466395-1.html 466395-1-ref.html
+== 466395-2.html 466395-2-ref.html
+== 467084-1.html 467084-1-ref.html
+== 467084-2.html 467084-2-ref.html
+== 467444-1.html 467444-1-ref.html
+== 467460-1.html 467460-1-ref.html
+== chrome://reftest/content/bugs/468473-1.xhtml chrome://reftest/content/bugs/468473-1-ref.xhtml
+== 471356-1.html 471356-1-ref.html
+== chrome://reftest/content/bugs/472500-1.xhtml chrome://reftest/content/bugs/472500-1-ref.xhtml
+== 472769-1a.html 472769-1-ref.html
+== 472769-1b.html 472769-1-ref.html
+== 472769-2.html 472769-2-ref.html
+== 472769-3.html 472769-3-ref.html
+== chrome://reftest/content/bugs/473847-1.xhtml chrome://reftest/content/bugs/473847-1-ref.xhtml
+== 474417-1.html 474417-1-ref.html
+fuzzy(0-1,0-5) == 474472-1.html 474472-1-ref.html
+== 475986-1a.html 475986-1-ref.html
+== 475986-1b.html 475986-1-ref.html
+== 475986-1c.html 475986-1-ref.html
+== 475986-1d.html 475986-1-ref.html
+== 475986-1e.html 475986-1-ref.html
+== 475986-1f.html 475986-1-ref.html
+== 475986-2a.html 475986-2-ref.html
+== 475986-2b.html 475986-2-ref.html
+== 475986-2c.html 475986-2-ref.html
+== 475986-2d.html 475986-2-ref.html
+== 475986-2e.html 475986-2-ref.html
+== 475986-2f.html 475986-2-ref.html
+== 475986-3a.html 475986-3-ref.html
+== 475986-3b.html 475986-3-ref.html
+== 475986-4.html 475986-4-ref.html
+!= 475986-1-ref.html 475986-2-ref.html
+!= 475986-1-ref.html 475986-3-ref.html
+!= 475986-2-ref.html 475986-3-ref.html
+== 476063-1.html 476063-1-ref.html
+== 476063-2.html 476063-2-ref.html
+!= 476063-3.html 476063-3-ref.html
+== 476063-4.xhtml 476063-4-ref.xhtml
+== 476357-1.html 476357-1-ref.html
+== 476598-1a.html 476598-1-ref.html
+== 476598-1a.html 476598-1-ref2.html
+== 476598-1b.html 476598-1-ref.html
+== 476598-1b.html 476598-1-ref2.html
+!= 476598-1-ref.html about:blank
+== 476856-1.html 476856-1-ref.html
+skip-if(Android) random-if(d2d) == chrome://reftest/content/bugs/478377-1.xhtml chrome://reftest/content/bugs/478377-1-ref.xhtml
+== 478614-1.html 478614-1-ref.html
+== 478614-2.html 478614-1-ref.html
+== 478614-3.html 478614-3-ref.html
+== 478614-4.html 478614-4-ref.html
+== 478614-5.html 478614-5-ref.html
+== 478811-1.html 478811-1-ref.html
+== 478811-2.html 478811-2-ref.html
+== 478811-3.html 478811-3-ref.html
+== 478811-4.html 478811-4-ref.html
+== 478956-1a.html 478956-1-ref.html
+== 478956-1b.html 478956-1-ref.html
+== 480880-1a.html 480880-1-ref.html
+== 480880-1b.html 480880-1-ref.html
+== 480880-1c.html 480880-1-ref.html
+== 480880-1d.html 480880-1-ref.html
+== 480880-1e.html 480880-1-ref.html
+== 480880-2a.html about:blank
+== 480880-2b.html about:blank
+== 480880-2c.html about:blank
+== 481024-1a.html 481024-1-ref.html
+== 481024-1b.html 481024-1-ref.html
+== 481024-1c.html 481024-1-ref.html
+== 481024-1d.html 481024-1-ref.html
+== 481024-1e.html 481024-1-ref.html
+!= 481948-1.html 481948-1-ref.html
+!= 481948-2.html 481948-2-ref.html
+fails-if(Android||gtkWidget) random-if(winWidget||cocoaWidget) == 481948-3.html 481948-3-ref.html # questionable test, see bug 488364
+== 482398-1.html 482398-1-ref.html
+random-if(d2d) == 482592-1a-shadow.xhtml 482592-1-ref.html # bug 586771
+random-if(d2d) == 482592-1b-shadow.xhtml 482592-1-ref.html # bug 586771
+random-if(winWidget) fuzzy(0-1,0-5) == 482659-1a.html 482659-1-ref.html
+fuzzy(0-1,0-5) == 482659-1b.html 482659-1-ref.html
+fuzzy(0-1,0-5) == 482659-1c.html 482659-1-ref.html
+fuzzy(0-1,0-5) == 482659-1d.html 482659-1-ref.html
+== chrome://reftest/content/bugs/483565.xhtml chrome://reftest/content/bugs/483565-ref.xhtml
+== 484256-1.html 484256-1-ref.html
+== 484256-2.html 484256-1-ref.html
+== 485012-1.html 485012-1-ref.html
+== 485275-1.html 485275-1-ref.html
+== 485275-1.svg 485275-1-ref.html
+== 486052-1.html 486052-1-ref.html
+== 486052-2a.html 486052-2-ref.html
+== 486052-2b.html 486052-2-ref.html
+== 486052-2c.html 486052-2-ref.html
+== 486052-2d.html 486052-2-ref.html
+== 486052-2e.html 486052-2-ref.html
+== 486052-2f.html 486052-2-ref.html
+== 486052-2g.html 486052-2-ref.html
+== 486065-1.html 486065-1-ref.html
+== 487539-1.html about:blank
+== 488390-1.html 488390-1-ref.html
+== 488649-1.html 488649-1-ref.html
+== 488685-1.html 488685-1-ref.html
+== 488692-1.html 488692-1-ref.html
+== 489868-1.svg 489868-1-ref.svg
+== 490173-2.html 490173-2-ref.html
+== 490176-1.html 490176-1-ref.html
+== 490177-1.svg 490177-1-ref.svg
+== 490182-1a.html 490182-1-ref.html
+== 490182-1b.html 490182-1-ref.html
+pref(browser.display.focus_ring_width,1) == 491180-1.html 491180-1-ref.html
+pref(browser.display.focus_ring_width,1) == 491180-2.html 491180-2-ref.html
+== chrome://reftest/content/bugs/491323-1.xhtml chrome://reftest/content/bugs/491323-1-ref.xhtml
+== 492661-1.html 492661-1-ref.html
+== 493968-1.html 493968-1-ref.html
+== 494667-1.html 494667-1-ref.html
+== 494667-2.html 494667-2-ref.html
+== 495274-1.html 495274-1-ref.html
+== 495385-1a.html 495385-1-ref.html
+== 495385-1b.html 495385-1-ref.html
+== 495385-1c.html 495385-1-ref.html
+== 495385-1d.html 495385-1-ref.html
+== 495385-1e.html 495385-1-ref.html
+== 495385-1f.html 495385-1-ref.html
+== 495385-2a.html 495385-2-ref.html
+== 495385-2b.html 495385-2-ref.html
+== 495385-2c.html 495385-2-ref.html
+== 495385-2d.html 495385-2-ref.html
+== 495385-2e.html 495385-2-ref.html
+== 495385-2g.html 495385-2-ref.html
+== 495385-2h.html 495385-2-ref.html
+== 495385-2i.html 495385-2-ref.html
+== 495385-3.html 495385-3-ref.html
+== 495385-4.html 495385-4-ref.html
+== 496032-1.html 496032-1-ref.html
+== 496840-1.html 496840-1-ref.html
+== 501037.html 501037-ref.html
+== 501257-1a.html 501257-1-ref.html
+== 501257-1b.html 501257-1-ref.html
+== 501257-1.xhtml 501257-1-ref.xhtml
+fuzzy(0-6,0-97456) == 501627-1.html 501627-1-ref.html # Bug 1481664
+== 502288-1.html 502288-1-ref.html
+fuzzy-if(gtkWidget,0-1,0-2) == 502447-1.html 502447-1-ref.html #Bug 1315834
+== 502795-1.html 502795-1-ref.html
+== 502942-1.html 502942-1-ref.html
+== 503364-1a.html 503364-1-ref.html
+== 503364-1b.html 503364-1-ref.html
+# Reftest for bug 503531 marked as failing; should be re-enabled when
+# bug 607548 gets resolved.
+needs-focus fails-if(!useDrawSnapshot) == 503531-1.html 503531-1-ref.html
+== 504032-1.html 504032-1-ref.html
+== 505743-1.html about:blank
+fuzzy-if(Android,0-5,0-2800) == 506481-1.html 506481-1-ref.html
+== 507187-1.html 507187-1-ref.html
+== 507487-1.html 507487-1-ref.html
+== 507487-2.xhtml 507487-2-ref.xhtml
+== 507762-1.html 507762-1-ref.html
+== 507762-2.html 507762-2-ref.html
+== 507762-3.html 507762-1-ref.html
+== 507762-4.html 507762-2-ref.html
+== 508919-1.xhtml 508919-1-ref.xhtml
+== 509155-1.xhtml 509155-1-ref.xhtml
+fuzzy(0-1,0-1200) == 512410.html 512410-ref.html
+== 512631-1.html 512631-1-ref.html
+fuzzy(0-1,0-4) == 513153-1a.html 513153-1-ref.html
+fuzzy(0-1,0-4) == 513153-1b.html 513153-1-ref.html
+pref(widget.non-native-theme.webrender,true) == 513153-2a.html 513153-2-ref.html # appleSilicon: bug 1724583
+fuzzy-if(cocoaWidget,0-112,0-108) == 513153-2b.html 513153-2-ref.html # only fuzzy when widget.non-native-theme.webrender=false, snapping difference
+== chrome://reftest/content/bugs/513318-1.xhtml chrome://reftest/content/bugs/513318-1-ref.xhtml
+fails-if(Android&&(!asyncPan)) != chrome://reftest/content/bugs/513318-2.xhtml chrome://reftest/content/bugs/513318-2-ref.xhtml
+== 514917-1.html 514917-1-ref.html
+== 518172-1a.html 518172-a-ref.html
+fuzzy-if(winWidget,0-73,0-133) fuzzy-if(cocoaWidget,0-103,0-133) == 518172-1b.html 518172-b-ref.html
+== 518172-2a.html 518172-a-ref.html
+fuzzy-if(winWidget,0-73,0-133) fuzzy-if(cocoaWidget,0-103,0-133) == 518172-2b.html 518172-b-ref.html
+== 520421-1.html 520421-1-ref.html
+== 520563-1.xhtml 520563-1-ref.xhtml
+fuzzy(0-1,0-3) == 521525-1.html 521525-1-ref.html
+== 521525-2.html 521525-2-ref.html
+== 521539-1.html 521539-1-ref.html
+== 521542-1.xhtml 521542-1-ref.xhtml
+== 521602.html 521602-ref.html
+== 521685-1.html 521685-1-ref.html
+== 522632-1.html 522632-1-ref.html
+== 523096-1.html 523096-1-ref.html
+random-if(d2d) == 523468-1.html 523468-1-ref.html
+== 524175-1.html 524175-1-ref.html
+fuzzy(0-5,0-50) == 526463-1.html 526463-1-ref.html
+== 527464-1.html 527464-ref.html
+== 528038-1a.html 528038-1-ref.html
+== 528038-1b.html 528038-1-ref.html
+== 528038-1c.html 528038-1-ref.html
+== 528038-1d.html 528038-1-ref.html
+== 528038-1e.html 528038-1-ref.html
+== 528038-1f.html 528038-1-ref.html
+== 528038-2.html 528038-2-ref.html
+== 530686-1.html 530686-1-ref.html
+fuzzy-if(Android,0-2,0-48) fuzzy-if(cocoaWidget&&swgl,0-1,0-3) == 531200-1.html 531200-1-ref.html
+== 531371-1.html 531371-1-ref.html
+== 534526-1a.html 534526-1-ref.html
+== 534526-1b.html 534526-1-ref.html
+== 534804-1.html 534804-1-ref.html
+== 534808-1.html 534808-1-ref.html
+== 534808-2.html 534808-2-ref.html
+== 534919-1.html 534919-1-ref.html
+random == 536061.html 536061-ref.html # fixedpoint division in blur code makes this fail
+== 537471-1.html 537471-1-ref.html
+== chrome://reftest/content/bugs/537507-1.xhtml chrome://reftest/content/bugs/537507-1-ref.xhtml
+== 537507-2.html 537507-2-ref.html
+== 538909-1.html 538909-1-ref.html
+== 538935-1.html 538935-1-ref.html
+== 539226-1.html about:blank
+== 539323-1.html 539323-1-ref.html
+== 539323-2.html 539323-2-ref.html
+== 539323-3.html 539323-3-ref.html
+== 539880-1.html 539880-1-ref.html
+== 539880-1-dynamic.html 539880-1-ref.html
+fuzzy-if(Android,0-12,0-1000) == 539949-1.html#test2 539949-1-ref.html#test2
+== 541382-1.html 541382-1-ref.html
+fails-if(useDrawSnapshot) needs-focus != 542116-1.html 542116-1-ref.html
+fails-if(useDrawSnapshot) needs-focus != 542116-2.html 542116-2-ref.html
+fails-if(useDrawSnapshot) needs-focus != 542116-3.html 542116-3-ref.html
+== 542317-1.html 542317-1-ref.html
+== 542620-1.html 542620-1-ref.html
+== 545049-1.html 545049-1-ref.html
+== 546033-1.html 546033-1-ref.html
+== 549184-1.html 549184-1-ref.html
+== 550325-1.html 550325-1-ref.html
+== 550325-2.html 550325-1-ref.html
+== 550325-3.html 550325-1-ref.html
+== 550716-1.html 550716-1-ref.html
+fuzzy-if(Android,0-12,0-300) == 551463-1.html 551463-1-ref.html
+== 551699-1.html 551699-1-ref.html
+== 552334-1.html 552334-1-ref.html
+# Bug 553571 was specific to MS Indic shaping behavior and Win7 font support;
+# the test is not currently relevant under harfbuzz shaping.
+# Keeping it here for the record, and because we may evolve HB's dotted-circle
+# behavior further in the future, which could make this become relevant again.
+# Marked "random" rather than "fails" because it may (spuriously) appear to pass
+# on Android devices that completely lack any Sinhala font support.
+random != 553571-1.html 553571-1-notref.html # expect dotted circle in test, not in ref: "fails" under harfbuzz, which doesn't consider the sequence invalid
+random-if(d2d) skip-if(azureSkiaGL) fuzzy(0-32,0-219) == 555388-1.html 555388-1-ref.html
+== 556661-1.html 556661-1-ref.html
+fuzzy(0-4,0-9) == 557087-1.html 557087-ref.html
+fuzzy(0-2,0-5) fuzzy-if(Android,0-1,0-9) == 557087-2.html 557087-ref.html
+== 557736-1.html 557736-1-ref.html
+skip-if(Android) != chrome://reftest/content/bugs/558011-1.xhtml chrome://reftest/content/bugs/558011-1-ref.xhtml
+== 559284-1.html 559284-1-ref.html
+fuzzy(0-2,0-5) == 561981-1.html 561981-1-ref.html
+== 561981-2.html 561981-2-ref.html
+fuzzy(0-1,0-5) == 561981-3.html 561981-3-ref.html
+== 561981-4.html 561981-4-ref.html
+fuzzy(0-1,0-5) == 561981-5.html 561981-5-ref.html
+== 561981-6.html 561981-6-ref.html
+fuzzy(0-1,0-5) == 561981-7.html 561981-7-ref.html
+== 561981-8.html 561981-8-ref.html
+== 562835-1.html 562835-ref.html
+== 562835-2.html 562835-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-1.html 563584-1-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-2.html 563584-2-ref.html
+fuzzy-if(Android,0-4,0-180) == 563584-3.html 563584-3-ref.html
+fuzzy-if(Android,0-4,0-180) == 563584-4.html 563584-4-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-5.html 563584-5-ref.html
+== 563584-6-columns.html 563584-6-columns-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-6-printing.html 563584-6-printing-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-7.html 563584-7-ref.html
+# FIXME: It would be nice to have variants of these -8 tests for the
+# table narrowing quirk causing a change to mIsTopOfPage (though I'm not
+# entirely sure our behavior is the right one, either).
+pref(layout.display-list.improve-fragmentation,true) fuzzy-if(Android,0-2,0-48) == 563584-8a.html 563584-8a-ref.html
+pref(layout.display-list.improve-fragmentation,true) fuzzy-if(Android,0-2,0-48) == 563584-8b.html 563584-8b-ref.html
+pref(layout.display-list.improve-fragmentation,true) fuzzy-if(Android,0-4,0-180) == 563584-8c.html 563584-8c-ref.html
+pref(layout.display-list.improve-fragmentation,true) fuzzy-if(Android,0-4,0-180) == 563584-8d.html 563584-8d-ref.html
+== 563584-9a.html 563584-9a-ref.html
+== 563584-9b.html 563584-9b-ref.html
+== 563584-9c.html 563584-9cd-ref.html
+== 563584-9d.html 563584-9cd-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-10a.html 563584-10-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-10b.html 563584-10-ref.html
+fuzzy-if(Android,0-2,0-48) == 563584-11.html 563584-11-ref.html
+== 563884-1.html 563884-1-ref.html
+== 564002-1.html 564002-1-ref.html
+== 564054-1.html 564054-1-ref.html
+fails-if(Android) random-if(layersGPUAccelerated) fuzzy(0-1,0-1200) == 564991-1.html 564991-1-ref.html
+== 565819-1.html 565819-ref.html
+== 565819-2.html 565819-ref.html
+fuzzy-if(Android,0-1,0-1) needs-focus == 568441.html 568441-ref.html
+== 569006-1.html 569006-1-ref.html
+== 571281-1a.html 571281-1-ref.html
+== 571281-1b.html 571281-1-ref.html
+== 571281-1c.html 571281-1-ref.html
+== 571347-1a.html 571347-1-ref.html
+== 571347-1b.html 571347-1-ref.html
+== 571347-2a.html 571347-2-ref.html
+== 571347-2b.html 571347-2-ref.html
+== 571347-2c.html 571347-2-ref.html
+== 571347-2d.html 571347-2-ref.html
+== 571347-3.html 571347-3-ref.html
+== 572598-1.html 572598-ref.html
+== 574898-1.html 574898-ref.html
+# 574907 is a windows-only issue, result on other platforms depends on details of font support
+random-if(!winWidget) == 574907-1.html 574907-1-ref.html
+random-if(!winWidget) == 574907-2.html 574907-2-ref.html
+random-if(!winWidget) != 574907-3.html 574907-3-notref.html
+== 577838-1.html 577838-1-ref.html
+== 577838-2.html 577838-2-ref.html
+== chrome://reftest/content/bugs/579323-1.html chrome://reftest/content/bugs/579323-1-ref.html
+== 579349-1.html 579349-1-ref.html
+== 579655-1.html 579655-1-ref.html
+fails-if(Android) random-if(layersGPUAccelerated) fuzzy(0-1,0-10000) == 579985-1.html 579985-1-ref.html # this bug was only for a regression in BasicLayers anyway
+fuzzy-if(asyncPan&&!layersGPUAccelerated,0-255,0-141) == 580863-1.html 580863-1-ref.html
+fails-if(Android) random-if(layersGPUAccelerated) fuzzy(0-1,0-6436) == 581317-1.html 581317-1-ref.html
+== 581579-1.html 581579-1-ref.html
+== 582037-1a.html 582037-1-ref.html
+== 582037-1b.html 582037-1-ref.html
+fuzzy-if(Android,0-3,0-256) == 582037-2a.html 582037-2-ref.html
+fuzzy-if(Android,0-3,0-256) == 582037-2b.html 582037-2-ref.html
+asserts(1-2) == 582146-1.html about:blank
+== 582476-1.svg 582476-1-ref.svg
+== 584400-dash-length.svg 584400-dash-length-ref.svg
+== 584699-1.html 584699-1-ref.html
+fuzzy(0-2,0-48) fuzzy-if(winWidget,0-1,0-33) == 585598-2.xhtml 585598-2-ref.xhtml
+== 586400-1.html 586400-1-ref.html
+fuzzy-if(d2d,0-52,0-1051) == 586683-1.html 586683-1-ref.html
+== 589615-1a.xhtml 589615-1-ref.html
+== 589615-1b.html 589615-1-ref.html
+== 589672-1.html 589672-1-ref.html
+!= 589682-1.html 589682-1-notref.html
+pref(dom.meta-viewport.enabled,true) == 593243-1.html 593243-1-ref.html
+pref(dom.meta-viewport.enabled,true) == 593243-2.html 593243-2-ref.html
+== 593544-1.html 593544-1-ref.html
+== 594333-1.html 594333-1-ref.html
+== 594624-1.html 594624-1-ref.html
+== 594737-1.html 594737-1-ref.html
+fuzzy(0-1,0-100) == 597721-1.html 597721-1-ref.html
+random-if(winWidget) fuzzy(0-1,0-480) needs-focus == 598726-1.html 598726-1-ref.html # Fails on Windows, bug 782196
+== 599113-1.html 599113-1-ref.html
+== 599882-1a.html 599882-1-ref.html
+== 599882-1b.html 599882-1-ref.html
+== 599882-2.html 599882-2-ref.html
+== 600045-1.html 600045-1-ref.html
+== 600803-1.html 600803-1-ref.html
+== 600974-1.html 600974-1-ref.html
+== 600974-2.html 600974-1-ref.html
+== 600974-3.html 600974-1-ref.html
+== 602200-1.html 602200-1-ref.html
+== 602200-2.html 602200-2-ref.html
+# Canvas with a fractional margin and translate snaps differently; non-WebRender
+# accepts a kludge for performance reasons, while WebRender is able to create
+# the idealized rendering. As such we assume we fail the old test, and pass the
+# new test. See bug 1580534 for more details.
+fuzzy-if(Android,0-8,0-20) fails-if(!useDrawSnapshot) == 602200-3.html 602200-3-ref.html
+fuzzy-if(useDrawSnapshot,255-255,34-34) == 1580534.html 1580534-ref.html
+== 602200-4.html 602200-4-ref.html
+== 603423-1.html 603423-1-ref.html
+== 604737.html 604737-ref.html
+fuzzy-if(cocoaWidget,0-7,0-610) fuzzy-if(gtkWidget,0-11,0-608) fuzzy-if(winWidget,0-5,0-587) fuzzy-if(geckoview&&emulator,0-11,0-632) == 605138-1.html 605138-1-ref.html
+== 605157-1.xhtml 605157-1-ref.xhtml
+== 607267-1.html 607267-1-ref.html
+== 608636-1.html 608636-1-ref.html
+== 608756-1a.html 608756-1-ref.html
+== 608756-1b.html 608756-1-ref.html
+== 608756-2.html 608756-2-ref.html
+fuzzy-if(Android,0-4,0-196) == 609272-1.html 609272-1-ref.html
+needs-focus == 613433-1.html 613433-1-ref.html
+needs-focus == 613433-1.html 613433-2-ref.html
+needs-focus == 613433-1.html 613433-3-ref.html
+needs-focus == 613433-2.html 613433-1-ref.html
+needs-focus == 613433-2.html 613433-2-ref.html
+needs-focus == 613433-2.html 613433-3-ref.html
+needs-focus == 613433-3.html 613433-1-ref.html
+needs-focus == 613433-3.html 613433-2-ref.html
+needs-focus == 613433-3.html 613433-3-ref.html
+fuzzy(0-64,0-45) == 614272-1.svg 614272-1-ref.svg
+== 615121-1.html 615121-1-ref.html
+!= 615121-2.html 615121-2-notref.html
+== 617242-1.html 617242-1-ref.html
+!= 618071.html 618071-notref.html
+== 619117-1.html 619117-1-ref.html
+== 619511-1.html 619511-1-ref.html
+fails-if(useDrawSnapshot) == 621253-1-externalFilter.html 621253-1-ref.html
+fails-if(useDrawSnapshot) == 621253-1-internalFilter.html 621253-1-ref.html
+fails-if(useDrawSnapshot) == 621253-2-externalFilter.html 621253-2-ref.html
+fails-if(useDrawSnapshot) == 621253-2-internalFilter.html 621253-2-ref.html
+random-if(winWidget) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positioning discrepancy in rotated text (may depend on platform fonts)
+random-if(winWidget) fuzzy-if(geckoview&&!emulator,0-255,0-22) == 621918-2.svg 621918-2-ref.svg # same 1px issue as above
+fuzzy-if(d2d,0-5,0-1) == 622585-1.html 622585-1-ref.html # bug 789402
+fuzzy(0-1,0-40000) == 625409-1.html 625409-1-ref.html
+== 627393-1.html about:blank
+fuzzy(0-1,0-500) == 630835-1.html about:blank
+== 631352-1.html 631352-1-ref.html
+random-if(winWidget) == 632781-verybig.html 632781-ref.html
+== 632781-normalsize.html 632781-ref.html
+fuzzy-if(!isDebugBuild&&gtkWidget&&/^Linux\x20i686/.test(http.oscpu),0-102,0-140) == 633344-1.html 633344-1-ref.html # bug 1103623, Linux32 from GCC update
+fuzzy(0-1,0-500) == 634232-1.html 634232-1-ref.html
+skip-if(Android&&emulator) fuzzy(0-3,0-120000) == 635302-1.html 635302-1-ref.html
+fuzzy(0-1,0-68) fuzzy-if(gtkWidget,0-1,0-70) fuzzy-if(!Android,0-2,0-300) == 635373-1.html 635373-1-ref.html
+random-if(d2d) fuzzy-if(winWidget&&!d2d,0-20,0-118) fuzzy-if(!Android,0-2,0-550) == 635373-2.html 635373-2-ref.html
+random-if(d2d) fuzzy-if(winWidget&&!d2d,0-20,0-116) fuzzy-if(!Android,0-2,0-650) == 635373-3.html 635373-3-ref.html
+== 635639-1.html 635639-1-ref.html
+== 635639-2.html 635639-2-ref.html
+== 637597-1.html 637597-1-ref.html
+fuzzy(0-1,0-19) == 637852-1.html 637852-1-ref.html
+fuzzy(0-3,0-19) == 637852-2.html 637852-2-ref.html
+fuzzy-if(Android,0-8,0-500) == 637852-3.html 637852-3-ref.html
+== 641770-1.html 641770-1-ref.html
+== 641856-1.html 641856-1-ref.html
+== 645491-1.html 645491-1-ref.html
+== 645647-1.html 645647-1-ref.html
+== 645647-2.html 645647-2-ref.html
+== 645768-1.html 645768-1-ref.html
+fails-if(layersGPUAccelerated&&cocoaWidget) fuzzy(0-57,0-11000) == 650228-1.html 650228-1-ref.html # Quartz alpha blending doesn't match GL alpha blending
+needs-focus == 652301-1a.html 652301-1-ref.html
+needs-focus == 652301-1b.html 652301-1-ref.html
+fuzzy(0-2,0-5) == 652775-1.html 652775-1-ref.html
+HTTP == 652991-1a.html 652991-1-ref.html
+HTTP == 652991-1b.html 652991-1-ref.html
+HTTP == 652991-2.html 652991-2-ref.html
+HTTP == 652991-3.html 652991-3-ref.html
+HTTP == 652991-4.html 652991-4-ref.html
+fuzzy(0-1,0-5) == 653930-1.html 653930-1-ref.html
+== 654057-1.html 654057-1-ref.html
+skip-if(Android&&emulator) fuzzy(0-1,0-65536) == 654950-1.html 654950-1-ref.html # Quartz alpha blending doesn't match GL alpha blending
+== 655549-1.html 655549-1-ref.html
+== 655836-1.html 655836-1-ref.html
+!= 656875.html about:blank
+== 658952.html 658952-ref.html
+fuzzy(0-10,0-919) fuzzy-if(cocoaWidget,2-2,4-23) == 660682-1.html 660682-1-ref.html
+skip-if(Android) fuzzy(0-1,0-68000) == chrome://reftest/content/bugs/664127-1.xhtml chrome://reftest/content/bugs/664127-1-ref.xhtml
+== 665597-1.html 665597-1-ref.html
+!= 665597-2.html 665597-2-ref.html
+== 667079-1.html 667079-1-ref.html
+skip-if(Android) == chrome://reftest/content/bugs/668319-1.xhtml about:blank
+!= chrome://reftest/content/bugs/669015-1.xhtml chrome://reftest/content/bugs/669015-1-notref.xhtml
+skip-if(azureSkiaGL) fuzzy-if(Android&&device,0-55,0-3742) == 670442-1.html 670442-1-ref.html
+== 670467-1.html 670467-1-ref.html
+== 670467-2.html 670467-2-ref.html
+== 690164-1.html 690164-1-ref.html
+== 690643-1.html 690643-1-ref.html
+!= 691087-1.html 691087-1-ref.html
+== 691571-1.html 691571-1-ref.html
+fuzzy(0-1,0-200) == 696307-1.html 696307-1-ref.html
+fuzzy(0-1,0-550) == 696739-1.html 696739-1-ref.html
+needs-focus == 703186-1.html 703186-1-ref.html
+needs-focus == 703186-2.html 703186-2-ref.html
+needs-focus != 703186-1.html 703186-2.html
+== 711359-1.html 711359-1-ref.html
+fuzzy(0-1,0-3) random-if(useDrawSnapshot) needs-focus == 712130-1.html 712130-1-ref.html
+fuzzy(0-1,0-3) needs-focus == 712130-2.html 712130-2-ref.html
+== 712849-1.html 712849-1-ref.html
+== 713856-static.html 713856-ref.html
+== 713856-dynamic.html 713856-ref.html
+== 714519-1-as.html 714519-1-ref.html
+== 714519-1-q.html 714519-1-ref.html
+== 714519-2-as.html 714519-2-ref.html
+== 714519-2-q.html 714519-2-ref.html
+skip-if(Android&&emulator) fuzzy(0-1,0-21) fuzzy-if(d2d,0-77,0-173) fuzzy-if(cocoaWidget,0-1,0-170) fuzzy-if(useDrawSnapshot,1-1,163-163) == 718521.html 718521-ref.html # bug 773482
+== 720987.html 720987-ref.html
+== 722888-1.html 722888-1-ref.html
+fuzzy(0-2,0-40000) == 722923-1.html 722923-1-ref.html
+== 723484-1.html 723484-1-ref.html
+== 728983-1.html 728983-1-ref.html
+== 729143-1.html 729143-1-ref.html
+== 731521-1.html 731521-1-ref.html
+needs-focus == 731726-1.html 731726-1-ref.html
+== 735481-1.html 735481-1-ref.html
+fuzzy(0-2,0-300000) == 745934-1.html 745934-1-ref.html
+== 748692-1a.html 748692-1-ref.html
+== 748692-1b.html 748692-1-ref.html
+== 748803-1.html 748803-1-ref.html
+== 750551-1.html 750551-1-ref.html
+fuzzy(0-1,0-1) == 751012-1a.html 751012-1-ref.html
+fuzzy(0-1,0-1) == 751012-1b.html 751012-1-ref.html
+== 753329-1.html about:blank
+== 758561-1.html 758561-1-ref.html
+fuzzy(0-1,0-320) fuzzy-if(useDrawSnapshot,1-1,77595-77595) == 759036-1.html 759036-1-ref.html
+fuzzy(0-9,0-5894) fuzzy-if(geckoview&&device&&!swgl,3-3,5831-5855) == 759036-2.html 759036-2-ref.html
+== 776265-1a.html 776265-1-ref.html
+== 776265-1b.html 776265-1-ref.html
+== 776265-1c.html 776265-1-ref.html
+== 776265-1d.html 776265-1-ref.html
+== 776265-2a.html 776265-2-ref.html
+== 776265-2b.html 776265-2-ref.html
+== 776265-2c.html 776265-2-ref.html
+== 776265-2d.html 776265-2-ref.html
+== 776443-1.html 776443-1-ref.html
+== 776443-2.html 776443-2-ref.html
+== 786254-1.html 786254-1-ref.html
+== 787947-1.html 787947-1-ref.html
+== 796847-1.svg 796847-1-ref.svg
+fuzzy(0-40,0-875) == 797797-1.html 797797-1-ref.html # 'opacity:N' and rgba(,,,N) text don't match precisely
+fuzzy(0-2,0-2310) == 797797-2.html 797797-2-ref.html # 'opacity:N' and rgba(,,,N) text don't match precisely
+== 801994-1.html 801994-1-ref.html
+== 804323-1.html 804323-1-ref.html
+fuzzy-if(Android,0-8,0-608) fails-if(useDrawSnapshot) == 811301-1.html 811301-1-ref.html
+== 812824-1.html 812824-1-ref.html
+== 814677.html 814677-ref.html
+== 814952-1.html 814952-1-ref.html
+fuzzy-if(Android,0-4,0-400) == 815593-1.html 815593-1-ref.html
+== 816359-1.html 816359-1-ref.html
+== 816458-1.html 816458-1-ref.html
+== 816876-1.xhtml 816876-1-ref.xhtml
+== 816876-2a.xhtml 816876-2-ref.xhtml
+== 816876-2b.xhtml 816876-2-ref.xhtml
+fuzzy(0-1,0-5) == 816948-1.html 816948-1-ref.html
+== 817019-1.html about:blank
+fuzzy(0-1,0-5) == 818276-1.html 818276-1-ref.html
+fuzzy-if(asyncPan,0-190,0-510) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-510) == 825999.html 825999-ref.html
+== 827577-1a.html 827577-1-ref.html
+== 827577-1b.html 827577-1-ref.html
+== 827799-1.html about:blank
+== 829958.html 829958-ref.html
+fuzzy-if(gtkWidget,0-2,0-152400) == 836844-1.html 836844-1-ref.html
+== 841192-1.html 841192-1-ref.html
+== 844178.html 844178-ref.html
+fuzzy(0-1,0-320) == 846144-1.html 846144-1-ref.html
+== 847850-1.html 847850-1-ref.html
+== 848421-1.html 848421-1-ref.html
+== 849407-1.html 849407-1-ref.html
+== 849996-1.html 849996-1-ref.html
+== 858803-1.html 858803-1-ref.html
+== 860242-1.html 860242-1-ref.html
+!= 860370.html 860370-notref.html
+== 871338-1.html 871338-1-ref.html
+== 883987-1a.html 883987-1-ref.html
+fails == 883987-1b.html 883987-1-ref.html # bug 1446971
+fails == 883987-1c.html 883987-1-ref.html # bug 1446971
+== 883987-1d.html 883987-1-ref.html
+== 883987-1e.html 883987-1-ref.html
+== 883987-1f.html 883987-1-ref.html
+== 890495-1.html 890495-1-ref.html
+== 894931-1.html 894931-1-ref.html
+== 897491-1.html 897491-1-ref.html
+== 897491-2.html 897491-2-ref.html
+fuzzy(0-2,0-10000) fuzzy-if(Android,0-5,0-10000) == 902330-1.html 902330-1-ref.html
+fuzzy-if(Android,0-8,0-400) == 906199-1.html 906199-1-ref.html
+== 921716-1.html 921716-1-ref.html
+== 926155-1.html 926155-1-ref.html
+fuzzy-if(cocoaWidget,0-1,0-40) == 928607-1.html 928607-1-ref.html
+fuzzy(0-1,0-3) == 931464-1.html 931464-1-ref.html
+== 931853.html 931853-ref.html
+== 931853-quirks.html 931853-quirks-ref.html
+== 933264-1.html 933264-1-ref.html
+test-pref(font.minimum-size.x-western,32) fuzzy-if(Android,0-45,0-324) == 935056-1.html 935056-1-ref.html
+== 936670-1.svg 936670-1-ref.svg
+== 941940-1.html 941940-1-ref.html
+fails == 942017.html 942017-ref.html # bug 942017
+fuzzy(0-2,0-160000) fuzzy-if(winWidget&&isDebugBuild&&layersGPUAccelerated&&!is64Bit,1-1,12-175) == 942672-1.html 942672-1-ref.html
+== 953334-win32-clipping.html 953334-win32-clipping-ref.html
+fuzzy(0-1,0-5) == 956513-1.svg 956513-1-ref.svg
+== 944291-1.html 944291-1-ref.html
+== 950436-1.html 950436-1-ref.html
+== 957770-1.svg 957770-1-ref.svg
+== 960277-1.html 960277-1-ref.html
+fuzzy(0-1,0-80) == 961887-1.html 961887-1-ref.html
+== 961887-2.html 961887-2-ref.html
+== 961887-3.html 961887-3-ref.html
+fuzzy(0-1,0-2) pref(layout.css.overflow-clip-box.enabled,true) pref(layout.forms.reveal-password-button.enabled,false) == 966992-1.html 966992-1-ref.html
+== 966510-1.html 966510-1-ref.html
+== 966510-2.html 966510-2-ref.html
+fuzzy(0-1,0-123) == 978911-1.svg 978911-1-ref.svg
+== 983084-1.html 983084-1-ref.html
+== 983084-2.html 983084-2-ref.html
+== 983084-3.html 983084-1-ref.html
+== 983691-1.html 983691-ref.html
+== 983985-1.html 983985-1-ref.html
+== 983985-2.html 983985-2-ref.html
+== 985303-1a.html 985303-1-ref.html
+== 985303-1b.html 985303-1-ref.html
+== 987680-1.html 987680-1-ref.html
+# Fuzzy on WR due to alpha blending
+fuzzy(0-1,0-1473) == 991046-1.html 991046-1-ref.html
+pref(layout.css.overflow-clip-box.enabled,true) fuzzy(0-2,0-845) == 992447.html 992447-ref.html
+== 1003425-1.html 1003425-1-ref.html
+== 1003425-2.html 1003425-2-ref.html
+== 1005405-1.html 1005405-1-ref.html
+== 1012640-1.html 1012640-1-ref.html
+== 1013054-1.html 1013054-1-ref.html
+== 1018522-1.html 1018522-1-ref.html
+== 1021564-1.html 1021564-ref.html
+== 1021564-2.html 1021564-ref.html
+== 1021564-3.html 1021564-ref.html
+== 1021564-4.html 1021564-ref.html
+pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html
+fuzzy(0-1,0-126000) == 1022612-1.html 1022612-1-ref.html
+skip-if(Android&&emulator) == 1024473-1.html 1024473-1-ref.html
+fuzzy(0-1,0-24000) == 1025914-1.html 1025914-1-ref.html
+== 1042104-1.html 1042104-1-ref.html
+== 1043537-1.html 1043537-1-ref.html
+== 1044198-1.html 1044198-1-ref.html
+== 1049499-1.html 1049499-1-ref.html
+== 1050493-1.html 1050493-1-ref.html
+== 1050788-1.html about:blank
+== 1053035-1-flex.html 1053035-1-ref.html
+== 1053035-1-grid.html 1053035-1-ref.html
+== 1059167-1.html 1059167-1-ref.html
+== 1059498-1.html 1059498-1-ref.html # WebRender: see bug 1504290
+== 1059498-2.html 1059498-1-ref.html # WebRender: see bug 1504290
+== 1059498-3.html 1059498-1-ref.html # WebRender: see bug 1499113
+== 1062108-1.html 1062108-1-ref.html
+== 1062792-1.html 1062792-1-ref.html
+== 1066554-1.html 1066554-1-ref.html
+== 1069716-1.html 1069716-1-ref.html
+== 1078262-1.html about:blank # bug 1656792
+test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html
+fuzzy(15-65,100-500) fuzzy-if(useDrawSnapshot,33-33,218-218) == 1081185-1.html 1081185-1-ref.html
+== 1097437-1.html 1097437-1-ref.html
+== 1103258-1.html 1103258-1-ref.html # assertion crash test with layers culling test
+== 1105137-1.html 1105137-1-ref.html
+fuzzy-if(d2d,0-36,0-304) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&d2d,0-139,0-701) == 1116480-1-fakeitalic-overflow.html 1116480-1-fakeitalic-overflow-ref.html
+== 1111753-1.html about:blank
+== chrome://reftest/content/bugs/1114526-1.html 1114526-1-ref.html
+fuzzy(0-1,0-800000) == 1119117-1a.html 1119117-1-ref.html
+fuzzy(0-1,0-800000) == 1119117-1b.html 1119117-1-ref.html
+== 1120431-1.html 1120431-1-ref.html
+== 1120431-2.html 1120431-2-ref.html
+== 1121748-1.html 1121748-1-ref.html
+skip-if(verify) == 1121748-2.html 1121748-2-ref.html
+== 1127107-1a-nowrap.html 1127107-1-ref.html
+== 1127107-1b-pre.html 1127107-1-ref.html
+== 1127107-2-capitalize.html 1127107-2-capitalize-ref.html
+== 1127679-1a-inline-flex-relpos.html 1127679-1b-inline-flex-relpos.html
+== 1128354-1.html 1128354-1-ref.html
+== 1130231-1-button-padding-rtl.html 1130231-1-button-padding-rtl-ref.html
+== 1130231-2-button-padding-rtl.html 1130231-2-button-padding-rtl-ref.html
+# The 1133905-*.html reftests only make sense on platforms where both APZ and
+# <meta viewport> are enabled.
+# (Note: bug 1308702 covers these tests' failures on Android)
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-2.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-3.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-5.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6.html 1133905-ref.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-2-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-3-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-5-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6-v.html 1133905-ref-v.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-2-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-3-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-5-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6-h.html 1133905-ref-h.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-54,0-17) == 1133905-1-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-2-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-3-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-4-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-5-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-54,0-17) == 1133905-6-vh.html 1133905-ref-vh.html
+pref(apz.allow_zooming,true) skip-if(!Android) != 1133905-ref-vh.html about:blank # make sure it doesn't render blank
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-2-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-3-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-5-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6-rtl.html 1133905-ref-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1-v-rtl.html 1133905-ref-v-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-2-v-rtl.html 1133905-ref-v-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-3-v-rtl.html 1133905-ref-v-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4-v-rtl.html 1133905-ref-v-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-10) == 1133905-5-v-rtl.html 1133905-ref-v-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6-v-rtl.html 1133905-ref-v-rtl.html # bug 1308702
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-1-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-2-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-3-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-4-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-5-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) == 1133905-6-h-rtl.html 1133905-ref-h-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-54,0-17) == 1133905-1-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-9) == 1133905-2-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-9) == 1133905-3-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-9) == 1133905-4-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-43,0-9) == 1133905-5-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) fuzzy-if(Android,0-54,0-17) == 1133905-6-vh-rtl.html 1133905-ref-vh-rtl.html
+pref(apz.allow_zooming,true) skip-if(!Android) != 1133905-ref-vh-rtl.html about:blank # make sure it doesn't render blank
+== 1149304-1-transform-change.html 1149304-1-transform-change-ref.html
+fuzzy(0-128,0-22) == 1151145-1.html 1151145-1-ref.html # bug 1646527 for WR fuzz
+== 1151306-1.html 1151306-1-ref.html
+== 1153845-1.html 1153845-1-ref.html
+fuzzy(0-128,0-22) == 1155828-1.html 1155828-1-ref.html # bug 1646527 for WR fuzz
+fuzzy(0-7,0-84) == 1156129-1.html 1156129-1-ref.html
+pref(dom.use_xbl_scopes_for_remote_xul,true) HTTP(..) == 1157127-1.html 1157127-1-ref.html
+fuzzy-if(Android,0-6,0-6) fuzzy-if(appleSilicon,0-1,0-7) == 1169331-1.html 1169331-1-ref.html
+fuzzy(0-3,0-110) fails == 1174332-1.html 1174332-1-ref.html # bug 1312658, expected to fail w/ non-native theme because of bug 1699937
+== 1179078-1.html 1179078-1-ref.html
+== 1179288-1.html 1179288-1-ref.html
+== 1190635-1.html 1190635-1-ref.html
+== 1202512-1.html 1202512-1-ref.html
+fuzzy(0-1,0-1) == 1202512-2.html 1202512-2-ref.html
+!= 1207326-1.html about:blank
+== 1209603-1.html 1209603-1-ref.html
+== 1209994-1.html 1209994-1-ref.html
+== 1209994-2.html 1209994-2-ref.html
+== 1209994-3.html 1209994-3-ref.html
+== 1209994-4.html 1209994-4-ref.html
+== 1219985-1.html 1219985-ref-transparent-with-rendering.html
+== 1219985-2.html 1219985-ref-transparent-clear.html
+== 1219985-3.html 1219985-ref-opaque-with-rendering.html
+== 1219985-4.html 1219985-ref-opaque-clear.html
+== 1219985-5.html 1219985-ref-transparent-with-rendering.html
+== 1219985-6.html 1219985-ref-opaque-with-rendering.html
+== 1219985-7.html 1219985-ref-transparent-clear.html
+== 1219985-8.html 1219985-ref-opaque-clear.html
+== 1222226-1.html 1222226-1-ref.html
+pref(layout.css.overflow-clip-box.enabled,true) == 1226278.html 1226278-ref.html
+== 1230466.html about:blank
+random-if(gtkWidget) != 1238243-1.html 1238243-1-notref.html # may fail on Linux, depending on Korean fonts available
+== 1238243-2.html 1238243-2-ref.html
+fuzzy(0-100,0-2000) == 1239564.html 1239564-ref.html
+== 1241631-1.html 1241631-1-ref.html
+== 1242172-1.html 1242172-1-ref.html
+fuzzy(0-2,0-2601) == 1242172-2.html 1242172-2-ref.html
+== 1242781.html 1242781-ref.html
+== 1263845.html 1263845-ref.html
+== 1260543-1.html 1260543-1-ref.html
+== 1271714-1.html 1271714-1-ref.html
+== 1272997-1.html 1272997-1-ref.html
+random-if(!winWidget) == 1273154-1.html 1273154-1-ref.html # depends on Windows font
+random-if(!winWidget) == 1273154-2.html 1273154-2-ref.html # depends on Windows font
+== 1274368-1.html 1274368-1-ref.html
+!= 1276161-1a.html 1276161-1-notref.html
+!= 1276161-1b.html 1276161-1-notref.html
+!= 1276161-1a.html 1276161-1b.html
+== 1275411-1.html 1275411-1-ref.html
+== 1288255.html 1288255-ref.html
+fuzzy(0-8,0-1900) fails == 1291528.html 1291528-ref.html
+# Buttons in 2 pages have different position and the rendering result can be
+# different, but they should use the same button style and the background color
+# should be same. |fuzzy()| here allows the difference in border, but not
+# background color.
+fuzzy(0-255,0-1000) skip-if(!cocoaWidget) == 1294102-1.html 1294102-1-ref.html
+fuzzy(0-15,0-50) fuzzy-if(gtkWidget||winWidget,0-14,0-215) random-if(useDrawSnapshot) == 1295466-1.xhtml 1295466-1-ref.xhtml # bug 1540635
+fuzzy-if(Android,0-27,0-874) fuzzy-if(!Android,0-14,0-43) fuzzy-if(gtkWidget&&fission&&!isDebugBuild,0-14,0-1794) == 1313772.xhtml 1313772-ref.xhtml # Bug 1128229, Bug 1389319, Bug 1714895
+fuzzy(0-3,0-320000) fails-if(useDrawSnapshot) == 1315113-1.html 1315113-1-ref.html
+fuzzy(0-3,0-20000) == 1315113-2.html 1315113-2-ref.html
+== 1315632-1.html 1315632-1-ref.html
+fuzzy(0-3,0-40000) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-13,0-40000) == 1316719-1a.html 1316719-1-ref.html
+fuzzy(0-13,0-40000) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-13,0-40000) == 1316719-1b.html 1316719-1-ref.html
+fuzzy(0-13,0-40000) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-13,0-40000) == 1316719-1c.html 1316719-1-ref.html
+!= 1318769-1.html 1318769-1-ref.html
+== 1322512-1.html 1322512-1-ref.html
+skip-if(isDebugBuild&&winWidget) == 1330051.svg 1330051-ref.svg
+!= 1336591-1.html 1336591-1-ref.html
+== 1348481-1.html 1348481-ref.html
+== 1348481-2.html 1348481-ref.html
+== 1351924-1.html 1351924-1-ref.html
+== 1351924-2.html 1351924-2-ref.html
+== 1352464-1.html 1352464-1-ref.html
+== 1358375-1.html 1358375-ref.html
+== 1358375-2.html 1358375-ref.html
+== 1358375-3.html 1358375-ref.html
+== 1364280-1.html 1364280-1-ref.html
+== 1364280-2a.html 1364280-2-ref.html
+== 1364280-2b.html 1364280-2-ref.html
+== 1364280-2c.html 1364280-2-ref.html
+== 1364360-1.html 1364360-1-ref.html
+== 1365159-1.html 1365159-1-ref.html
+== 1365162-1.html 1365162-1-ref.html
+== 1352306-1.html 1352306-1-ref.html
+== 1366144.html 1366144-ref.html
+== 1367592-1.html 1367592-1-ref.html
+== 1368113-1.html 1368113-1-ref.html
+== 1369584-1a.html 1369584-1-ref.html
+== 1369584-1b.html 1369584-1-ref.html
+== 1369954-1.xhtml 1369954-1-ref.xhtml
+== 1369985-1.html 1369985-1-ref.html
+== 1371130.xhtml 1371130-ref.xhtml
+== 1375315-1.html 1375315-1-ref.html
+== 1375315-2.html 1375315-2-ref.html
+== 1375315-3.html 1375315-3-ref.html
+== 1375315-4.html 1375315-4-ref.html
+== 1375315-5.html 1375315-5-ref.html
+== 1375315-6.html 1375315-6-ref.html
+== 1375315-7.html 1375315-7-ref.html
+== 1375315-8.html 1375315-8-ref.html
+== 1375315-9.html 1375315-9-ref.html
+== 1375315-10.html 1375315-10-ref.html
+fuzzy(0-1,0-4) == 1375315-11.html 1375315-11-ref.html
+== 1375315-12.html 1375315-12-ref.html
+== 1374062.html 1374062-ref.html
+== 1375674.html 1375674-ref.html
+== 1372041.html 1372041-ref.html
+== 1376092.html 1376092-ref.html
+fuzzy-if(Android,0-3,0-3) needs-focus == 1377447-1.html 1377447-1-ref.html
+needs-focus != 1377447-1.html 1377447-2.html
+== 1379041.html 1379041-ref.html
+== 1379696.html 1379696-ref.html
+== 1380224-1.html 1380224-1-ref.html
+== 1384065.html 1384065-ref.html
+== 1384275-1.html 1384275-1-ref.html
+== 1381821.html 1381821-ref.html
+== 1395650-1.html 1395650-1-ref.html
+== 1398500-1.html 1398500-1-ref.html
+== 1401317.html 1401317-ref.html
+== 1401992.html 1401992-ref.html
+== 1405878-1.xml 1405878-1-ref.xml
+== 1404057.html 1404057-ref.html
+!= 1404057.html 1404057-noref.html
+fuzzy(0-129,0-48) == 1406179.html 1406179-ref.html
+== 1406183-1.html 1406183-1-ref.html
+== 1410028.html 1410028-ref.html
+fuzzy-if((!gtkWidget&&!geckoview&&!swgl&&!(isCoverageBuild&&winWidget))||useDrawSnapshot,1-2,17300-17500) skip-if(winWidget&&isCoverageBuild) == 1412375.html 1412375-ref.html # Skip WinCCov: Bug 1740155
+fuzzy(0-255,0-4054) == 1415987-1.html 1415987-1-ref.html # this is a large fuzz, without the fix the test fails in the range 246-255,3237-25110, which overlaps the fuzz range, but would still catch regressing this bug some of the time which is better than not having a test.
+== 1419820-1.html 1419820-1-ref.html
+== 1420946-1.html 1420946-1-ref.html
+== 1422393.html 1422393-ref.html
+skip-if(winWidget&&isCoverageBuild) == 1424177.html 1424177-ref.html
+== 1424680.html 1424680-ref.html
+== 1424798-1.html 1424798-ref.html
+fuzzy-if(swgl,0-1,0-31430) == 1425243-1.html 1425243-1-ref.html
+fuzzy-if(Android,0-66,0-574) fuzzy-if(d2d,0-89,0-777) fuzzy-if(!Android&&!d2d,0-1,0-31430) fuzzy-if(winWidget,1-1,31240-31430) == 1425243-2.html 1425243-2-ref.html
+== 1430869.html 1430869-ref.html
+== 1432541.html 1432541-ref.html
+== 1446470.html 1035091-ref.html
+== 1456111-1.html about:blank
+# Note: The following test depends on having a pref-controllable CSS property,
+# and the property needs to have a non-initial value that causes it to create
+# a containing block for fixed-position descendants. It doesn't matter whether
+# the pref is enabled by default; we just need to be able to pref it off here.
+# For now, we use the "backdrop-filter" CSS property (and its pref).
+test-pref(layout.css.backdrop-filter.enabled,false) == 1466008.html 1466008-ref.html
+fuzzy(0-2,0-625) == 1466638-1.html 1466638-1-ref.html
+== bug1472465-1.html bug1472465-1-ref.html
+== 1475971-1.html 1475971-1-ref.html
+== chrome://reftest/content/bugs/1483649-1.xhtml chrome://reftest/content/bugs/1483649-1-ref.xhtml
+== 1483946.html 1483946-ref.html
+test-pref(layout.css.visited_links_enabled,false) == 1488155.html 1488155-ref.html
+== 1492660-1.html 1492660-1-ref.html
+== 1499386.html 1499386-ref.html
+== 1509425-1.html 1509425-1-ref.html
+== 1511570.html 1511570-ref.html
+== 1513423-1.html 1513423-1-ref.html
+== 1513423-2.html 1513423-2-ref.html
+== 1513423-3.html 1513423-3-ref.html
+pref(layout.accessiblecaret.enabled,true) == 1517385.html 1517385-ref.html
+fuzzy(0-5,0-2300) == 1529992-1.html 1529992-1-ref.html
+fuzzy-if(Android,9-14,44-60) fails-if(!useDrawSnapshot) == 1529992-2.html 1529992-2-ref.html
+== 1535040-1.html 1535040-1-ref.html
+== 1545360-1.xhtml 1545360-1-ref.xhtml
+skip-if(!asyncPan) == 1544895.html 1544895-ref.html
+random-if(useDrawSnapshot) == 1546856-1.html 1546856-ref.html
+== 1546856-2.html 1546856-ref.html
+== 1547759-1.html 1547759-1-ref.html
+== 1548809.html 1548809-ref.html
+test-pref(layout.css.prefers-color-scheme.content-override,0) != 1551040.txt 1551040.txt
+test-pref(layout.css.prefers-color-scheme.content-override,0) == 1551040.html 1551040.html
+!= 1552789-1.html 1552789-ref-1.html
+pref(image.downscale-during-decode.enabled,true) skip-if(((gtkWidget&&isDebugBuild)||(gtkWidget&&AddressSanitizer)||Android||ThreadSanitizer)||(Android&&isDebugBuild)) random-if(useDrawSnapshot) fuzzy(0-2,0-188) == 1553571-1.html 1553571-1-ref.html
+pref(image.downscale-during-decode.enabled,true) fuzzy(0-2,0-2004) skip-if(((gtkWidget&&isDebugBuild)||(gtkWidget&&AddressSanitizer)||Android||ThreadSanitizer)||(Android&&isDebugBuild)) random-if(useDrawSnapshot) == 1553571-2.html 1553571-2-ref.html
+== 1558937-1.html 1558937-1-ref.html
+!= 1563484.html 1563484-notref.html
+== 1563484.html 1563484-ref.html
+fuzzy-if(!winWidget,251-255,464-1613) fuzzy-if(geckoview,251-255,1392-1405) skip-if(Android) == 1562733-rotated-nastaliq-1.html 1562733-rotated-nastaliq-1-ref.html #Bug 1604765
+fuzzy-if(winWidget,0-31,0-3) fuzzy-if(geckoview,0-93,0-87) == 1562733-rotated-nastaliq-2.html 1562733-rotated-nastaliq-2-ref.html
+test-pref(plain_text.wrap_long_lines,false) != 1565129.txt 1565129.txt
+fuzzy(0-32,0-8) fuzzy-if(Android,0-32,0-1458) == 1576553-1.html 1576553-1-ref.html
+fuzzy(0-1,0-10000) == 1577566-1.html 1577566-1-ref.html
+== 1579953-2.html 1579953-2-ref.html
+asserts(1-2) == 1588954.html 1588954-ref.html # Bug 1588954
+== 1595199-1.html 1595199-1-ref.html
+== 1599841-1.html 1599841-1-ref.html
+!= 1599841-2.html 1599841-2-notref.html
+== chrome://reftest/content/bugs/1606130.html chrome://reftest/content/bugs/1606130-ref.html
+== 1608124-1.html 1608124-1-ref.html
+skip-if(!OSX) != 1608124-2.html 1608124-2-notref.html
+== 1613380.html 1613380-ref.html
+fuzzy(0-145,0-48536) == 1614788-1.svg 1614788-1-ref.svg # large fuzz necesary to test bug: 239,202824 is how much it differs when bug exists
+== blob-fallback-clip.html blob-fallback-clip-ref.html
+fuzzy-if(OSX,0-42,0-4) fuzzy-if(winWidget,249-249,999-999) == 1617515-1.html 1617515-1-ref.html
+== 1624118.html 1624118-ref.html
+fuzzy(0-2,0-21184) == 1626259-1.html 1626259-1-ref.html
+fuzzy(0-2,0-21184) == 1626259-2.html 1626259-2-ref.html
+!= 1642583-1.html 1642583-1-ref.html
+== 1642603-1.html 1642603-1-ref.html
+== 1645549-2.html 1645549-2-ref.html
+== 1641769-1.html 1641769-1-ref.html
+fuzzy(0-2,0-96600) == 1648282-1a.html 1648282-1-ref.html
+fuzzy(0-2,0-96600) == 1648282-1b.html 1648282-1-ref.html
+!= 1672137-1.html 1672137-1-notref.html
+== 1673677-1.html 1673677-1-ref.html
+== 1673677-2.html 1673677-2-ref.html
+== 1673677-3.html 1673677-3-ref.html
+== 1686729-1.html 1686729-1-ref.html
+!= chrome://reftest/content/bugs/1688004.xhtml about:blank
+pref(image.downscale-during-decode.enabled,true) fuzzy-if(OSX||winWidget,0-167,0-44310) fuzzy-if(gtkWidget,0-2,0-37220) == 1714763-1.html 1714763-1-ref.html
+pref(image.downscale-during-decode.enabled,true) fuzzy-if(OSX||winWidget,0-166,0-22530) fuzzy-if(gtkWidget,0-18,0-19006) fuzzy-if(Android,0-21,0-22260) == 1714763-2.html 1714763-2-ref.html
+pref(image.downscale-during-decode.enabled,true) fuzzy-if(OSX||winWidget,0-235,0-289) fuzzy-if(gtkWidget,0-186,0-240) fuzzy-if(Android,0-185,0-232) == 1714763-3.html 1714763-3-ref.html
+skip-if(!appleSilicon) != 1721223-1.html 1721223-1-notref.html # Big Sur required for updated system font; OSX value is clamped to 10.15
+skip-if(Android) == 1727172-1.xhtml 1727172-1-ref.html
+== 1726663-1.html 1726663-1-ref.html
+== 1727016-1.html 1727016-1-ref.html
+!= 1730314-1.html 1730314-1-ref.html
+fuzzy(0-3,0-19) fuzzy-if(Android,0-3,0-1901) fuzzy-if(winWidget,0-154,0-118) == 1738700-1.html 1738700-1-ref.html
+
+# Have to skip android because it doesn't set up example.org as a local host,
+# so the test crashes there.
+fuzzy(255-255,171000-171000) skip-if(Android) HTTP == 1743533-1.html 1743533-1-notref.html # do not decrease the fuzz! this is a not equal test, the high fuzz minimum is to ensure they differ by enough.
+fuzzy(255-255,171000-171000) skip-if(Android) HTTP == 1743533-2.html 1743533-1-notref.html # do not decrease the fuzz! this is a not equal test, the high fuzz minimum is to ensure they differ by enough.
+fuzzy(0-128,0-17172) skip-if(Android) HTTP == 1743533-1.html 1743533-2.html # Fuzzy is only needed because scrollbars and fragmentation are different between fission and non-fission iframes, otherwise this should pass exactly. It's pretty close.
+
+== 1743560-1.html 1743560-1-ref.html
+== 1743851-1.html 1743851-1-ref.html
+pref(image.downscale-during-decode.enabled,true) == 1744468-1.html 1744468-1-ref.html # do not increase fuzz without looking, the test should be smoothly downscaled, not pixelated
+== 1747272-1.html 1747272-1-ref.html
+== 1750146-1.html 1750146-1-ref.html
+== 1735265-1.html 1735265-1-ref.html
+fuzzy(0-1,0-1000) == 1769082-1.html 1769082-1-ref.html
+== 1773484.html 1773484-ref.html
+
+# The following tests are skipped on Android since Android doesn't deal very
+# well with dynamic DPI changes and it corrupts subsequent reftests.
+# TODO(emilio): Maybe we can enable just the text-zoom ones?
+skip-if(Android) test-pref(ui.textScaleFactor,150) test-pref(browser.display.os-zoom-behavior,0) == 1773633.html 1773633.html
+skip-if(Android) test-pref(ui.textScaleFactor,150) test-pref(browser.display.os-zoom-behavior,2) != 1773633.html 1773633.html
+skip-if(Android) test-pref(ui.textScaleFactor,150) test-pref(browser.display.os-zoom-behavior,2) == 1773633.html 1773633-text-zoom.html
+# TODO(emilio): This doesn't quite work because textScaleFactor also applies to the reftest window itself, ugh.
+# test-pref(ui.textScaleFactor,50) test-pref(browser.display.os-zoom-behavior,1) == 1773633.html 1773633-full-zoom.html
+# This works (but not on macOS for some reason).
+skip-if(Android) test-pref(ui.textScaleFactor,50) test-pref(browser.display.os-zoom-behavior,1) != 1773633.html 1773633.html
+pref(widget.disable-dark-scrollbar,false) == 1777135.html 1777135-ref.html
+test-pref(widget.non-native-theme.use-theme-accent,false) == 1778834.html 1778834-ref.html
+# do not adjust the fuzz without looking, this test was written as fuzzy on purpose (because that was the only way to make a test work)
+fuzzy(16-47,26939-44425) == 1780191-1.svg 1780191-1-ref.svg
+pref(layout.css.prefers-color-scheme.content-override,0) == 1787127.html 1787127-ref.html
+pref(layout.css.prefers-color-scheme.content-override,1) == 1787127.html 1787127-ref.html
+pref(layout.css.prefers-color-scheme.content-override,2) == 1787127.html 1787127-ref.html
+== 1792643-1.html 1792643-1-ref.html
+skip-if(!/^Windows\x20NT\x2010\.0/.test(http.oscpu)) == 1798297-1.html 1798297-1-ref.html
+skip-if(!/^Windows\x20NT\x2010\.0/.test(http.oscpu)) != 1798297-1.html 1798297-1-notref.html
+== 1799425-1.html 1799425-1-ref.html
+fuzzy-if(winWidget,114-114,572-572) == 1800437-1.html 1800437-1-ref.html
+== 1803999-1.html 1803999-1-ref.html
+# testing the same bug but we can hit it via a few different code paths, 1 is raster image, 2 is vector image, 3 is vector image with an image restriction region
+pref(image.downscale-during-decode.enabled,true) == 1804872-1.html 1804872-1-ref.html
+pref(image.downscale-during-decode.enabled,true) == 1804872-2.html 1804872-2-ref.html
+pref(image.downscale-during-decode.enabled,true) == 1804872-3.html 1804872-3-ref.html
+== 1814628-1.html 1814628-1-ref.html
+== 1814047.html 1814047-ref.html
+== 1818412-1.html 1818412-1-ref.html
+== 1827009-1.html 1827009-1-ref.html
+pref(layout.testing.overlay-scrollbars.always-visible,true) pref(ui.useOverlayScrollbars,1) == 1827337-1.html 1827337-1-ref.html
+pref(layout.testing.overlay-scrollbars.always-visible,true) pref(ui.useOverlayScrollbars,1) fuzzy-if(winWidget,0-21,0-134) fuzzy-if(cocoaWidget,0-2,0-12) == 1828879-1.html 1828879-1-ref.html
+skip-if(!OSX) != 1834316-1.html 1834316-1-notref.html
+skip-if(!OSX) test-pref(layout.css.font-visibility.standard,1) ref-pref(layout.css.font-visibility.standard,3) == 1835271-1.html 1835271-1-ref.html
+skip-if(!OSX) != 1836024-1.html 1836024-1-notref.html
+# The 1840511-* tests are reliably fuzzy on certain configurations, per bug
+# 1840511. (It passes on macOS and Android. It also passes with software WR,
+# or when using drawSnapshot.)
+fuzzy-if(!cocoaWidget&&!Android&&!swgl&&!useDrawSnapshot,1-1,142-142) == 1840511-1.html 1840511-1-ref.html
+fuzzy-if(!cocoaWidget&&!Android&&!swgl&&!useDrawSnapshot,1-1,284-284) fuzzy-if(useDrawSnapshot,1-1,4-4) == 1840511-2.html 1840511-1-ref.html
+# This test should render blank, but is reliably fuzzy, per bug 1840747.
+fuzzy-if(!useDrawSnapshot,18-19,294-322) == 1840747-1.html about:blank
+# This test has some fine/expected AA-related fuzziness along the edge of a
+# covered-up red shape. But there's a single bright-red pixel that shines
+# through, which is unexpected and is responsible for the 255-255 difference
+# here. That's tracked in bug 1840747.
+fuzzy-if(!useDrawSnapshot&&!swgl,254-255,110-121) fuzzy-if(useDrawSnapshot,18-18,93-93) fuzzy-if(swgl,19-19,58-58) == 1841355-1.html about:blank
diff --git a/layout/reftests/bugs/repeatable-diagonal-gradient.png b/layout/reftests/bugs/repeatable-diagonal-gradient.png
new file mode 100644
index 0000000000..d114e100d3
--- /dev/null
+++ b/layout/reftests/bugs/repeatable-diagonal-gradient.png
Binary files differ
diff --git a/layout/reftests/bugs/solidblue.png b/layout/reftests/bugs/solidblue.png
new file mode 100644
index 0000000000..a64b6a4255
--- /dev/null
+++ b/layout/reftests/bugs/solidblue.png
Binary files differ
diff --git a/layout/reftests/bugs/solidblue2.png b/layout/reftests/bugs/solidblue2.png
new file mode 100644
index 0000000000..5da0137001
--- /dev/null
+++ b/layout/reftests/bugs/solidblue2.png
Binary files differ
diff --git a/layout/reftests/bugs/square-left-right-32x32.png b/layout/reftests/bugs/square-left-right-32x32.png
new file mode 100644
index 0000000000..d088179e88
--- /dev/null
+++ b/layout/reftests/bugs/square-left-right-32x32.png
Binary files differ
diff --git a/layout/reftests/bugs/square-outline-32x32.png b/layout/reftests/bugs/square-outline-32x32.png
new file mode 100644
index 0000000000..917163f409
--- /dev/null
+++ b/layout/reftests/bugs/square-outline-32x32.png
Binary files differ
diff --git a/layout/reftests/bugs/square-top-bottom-32x32.png b/layout/reftests/bugs/square-top-bottom-32x32.png
new file mode 100644
index 0000000000..3de5214edd
--- /dev/null
+++ b/layout/reftests/bugs/square-top-bottom-32x32.png
Binary files differ
diff --git a/layout/reftests/bugs/subdir/445004-ref-subframe.html b/layout/reftests/bugs/subdir/445004-ref-subframe.html
new file mode 100644
index 0000000000..7f6af3c6dd
--- /dev/null
+++ b/layout/reftests/bugs/subdir/445004-ref-subframe.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<body>
+ <iframe name="w" width="100" height="100" src="passinner.png"></iframe>
+ <iframe name="x" width="100" height="100" src="445004-ref-subsubframe.html"></iframe>
+ <iframe name="y" width="100" height="100" src="passinner.png"></iframe>
+ <iframe name="z" width="100" height="100" src="445004-ref-subsubframe.html"></iframe>
+ <img src="passinner.png">
+</body>
diff --git a/layout/reftests/bugs/subdir/445004-ref-subsubframe.html b/layout/reftests/bugs/subdir/445004-ref-subsubframe.html
new file mode 100644
index 0000000000..21e8bed1bf
--- /dev/null
+++ b/layout/reftests/bugs/subdir/445004-ref-subsubframe.html
@@ -0,0 +1 @@
+<img src="passinner.png">
diff --git a/layout/reftests/bugs/subdir/445004-subframe.html b/layout/reftests/bugs/subdir/445004-subframe.html
new file mode 100644
index 0000000000..666cec9933
--- /dev/null
+++ b/layout/reftests/bugs/subdir/445004-subframe.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function $(str) { return document.getElementById(str); }
+ function hookLoad(str) {
+ $(str).onload = function() { window.parent.loadEnded(); };
+ window.parent.loadStarted();
+ }
+ window.onload = function() {
+ hookLoad("w");
+ $("w").contentWindow.location.href = "passinner.png";
+ hookLoad("x");
+ var doc = $("x").contentDocument;
+ doc.write('<img src="passinner.png">');
+ doc.close();
+ };
+ function doIt() {
+ hookLoad("y");
+ $("y").contentWindow.location.href = "passouter.png";
+ hookLoad("z");
+ var doc = $("z").contentDocument;
+ doc.write('<img src="passouter.png">');
+ doc.close();
+ }
+ </script>
+ </head>
+ <body>
+ <iframe name="w" id="w" width="100" height="100"></iframe>
+ <iframe name="x" id="x" width="100" height="100"></iframe>
+ <iframe name="y" id="y" width="100" height="100"></iframe>
+ <iframe name="z" id="z" width="100" height="100"></iframe>
+ <img src="passinner.png">
+ </body>
+</html>
diff --git a/layout/reftests/bugs/subdir/passinner.png b/layout/reftests/bugs/subdir/passinner.png
new file mode 100644
index 0000000000..3b30b1de7c
--- /dev/null
+++ b/layout/reftests/bugs/subdir/passinner.png
Binary files differ
diff --git a/layout/reftests/bugs/subdir/passouter.png b/layout/reftests/bugs/subdir/passouter.png
new file mode 100644
index 0000000000..ce5c1d9738
--- /dev/null
+++ b/layout/reftests/bugs/subdir/passouter.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-1.png b/layout/reftests/bugs/support/replaced-min-max-1.png
new file mode 100644
index 0000000000..d6946724d9
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-1.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-10.png b/layout/reftests/bugs/support/replaced-min-max-10.png
new file mode 100644
index 0000000000..bfdca3e6f3
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-10.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-11.png b/layout/reftests/bugs/support/replaced-min-max-11.png
new file mode 100644
index 0000000000..38ee90dda0
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-11.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-12.png b/layout/reftests/bugs/support/replaced-min-max-12.png
new file mode 100644
index 0000000000..87433d4d7b
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-12.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-13.png b/layout/reftests/bugs/support/replaced-min-max-13.png
new file mode 100644
index 0000000000..c07d66e788
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-13.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-14.png b/layout/reftests/bugs/support/replaced-min-max-14.png
new file mode 100644
index 0000000000..e89dbe9758
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-14.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-15.png b/layout/reftests/bugs/support/replaced-min-max-15.png
new file mode 100644
index 0000000000..717ea111b6
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-15.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-16.png b/layout/reftests/bugs/support/replaced-min-max-16.png
new file mode 100644
index 0000000000..0a49bbf1c3
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-16.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-17.png b/layout/reftests/bugs/support/replaced-min-max-17.png
new file mode 100644
index 0000000000..a2ee273d79
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-17.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-18.png b/layout/reftests/bugs/support/replaced-min-max-18.png
new file mode 100644
index 0000000000..d18f453417
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-18.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-19.png b/layout/reftests/bugs/support/replaced-min-max-19.png
new file mode 100644
index 0000000000..8900f36c41
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-19.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-2.png b/layout/reftests/bugs/support/replaced-min-max-2.png
new file mode 100644
index 0000000000..58338097fe
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-2.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-3.png b/layout/reftests/bugs/support/replaced-min-max-3.png
new file mode 100644
index 0000000000..e5e7d6e8a8
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-3.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-4.png b/layout/reftests/bugs/support/replaced-min-max-4.png
new file mode 100644
index 0000000000..c099ae4271
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-4.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-5.png b/layout/reftests/bugs/support/replaced-min-max-5.png
new file mode 100644
index 0000000000..9d9d8105ff
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-5.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-6.png b/layout/reftests/bugs/support/replaced-min-max-6.png
new file mode 100644
index 0000000000..781f894a5e
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-6.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-7.png b/layout/reftests/bugs/support/replaced-min-max-7.png
new file mode 100644
index 0000000000..3f91a11f8e
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-7.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-8.png b/layout/reftests/bugs/support/replaced-min-max-8.png
new file mode 100644
index 0000000000..69951ec257
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-8.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max-9.png b/layout/reftests/bugs/support/replaced-min-max-9.png
new file mode 100644
index 0000000000..3ac586daa5
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max-9.png
Binary files differ
diff --git a/layout/reftests/bugs/support/replaced-min-max.png b/layout/reftests/bugs/support/replaced-min-max.png
new file mode 100644
index 0000000000..3ef233005a
--- /dev/null
+++ b/layout/reftests/bugs/support/replaced-min-max.png
Binary files differ