From 8d940c6e4d2e07286640ce6f4e0cd557a58a9814 Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Wed, 24 Apr 2019 17:36:42 +0000 Subject: [PATCH 01/60] Bug 1545859 - Set gfx.font_ahem_antialias_none=True for reftests. r=jfkthame Set gfx.font_ahem_antialias_none=True for reftests. Differential Revision: https://phabricator.services.mozilla.com/D28327 --HG-- extra : moz-landing-system : lando --- layout/reftests/w3c-css/failures.list | 147 +++---- layout/reftests/w3c-css/received/reftest.list | 396 +++++++++--------- .../w3c-css/submitted/variables/reftest.list | 6 +- layout/tools/reftest/runreftest.py | 1 + 4 files changed, 278 insertions(+), 272 deletions(-) diff --git a/layout/reftests/w3c-css/failures.list b/layout/reftests/w3c-css/failures.list index 0ffb8cf2dde1..5d3b546ff175 100644 --- a/layout/reftests/w3c-css/failures.list +++ b/layout/reftests/w3c-css/failures.list @@ -25,7 +25,7 @@ skip selectors/focus-within-shadow-*.html # Fuzzy fuzzy-if(OSX||Android,0-78,0-197) css-values/ch-unit-001.html fuzzy(0-50,0-160) css-values/ch-unit-002.html -fuzzy-if(Android,78,179) css-values/ch-unit-003.html +fuzzy-if(Android,78-78,179-179) fuzzy-if(OSX,63-71,6-86) css-values/ch-unit-003.html fuzzy(0-78,0-197) fails-if(webrender&&cocoaWidget) css-values/ch-unit-004.html # Bug 435426 @@ -97,34 +97,38 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/sizing-or # Fuzzy fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/abs-pos-non-replaced-v??-???.xht -fuzzy-if(OSX||winWidget,0-114,0-600) css-writing-modes/baseline-inline-non-replaced-00?.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) css-writing-modes/block-flow-direction-???-0??.xht +fuzzy-if(winWidget,0-114,0-600) fuzzy-if(OSX&&!webrender,255-255,100-200) css-writing-modes/baseline-inline-non-replaced-00?.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) css-writing-modes/block-flow-direction-???-0??.xht fuzzy-if(OSX,0-255,0-200) css-writing-modes/box-offsets-rel-pos-vlr-005.xht fuzzy-if(OSX,0-255,0-200) css-writing-modes/box-offsets-rel-pos-vrl-004.xht -fuzzy-if(OSX||winWidget,0-114,0-300) css-writing-modes/caption-side-v??-00?.xht +fuzzy-if(winWidget,0-114,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) css-writing-modes/caption-side-v??-00?.xht fuzzy-if(webrender&&cocoaWidget,7-7,2-2) css-writing-modes/different-block-flow-dir-002.xht fuzzy-if(OSX||winWidget,0-215,0-780) css-writing-modes/central-baseline-alignment-00?.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) css-writing-modes/direction-v??-00?.xht -fuzzy-if(OSX||winWidget,0-135,0-904) css-writing-modes/float-contiguous-v??-01?.xht -fuzzy-if(OSX||winWidget,0-109,0-300) css-writing-modes/float-shrink-to-fit-vlr-009.xht -fuzzy-if(OSX||winWidget,0-109,0-300) css-writing-modes/float-shrink-to-fit-vrl-008.xht -fuzzy-if(OSX||winWidget,0-108,0-300) css-writing-modes/float-v??-0??.xht -fuzzy-if(OSX||winWidget,0-62,0-404) fuzzy-if(webrender&&winWidget,92-92,100-100) fails-if(webrender&&cocoaWidget) css-writing-modes/height-width-inline-non-replaced-v??-00?.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) css-writing-modes/direction-v??-00?.xht +fuzzy-if(winWidget,0-135,0-904) fuzzy-if(OSX&&!webrender,255-255,200-200) css-writing-modes/float-contiguous-v??-01?.xht +fuzzy-if(winWidget,0-135,0-904) css-writing-modes/float-contiguous-vlr-013.xht +fuzzy-if(winWidget,0-135,0-904) css-writing-modes/float-contiguous-vrl-012.xht +fuzzy-if(winWidget,0-109,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) css-writing-modes/float-shrink-to-fit-vlr-009.xht +fuzzy-if(winWidget,0-109,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) css-writing-modes/float-shrink-to-fit-vrl-008.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) css-writing-modes/float-v??-0??.xht +fuzzy-if(winWidget,0-62,0-404) fuzzy-if(OSX&&!webrender,255-255,100-100) css-writing-modes/height-width-inline-non-replaced-v??-00?.xht fuzzy-if(OSX||winWidget,0-218,0-621) css-writing-modes/inline-block-alignment-orthogonal-v??-00?.xht -fuzzy-if(OSX||winWidget,0-135,0-1080) css-writing-modes/inline-block-alignment-slr-009.xht -fuzzy-if(OSX||winWidget,0-112,0-960) css-writing-modes/inline-block-alignment-srl-008.xht +fuzzy-if(winWidget,0-135,0-1080) fuzzy-if(OSX&&!webrender,255-255,432-432) css-writing-modes/inline-block-alignment-slr-009.xht +fuzzy-if(winWidget,0-112,0-960) fuzzy-if(OSX&&!webrender,255-255,432-432) css-writing-modes/inline-block-alignment-srl-008.xht fuzzy-if(OSX||winWidget,0-213,0-1540) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/line-box-direction-???-0??.xht fuzzy-if(OSX||winWidget,0-110,0-1200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/row-progression-???-0??.xht fuzzy-if(OSX||winWidget,0-110,0-1200) css-writing-modes/table-column-order-00?.xht -fuzzy-if(winWidget,0-110,0-1200) fuzzy-if(webrender&&cocoaWidget,1-1,2-2) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/table-column-order-slr-007.xht +fuzzy-if(winWidget,0-110,0-1200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/table-column-order-slr-007.xht fuzzy-if(OSX||winWidget,0-110,0-1200) css-writing-modes/table-column-order-srl-006.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-align-v??-0??.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-baseline-???-00?.xht -fuzzy-if(OSX,0-23,0-16) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-combine-upright-decorations-001.html +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-align-v??-0??.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-baseline-???-00?.xht +fuzzy-if(winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-baseline-vlr-005.xht +fuzzy-if(winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-baseline-vrl-004.xht +fuzzy-if(OSX&&!webrender,255-255,100-100) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-combine-upright-decorations-001.html fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-indent-v??-0??.xht -fuzzy-if(OSX||winWidget,0-226,0-960) fails-if(webrender&&cocoaWidget) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-orientation-016.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/vertical-alignment-*.xht -fuzzy-if(OSX||winWidget,0-158,0-624) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/writing-mode-vertical-??-00?.* +fuzzy-if(OSX||winWidget,0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-orientation-016.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/vertical-alignment-*.xht +fuzzy-if(winWidget,0-158,0-624) fuzzy-if(OSX&&!webrender,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/writing-mode-vertical-??-00?.* fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/text-combine-upright-value-all-00?.html # Bug 1167911 @@ -151,7 +155,7 @@ css-writing-modes/flexbox_align-items-stretch-writing-modes.html # Bug 1179952 fails css-writing-modes/inline-block-alignment-00?.xht -fuzzy-if(OSX||winWidget,0-112,0-960) css-writing-modes/inline-block-alignment-006.xht +fuzzy-if(winWidget,0-112,0-960) fuzzy-if(OSX&&!webrender,255-255,432-432) css-writing-modes/inline-block-alignment-006.xht fails css-writing-modes/inline-table-alignment-00?.xht # Bug 1227616 @@ -191,14 +195,14 @@ css-writing-modes/text-combine-upright-layout-rules-001.html #### CSS Multi-column 1 ############################################## # Fuzzy annotations for multicol tests are due to AA differences. -fails-if(winWidget||OSX) css-multicol/multicol-block-no-clip-001.xht -fails-if(winWidget||OSX) css-multicol/multicol-block-no-clip-002.xht +css-multicol/multicol-block-no-clip-001.xht +css-multicol/multicol-block-no-clip-002.xht fails css-multicol/multicol-br-inside-avoidcolumn-001.xht fails css-multicol/multicol-break-000.xht fails css-multicol/multicol-break-001.xht -fuzzy(0-135,0-1008) fails-if(webrender&&cocoaWidget) css-multicol/multicol-clip-001.xht +fuzzy(0-135,0-1008) css-multicol/multicol-clip-001.xht fuzzy(0-135,0-770) css-multicol/multicol-clip-002.xht -fuzzy(0-135,0-467) fails-if(webrender&&cocoaWidget) css-multicol/multicol-collapsing-001.xht +fuzzy(0-135,0-467) css-multicol/multicol-collapsing-001.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-001.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-002.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-003.xht @@ -206,70 +210,70 @@ fuzzy(0-87,0-180) css-multicol/multicol-columns-004.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-005.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-006.xht fuzzy(0-87,0-180) css-multicol/multicol-columns-007.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-columns-invalid-001.xht -fails-if(OSX||winWidget) css-multicol/multicol-columns-invalid-002.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-columns-toolong-001.xht -fuzzy(0-135,0-530) fails-if(webrender&&cocoaWidget) css-multicol/multicol-containing-001.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-columns-invalid-001.xht +css-multicol/multicol-columns-invalid-002.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-columns-toolong-001.xht +fuzzy(0-135,0-530) css-multicol/multicol-containing-001.xht fuzzy(0-215,0-241) css-multicol/multicol-containing-002.xht fuzzy(0-87,0-180) css-multicol/multicol-count-001.xht -fails css-multicol/multicol-count-002.xht -fails-if(winWidget||OSX) css-multicol/multicol-count-computed-003.xht -fuzzy-if(winWidget||OSX||gtkWidget,0-112,0-861) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-computed-004.xht -fails-if(winWidget||OSX) css-multicol/multicol-count-computed-005.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-negative-001.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-negative-002.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-non-integer-001.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-non-integer-002.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-count-non-integer-003.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-count-002.xht +css-multicol/multicol-count-computed-003.xht +fuzzy-if(winWidget||OSX||gtkWidget,0-112,0-861) css-multicol/multicol-count-computed-004.xht +css-multicol/multicol-count-computed-005.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-count-negative-001.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-count-negative-002.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-count-non-integer-001.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-count-non-integer-002.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-count-non-integer-003.xht fuzzy(0-135,0-80) css-multicol/multicol-fill-auto-002.xht fuzzy(0-135,0-3270) css-multicol/multicol-fill-auto-003.xht fuzzy(0-135,0-80) css-multicol/multicol-fill-balance-001.xht fuzzy(0-135,0-821) css-multicol/multicol-gap-000.xht fuzzy(0-255,0-329) css-multicol/multicol-gap-001.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-gap-002.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-gap-003.xht -fuzzy(0-107,0-1823) fails-if(webrender&&cocoaWidget) css-multicol/multicol-gap-fraction-001.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-gap-002.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-gap-003.xht +fuzzy(0-107,0-1823) css-multicol/multicol-gap-fraction-001.xht fuzzy-if(winWidget||OSX||gtkWidget,0-204,0-1048) fuzzy-if(skiaContent,0-208,0-1048) css-multicol/multicol-gap-large-001.xht -fuzzy(0-225,0-920) fails-if(webrender&&cocoaWidget) css-multicol/multicol-gap-large-002.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-gap-negative-001.xht +fuzzy(0-225,0-920) css-multicol/multicol-gap-large-002.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-gap-negative-001.xht fails css-multicol/multicol-height-block-child-001.xht fuzzy(0-255,0-3762) css-multicol/multicol-inherit-001.xht -fuzzy(0-135,0-1893) fails-if(webrender&&cocoaWidget) css-multicol/multicol-inherit-002.xht -fails css-multicol/multicol-inherit-003.xht +fuzzy(0-135,0-1893) css-multicol/multicol-inherit-002.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-inherit-003.xht fuzzy(0-97,0-264) css-multicol/multicol-list-item-001.xht fuzzy(0-73,0-1200) css-multicol/multicol-margin-001.xht fuzzy(0-73,0-1200) css-multicol/multicol-margin-002.xht fuzzy(0-243,0-3322) fuzzy-if(skiaContent,0-244,0-3322) css-multicol/multicol-margin-child-001.xht fuzzy(0-255,0-4008) css-multicol/multicol-nested-002.xht fuzzy(0-255,0-4109) css-multicol/multicol-nested-005.xht -fuzzy(0-204,0-2463) fuzzy-if(skiaContent,0-208,0-2463) fails-if(webrender&&cocoaWidget) css-multicol/multicol-nested-margin-001.xht -fails-if(OSX||winWidget) css-multicol/multicol-nested-margin-002.xht -fuzzy(0-204,0-2371) fuzzy-if(skiaContent,0-208,0-2371) fails-if(webrender&&cocoaWidget) css-multicol/multicol-nested-margin-003.xht -fuzzy(0-225,0-2529) fails-if(webrender&&cocoaWidget) css-multicol/multicol-nested-margin-004.xht -fuzzy(0-225,0-2529) fails-if(webrender&&cocoaWidget) css-multicol/multicol-nested-margin-005.xht +fuzzy(0-204,0-2463) fuzzy-if(skiaContent,0-208,0-2463) css-multicol/multicol-nested-margin-001.xht +css-multicol/multicol-nested-margin-002.xht +fuzzy(0-204,0-2371) fuzzy-if(skiaContent,0-208,0-2371) css-multicol/multicol-nested-margin-003.xht +fuzzy(0-225,0-2529) css-multicol/multicol-nested-margin-004.xht +fuzzy(0-225,0-2529) css-multicol/multicol-nested-margin-005.xht fuzzy(0-135,0-142) css-multicol/multicol-overflow-000.xht -fuzzy(0-204,0-1844) fuzzy-if(skiaContent,0-208,0-1844) fails-if(webrender&&cocoaWidget) css-multicol/multicol-overflowing-001.xht +fuzzy(0-204,0-1844) fuzzy-if(skiaContent,0-208,0-1844) css-multicol/multicol-overflowing-001.xht fuzzy-if(OSX,0-61,0-2) fuzzy-if(skiaContent,0-64,0-2) css-multicol/multicol-reduce-000.xht fuzzy-if(OSX,0-11,0-20) css-multicol/multicol-rule-000.xht fuzzy(0-135,0-1584) css-multicol/multicol-rule-001.xht -fails css-multicol/multicol-rule-002.xht -fails-if(OSX||winWidget) css-multicol/multicol-rule-003.xht -fails-if(OSX||winWidget) css-multicol/multicol-rule-color-001.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-dashed-000.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-dotted-000.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-double-000.xht -fails-if(OSX||winWidget) css-multicol/multicol-rule-fraction-001.xht -fails-if(OSX||winWidget) css-multicol/multicol-rule-fraction-002.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-rule-002.xht +css-multicol/multicol-rule-003.xht +css-multicol/multicol-rule-color-001.xht +fuzzy(0-106,0-354) css-multicol/multicol-rule-dashed-000.xht +fuzzy(0-106,0-354) css-multicol/multicol-rule-dotted-000.xht +fuzzy(0-106,0-354) css-multicol/multicol-rule-double-000.xht +css-multicol/multicol-rule-fraction-001.xht +css-multicol/multicol-rule-fraction-002.xht fuzzy-if(OSX||winWidget||Android,0-113,0-792) css-multicol/multicol-rule-fraction-003.xht fuzzy(0-127,0-500) css-multicol/multicol-rule-groove-000.xht -fuzzy(0-94,0-256) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-hidden-000.xht +fuzzy(0-94,0-256) css-multicol/multicol-rule-hidden-000.xht fuzzy(0-127,0-500) css-multicol/multicol-rule-inset-000.xht fuzzy(0-127,0-500) css-multicol/multicol-rule-outset-000.xht -fails css-multicol/multicol-rule-px-001.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-rule-px-001.xht fuzzy(0-127,0-500) css-multicol/multicol-rule-ridge-000.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-solid-000.xht -fails css-multicol/multicol-rule-stacking-001.xht -fails css-multicol/multicol-shorthand-001.xht +fuzzy(0-106,0-354) css-multicol/multicol-rule-solid-000.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-rule-stacking-001.xht +fails-if(!OSX||webrender) random-if(OSX) css-multicol/multicol-shorthand-001.xht fails css-multicol/multicol-span-000.xht fails css-multicol/multicol-span-all-001.xht fails css-multicol/multicol-span-all-002.xht @@ -286,15 +290,16 @@ fails css-multicol/multicol-table-cell-001.xht fails css-multicol/multicol-table-cell-height-001.xht fails css-multicol/multicol-table-cell-height-002.xht fails css-multicol/multicol-table-cell-vertical-align-001.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) css-multicol/multicol-width-002.xht -fails css-multicol/multicol-width-count-002.xht -fails css-multicol/multicol-width-negative-001.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) css-multicol/multicol-width-large-001.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) css-multicol/multicol-width-002.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-width-count-002.xht +fails-if(!OSX) random-if(OSX) css-multicol/multicol-width-negative-001.xht +fuzzy(0-225,0-1060) css-multicol/multicol-width-large-001.xht fails css-multicol/multicol-width-small-001.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) css-multicol/multicol-width-invalid-001.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) css-multicol/multicol-width-large-002.xht +fuzzy(0-225,0-1060) css-multicol/multicol-width-invalid-001.xht +fuzzy(0-225,0-1060) css-multicol/multicol-width-large-002.xht fuzzy(0-225,0-13600) css-multicol/multicol-nested-column-rule-001.xht -fuzzy(0-94,0-256) fails-if(webrender&&cocoaWidget) css-multicol/multicol-rule-none-000.xht +fuzzy(0-94,0-256) css-multicol/multicol-rule-none-000.xht +fuzzy-if(OSX&&!webrender,255-255,100-150) css-writing-modes/outline-inline-vlr-006.html #This test seems to pass only on Linux-opt build, on everything else #Therefore using fuzzy annotation as a catch all @@ -340,7 +345,7 @@ skip selectors/selectors-namespace-001.xml # Bug 1392106 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/margin-v??-00?.xht -random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/outline-inline*-vrl-006.html +fuzzy-if(OSX&&!webrender,255-255,100-150) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/outline-inline*-vrl-006.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/padding-v??-00?.xht random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/percent-margin-v??-00?.xht random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) css-writing-modes/percent-padding-v??-00?.xht diff --git a/layout/reftests/w3c-css/received/reftest.list b/layout/reftests/w3c-css/received/reftest.list index 495f15bfa0c7..36fff17f6c1d 100644 --- a/layout/reftests/w3c-css/received/reftest.list +++ b/layout/reftests/w3c-css/received/reftest.list @@ -49,14 +49,14 @@ == css-multicol/multicol-basic-006.xht css-multicol/reference/multicol-basic-005-ref.xht == css-multicol/multicol-basic-007.xht css-multicol/reference/multicol-basic-005-ref.xht == css-multicol/multicol-basic-008.xht css-multicol/reference/multicol-basic-005-ref.xht -fails-if(winWidget||OSX) == css-multicol/multicol-block-no-clip-001.xht css-multicol/multicol-block-no-clip-001-ref.xht -fails-if(winWidget||OSX) == css-multicol/multicol-block-no-clip-002.xht css-multicol/multicol-block-no-clip-002-ref.xht +== css-multicol/multicol-block-no-clip-001.xht css-multicol/multicol-block-no-clip-001-ref.xht +== css-multicol/multicol-block-no-clip-002.xht css-multicol/multicol-block-no-clip-002-ref.xht fails == css-multicol/multicol-br-inside-avoidcolumn-001.xht reference/ref-filled-green-200px-square.html fails == css-multicol/multicol-break-000.xht css-multicol/multicol-break-000-ref.xht fails == css-multicol/multicol-break-001.xht css-multicol/multicol-break-001-ref.xht -fuzzy(0-135,0-1008) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-clip-001.xht css-multicol/multicol-clip-001-ref.xht +fuzzy(0-135,0-1008) == css-multicol/multicol-clip-001.xht css-multicol/multicol-clip-001-ref.xht fuzzy(0-135,0-770) == css-multicol/multicol-clip-002.xht css-multicol/multicol-clip-002-ref.xht -fuzzy(0-135,0-467) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-collapsing-001.xht css-multicol/multicol-collapsing-001-ref.xht +fuzzy(0-135,0-467) == css-multicol/multicol-collapsing-001.xht css-multicol/multicol-collapsing-001-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-columns-001.xht css-multicol/multicol-columns-001-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-columns-002.xht css-multicol/multicol-columns-001-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-columns-003.xht css-multicol/multicol-columns-001-ref.xht @@ -64,21 +64,21 @@ fuzzy(0-87,0-180) == css-multicol/multicol-columns-004.xht css-multicol/multicol fuzzy(0-87,0-180) == css-multicol/multicol-columns-005.xht css-multicol/multicol-columns-001-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-columns-006.xht css-multicol/multicol-columns-001-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-columns-007.xht css-multicol/multicol-columns-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-columns-invalid-001.xht css-multicol/multicol-columns-invalid-001-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-columns-invalid-002.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-columns-toolong-001.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-135,0-530) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-containing-001.xht css-multicol/multicol-containing-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-columns-invalid-001.xht css-multicol/multicol-columns-invalid-001-ref.xht +== css-multicol/multicol-columns-invalid-002.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-columns-toolong-001.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-135,0-530) == css-multicol/multicol-containing-001.xht css-multicol/multicol-containing-001-ref.xht fuzzy(0-215,0-241) == css-multicol/multicol-containing-002.xht css-multicol/multicol-containing-002-ref.xht fuzzy(0-87,0-180) == css-multicol/multicol-count-001.xht css-multicol/multicol-columns-001-ref.xht -fails == css-multicol/multicol-count-002.xht css-multicol/multicol-count-002-ref.xht -fails-if(winWidget||OSX) == css-multicol/multicol-count-computed-003.xht css-multicol/multicol-count-computed-003-ref.xht -fuzzy-if(winWidget||OSX||gtkWidget,0-112,0-861) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-computed-004.xht css-multicol/multicol-count-computed-004-ref.xht -fails-if(winWidget||OSX) == css-multicol/multicol-count-computed-005.xht css-multicol/multicol-count-computed-003-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-negative-001.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-negative-002.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-non-integer-001.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-non-integer-002.xht css-multicol/multicol-columns-invalid-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-count-non-integer-003.xht css-multicol/multicol-columns-invalid-001-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-count-002.xht css-multicol/multicol-count-002-ref.xht +== css-multicol/multicol-count-computed-003.xht css-multicol/multicol-count-computed-003-ref.xht +fuzzy-if(winWidget||OSX||gtkWidget,0-112,0-861) == css-multicol/multicol-count-computed-004.xht css-multicol/multicol-count-computed-004-ref.xht +== css-multicol/multicol-count-computed-005.xht css-multicol/multicol-count-computed-003-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-count-negative-001.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-count-negative-002.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-count-non-integer-001.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-count-non-integer-002.xht css-multicol/multicol-columns-invalid-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-count-non-integer-003.xht css-multicol/multicol-columns-invalid-001-ref.xht == css-multicol/multicol-fill-000.xht css-multicol/multicol-fill-000-ref.xht == css-multicol/multicol-fill-001.xht css-multicol/multicol-fill-001-ref.xht == css-multicol/multicol-fill-auto-001.xht css-multicol/multicol-fill-auto-001-ref.xht @@ -90,18 +90,18 @@ fuzzy(0-135,0-80) == css-multicol/multicol-fill-balance-001.xht css-multicol/mul skip == css-multicol/multicol-fill-balance-002.html reference/ref-filled-green-100px-square-only.html fuzzy(0-135,0-821) == css-multicol/multicol-gap-000.xht css-multicol/multicol-gap-000-ref.xht fuzzy(0-255,0-329) == css-multicol/multicol-gap-001.xht css-multicol/multicol-gap-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-gap-002.xht css-multicol/multicol-gap-002-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-gap-003.xht css-multicol/multicol-gap-002-ref.xht -fuzzy(0-107,0-1823) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-gap-fraction-001.xht css-multicol/multicol-gap-fraction-001-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-gap-002.xht css-multicol/multicol-gap-002-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-gap-003.xht css-multicol/multicol-gap-002-ref.xht +fuzzy(0-107,0-1823) == css-multicol/multicol-gap-fraction-001.xht css-multicol/multicol-gap-fraction-001-ref.xht skip == css-multicol/multicol-gap-fraction-002.html reference/nothing.html fuzzy-if(winWidget||OSX||gtkWidget,0-204,0-1048) fuzzy-if(skiaContent,0-208,0-1048) == css-multicol/multicol-gap-large-001.xht css-multicol/multicol-gap-large-001-ref.xht -fuzzy(0-225,0-920) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-gap-large-002.xht css-multicol/multicol-gap-large-002-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-gap-negative-001.xht css-multicol/multicol-gap-002-ref.xht +fuzzy(0-225,0-920) == css-multicol/multicol-gap-large-002.xht css-multicol/multicol-gap-large-002-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-gap-negative-001.xht css-multicol/multicol-gap-002-ref.xht == css-multicol/multicol-height-001.xht css-multicol/multicol-height-001-ref.xht fails == css-multicol/multicol-height-block-child-001.xht css-multicol/multicol-height-block-child-001-ref.xht fuzzy(0-255,0-3762) == css-multicol/multicol-inherit-001.xht css-multicol/multicol-inherit-001-ref.xht -fuzzy(0-135,0-1893) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-inherit-002.xht css-multicol/multicol-inherit-002-ref.xht -skip-if(cocoaWidget) fails-if(!cocoaWidget) == css-multicol/multicol-inherit-003.xht css-multicol/multicol-inherit-3-ref.xht # Bug 1432941 +fuzzy(0-135,0-1893) == css-multicol/multicol-inherit-002.xht css-multicol/multicol-inherit-002-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-inherit-003.xht css-multicol/multicol-inherit-3-ref.xht fuzzy(0-97,0-264) == css-multicol/multicol-list-item-001.xht css-multicol/multicol-list-item-001-ref.xht fuzzy(0-73,0-1200) == css-multicol/multicol-margin-001.xht reference/ref-filled-green-100px-square.xht fuzzy(0-73,0-1200) == css-multicol/multicol-margin-002.xht reference/ref-filled-green-100px-square.xht @@ -109,43 +109,43 @@ fuzzy(0-243,0-3322) fuzzy-if(skiaContent,0-244,0-3322) == css-multicol/multicol- fuzzy(0-255,0-4008) == css-multicol/multicol-nested-002.xht css-multicol/multicol-nested-002-ref.xht fuzzy(0-255,0-4109) == css-multicol/multicol-nested-005.xht css-multicol/multicol-nested-005-ref.xht fuzzy(0-225,0-13600) == css-multicol/multicol-nested-column-rule-001.xht css-multicol/multicol-nested-column-rule-001-ref.xht -fuzzy(0-204,0-2463) fuzzy-if(skiaContent,0-208,0-2463) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-nested-margin-001.xht css-multicol/multicol-nested-margin-001-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-nested-margin-002.xht css-multicol/multicol-nested-margin-002-ref.xht -fuzzy(0-204,0-2371) fuzzy-if(skiaContent,0-208,0-2371) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-nested-margin-003.xht css-multicol/multicol-nested-margin-003-ref.xht -fuzzy(0-225,0-2529) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-nested-margin-004.xht css-multicol/multicol-nested-margin-004-ref.xht -fuzzy(0-225,0-2529) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-nested-margin-005.xht css-multicol/multicol-nested-margin-004-ref.xht +fuzzy(0-204,0-2463) fuzzy-if(skiaContent,0-208,0-2463) == css-multicol/multicol-nested-margin-001.xht css-multicol/multicol-nested-margin-001-ref.xht +== css-multicol/multicol-nested-margin-002.xht css-multicol/multicol-nested-margin-002-ref.xht +fuzzy(0-204,0-2371) fuzzy-if(skiaContent,0-208,0-2371) == css-multicol/multicol-nested-margin-003.xht css-multicol/multicol-nested-margin-003-ref.xht +fuzzy(0-225,0-2529) == css-multicol/multicol-nested-margin-004.xht css-multicol/multicol-nested-margin-004-ref.xht +fuzzy(0-225,0-2529) == css-multicol/multicol-nested-margin-005.xht css-multicol/multicol-nested-margin-004-ref.xht fuzzy(0-135,0-142) == css-multicol/multicol-overflow-000.xht css-multicol/multicol-overflow-000-ref.xht -fuzzy(0-204,0-1844) fuzzy-if(skiaContent,0-208,0-1844) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-overflowing-001.xht css-multicol/multicol-overflowing-001-ref.xht +fuzzy(0-204,0-1844) fuzzy-if(skiaContent,0-208,0-1844) == css-multicol/multicol-overflowing-001.xht css-multicol/multicol-overflowing-001-ref.xht fuzzy-if(OSX,0-61,0-2) fuzzy-if(skiaContent,0-64,0-2) == css-multicol/multicol-reduce-000.xht css-multicol/multicol-reduce-000-ref.xht fuzzy-if(OSX,0-11,0-20) == css-multicol/multicol-rule-000.xht css-multicol/multicol-rule-000-ref.xht fuzzy(0-135,0-1584) == css-multicol/multicol-rule-001.xht css-multicol/multicol-rule-001-ref.xht -fails == css-multicol/multicol-rule-002.xht css-multicol/multicol-rule-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-rule-003.xht css-multicol/multicol-rule-003-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-rule-002.xht css-multicol/multicol-rule-ref.xht +== css-multicol/multicol-rule-003.xht css-multicol/multicol-rule-003-ref.xht == css-multicol/multicol-rule-004.xht css-multicol/multicol-rule-004-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-rule-color-001.xht css-multicol/multicol-rule-color-001-ref.xht +== css-multicol/multicol-rule-color-001.xht css-multicol/multicol-rule-color-001-ref.xht == css-multicol/multicol-rule-color-inherit-001.xht css-multicol/multicol-rule-color-inherit-001-ref.xht == css-multicol/multicol-rule-color-inherit-002.xht css-multicol/multicol-rule-color-inherit-001-ref.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-dashed-000.xht css-multicol/multicol-rule-dashed-000-ref.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-dotted-000.xht css-multicol/multicol-rule-dotted-000-ref.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-double-000.xht css-multicol/multicol-rule-double-000-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-rule-fraction-001.xht css-multicol/multicol-rule-fraction-001-ref.xht -fails-if(OSX||winWidget) == css-multicol/multicol-rule-fraction-002.xht css-multicol/multicol-rule-fraction-002-ref.xht +fuzzy(0-106,0-354) == css-multicol/multicol-rule-dashed-000.xht css-multicol/multicol-rule-dashed-000-ref.xht +fuzzy(0-106,0-354) == css-multicol/multicol-rule-dotted-000.xht css-multicol/multicol-rule-dotted-000-ref.xht +fuzzy(0-106,0-354) == css-multicol/multicol-rule-double-000.xht css-multicol/multicol-rule-double-000-ref.xht +== css-multicol/multicol-rule-fraction-001.xht css-multicol/multicol-rule-fraction-001-ref.xht +== css-multicol/multicol-rule-fraction-002.xht css-multicol/multicol-rule-fraction-002-ref.xht fuzzy-if(OSX||winWidget||Android,0-113,0-792) == css-multicol/multicol-rule-fraction-003.xht css-multicol/multicol-rule-fraction-3-ref.xht fuzzy(0-127,0-500) == css-multicol/multicol-rule-groove-000.xht css-multicol/multicol-rule-groove-000-ref.xht -fuzzy(0-94,0-256) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-hidden-000.xht css-multicol/multicol-rule-hidden-000-ref.xht +fuzzy(0-94,0-256) == css-multicol/multicol-rule-hidden-000.xht css-multicol/multicol-rule-hidden-000-ref.xht fuzzy(0-127,0-500) == css-multicol/multicol-rule-inset-000.xht css-multicol/multicol-rule-ridge-000-ref.xht fuzzy(0-255,0-2808) == css-multicol/multicol-rule-large-001.xht css-multicol/multicol-rule-large-001-ref.xht -fuzzy(0-94,0-256) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-none-000.xht css-multicol/multicol-rule-hidden-000-ref.xht +fuzzy(0-94,0-256) == css-multicol/multicol-rule-none-000.xht css-multicol/multicol-rule-hidden-000-ref.xht fuzzy(0-127,0-500) == css-multicol/multicol-rule-outset-000.xht css-multicol/multicol-rule-groove-000-ref.xht == css-multicol/multicol-rule-percent-001.xht css-multicol/multicol-containing-002-ref.xht -fails == css-multicol/multicol-rule-px-001.xht css-multicol/multicol-rule-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-rule-px-001.xht css-multicol/multicol-rule-ref.xht fuzzy(0-127,0-500) == css-multicol/multicol-rule-ridge-000.xht css-multicol/multicol-rule-ridge-000-ref.xht == css-multicol/multicol-rule-samelength-001.xht css-multicol/multicol-rule-samelength-001-ref.xht == css-multicol/multicol-rule-shorthand-001.xht css-multicol/multicol-rule-samelength-001-ref.xht skip == css-multicol/multicol-rule-shorthand-2.xht css-multicol/multicol-rule-shorthand-2-ref.xht -fuzzy(0-106,0-354) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-rule-solid-000.xht css-multicol/multicol-rule-solid-000-ref.xht -fails == css-multicol/multicol-rule-stacking-001.xht css-multicol/multicol-rule-stacking-ref.xht -fails == css-multicol/multicol-shorthand-001.xht css-multicol/multicol-rule-ref.xht +fuzzy(0-106,0-354) == css-multicol/multicol-rule-solid-000.xht css-multicol/multicol-rule-solid-000-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-rule-stacking-001.xht css-multicol/multicol-rule-stacking-ref.xht +fails-if(!OSX||webrender) random-if(OSX) == css-multicol/multicol-shorthand-001.xht css-multicol/multicol-rule-ref.xht fails == css-multicol/multicol-span-000.xht css-multicol/multicol-span-000-ref.xht fails == css-multicol/multicol-span-all-001.xht css-multicol/multicol-span-all-001-ref.xht fails == css-multicol/multicol-span-all-002.xht css-multicol/multicol-span-all-002-ref.xht @@ -164,15 +164,15 @@ fails == css-multicol/multicol-table-cell-height-001.xht css-multicol/multicol-t fails == css-multicol/multicol-table-cell-height-002.xht css-multicol/multicol-table-cell-height-001-ref.xht fails == css-multicol/multicol-table-cell-vertical-align-001.xht css-multicol/multicol-table-cell-vertical-align-ref.xht == css-multicol/multicol-width-001.xht css-multicol/multicol-width-001-ref.xht -fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-width-002.xht css-multicol/multicol-width-002-ref.xht +fuzzy(0-204,0-930) fuzzy-if(skiaContent,0-208,0-930) == css-multicol/multicol-width-002.xht css-multicol/multicol-width-002-ref.xht == css-multicol/multicol-width-003.xht css-multicol/multicol-width-002-ref.xht skip == css-multicol/multicol-width-ch-001.xht css-multicol/multicol-width-ch-ref.xht == css-multicol/multicol-width-count-001.xht css-multicol/multicol-width-001-ref.xht -fails == css-multicol/multicol-width-count-002.xht css-multicol/multicol-count-002-ref.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-width-invalid-001.xht css-multicol/multicol-width-invalid-001-ref.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-width-large-001.xht css-multicol/multicol-width-invalid-001-ref.xht -fuzzy(0-225,0-1060) fails-if(webrender&&cocoaWidget) == css-multicol/multicol-width-large-002.xht css-multicol/multicol-width-invalid-001-ref.xht -fails == css-multicol/multicol-width-negative-001.xht css-multicol/multicol-count-002-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-width-count-002.xht css-multicol/multicol-count-002-ref.xht +fuzzy(0-225,0-1060) == css-multicol/multicol-width-invalid-001.xht css-multicol/multicol-width-invalid-001-ref.xht +fuzzy(0-225,0-1060) == css-multicol/multicol-width-large-001.xht css-multicol/multicol-width-invalid-001-ref.xht +fuzzy(0-225,0-1060) == css-multicol/multicol-width-large-002.xht css-multicol/multicol-width-invalid-001-ref.xht +fails-if(!OSX) random-if(OSX) == css-multicol/multicol-width-negative-001.xht css-multicol/multicol-count-002-ref.xht fails == css-multicol/multicol-width-small-001.xht css-multicol/multicol-width-small-001-ref.xht == css-multicol/multicol-zero-height-001.xht css-multicol/multicol-zero-height-001-ref.xht == css-namespaces/prefix-001.xml css-namespaces/reftest/ref-lime-1.xml @@ -218,7 +218,7 @@ fails == css-values/attr-px-valid.html css-values/reference/200-200-green.html == css-values/calc-parenthesis-stack.html css-values/reference/all-green.html fuzzy-if(OSX||Android,0-78,0-197) == css-values/ch-unit-001.html css-values/reference/ch-unit-001-ref.html fuzzy(0-50,0-160) == css-values/ch-unit-002.html css-values/reference/ch-unit-002-ref.html -fuzzy-if(OSX||Android,0-78,0-179) == css-values/ch-unit-003.html css-values/reference/ch-unit-001-ref.html +fuzzy-if(Android,78-78,179-179) fuzzy-if(OSX,63-71,6-86) == css-values/ch-unit-003.html css-values/reference/ch-unit-001-ref.html fuzzy(0-78,0-197) fails-if(webrender&&cocoaWidget) == css-values/ch-unit-004.html css-values/reference/ch-unit-001-ref.html skip == css-values/ex-calc-expression-001.html css-values/ex-calc-expression-001-ref.html skip == css-values/ic-unit-001.html css-values/reference/ic-unit-001-ref.html @@ -505,10 +505,10 @@ fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(htt == css-writing-modes/background-size-document-root-vrl-004.html css-writing-modes/background-size-document-root-vrl-002-ref.xht == css-writing-modes/background-size-document-root-vrl-006.html css-writing-modes/background-size-document-root-vrl-002-ref.xht == css-writing-modes/background-size-document-root-vrl-008.html css-writing-modes/background-size-document-root-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-114,0-600) == css-writing-modes/baseline-inline-non-replaced-002.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-600) == css-writing-modes/baseline-inline-non-replaced-003.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-600) == css-writing-modes/baseline-inline-non-replaced-004.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-600) == css-writing-modes/baseline-inline-non-replaced-005.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-600) fuzzy-if(OSX&&!webrender,255-255,100-200) == css-writing-modes/baseline-inline-non-replaced-002.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-600) fuzzy-if(OSX&&!webrender,255-255,100-200) == css-writing-modes/baseline-inline-non-replaced-003.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-600) fuzzy-if(OSX&&!webrender,255-255,100-200) == css-writing-modes/baseline-inline-non-replaced-004.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-600) fuzzy-if(OSX&&!webrender,255-255,100-200) == css-writing-modes/baseline-inline-non-replaced-005.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/baseline-inline-replaced-002.xht css-writing-modes/baseline-inline-replaced-002-ref.xht == css-writing-modes/baseline-inline-replaced-003.xht css-writing-modes/baseline-inline-replaced-002-ref.xht == css-writing-modes/bidi-embed-001.html css-writing-modes/reference/bidi-embed-001.html @@ -594,55 +594,55 @@ skip == css-writing-modes/bidi-table-001.html css-writing-modes/reference/bidi-t == css-writing-modes/block-embed-002.html css-writing-modes/reference/block-embed-002.html == css-writing-modes/block-embed-003.html css-writing-modes/reference/block-embed-003.html == css-writing-modes/block-flow-direction-004.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-htb-001.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-043.xht css-writing-modes/block-flow-direction-043-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-047.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-048.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-050.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-054.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-055.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-056.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-htb-001.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-043.xht css-writing-modes/block-flow-direction-043-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-047.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-048.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-050.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-054.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-055.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-056.xht css-writing-modes/block-flow-direction-001-ref.xht fails == css-writing-modes/block-flow-direction-slr-058.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-060.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-062.xht css-writing-modes/block-flow-direction-043-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-063.xht css-writing-modes/block-flow-direction-043-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-slr-066.xht css-writing-modes/block-flow-direction-066-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-042.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-045.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-046.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-049.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-051.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-052.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-053.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-060.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-062.xht css-writing-modes/block-flow-direction-043-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-063.xht css-writing-modes/block-flow-direction-043-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-slr-066.xht css-writing-modes/block-flow-direction-066-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-042.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-045.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-046.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-049.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-051.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-052.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-053.xht css-writing-modes/block-flow-direction-001-ref.xht fails == css-writing-modes/block-flow-direction-srl-057.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-059.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-061.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-064.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-srl-065.xht css-writing-modes/block-flow-direction-025-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-003.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-007.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-008.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-010.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-014.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-015.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-016.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-059.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-061.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-064.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-srl-065.xht css-writing-modes/block-flow-direction-025-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-003.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-007.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-008.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-010.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-014.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-015.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-016.xht css-writing-modes/block-flow-direction-001-ref.xht fails == css-writing-modes/block-flow-direction-vlr-018.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-020.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-022.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vlr-023.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-002.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-005.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-006.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-009.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-011.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-012.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-013.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-020.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-022.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vlr-023.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-002.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-005.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-006.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-009.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-011.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-012.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-013.xht css-writing-modes/block-flow-direction-001-ref.xht fails == css-writing-modes/block-flow-direction-vrl-017.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-019.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-021.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-024.xht css-writing-modes/block-flow-direction-002-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-025.xht css-writing-modes/block-flow-direction-025-ref.xht -fuzzy-if(OSX||winWidget,0-213,0-1540) == css-writing-modes/block-flow-direction-vrl-026.xht css-writing-modes/block-flow-direction-vrl-026-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-019.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-021.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-024.xht css-writing-modes/block-flow-direction-002-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-025.xht css-writing-modes/block-flow-direction-025-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-1540) == css-writing-modes/block-flow-direction-vrl-026.xht css-writing-modes/block-flow-direction-vrl-026-ref.xht == css-writing-modes/block-override-001.html css-writing-modes/reference/block-override-001.html == css-writing-modes/block-override-002.html css-writing-modes/reference/block-override-002.html == css-writing-modes/block-override-003.html css-writing-modes/reference/block-override-003.html @@ -678,10 +678,10 @@ skip == css-writing-modes/block-plaintext-006.html css-writing-modes/reference/b fuzzy-if(OSX,0-255,0-200) == css-writing-modes/box-offsets-rel-pos-vlr-005.xht css-writing-modes/box-offsets-rel-pos-vlr-005-ref.xht == css-writing-modes/box-offsets-rel-pos-vrl-002.xht css-writing-modes/abs-pos-non-replaced-vrl-012-ref.xht fuzzy-if(OSX,0-255,0-200) == css-writing-modes/box-offsets-rel-pos-vrl-004.xht css-writing-modes/box-offsets-rel-pos-vrl-004-ref.xht -fuzzy-if(OSX||winWidget,0-114,0-300) == css-writing-modes/caption-side-vlr-003.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-300) == css-writing-modes/caption-side-vlr-005.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-300) == css-writing-modes/caption-side-vrl-002.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-114,0-300) == css-writing-modes/caption-side-vrl-004.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/caption-side-vlr-003.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/caption-side-vlr-005.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/caption-side-vrl-002.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-114,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/caption-side-vrl-004.xht reference/ref-filled-green-100px-square.xht fuzzy-if(OSX||winWidget,0-215,0-780) == css-writing-modes/central-baseline-alignment-002.xht css-writing-modes/central-baseline-alignment-002-ref.xht fuzzy-if(OSX||winWidget,0-215,0-780) == css-writing-modes/central-baseline-alignment-003.xht css-writing-modes/central-baseline-alignment-002-ref.xht == css-writing-modes/clearance-calculations-vrl-002.xht css-writing-modes/clearance-calculations-vrl-002-ref.xht @@ -714,10 +714,10 @@ fails == css-writing-modes/contiguous-floated-table-vrl-006.xht reference/ref-fi fails == css-writing-modes/contiguous-floated-table-vrl-008.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/different-block-flow-dir-001.xht reference/ref-filled-green-100px-square.xht fuzzy-if(webrender&&cocoaWidget,7-7,2-2) == css-writing-modes/different-block-flow-dir-002.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) == css-writing-modes/direction-vlr-003.xht css-writing-modes/direction-vlr-003-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) == css-writing-modes/direction-vlr-005.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) == css-writing-modes/direction-vrl-002.xht css-writing-modes/direction-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) == css-writing-modes/direction-vrl-004.xht css-writing-modes/direction-vrl-004-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/direction-vlr-003.xht css-writing-modes/direction-vlr-003-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/direction-vlr-005.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/direction-vrl-002.xht css-writing-modes/direction-vrl-002-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/direction-vrl-004.xht css-writing-modes/direction-vrl-004-ref.xht == css-writing-modes/flexbox_align-items-stretch-writing-modes.html css-writing-modes/flexbox_align-items-stretch-writing-modes-ref.html == css-writing-modes/float-clear-vlr-003.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-clear-vlr-005.xht reference/ref-filled-green-100px-square.xht @@ -731,14 +731,14 @@ fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-40 == css-writing-modes/float-contiguous-vlr-005.xht css-writing-modes/inline-replaced-vrl-004-ref.xht == css-writing-modes/float-contiguous-vlr-007.xht css-writing-modes/float-contiguous-vlr-007-ref.xht == css-writing-modes/float-contiguous-vlr-009.xht css-writing-modes/float-contiguous-vlr-009-ref.xht -fuzzy-if(OSX||winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vlr-011.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vlr-013.xht css-writing-modes/float-contiguous-vrl-012-ref.xht +fuzzy-if(winWidget,0-135,0-904) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/float-contiguous-vlr-011.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vlr-013.xht css-writing-modes/float-contiguous-vrl-012-ref.xht == css-writing-modes/float-contiguous-vrl-002.xht css-writing-modes/inline-replaced-vrl-004-ref.xht == css-writing-modes/float-contiguous-vrl-004.xht css-writing-modes/inline-replaced-vrl-004-ref.xht == css-writing-modes/float-contiguous-vrl-006.xht css-writing-modes/float-contiguous-vrl-006-ref.xht == css-writing-modes/float-contiguous-vrl-008.xht css-writing-modes/float-contiguous-vrl-008-ref.xht -fuzzy-if(OSX||winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vrl-010.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vrl-012.xht css-writing-modes/float-contiguous-vrl-012-ref.xht +fuzzy-if(winWidget,0-135,0-904) fuzzy-if(OSX&&!webrender,255-255,200-200) == css-writing-modes/float-contiguous-vrl-010.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-135,0-904) == css-writing-modes/float-contiguous-vrl-012.xht css-writing-modes/float-contiguous-vrl-012-ref.xht fails == css-writing-modes/float-lft-orthog-htb-in-vlr-002.xht css-writing-modes/float-lft-orthog-htb-in-vlr-002-ref.xht fails == css-writing-modes/float-lft-orthog-htb-in-vrl-002.xht css-writing-modes/float-lft-orthog-htb-in-vrl-002-ref.xht fails == css-writing-modes/float-lft-orthog-vlr-in-htb-002.xht css-writing-modes/float-lft-orthog-vlr-in-htb-002-ref.xht @@ -750,32 +750,32 @@ fails == css-writing-modes/float-rgt-orthog-vrl-in-htb-003.xht css-writing-modes == css-writing-modes/float-shrink-to-fit-vlr-003.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vlr-005.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vlr-007.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-109,0-300) == css-writing-modes/float-shrink-to-fit-vlr-009.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-109,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/float-shrink-to-fit-vlr-009.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vrl-002.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vrl-004.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vrl-006.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-109,0-300) == css-writing-modes/float-shrink-to-fit-vrl-008.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-109,0-300) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/float-shrink-to-fit-vrl-008.xht reference/ref-filled-green-100px-square.xht == css-writing-modes/float-shrink-to-fit-vrl-vlr-016.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-003.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-005.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-007.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-009.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-011.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vlr-013.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-002.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-004.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-006.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-008.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-010.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-108,0-300) == css-writing-modes/float-vrl-012.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-003.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-005.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-007.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-009.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-011.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vlr-013.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-002.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-004.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-006.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-008.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-010.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-108,0-300) fuzzy-if(OSX&&!webrender,255-255,49-150) == css-writing-modes/float-vrl-012.xht reference/ref-filled-green-100px-square.xht != css-writing-modes/full-width-001.html css-writing-modes/reference/full-width-001-horizontal-notref.html != css-writing-modes/full-width-001.html css-writing-modes/reference/full-width-001-nofullwidth-notref.html != css-writing-modes/full-width-002.html css-writing-modes/reference/full-width-002-notcu-notref.html != css-writing-modes/full-width-002.html css-writing-modes/reference/full-width-002-horizontal-notref.html skip != css-writing-modes/full-width-003.html css-writing-modes/reference/full-width-002-notcu-notref.html skip != css-writing-modes/full-width-003.html css-writing-modes/reference/full-width-002-horizontal-notref.html -fuzzy-if(OSX||winWidget,0-62,0-404) fuzzy-if(webrender&&winWidget,92-92,100-100) fails-if(webrender&&cocoaWidget) == css-writing-modes/height-width-inline-non-replaced-vlr-003.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-62,0-404) fuzzy-if(webrender&&winWidget,92-92,100-100) fails-if(webrender&&cocoaWidget) == css-writing-modes/height-width-inline-non-replaced-vrl-002.xht css-writing-modes/abs-pos-non-replaced-icb-vrl-008-ref.xht +fuzzy-if(winWidget,0-62,0-404) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/height-width-inline-non-replaced-vlr-003.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-62,0-404) fuzzy-if(OSX&&!webrender,255-255,100-100) == css-writing-modes/height-width-inline-non-replaced-vrl-002.xht css-writing-modes/abs-pos-non-replaced-icb-vrl-008-ref.xht == css-writing-modes/horizontal-rule-vlr-003.xht css-writing-modes/horizontal-rule-vlr-003-ref.xht == css-writing-modes/horizontal-rule-vlr-005.xht css-writing-modes/horizontal-rule-vrl-004-ref.xht == css-writing-modes/horizontal-rule-vrl-002.xht css-writing-modes/horizontal-rule-vrl-002-ref.xht @@ -784,14 +784,14 @@ fails == css-writing-modes/inline-block-alignment-002.xht css-writing-modes/inli fails == css-writing-modes/inline-block-alignment-003.xht css-writing-modes/inline-block-alignment-003-ref.xht fails == css-writing-modes/inline-block-alignment-004.xht css-writing-modes/inline-block-alignment-002-ref.xht fails == css-writing-modes/inline-block-alignment-005.xht css-writing-modes/inline-block-alignment-003-ref.xht -fuzzy-if(OSX||winWidget,0-112,0-960) == css-writing-modes/inline-block-alignment-006.xht css-writing-modes/inline-block-alignment-006-ref.xht +fuzzy-if(winWidget,0-112,0-960) fuzzy-if(OSX&&!webrender,255-255,432-432) == css-writing-modes/inline-block-alignment-006.xht css-writing-modes/inline-block-alignment-006-ref.xht fails == css-writing-modes/inline-block-alignment-007.xht css-writing-modes/inline-block-alignment-006-ref.xht fuzzy-if(OSX||winWidget,0-218,0-621) == css-writing-modes/inline-block-alignment-orthogonal-vlr-003.xht css-writing-modes/inline-block-alignment-orthogonal-vrl-002-ref.xht fuzzy-if(OSX||winWidget,0-218,0-621) == css-writing-modes/inline-block-alignment-orthogonal-vlr-005.xht css-writing-modes/inline-block-alignment-orthogonal-vrl-002-ref.xht fuzzy-if(OSX||winWidget,0-218,0-621) == css-writing-modes/inline-block-alignment-orthogonal-vrl-002.xht css-writing-modes/inline-block-alignment-orthogonal-vrl-002-ref.xht fuzzy-if(OSX||winWidget,0-218,0-621) == css-writing-modes/inline-block-alignment-orthogonal-vrl-004.xht css-writing-modes/inline-block-alignment-orthogonal-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-135,0-1080) == css-writing-modes/inline-block-alignment-slr-009.xht css-writing-modes/inline-block-alignment-slr-009-ref.xht -fuzzy-if(OSX||winWidget,0-112,0-960) == css-writing-modes/inline-block-alignment-srl-008.xht css-writing-modes/inline-block-alignment-006-ref.xht +fuzzy-if(winWidget,0-135,0-1080) fuzzy-if(OSX&&!webrender,255-255,432-432) == css-writing-modes/inline-block-alignment-slr-009.xht css-writing-modes/inline-block-alignment-slr-009-ref.xht +fuzzy-if(winWidget,0-112,0-960) fuzzy-if(OSX&&!webrender,255-255,432-432) == css-writing-modes/inline-block-alignment-srl-008.xht css-writing-modes/inline-block-alignment-006-ref.xht == css-writing-modes/inline-replaced-vlr-003.xht css-writing-modes/inline-replaced-vrl-002-ref.xht == css-writing-modes/inline-replaced-vlr-005.xht css-writing-modes/inline-replaced-vrl-004-ref.xht == css-writing-modes/inline-replaced-vrl-002.xht css-writing-modes/inline-replaced-vrl-002-ref.xht @@ -879,9 +879,9 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/margin == css-writing-modes/ortho-htb-alongside-vrl-floats-006.xht css-writing-modes/ortho-htb-alongside-vrl-floats-006-ref.xht == css-writing-modes/ortho-htb-alongside-vrl-floats-010.xht css-writing-modes/ortho-htb-alongside-vrl-floats-010-ref.xht == css-writing-modes/ortho-htb-alongside-vrl-floats-014.xht css-writing-modes/ortho-htb-alongside-vrl-floats-014-ref.xht -fuzzy-if(OSX,0-1,0-144) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/outline-inline-block-vrl-006.html css-writing-modes/reference/outline-inline-block-vrl-006.html -== css-writing-modes/outline-inline-vlr-006.html css-writing-modes/reference/outline-inline-vlr-006.html -random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/outline-inline-vrl-006.html css-writing-modes/reference/outline-inline-vrl-006.html +fuzzy-if(OSX&&!webrender,255-255,100-150) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/outline-inline-block-vrl-006.html css-writing-modes/reference/outline-inline-block-vrl-006.html +fuzzy-if(OSX&&!webrender,255-255,100-150) == css-writing-modes/outline-inline-vlr-006.html css-writing-modes/reference/outline-inline-vlr-006.html +fuzzy-if(OSX&&!webrender,255-255,100-150) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/outline-inline-vrl-006.html css-writing-modes/reference/outline-inline-vrl-006.html == css-writing-modes/overconstrained-rel-pos-ltr-left-right-vlr-005.xht css-writing-modes/overconstrained-rel-pos-ltr-left-right-vlr-005-ref.xht == css-writing-modes/overconstrained-rel-pos-ltr-left-right-vrl-004.xht css-writing-modes/overconstrained-rel-pos-ltr-left-right-vrl-004-ref.xht == css-writing-modes/overconstrained-rel-pos-ltr-top-bottom-vlr-003.xht css-writing-modes/overconstrained-rel-pos-ltr-top-bottom-vlr-003-ref.xht @@ -1034,7 +1034,7 @@ fuzzy-if(OSX||winWidget,0-110,0-1200) == css-writing-modes/table-column-order-00 fuzzy-if(OSX||winWidget,0-110,0-1200) == css-writing-modes/table-column-order-003.xht css-writing-modes/block-flow-direction-001-ref.xht fuzzy-if(OSX||winWidget,0-110,0-1200) == css-writing-modes/table-column-order-004.xht css-writing-modes/block-flow-direction-001-ref.xht fuzzy-if(OSX||winWidget,0-110,0-1200) == css-writing-modes/table-column-order-005.xht css-writing-modes/block-flow-direction-001-ref.xht -fuzzy-if(winWidget,0-110,0-1200) fuzzy-if(webrender&&cocoaWidget,1-1,2-2) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/table-column-order-slr-007.xht css-writing-modes/block-flow-direction-001-ref.xht +fuzzy-if(winWidget,0-110,0-1200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/table-column-order-slr-007.xht css-writing-modes/block-flow-direction-001-ref.xht fuzzy-if(OSX||winWidget,0-110,0-1200) == css-writing-modes/table-column-order-srl-006.xht css-writing-modes/block-flow-direction-001-ref.xht == css-writing-modes/table-progression-slr-001.html css-writing-modes/table-progression-slr-001-ref.html fails == css-writing-modes/table-progression-slr-002.html css-writing-modes/table-progression-002-ref.html @@ -1048,61 +1048,61 @@ fails == css-writing-modes/table-progression-vlr-004.html css-writing-modes/tabl fails == css-writing-modes/table-progression-vrl-002.html css-writing-modes/table-progression-002-ref.html fails == css-writing-modes/table-progression-vrl-003.html css-writing-modes/table-progression-001-ref.html fails == css-writing-modes/table-progression-vrl-004.html css-writing-modes/table-progression-002-ref.html -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-003.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-005.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-007.xht reference/ref-filled-green-100px-square.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-009.xht css-writing-modes/text-align-vlr-009-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-011.xht css-writing-modes/text-align-vlr-009-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-013.xht css-writing-modes/text-align-vlr-009-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-015.xht css-writing-modes/direction-vlr-003-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-017.xht css-writing-modes/direction-vlr-003-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-019.xht css-writing-modes/direction-vlr-003-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-002.xht css-writing-modes/direction-vrl-004-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-004.xht css-writing-modes/direction-vrl-004-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-006.xht css-writing-modes/direction-vrl-004-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-008.xht css-writing-modes/text-align-vrl-008-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-010.xht css-writing-modes/text-align-vrl-008-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-012.xht css-writing-modes/text-align-vrl-008-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-014.xht css-writing-modes/direction-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-016.xht css-writing-modes/direction-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-75,0-404) fuzzy-if(webrender&&!gtkWidget,92-108,300-404) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-018.xht css-writing-modes/direction-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-slr-009.xht css-writing-modes/text-baseline-slr-009-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-srl-008.xht css-writing-modes/text-baseline-vrl-006-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-003.xht css-writing-modes/text-baseline-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-005.xht css-writing-modes/text-baseline-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-007.xht css-writing-modes/text-baseline-vrl-006-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-002.xht css-writing-modes/text-baseline-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-004.xht css-writing-modes/text-baseline-vrl-002-ref.xht -fuzzy-if(OSX||winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-006.xht css-writing-modes/text-baseline-vrl-006-ref.xht -fuzzy-if(OSX,0-23,0-16) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-decorations-001.html css-writing-modes/reference/text-combine-upright-decorations-001.html +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-003.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-005.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-007.xht reference/ref-filled-green-100px-square.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-009.xht css-writing-modes/text-align-vlr-009-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-011.xht css-writing-modes/text-align-vlr-009-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-013.xht css-writing-modes/text-align-vlr-009-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-015.xht css-writing-modes/direction-vlr-003-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-017.xht css-writing-modes/direction-vlr-003-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vlr-019.xht css-writing-modes/direction-vlr-003-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-002.xht css-writing-modes/direction-vrl-004-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-004.xht css-writing-modes/direction-vrl-004-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-006.xht css-writing-modes/direction-vrl-004-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-008.xht css-writing-modes/text-align-vrl-008-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-010.xht css-writing-modes/text-align-vrl-008-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-012.xht css-writing-modes/text-align-vrl-008-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-014.xht css-writing-modes/direction-vrl-002-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-016.xht css-writing-modes/direction-vrl-002-ref.xht +fuzzy-if(winWidget,0-75,0-404) fuzzy-if(OSX&&!webrender,255-255,200-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-align-vrl-018.xht css-writing-modes/direction-vrl-002-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-slr-009.xht css-writing-modes/text-baseline-slr-009-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-srl-008.xht css-writing-modes/text-baseline-vrl-006-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-003.xht css-writing-modes/text-baseline-vrl-002-ref.xht +fuzzy-if(winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-005.xht css-writing-modes/text-baseline-vrl-002-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vlr-007.xht css-writing-modes/text-baseline-vrl-006-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-002.xht css-writing-modes/text-baseline-vrl-002-ref.xht +fuzzy-if(winWidget,0-215,0-780) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-004.xht css-writing-modes/text-baseline-vrl-002-ref.xht +fuzzy-if(winWidget,0-215,0-780) fuzzy-if(OSX&&!webrender,255-255,192-330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-baseline-vrl-006.xht css-writing-modes/text-baseline-vrl-006-ref.xht +fuzzy-if(OSX&&!webrender,255-255,100-100) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-decorations-001.html css-writing-modes/reference/text-combine-upright-decorations-001.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-inherit-all-001.html css-writing-modes/reference/text-combine-upright-inherit-all-001.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-inherit-all-002.html css-writing-modes/reference/text-combine-upright-inherit-all-002.html == css-writing-modes/text-combine-upright-layout-rules-001.html css-writing-modes/reference/text-combine-upright-layout-rules-001-ref.html == css-writing-modes/text-combine-upright-line-breaking-rules-001.html css-writing-modes/text-combine-upright-line-breaking-rules-001-ref.html fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-all-001.html css-writing-modes/reference/text-combine-upright-value-single-character.html fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-all-002.html css-writing-modes/reference/vertical-ahem-1x1-ref.html -fuzzy(0-255,0-960) != css-writing-modes/text-combine-upright-value-all-002.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html +fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-all-002.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-all-003.html css-writing-modes/reference/vertical-ahem-1x1-ref.html -fuzzy(0-255,0-960) != css-writing-modes/text-combine-upright-value-all-003.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html +fuzzy(0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-all-003.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html skip == css-writing-modes/text-combine-upright-value-digits2-001.html css-writing-modes/reference/text-combine-upright-value-single-character.html skip == css-writing-modes/text-combine-upright-value-digits2-002.html css-writing-modes/reference/vertical-ahem-1x1-ref.html skip != css-writing-modes/text-combine-upright-value-digits2-002.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-digits2-003.html css-writing-modes/reference/vertical-ahem-1x3-ref.html -!= css-writing-modes/text-combine-upright-value-digits2-003.html css-writing-modes/reference/horizontal-ahem-1x3-notref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-digits2-003.html css-writing-modes/reference/horizontal-ahem-1x3-notref.html skip == css-writing-modes/text-combine-upright-value-digits3-001.html css-writing-modes/reference/vertical-ahem-1x1-ref.html skip != css-writing-modes/text-combine-upright-value-digits3-001.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html skip == css-writing-modes/text-combine-upright-value-digits3-002.html css-writing-modes/reference/vertical-ahem-1x1-ref.html skip != css-writing-modes/text-combine-upright-value-digits3-002.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-digits3-003.html css-writing-modes/reference/vertical-ahem-1x4-ref.html -!= css-writing-modes/text-combine-upright-value-digits3-003.html css-writing-modes/reference/horizontal-ahem-1x4-notref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-digits3-003.html css-writing-modes/reference/horizontal-ahem-1x4-notref.html skip == css-writing-modes/text-combine-upright-value-digits4-001.html css-writing-modes/reference/vertical-ahem-1x1-ref.html skip != css-writing-modes/text-combine-upright-value-digits4-001.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html skip == css-writing-modes/text-combine-upright-value-digits4-002.html css-writing-modes/reference/vertical-ahem-1x1-ref.html skip != css-writing-modes/text-combine-upright-value-digits4-002.html css-writing-modes/reference/horizontal-ahem-1x1-notref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-digits4-003.html css-writing-modes/reference/vertical-ahem-1x5-ref.html -!= css-writing-modes/text-combine-upright-value-digits4-003.html css-writing-modes/reference/horizontal-ahem-1x5-notref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-digits4-003.html css-writing-modes/reference/horizontal-ahem-1x5-notref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-combine-upright-value-none-001.html css-writing-modes/reference/vertical-ahem-1x3-ref.html -!= css-writing-modes/text-combine-upright-value-none-001.html css-writing-modes/reference/horizontal-ahem-1x3-notref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) != css-writing-modes/text-combine-upright-value-none-001.html css-writing-modes/reference/horizontal-ahem-1x3-notref.html fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vlr-003.xht css-writing-modes/text-indent-vlr-003-ref.xht fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vlr-005.xht css-writing-modes/text-indent-vlr-005-ref.xht fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vlr-007.xht css-writing-modes/text-indent-vlr-003-ref.xht @@ -1119,8 +1119,8 @@ fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(htt fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vrl-012.xht css-writing-modes/text-indent-vrl-012-ref.xht fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vrl-014.xht css-writing-modes/text-indent-vrl-010-ref.xht fuzzy-if(OSX||winWidget,0-255,0-480) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-indent-vrl-016.xht css-writing-modes/text-indent-vrl-012-ref.xht -fuzzy-if(OSX||winWidget,0-226,0-960) fails-if(webrender&&cocoaWidget) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-016.xht css-writing-modes/text-orientation-016-ref.xht -random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-mixed-srl-016.xht css-writing-modes/text-orientation-mixed-srl-016-ref.xht +fuzzy-if(OSX||winWidget,0-255,0-960) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-016.xht css-writing-modes/text-orientation-016-ref.xht +== css-writing-modes/text-orientation-mixed-srl-016.xht css-writing-modes/text-orientation-mixed-srl-016-ref.xht random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-mixed-vlr-100.html css-writing-modes/text-orientation-mixed-vlr-100-ref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-mixed-vrl-100.html css-writing-modes/text-orientation-mixed-vrl-100-ref.html random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-sideways-vlr-100.html css-writing-modes/text-orientation-sideways-vlr-100-ref.html @@ -1128,30 +1128,30 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-o random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/text-orientation-upright-srl-018.xht css-writing-modes/text-orientation-mixed-srl-016-ref.xht == css-writing-modes/text-orientation-upright-vlr-100.html css-writing-modes/text-orientation-upright-vlr-100-ref.html == css-writing-modes/text-orientation-upright-vrl-100.html css-writing-modes/text-orientation-upright-vrl-100-ref.html -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-002.xht css-writing-modes/vertical-alignment-002-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-003.xht css-writing-modes/vertical-alignment-002-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-004.xht css-writing-modes/vertical-alignment-004-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-005.xht css-writing-modes/vertical-alignment-004-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-006.xht css-writing-modes/vertical-alignment-006-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-007.xht css-writing-modes/vertical-alignment-006-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-008.xht css-writing-modes/vertical-alignment-008-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-009.xht css-writing-modes/vertical-alignment-008-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-029.xht css-writing-modes/vertical-alignment-008-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-031.xht css-writing-modes/vertical-alignment-006-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-033.xht css-writing-modes/vertical-alignment-004-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-035.xht css-writing-modes/vertical-alignment-002-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-041.xht css-writing-modes/vertical-alignment-slr-049-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-028.xht css-writing-modes/vertical-alignment-002-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-030.xht css-writing-modes/vertical-alignment-004-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-032.xht css-writing-modes/vertical-alignment-006-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-034.xht css-writing-modes/vertical-alignment-008-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-040.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht -fails random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vlr-023.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht -fails random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vlr-025.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vlr-027.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht -fails random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vrl-022.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht -fails random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vrl-024.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht -fuzzy-if(OSX||winWidget,0-223,0-720) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vrl-026.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-002.xht css-writing-modes/vertical-alignment-002-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-003.xht css-writing-modes/vertical-alignment-002-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-004.xht css-writing-modes/vertical-alignment-004-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-005.xht css-writing-modes/vertical-alignment-004-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-006.xht css-writing-modes/vertical-alignment-006-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-007.xht css-writing-modes/vertical-alignment-006-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-008.xht css-writing-modes/vertical-alignment-008-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-009.xht css-writing-modes/vertical-alignment-008-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-029.xht css-writing-modes/vertical-alignment-008-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-031.xht css-writing-modes/vertical-alignment-006-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-033.xht css-writing-modes/vertical-alignment-004-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-035.xht css-writing-modes/vertical-alignment-002-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-slr-041.xht css-writing-modes/vertical-alignment-slr-049-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-028.xht css-writing-modes/vertical-alignment-002-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-030.xht css-writing-modes/vertical-alignment-004-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-032.xht css-writing-modes/vertical-alignment-006-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-034.xht css-writing-modes/vertical-alignment-008-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-srl-040.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht +fails == css-writing-modes/vertical-alignment-vlr-023.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht +fails == css-writing-modes/vertical-alignment-vlr-025.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vlr-027.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht +fails == css-writing-modes/vertical-alignment-vrl-022.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht +fails == css-writing-modes/vertical-alignment-vrl-024.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht +fuzzy-if(winWidget,0-223,0-720) fuzzy-if(OSX&&!webrender,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vrl-026.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht fails == css-writing-modes/wm-propagation-body-006.xht css-writing-modes/block-flow-direction-025-ref.xht fails == css-writing-modes/wm-propagation-body-008.xht css-writing-modes/block-flow-direction-025-ref.xht fails == css-writing-modes/wm-propagation-body-010.xht css-writing-modes/wm-propagation-body-003-ref.xht @@ -1159,10 +1159,10 @@ fails == css-writing-modes/wm-propagation-body-011.xht css-writing-modes/wm-prop fails == css-writing-modes/wm-propagation-body-015.xht css-writing-modes/block-flow-direction-025-ref.xht == css-writing-modes/writing-mode-horizontal-001l.html css-writing-modes/reference/writing-mode-horizontal-001l-ref.html == css-writing-modes/writing-mode-horizontal-001r.html css-writing-modes/reference/writing-mode-horizontal-001r-ref.html -fuzzy-if(OSX||winWidget,0-158,0-624) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-lr-002.xht css-writing-modes/reftest/writing-mode-vertical-lr-002-ref.xht -fuzzy-if(OSX||winWidget,0-158,0-624) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-001.xht css-writing-modes/reftest/writing-mode-vertical-rl-001-ref.xht -fuzzy-if(OSX||winWidget,0-158,0-624) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-002.xht css-writing-modes/reftest/writing-mode-vertical-rl-002-ref.xht -fuzzy-if(OSX||winWidget,0-158,0-719) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-003.htm css-writing-modes/writing-mode-vertical-rl-003-ref.htm +fuzzy-if(winWidget,0-158,0-624) fuzzy-if(OSX&&!webrender,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-lr-002.xht css-writing-modes/reftest/writing-mode-vertical-lr-002-ref.xht +fuzzy-if(winWidget,0-158,0-624) fuzzy-if(OSX&&!webrender,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-001.xht css-writing-modes/reftest/writing-mode-vertical-rl-001-ref.xht +fuzzy-if(winWidget,0-158,0-624) fuzzy-if(OSX&&!webrender,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-002.xht css-writing-modes/reftest/writing-mode-vertical-rl-002-ref.xht +fuzzy-if(winWidget,0-158,0-624) fuzzy-if(OSX&&!webrender,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-rl-003.htm css-writing-modes/writing-mode-vertical-rl-003-ref.htm skip == selectors/any-link-dynamic-001.html selectors/any-link-dynamic-001-ref.html needs-focus random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == selectors/focus-within-001.html selectors/focus-within-001-ref.html needs-focus random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == selectors/focus-within-002.html selectors/focus-within-001-ref.html diff --git a/layout/reftests/w3c-css/submitted/variables/reftest.list b/layout/reftests/w3c-css/submitted/variables/reftest.list index baa90e4e9000..099d16bf950b 100644 --- a/layout/reftests/w3c-css/submitted/variables/reftest.list +++ b/layout/reftests/w3c-css/submitted/variables/reftest.list @@ -58,11 +58,11 @@ == variable-declaration-59.html support/color-green-ref.html == variable-declaration-60.html support/color-green-ref.html == variable-external-declaration-01.html support/color-green-ref.html -== variable-external-font-face-01.html variable-external-font-face-01-ref.html +pref(gfx.font_ahem_antialias_none,false) fuzzy-if(OSX,95-101,1760-1788) fuzzy-if(winWidget,88-113,992-1726) == variable-external-font-face-01.html variable-external-font-face-01-ref.html == variable-external-reference-01.html support/color-green-ref.html == variable-external-supports-01.html support/color-green-ref.html -== variable-font-face-01.html variable-font-face-01-ref.html -== variable-font-face-02.html variable-font-face-02-ref.html +fuzzy-if(OSX,95-101,1760-1788) fuzzy-if(winWidget,88-113,992-1726) == variable-font-face-01.html variable-font-face-01-ref.html +fuzzy-if(OSX,95-101,1760-1788) fuzzy-if(winWidget,88-113,992-1726) == variable-font-face-02.html variable-font-face-02-ref.html == variable-reference-01.html support/color-green-ref.html == variable-reference-02.html support/color-green-ref.html == variable-reference-03.html support/color-green-ref.html diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index dc63c528fd96..f0102a84151d 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -357,6 +357,7 @@ class RefTest(object): prefs['reftest.focusFilterMode'] = options.focusFilterMode prefs['reftest.logLevel'] = options.log_tbpl_level or 'info' prefs['reftest.suite'] = options.suite + prefs['gfx.font_ahem_antialias_none'] = True # Set tests to run or manifests to parse. if tests: From 29fe37289ba862bf7776591df15298e1b055fb56 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 25 Apr 2019 09:00:16 +0000 Subject: [PATCH 02/60] Bug 1423598 - [Wayland] Use gdk_window_move_to_rect() to place popup windows, r=ashie Differential Revision: https://phabricator.services.mozilla.com/D22962 --HG-- extra : moz-landing-system : lando --- widget/gtk/nsWindow.cpp | 176 ++++++++++++++++++++++++++++++++-------- widget/gtk/nsWindow.h | 6 ++ 2 files changed, 148 insertions(+), 34 deletions(-) diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 38f86c42304e..713a6c55f304 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -1114,10 +1114,93 @@ void nsWindow::Move(double aX, double aY) { NotifyRollupGeometryChange(); } +bool nsWindow::IsWaylandPopup() { + return !mIsX11Display && mIsTopLevel && mWindowType == eWindowType_popup; +} + +#ifdef DEBUG +static void NativeMoveResizeWaylandPopupCallback( + GdkWindow *window, const GdkRectangle *flipped_rect, + const GdkRectangle *final_rect, gboolean flipped_x, gboolean flipped_y, + void *unused) { + LOG(("%s flipped %d %d\n", __FUNCTION__, flipped_rect->x, flipped_rect->y)); + LOG(("%s final %d %d\n", __FUNCTION__, final_rect->x, final_rect->y)); +} +#endif + +void nsWindow::NativeMoveResizeWaylandPopup(GdkPoint *aPosition, + GdkRectangle *aSize) { + // Available as of GTK 3.24+ + static auto sGdkWindowMoveToRect = (void (*)( + GdkWindow *, const GdkRectangle *, GdkGravity, GdkGravity, GdkAnchorHints, + gint, gint))dlsym(RTLD_DEFAULT, "gdk_window_move_to_rect"); + + if (aSize) { + gtk_window_resize(GTK_WINDOW(mShell), aSize->width, aSize->height); + } + + GdkWindow *gdkWindow = gtk_widget_get_window(GTK_WIDGET(mShell)); + // gdk_window_move_to_rect() is not available, we don't have a valid GdkWindow + // (we're not realized yet) - try plain gtk_window_move() at least. + if (!sGdkWindowMoveToRect || !gdkWindow) { + gtk_window_move(GTK_WINDOW(mShell), aPosition->x, aPosition->y); + return; + } + + GtkWindow *parentWindow = GetPopupParentWindow(); + if (parentWindow) { + gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); + } else { + parentWindow = gtk_window_get_transient_for(GTK_WINDOW(mShell)); + } + + LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] Set popup parent %p\n", + (void *)this, parentWindow)); + + int x_parent, y_parent; + gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(parentWindow)), + &x_parent, &y_parent); + + GdkRectangle rect = {aPosition->x - x_parent, aPosition->y - y_parent, 1, 1}; + if (aSize) { + rect.width = aSize->width; + rect.height = aSize->height; + } + + LOG(("%s [%p] request position %d,%d\n", __FUNCTION__, (void *)this, + aPosition->x, aPosition->y)); + if (aSize) { + LOG((" request size %d,%d\n", aSize->width, aSize->height)); + } + LOG((" request result %d %d\n", rect.x, rect.y)); +#ifdef DEBUG + g_signal_connect(gdkWindow, "moved-to-rect", + G_CALLBACK(NativeMoveResizeWaylandPopupCallback), this); +#endif + + GdkGravity rectAnchor = GDK_GRAVITY_NORTH_WEST; + GdkGravity menuAnchor = GDK_GRAVITY_NORTH_WEST; + if (GetTextDirection() == GTK_TEXT_DIR_RTL) { + rectAnchor = GDK_GRAVITY_NORTH_EAST; + menuAnchor = GDK_GRAVITY_NORTH_EAST; + } + + GdkAnchorHints hints = GdkAnchorHints(GDK_ANCHOR_SLIDE | GDK_ANCHOR_FLIP); + if (aSize) { + hints = GdkAnchorHints(hints | GDK_ANCHOR_RESIZE); + } + + sGdkWindowMoveToRect(gdkWindow, &rect, rectAnchor, menuAnchor, hints, 0, 0); +} + void nsWindow::NativeMove() { GdkPoint point = DevicePixelsToGdkPointRoundDown(mBounds.TopLeft()); - if (mIsTopLevel) { + LOG(("nsWindow::NativeMove [%p] %d %d\n", (void *)this, point.x, point.y)); + + if (IsWaylandPopup()) { + NativeMoveResizeWaylandPopup(&point, nullptr); + } else if (mIsTopLevel) { gtk_window_move(GTK_WINDOW(mShell), point.x, point.y); } else if (mGdkWindow) { gdk_window_move(mGdkWindow, point.x, point.y); @@ -3408,11 +3491,6 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } else if (mWindowType == eWindowType_popup) { - // With popup windows, we want to control their position, so don't - // wait for the window manager to place them (which wouldn't - // happen with override-redirect windows anyway). - NativeMove(); - gtk_window_set_wmclass(GTK_WINDOW(mShell), "Popup", gdk_get_program_class()); @@ -3465,8 +3543,18 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, gtk_window_set_type_hint(GTK_WINDOW(mShell), gtkTypeHint); if (topLevelParent) { + LOG(("nsWindow::Create [%p] Set popup parent %p\n", (void *)this, + topLevelParent)); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } + + // We need realized mShell at NativeMove(). + gtk_widget_realize(mShell); + + // With popup windows, we want to control their position, so don't + // wait for the window manager to place them (which wouldn't + // happen with override-redirect windows anyway). + NativeMove(); } else { // must be eWindowType_toplevel SetDefaultIcon(); gtk_window_set_wmclass(GTK_WINDOW(mShell), "Toplevel", @@ -3910,23 +3998,27 @@ void nsWindow::NativeMoveResize() { LOG(("nsWindow::NativeMoveResize [%p] %d %d %d %d\n", (void *)this, topLeft.x, topLeft.y, size.width, size.height)); - if (mIsTopLevel) { - // x and y give the position of the window manager frame top-left. - gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); - // This sets the client window size. - MOZ_ASSERT(size.width > 0 && size.height > 0, - "Can't resize window smaller than 1x1."); - gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); - } else if (mContainer) { - GtkAllocation allocation; - allocation.x = topLeft.x; - allocation.y = topLeft.y; - allocation.width = size.width; - allocation.height = size.height; - gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); - } else if (mGdkWindow) { - gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, - size.height); + if (IsWaylandPopup()) { + NativeMoveResizeWaylandPopup(&topLeft, &size); + } else { + if (mIsTopLevel) { + // x and y give the position of the window manager frame top-left. + gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); + // This sets the client window size. + MOZ_ASSERT(size.width > 0 && size.height > 0, + "Can't resize window smaller than 1x1."); + gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); + } else if (mContainer) { + GtkAllocation allocation; + allocation.x = topLeft.x; + allocation.y = topLeft.y; + allocation.width = size.width; + allocation.height = size.height; + gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); + } else if (mGdkWindow) { + gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, + size.height); + } } #ifdef MOZ_X11 @@ -3954,9 +4046,11 @@ void nsWindow::NativeShow(bool aAction) { SetUserTimeAndStartupIDForActivatedWindow(mShell); } // Update popup window hierarchy run-time on Wayland. - if (!mIsX11Display && mWindowType == eWindowType_popup) { + if (IsWaylandPopup()) { GtkWindow *parentWindow = GetPopupParentWindow(); if (parentWindow) { + LOG(("nsWindow::NativeShow [%p] Set popup parent %p\n", (void *)this, + parentWindow)); gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); } } @@ -5444,9 +5538,9 @@ static gboolean key_press_event_cb(GtkWidget *widget, GdkEventKey *event) { // are generated only when the key is physically released. # define NS_GDKEVENT_MATCH_MASK 0x1FFF // GDK_SHIFT_MASK .. GDK_BUTTON5_MASK // Our headers undefine X11 KeyPress - let's redefine it here. -#ifndef KeyPress - #define KeyPress 2 -#endif +# ifndef KeyPress +# define KeyPress 2 +# endif GdkDisplay *gdkDisplay = gtk_widget_get_display(widget); if (GDK_IS_X11_DISPLAY(gdkDisplay)) { Display *dpy = GDK_DISPLAY_XDISPLAY(gdkDisplay); @@ -6819,18 +6913,32 @@ void nsWindow::ForceTitlebarRedraw(void) { } } -GtkWindow* nsWindow::GetPopupParentWindow() -{ - nsView* view = nsView::GetViewFor(this); +GtkWindow *nsWindow::GetPopupParentWindow() { + nsView *view = nsView::GetViewFor(this); if (!view) { return nullptr; } - nsIFrame* frame = view->GetFrame(); + nsIFrame *frame = view->GetFrame(); if (!frame) { return nullptr; } - nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(frame); - nsWindow* window = - static_cast(menuPopupFrame->GetParentMenuWidget()); + nsMenuPopupFrame *menuPopupFrame = do_QueryFrame(frame); + nsWindow *window = + static_cast(menuPopupFrame->GetParentMenuWidget()); return window ? GTK_WINDOW(window->GetGtkWidget()) : nullptr; } + +GtkTextDirection nsWindow::GetTextDirection() { + nsView *view = nsView::GetViewFor(this); + if (!view) { + return GTK_TEXT_DIR_LTR; + } + nsIFrame *frame = view->GetFrame(); + if (!frame) { + return GTK_TEXT_DIR_LTR; + } + + WritingMode wm = frame->GetWritingMode(); + bool isFrameRTL = !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR()); + return isFrameRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; +} diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h index 8062bc618609..8736ad4b91e7 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -460,6 +460,10 @@ class nsWindow final : public nsBaseWidget { nsWindow* GetTransientForWindowIfPopup(); bool IsHandlingTouchSequence(GdkEventSequence* aSequence); + void NativeMoveResizeWaylandPopup(GdkPoint* aPosition, GdkRectangle* aSize); + + GtkTextDirection GetTextDirection(); + #ifdef MOZ_X11 typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, GTK_WIDGET_COMPOSIDED_DISABLED = 1, @@ -608,6 +612,8 @@ class nsWindow final : public nsBaseWidget { // This is used by Wayland backend to keep strict popup window hierarchy. GtkWindow* GetPopupParentWindow(); + bool IsWaylandPopup(); + /** * |mIMContext| takes all IME related stuff. * From 7c92e63506b4dba1e9518f53575ee6e4d0a8fdc6 Mon Sep 17 00:00:00 2001 From: Gurzau Raul Date: Thu, 25 Apr 2019 13:37:08 +0300 Subject: [PATCH 03/60] Backed out changeset c11577f6743e (bug 1423598) for build bustage at /gtk/nsWindow.cpp. on a CLOSED TREE. --- widget/gtk/nsWindow.cpp | 176 ++++++++-------------------------------- widget/gtk/nsWindow.h | 6 -- 2 files changed, 34 insertions(+), 148 deletions(-) diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 713a6c55f304..38f86c42304e 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -1114,93 +1114,10 @@ void nsWindow::Move(double aX, double aY) { NotifyRollupGeometryChange(); } -bool nsWindow::IsWaylandPopup() { - return !mIsX11Display && mIsTopLevel && mWindowType == eWindowType_popup; -} - -#ifdef DEBUG -static void NativeMoveResizeWaylandPopupCallback( - GdkWindow *window, const GdkRectangle *flipped_rect, - const GdkRectangle *final_rect, gboolean flipped_x, gboolean flipped_y, - void *unused) { - LOG(("%s flipped %d %d\n", __FUNCTION__, flipped_rect->x, flipped_rect->y)); - LOG(("%s final %d %d\n", __FUNCTION__, final_rect->x, final_rect->y)); -} -#endif - -void nsWindow::NativeMoveResizeWaylandPopup(GdkPoint *aPosition, - GdkRectangle *aSize) { - // Available as of GTK 3.24+ - static auto sGdkWindowMoveToRect = (void (*)( - GdkWindow *, const GdkRectangle *, GdkGravity, GdkGravity, GdkAnchorHints, - gint, gint))dlsym(RTLD_DEFAULT, "gdk_window_move_to_rect"); - - if (aSize) { - gtk_window_resize(GTK_WINDOW(mShell), aSize->width, aSize->height); - } - - GdkWindow *gdkWindow = gtk_widget_get_window(GTK_WIDGET(mShell)); - // gdk_window_move_to_rect() is not available, we don't have a valid GdkWindow - // (we're not realized yet) - try plain gtk_window_move() at least. - if (!sGdkWindowMoveToRect || !gdkWindow) { - gtk_window_move(GTK_WINDOW(mShell), aPosition->x, aPosition->y); - return; - } - - GtkWindow *parentWindow = GetPopupParentWindow(); - if (parentWindow) { - gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); - } else { - parentWindow = gtk_window_get_transient_for(GTK_WINDOW(mShell)); - } - - LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] Set popup parent %p\n", - (void *)this, parentWindow)); - - int x_parent, y_parent; - gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(parentWindow)), - &x_parent, &y_parent); - - GdkRectangle rect = {aPosition->x - x_parent, aPosition->y - y_parent, 1, 1}; - if (aSize) { - rect.width = aSize->width; - rect.height = aSize->height; - } - - LOG(("%s [%p] request position %d,%d\n", __FUNCTION__, (void *)this, - aPosition->x, aPosition->y)); - if (aSize) { - LOG((" request size %d,%d\n", aSize->width, aSize->height)); - } - LOG((" request result %d %d\n", rect.x, rect.y)); -#ifdef DEBUG - g_signal_connect(gdkWindow, "moved-to-rect", - G_CALLBACK(NativeMoveResizeWaylandPopupCallback), this); -#endif - - GdkGravity rectAnchor = GDK_GRAVITY_NORTH_WEST; - GdkGravity menuAnchor = GDK_GRAVITY_NORTH_WEST; - if (GetTextDirection() == GTK_TEXT_DIR_RTL) { - rectAnchor = GDK_GRAVITY_NORTH_EAST; - menuAnchor = GDK_GRAVITY_NORTH_EAST; - } - - GdkAnchorHints hints = GdkAnchorHints(GDK_ANCHOR_SLIDE | GDK_ANCHOR_FLIP); - if (aSize) { - hints = GdkAnchorHints(hints | GDK_ANCHOR_RESIZE); - } - - sGdkWindowMoveToRect(gdkWindow, &rect, rectAnchor, menuAnchor, hints, 0, 0); -} - void nsWindow::NativeMove() { GdkPoint point = DevicePixelsToGdkPointRoundDown(mBounds.TopLeft()); - LOG(("nsWindow::NativeMove [%p] %d %d\n", (void *)this, point.x, point.y)); - - if (IsWaylandPopup()) { - NativeMoveResizeWaylandPopup(&point, nullptr); - } else if (mIsTopLevel) { + if (mIsTopLevel) { gtk_window_move(GTK_WINDOW(mShell), point.x, point.y); } else if (mGdkWindow) { gdk_window_move(mGdkWindow, point.x, point.y); @@ -3491,6 +3408,11 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } else if (mWindowType == eWindowType_popup) { + // With popup windows, we want to control their position, so don't + // wait for the window manager to place them (which wouldn't + // happen with override-redirect windows anyway). + NativeMove(); + gtk_window_set_wmclass(GTK_WINDOW(mShell), "Popup", gdk_get_program_class()); @@ -3543,18 +3465,8 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, gtk_window_set_type_hint(GTK_WINDOW(mShell), gtkTypeHint); if (topLevelParent) { - LOG(("nsWindow::Create [%p] Set popup parent %p\n", (void *)this, - topLevelParent)); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } - - // We need realized mShell at NativeMove(). - gtk_widget_realize(mShell); - - // With popup windows, we want to control their position, so don't - // wait for the window manager to place them (which wouldn't - // happen with override-redirect windows anyway). - NativeMove(); } else { // must be eWindowType_toplevel SetDefaultIcon(); gtk_window_set_wmclass(GTK_WINDOW(mShell), "Toplevel", @@ -3998,27 +3910,23 @@ void nsWindow::NativeMoveResize() { LOG(("nsWindow::NativeMoveResize [%p] %d %d %d %d\n", (void *)this, topLeft.x, topLeft.y, size.width, size.height)); - if (IsWaylandPopup()) { - NativeMoveResizeWaylandPopup(&topLeft, &size); - } else { - if (mIsTopLevel) { - // x and y give the position of the window manager frame top-left. - gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); - // This sets the client window size. - MOZ_ASSERT(size.width > 0 && size.height > 0, - "Can't resize window smaller than 1x1."); - gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); - } else if (mContainer) { - GtkAllocation allocation; - allocation.x = topLeft.x; - allocation.y = topLeft.y; - allocation.width = size.width; - allocation.height = size.height; - gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); - } else if (mGdkWindow) { - gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, - size.height); - } + if (mIsTopLevel) { + // x and y give the position of the window manager frame top-left. + gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); + // This sets the client window size. + MOZ_ASSERT(size.width > 0 && size.height > 0, + "Can't resize window smaller than 1x1."); + gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); + } else if (mContainer) { + GtkAllocation allocation; + allocation.x = topLeft.x; + allocation.y = topLeft.y; + allocation.width = size.width; + allocation.height = size.height; + gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); + } else if (mGdkWindow) { + gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, + size.height); } #ifdef MOZ_X11 @@ -4046,11 +3954,9 @@ void nsWindow::NativeShow(bool aAction) { SetUserTimeAndStartupIDForActivatedWindow(mShell); } // Update popup window hierarchy run-time on Wayland. - if (IsWaylandPopup()) { + if (!mIsX11Display && mWindowType == eWindowType_popup) { GtkWindow *parentWindow = GetPopupParentWindow(); if (parentWindow) { - LOG(("nsWindow::NativeShow [%p] Set popup parent %p\n", (void *)this, - parentWindow)); gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); } } @@ -5538,9 +5444,9 @@ static gboolean key_press_event_cb(GtkWidget *widget, GdkEventKey *event) { // are generated only when the key is physically released. # define NS_GDKEVENT_MATCH_MASK 0x1FFF // GDK_SHIFT_MASK .. GDK_BUTTON5_MASK // Our headers undefine X11 KeyPress - let's redefine it here. -# ifndef KeyPress -# define KeyPress 2 -# endif +#ifndef KeyPress + #define KeyPress 2 +#endif GdkDisplay *gdkDisplay = gtk_widget_get_display(widget); if (GDK_IS_X11_DISPLAY(gdkDisplay)) { Display *dpy = GDK_DISPLAY_XDISPLAY(gdkDisplay); @@ -6913,32 +6819,18 @@ void nsWindow::ForceTitlebarRedraw(void) { } } -GtkWindow *nsWindow::GetPopupParentWindow() { - nsView *view = nsView::GetViewFor(this); +GtkWindow* nsWindow::GetPopupParentWindow() +{ + nsView* view = nsView::GetViewFor(this); if (!view) { return nullptr; } - nsIFrame *frame = view->GetFrame(); + nsIFrame* frame = view->GetFrame(); if (!frame) { return nullptr; } - nsMenuPopupFrame *menuPopupFrame = do_QueryFrame(frame); - nsWindow *window = - static_cast(menuPopupFrame->GetParentMenuWidget()); + nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(frame); + nsWindow* window = + static_cast(menuPopupFrame->GetParentMenuWidget()); return window ? GTK_WINDOW(window->GetGtkWidget()) : nullptr; } - -GtkTextDirection nsWindow::GetTextDirection() { - nsView *view = nsView::GetViewFor(this); - if (!view) { - return GTK_TEXT_DIR_LTR; - } - nsIFrame *frame = view->GetFrame(); - if (!frame) { - return GTK_TEXT_DIR_LTR; - } - - WritingMode wm = frame->GetWritingMode(); - bool isFrameRTL = !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR()); - return isFrameRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; -} diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h index 8736ad4b91e7..8062bc618609 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -460,10 +460,6 @@ class nsWindow final : public nsBaseWidget { nsWindow* GetTransientForWindowIfPopup(); bool IsHandlingTouchSequence(GdkEventSequence* aSequence); - void NativeMoveResizeWaylandPopup(GdkPoint* aPosition, GdkRectangle* aSize); - - GtkTextDirection GetTextDirection(); - #ifdef MOZ_X11 typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, GTK_WIDGET_COMPOSIDED_DISABLED = 1, @@ -612,8 +608,6 @@ class nsWindow final : public nsBaseWidget { // This is used by Wayland backend to keep strict popup window hierarchy. GtkWindow* GetPopupParentWindow(); - bool IsWaylandPopup(); - /** * |mIMContext| takes all IME related stuff. * From e40c27877d97c91928e810b5be9e91199687b9ac Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Wed, 24 Apr 2019 17:35:38 +0000 Subject: [PATCH 04/60] bug 1546714: remote: map Remote Protocol :: {DOM, Input} bug components; r=ochameau DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D28688 --HG-- extra : moz-landing-system : lando --- remote/moz.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remote/moz.build b/remote/moz.build index 3d0587377101..d27a8864c152 100644 --- a/remote/moz.build +++ b/remote/moz.build @@ -20,6 +20,10 @@ with Files("targets/**"): BUG_COMPONENT = ("Remote Protocol", "Target") with Files("domains/**/Emulation.jsm"): BUG_COMPONENT = ("Remote Protocol", "Emulation") +with Files("domains/**/DOM.jsm"): + BUG_COMPONENT = ("Remote Protocol", "DOM") +with Files("domains/**/Input.jsm"): + BUG_COMPONENT = ("Remote Protocol", "Input") with Files("domains/**/Log.jsm"): BUG_COMPONENT = ("Remote Protocol", "Log") with Files("domains/**/Network.jsm"): From b5e28c321049a17862fbe48010acad6760f9b416 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Thu, 25 Apr 2019 10:33:01 +0000 Subject: [PATCH 05/60] bug 1546714: remote: fix bug component mapping for remote/targets/; r=ochameau There are two concepts of targets in CDP: the target web document, and the Target domain. The remote/targets/ subfolder is related to the first, which should have bugs filed under Remote Protocol :: Agent, covered by the preceding rule. DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D28689 --HG-- extra : moz-landing-system : lando --- remote/moz.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/remote/moz.build b/remote/moz.build index d27a8864c152..9b863a6ab9a4 100644 --- a/remote/moz.build +++ b/remote/moz.build @@ -16,8 +16,6 @@ JAR_MANIFESTS += ["jar.mn"] with Files("**"): BUG_COMPONENT = ("Remote Protocol", "Agent") -with Files("targets/**"): - BUG_COMPONENT = ("Remote Protocol", "Target") with Files("domains/**/Emulation.jsm"): BUG_COMPONENT = ("Remote Protocol", "Emulation") with Files("domains/**/DOM.jsm"): From 73c4b820161a09d6cfaf8c24229dca03ef77dd42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Thu, 25 Apr 2019 10:13:59 +0000 Subject: [PATCH 06/60] Bug 1505126 - Part 1: UX fixes. r=jdescottes,daisuke,Ola Differential Revision: https://phabricator.services.mozilla.com/D28515 --HG-- extra : moz-landing-system : lando --- .../client/aboutdebugging-new/src/base.css | 31 +++++++++------ .../aboutdebugging-new/src/components/App.css | 4 +- .../src/components/RuntimeInfo.css | 6 +-- .../src/components/connect/ConnectPage.css | 1 + .../src/components/connect/ConnectPage.js | 4 +- .../src/components/connect/ConnectSection.css | 4 +- .../components/debugtarget/DebugTargetList.js | 35 +++++++++-------- .../debugtarget/ServiceWorkerAction.css | 2 +- .../src/components/shared/Message.css | 39 +++++++++---------- .../src/components/sidebar/Sidebar.css | 4 ++ .../src/components/sidebar/Sidebar.js | 2 +- .../src/components/sidebar/SidebarItem.css | 7 +--- .../components/sidebar/SidebarRuntimeItem.css | 9 ++++- .../components/sidebar/SidebarRuntimeItem.js | 39 ++++++++----------- 14 files changed, 95 insertions(+), 92 deletions(-) diff --git a/devtools/client/aboutdebugging-new/src/base.css b/devtools/client/aboutdebugging-new/src/base.css index 81cf78e2d02b..dc5f2473a868 100644 --- a/devtools/client/aboutdebugging-new/src/base.css +++ b/devtools/client/aboutdebugging-new/src/base.css @@ -27,11 +27,13 @@ --link-color-hover: #0060df; /* Colors from Photon */ - --success-50: #30e60b; - --warning-50: #ffe900; - --warning-90: #3e2800; - --error-50: #ff0039; - --error-60: #d70022; + --success-background: #30e60b; + --warning-background: #fffbd6; /* from the Web Console */ + --warning-icon: var(--yellow-65); /* from the Web Console */ + --warning-text: var(--yellow-80); /* from the Web Console */ + --error-background: #fdf2f5; /* from the Web Console */ + --error-icon: var(--red-60); /* from the Web Console */ + --error-text: var(--red-70); /* from the Web Console */ --highlight-50: #0a84ff; --grey-20: #ededf0; /* for ui, no special semantic */ --grey-30: #d7d7db; /* for ui, no special semantic */ @@ -62,6 +64,8 @@ --caption-20-color: var(--grey-50); --display-20-font-size: 36px; --display-20-font-weight: 200; + --display-10-font-size: 28px; + --display-10-font-weight: 200; --title-20-font-size: 17px; --title-20-font-weight: 600; --title-30-font-size: 22px; @@ -178,8 +182,8 @@ p, h1 { /* Main style for heading (i.e. h1) */ .main-heading { - font-size: var(--display-20-font-size); - font-weight: var(--display-20-font-weight); + font-size: var(--display-10-font-size); + font-weight: var(--display-10-font-weight); line-height: 1.2; color: var(--in-content-text-color); } @@ -224,6 +228,11 @@ p, h1 { margin-block-end: calc(var(--base-unit) * 4); } +.alt-heading--larger { + font-size: var(--title-30-font-size); + font-weight: var(--title-30-font-weight); +} + /* Alternative style for a subheading (i.e. h2). It features an icon */ /* +--------+-------------+ * | [Icon] | Lorem ipsum | @@ -395,15 +404,15 @@ Form controls } .badge--success { - background: var(--success-50); + background: var(--success-background); } .badge--warning { - background: var(--warning-50); + background: var(--warning-background); } .badge--error { - background: var(--error-50); + background: var(--error-background); } /* @@ -413,7 +422,7 @@ Form controls background-color: var(--white-100); /* from common.inc.css */ border-radius: var(--card-shadow-blur-radius); /* from common.inc.css */ box-shadow: 0 1px 4px var(--grey-90-a10); /* from common.inc.css */ - padding-block: calc(var(--base-unit) * 3) calc(var(--base-unit) * 2); + padding-block: calc(var(--base-unit) * 5); } .card__heading { diff --git a/devtools/client/aboutdebugging-new/src/components/App.css b/devtools/client/aboutdebugging-new/src/components/App.css index 5a51bfd34b80..f55f085b5ca0 100644 --- a/devtools/client/aboutdebugging-new/src/components/App.css +++ b/devtools/client/aboutdebugging-new/src/components/App.css @@ -17,7 +17,7 @@ .app { /* from common */ - --sidebar-width: 240px; + --sidebar-width: 320px; --app-top-padding: 70px; --app-bottom-padding: 40px; --app-left-padding: 34px; @@ -57,4 +57,6 @@ .page { max-width: var(--page-width); + font-size: var(--body-20-font-size); + font-weight: var(--body-20-font-weight); } diff --git a/devtools/client/aboutdebugging-new/src/components/RuntimeInfo.css b/devtools/client/aboutdebugging-new/src/components/RuntimeInfo.css index f6a5c9ecb73f..e6fcd9dd7e04 100644 --- a/devtools/client/aboutdebugging-new/src/components/RuntimeInfo.css +++ b/devtools/client/aboutdebugging-new/src/components/RuntimeInfo.css @@ -21,7 +21,7 @@ grid-column-gap: var(--main-heading-icon-gap); grid-template-areas: "icon title action" - "icon subtitle action"; + "icon subtitle ."; grid-template-columns: var(--main-heading-icon-size) 1fr max-content; grid-template-rows: 1fr max-content; @@ -38,9 +38,5 @@ grid-area: subtitle; } .runtime-info__action { - align-self: start; - /* The default-button has a font-size of 1em at the moment, this rule should not be - * necessary after the first patch from Bug 1525615 lands. */ - font-size: var(--base-font-size); grid-area: action; } diff --git a/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.css b/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.css index 4497ee0ab197..ef979381ea5c 100644 --- a/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.css +++ b/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.css @@ -20,6 +20,7 @@ "status . toggle"; grid-template-columns: auto 1fr auto; grid-column-gap: calc(var(--base-unit) * 2); + grid-row-gap: var(--base-unit); } .connect-page__usb-section__heading__toggle { diff --git a/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.js b/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.js index 9f144109e4be..afbd24c6e672 100644 --- a/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.js +++ b/devtools/client/aboutdebugging-new/src/components/connect/ConnectPage.js @@ -207,7 +207,7 @@ class ConnectPage extends PureComponent { }, dom.h1( { - className: "alt-heading", + className: "alt-heading alt-heading--larger", }, "Setup" ), @@ -258,7 +258,7 @@ class ConnectPage extends PureComponent { { id: "about-debugging-setup-connect-heading", }, - dom.h1( + dom.h2( { className: "alt-heading", }, diff --git a/devtools/client/aboutdebugging-new/src/components/connect/ConnectSection.css b/devtools/client/aboutdebugging-new/src/components/connect/ConnectSection.css index 509330f306f7..fc4cf813b293 100644 --- a/devtools/client/aboutdebugging-new/src/components/connect/ConnectSection.css +++ b/devtools/client/aboutdebugging-new/src/components/connect/ConnectSection.css @@ -20,7 +20,7 @@ grid-column-gap: var(--header-col-gap); align-items: center; - padding-block: calc(var(--base-unit) * 4); + padding-block-end: calc(var(--base-unit) * 4); padding-inline: calc(var(--base-unit) * 5); } @@ -39,10 +39,8 @@ padding-inline-start: calc(var(--base-unit) * 5 + var(--header-col-gap) + var(--icon-size)); padding-inline-end: calc(var(--base-unit) * 5); - padding-block-end: calc(var(--base-unit) * 4); } .connect-section__extra { border-block-start: 1px solid var(--card-separator-color); - padding-block-end: calc(var(--base-unit) * 4); } \ No newline at end of file diff --git a/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetList.js b/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetList.js index d36a0bbf4a1a..4dddece62ec8 100644 --- a/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetList.js +++ b/devtools/client/aboutdebugging-new/src/components/debugtarget/DebugTargetList.js @@ -35,7 +35,7 @@ class DebugTargetList extends PureComponent { { id: "about-debugging-debug-target-list-empty", }, - dom.span( + dom.p( { className: "js-debug-target-list-empty", }, @@ -53,22 +53,23 @@ class DebugTargetList extends PureComponent { targets, } = this.props; - return dom.ul( - { - className: "debug-target-list js-debug-target-list", - }, - targets.length === 0 - ? this.renderEmptyList() - : targets.map((target, key) => - DebugTargetItem({ - actionComponent, - additionalActionsComponent, - detailComponent, - dispatch, - key, - target, - })), - ); + return targets.length === 0 + ? this.renderEmptyList() + : dom.ul( + { + className: "debug-target-list js-debug-target-list", + }, + targets.map((target, key) => + DebugTargetItem({ + actionComponent, + additionalActionsComponent, + detailComponent, + dispatch, + key, + target, + }) + ), + ); } } diff --git a/devtools/client/aboutdebugging-new/src/components/debugtarget/ServiceWorkerAction.css b/devtools/client/aboutdebugging-new/src/components/debugtarget/ServiceWorkerAction.css index 58a3972871b8..c3ac2dc87256 100644 --- a/devtools/client/aboutdebugging-new/src/components/debugtarget/ServiceWorkerAction.css +++ b/devtools/client/aboutdebugging-new/src/components/debugtarget/ServiceWorkerAction.css @@ -22,5 +22,5 @@ } .service-worker-action__status--running::before { - background-color: var(--success-50); + background-color: var(--success-background); } diff --git a/devtools/client/aboutdebugging-new/src/components/shared/Message.css b/devtools/client/aboutdebugging-new/src/components/shared/Message.css index b2f890b3e545..6ddddba8d7e6 100644 --- a/devtools/client/aboutdebugging-new/src/components/shared/Message.css +++ b/devtools/client/aboutdebugging-new/src/components/shared/Message.css @@ -3,18 +3,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ .message--level-error { - --message-color: var(--white-100); - --message-background-color: var(--error-60); + --message-color: var(--error-text); + --message-background-color: var(--error-background); + --message-icon-color: var(--error-icon); } .message--level-info { --message-color: var(--grey-90); --message-background-color: var(--grey-20); + --message-icon-color: var(--grey-90); } .message--level-warning { - --message-color: var(--warning-90); - --message-background-color: var(--warning-50); + --message-color: var(--warning-text); + --message-background-color: var(--warning-background); + --message-icon-color: var(--warning-icon); } /* @@ -31,9 +34,8 @@ border-radius: var(--base-unit); color: var(--message-color); display: grid; - fill: var(--message-color); grid-column-gap: var(--base-unit); - grid-template-columns: calc(var(--base-unit) * 6) 1fr auto; + grid-template-columns: calc(var(--base-unit) * 6) 1fr auto; grid-template-areas: "icon body button"; margin: calc(var(--base-unit) * 2) 0; @@ -43,6 +45,7 @@ .message__icon { margin: var(--base-unit); + fill: var(--message-icon-color); grid-area: icon; } @@ -54,24 +57,18 @@ .message__button { grid-area: button; + fill: var(--message-icon-color); } -.message__button--warning:hover { - background-color: var(--yellow-60); +.message__button:hover { + /* reverse colors with icon when hover state */ + background-color: var(--message-icon-color); + fill: var(--message-background-color); } -.message__button--warning:active { - background-color: var(--yellow-70); +.message__button:active { + /* reverse colors with text when active state */ + background-color: var(--message-color); + fill: var(--message-background-color); } -.message__button--error { - fill: white; -} - -.message__button--error:hover { - background-color: var(--red-70); -} - -.message__button--error:active { - background-color: var(--red-80); -} diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css index c86b8d9b4801..fbb5b7e287bd 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css @@ -15,6 +15,10 @@ font-size: var(--message-font-size); } +.sidebar__adb-status { + margin-block-end: calc(var(--base-unit) * 2); +} + .sidebar__refresh-usb { text-align: center; } diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js index 473c2b410bda..6a7917a40379 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js @@ -207,7 +207,7 @@ class Sidebar extends PureComponent { ), SidebarItem( { - className: "sidebar-item--overflow sidebar-item--full-width", + className: "sidebar__adb-status sidebar-item--full-width", }, dom.hr({ className: "separator separator--breathe" }), this.renderAdbStatus(), diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css index 4612221c117b..f4a7eb22f9b2 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css @@ -30,11 +30,6 @@ padding-inline-end: 0; } -/* .sidebar-item--overflow { - min-height: var(--category-height); - height: auto; -} */ - .sidebar-item__link { display: block; height: 100%; @@ -46,7 +41,7 @@ } .sidebar-item:not(.sidebar-item--selectable) { - color: var(--grey-40); + color: var(--grey-50); } .sidebar-item--selectable:hover { diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.css b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.css index 1ee3eea0a03b..483fb2a5cfc5 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.css +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.css @@ -11,11 +11,12 @@ */ .sidebar-runtime-item__container { + box-sizing: border-box; + height: var(--category-height); align-items: center; display: grid; grid-column-gap: var(--base-unit); grid-template-columns: calc(var(--base-unit) * 6) 1fr auto; - height: 100%; font-size: var(--body-20-font-size); font-weight: var(--body-20-font-weight); } @@ -26,10 +27,14 @@ } .sidebar-runtime-item__runtime { - line-height: 1.2; + line-height: 1; } .sidebar-runtime-item__runtime__details { font-size: var(--caption-10-font-size); font-weight: var(--caption-10-font-weight); } + +.sidebar-runtime-item__message:first-of-type { + margin-block-start: calc(var(--base-unit) * -1); +} diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.js b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.js index 8d16b191f23a..199c85859b28 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.js +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarRuntimeItem.js @@ -71,8 +71,7 @@ class SidebarRuntimeItem extends PureComponent { return Message( { level, - key: className, - className, + className: `${className} sidebar-runtime-item__message`, }, Localized( { @@ -159,29 +158,25 @@ class SidebarRuntimeItem extends PureComponent { getString("aboutdebugging-sidebar-runtime-connection-status-connected") : getString("aboutdebugging-sidebar-runtime-connection-status-disconnected"); - return [ - SidebarItem( + return SidebarItem( + { + isSelected, + to: isConnected ? `/runtime/${encodeURIComponent(runtimeId)}` : null, + }, + dom.section( { - className: "sidebar-item--tall", - key: "sidebar-item", - isSelected, - to: isConnected ? `/runtime/${encodeURIComponent(runtimeId)}` : null, + className: "sidebar-runtime-item__container", }, - dom.section( + dom.img( { - className: "sidebar-runtime-item__container", - }, - dom.img( - { - className: "sidebar-runtime-item__icon ", - src: icon, - alt: connectionStatus, - title: connectionStatus, - } - ), - this.renderName(), - !isUnavailable && !isConnected ? this.renderConnectButton() : null + className: "sidebar-runtime-item__icon ", + src: icon, + alt: connectionStatus, + title: connectionStatus, + } ), + this.renderName(), + !isUnavailable && !isConnected ? this.renderConnectButton() : null ), this.renderMessage( isConnectionFailed, @@ -201,7 +196,7 @@ class SidebarRuntimeItem extends PureComponent { "about-debugging-sidebar-item-connect-button-connection-not-responding", "qa-connection-not-responding" ), - ]; + ); } } From ef57a8c3112f999917bb3a27463d666f03f94789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Thu, 25 Apr 2019 10:15:34 +0000 Subject: [PATCH 07/60] Bug 1505126: Part 2 - Render the ADB status into a new component, with an icon r=jdescottes,daisuke,Ola Differential Revision: https://phabricator.services.mozilla.com/D28664 --HG-- extra : moz-landing-system : lando --- .../aboutdebugging-new/aboutdebugging.css | 1 + .../client/aboutdebugging-new/src/base.css | 3 +- .../src/components/shared/IconLabel.css | 23 ++++++++++ .../src/components/shared/IconLabel.js | 46 +++++++++++++++++++ .../src/components/shared/moz.build | 2 + .../src/components/sidebar/Sidebar.js | 27 ++++++----- .../src/components/sidebar/SidebarItem.css | 5 -- .../aboutdebugging-new/src/constants.js | 6 +++ .../browser_aboutdebugging_message_close.js | 46 +++++++++++++------ 9 files changed, 125 insertions(+), 34 deletions(-) create mode 100644 devtools/client/aboutdebugging-new/src/components/shared/IconLabel.css create mode 100644 devtools/client/aboutdebugging-new/src/components/shared/IconLabel.js diff --git a/devtools/client/aboutdebugging-new/aboutdebugging.css b/devtools/client/aboutdebugging-new/aboutdebugging.css index 34676d6b3aee..57739918c010 100644 --- a/devtools/client/aboutdebugging-new/aboutdebugging.css +++ b/devtools/client/aboutdebugging-new/aboutdebugging.css @@ -26,6 +26,7 @@ @import "resource://devtools/client/aboutdebugging-new/src/components/debugtarget/FieldPair.css"; @import "resource://devtools/client/aboutdebugging-new/src/components/debugtarget/ServiceWorkerAction.css"; @import "resource://devtools/client/aboutdebugging-new/src/components/debugtarget/TemporaryExtensionInstallSection.css"; +@import "resource://devtools/client/aboutdebugging-new/src/components/shared/IconLabel.css"; @import "resource://devtools/client/aboutdebugging-new/src/components/shared/Message.css"; @import "resource://devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css"; @import "resource://devtools/client/aboutdebugging-new/src/components/sidebar/SidebarFixedItem.css"; diff --git a/devtools/client/aboutdebugging-new/src/base.css b/devtools/client/aboutdebugging-new/src/base.css index dc5f2473a868..8ab0882fdc86 100644 --- a/devtools/client/aboutdebugging-new/src/base.css +++ b/devtools/client/aboutdebugging-new/src/base.css @@ -80,7 +80,8 @@ --base-font-size: var(--body-10-font-size); --base-font-weight: var(--body-10-font-weight); --base-line-height: 1.8; - --message-font-size: 13px; /* Body 10 in Photon - https://design.firefox.com/photon/visuals/typography.html */ + --icon-label-font-size: var(--body-10-font-size); + --message-font-size: var(--body-10-font-size); --button-font-size: var(--base-font-size); --micro-font-size: 11px; --monospace-font-family: monospace; diff --git a/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.css b/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.css new file mode 100644 index 000000000000..a8ba6ab0229f --- /dev/null +++ b/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.css @@ -0,0 +1,23 @@ +.icon-label { + display: flex; + column-gap: var(--base-unit); + align-items: center; + margin: calc(var(--base-unit) * 2) 0; + -moz-context-properties: fill; + + font-size: var(--icon-label-font-size); +} + +.icon-label--ok { + --icon-color: var(--green-70); +} +.icon-label--info { + --icon-color: var(--grey-90); +} + +.icon-label__icon { + padding: var(--base-unit); + fill: var(--icon-color); + width: calc(var(--base-unit) * 4); + height: calc(var(--base-unit) * 4); +} diff --git a/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.js b/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.js new file mode 100644 index 000000000000..1d462c5bc0e6 --- /dev/null +++ b/devtools/client/aboutdebugging-new/src/components/shared/IconLabel.js @@ -0,0 +1,46 @@ +/* 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/. */ + +"use strict"; + +const { PureComponent } = require("devtools/client/shared/vendor/react"); +const dom = require("devtools/client/shared/vendor/react-dom-factories"); +const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); + +const { ICON_LABEL_LEVEL } = require("../../constants"); + +const ICONS = { + [ICON_LABEL_LEVEL.INFO]: "chrome://global/skin/icons/info.svg", + [ICON_LABEL_LEVEL.OK]: "chrome://global/skin/icons/check.svg", +}; + +/* This component displays an icon accompanied by some content. It's similar + to a message, but it's not interactive */ +class IconLabel extends PureComponent { + static get propTypes() { + return { + children: PropTypes.node.isRequired, + className: PropTypes.string, + level: PropTypes.oneOf(Object.values(ICON_LABEL_LEVEL)).isRequired, + }; + } + + render() { + const { children, className, level } = this.props; + return dom.span( + { + className: `icon-label icon-label--${level} ${className || ""}`, + }, + dom.img( + { + className: "icon-label__icon", + src: ICONS[level], + } + ), + children, + ); + } +} + +module.exports = IconLabel; diff --git a/devtools/client/aboutdebugging-new/src/components/shared/moz.build b/devtools/client/aboutdebugging-new/src/components/shared/moz.build index e849a81ef423..10083cb0189f 100644 --- a/devtools/client/aboutdebugging-new/src/components/shared/moz.build +++ b/devtools/client/aboutdebugging-new/src/components/shared/moz.build @@ -3,6 +3,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. DevToolsModules( + 'IconLabel.css', + 'IconLabel.js', 'Message.css', 'Message.js', ) diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js index 6a7917a40379..1f2ec3b5c009 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js @@ -11,11 +11,11 @@ const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const FluentReact = require("devtools/client/shared/vendor/fluent-react"); const Localized = createFactory(FluentReact.Localized); -const { MESSAGE_LEVEL, PAGE_TYPES, RUNTIMES } = require("../../constants"); +const { ICON_LABEL_LEVEL, PAGE_TYPES, RUNTIMES } = require("../../constants"); const Types = require("../../types/index"); loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true); -const Message = createFactory(require("../shared/Message")); +const IconLabel = createFactory(require("../shared/IconLabel")); const SidebarItem = createFactory(require("./SidebarItem")); const SidebarFixedItem = createFactory(require("./SidebarFixedItem")); const SidebarRuntimeItem = createFactory(require("./SidebarRuntimeItem")); @@ -45,21 +45,20 @@ class Sidebar extends PureComponent { this.props.adbAddonStatus === ADB_ADDON_STATES.INSTALLED; const localizationId = isUsbEnabled ? "about-debugging-sidebar-usb-enabled" : "about-debugging-sidebar-usb-disabled"; - return Message( + return IconLabel( { - level: MESSAGE_LEVEL.INFO, - isCloseable: true, + level: isUsbEnabled ? ICON_LABEL_LEVEL.OK : ICON_LABEL_LEVEL.INFO, }, - Localized( + Localized( + { + id: localizationId, + }, + dom.span( { - id: localizationId, + className: "js-sidebar-usb-status", }, - dom.div( - { - className: "js-sidebar-usb-status", - }, - localizationId - ) + localizationId + ) ) ); } @@ -207,7 +206,7 @@ class Sidebar extends PureComponent { ), SidebarItem( { - className: "sidebar__adb-status sidebar-item--full-width", + className: "sidebar__adb-status", }, dom.hr({ className: "separator separator--breathe" }), this.renderAdbStatus(), diff --git a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css index f4a7eb22f9b2..9f202a949fdb 100644 --- a/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css +++ b/devtools/client/aboutdebugging-new/src/components/sidebar/SidebarItem.css @@ -25,11 +25,6 @@ height: calc(var(--base-unit) * 9); } -.sidebar-item--full-width { - padding-inline-start: 0; - padding-inline-end: 0; -} - .sidebar-item__link { display: block; height: 100%; diff --git a/devtools/client/aboutdebugging-new/src/constants.js b/devtools/client/aboutdebugging-new/src/constants.js index f147e50963e9..3c3f2aa2079c 100644 --- a/devtools/client/aboutdebugging-new/src/constants.js +++ b/devtools/client/aboutdebugging-new/src/constants.js @@ -84,6 +84,11 @@ const DEBUG_TARGET_PANE = { TEMPORARY_EXTENSION: "temporaryExtension", }; +const ICON_LABEL_LEVEL = { + INFO: "info", + OK: "ok", +}; + const MESSAGE_LEVEL = { ERROR: "error", INFO: "info", @@ -139,6 +144,7 @@ const USB_STATES = { module.exports = Object.assign({}, { DEBUG_TARGETS, DEBUG_TARGET_PANE, + ICON_LABEL_LEVEL, MESSAGE_LEVEL, PAGE_TYPES, PREFERENCES, diff --git a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_message_close.js b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_message_close.js index 9fc21be5d248..d9d87607f202 100644 --- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_message_close.js +++ b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_message_close.js @@ -3,24 +3,42 @@ "use strict"; -/** - * This test asserts that the sidebar shows a message with a closing button describing - * the status of the USB devices debugging. - */ +/* import-globals-from helper-addons.js */ +Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-addons.js", this); + +// Test that Message component can be closed with the X button add_task(async function() { - const { document, tab } = await openAboutDebugging(); + const EXTENSION_NAME = "Temporary web extension"; + const EXTENSION_ID = "test-devtools@mozilla.org"; - const usbStatusElement = document.querySelector(".js-sidebar-usb-status"); - ok(usbStatusElement, "Sidebar shows the USB status element"); - ok(usbStatusElement.textContent.includes("USB disabled"), - "USB status element has the expected content"); + const { document, tab, window } = await openAboutDebugging(); + await selectThisFirefoxPage(document, window.AboutDebugging.store); - const button = document.querySelector(".js-sidebar-item .qa-message-button-close"); + await installTemporaryExtensionFromXPI({ + id: EXTENSION_ID, + name: EXTENSION_NAME, + extraProperties: { + // This property is not expected in the manifest and should trigger a warning! + "wrongProperty": {}, + }, + }, document); + + info("Wait until a debug target item appears"); + await waitUntil(() => findDebugTargetByText(EXTENSION_NAME, document)); + const target = findDebugTargetByText(EXTENSION_NAME, document); + + const warningMessage = target.querySelector(".js-message"); + ok(!!warningMessage, "A warning message is displayed for the installed addon"); + + const button = warningMessage.querySelector(".qa-message-button-close"); + ok(!!button, "The warning message has a close button"); + + info("Closing the message and waiting for it to disappear"); button.click(); + await waitUntil(() => { + return target.querySelector(".js-message") === null; + }); - // new search for element - ok(document.querySelector(".js-sidebar-usb-status") === null, - "USB status element is no longer displayed"); - + await removeTemporaryExtension(EXTENSION_NAME, document); await removeTab(tab); }); From 7b9699da3b3ec1274f871b3f6aafe275cec6bca3 Mon Sep 17 00:00:00 2001 From: Bogdan Tara Date: Thu, 25 Apr 2019 14:15:22 +0300 Subject: [PATCH 08/60] Backed out 2 changesets (bug 1546714) for test_mozbuild_reading.py bustages CLOSED TREE Backed out changeset 02a67f69acd2 (bug 1546714) Backed out changeset c29a7a2c36d6 (bug 1546714) --- remote/moz.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/remote/moz.build b/remote/moz.build index 9b863a6ab9a4..3d0587377101 100644 --- a/remote/moz.build +++ b/remote/moz.build @@ -16,12 +16,10 @@ JAR_MANIFESTS += ["jar.mn"] with Files("**"): BUG_COMPONENT = ("Remote Protocol", "Agent") +with Files("targets/**"): + BUG_COMPONENT = ("Remote Protocol", "Target") with Files("domains/**/Emulation.jsm"): BUG_COMPONENT = ("Remote Protocol", "Emulation") -with Files("domains/**/DOM.jsm"): - BUG_COMPONENT = ("Remote Protocol", "DOM") -with Files("domains/**/Input.jsm"): - BUG_COMPONENT = ("Remote Protocol", "Input") with Files("domains/**/Log.jsm"): BUG_COMPONENT = ("Remote Protocol", "Log") with Files("domains/**/Network.jsm"): From ac0b8d3376f1a375e4f994e7835dcbf606fbd0f7 Mon Sep 17 00:00:00 2001 From: Rob Wood Date: Thu, 25 Apr 2019 11:13:34 +0000 Subject: [PATCH 09/60] Bug 1546704 - Fix subtest names for cold page-load Fenix suites; r=Bebe Differential Revision: https://phabricator.services.mozilla.com/D28708 --HG-- extra : moz-landing-system : lando --- testing/raptor/raptor/tests/raptor-tp6m-cold-1.ini | 8 ++++---- testing/raptor/raptor/tests/raptor-tp6m-cold-10.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-11.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-12.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-13.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-14.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-2.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-3.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-4.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-5.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-6.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-7.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-8.ini | 4 ++-- testing/raptor/raptor/tests/raptor-tp6m-cold-9.ini | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-1.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-1.ini index 111ee123a61e..d8ea3206a871 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-1.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-1.ini @@ -16,28 +16,28 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-cold-amazon-geckoview] +[raptor-tp6m-amazon-geckoview-cold] apps = geckoview test_url = https://www.amazon.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-amazon.manifest playback_recordings = android-amazon.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-cold-facebook-geckoview] +[raptor-tp6m-facebook-geckoview-cold] apps = geckoview test_url = https://m.facebook.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-facebook.manifest playback_recordings = android-facebook.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-cold-amazon-fenix] +[raptor-tp6m-amazon-fenix-cold] apps = fenix test_url = https://www.amazon.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-amazon.manifest playback_recordings = android-amazon.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-cold-facebook-fenix] +[raptor-tp6m-facebook-fenix-cold] apps = fenix test_url = https://m.facebook.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-facebook.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-10.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-10.ini index d4d2d0a5d32f..923a83b1da8f 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-10.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-10.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-bbc-fenix] +[raptor-tp6m-bbc-fenix-cold] apps = fenix test_url = https://www.bbc.com/news/business-47245877 playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-bbc.manifest playback_recordings = mitmproxy-recordings-raptor-tp6m-bbc.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-stackoverflow-fenix] +[raptor-tp6m-stackoverflow-fenix-cold] apps = fenix test_url = https://stackoverflow.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-stackoverflow.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-11.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-11.ini index b518deaaf7c8..cfcdb7e0719b 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-11.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-11.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-microsoft-support-fenix] +[raptor-tp6m-microsoft-support-fenix-cold] apps = fenix test_url = https://support.microsoft.com/en-us playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-microsoft-support.manifest playback_recordings = android-microsoft-support.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-jianshu-fenix] +[raptor-tp6m-jianshu-fenix-cold] apps = fenix test_url = https://www.jianshu.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-jianshu.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-12.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-12.ini index d4907cfcaf7e..0e2c14775f77 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-12.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-12.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-imdb-fenix] +[raptor-tp6m-imdb-fenix-cold] apps = fenix test_url = https://m.imdb.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-imdb.manifest playback_recordings = android-imdb.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-allrecipes-fenix] +[raptor-tp6m-allrecipes-fenix-cold] apps = fenix test_url = https://www.allrecipes.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-allrecipes.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-13.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-13.ini index 19bbe6b7b2d2..39c9fe0d3ca1 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-13.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-13.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-espn-fenix] +[raptor-tp6m-espn-fenix-cold] apps = fenix test_url = http://www.espn.com/nba/story/_/page/allstarweekend25788027/the-comparison-lebron-james-michael-jordan-their-own-words playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-espn.manifest playback_recordings = android-espn.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-web-de-fenix] +[raptor-tp6m-web-de-fenix-cold] apps = fenix test_url = https://web.de/magazine/politik/politologe-glaubt-grossen-koalition-herbst-knallen-33563566 playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-web-de.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-14.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-14.ini index 81e2aa2dc020..e61597965372 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-14.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-14.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-facebook-cristiano-fenix] +[raptor-tp6m-facebook-cristiano-fenix-cold] apps = fenix test_url = https://m.facebook.com/Cristiano playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-facebook-cristiano.manifest playback_recordings = android-facebook-cristiano.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-aframeio-animation-fenix] +[raptor-tp6m-aframeio-animation-fenix-cold] apps = fenix test_url = https://aframe.io/examples/showcase/animation playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-aframeio-animation.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-2.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-2.ini index 4acb38099a9e..977bc70e07bc 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-2.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-2.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-google-fenix] +[raptor-tp6m-google-fenix-cold] apps = fenix test_url = https://www.google.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-google.manifest playback_recordings = android-google.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-youtube-fenix] +[raptor-tp6m-youtube-fenix-cold] apps = fenix test_url = https://www.youtube.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-youtube.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-3.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-3.ini index e7206a61f2a8..20707d22631f 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-3.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-3.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-instagram-fenix] +[raptor-tp6m-instagram-fenix-cold] apps = fenix test_url = https://www.instagram.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-instagram-mobile.manifest playback_recordings = instagram-mobile.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-bing-fenix] +[raptor-tp6m-bing-fenix-cold] apps = fenix test_url = https://www.bing.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-bing-mobile.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-4.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-4.ini index 2740e16ffe8e..acabb802911d 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-4.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-4.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-bing-restaurants-fenix] +[raptor-tp6m-bing-restaurants-fenix-cold] apps = fenix test_url = https://www.bing.com/search?q=restaurants playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-bing-restaurants-mobile.manifest playback_recordings = bing-restaurants-mobile.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-ebay-kleinanzeigen-fenix] +[raptor-tp6m-ebay-kleinanzeigen-fenix-cold] apps = fenix test_url = https://m.ebay-kleinanzeigen.de playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-ebay-kleinanzeigen-mobile.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-5.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-5.ini index 7962596d8976..d357ad4178d5 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-5.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-5.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-ebay-kleinanzeigen-search-fenix] +[raptor-tp6m-ebay-kleinanzeigen-search-fenix-cold] apps = fenix test_url = https://m.ebay-kleinanzeigen.de/s-anzeigen/auf-zeit-wg-berlin/zimmer/c199-l3331 playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-ebay-kleinanzeigen-search-mobile.manifest playback_recordings = ebay-kleinanzeigen-search-mobile.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-google-maps-fenix] +[raptor-tp6m-google-maps-fenix-cold] apps = fenix test_url = https://www.google.com/maps?force=pwa playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-google-maps.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-6.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-6.ini index 941ce481ff92..57e373f4b321 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-6.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-6.ini @@ -16,7 +16,7 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-google-restaurants-fenix] +[raptor-tp6m-google-restaurants-fenix-cold] apps = fenix test_url = https://www.google.com/search?q=restaurants+near+me playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-google-restaurants.manifest @@ -24,7 +24,7 @@ playback_recordings = google-search-restaurants-mobile.mp measure = fnbpaint, fcp, dcf, loadtime disabled = Bug 1533283 Intermittent timeouts running raptor-tp6m-google-restaurants-geckoview -[raptor-tp6m-amazon-search-fenix] +[raptor-tp6m-amazon-search-fenix-cold] apps = fenix test_url = https://www.amazon.com/s/ref=nb_sb_noss_2/139-6317191-5622045?url=search-alias%3Daps&field-keywords=mobile+phone playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-amazon-search.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-7.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-7.ini index 2f34e68d87f9..86c866f622fe 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-7.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-7.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-wikipedia-fenix] +[raptor-tp6m-wikipedia-fenix-cold] apps = fenix test_url = https://en.m.wikipedia.org/wiki/Main_Page playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-wikipedia.manifest playback_recordings = android-wikipedia.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-youtube-watch-fenix] +[raptor-tp6m-youtube-watch-fenix-cold] apps = fenix test_url = https://www.youtube.com/watch?v=COU5T-Wafa4 playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-youtube-watch.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-8.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-8.ini index a2345263c8f5..0b829785fdc1 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-8.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-8.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-booking-fenix] +[raptor-tp6m-booking-fenix-cold] apps = fenix test_url = https://www.booking.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-booking.manifest playback_recordings = android-booking.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-cnn-fenix] +[raptor-tp6m-cnn-fenix-cold] apps = fenix test_url = https://edition.cnn.com/ playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-cnn.manifest diff --git a/testing/raptor/raptor/tests/raptor-tp6m-cold-9.ini b/testing/raptor/raptor/tests/raptor-tp6m-cold-9.ini index b1a2bec79983..dc5c16662681 100644 --- a/testing/raptor/raptor/tests/raptor-tp6m-cold-9.ini +++ b/testing/raptor/raptor/tests/raptor-tp6m-cold-9.ini @@ -16,14 +16,14 @@ page_timeout = 60000 alert_on = fcp, loadtime cold = true -[raptor-tp6m-cnn-ampstories-fenix] +[raptor-tp6m-cnn-ampstories-fenix-cold] apps = fenix test_url = https://edition.cnn.com/ampstories/us/why-hurricane-michael-is-a-monster-unlike-any-other playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-cnn-ampstories.manifest playback_recordings = android-cnn-ampstories.mp measure = fnbpaint, fcp, dcf, loadtime -[raptor-tp6m-reddit-fenix] +[raptor-tp6m-reddit-fenix-cold] apps = fenix test_url = https://www.reddit.com playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-reddit.manifest From 1fb3560061718ed92248f69f364eec5e7dc1f4fd Mon Sep 17 00:00:00 2001 From: sotaro Date: Thu, 25 Apr 2019 10:17:16 +0000 Subject: [PATCH 10/60] Bug 1546901 - Call gfxVars::SetProfDirectory() before gfxPlatform::InitLayersIPC() r=nical When GPU process does not exist, Render thread is created by gfxPlatform::InitLayersIPC(). Then gfxVars::SetProfDirectory() is called after RenderThread::InitDeviceTask(). Then WebRenderProgramCache could not get correct gfxVars::ProfDirectory() value. It affects to webrender shader disk cache. Differential Revision: https://phabricator.services.mozilla.com/D28793 --HG-- extra : moz-landing-system : lando --- gfx/thebes/gfxPlatform.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index dbd95a031ce0..587249139e09 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -855,6 +855,19 @@ void gfxPlatform::Init() { if (XRE_IsParentProcess()) { WrRolloutPrefShutdownSaver::AddShutdownObserver(); + + nsCOMPtr profDir; + nsresult rv = NS_GetSpecialDirectory(NS_APP_PROFILE_DIR_STARTUP, + getter_AddRefs(profDir)); + if (NS_FAILED(rv)) { + gfxVars::SetProfDirectory(nsString()); + } else { + nsAutoString path; + profDir->GetPath(path); + gfxVars::SetProfDirectory(nsString(path)); + } + + gfxUtils::RemoveShaderCacheFromDiskIfNecessary(); } // Drop a note in the crash report if we end up forcing an option that could @@ -1048,19 +1061,6 @@ void gfxPlatform::Init() { Preferences::SetBool(FONT_VARIATIONS_PREF, false); Preferences::Lock(FONT_VARIATIONS_PREF); } - - nsCOMPtr profDir; - rv = NS_GetSpecialDirectory(NS_APP_PROFILE_DIR_STARTUP, - getter_AddRefs(profDir)); - if (NS_FAILED(rv)) { - gfxVars::SetProfDirectory(nsString()); - } else { - nsAutoString path; - profDir->GetPath(path); - gfxVars::SetProfDirectory(nsString(path)); - } - - gfxUtils::RemoveShaderCacheFromDiskIfNecessary(); } nsCOMPtr obs = services::GetObserverService(); From b0e5ec67f323ed1378a909630720489153675d54 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 25 Apr 2019 11:44:44 +0000 Subject: [PATCH 11/60] Bug 1423598 - [Wayland] Use gdk_window_move_to_rect() to place popup windows, r=ashie Differential Revision: https://phabricator.services.mozilla.com/D22962 --HG-- extra : moz-landing-system : lando --- widget/gtk/nsWindow.cpp | 190 +++++++++++++++++++++++++++++++++------- widget/gtk/nsWindow.h | 6 ++ 2 files changed, 162 insertions(+), 34 deletions(-) diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 38f86c42304e..16bc777d7ef7 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -157,6 +157,20 @@ const gint kEvents = #endif GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK; +#if !GTK_CHECK_VERSION(3, 22, 0) +typedef enum { + GDK_ANCHOR_FLIP_X = 1 << 0, + GDK_ANCHOR_FLIP_Y = 1 << 1, + GDK_ANCHOR_SLIDE_X = 1 << 2, + GDK_ANCHOR_SLIDE_Y = 1 << 3, + GDK_ANCHOR_RESIZE_X = 1 << 4, + GDK_ANCHOR_RESIZE_Y = 1 << 5, + GDK_ANCHOR_FLIP = GDK_ANCHOR_FLIP_X | GDK_ANCHOR_FLIP_Y, + GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, + GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y +} GdkAnchorHints; +#endif + /* utility functions */ static bool is_mouse_in_window(GdkWindow *aWindow, gdouble aMouseX, gdouble aMouseY); @@ -1114,10 +1128,93 @@ void nsWindow::Move(double aX, double aY) { NotifyRollupGeometryChange(); } +bool nsWindow::IsWaylandPopup() { + return !mIsX11Display && mIsTopLevel && mWindowType == eWindowType_popup; +} + +#ifdef DEBUG +static void NativeMoveResizeWaylandPopupCallback( + GdkWindow *window, const GdkRectangle *flipped_rect, + const GdkRectangle *final_rect, gboolean flipped_x, gboolean flipped_y, + void *unused) { + LOG(("%s flipped %d %d\n", __FUNCTION__, flipped_rect->x, flipped_rect->y)); + LOG(("%s final %d %d\n", __FUNCTION__, final_rect->x, final_rect->y)); +} +#endif + +void nsWindow::NativeMoveResizeWaylandPopup(GdkPoint *aPosition, + GdkRectangle *aSize) { + // Available as of GTK 3.24+ + static auto sGdkWindowMoveToRect = (void (*)( + GdkWindow *, const GdkRectangle *, GdkGravity, GdkGravity, GdkAnchorHints, + gint, gint))dlsym(RTLD_DEFAULT, "gdk_window_move_to_rect"); + + if (aSize) { + gtk_window_resize(GTK_WINDOW(mShell), aSize->width, aSize->height); + } + + GdkWindow *gdkWindow = gtk_widget_get_window(GTK_WIDGET(mShell)); + // gdk_window_move_to_rect() is not available, we don't have a valid GdkWindow + // (we're not realized yet) - try plain gtk_window_move() at least. + if (!sGdkWindowMoveToRect || !gdkWindow) { + gtk_window_move(GTK_WINDOW(mShell), aPosition->x, aPosition->y); + return; + } + + GtkWindow *parentWindow = GetPopupParentWindow(); + if (parentWindow) { + gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); + } else { + parentWindow = gtk_window_get_transient_for(GTK_WINDOW(mShell)); + } + + LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] Set popup parent %p\n", + (void *)this, parentWindow)); + + int x_parent, y_parent; + gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(parentWindow)), + &x_parent, &y_parent); + + GdkRectangle rect = {aPosition->x - x_parent, aPosition->y - y_parent, 1, 1}; + if (aSize) { + rect.width = aSize->width; + rect.height = aSize->height; + } + + LOG(("%s [%p] request position %d,%d\n", __FUNCTION__, (void *)this, + aPosition->x, aPosition->y)); + if (aSize) { + LOG((" request size %d,%d\n", aSize->width, aSize->height)); + } + LOG((" request result %d %d\n", rect.x, rect.y)); +#ifdef DEBUG + g_signal_connect(gdkWindow, "moved-to-rect", + G_CALLBACK(NativeMoveResizeWaylandPopupCallback), this); +#endif + + GdkGravity rectAnchor = GDK_GRAVITY_NORTH_WEST; + GdkGravity menuAnchor = GDK_GRAVITY_NORTH_WEST; + if (GetTextDirection() == GTK_TEXT_DIR_RTL) { + rectAnchor = GDK_GRAVITY_NORTH_EAST; + menuAnchor = GDK_GRAVITY_NORTH_EAST; + } + + GdkAnchorHints hints = GdkAnchorHints(GDK_ANCHOR_SLIDE | GDK_ANCHOR_FLIP); + if (aSize) { + hints = GdkAnchorHints(hints | GDK_ANCHOR_RESIZE); + } + + sGdkWindowMoveToRect(gdkWindow, &rect, rectAnchor, menuAnchor, hints, 0, 0); +} + void nsWindow::NativeMove() { GdkPoint point = DevicePixelsToGdkPointRoundDown(mBounds.TopLeft()); - if (mIsTopLevel) { + LOG(("nsWindow::NativeMove [%p] %d %d\n", (void *)this, point.x, point.y)); + + if (IsWaylandPopup()) { + NativeMoveResizeWaylandPopup(&point, nullptr); + } else if (mIsTopLevel) { gtk_window_move(GTK_WINDOW(mShell), point.x, point.y); } else if (mGdkWindow) { gdk_window_move(mGdkWindow, point.x, point.y); @@ -3408,11 +3505,6 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } else if (mWindowType == eWindowType_popup) { - // With popup windows, we want to control their position, so don't - // wait for the window manager to place them (which wouldn't - // happen with override-redirect windows anyway). - NativeMove(); - gtk_window_set_wmclass(GTK_WINDOW(mShell), "Popup", gdk_get_program_class()); @@ -3465,8 +3557,18 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, gtk_window_set_type_hint(GTK_WINDOW(mShell), gtkTypeHint); if (topLevelParent) { + LOG(("nsWindow::Create [%p] Set popup parent %p\n", (void *)this, + topLevelParent)); gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); } + + // We need realized mShell at NativeMove(). + gtk_widget_realize(mShell); + + // With popup windows, we want to control their position, so don't + // wait for the window manager to place them (which wouldn't + // happen with override-redirect windows anyway). + NativeMove(); } else { // must be eWindowType_toplevel SetDefaultIcon(); gtk_window_set_wmclass(GTK_WINDOW(mShell), "Toplevel", @@ -3910,23 +4012,27 @@ void nsWindow::NativeMoveResize() { LOG(("nsWindow::NativeMoveResize [%p] %d %d %d %d\n", (void *)this, topLeft.x, topLeft.y, size.width, size.height)); - if (mIsTopLevel) { - // x and y give the position of the window manager frame top-left. - gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); - // This sets the client window size. - MOZ_ASSERT(size.width > 0 && size.height > 0, - "Can't resize window smaller than 1x1."); - gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); - } else if (mContainer) { - GtkAllocation allocation; - allocation.x = topLeft.x; - allocation.y = topLeft.y; - allocation.width = size.width; - allocation.height = size.height; - gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); - } else if (mGdkWindow) { - gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, - size.height); + if (IsWaylandPopup()) { + NativeMoveResizeWaylandPopup(&topLeft, &size); + } else { + if (mIsTopLevel) { + // x and y give the position of the window manager frame top-left. + gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); + // This sets the client window size. + MOZ_ASSERT(size.width > 0 && size.height > 0, + "Can't resize window smaller than 1x1."); + gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); + } else if (mContainer) { + GtkAllocation allocation; + allocation.x = topLeft.x; + allocation.y = topLeft.y; + allocation.width = size.width; + allocation.height = size.height; + gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); + } else if (mGdkWindow) { + gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, + size.height); + } } #ifdef MOZ_X11 @@ -3954,9 +4060,11 @@ void nsWindow::NativeShow(bool aAction) { SetUserTimeAndStartupIDForActivatedWindow(mShell); } // Update popup window hierarchy run-time on Wayland. - if (!mIsX11Display && mWindowType == eWindowType_popup) { + if (IsWaylandPopup()) { GtkWindow *parentWindow = GetPopupParentWindow(); if (parentWindow) { + LOG(("nsWindow::NativeShow [%p] Set popup parent %p\n", (void *)this, + parentWindow)); gtk_window_set_transient_for(GTK_WINDOW(mShell), parentWindow); } } @@ -5444,9 +5552,9 @@ static gboolean key_press_event_cb(GtkWidget *widget, GdkEventKey *event) { // are generated only when the key is physically released. # define NS_GDKEVENT_MATCH_MASK 0x1FFF // GDK_SHIFT_MASK .. GDK_BUTTON5_MASK // Our headers undefine X11 KeyPress - let's redefine it here. -#ifndef KeyPress - #define KeyPress 2 -#endif +# ifndef KeyPress +# define KeyPress 2 +# endif GdkDisplay *gdkDisplay = gtk_widget_get_display(widget); if (GDK_IS_X11_DISPLAY(gdkDisplay)) { Display *dpy = GDK_DISPLAY_XDISPLAY(gdkDisplay); @@ -6819,18 +6927,32 @@ void nsWindow::ForceTitlebarRedraw(void) { } } -GtkWindow* nsWindow::GetPopupParentWindow() -{ - nsView* view = nsView::GetViewFor(this); +GtkWindow *nsWindow::GetPopupParentWindow() { + nsView *view = nsView::GetViewFor(this); if (!view) { return nullptr; } - nsIFrame* frame = view->GetFrame(); + nsIFrame *frame = view->GetFrame(); if (!frame) { return nullptr; } - nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(frame); - nsWindow* window = - static_cast(menuPopupFrame->GetParentMenuWidget()); + nsMenuPopupFrame *menuPopupFrame = do_QueryFrame(frame); + nsWindow *window = + static_cast(menuPopupFrame->GetParentMenuWidget()); return window ? GTK_WINDOW(window->GetGtkWidget()) : nullptr; } + +GtkTextDirection nsWindow::GetTextDirection() { + nsView *view = nsView::GetViewFor(this); + if (!view) { + return GTK_TEXT_DIR_LTR; + } + nsIFrame *frame = view->GetFrame(); + if (!frame) { + return GTK_TEXT_DIR_LTR; + } + + WritingMode wm = frame->GetWritingMode(); + bool isFrameRTL = !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR()); + return isFrameRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; +} diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h index 8062bc618609..8736ad4b91e7 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -460,6 +460,10 @@ class nsWindow final : public nsBaseWidget { nsWindow* GetTransientForWindowIfPopup(); bool IsHandlingTouchSequence(GdkEventSequence* aSequence); + void NativeMoveResizeWaylandPopup(GdkPoint* aPosition, GdkRectangle* aSize); + + GtkTextDirection GetTextDirection(); + #ifdef MOZ_X11 typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, GTK_WIDGET_COMPOSIDED_DISABLED = 1, @@ -608,6 +612,8 @@ class nsWindow final : public nsBaseWidget { // This is used by Wayland backend to keep strict popup window hierarchy. GtkWindow* GetPopupParentWindow(); + bool IsWaylandPopup(); + /** * |mIMContext| takes all IME related stuff. * From 074dccfbbad7ea6fad06a2453f8902b196bf8740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 19 Apr 2019 16:30:00 +0200 Subject: [PATCH 12/60] Bug 1545699 - Don't sync-reload chrome:// user-agent stylesheets from nsChromeRegistry. r=bzbarsky We assume in a bunch of other places that user agent stylesheets don't really change dynamically. It's not clear to me what this code is trying to accomplish or how is it supposed to work in a multi-process world, but I've left the author stylesheets code for now... Also, I'm pretty sure the styleset doesn't handle null sheets, so add a null-check to the author stylesheets. Differential Revision: https://phabricator.services.mozilla.com/D28211 --- chrome/nsChromeRegistry.cpp | 42 ++++++------------------------------- dom/base/Document.cpp | 9 ++++---- dom/base/Document.h | 15 +++++-------- 3 files changed, 15 insertions(+), 51 deletions(-) diff --git a/chrome/nsChromeRegistry.cpp b/chrome/nsChromeRegistry.cpp index 0eb645cbaab3..1c48c05fe577 100644 --- a/chrome/nsChromeRegistry.cpp +++ b/chrome/nsChromeRegistry.cpp @@ -339,42 +339,10 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) { RefreshWindow(piWindow); } - nsresult rv; // Get the document. RefPtr document = aWindow->GetDoc(); if (!document) return NS_OK; - // Deal with the agent sheets first. Have to do all the style sets by hand. - RefPtr presShell = document->GetPresShell(); - if (presShell) { - // Reload only the chrome URL agent style sheets. - nsTArray> agentSheets; - rv = presShell->GetAgentStyleSheets(agentSheets); - NS_ENSURE_SUCCESS(rv, rv); - - nsTArray> newAgentSheets; - for (StyleSheet* sheet : agentSheets) { - nsIURI* uri = sheet->GetSheetURI(); - - if (IsChromeURI(uri)) { - // Reload the sheet. - RefPtr newSheet; - rv = document->LoadChromeSheetSync(uri, true, &newSheet); - if (NS_FAILED(rv)) return rv; - if (newSheet) { - newAgentSheets.AppendElement(newSheet); - return NS_OK; - } - } else { // Just use the same sheet. - rv = newAgentSheets.AppendElement(sheet) ? NS_OK : NS_ERROR_FAILURE; - if (NS_FAILED(rv)) return rv; - } - } - - rv = presShell->SetAgentStyleSheets(newAgentSheets); - NS_ENSURE_SUCCESS(rv, rv); - } - size_t count = document->SheetCount(); // Build an array of style sheets we need to reload. @@ -389,6 +357,9 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) { // Iterate over our old sheets and kick off a sync load of the new // sheet if and only if it's a non-inline sheet with a chrome URL. + // + // FIXME(emilio): What about user sheets? Also, does this do anything useful + // anymore? for (StyleSheet* sheet : oldSheets) { MOZ_ASSERT(sheet, "SheetAt shouldn't return nullptr for " @@ -397,12 +368,11 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) { if (!sheet->IsInline() && IsChromeURI(uri)) { // Reload the sheet. - RefPtr newSheet; // XXX what about chrome sheets that have a title or are disabled? This // only works by sheer dumb luck. - document->LoadChromeSheetSync(uri, false, &newSheet); - // Even if it's null, we put in in there. - newSheets.AppendElement(newSheet); + if (RefPtr newSheet = document->LoadChromeSheetSync(uri)) { + newSheets.AppendElement(newSheet); + } } else { // Just use the same sheet. newSheets.AppendElement(sheet); diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index d7f078b0f042..57f7ca966d21 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -8747,11 +8747,10 @@ void Document::PreloadStyle( aReferrerPolicy, aIntegrity); } -nsresult Document::LoadChromeSheetSync(nsIURI* uri, bool isAgentSheet, - RefPtr* aSheet) { - css::SheetParsingMode mode = - isAgentSheet ? css::eAgentSheetFeatures : css::eAuthorSheetFeatures; - return CSSLoader()->LoadSheetSync(uri, mode, isAgentSheet, aSheet); +RefPtr Document::LoadChromeSheetSync(nsIURI* uri) { + RefPtr sheet; + CSSLoader()->LoadSheetSync(uri, css::eAuthorSheetFeatures, false, &sheet); + return sheet; } void Document::ResetDocumentDirection() { diff --git a/dom/base/Document.h b/dom/base/Document.h index 67d682806075..a26e559ae2b0 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -2853,9 +2853,8 @@ class Document : public nsINode, void ForgetImagePreload(nsIURI* aURI); /** - * Called by nsParser to preload style sheets. Can also be merged into the - * parser if and when the parser is merged with libgklayout. aCrossOriginAttr - * should be a void string if the attr is not present. + * Called by nsParser to preload style sheets. aCrossOriginAttr should be a + * void string if the attr is not present. */ void PreloadStyle(nsIURI* aURI, const Encoding* aEncoding, const nsAString& aCrossOriginAttr, @@ -2863,15 +2862,11 @@ class Document : public nsINode, const nsAString& aIntegrity); /** - * Called by the chrome registry to load style sheets. Can be put - * back there if and when when that module is merged with libgklayout. + * Called by the chrome registry to load style sheets. * - * This always does a synchronous load. If aIsAgentSheet is true, - * it also uses the system principal and enables unsafe rules. - * DO NOT USE FOR UNTRUSTED CONTENT. + * This always does a synchronous load, and parses as a normal document sheet. */ - nsresult LoadChromeSheetSync(nsIURI* aURI, bool aIsAgentSheet, - RefPtr* aSheet); + RefPtr LoadChromeSheetSync(nsIURI* aURI); /** * Returns true if the locale used for the document specifies a direction of From 1c3126eaaa019e810e655c0148c0cc40eb59e2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 19 Apr 2019 16:34:36 +0200 Subject: [PATCH 13/60] Bug 1545699 - Track editor stylesheets better. r=masayuki Replacing the whole set of user-agent stylesheets seems a bit overkill. Differential Revision: https://phabricator.services.mozilla.com/D28212 --- dom/base/Document.cpp | 50 ++++++++++++++++++++++++++++++++++ dom/base/Document.h | 9 ++++++ dom/html/nsHTMLDocument.cpp | 49 ++++----------------------------- layout/base/PresShell.cpp | 22 --------------- layout/base/PresShell.h | 8 ++---- layout/base/nsIPresShell.h | 12 -------- layout/style/ServoStyleSet.cpp | 22 --------------- layout/style/ServoStyleSet.h | 1 - 8 files changed, 66 insertions(+), 107 deletions(-) diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 57f7ca966d21..b70947a3ce32 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -1213,6 +1213,8 @@ Document::Document(const char* aContentType) mNeedsReleaseAfterStackRefCntRelease(false), mStyleSetFilled(false), mQuirkSheetAdded(false), + mContentEditableSheetAdded(false), + mDesignModeSheetAdded(false), mSSApplicableStateNotificationPending(false), mMayHaveTitleElement(false), mDOMLoadingSet(false), @@ -2401,6 +2403,52 @@ void Document::FillStyleSet() { mStyleSetFilled = true; } +void Document::RemoveContentEditableStyleSheets() { + MOZ_ASSERT(IsHTMLOrXHTML()); + + auto* cache = nsLayoutStylesheetCache::Singleton(); + bool changed = false; + if (mDesignModeSheetAdded) { + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + mDesignModeSheetAdded = false; + changed = true; + } + if (mContentEditableSheetAdded) { + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->ContentEditableSheet()); + mContentEditableSheetAdded = false; + changed = true; + } + if (changed) { + MOZ_ASSERT(mStyleSetFilled); + ApplicableStylesChanged(); + } +} + +void Document::AddContentEditableStyleSheetsToStyleSet(bool aDesignMode) { + MOZ_ASSERT(IsHTMLOrXHTML()); + MOZ_DIAGNOSTIC_ASSERT(mStyleSetFilled, "Caller should ensure we're being rendered"); + + auto* cache = nsLayoutStylesheetCache::Singleton(); + bool changed = false; + if (!mContentEditableSheetAdded) { + mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, cache->ContentEditableSheet()); + mContentEditableSheetAdded = true; + changed = true; + } + if (mDesignModeSheetAdded != aDesignMode) { + if (mDesignModeSheetAdded) { + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + } else { + mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + } + mDesignModeSheetAdded = !mDesignModeSheetAdded; + changed = true; + } + if (changed) { + ApplicableStylesChanged(); + } +} + void Document::FillStyleSetDocumentSheets() { MOZ_ASSERT(mStyleSet->SheetCount(StyleOrigin::Author) == 0, "Style set already has document sheets?"); @@ -4008,6 +4056,8 @@ void Document::DeletePresShell() { mStyleSet->ShellDetachedFromDocument(); mStyleSetFilled = false; mQuirkSheetAdded = false; + mContentEditableSheetAdded = false; + mDesignModeSheetAdded = false; } void Document::SetBFCacheEntry(nsIBFCacheEntry* aEntry) { diff --git a/dom/base/Document.h b/dom/base/Document.h index a26e559ae2b0..07aa67ef72cf 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -3825,8 +3825,11 @@ class Document : public nsINode, void CompatibilityModeChanged(); bool NeedsQuirksSheet() const { // SVG documents never load quirk.css. + // FIXME(emilio): Can SVG documents be in quirks mode anyway? return mCompatMode == eCompatibility_NavQuirks && !IsSVGDocument(); } + void AddContentEditableStyleSheetsToStyleSet(bool aDesignMode); + void RemoveContentEditableStyleSheets(); void AddStyleSheetToStyleSets(StyleSheet* aSheet); void RemoveStyleSheetFromStyleSets(StyleSheet* aSheet); void NotifyStyleSheetAdded(StyleSheet* aSheet, bool aDocumentSheet); @@ -4220,6 +4223,12 @@ class Document : public nsINode, // Whether we have a quirks mode stylesheet in the style set. bool mQuirkSheetAdded : 1; + // Whether we have a contenteditable.css stylesheet in the style set. + bool mContentEditableSheetAdded : 1; + + // Whether we have a designmode.css stylesheet in the style set. + bool mDesignModeSheetAdded : 1; + // Keeps track of whether we have a pending // 'style-sheet-applicable-state-changed' notification. bool mSSApplicableStateNotificationPending : 1; diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index 7f1bf56c329d..08bbf65a3de3 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -1712,25 +1712,8 @@ static void NotifyEditableStateChange(nsINode* aNode, Document* aDocument) { void nsHTMLDocument::TearingDownEditor() { if (IsEditingOn()) { - EditingState oldState = mEditingState; mEditingState = eTearingDown; - - RefPtr presShell = GetPresShell(); - if (!presShell) { - return; - } - - nsTArray> agentSheets; - presShell->GetAgentStyleSheets(agentSheets); - - auto cache = nsLayoutStylesheetCache::Singleton(); - - agentSheets.RemoveElement(cache->ContentEditableSheet()); - if (oldState == eDesignMode) - agentSheets.RemoveElement(cache->DesignModeSheet()); - - presShell->SetAgentStyleSheets(agentSheets); - ApplicableStylesChanged(); + RemoveContentEditableStyleSheets(); } } @@ -1864,44 +1847,22 @@ nsresult nsHTMLDocument::EditingStateChanged() { RefPtr presShell = GetPresShell(); NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE); + MOZ_ASSERT(mStyleSetFilled); + // Before making this window editable, we need to modify UA style sheet // because new style may change whether focused element will be focusable // or not. - nsTArray> agentSheets; - rv = presShell->GetAgentStyleSheets(agentSheets); - NS_ENSURE_SUCCESS(rv, rv); - - auto cache = nsLayoutStylesheetCache::Singleton(); - - StyleSheet* contentEditableSheet = cache->ContentEditableSheet(); - - if (!agentSheets.Contains(contentEditableSheet)) { - agentSheets.AppendElement(contentEditableSheet); - } + AddContentEditableStyleSheetsToStyleSet(designMode); // Should we update the editable state of all the nodes in the document? We // need to do this when the designMode value changes, as that overrides // specific states on the elements. + updateState = designMode || oldState == eDesignMode; if (designMode) { // designMode is being turned on (overrides contentEditable). - StyleSheet* designModeSheet = cache->DesignModeSheet(); - if (!agentSheets.Contains(designModeSheet)) { - agentSheets.AppendElement(designModeSheet); - } - - updateState = true; spellRecheckAll = oldState == eContentEditable; - } else if (oldState == eDesignMode) { - // designMode is being turned off (contentEditable is still on). - agentSheets.RemoveElement(cache->DesignModeSheet()); - updateState = true; } - rv = presShell->SetAgentStyleSheets(agentSheets); - NS_ENSURE_SUCCESS(rv, rv); - - ApplicableStylesChanged(); - // Adjust focused element with new style but blur event shouldn't be fired // until mEditingState is modified with newState. nsAutoScriptBlocker scriptBlocker; diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 48a29210bdd4..9cfffaf735bb 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -8825,28 +8825,6 @@ bool PresShell::IsDisplayportSuppressed() { return sDisplayPortSuppressionRespected && mActiveSuppressDisplayport > 0; } -nsresult PresShell::GetAgentStyleSheets(nsTArray>& aSheets) { - aSheets.Clear(); - int32_t sheetCount = StyleSet()->SheetCount(StyleOrigin::UserAgent); - - if (!aSheets.SetCapacity(sheetCount, fallible)) { - return NS_ERROR_OUT_OF_MEMORY; - } - - for (int32_t i = 0; i < sheetCount; ++i) { - StyleSheet* sheet = StyleSet()->SheetAt(StyleOrigin::UserAgent, i); - aSheets.AppendElement(sheet); - } - - return NS_OK; -} - -nsresult PresShell::SetAgentStyleSheets( - const nsTArray>& aSheets) { - StyleSet()->ReplaceSheets(StyleOrigin::UserAgent, aSheets); - return NS_OK; -} - nsresult PresShell::AddOverrideStyleSheet(StyleSheet* aSheet) { StyleSet()->AppendStyleSheet(aSheet->GetOrigin(), aSheet); return NS_OK; diff --git a/layout/base/PresShell.h b/layout/base/PresShell.h index 0eb3b1f96bec..dbe1d89ee4b6 100644 --- a/layout/base/PresShell.h +++ b/layout/base/PresShell.h @@ -115,12 +115,8 @@ class PresShell final : public nsIPresShell, void UnsuppressPainting() override; - nsresult GetAgentStyleSheets(nsTArray>& aSheets) override; - nsresult SetAgentStyleSheets( - const nsTArray>& aSheets) override; - - nsresult AddOverrideStyleSheet(StyleSheet* aSheet) override; - nsresult RemoveOverrideStyleSheet(StyleSheet* aSheet) override; + nsresult AddOverrideStyleSheet(StyleSheet*) override; + nsresult RemoveOverrideStyleSheet(StyleSheet*) override; MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult HandleEventWithTarget( diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index 760cab4378da..2d2171ac66b3 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -871,18 +871,6 @@ class nsIPresShell : public nsStubDocumentObserver { */ virtual void UnsuppressPainting() = 0; - /** - * Get the set of agent style sheets for this presentation - */ - virtual nsresult GetAgentStyleSheets( - nsTArray>& aSheets) = 0; - - /** - * Replace the set of agent style sheets - */ - virtual nsresult SetAgentStyleSheets( - const nsTArray>& aSheets) = 0; - /** * Add an override style sheet for this presentation */ diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 01e1610c8b5d..7a7af0cc6a40 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -584,28 +584,6 @@ void ServoStyleSet::RemoveStyleSheet(StyleOrigin aOrigin, StyleSheet* aSheet) { } } -void ServoStyleSet::ReplaceSheets( - StyleOrigin aOrigin, const nsTArray>& aNewSheets) { - // Gecko uses a two-dimensional array keyed by sheet type, whereas Servo - // stores a flattened list. This makes ReplaceSheets a pretty clunky thing - // to express. If the need ever arises, we can easily make this more efficent, - // probably by aligning the representations better between engines. - - SetStylistStyleSheetsDirty(); - - mStyleRuleMap = nullptr; - - // Remove all the existing sheets first. - for (size_t count = SheetCount(aOrigin); count--;) { - RemoveStyleSheet(aOrigin, SheetAt(aOrigin, count)); - } - - // Add in all the new sheets. - for (auto& sheet : aNewSheets) { - AppendStyleSheet(aOrigin, sheet); - } -} - void ServoStyleSet::InsertStyleSheetBefore(Origin aOrigin, StyleSheet* aNewSheet, StyleSheet* aReferenceSheet) { diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index 70a2be86b276..39b5a72f58dd 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -206,7 +206,6 @@ class ServoStyleSet { // manage the set of style sheets in the style set void AppendStyleSheet(Origin, StyleSheet*); void RemoveStyleSheet(Origin, StyleSheet*); - void ReplaceSheets(Origin, const nsTArray>& aNewSheets); void InsertStyleSheetBefore(Origin, StyleSheet*, StyleSheet* aReferenceSheet); size_t SheetCount(Origin) const; From 3bec30d25f469904270c7d8d771ebe8aa2366f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 19 Apr 2019 17:09:40 +0200 Subject: [PATCH 14/60] Bug 1545699 - Remove a dead Loader::LoadSheet function. r=mats Differential Revision: https://phabricator.services.mozilla.com/D28213 --- layout/style/Loader.cpp | 10 ---------- layout/style/Loader.h | 20 -------------------- 2 files changed, 30 deletions(-) diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 7da46f0a0dd6..3350ab7e8ced 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -2169,16 +2169,6 @@ nsresult Loader::LoadSheet(nsIURI* aURL, SheetParsingMode aParsingMode, aSheet, aObserver); } -nsresult Loader::LoadSheet(nsIURI* aURL, nsIPrincipal* aOriginPrincipal, - nsICSSLoaderObserver* aObserver, - RefPtr* aSheet) { - LOG(("css::Loader::LoadSheet(aURL, aObserver, aSheet) api call")); - MOZ_ASSERT(aSheet, "aSheet is null"); - return InternalLoadNonDocumentSheet(aURL, false, eAuthorSheetFeatures, false, - aOriginPrincipal, nullptr, aSheet, - aObserver); -} - nsresult Loader::LoadSheet(nsIURI* aURL, bool aIsPreload, nsIPrincipal* aOriginPrincipal, const Encoding* aPreloadEncoding, diff --git a/layout/style/Loader.h b/layout/style/Loader.h index 3c1eb3ffabaf..78ca88a2d4ce 100644 --- a/layout/style/Loader.h +++ b/layout/style/Loader.h @@ -340,26 +340,6 @@ class Loader final { bool aUseSystemPrincipal, nsICSSLoaderObserver* aObserver, RefPtr* aSheet); - /** - * Asynchronously load the stylesheet at aURL. If a successful result is - * returned, aObserver is guaranteed to be notified asynchronously once the - * sheet is loaded and marked complete. This method can be used to load - * sheets not associated with a document. This method cannot be used to - * load user or agent sheets. - * - * @param aURL the URL of the sheet to load - * @param aOriginPrincipal the principal to use for security checks. This - * can be null to indicate that these checks should - * be skipped. - * @param aObserver the observer to notify when the load completes. - * Must not be null. - * @param [out] aSheet the sheet to load. Note that the sheet may well - * not be loaded by the time this method returns. - */ - nsresult LoadSheet(nsIURI* aURL, nsIPrincipal* aOriginPrincipal, - nsICSSLoaderObserver* aObserver, - RefPtr* aSheet); - /** * Same as above, to be used when the caller doesn't care about the * not-yet-loaded sheet. From 2b466349613c8663e40e1f433297e5994442eb77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 24 Apr 2019 13:18:50 +0200 Subject: [PATCH 15/60] Bug 1546329 - Remove dead skins code. r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com//D28459 --- .../test/performance/browser_windowopen.js | 1 - chrome/nsChromeRegistry.cpp | 111 ------------------ chrome/nsChromeRegistry.h | 1 - chrome/nsChromeRegistryChrome.cpp | 80 ++----------- chrome/nsChromeRegistryChrome.h | 3 - chrome/nsChromeRegistryContent.cpp | 5 - chrome/nsChromeRegistryContent.h | 1 - chrome/nsIChromeRegistry.idl | 10 -- chrome/nsIToolkitChromeRegistry.idl | 10 -- dom/base/Document.cpp | 50 ++------ dom/base/Document.h | 15 --- dom/xbl/nsBindingManager.cpp | 21 ---- dom/xbl/nsBindingManager.h | 2 - dom/xul/nsXULPrototypeCache.cpp | 27 +---- dom/xul/nsXULPrototypeCache.h | 2 - image/imgLoader.cpp | 4 +- layout/base/PresShell.cpp | 81 ------------- layout/style/nsLayoutStylesheetCache.cpp | 6 - .../tests/chrome/RegisterUnregisterChrome.js | 6 - toolkit/xre/nsAppRunner.cpp | 6 - 20 files changed, 22 insertions(+), 420 deletions(-) diff --git a/browser/base/content/test/performance/browser_windowopen.js b/browser/base/content/test/performance/browser_windowopen.js index 3f0998b3dd34..f7a16dca4beb 100644 --- a/browser/base/content/test/performance/browser_windowopen.js +++ b/browser/base/content/test/performance/browser_windowopen.js @@ -27,7 +27,6 @@ add_task(async function() { // behaviour when opening a new window, even if windows have been // opened in previous tests. Services.obs.notifyObservers(null, "startupcache-invalidate"); - Services.obs.notifyObservers(null, "chrome-flush-skin-caches"); Services.obs.notifyObservers(null, "chrome-flush-caches"); let win = window.openDialog(AppConstants.BROWSER_CHROME_URL, "_blank", diff --git a/chrome/nsChromeRegistry.cpp b/chrome/nsChromeRegistry.cpp index 1c48c05fe577..581643a811dd 100644 --- a/chrome/nsChromeRegistry.cpp +++ b/chrome/nsChromeRegistry.cpp @@ -41,7 +41,6 @@ nsChromeRegistry* nsChromeRegistry::gChromeRegistry; using mozilla::PresShell; using mozilla::StyleSheet; using mozilla::dom::Document; -using mozilla::dom::IsChromeURI; using mozilla::dom::Location; //////////////////////////////////////////////////////////////////////////////// @@ -273,116 +272,6 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURI, nsIURI** aResult) { //////////////////////////////////////////////////////////////////////// -// theme stuff - -static void FlushSkinBindingsForWindow(nsPIDOMWindowOuter* aWindow) { - // Get the document. - RefPtr document = aWindow->GetDoc(); - if (!document) return; - - // Annihilate all XBL bindings. - document->FlushSkinBindings(); -} - -// XXXbsmedberg: move this to nsIWindowMediator -NS_IMETHODIMP nsChromeRegistry::RefreshSkins() { - nsCOMPtr windowMediator( - do_GetService(NS_WINDOWMEDIATOR_CONTRACTID)); - if (!windowMediator) return NS_OK; - - nsCOMPtr windowEnumerator; - windowMediator->GetEnumerator(nullptr, getter_AddRefs(windowEnumerator)); - bool more; - windowEnumerator->HasMoreElements(&more); - while (more) { - nsCOMPtr protoWindow; - windowEnumerator->GetNext(getter_AddRefs(protoWindow)); - if (protoWindow) { - nsCOMPtr domWindow = do_QueryInterface(protoWindow); - if (domWindow) FlushSkinBindingsForWindow(domWindow); - } - windowEnumerator->HasMoreElements(&more); - } - - FlushSkinCaches(); - - windowMediator->GetEnumerator(nullptr, getter_AddRefs(windowEnumerator)); - windowEnumerator->HasMoreElements(&more); - while (more) { - nsCOMPtr protoWindow; - windowEnumerator->GetNext(getter_AddRefs(protoWindow)); - if (protoWindow) { - nsCOMPtr domWindow = do_QueryInterface(protoWindow); - if (domWindow) RefreshWindow(domWindow); - } - windowEnumerator->HasMoreElements(&more); - } - - return NS_OK; -} - -void nsChromeRegistry::FlushSkinCaches() { - nsCOMPtr obsSvc = mozilla::services::GetObserverService(); - NS_ASSERTION(obsSvc, "Couldn't get observer service."); - - obsSvc->NotifyObservers(static_cast(this), - NS_CHROME_FLUSH_SKINS_TOPIC, nullptr); -} - -// XXXbsmedberg: move this to windowmediator -nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) { - // Deal with our subframes first. - nsDOMWindowList* frames = aWindow->GetFrames(); - uint32_t length = frames->GetLength(); - for (uint32_t j = 0; j < length; j++) { - nsCOMPtr piWindow = frames->IndexedGetter(j); - RefreshWindow(piWindow); - } - - // Get the document. - RefPtr document = aWindow->GetDoc(); - if (!document) return NS_OK; - - size_t count = document->SheetCount(); - - // Build an array of style sheets we need to reload. - nsTArray> oldSheets(count); - nsTArray> newSheets(count); - - // Iterate over the style sheets. - for (size_t i = 0; i < count; i++) { - // Get the style sheet - oldSheets.AppendElement(document->SheetAt(i)); - } - - // Iterate over our old sheets and kick off a sync load of the new - // sheet if and only if it's a non-inline sheet with a chrome URL. - // - // FIXME(emilio): What about user sheets? Also, does this do anything useful - // anymore? - for (StyleSheet* sheet : oldSheets) { - MOZ_ASSERT(sheet, - "SheetAt shouldn't return nullptr for " - "in-range sheet indexes"); - nsIURI* uri = sheet->GetSheetURI(); - - if (!sheet->IsInline() && IsChromeURI(uri)) { - // Reload the sheet. - // XXX what about chrome sheets that have a title or are disabled? This - // only works by sheer dumb luck. - if (RefPtr newSheet = document->LoadChromeSheetSync(uri)) { - newSheets.AppendElement(newSheet); - } - } else { - // Just use the same sheet. - newSheets.AppendElement(sheet); - } - } - - // Now notify the document that multiple sheets have been added and removed. - document->UpdateStyleSheets(oldSheets, newSheets); - return NS_OK; -} void nsChromeRegistry::FlushAllCaches() { nsCOMPtr obsSvc = mozilla::services::GetObserverService(); diff --git a/chrome/nsChromeRegistry.h b/chrome/nsChromeRegistry.h index 59b5a8906e7d..e5b124dc20a5 100644 --- a/chrome/nsChromeRegistry.h +++ b/chrome/nsChromeRegistry.h @@ -42,7 +42,6 @@ class nsChromeRegistry : public nsIToolkitChromeRegistry, NS_DECL_ISUPPORTS // nsIXULChromeRegistry methods: - NS_IMETHOD RefreshSkins() override; NS_IMETHOD AllowScriptsForPackage(nsIURI* url, bool* _retval) override; NS_IMETHOD AllowContentToAccess(nsIURI* url, bool* _retval) override; NS_IMETHOD CanLoadURLRemotely(nsIURI* url, bool* _retval) override; diff --git a/chrome/nsChromeRegistryChrome.cpp b/chrome/nsChromeRegistryChrome.cpp index 195b57e42018..a304c35e8eba 100644 --- a/chrome/nsChromeRegistryChrome.cpp +++ b/chrome/nsChromeRegistryChrome.cpp @@ -37,8 +37,8 @@ #include "nsIScriptError.h" #include "nsIXULRuntime.h" -#define SELECTED_SKIN_PREF "general.skins.selectedSkin" #define PACKAGE_OVERRIDE_BRANCH "chrome.override_package." +#define SKIN NS_LITERAL_CSTRING("classic/1.0") using namespace mozilla; using mozilla::dom::ContentParent; @@ -94,33 +94,10 @@ nsresult nsChromeRegistryChrome::Init() { nsresult rv = nsChromeRegistry::Init(); if (NS_FAILED(rv)) return rv; - mSelectedSkin = NS_LITERAL_CSTRING("classic/1.0"); - bool safeMode = false; nsCOMPtr xulrun(do_GetService(XULAPPINFO_SERVICE_CONTRACTID)); if (xulrun) xulrun->GetInSafeMode(&safeMode); - nsCOMPtr prefserv(do_GetService(NS_PREFSERVICE_CONTRACTID)); - nsCOMPtr prefs; - - if (prefserv) { - if (safeMode) { - prefserv->GetDefaultBranch(nullptr, getter_AddRefs(prefs)); - } else { - prefs = do_QueryInterface(prefserv); - } - } - - if (!prefs) { - NS_WARNING("Could not get pref service!"); - } else { - nsAutoCString provider; - rv = prefs->GetCharPref(SELECTED_SKIN_PREF, provider); - if (NS_SUCCEEDED(rv)) mSelectedSkin = provider; - - rv = prefs->AddObserver(SELECTED_SKIN_PREF, this, true); - } - nsCOMPtr obsService = mozilla::services::GetObserverService(); if (obsService) { @@ -131,27 +108,6 @@ nsresult nsChromeRegistryChrome::Init() { return NS_OK; } -NS_IMETHODIMP -nsChromeRegistryChrome::CheckForOSAccessibility() { - int32_t useAccessibilityTheme = - LookAndFeel::GetInt(LookAndFeel::eIntID_UseAccessibilityTheme, 0); - - if (useAccessibilityTheme) { - /* Set the skin to classic and remove pref observers */ - if (!mSelectedSkin.EqualsLiteral("classic/1.0")) { - mSelectedSkin.AssignLiteral("classic/1.0"); - RefreshSkins(); - } - - nsCOMPtr prefs(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (prefs) { - prefs->RemoveObserver(SELECTED_SKIN_PREF, this); - } - } - - return NS_OK; -} - NS_IMETHODIMP nsChromeRegistryChrome::GetLocalesForPackage( const nsACString& aPackage, nsIUTF8StringEnumerator** aResult) { @@ -240,26 +196,7 @@ nsChromeRegistryChrome::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* someData) { nsresult rv = NS_OK; - if (!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic)) { - nsCOMPtr prefs(do_QueryInterface(aSubject)); - NS_ASSERTION(prefs, "Bad observer call!"); - - NS_ConvertUTF16toUTF8 pref(someData); - - if (pref.EqualsLiteral(SELECTED_SKIN_PREF)) { - nsAutoCString provider; - rv = prefs->GetCharPref(pref.get(), provider); - if (NS_FAILED(rv)) { - NS_ERROR("Couldn't get new skin pref!"); - return rv; - } - - mSelectedSkin = provider; - RefreshSkins(); - } else { - NS_ERROR("Unexpected pref!"); - } - } else if (!strcmp("profile-initial-state", aTopic)) { + if (!strcmp("profile-initial-state", aTopic)) { mProfileLoaded = true; } else if (!strcmp("intl:app-locales-changed", aTopic)) { if (mProfileLoaded) { @@ -308,7 +245,7 @@ void nsChromeRegistryChrome::SendRegisteredChrome( for (auto iter = mPackagesHash.Iter(); !iter.Done(); iter.Next()) { ChromePackage chromePackage; ChromePackageFromPackageEntry(iter.Key(), iter.UserData(), &chromePackage, - mSelectedSkin); + SKIN); packages.AppendElement(chromePackage); } @@ -402,7 +339,7 @@ nsIURI* nsChromeRegistryChrome::GetBaseURIFromPackage( LocaleService::GetInstance()->GetAppLocaleAsLangTag(appLocale); return entry->locales.GetBase(appLocale, nsProviderArray::LOCALE); } else if (aProvider.EqualsLiteral("skin")) { - return entry->skins.GetBase(mSelectedSkin, nsProviderArray::ANY); + return entry->skins.GetBase(SKIN, nsProviderArray::ANY); } else if (aProvider.EqualsLiteral("content")) { return entry->baseURI; } @@ -554,8 +491,7 @@ void nsChromeRegistryChrome::ManifestContent(ManifestProcessingContext& cx, if (mDynamicRegistration) { ChromePackage chromePackage; - ChromePackageFromPackageEntry(packageName, entry, &chromePackage, - mSelectedSkin); + ChromePackageFromPackageEntry(packageName, entry, &chromePackage, SKIN); SendManifestEntry(chromePackage); } } @@ -591,8 +527,7 @@ void nsChromeRegistryChrome::ManifestLocale(ManifestProcessingContext& cx, if (mDynamicRegistration) { ChromePackage chromePackage; - ChromePackageFromPackageEntry(packageName, entry, &chromePackage, - mSelectedSkin); + ChromePackageFromPackageEntry(packageName, entry, &chromePackage, SKIN); SendManifestEntry(chromePackage); } @@ -638,8 +573,7 @@ void nsChromeRegistryChrome::ManifestSkin(ManifestProcessingContext& cx, if (mDynamicRegistration) { ChromePackage chromePackage; - ChromePackageFromPackageEntry(packageName, entry, &chromePackage, - mSelectedSkin); + ChromePackageFromPackageEntry(packageName, entry, &chromePackage, SKIN); SendManifestEntry(chromePackage); } } diff --git a/chrome/nsChromeRegistryChrome.h b/chrome/nsChromeRegistryChrome.h index f87ef22fda50..4b69e51926ef 100644 --- a/chrome/nsChromeRegistryChrome.h +++ b/chrome/nsChromeRegistryChrome.h @@ -29,7 +29,6 @@ class nsChromeRegistryChrome : public nsChromeRegistry { nsresult Init() override; NS_IMETHOD CheckForNewChrome() override; - NS_IMETHOD CheckForOSAccessibility() override; NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage, nsIUTF8StringEnumerator** aResult) override; NS_IMETHOD IsLocaleRTL(const nsACString& package, bool* aResult) override; @@ -104,8 +103,6 @@ class nsChromeRegistryChrome : public nsChromeRegistry { bool mProfileLoaded; bool mDynamicRegistration; - nsCString mSelectedSkin; - // Hash of package names ("global") to PackageEntry objects nsClassHashtable mPackagesHash; diff --git a/chrome/nsChromeRegistryContent.cpp b/chrome/nsChromeRegistryContent.cpp index d496fa506328..8d619ffa9558 100644 --- a/chrome/nsChromeRegistryContent.cpp +++ b/chrome/nsChromeRegistryContent.cpp @@ -159,11 +159,6 @@ nsChromeRegistryContent::GetLocalesForPackage( CONTENT_NOT_IMPLEMENTED(); } -NS_IMETHODIMP -nsChromeRegistryContent::CheckForOSAccessibility() { - CONTENT_NOT_IMPLEMENTED(); -} - NS_IMETHODIMP nsChromeRegistryContent::CheckForNewChrome() { CONTENT_NOT_IMPLEMENTED(); } diff --git a/chrome/nsChromeRegistryContent.h b/chrome/nsChromeRegistryContent.h index d10af538a837..6b09633f7a7f 100644 --- a/chrome/nsChromeRegistryContent.h +++ b/chrome/nsChromeRegistryContent.h @@ -26,7 +26,6 @@ class nsChromeRegistryContent : public nsChromeRegistry { NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage, nsIUTF8StringEnumerator** aResult) override; NS_IMETHOD CheckForNewChrome() override; - NS_IMETHOD CheckForOSAccessibility() override; NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) override; NS_IMETHOD IsLocaleRTL(const nsACString& package, bool* aResult) override; diff --git a/chrome/nsIChromeRegistry.idl b/chrome/nsIChromeRegistry.idl index e511acbfe5f0..966a69910f52 100644 --- a/chrome/nsIChromeRegistry.idl +++ b/chrome/nsIChromeRegistry.idl @@ -54,9 +54,6 @@ interface nsIXULChromeRegistry : nsIChromeRegistry // (or may be overridden by intl.uidirection pref) boolean isLocaleRTL(in ACString package); - /* Should be called when skins change. Reloads only stylesheets. */ - void refreshSkins(); - /** * Installable skin XBL is not always granted the same privileges as other * chrome. This asks the chrome registry whether scripts are allowed to be @@ -99,11 +96,4 @@ interface nsIXULChromeRegistry : nsIChromeRegistry #define NS_CHROME_FLUSH_TOPIC \ "chrome-flush-caches" -/** - * Chrome registry will notify various caches that skin files need flushing. - * If "chrome-flush-caches" is notified, this topic will *not* be notified. - */ -#define NS_CHROME_FLUSH_SKINS_TOPIC \ - "chrome-flush-skin-caches" - %} diff --git a/chrome/nsIToolkitChromeRegistry.idl b/chrome/nsIToolkitChromeRegistry.idl index 3a9884517f68..080dd335559e 100644 --- a/chrome/nsIToolkitChromeRegistry.idl +++ b/chrome/nsIToolkitChromeRegistry.idl @@ -11,16 +11,6 @@ interface nsIUTF8StringEnumerator; [scriptable, uuid(8727651c-9530-45a0-b81e-0e0690c30c50)] interface nsIToolkitChromeRegistry : nsIXULChromeRegistry { - /** - * If the OS has a "high-visibility" or "disabled-friendly" theme set, - * we want to force mozilla into the classic theme, which (for the most part - * obeys the system color/font settings. We cannot do this at initialization, - * because it depends on the toolkit (GTK2) being initialized, which is - * not the case in some embedding situations. Embedders have to manually - * call this method during the startup process. - */ - void checkForOSAccessibility(); - /** * Get a list of locales available for the specified package. */ diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index b70947a3ce32..0eacf50d4278 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -2409,12 +2409,14 @@ void Document::RemoveContentEditableStyleSheets() { auto* cache = nsLayoutStylesheetCache::Singleton(); bool changed = false; if (mDesignModeSheetAdded) { - mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, + cache->DesignModeSheet()); mDesignModeSheetAdded = false; changed = true; } if (mContentEditableSheetAdded) { - mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->ContentEditableSheet()); + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, + cache->ContentEditableSheet()); mContentEditableSheetAdded = false; changed = true; } @@ -2426,20 +2428,24 @@ void Document::RemoveContentEditableStyleSheets() { void Document::AddContentEditableStyleSheetsToStyleSet(bool aDesignMode) { MOZ_ASSERT(IsHTMLOrXHTML()); - MOZ_DIAGNOSTIC_ASSERT(mStyleSetFilled, "Caller should ensure we're being rendered"); + MOZ_DIAGNOSTIC_ASSERT(mStyleSetFilled, + "Caller should ensure we're being rendered"); auto* cache = nsLayoutStylesheetCache::Singleton(); bool changed = false; if (!mContentEditableSheetAdded) { - mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, cache->ContentEditableSheet()); + mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, + cache->ContentEditableSheet()); mContentEditableSheetAdded = true; changed = true; } if (mDesignModeSheetAdded != aDesignMode) { if (mDesignModeSheetAdded) { - mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + mStyleSet->RemoveStyleSheet(StyleOrigin::UserAgent, + cache->DesignModeSheet()); } else { - mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, cache->DesignModeSheet()); + mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, + cache->DesignModeSheet()); } mDesignModeSheetAdded = !mDesignModeSheetAdded; changed = true; @@ -4343,36 +4349,6 @@ void Document::RemoveStyleSheet(StyleSheet* aSheet) { sheet->ClearAssociatedDocumentOrShadowRoot(); } -void Document::UpdateStyleSheets(nsTArray>& aOldSheets, - nsTArray>& aNewSheets) { - // XXX Need to set the sheet on the ownernode, if any - MOZ_ASSERT(aOldSheets.Length() == aNewSheets.Length(), - "The lists must be the same length!"); - int32_t count = aOldSheets.Length(); - - RefPtr oldSheet; - int32_t i; - for (i = 0; i < count; ++i) { - oldSheet = aOldSheets[i]; - - // First remove the old sheet. - NS_ASSERTION(oldSheet, "None of the old sheets should be null"); - int32_t oldIndex = mStyleSheets.IndexOf(oldSheet); - RemoveStyleSheet(oldSheet); // This does the right notifications - - // Now put the new one in its place. If it's null, just ignore it. - StyleSheet* newSheet = aNewSheets[i]; - if (newSheet) { - DocumentOrShadowRoot::InsertSheetAt(oldIndex, *newSheet); - if (newSheet->IsApplicable()) { - AddStyleSheetToStyleSets(newSheet); - } - - NotifyStyleSheetAdded(newSheet, true); - } - } -} - void Document::InsertSheetAt(size_t aIndex, StyleSheet& aSheet) { DocumentOrShadowRoot::InsertSheetAt(aIndex, aSheet); @@ -6281,8 +6257,6 @@ already_AddRefed Document::MatchMedia( return result.forget(); } -void Document::FlushSkinBindings() { BindingManager()->FlushSkinBindings(); } - void Document::SetMayStartLayout(bool aMayStartLayout) { mMayStartLayout = aMayStartLayout; if (MayStartLayout()) { diff --git a/dom/base/Document.h b/dom/base/Document.h index 07aa67ef72cf..530f79647c89 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -1660,17 +1660,6 @@ class Document : public nsINode, void InsertSheetAt(size_t aIndex, StyleSheet&); - /** - * Replace the stylesheets in aOldSheets with the stylesheets in - * aNewSheets. The two lists must have equal length, and the sheet - * at positon J in the first list will be replaced by the sheet at - * position J in the second list. Some sheets in the second list - * may be null; if so the corresponding sheets in the first list - * will simply be removed. - */ - void UpdateStyleSheets(nsTArray>& aOldSheets, - nsTArray>& aNewSheets); - /** * Add a stylesheet to the document * @@ -2415,10 +2404,6 @@ class Document : public nsINode, nsAtom* aAttrName, const nsAString& aAttrValue) const; - /** - * See FlushSkinBindings on nsBindingManager - */ - void FlushSkinBindings(); /** * To batch DOMSubtreeModified, document needs to be informed when diff --git a/dom/xbl/nsBindingManager.cpp b/dom/xbl/nsBindingManager.cpp index b93c9fb1a961..e4c15fd2610f 100644 --- a/dom/xbl/nsBindingManager.cpp +++ b/dom/xbl/nsBindingManager.cpp @@ -454,27 +454,6 @@ void nsBindingManager::RemoveLoadingDocListener(nsIURI* aURL) { } } -void nsBindingManager::FlushSkinBindings() { - if (!mBoundContentSet) { - return; - } - - for (auto iter = mBoundContentSet->Iter(); !iter.Done(); iter.Next()) { - nsXBLBinding* binding = iter.Get()->GetKey()->GetXBLBinding(); - - if (binding->MarkedForDeath()) { - continue; - } - - nsAutoCString path; - binding->PrototypeBinding()->DocURI()->GetPathQueryRef(path); - - if (!strncmp(path.get(), "/skin", 5)) { - binding->MarkForDeath(); - } - } -} - // Used below to protect from recurring in QI calls through XPConnect. struct AntiRecursionData { nsIContent* element; diff --git a/dom/xbl/nsBindingManager.h b/dom/xbl/nsBindingManager.h index 549d3e80cdf0..f22b0d9ff7da 100644 --- a/dom/xbl/nsBindingManager.h +++ b/dom/xbl/nsBindingManager.h @@ -111,8 +111,6 @@ class nsBindingManager final : public nsStubMutationObserver { nsIStreamListener* GetLoadingDocListener(nsIURI* aURL); void RemoveLoadingDocListener(nsIURI* aURL); - void FlushSkinBindings(); - nsresult GetBindingImplementation(nsIContent* aContent, REFNSIID aIID, void** aResult); diff --git a/dom/xul/nsXULPrototypeCache.cpp b/dom/xul/nsXULPrototypeCache.cpp index 0ea159cc6891..d32dd96d1804 100644 --- a/dom/xul/nsXULPrototypeCache.cpp +++ b/dom/xul/nsXULPrototypeCache.cpp @@ -90,7 +90,6 @@ nsXULPrototypeCache* nsXULPrototypeCache::GetInstance() { mozilla::services::GetObserverService(); if (obsSvc) { nsXULPrototypeCache* p = sInstance; - obsSvc->AddObserver(p, "chrome-flush-skin-caches", false); obsSvc->AddObserver(p, "chrome-flush-caches", false); obsSvc->AddObserver(p, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false); obsSvc->AddObserver(p, "startupcache-invalidate", false); @@ -104,10 +103,8 @@ nsXULPrototypeCache* nsXULPrototypeCache::GetInstance() { NS_IMETHODIMP nsXULPrototypeCache::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) { - if (!strcmp(aTopic, "chrome-flush-skin-caches")) { - FlushSkinFiles(); - } else if (!strcmp(aTopic, "chrome-flush-caches") || - !strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { + if (!strcmp(aTopic, "chrome-flush-caches") || + !strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { Flush(); } else if (!strcmp(aTopic, "startupcache-invalidate")) { AbortCaching(); @@ -211,26 +208,6 @@ nsresult nsXULPrototypeCache::PutXBLDocumentInfo( return NS_OK; } -void nsXULPrototypeCache::FlushSkinFiles() { - // Flush out skin XBL files from the cache. - for (auto iter = mXBLDocTable.Iter(); !iter.Done(); iter.Next()) { - nsAutoCString str; - iter.Key()->GetPathQueryRef(str); - if (strncmp(str.get(), "/skin", 5) == 0) { - iter.Remove(); - } - } - - // Now flush out our skin stylesheets from the cache. - for (auto iter = mStyleSheetTable.Iter(); !iter.Done(); iter.Next()) { - nsAutoCString str; - iter.Data()->GetSheetURI()->GetPathQueryRef(str); - if (strncmp(str.get(), "/skin", 5) == 0) { - iter.Remove(); - } - } -} - void nsXULPrototypeCache::FlushScripts() { mScriptTable.Clear(); } void nsXULPrototypeCache::Flush() { diff --git a/dom/xul/nsXULPrototypeCache.h b/dom/xul/nsXULPrototypeCache.h index 55063e74f0cb..495623cc9915 100644 --- a/dom/xul/nsXULPrototypeCache.h +++ b/dom/xul/nsXULPrototypeCache.h @@ -114,8 +114,6 @@ class nsXULPrototypeCache : public nsIObserver { static nsXULPrototypeCache* sInstance; - void FlushSkinFiles(); - using StyleSheetTable = nsRefPtrHashtable; using XBLDocTable = nsRefPtrHashtable; diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp index fad9c2b0d5fd..7b34f0395035 100644 --- a/image/imgLoader.cpp +++ b/image/imgLoader.cpp @@ -1269,7 +1269,6 @@ nsresult imgLoader::InitCache() { } os->AddObserver(this, "memory-pressure", false); - os->AddObserver(this, "chrome-flush-skin-caches", false); os->AddObserver(this, "chrome-flush-caches", false); os->AddObserver(this, "last-pb-context-exited", false); os->AddObserver(this, "profile-before-change", false); @@ -1307,8 +1306,7 @@ imgLoader::Observe(nsISupports* aSubject, const char* aTopic, } else if (strcmp(aTopic, "memory-pressure") == 0) { MinimizeCaches(); - } else if (strcmp(aTopic, "chrome-flush-skin-caches") == 0 || - strcmp(aTopic, "chrome-flush-caches") == 0) { + } else if (strcmp(aTopic, "chrome-flush-caches") == 0) { MinimizeCaches(); ClearChromeImageCache(); } else if (strcmp(aTopic, "last-pb-context-exited") == 0) { diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 9cfffaf735bb..42418abc93db 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -997,9 +997,6 @@ void PresShell::Init(Document* aDocument, nsPresContext* aPresContext, { nsCOMPtr os = mozilla::services::GetObserverService(); if (os) { -#ifdef MOZ_XUL - os->AddObserver(this, "chrome-flush-skin-caches", false); -#endif os->AddObserver(this, "memory-pressure", false); os->AddObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC, false); if (XRE_IsParentProcess() && !sProcessInteractable) { @@ -1224,9 +1221,6 @@ void PresShell::Destroy() { { nsCOMPtr os = mozilla::services::GetObserverService(); if (os) { -#ifdef MOZ_XUL - os->RemoveObserver(this, "chrome-flush-skin-caches"); -#endif os->RemoveObserver(this, "memory-pressure"); os->RemoveObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC); if (XRE_IsParentProcess()) { @@ -9411,63 +9405,6 @@ void PresShell::WindowSizeMoveDone() { } } -#ifdef MOZ_XUL -/* - * It's better to add stuff to the |DidSetComputedStyle| method of the - * relevant frames than adding it here. These methods should (ideally, - * anyway) go away. - */ - -// Return value says whether to walk children. -typedef bool (*frameWalkerFn)(nsIFrame* aFrame); - -static bool ReResolveMenusAndTrees(nsIFrame* aFrame) { - // Trees have a special style cache that needs to be flushed when - // the theme changes. - nsTreeBodyFrame* treeBody = do_QueryFrame(aFrame); - if (treeBody) treeBody->ClearStyleAndImageCaches(); - - // We deliberately don't re-resolve style on a menu's popup - // sub-content, since doing so slows menus to a crawl. That means we - // have to special-case them on a skin switch, and ensure that the - // popup frames just get destroyed completely. - nsMenuFrame* menu = do_QueryFrame(aFrame); - if (menu) menu->CloseMenu(true); - return true; -} - -static bool ReframeImageBoxes(nsIFrame* aFrame) { - if (aFrame->IsImageBoxFrame()) { - aFrame->PresContext()->RestyleManager()->PostRestyleEvent( - aFrame->GetContent()->AsElement(), RestyleHint{0}, - nsChangeHint_ReconstructFrame); - return false; // don't walk descendants - } - return true; // walk descendants -} - -static void WalkFramesThroughPlaceholders(nsPresContext* aPresContext, - nsIFrame* aFrame, - frameWalkerFn aFunc) { - bool walkChildren = (*aFunc)(aFrame); - if (!walkChildren) return; - - nsIFrame::ChildListIterator lists(aFrame); - for (; !lists.IsDone(); lists.Next()) { - nsFrameList::Enumerator childFrames(lists.CurrentList()); - for (; !childFrames.AtEnd(); childFrames.Next()) { - nsIFrame* child = childFrames.get(); - if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) { - // only do frames that are in flow, and recur through the - // out-of-flows of placeholders. - WalkFramesThroughPlaceholders( - aPresContext, nsPlaceholderFrame::GetRealFrameFor(child), aFunc); - } - } - } -} -#endif - NS_IMETHODIMP PresShell::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) { @@ -9476,24 +9413,6 @@ PresShell::Observe(nsISupports* aSubject, const char* aTopic, return NS_OK; } -#ifdef MOZ_XUL - if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) { - // Need to null-check because "chrome-flush-skin-caches" can happen - // at interesting times during startup. - if (nsIFrame* rootFrame = mFrameConstructor->GetRootFrame()) { - NS_ASSERTION(mViewManager, "View manager must exist"); - - WalkFramesThroughPlaceholders(mPresContext, rootFrame, - ReResolveMenusAndTrees); - - // Because "chrome:" URL equality is messy, reframe image box - // frames (hack!). - WalkFramesThroughPlaceholders(mPresContext, rootFrame, ReframeImageBoxes); - } - return NS_OK; - } -#endif - if (!nsCRT::strcmp(aTopic, "memory-pressure")) { if (!AssumeAllFramesVisible() && mPresContext->IsRootContentDocument()) { DoUpdateApproximateFrameVisibility(/* aRemoveOnly = */ true); diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp index ef97e22ca55e..dfe47a01c2c2 100644 --- a/layout/style/nsLayoutStylesheetCache.cpp +++ b/layout/style/nsLayoutStylesheetCache.cpp @@ -112,10 +112,6 @@ nsresult nsLayoutStylesheetCache::Observe(nsISupports* aSubject, mUserChromeSheet = nullptr; } else if (!strcmp(aTopic, "profile-do-change")) { InitFromProfile(); - } else if (strcmp(aTopic, "chrome-flush-skin-caches") == 0 || - strcmp(aTopic, "chrome-flush-caches") == 0) { - mScrollbarsSheet = nullptr; - mFormsSheet = nullptr; } else { MOZ_ASSERT_UNREACHABLE("Unexpected observer topic."); } @@ -229,8 +225,6 @@ nsLayoutStylesheetCache::nsLayoutStylesheetCache() : mUsedSharedMemory(0) { if (obsSvc) { obsSvc->AddObserver(this, "profile-before-change", false); obsSvc->AddObserver(this, "profile-do-change", false); - obsSvc->AddObserver(this, "chrome-flush-skin-caches", false); - obsSvc->AddObserver(this, "chrome-flush-caches", false); } // Load user style sheets. diff --git a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js index fb0ac2737993..0be3bed2cd21 100644 --- a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js +++ b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js @@ -103,12 +103,9 @@ function createManifestTemporarily(tempDir, manifestText) { Components.manager.QueryInterface(Ci.nsIComponentRegistrar). autoRegister(tempfile); - gChromeReg.refreshSkins(); - return function() { tempfile.fileSize = 0; // truncate the manifest gChromeReg.checkForNewChrome(); - gChromeReg.refreshSkins(); Services.prefs.clearUserPref(XUL_CACHE_PREF); }; } @@ -124,12 +121,9 @@ function registerManifestTemporarily(manifestURI) { Components.manager.QueryInterface(Ci.nsIComponentRegistrar). autoRegister(tempfile); - gChromeReg.refreshSkins(); - return function() { tempfile.fileSize = 0; // truncate the manifest gChromeReg.checkForNewChrome(); - gChromeReg.refreshSkins(); Services.prefs.clearUserPref(XUL_CACHE_PREF); }; } diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index d797a4c0517f..a6cf983424d5 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1331,12 +1331,6 @@ nsresult ScopedXPCOMStartup::SetWindowCreator(nsINativeAppSupport* native) { NS_IF_ADDREF(gNativeAppSupport = native); - // Inform the chrome registry about OS accessibility - nsCOMPtr cr = - mozilla::services::GetToolkitChromeRegistryService(); - - if (cr) cr->CheckForOSAccessibility(); - nsCOMPtr creator(components::AppStartup::Service()); if (!creator) return NS_ERROR_UNEXPECTED; From 1efe8b8b268d9ca465c31fb200a1ad66f9444989 Mon Sep 17 00:00:00 2001 From: Michal Novotny Date: Thu, 25 Apr 2019 12:21:17 +0000 Subject: [PATCH 16/60] Bug 1506534 - Collect telemetry to measure how much penalty we will experience with first-party cache isolation, r=mayhemer, data-r=chutten Whenever a cache entry is accessed during a document load, eTLD+1 of the top level document is added to the entry's metadata. Number of accessing sites is also stored in cache index. So we know how many copies of each entry would we have if we did a first party isolation without data deduplication. The telemetry is sent every time we write 2GB to the cache and then the data is reset. Telemetry report ID is an identifier of the telemetry cycle and it's used to invalidate eTLD+1 hashes in all cache entries. Differential Revision: https://phabricator.services.mozilla.com/D26425 --HG-- extra : moz-landing-system : lando --- netwerk/cache2/CacheEntry.cpp | 7 + netwerk/cache2/CacheEntry.h | 4 + netwerk/cache2/CacheFile.cpp | 71 ++++++- netwerk/cache2/CacheFile.h | 1 + netwerk/cache2/CacheFileIOManager.cpp | 63 ++++-- netwerk/cache2/CacheFileIOManager.h | 4 +- netwerk/cache2/CacheFileUtils.cpp | 64 ++++++ netwerk/cache2/CacheFileUtils.h | 17 ++ netwerk/cache2/CacheIndex.cpp | 205 +++++++++++++++++-- netwerk/cache2/CacheIndex.h | 67 ++++-- netwerk/cache2/CacheObserver.cpp | 62 ++++++ netwerk/cache2/CacheObserver.h | 11 + netwerk/cache2/OldWrappers.h | 3 + netwerk/cache2/nsICacheEntry.idl | 6 + netwerk/protocol/http/nsHttpChannel.cpp | 32 +++ netwerk/protocol/http/nsHttpChannel.h | 4 + toolkit/components/telemetry/Histograms.json | 62 ++++++ 17 files changed, 623 insertions(+), 60 deletions(-) diff --git a/netwerk/cache2/CacheEntry.cpp b/netwerk/cache2/CacheEntry.cpp index a170ddce6673..472d83080f10 100644 --- a/netwerk/cache2/CacheEntry.cpp +++ b/netwerk/cache2/CacheEntry.cpp @@ -1092,6 +1092,13 @@ nsresult CacheEntry::SetContentType(uint8_t aContentType) { return NS_ERROR_NOT_AVAILABLE; } +nsresult CacheEntry::AddBaseDomainAccess(uint32_t aSiteID) { + if (NS_SUCCEEDED(mFileStatus)) { + return mFile->AddBaseDomainAccess(aSiteID); + } + return NS_ERROR_NOT_AVAILABLE; +} + nsresult CacheEntry::GetIsForcedValid(bool *aIsForcedValid) { NS_ENSURE_ARG(aIsForcedValid); diff --git a/netwerk/cache2/CacheEntry.h b/netwerk/cache2/CacheEntry.h index aa5cf801abb2..eda07bfbe9a0 100644 --- a/netwerk/cache2/CacheEntry.h +++ b/netwerk/cache2/CacheEntry.h @@ -74,6 +74,7 @@ class CacheEntry final : public nsIRunnable, public CacheFileListener { nsresult GetOnStopTime(uint64_t *aOnStopTime); nsresult SetNetworkTimes(uint64_t onStartTime, uint64_t onStopTime); nsresult SetContentType(uint8_t aContentType); + nsresult AddBaseDomainAccess(uint32_t aSiteID); nsresult ForceValidFor(uint32_t aSecondsToTheFuture); nsresult GetIsForcedValid(bool *aIsForcedValid); nsresult OpenInputStream(int64_t offset, nsIInputStream **_retval); @@ -468,6 +469,9 @@ class CacheEntryHandle final : public nsICacheEntry { NS_IMETHOD SetContentType(uint8_t contentType) override { return mEntry->SetContentType(contentType); } + NS_IMETHOD AddBaseDomainAccess(uint32_t aSiteID) override { + return mEntry->AddBaseDomainAccess(aSiteID); + } NS_IMETHOD ForceValidFor(uint32_t aSecondsToTheFuture) override { return mEntry->ForceValidFor(aSecondsToTheFuture); } diff --git a/netwerk/cache2/CacheFile.cpp b/netwerk/cache2/CacheFile.cpp index f90618f4b9db..d0288e1d8792 100644 --- a/netwerk/cache2/CacheFile.cpp +++ b/netwerk/cache2/CacheFile.cpp @@ -1172,7 +1172,7 @@ nsresult CacheFile::SetFrecency(uint32_t aFrecency) { if (mHandle && !mHandle->IsDoomed()) CacheFileIOManager::UpdateIndexEntry(mHandle, &aFrecency, nullptr, nullptr, - nullptr, nullptr); + nullptr, nullptr, nullptr, 0); return mMetadata->SetFrecency(aFrecency); } @@ -1220,8 +1220,9 @@ nsresult CacheFile::SetNetworkTimes(uint64_t aOnStartTime, aOnStopTime <= kIndexTimeOutOfBound ? aOnStopTime : kIndexTimeOutOfBound; if (mHandle && !mHandle->IsDoomed()) { - CacheFileIOManager::UpdateIndexEntry( - mHandle, nullptr, nullptr, &onStartTime16, &onStopTime16, nullptr); + CacheFileIOManager::UpdateIndexEntry(mHandle, nullptr, nullptr, + &onStartTime16, &onStopTime16, nullptr, + nullptr, 0); } return NS_OK; } @@ -1276,7 +1277,54 @@ nsresult CacheFile::SetContentType(uint8_t aContentType) { if (mHandle && !mHandle->IsDoomed()) { CacheFileIOManager::UpdateIndexEntry(mHandle, nullptr, nullptr, nullptr, - nullptr, &aContentType); + nullptr, &aContentType, nullptr, 0); + } + return NS_OK; +} + +nsresult CacheFile::AddBaseDomainAccess(uint32_t aSiteID) { + CacheFileAutoLock lock(this); + + nsresult rv; + + LOG(("CacheFile::AddBaseDomainAccess() this=%p, siteID=%u", this, aSiteID)); + + MOZ_ASSERT(mMetadata); + NS_ENSURE_TRUE(mMetadata, NS_ERROR_UNEXPECTED); + + uint32_t trID = CacheObserver::TelemetryReportID(); + uint16_t siteIDCount = 0; + bool siteIDFound = false; + const char *elem = mMetadata->GetElement("eTLD1Access"); + if (elem) { + rv = CacheFileUtils::ParseBaseDomainAccessInfo(elem, trID, &aSiteID, + &siteIDFound, &siteIDCount); + if (NS_FAILED(rv)) { + // Ignore existing element, it's not valid anymore. + elem = nullptr; + } else if (siteIDFound) { + // Access from this site is already logged, nothing to do here. + return NS_OK; + } + } + + PostWriteTimer(); + + // This site accessed this element for the first time within this telemetry + // report ID. Add it and update count of accessing site in the index. + ++siteIDCount; + + nsAutoCString newElem; + CacheFileUtils::BuildOrAppendBaseDomainAccessInfo(elem, trID, aSiteID, + newElem); + rv = mMetadata->SetElement("eTLD1Access", newElem.get()); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + + if (mHandle && !mHandle->IsDoomed()) { + CacheFileIOManager::UpdateIndexEntry(mHandle, nullptr, nullptr, nullptr, + nullptr, nullptr, &siteIDCount, trID); } return NS_OK; } @@ -1306,7 +1354,7 @@ nsresult CacheFile::SetAltMetadata(const char *aAltMetadata) { if (mHandle && !mHandle->IsDoomed()) { CacheFileIOManager::UpdateIndexEntry(mHandle, nullptr, &hasAltData, nullptr, - nullptr, nullptr); + nullptr, nullptr, nullptr, 0); } return rv; } @@ -2553,8 +2601,17 @@ nsresult CacheFile::InitIndexEntry() { contentType = n64; } - rv = CacheFileIOManager::UpdateIndexEntry( - mHandle, &frecency, &hasAltData, &onStartTime, &onStopTime, &contentType); + uint32_t trID = CacheObserver::TelemetryReportID(); + const char *siteIDInfo = mMetadata->GetElement("eTLD1Access"); + uint16_t siteIDCount = 0; + if (siteIDInfo) { + CacheFileUtils::ParseBaseDomainAccessInfo(siteIDInfo, trID, nullptr, + nullptr, &siteIDCount); + } + + rv = CacheFileIOManager::UpdateIndexEntry(mHandle, &frecency, &hasAltData, + &onStartTime, &onStopTime, + &contentType, &siteIDCount, trID); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; diff --git a/netwerk/cache2/CacheFile.h b/netwerk/cache2/CacheFile.h index 7a88c14e2cec..76ed6e3857cc 100644 --- a/netwerk/cache2/CacheFile.h +++ b/netwerk/cache2/CacheFile.h @@ -102,6 +102,7 @@ class CacheFile final : public CacheFileChunkListener, nsresult GetFrecency(uint32_t *_retval); nsresult SetNetworkTimes(uint64_t aOnStartTime, uint64_t aOnStopTime); nsresult SetContentType(uint8_t aContentType); + nsresult AddBaseDomainAccess(uint32_t aSiteID); nsresult GetOnStartTime(uint64_t *_retval); nsresult GetOnStopTime(uint64_t *_retval); nsresult GetLastModified(uint32_t *_retval); diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index 423e37c8faae..47230503f705 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -976,7 +976,7 @@ class InitIndexEntryEvent : public Runnable { // if there is no write to the file. uint32_t sizeInK = mHandle->FileSizeInK(); CacheIndex::UpdateEntry(mHandle->Hash(), nullptr, nullptr, nullptr, nullptr, - nullptr, &sizeInK); + nullptr, nullptr, 0, &sizeInK); return NS_OK; } @@ -993,7 +993,9 @@ class UpdateIndexEntryEvent : public Runnable { UpdateIndexEntryEvent(CacheFileHandle *aHandle, const uint32_t *aFrecency, const bool *aHasAltData, const uint16_t *aOnStartTime, const uint16_t *aOnStopTime, - const uint8_t *aContentType) + const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, + const uint32_t aTelemetryReportID) : Runnable("net::UpdateIndexEntryEvent"), mHandle(aHandle), mHasFrecency(false), @@ -1001,11 +1003,14 @@ class UpdateIndexEntryEvent : public Runnable { mHasOnStartTime(false), mHasOnStopTime(false), mHasContentType(false), + mHasBaseDomainAccessCount(false), mFrecency(0), mHasAltData(false), mOnStartTime(0), mOnStopTime(0), - mContentType(nsICacheEntry::CONTENT_TYPE_UNKNOWN) { + mContentType(nsICacheEntry::CONTENT_TYPE_UNKNOWN), + mBaseDomainAccessCount(0), + mTelemetryReportID(aTelemetryReportID) { if (aFrecency) { mHasFrecency = true; mFrecency = *aFrecency; @@ -1026,6 +1031,10 @@ class UpdateIndexEntryEvent : public Runnable { mHasContentType = true; mContentType = *aContentType; } + if (aBaseDomainAccessCount) { + mHasBaseDomainAccessCount = true; + mBaseDomainAccessCount = *aBaseDomainAccessCount; + } } protected: @@ -1037,12 +1046,14 @@ class UpdateIndexEntryEvent : public Runnable { return NS_OK; } - CacheIndex::UpdateEntry(mHandle->Hash(), - mHasFrecency ? &mFrecency : nullptr, - mHasHasAltData ? &mHasAltData : nullptr, - mHasOnStartTime ? &mOnStartTime : nullptr, - mHasOnStopTime ? &mOnStopTime : nullptr, - mHasContentType ? &mContentType : nullptr, nullptr); + CacheIndex::UpdateEntry( + mHandle->Hash(), mHasFrecency ? &mFrecency : nullptr, + mHasHasAltData ? &mHasAltData : nullptr, + mHasOnStartTime ? &mOnStartTime : nullptr, + mHasOnStopTime ? &mOnStopTime : nullptr, + mHasContentType ? &mContentType : nullptr, + mHasBaseDomainAccessCount ? &mBaseDomainAccessCount : nullptr, + mTelemetryReportID, nullptr); return NS_OK; } @@ -1054,12 +1065,15 @@ class UpdateIndexEntryEvent : public Runnable { bool mHasOnStartTime; bool mHasOnStopTime; bool mHasContentType; + bool mHasBaseDomainAccessCount; uint32_t mFrecency; bool mHasAltData; uint16_t mOnStartTime; uint16_t mOnStopTime; uint8_t mContentType; + uint16_t mBaseDomainAccessCount; + uint32_t mTelemetryReportID; }; class MetadataWriteScheduleEvent : public Runnable { @@ -2052,12 +2066,14 @@ nsresult CacheFileIOManager::WriteInternal(CacheFileHandle *aHandle, if (oldSizeInK != newSizeInK && !aHandle->IsDoomed() && !aHandle->IsSpecialFile()) { CacheIndex::UpdateEntry(aHandle->Hash(), nullptr, nullptr, nullptr, - nullptr, nullptr, &newSizeInK); + nullptr, nullptr, nullptr, 0, &newSizeInK); if (oldSizeInK < newSizeInK) { EvictIfOverLimitInternal(); } } + + CacheIndex::UpdateTotalBytesWritten(bytesWritten); } if (bytesWritten != aCount) { @@ -2578,7 +2594,7 @@ nsresult CacheFileIOManager::TruncateSeekSetEOFInternal( if (oldSizeInK != newSizeInK && !aHandle->IsDoomed() && !aHandle->IsSpecialFile()) { CacheIndex::UpdateEntry(aHandle->Hash(), nullptr, nullptr, nullptr, nullptr, - nullptr, &newSizeInK); + nullptr, nullptr, 0, &newSizeInK); if (oldSizeInK < newSizeInK) { EvictIfOverLimitInternal(); @@ -2892,7 +2908,7 @@ nsresult CacheFileIOManager::OverLimitEvictionInternal() { // failing on one entry forever. uint32_t frecency = 0; rv = CacheIndex::UpdateEntry(&hash, &frecency, nullptr, nullptr, nullptr, - nullptr, nullptr); + nullptr, nullptr, 0, nullptr); NS_ENSURE_SUCCESS(rv, rv); consecutiveFailures++; @@ -3546,20 +3562,24 @@ nsresult CacheFileIOManager::InitIndexEntry(CacheFileHandle *aHandle, } // static -nsresult CacheFileIOManager::UpdateIndexEntry(CacheFileHandle *aHandle, - const uint32_t *aFrecency, - const bool *aHasAltData, - const uint16_t *aOnStartTime, - const uint16_t *aOnStopTime, - const uint8_t *aContentType) { +nsresult CacheFileIOManager::UpdateIndexEntry( + CacheFileHandle *aHandle, const uint32_t *aFrecency, + const bool *aHasAltData, const uint16_t *aOnStartTime, + const uint16_t *aOnStopTime, const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, const uint32_t aTelemetryReportID) { LOG( ("CacheFileIOManager::UpdateIndexEntry() [handle=%p, frecency=%s, " - "hasAltData=%s, onStartTime=%s, onStopTime=%s, contentType=%s]", + "hasAltData=%s, onStartTime=%s, onStopTime=%s, contentType=%s, " + "baseDomainAccessCount=%s, telemetryReportID=%u]", aHandle, aFrecency ? nsPrintfCString("%u", *aFrecency).get() : "", aHasAltData ? (*aHasAltData ? "true" : "false") : "", aOnStartTime ? nsPrintfCString("%u", *aOnStartTime).get() : "", aOnStopTime ? nsPrintfCString("%u", *aOnStopTime).get() : "", - aContentType ? nsPrintfCString("%u", *aContentType).get() : "")); + aContentType ? nsPrintfCString("%u", *aContentType).get() : "", + aBaseDomainAccessCount + ? nsPrintfCString("%u", *aBaseDomainAccessCount).get() + : "", + aTelemetryReportID)); nsresult rv; RefPtr ioMan = gInstance; @@ -3573,7 +3593,8 @@ nsresult CacheFileIOManager::UpdateIndexEntry(CacheFileHandle *aHandle, } RefPtr ev = new UpdateIndexEntryEvent( - aHandle, aFrecency, aHasAltData, aOnStartTime, aOnStopTime, aContentType); + aHandle, aFrecency, aHasAltData, aOnStartTime, aOnStopTime, aContentType, + aBaseDomainAccessCount, aTelemetryReportID); rv = ioMan->mIOThread->Dispatch(ev, aHandle->mPriority ? CacheIOThread::WRITE_PRIORITY : CacheIOThread::WRITE); diff --git a/netwerk/cache2/CacheFileIOManager.h b/netwerk/cache2/CacheFileIOManager.h index 2e6d7d98dd1e..bee1302baec2 100644 --- a/netwerk/cache2/CacheFileIOManager.h +++ b/netwerk/cache2/CacheFileIOManager.h @@ -323,7 +323,9 @@ class CacheFileIOManager final : public nsITimerCallback, public nsINamed { const bool *aHasAltData, const uint16_t *aOnStartTime, const uint16_t *aOnStopTime, - const uint8_t *aContentType); + const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, + const uint32_t aTelemetryReportID); static nsresult UpdateIndexEntry(); diff --git a/netwerk/cache2/CacheFileUtils.cpp b/netwerk/cache2/CacheFileUtils.cpp index 54c4f8fe76b6..2cc853616fe3 100644 --- a/netwerk/cache2/CacheFileUtils.cpp +++ b/netwerk/cache2/CacheFileUtils.cpp @@ -23,6 +23,8 @@ namespace CacheFileUtils { static uint32_t const kAltDataVersion = 1; const char *kAltDataKey = "alt-data"; +static uint32_t const kBaseDomainAccessInfoVersion = 1; + namespace { /** @@ -659,6 +661,68 @@ void BuildAlternativeDataInfo(const char *aInfo, int64_t aOffset, _retval.Append(aInfo); } +nsresult ParseBaseDomainAccessInfo(const char *aInfo, uint32_t aTrID, + const uint32_t *aSearchSiteID, bool *_found, + uint16_t *_count) { + // The format is: "1;12;339456,490536687,1964820," + // ;;,, + mozilla::Tokenizer p(aInfo); + uint32_t i = 0; + uint16_t siteIDCnt = 0; + + // Check version and telemetry report ID + if (!p.ReadInteger(&i) || i != kBaseDomainAccessInfoVersion || + !p.CheckChar(';') || !p.ReadInteger(&i) || i != aTrID || + !p.CheckChar(';')) { + LOG( + ("ParseBaseDomainAccessInfo() - cannot parse info [info=%s, version=%u," + " trID=%u]", + aInfo, kBaseDomainAccessInfoVersion, aTrID)); + return NS_ERROR_NOT_AVAILABLE; + } + + do { + if (!p.ReadInteger(&i) || !p.CheckChar(',')) { + LOG( + ("ParseBaseDomainAccessInfo() - cannot parse site ID [info=%s, " + "siteIDCnt=%d]", + aInfo, siteIDCnt)); + return NS_ERROR_NOT_AVAILABLE; + } + + // If aSearchSiteID was provided, we don't need the total count of IDs. + // Just return true and don't process the rest of data. + if (aSearchSiteID && *aSearchSiteID == i) { + *_found = true; + return NS_OK; + } + + ++siteIDCnt; + } while (!p.CheckEOF()); + + if (_count) { + *_count = siteIDCnt; + } + + return NS_OK; +} + +void BuildOrAppendBaseDomainAccessInfo(const char *aOldInfo, uint32_t aTrID, + uint32_t aSiteID, nsACString &_retval) { + if (aOldInfo) { + _retval.Assign(aOldInfo); + } else { + _retval.Truncate(); + _retval.AppendInt(kBaseDomainAccessInfoVersion); + _retval.Append(';'); + _retval.AppendInt(aTrID); + _retval.Append(';'); + } + + _retval.AppendInt(aSiteID); + _retval.Append(','); +} + } // namespace CacheFileUtils } // namespace net } // namespace mozilla diff --git a/netwerk/cache2/CacheFileUtils.h b/netwerk/cache2/CacheFileUtils.h index da29a6b8175a..def077bd2119 100644 --- a/netwerk/cache2/CacheFileUtils.h +++ b/netwerk/cache2/CacheFileUtils.h @@ -217,6 +217,23 @@ nsresult ParseAlternativeDataInfo(const char *aInfo, int64_t *_offset, void BuildAlternativeDataInfo(const char *aInfo, int64_t aOffset, nsACString &_retval); +// Parses base domain access info. If the info cannot be parsed (e.g. it's +// corrupted or it's invalid because aTrID has changed) an error is thrown. +// If aSearchSiteID is null, then the whole string is parsed and number of sites +// in the info is returned in _count. +// If aSearchSiteID is passed, then _count argument is ignored. It only searches +// siteID in the info and returns the result in _found. +nsresult ParseBaseDomainAccessInfo(const char *aInfo, uint32_t aTrID, + const uint32_t *aSearchSiteID, bool *_found, + uint16_t *_count); + +// If aOldInfo is null then new base domain access info containing aSiteID is +// built. If an old base domain access info is passed in aOldInfo, then only +// aSiteID is appended to it. Note that this function doesn't parse the old base +// domain info, i.e. it assumes that it's valid and it doesn't contain aSiteID. +void BuildOrAppendBaseDomainAccessInfo(const char *aOldInfo, uint32_t aTrID, + uint32_t aSiteID, nsACString &_retval); + } // namespace CacheFileUtils } // namespace net } // namespace mozilla diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp index 1662b8ec1f6e..97a85dd1a47e 100644 --- a/netwerk/cache2/CacheIndex.cpp +++ b/netwerk/cache2/CacheIndex.cpp @@ -26,8 +26,9 @@ #define kMinUnwrittenChanges 300 #define kMinDumpInterval 20000 // in milliseconds #define kMaxBufSize 16384 -#define kIndexVersion 0x00000007 +#define kIndexVersion 0x00000008 #define kUpdateIndexStartDelay 50000 // in milliseconds +#define kTelemetryReportBytesLimit (2U * 1024U * 1024U * 1024U) // 2GB #define INDEX_NAME "index" #define TEMP_INDEX_NAME "index.tmp" @@ -262,7 +263,8 @@ CacheIndex::CacheIndex() mRWBufPos(0), mRWPending(false), mJournalReadSuccessfully(false), - mAsyncGetDiskConsumptionBlocked(false) { + mAsyncGetDiskConsumptionBlocked(false), + mTotalBytesWritten(0) { sLock.AssertCurrentThreadOwns(); LOG(("CacheIndex::CacheIndex [this=%p]", this)); MOZ_ASSERT(!gInstance, "multiple CacheIndex instances!"); @@ -304,6 +306,9 @@ nsresult CacheIndex::InitInternal(nsIFile *aCacheDirectory) { mStartTime = TimeStamp::NowLoRes(); + mTotalBytesWritten = CacheObserver::CacheAmountWritten(); + mTotalBytesWritten <<= 10; + ReadIndexFromDisk(); return NS_OK; @@ -421,6 +426,8 @@ nsresult CacheIndex::Shutdown() { bool sanitize = CacheObserver::ClearCacheOnShutdown(); + CacheObserver::SetCacheAmountWritten(index->mTotalBytesWritten >> 10); + LOG( ("CacheIndex::Shutdown() - [state=%d, indexOnDiskIsValid=%d, " "dontMarkIndexClean=%d, sanitize=%d]", @@ -920,23 +927,26 @@ nsresult CacheIndex::RemoveEntry(const SHA1Sum::Hash *aHash) { } // static -nsresult CacheIndex::UpdateEntry(const SHA1Sum::Hash *aHash, - const uint32_t *aFrecency, - const bool *aHasAltData, - const uint16_t *aOnStartTime, - const uint16_t *aOnStopTime, - const uint8_t *aContentType, - const uint32_t *aSize) { +nsresult CacheIndex::UpdateEntry( + const SHA1Sum::Hash *aHash, const uint32_t *aFrecency, + const bool *aHasAltData, const uint16_t *aOnStartTime, + const uint16_t *aOnStopTime, const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, const uint32_t aTelemetryReportID, + const uint32_t *aSize) { LOG( ("CacheIndex::UpdateEntry() [hash=%08x%08x%08x%08x%08x, " "frecency=%s, hasAltData=%s, onStartTime=%s, onStopTime=%s, " - "contentType=%s, size=%s]", + "contentType=%s, baseDomainAccessCount=%s, telemetryReportID=%u, " + "size=%s]", LOGSHA1(aHash), aFrecency ? nsPrintfCString("%u", *aFrecency).get() : "", aHasAltData ? (*aHasAltData ? "true" : "false") : "", aOnStartTime ? nsPrintfCString("%u", *aOnStartTime).get() : "", aOnStopTime ? nsPrintfCString("%u", *aOnStopTime).get() : "", aContentType ? nsPrintfCString("%u", *aContentType).get() : "", - aSize ? nsPrintfCString("%u", *aSize).get() : "")); + aBaseDomainAccessCount + ? nsPrintfCString("%u", *aBaseDomainAccessCount).get() + : "", + aTelemetryReportID, aSize ? nsPrintfCString("%u", *aSize).get() : "")); MOZ_ASSERT(CacheFileIOManager::IsOnIOThread()); @@ -957,6 +967,19 @@ nsresult CacheIndex::UpdateEntry(const SHA1Sum::Hash *aHash, CacheIndexEntry *entry = index->mIndex.GetEntry(*aHash); + uint16_t baseDomainAccessCount = 0; + if (aBaseDomainAccessCount) { + if (aTelemetryReportID != CacheObserver::TelemetryReportID()) { + // Telemetry report ID has changed and the value is no longer valid. + // Reset the count to 0. + LOG( + ("CacheIndex::UpdateEntry() - Telemetry report ID has changed, " + "setting baseDomainAccessCount to 0.")); + } else { + baseDomainAccessCount = *aBaseDomainAccessCount; + } + } + if (entry && entry->IsRemoved()) { entry = nullptr; } @@ -973,8 +996,11 @@ nsresult CacheIndex::UpdateEntry(const SHA1Sum::Hash *aHash, return NS_ERROR_UNEXPECTED; } - if (!HasEntryChanged(entry, aFrecency, aHasAltData, aOnStartTime, - aOnStopTime, aContentType, aSize)) { + if (!HasEntryChanged( + entry, aFrecency, aHasAltData, aOnStartTime, aOnStopTime, + aContentType, + aBaseDomainAccessCount ? &baseDomainAccessCount : nullptr, + aSize)) { return NS_OK; } @@ -1002,6 +1028,10 @@ nsresult CacheIndex::UpdateEntry(const SHA1Sum::Hash *aHash, entry->SetContentType(*aContentType); } + if (aBaseDomainAccessCount) { + entry->SetBaseDomainAccessCount(baseDomainAccessCount); + } + if (aSize) { entry->SetFileSize(*aSize); } @@ -1052,6 +1082,10 @@ nsresult CacheIndex::UpdateEntry(const SHA1Sum::Hash *aHash, updated->SetContentType(*aContentType); } + if (aBaseDomainAccessCount) { + updated->SetBaseDomainAccessCount(baseDomainAccessCount); + } + if (aSize) { updated->SetFileSize(*aSize); } @@ -1537,7 +1571,8 @@ bool CacheIndex::IsCollision(CacheIndexEntry *aEntry, bool CacheIndex::HasEntryChanged( CacheIndexEntry *aEntry, const uint32_t *aFrecency, const bool *aHasAltData, const uint16_t *aOnStartTime, const uint16_t *aOnStopTime, - const uint8_t *aContentType, const uint32_t *aSize) { + const uint8_t *aContentType, const uint16_t *aBaseDomainAccessCount, + const uint32_t *aSize) { if (aFrecency && *aFrecency != aEntry->GetFrecency()) { return true; } @@ -1558,6 +1593,11 @@ bool CacheIndex::HasEntryChanged( return true; } + if (aBaseDomainAccessCount && + *aBaseDomainAccessCount != aEntry->GetBaseDomainAccessCount()) { + return true; + } + if (aSize && (*aSize & CacheIndexEntry::kFileSizeMask) != aEntry->GetFileSize()) { return true; @@ -2674,6 +2714,15 @@ nsresult CacheIndex::InitEntryFromDiskData(CacheIndexEntry *aEntry, } aEntry->SetContentType(contentType); + uint32_t trID = CacheObserver::TelemetryReportID(); + const char *siteIDInfo = aMetaData->GetElement("eTLD1Access"); + uint16_t siteIDCount = 0; + if (siteIDInfo) { + CacheFileUtils::ParseBaseDomainAccessInfo(siteIDInfo, trID, nullptr, + nullptr, &siteIDCount); + } + aEntry->SetBaseDomainAccessCount(siteIDCount); + aEntry->SetFileSize(static_cast(std::min( static_cast(PR_UINT32_MAX), (aFileSize + 0x3FF) >> 10))); return NS_OK; @@ -3855,13 +3904,139 @@ void CacheIndex::ReportHashStats() { } // static -void CacheIndex::OnAsyncEviction(bool aEvicting) { +void CacheIndex::UpdateTotalBytesWritten(uint32_t aBytesWritten) { + StaticMutexAutoLock lock(sLock); + RefPtr index = gInstance; if (!index) { return; } + index->mTotalBytesWritten += aBytesWritten; + + // Do telemetry report if enough data has been written and the index is + // in READY state. The data is available also in WRITING state, but we would + // need to deal with pending updates. + if (index->mTotalBytesWritten >= kTelemetryReportBytesLimit && + index->mState == READY && !index->mIndexNeedsUpdate && + !index->mShuttingDown) { + index->DoBaseDomainAccessTelemetryReport(); + + index->mTotalBytesWritten = 0; + CacheObserver::SetCacheAmountWritten(0); + return; + } + + uint64_t writtenKB = index->mTotalBytesWritten >> 10; + // Store number of written kilobytes to prefs after writing at least 10MB. + if ((writtenKB - CacheObserver::CacheAmountWritten()) > (10 * 1024)) { + CacheObserver::SetCacheAmountWritten(writtenKB); + } +} + +void CacheIndex::DoBaseDomainAccessTelemetryReport() { + static const nsLiteralCString + contentTypeNames[nsICacheEntry::CONTENT_TYPE_LAST] = { + NS_LITERAL_CSTRING("UNKNOWN"), NS_LITERAL_CSTRING("OTHER"), + NS_LITERAL_CSTRING("JAVASCRIPT"), NS_LITERAL_CSTRING("IMAGE"), + NS_LITERAL_CSTRING("MEDIA"), NS_LITERAL_CSTRING("STYLESHEET"), + NS_LITERAL_CSTRING("WASM")}; + + // size in kB of all entries + uint32_t size = 0; + // increase of size in kB that would be caused by first party isolation + uint32_t sizeInc = 0; + // count of all entries + uint32_t count = 0; + // increase of count that would be caused by first party isolation + uint32_t countInc = 0; + + // the same stats as above split by content type + uint32_t sizeByType[nsICacheEntry::CONTENT_TYPE_LAST]; + uint32_t sizeIncByType[nsICacheEntry::CONTENT_TYPE_LAST]; + uint32_t countByType[nsICacheEntry::CONTENT_TYPE_LAST]; + uint32_t countIncByType[nsICacheEntry::CONTENT_TYPE_LAST]; + + memset(&sizeByType, 0, sizeof(sizeByType)); + memset(&sizeIncByType, 0, sizeof(sizeIncByType)); + memset(&countByType, 0, sizeof(countByType)); + memset(&countIncByType, 0, sizeof(countIncByType)); + + for (auto iter = mIndex.Iter(); !iter.Done(); iter.Next()) { + CacheIndexEntry *entry = iter.Get(); + if (entry->IsRemoved() || !entry->IsInitialized() || entry->IsFileEmpty()) { + entry->SetBaseDomainAccessCount(0); + continue; + } + + uint32_t entrySize = entry->GetFileSize(); + uint32_t accessCnt = entry->GetBaseDomainAccessCount(); + uint8_t contentType = entry->GetContentType(); + entry->SetBaseDomainAccessCount(0); + + ++count; + ++countByType[contentType]; + size += entrySize; + sizeByType[contentType] += entrySize; + + if (accessCnt > 1) { + countInc += accessCnt - 1; + countIncByType[contentType] += accessCnt - 1; + sizeInc += (accessCnt - 1) * entrySize; + sizeIncByType[contentType] += (accessCnt - 1) * entrySize; + } + + Telemetry::Accumulate( + Telemetry::NETWORK_CACHE_ISOLATION_UNIQUE_SITE_ACCESS_COUNT, + contentTypeNames[contentType], accessCnt); + } + + if (size > 0) { + Telemetry::Accumulate(Telemetry::NETWORK_CACHE_ISOLATION_SIZE_INCREASE, + NS_LITERAL_CSTRING("ALL"), + round(static_cast(sizeInc) * 100.0 / + static_cast(size))); + } + + if (count > 0) { + Telemetry::Accumulate( + Telemetry::NETWORK_CACHE_ISOLATION_ENTRY_COUNT_INCREASE, + NS_LITERAL_CSTRING("ALL"), + round(static_cast(countInc) * 100.0 / + static_cast(count))); + } + + for (uint32_t i = 0; i < nsICacheEntry::CONTENT_TYPE_LAST; ++i) { + if (sizeByType[i] > 0) { + Telemetry::Accumulate(Telemetry::NETWORK_CACHE_ISOLATION_SIZE_INCREASE, + contentTypeNames[i], + round(static_cast(sizeIncByType[i]) * + 100.0 / static_cast(sizeByType[i]))); + } + + if (countByType[i] > 0) { + Telemetry::Accumulate( + Telemetry::NETWORK_CACHE_ISOLATION_ENTRY_COUNT_INCREASE, + contentTypeNames[i], + round(static_cast(countIncByType[i]) * 100.0 / + static_cast(countByType[i]))); + } + } + + // Change telemetry report ID. This will invalidate eTLD+1 access data stored + // in all cache entries. + CacheObserver::SetTelemetryReportID(CacheObserver::TelemetryReportID() + 1); +} + +// static +void CacheIndex::OnAsyncEviction(bool aEvicting) { StaticMutexAutoLock lock(sLock); + + RefPtr index = gInstance; + if (!index) { + return; + } + index->mAsyncGetDiskConsumptionBlocked = aEvicting; if (!aEvicting) { index->NotifyAsyncGetDiskConsumptionCallbacks(); diff --git a/netwerk/cache2/CacheIndex.h b/netwerk/cache2/CacheIndex.h index 651f65dda3d8..12696923a607 100644 --- a/netwerk/cache2/CacheIndex.h +++ b/netwerk/cache2/CacheIndex.h @@ -73,6 +73,7 @@ struct CacheIndexRecord { uint16_t mOnStartTime; uint16_t mOnStopTime; uint8_t mContentType; + uint16_t mBaseDomainAccessCount; /* * 1000 0000 0000 0000 0000 0000 0000 0000 : initialized @@ -93,6 +94,7 @@ struct CacheIndexRecord { mOnStartTime(kIndexTimeNotAvailable), mOnStopTime(kIndexTimeNotAvailable), mContentType(nsICacheEntry::CONTENT_TYPE_UNKNOWN), + mBaseDomainAccessCount(0), mFlags(0) {} }; #pragma pack(pop) @@ -103,6 +105,7 @@ static_assert(sizeof(CacheIndexRecord::mHash) + sizeof(CacheIndexRecord::mOnStartTime) + sizeof(CacheIndexRecord::mOnStopTime) + sizeof(CacheIndexRecord::mContentType) + + sizeof(CacheIndexRecord::mBaseDomainAccessCount) + sizeof(CacheIndexRecord::mFlags) == sizeof(CacheIndexRecord), "Unexpected sizeof(CacheIndexRecord)!"); @@ -157,6 +160,7 @@ class CacheIndexEntry : public PLDHashEntryHdr { mRec->mOnStartTime = aOther.mRec->mOnStartTime; mRec->mOnStopTime = aOther.mRec->mOnStopTime; mRec->mContentType = aOther.mRec->mContentType; + mRec->mBaseDomainAccessCount = aOther.mRec->mBaseDomainAccessCount; mRec->mFlags = aOther.mRec->mFlags; return *this; } @@ -167,6 +171,7 @@ class CacheIndexEntry : public PLDHashEntryHdr { mRec->mOnStartTime = kIndexTimeNotAvailable; mRec->mOnStopTime = kIndexTimeNotAvailable; mRec->mContentType = nsICacheEntry::CONTENT_TYPE_UNKNOWN; + mRec->mBaseDomainAccessCount = 0; mRec->mFlags = 0; } @@ -176,6 +181,7 @@ class CacheIndexEntry : public PLDHashEntryHdr { MOZ_ASSERT(mRec->mOnStartTime == kIndexTimeNotAvailable); MOZ_ASSERT(mRec->mOnStopTime == kIndexTimeNotAvailable); MOZ_ASSERT(mRec->mContentType == nsICacheEntry::CONTENT_TYPE_UNKNOWN); + MOZ_ASSERT(mRec->mBaseDomainAccessCount == 0); // When we init the entry it must be fresh and may be dirty MOZ_ASSERT((mRec->mFlags & ~kDirtyMask) == kFreshMask); @@ -229,6 +235,13 @@ class CacheIndexEntry : public PLDHashEntryHdr { void SetContentType(uint8_t aType) { mRec->mContentType = aType; } uint8_t GetContentType() const { return mRec->mContentType; } + void SetBaseDomainAccessCount(uint16_t aCount) { + mRec->mBaseDomainAccessCount = aCount; + } + uint8_t GetBaseDomainAccessCount() const { + return mRec->mBaseDomainAccessCount; + } + // Sets filesize in kilobytes. void SetFileSize(uint32_t aFileSize) { if (aFileSize > kFileSizeMask) { @@ -265,6 +278,8 @@ class CacheIndexEntry : public PLDHashEntryHdr { ptr += sizeof(uint16_t); *ptr = mRec->mContentType; ptr += sizeof(uint8_t); + NetworkEndian::writeUint16(ptr, mRec->mBaseDomainAccessCount); + ptr += sizeof(uint16_t); // Dirty and fresh flags should never go to disk, since they make sense only // during current session. NetworkEndian::writeUint32(ptr, mRec->mFlags & ~(kDirtyMask | kFreshMask)); @@ -284,6 +299,8 @@ class CacheIndexEntry : public PLDHashEntryHdr { ptr += sizeof(uint16_t); mRec->mContentType = *ptr; ptr += sizeof(uint8_t); + mRec->mBaseDomainAccessCount = NetworkEndian::readUint16(ptr); + ptr += sizeof(uint16_t); mRec->mFlags = NetworkEndian::readUint32(ptr); } @@ -292,11 +309,12 @@ class CacheIndexEntry : public PLDHashEntryHdr { ("CacheIndexEntry::Log() [this=%p, hash=%08x%08x%08x%08x%08x, fresh=%u," " initialized=%u, removed=%u, dirty=%u, anonymous=%u, " "originAttrsHash=%" PRIx64 ", frecency=%u, hasAltData=%u, " - "onStartTime=%u, onStopTime=%u, contentType=%u, size=%u]", + "onStartTime=%u, onStopTime=%u, contentType=%u, " + "baseDomainAccessCount=%u, size=%u]", this, LOGSHA1(mRec->mHash), IsFresh(), IsInitialized(), IsRemoved(), IsDirty(), Anonymous(), OriginAttrsHash(), GetFrecency(), GetHasAltData(), GetOnStartTime(), GetOnStopTime(), GetContentType(), - GetFileSize())); + GetBaseDomainAccessCount(), GetFileSize())); } static bool RecordMatchesLoadContextInfo(CacheIndexRecord *aRec, @@ -408,6 +426,11 @@ class CacheIndexEntryUpdate : public CacheIndexEntry { CacheIndexEntry::SetContentType(aType); } + void SetBaseDomainAccessCount(uint16_t aCount) { + mUpdateFlags |= kBaseDomainAccessCountUpdatedMask; + CacheIndexEntry::SetBaseDomainAccessCount(aCount); + } + void SetFileSize(uint32_t aFileSize) { mUpdateFlags |= kFileSizeUpdatedMask; CacheIndexEntry::SetFileSize(aFileSize); @@ -429,6 +452,9 @@ class CacheIndexEntryUpdate : public CacheIndexEntry { if (mUpdateFlags & kContentTypeUpdatedMask) { aDst->mRec->mContentType = mRec->mContentType; } + if (mUpdateFlags & kBaseDomainAccessCountUpdatedMask) { + aDst->mRec->mBaseDomainAccessCount = mRec->mBaseDomainAccessCount; + } if (mUpdateFlags & kHasAltDataUpdatedMask && ((aDst->mRec->mFlags ^ mRec->mFlags) & kHasAltDataMask)) { // Toggle the bit if we need to. @@ -452,6 +478,7 @@ class CacheIndexEntryUpdate : public CacheIndexEntry { static const uint32_t kHasAltDataUpdatedMask = 0x00000008; static const uint32_t kOnStartTimeUpdatedMask = 0x00000010; static const uint32_t kOnStopTimeUpdatedMask = 0x00000020; + static const uint32_t kBaseDomainAccessCountUpdatedMask = 0x00000040; uint32_t mUpdateFlags; }; @@ -682,13 +709,12 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable { // MUST be initialized. Call to AddEntry() or EnsureEntryExists() and to // InitEntry() must precede the call to this method. // Pass nullptr if the value didn't change. - static nsresult UpdateEntry(const SHA1Sum::Hash *aHash, - const uint32_t *aFrecency, - const bool *aHasAltData, - const uint16_t *aOnStartTime, - const uint16_t *aOnStopTime, - const uint8_t *aContentType, - const uint32_t *aSize); + static nsresult UpdateEntry( + const SHA1Sum::Hash *aHash, const uint32_t *aFrecency, + const bool *aHasAltData, const uint16_t *aOnStartTime, + const uint16_t *aOnStopTime, const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, const uint32_t aTelemetryReportID, + const uint32_t *aSize); // Remove all entries from the index. Called when clearing the whole cache. static nsresult RemoveAll(); @@ -751,6 +777,10 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable { // notification to AsyncGetDiskConsumption. static void OnAsyncEviction(bool aEvicting); + // We keep track of total bytes written to the cache to be able to do + // a telemetry report after writting certain amount of data to the cache. + static void UpdateTotalBytesWritten(uint32_t aBytesWritten); + // Memory reporting static size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf); static size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf); @@ -787,13 +817,11 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable { OriginAttrsHash aOriginAttrsHash, bool aAnonymous); // Checks whether any of the information about the entry has changed. - static bool HasEntryChanged(CacheIndexEntry *aEntry, - const uint32_t *aFrecency, - const bool *aHasAltData, - const uint16_t *aOnStartTime, - const uint16_t *aOnStopTime, - const uint8_t *aContentType, - const uint32_t *aSize); + static bool HasEntryChanged( + CacheIndexEntry *aEntry, const uint32_t *aFrecency, + const bool *aHasAltData, const uint16_t *aOnStartTime, + const uint16_t *aOnStopTime, const uint8_t *aContentType, + const uint16_t *aBaseDomainAccessCount, const uint32_t *aSize); // Merge all pending operations from mPendingUpdates into mIndex. void ProcessPendingOperations(); @@ -986,6 +1014,10 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable { void ReportHashStats(); + // Reports first party cache isolation telemetry, clears data stored in the + // index entries and bumps a telemetry report ID. + void DoBaseDomainAccessTelemetryReport(); + static mozilla::StaticRefPtr gInstance; static StaticMutex sLock; @@ -1203,6 +1235,9 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable { // List of async observers that want to get disk consumption information nsTArray > mDiskConsumptionObservers; + + // Number of bytes written to the cache since the last telemetry report + uint64_t mTotalBytesWritten; }; } // namespace net diff --git a/netwerk/cache2/CacheObserver.cpp b/netwerk/cache2/CacheObserver.cpp index eadb6770a4cc..5b35572d983c 100644 --- a/netwerk/cache2/CacheObserver.cpp +++ b/netwerk/cache2/CacheObserver.cpp @@ -95,6 +95,14 @@ Atomic CacheObserver::sMaxShutdownIOLag( Atomic CacheObserver::sShutdownDemandedTime( PR_INTERVAL_NO_TIMEOUT); +static uint32_t const kDefaultTelemetryReportID = 0; +Atomic CacheObserver::sTelemetryReportID( + kDefaultTelemetryReportID); + +static uint32_t const kDefaultCacheAmountWritten = 0; +Atomic CacheObserver::sCacheAmountWritten( + kDefaultCacheAmountWritten); + NS_IMPL_ISUPPORTS(CacheObserver, nsIObserver, nsISupportsWeakReference) // static @@ -206,6 +214,14 @@ void CacheObserver::AttachToPreferences() { mozilla::Preferences::AddAtomicUintVarCache( &sMaxShutdownIOLag, "browser.cache.max_shutdown_io_lag", kDefaultMaxShutdownIOLag); + + mozilla::Preferences::AddAtomicUintVarCache( + &sTelemetryReportID, "browser.cache.disk.telemetry_report_ID", + kDefaultTelemetryReportID); + + mozilla::Preferences::AddAtomicUintVarCache( + &sCacheAmountWritten, "browser.cache.disk.amount_written", + kDefaultCacheAmountWritten); } // static @@ -309,6 +325,52 @@ void CacheObserver::StoreHashStatsReported() { sHashStatsReported); } +// static +void CacheObserver::SetTelemetryReportID(uint32_t aTelemetryReportID) { + sTelemetryReportID = aTelemetryReportID; + + if (!sSelf) { + return; + } + + if (NS_IsMainThread()) { + sSelf->StoreTelemetryReportID(); + } else { + nsCOMPtr event = + NewRunnableMethod("net::CacheObserver::StoreTelemetryReportID", + sSelf.get(), &CacheObserver::StoreTelemetryReportID); + NS_DispatchToMainThread(event); + } +} + +void CacheObserver::StoreTelemetryReportID() { + mozilla::Preferences::SetInt("browser.cache.disk.telemetry_report_ID", + sTelemetryReportID); +} + +// static +void CacheObserver::SetCacheAmountWritten(uint32_t aCacheAmountWritten) { + sCacheAmountWritten = aCacheAmountWritten; + + if (!sSelf) { + return; + } + + if (NS_IsMainThread()) { + sSelf->StoreCacheAmountWritten(); + } else { + nsCOMPtr event = + NewRunnableMethod("net::CacheObserver::StoreCacheAmountWritten", + sSelf.get(), &CacheObserver::StoreCacheAmountWritten); + NS_DispatchToMainThread(event); + } +} + +void CacheObserver::StoreCacheAmountWritten() { + mozilla::Preferences::SetInt("browser.cache.disk.amount_written", + sCacheAmountWritten); +} + // static void CacheObserver::ParentDirOverride(nsIFile** aDir) { if (NS_WARN_IF(!aDir)) return; diff --git a/netwerk/cache2/CacheObserver.h b/netwerk/cache2/CacheObserver.h index 2745d178815d..29b841c8e6bc 100644 --- a/netwerk/cache2/CacheObserver.h +++ b/netwerk/cache2/CacheObserver.h @@ -70,6 +70,13 @@ class CacheObserver : public nsIObserver, public nsSupportsWeakReference { static void SetCacheFSReported(); static bool HashStatsReported() { return sHashStatsReported; } static void SetHashStatsReported(); + static uint32_t TelemetryReportID() { return sTelemetryReportID; } + static void SetTelemetryReportID(uint32_t); + static uint32_t CacheAmountWritten() // result in kilobytes + { + return sCacheAmountWritten; + } + static void SetCacheAmountWritten(uint32_t); // parameter in kilobytes. static void ParentDirOverride(nsIFile** aDir); static bool EntryIsTooBig(int64_t aSize, bool aUsingDisk); @@ -87,6 +94,8 @@ class CacheObserver : public nsIObserver, public nsSupportsWeakReference { void StoreDiskCacheCapacity(); void StoreCacheFSReported(); void StoreHashStatsReported(); + void StoreTelemetryReportID(); + void StoreCacheAmountWritten(); void AttachToPreferences(); static bool sUseMemoryCache; @@ -111,6 +120,8 @@ class CacheObserver : public nsIObserver, public nsSupportsWeakReference { static bool sHashStatsReported; static Atomic sMaxShutdownIOLag; static Atomic sShutdownDemandedTime; + static Atomic sTelemetryReportID; + static Atomic sCacheAmountWritten; // Non static properties, accessible via sSelf nsCOMPtr mCacheParentDirectoryOverride; diff --git a/netwerk/cache2/OldWrappers.h b/netwerk/cache2/OldWrappers.h index f12ece3f7880..b46e3a43d4e8 100644 --- a/netwerk/cache2/OldWrappers.h +++ b/netwerk/cache2/OldWrappers.h @@ -122,6 +122,9 @@ class _OldCacheEntryWrapper : public nsICacheEntry { NS_IMETHOD SetContentType(uint8_t aContentType) override { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD AddBaseDomainAccess(uint32_t aSiteID) override { + return NS_ERROR_NOT_IMPLEMENTED; + } NS_IMETHOD GetLoadContextInfo(nsILoadContextInfo **aInfo) override { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/netwerk/cache2/nsICacheEntry.idl b/netwerk/cache2/nsICacheEntry.idl index c9732496b1f4..4b3764e5aad9 100644 --- a/netwerk/cache2/nsICacheEntry.idl +++ b/netwerk/cache2/nsICacheEntry.idl @@ -101,6 +101,12 @@ interface nsICacheEntry : nsISupports */ void setContentType(in uint8_t contentType); + /** + * Stores information about an access from site identified by unique siteID. + * It's used for first party cache isolation telemetry. + */ + void addBaseDomainAccess(in uint32_t siteID); + /** * This method is intended to override the per-spec cache validation * decisions for a duration specified in seconds. The current state can diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index c8dcb8ffbd2d..f10c6da1af0a 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -117,6 +117,7 @@ #include "nsIMIMEInputStream.h" #include "nsIMultiplexInputStream.h" #include "../../cache2/CacheFileUtils.h" +#include "../../cache2/CacheHashUtils.h" #include "nsINetworkLinkService.h" #include "mozilla/dom/PromiseNativeHandler.h" #include "mozilla/dom/Promise.h" @@ -1719,6 +1720,33 @@ void nsHttpChannel::SetCachedContentType() { mCacheEntry->SetContentType(contentType); } +void nsHttpChannel::StoreSiteAccessToCacheEntry() { + nsresult rv; + + nsCOMPtr topWindowURI; + rv = GetTopWindowURI(getter_AddRefs(topWindowURI)); + if (NS_FAILED(rv)) { + return; + } + + nsCOMPtr eTLDService = + do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID, &rv); + if (NS_FAILED(rv)) { + return; + } + + nsAutoCString baseDomain; + rv = eTLDService->GetBaseDomain(topWindowURI, 0, baseDomain); + if (NS_FAILED(rv)) { + return; + } + + RefPtr hash = new CacheHash(); + hash->Update(baseDomain.get(), baseDomain.Length()); + + Unused << mCacheEntry->AddBaseDomainAccess(hash->GetHash()); +} + nsresult nsHttpChannel::CallOnStartRequest() { LOG(("nsHttpChannel::CallOnStartRequest [this=%p]", this)); @@ -1819,6 +1847,10 @@ nsresult nsHttpChannel::CallOnStartRequest() { SetCachedContentType(); } + if (mCacheEntry) { + StoreSiteAccessToCacheEntry(); + } + LOG((" calling mListener->OnStartRequest [this=%p, listener=%p]\n", this, mListener.get())); diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index 92973cede589..0a6821dd697a 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -556,6 +556,10 @@ class nsHttpChannel final : public HttpBaseChannel, // writing a new entry. The content type is used in cache internally only. void SetCachedContentType(); + // Stores information about access from eTLD+1 of the top level document to + // the cache entry. + void StoreSiteAccessToCacheEntry(); + private: // this section is for main-thread-only object // all the references need to be proxy released on main thread. diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 6a0ae4da7270..71ac0fab2e6e 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -10853,6 +10853,68 @@ "n_values": 160, "description": "The longest hash match between a newly added entry and all the existing entries." }, + "NETWORK_CACHE_ISOLATION_SIZE_INCREASE" : { + "record_in_processes": ["main"], + "alert_emails": ["necko@mozilla.com", "mnovotny@mozilla.com"], + "bug_numbers": [1506534], + "expires_in_version": "74", + "kind": "exponential", + "high": 200, + "keyed": true, + "keys": [ + "ALL", + "UNKNOWN", + "OTHER", + "JAVASCRIPT", + "IMAGE", + "MEDIA", + "STYLESHEET", + "WASM" + ], + "n_buckets": 100, + "description": "Percentage increase of cache size that would be caused by first party isolation without deduplication keyed by content type." + }, + "NETWORK_CACHE_ISOLATION_ENTRY_COUNT_INCREASE" : { + "record_in_processes": ["main"], + "alert_emails": ["necko@mozilla.com", "mnovotny@mozilla.com"], + "bug_numbers": [1506534], + "expires_in_version": "74", + "kind": "exponential", + "high": 200, + "keyed": true, + "keys": [ + "ALL", + "UNKNOWN", + "OTHER", + "JAVASCRIPT", + "IMAGE", + "MEDIA", + "STYLESHEET", + "WASM" + ], + "n_buckets": 100, + "description": "Percentage increase of cache entry count that would be caused by first party isolation without deduplication keyed by content type." + }, + "NETWORK_CACHE_ISOLATION_UNIQUE_SITE_ACCESS_COUNT" : { + "record_in_processes": ["main"], + "alert_emails": ["necko@mozilla.com", "mnovotny@mozilla.com"], + "bug_numbers": [1506534], + "expires_in_version": "74", + "kind": "exponential", + "high": 1000, + "keyed": true, + "keys": [ + "UNKNOWN", + "OTHER", + "JAVASCRIPT", + "IMAGE", + "MEDIA", + "STYLESHEET", + "WASM" + ], + "n_buckets": 100, + "description": "Number of unique sites accessing the cache entry keyed by content type." + }, "DATABASE_LOCKED_EXCEPTION": { "record_in_processes": ["main", "content"], "expires_in_version": "42", From 5c233491f3949a13421a2febc685b61560f77286 Mon Sep 17 00:00:00 2001 From: Razvan Caliman Date: Thu, 25 Apr 2019 12:30:09 +0000 Subject: [PATCH 17/60] Bug 1546451 - Fix RTL spacing for inputs in Fonts panel. r=pbro Minor fixes to the layout of inputs in right-to-left (RTL) language layout. To enable RTL, navigate to `about:config` and set `intl.uidirection` to 1. Differential Revision: https://phabricator.services.mozilla.com/D28610 --HG-- extra : moz-landing-system : lando --- devtools/client/themes/fonts.css | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/devtools/client/themes/fonts.css b/devtools/client/themes/fonts.css index 7aa721745542..c8c5acd284ec 100644 --- a/devtools/client/themes/fonts.css +++ b/devtools/client/themes/fonts.css @@ -251,10 +251,10 @@ } .font-value-input { - margin-left: 10px; text-align: right; width: 60px; padding: 2px 3px; + padding-inline-end: 5px; } .font-value-input, @@ -287,25 +287,24 @@ -moz-appearance: textfield; } -/* Do not show number stepper for line height and font-size */ -.font-value-input[name=line-height], -.font-value-input[name=font-size] { - -moz-appearance: textfield; - padding-right: 5px; - border-right: none; +/* Swap around order of value input and unit dropdown for RTL */ +.font-value-input:dir(rtl) { + order: 3; } .font-value-label { /* Combined width of .font-value-input and .font-value-select */ width: calc(60px + 3.8em); - margin-left: 10px; padding-top: 2px; padding-bottom: 4px; } /* Mock separator because inputs don't have distinguishable borders in dark theme */ -.theme-dark .font-value-input + .font-value-select { - margin-left: 2px; +.theme-dark .font-value-input + .font-value-select:dir(ltr) { + margin-inline-start: 2px; +} +.theme-dark .font-value-input + .font-value-select:dir(rtl) { + margin-inline-end: 2px; } /* Custom styles for