From 1c5d25a761c121e58b72d0cf3ba872f4c822389f Mon Sep 17 00:00:00 2001 From: roytam1 Date: Thu, 9 Feb 2023 12:45:41 +0800 Subject: [PATCH] import changes from `dev' branch of rmottola/Arctic-Fox: - Bug 1217373 - [Presentation WebAPI] Avoid B2G crash due to potential excessive releases in PresentationSessionTransport. r=jdm (58598d7b43) - Bug 1200969 - Fix timing issue in PresentationRequestUIGlue. r=fabrice (a9d4efcfb0) - Bug 1217712 - Part 1 - reject session request to packaged app with no "presentation" permission. r=seanlin. (300835465b) - Bug 1217712 - Part 2 - handle abnormal control channel close with no reason. r=seanlin. (deca080f98) - Bug 1196947 - Performance tools should display a message in private browsing, r=jsantell (c184a61fa1) - Bug 1103094 - Add accessor for nsIProfilerStartParams to nsIProfiler. r=BenWa (694cffcb92) - Bug 366324 - Make SVG favicons work reliably. r=mak (7ba59f3165) - Bug 1190364 - "With electrolysis (e10s) enabled and lots of tabs open, plugincheck often fails to find any plugins". r=billm (9eb8843429) - Bug 1103094 - Start profiling subprocesses if the parent process is already profiling. r=BenWa (a53480a19e) - Bug 1228489 - ifdef out ContentParent::StartProfiler for builds without profiler support. r=BenWa (2ef1eabf21) - Bug 1211266 - Remote blobs coming from a different thread and a different manager must be kept alive until the creation of depending RemoteBlobs is not completed, r=bent, f=gerard-majax (bb0e2c4731) - Bug 1098131 - Don't invalidate layers when simply changing SizeMode r=smaug,jimm (d6febd1e61) - Bug 1187784 (part 5) - Replace nsBaseHashtable::EnumerateRead() calls in layout/ with iterators. r=heycam. (4f63429fb9) - Bug 1187784 (part 6) - Replace nsBaseHashtable::EnumerateRead() calls in layout/ with iterators. r=heycam. (e6ee55faac) - Bug 1187784 (part 7) - Replace nsBaseHashtable::EnumerateRead() calls in layout/ with iterators. r=heycam. (562892894a) - Bug 1187784 (part 8) - Replace nsBaseHashtable::EnumerateRead() calls in layout/ with iterators. r=heycam. (3171c52a3a) - Bug 1187784 (part 9) - Replace nsBaseHashtable::EnumerateRead() calls in layout/ with iterators. r=heycam. (7e5cb8f45b) - Bug 1163907 - Remove #ifdef PR_LOGGING in AccessibleCaretLogger (0fcee5100f) - Bug 1219470 - Replace PRLogModuleInfo with LazyLogModule. r=roc (0385266aac) - bit of Bug 1165518 - Part 2 (9b2aa1607f) - Bug 1221902 part 1 - NS_RELEASE SheetLoadData::mNext iteratively instead of recursively to avoid blowing up the stack. r=bz (6598fea496) - Bug 1187144 (part 5) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (4c87a8f678) - Bug 1187144 (part 6) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (d3155de1bb) - Bug 1187144 (part 7) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (a0c1f927c9) - Bug 1187144 (part 2) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (0bcf383a4f) - Bug 1219898 - Remove unneccessary gPreventMouseEvents flag. r=smaug (4e0dcf7e15) - Bug 1187144 (part 1) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=heycam. (7b6a125dcd) - Bug 1187144 (part 3) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (64f8a5288e) - Bug 1158540 - Don't repeat the mRefCnt member of URLValue in ImageValue; r=dbaron (4ac4602546) - Bug 1187144 (part 4) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. (d781f47d77) - Bug 1187144 (part 8) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=heycam. (e5d8deeb33) - Bug 1219898 - Remove legacy handling of touch events for non-APZ e10s platforms. r=smaug (f928694ff8) - Bug 1187144 (part 9) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=heycam. (0464196554) - Bug 1172012 - Fixes a copy & paste error in nsCSSValue.cpp. r=heycam (fe61a7740b) - Bug 1176782 part 3 - [css-align] Implement additional syntax and values for the 'justify-content' property in the style system. r=cam (95eb9717b1) - Bug 1215702 patch 1 - Remove the CSS properties that use CSS_PROP_BACKENDONLY (marks, orphans, page, size, widows), i.e., properties that were added in early Gecko days but never actually implemented. r=heycam (4344349699) - Bug 1215702 patch 2 - Remove the mechanism of backend-only CSS properties. r=heycam (3ae81722c2) - Bug 1176782 part 4 - [css-align] Implement additional syntax and values for the 'align-items' property in the style system. r=cam (8048af001a) - Bug 1176782 part 5 - [css-align] Implement additional syntax and values for the 'align-self' property in the style system. r=cam (b0505102c0) - Bug 1176782 part 6 - [css-align] Implement additional syntax and values for the 'align-content' property in the style system. r=cam (7b40da66ce) - Bug 1176782 part 7 - [css-align] Update the flexbox layout code to use the new align/justify style constants and remove the old in the style system. r=cam (67ee4f892a) - Bug 1176782 part 8 - [css-align] Update three tests that assumed that the computed value of 'align-items' is 'stretch' on all types of boxes which is no longer true. (72a358dce2) - Bug 1223568: Don't let fallback alignment values break flexbox special-case for "justify-content: stretch". r=mats (329012fbb2) - Bug 1224804 - [css-align] Make ::-moz-table-outer inherit 'justify-self'. r=dholbert (4e0c2b4d9b) - Bug 1158540 follow-up: Improve the comment (8a7b4a962f) - Bug 1227377: Change ImageRequest::mRequests hashtable to use more specific type in its key (s/nsISupports/nsIDocument/). r=khuey (eea7692f2c) - Bug 1168154 - Mark refcounted members of nsCSSValue::mValue as MOZ_OWNING_REF. r=heycam (2f9db113f1) - Bug 1228188 - ifdef around Skia GetMaxSurfaceSize usage. r=eihrul (ea0eaa0ea4) - Bug 1040668 part 1 - Avoid queuing transition event for disabled properties. r=dbaron (07fbda65d4) - Bug 1139640 test: Add mochitest for DOM properties for CSS properties. r=heycam (f995e71ce7) - Bug 1180083 - Avoid shadowing info() in test_property_database.html. r=dbaron (266f90254b) - Bug 1208136: Give property_database.js a helper-function for pref lookups, to catch exceptions thrown for missing about:config prefs. r=dbaron (4ecd90f34e) - Bug 1176792 part 1 - [css-grid] Implement the 'grid-column-gap', 'grid-row-gap', and 'grid-gap' properties in the style system. r=dholbert,dbaron (83d78611c5) - Bug 1151213 part 2 - [css-grid][css-align] Reftests for the 'align-self' and 'justify-self' properties on grid items. (7c38f737f4) - Bug 1151213 part 1 - [css-grid][css-align] Implement layout for the 'align-self' and 'justify-self' properties on grid items. r=dholbert (4e08c284e6) - Bug 1151214 part 3 - [css-grid][css-align] Implement layout for the 'justify-content' and 'align-content' CSS properties on grid containers. r=dholbert (8a90fa412c) - Bug 1222880 - Build a tree of AnimatedGeometryRoots to speed up traversal of ancestors. r=roc,tn (f9843046ae) - Bug 1226875 - Remove nsIFrame::GetFirstChild(). r=mats (a21a74365a) - Bug 1165667: Use reflow state's reference rendering context during flex layout, instead of creating a temporary one. r=mats (e8afd8bdb6) - Bug 1151214 part 2 - [css-flexbox][css-align] Shim implemention for the new align/justify property values in flexbox layout (just to avoid fatal assertions). r=dholbert (1350c46c90) - Bug 1155312: Convert flex container nsHTMLReflowMetrics/aDesiredSize-populating code to use logical coords. r=mats (54a61f1910) - Bug 1223653 patch 1 - Fix incorrect function being called, caught by enum class type checking in next patch. r=jfkthame (91b2eb348f) - Bug 1224464 patch 1 - Make nsCSSKeyword explicitly int16_t. r=heycam (7d6f615af5) - Bug 1224464 patch 2 - Make nsCSSProps keyword tables be arrays of structs, to represent what they logically are. r=heycam (d21a2de083) - Bug 1215424 - Convert ParseBoxProperty to CSSParseResult and remove ParseBoxPropertyVariant. r=heycam (4aff994d0d) - Bug 837211 - Add -webkit prefixed aliases for various CSS properties, behind an off-by-default preference. r=bzbarsky (35889a3a30) - Bug 1211101 part 1: Fix existing style system mochitests to accomodate webkit-prefixed property aliases. r=heycam (237efadebb) - Bug 1210905 part 2: Remove now-unneeded *_values & prerequisites fields from aliases in property_database.js. r=heycam (ed311c73c5) - Bug 1211101 part 2: Add supported (preffed off) webkit-prefixed CSS property aliases to property_database.js, for use in mochitests. r=heycam (5c3b7305f0) - Bug 1179444: Add support for CSS properties -webkit-backface-visibility, -webkit-perspective, and -webkit-perspective-origin, as aliases (behind a pref). r=heycam (73b2c60d52) - Bug 1208635 part 1: Add support for several prefixed CSS properties associated with -webkit-box, as aliases for modern flexbox properties (and behind a pref). r=heycam (9baa2ba20a) - Bug 1208635 part 2: Extend existing parser code for CSSUnprefixingService "-webkit-box" handling to also activate if native unprefixing is enabled. r=heycam (89cc559272) - Bug 1208635 part 3: Treat "-webkit-box" as a known CSS keyword, for better parsing performance. r=heycam (26a452e2cd) - Bug 1210905 part 1: Make property_database.js automatically populate aliasing properties' *_values & prerequisites fields based on their alias target. r=heycam (a33d38d153) - Bug 1210905 followup: Restore accidentally-removed 'subproperties' list on -moz-transform-style in style-system mochitest file property_database.js. (no review) (870de9afcb) - Bug 1212607 - Re-expose -moz-window-dragging property to the content. r=dbaron (073f318ab0) - Bug 1169837 - Remove box-sizing: padding-box in FF UI & Gecko Tests. r=dholbert (5581f54d75) - Bug 1212191: In CSS mochitest helper-file "property_database.js", add subproperties array for aliases that are missing it, and make it mandatory for CSS_TYPE_SHORTHAND_AND_LONGHAND. r=heycam (0edd14cb7f) - Bug 1176968 part 1: Refactor media-query parsing logic to use nsDependentString, to better allow for multiple consecutive prefixes. r=heycam (f3412f99e4) - some XP theme stuff (245f69a17e) - Bug 1179393: Add support for -webkit-border-image longhand CSS properties, as aliases (behind a pref). r=heycam (c95d45f6eb) - Bug 1195884 - Reject CSS 'will-change: will-change' for spec compliance. r=dholbert (8e9c2cefa9) - Bug 1176792 part 2 - [css-grid] Implement layout for the 'grid-column-gap' and 'grid-row-gap' properties. r=dholbert (c12fd29616) - Bug 1151214 part 4 - [css-grid][css-align] Add reftests for the 'justify-content' and 'align-content' CSS properties on grid containers. (4924ad5e98) - Bug 1176792 part 3 - [css-grid] Reftests for the 'grid-column-gap' and 'grid-row-gap' properties. (1bc2319d82) - Bug 1224464 patch 3 - Rename KTableValue to KTableEntry now that it is a struct. r=heycam (4ebf24dcab) - Bug 1224464 followup - Fix bustage on opt builds on CLOSED TREE (b23cee92e9) --- b2g/components/PresentationRequestUIGlue.js | 55 +- .../presentation_ui_glue_handler_chrome.js | 13 +- .../test_presentation_request_ui_glue.html | 31 +- browser/themes/shared/aboutNetError.css | 2 +- docshell/base/nsDocShell.cpp | 20 +- docshell/base/nsDocShell.h | 2 + docshell/base/nsIDocShell.idl | 8 +- dom/base/StructuredCloneHolder.cpp | 9 +- dom/base/test/test_bug320799.html | 2 +- dom/events/test/test_bug603008.html | 10 +- dom/interfaces/base/nsITabParent.idl | 13 +- dom/ipc/Blob.cpp | 130 +- dom/ipc/BlobChild.h | 3 + dom/ipc/ContentChild.cpp | 16 +- dom/ipc/ContentChild.h | 5 +- dom/ipc/ContentParent.cpp | 59 +- dom/ipc/ContentParent.h | 5 + dom/ipc/PBlob.ipdl | 5 + dom/ipc/PBrowser.ipdl | 2 +- dom/ipc/PContent.ipdl | 6 +- dom/ipc/TabChild.cpp | 189 +- dom/ipc/TabChild.h | 23 +- dom/ipc/TabParent.cpp | 10 +- dom/plugins/base/nsPluginHost.cpp | 19 +- dom/plugins/base/nsPluginHost.h | 6 +- dom/plugins/ipc/PPluginModule.ipdl | 4 +- dom/plugins/ipc/PluginBridge.h | 2 +- dom/plugins/ipc/PluginModuleChild.cpp | 16 +- dom/plugins/ipc/PluginModuleChild.h | 5 +- dom/plugins/ipc/PluginModuleParent.cpp | 10 +- dom/presentation/PresentationSessionInfo.cpp | 2 +- .../PresentationSessionTransport.cpp | 22 +- .../PresentationSessionTransport.h | 5 +- gfx/2d/Factory.cpp | 2 +- gfx/src/nsCoord.h | 17 + ipc/glue/BackgroundParentImpl.cpp | 13 + ipc/glue/BackgroundParentImpl.h | 4 + layout/base/AccessibleCaretLogger.cpp | 27 - layout/base/AccessibleCaretLogger.h | 21 +- layout/base/FrameLayerBuilder.cpp | 249 +- layout/base/LayoutLogging.cpp | 14 +- layout/base/LayoutLogging.h | 6 +- layout/base/RestyleTracker.cpp | 41 +- layout/base/SelectionCarets.cpp | 6 +- layout/base/TouchCaret.cpp | 6 +- layout/base/TouchManager.cpp | 26 +- layout/base/TouchManager.h | 1 - layout/base/moz.build | 1 - layout/base/nsBidiPresUtils.cpp | 2 +- layout/base/nsCSSFrameConstructor.cpp | 8 +- layout/base/nsCounterManager.cpp | 134 +- layout/base/nsDisplayList.cpp | 158 +- layout/base/nsDisplayList.h | 147 +- layout/base/nsDocumentViewer.cpp | 12 +- layout/base/nsIPresShell.h | 8 +- layout/base/nsLayoutDebugger.cpp | 4 +- layout/base/nsLayoutUtils.cpp | 93 +- layout/base/nsLayoutUtils.h | 40 - layout/base/nsPresShell.cpp | 100 +- layout/base/nsPresShell.h | 4 +- layout/base/nsRefreshDriver.cpp | 7 +- layout/forms/test/test_textarea_resize.html | 2 +- layout/generic/crashtests/1223568-1.html | 2 + layout/generic/crashtests/1223568-2.html | 6 + layout/generic/crashtests/crashtests.list | 2 + layout/generic/nsBlockFrame.cpp | 6 +- layout/generic/nsCanvasFrame.h | 2 +- layout/generic/nsFlexContainerFrame.cpp | 302 +- layout/generic/nsFrame.cpp | 30 +- layout/generic/nsFrame.h | 17 +- layout/generic/nsGfxScrollFrame.cpp | 2 +- layout/generic/nsGridContainerFrame.cpp | 583 +++- layout/generic/nsGridContainerFrame.h | 1 + layout/generic/nsHTMLReflowState.cpp | 28 +- layout/generic/nsIFrame.h | 6 +- layout/generic/nsPageFrame.cpp | 4 +- layout/generic/nsPluginFrame.cpp | 15 +- layout/generic/nsSimplePageSequenceFrame.cpp | 12 +- layout/generic/nsTextFrame.cpp | 2 +- layout/inspector/inDOMUtils.cpp | 10 +- layout/printing/nsPrintData.cpp | 12 +- layout/printing/nsPrintEngine.cpp | 14 +- .../box-properties/box-sizing-1-ref.html | 12 - .../reftests/box-properties/box-sizing-1.html | 13 - .../box-properties/box-sizing-2-ref.html | 11 - .../reftests/box-properties/box-sizing-2.html | 12 - .../reftests/box-properties/box-sizing-3.html | 13 - .../box-properties/box-sizing-4-ref.html | 12 - .../reftests/box-properties/box-sizing-4.html | 13 - .../box-sizing-mozbox-minmax-height-ref.html | 5 - .../box-sizing-mozbox-minmax-height.html | 10 - .../computed-size-reporting-ref.html | 12 - .../box-sizing/computed-size-reporting.html | 13 - layout/reftests/box-sizing/intrinsic-1a.html | 2 +- layout/reftests/box-sizing/intrinsic-1b.html | 2 +- layout/reftests/box-sizing/intrinsic-1d.html | 2 +- layout/reftests/box-sizing/intrinsic-1e.html | 2 +- layout/reftests/box-sizing/intrinsic-1f.html | 2 +- .../css-display/display-contents-acid.html | 2 +- .../css-grid/grid-abspos-items-001-ref.html | 25 +- .../css-grid/grid-abspos-items-001.html | 25 +- .../css-grid/grid-abspos-items-002-ref.html | 25 +- .../css-grid/grid-abspos-items-002.html | 25 +- .../css-grid/grid-align-content-001-ref.html | 91 + .../css-grid/grid-align-content-001.html | 90 + .../css-grid/grid-column-gap-001-ref.html | 124 + .../css-grid/grid-column-gap-001.html | 100 + .../css-grid/grid-column-gap-002-ref.html | 90 + .../css-grid/grid-column-gap-002.html | 91 + .../css-grid/grid-column-gap-003-ref.html | 90 + .../css-grid/grid-column-gap-003.html | 90 + .../css-grid/grid-item-align-001-ref.html | 190 ++ .../css-grid/grid-item-align-001.html | 107 + .../css-grid/grid-item-align-002-ref.html | 127 + .../css-grid/grid-item-align-002.html | 108 + .../css-grid/grid-item-align-003-ref.html | 118 + .../css-grid/grid-item-align-003.html | 128 + .../css-grid/grid-item-justify-001-ref.html | 121 + .../css-grid/grid-item-justify-001.html | 108 + .../css-grid/grid-item-justify-002-ref.html | 120 + .../css-grid/grid-item-justify-002.html | 108 + .../css-grid/grid-item-stretch-001-ref.html | 109 + .../css-grid/grid-item-stretch-001.html | 117 + .../grid-justify-content-001-ref.html | 92 + .../css-grid/grid-justify-content-001.html | 90 + .../grid-justify-content-002-ref.html | 62 + .../css-grid/grid-justify-content-002.html | 67 + .../grid-justify-content-003-ref.html | 115 + .../css-grid/grid-justify-content-003.html | 96 + .../grid-placement-auto-implicit-001-ref.html | 26 +- .../grid-placement-auto-implicit-001.html | 13 +- ...d-placement-definite-implicit-001-ref.html | 2 +- .../grid-placement-definite-implicit-001.html | 2 +- .../css-grid/grid-relpos-items-001-ref.html | 17 +- .../css-grid/grid-relpos-items-001.html | 7 +- .../css-grid/grid-row-gap-001-ref.html | 91 + .../reftests/css-grid/grid-row-gap-001.html | 91 + layout/reftests/css-grid/reftest.list | 14 + .../flexbox-align-self-horiz-003-ref.xhtml | 2 +- .../ui3/box-sizing-padding-box-001-ref.xht | 40 - .../ui3/box-sizing-padding-box-001.xht | 43 - .../ui3/box-sizing-padding-box-002-ref.xht | 42 - .../ui3/box-sizing-padding-box-002.xht | 45 - .../ui3/box-sizing-padding-box-003-ref.xht | 42 - .../ui3/box-sizing-padding-box-003.xht | 49 - .../submitted/ui3/box-sizing-replaced-001.xht | 2 +- .../w3c-css/submitted/ui3/reftest.list | 3 - layout/style/CSSVariableDeclarations.cpp | 105 +- layout/style/CSSVariableDeclarations.h | 11 - layout/style/CounterStyleManager.cpp | 112 +- layout/style/Declaration.cpp | 31 + layout/style/FontFaceSet.cpp | 25 +- layout/style/Loader.cpp | 156 +- layout/style/nsCSSKeywordList.h | 1 + layout/style/nsCSSKeywords.h | 2 +- layout/style/nsCSSParser.cpp | 360 ++- layout/style/nsCSSPropAliasList.h | 188 ++ layout/style/nsCSSPropList.h | 148 +- layout/style/nsCSSProps.cpp | 2519 ++++++++--------- layout/style/nsCSSProps.h | 338 +-- layout/style/nsCSSRuleProcessor.cpp | 15 + layout/style/nsCSSValue.cpp | 79 +- layout/style/nsCSSValue.h | 50 +- layout/style/nsComputedDOMStyle.cpp | 122 +- layout/style/nsComputedDOMStyle.h | 10 +- layout/style/nsComputedDOMStylePropertyList.h | 2 + layout/style/nsHTMLCSSStyleSheet.cpp | 35 +- layout/style/nsMediaFeatures.cpp | 21 +- layout/style/nsMediaFeatures.h | 2 +- layout/style/nsRuleData.h | 13 +- layout/style/nsRuleNode.cpp | 159 +- layout/style/nsStyleConsts.h | 36 +- layout/style/nsStyleStruct.cpp | 108 +- layout/style/nsStyleStruct.h | 35 +- layout/style/nsStyleStructFwd.h | 6 - layout/style/nsTransitionManager.cpp | 15 +- layout/style/test/ListCSSProperties.cpp | 1 - layout/style/test/property_database.js | 1007 ++++--- layout/style/test/test_bug1112014.html | 12 +- layout/style/test/test_ch_ex_no_infloops.html | 3 - .../test_compute_data_with_start_struct.html | 4 +- .../test/test_flexbox_align_self_auto.html | 20 +- .../test_grid_shorthand_serialization.html | 52 +- .../style/test/test_inherit_computation.html | 2 - .../style/test/test_initial_computation.html | 2 - layout/style/test/test_property_database.html | 63 +- .../test/test_transitions_per_property.html | 10 + .../style/test/test_unprefixing_service.html | 7 +- .../test/test_unprefixing_service_prefs.html | 8 +- layout/style/test/test_value_cloning.html | 39 +- layout/style/test/test_value_computation.html | 7 +- layout/style/test/test_value_storage.html | 44 +- layout/style/ua.css | 5 +- layout/xul/tree/nsTreeBodyFrame.cpp | 32 +- layout/xul/tree/nsTreeBodyFrame.h | 2 + modules/libpref/init/all.js | 3 + testing/profiles/prefs_general.js | 3 + ...t_query_result_favicon_changed_on_child.js | 40 +- .../tests/favicons/test_replaceFaviconData.js | 8 +- .../components/places/tests/head_common.js | 16 +- .../places/tests/unit/test_svg_favicon.js | 30 + .../components/places/tests/unit/xpcshell.ini | 1 + toolkit/content/widgets/browser.xml | 9 + tools/profiler/core/GeckoSampler.cpp | 6 + tools/profiler/core/GeckoSampler.h | 4 + tools/profiler/core/platform.cpp | 32 + tools/profiler/gecko/ProfilerTypes.ipdlh | 16 + tools/profiler/gecko/nsIProfiler.idl | 41 +- tools/profiler/gecko/nsProfiler.cpp | 39 + tools/profiler/moz.build | 6 + tools/profiler/public/GeckoProfiler.h | 9 + tools/profiler/public/GeckoProfilerFunc.h | 5 + tools/profiler/public/GeckoProfilerImpl.h | 9 + widget/LookAndFeel.h | 5 + 214 files changed, 8201 insertions(+), 4541 deletions(-) delete mode 100644 layout/base/AccessibleCaretLogger.cpp create mode 100644 layout/generic/crashtests/1223568-1.html create mode 100644 layout/generic/crashtests/1223568-2.html create mode 100644 layout/reftests/css-grid/grid-align-content-001-ref.html create mode 100644 layout/reftests/css-grid/grid-align-content-001.html create mode 100644 layout/reftests/css-grid/grid-column-gap-001-ref.html create mode 100644 layout/reftests/css-grid/grid-column-gap-001.html create mode 100644 layout/reftests/css-grid/grid-column-gap-002-ref.html create mode 100644 layout/reftests/css-grid/grid-column-gap-002.html create mode 100644 layout/reftests/css-grid/grid-column-gap-003-ref.html create mode 100644 layout/reftests/css-grid/grid-column-gap-003.html create mode 100644 layout/reftests/css-grid/grid-item-align-001-ref.html create mode 100644 layout/reftests/css-grid/grid-item-align-001.html create mode 100644 layout/reftests/css-grid/grid-item-align-002-ref.html create mode 100644 layout/reftests/css-grid/grid-item-align-002.html create mode 100644 layout/reftests/css-grid/grid-item-align-003-ref.html create mode 100644 layout/reftests/css-grid/grid-item-align-003.html create mode 100644 layout/reftests/css-grid/grid-item-justify-001-ref.html create mode 100644 layout/reftests/css-grid/grid-item-justify-001.html create mode 100644 layout/reftests/css-grid/grid-item-justify-002-ref.html create mode 100644 layout/reftests/css-grid/grid-item-justify-002.html create mode 100644 layout/reftests/css-grid/grid-item-stretch-001-ref.html create mode 100644 layout/reftests/css-grid/grid-item-stretch-001.html create mode 100644 layout/reftests/css-grid/grid-justify-content-001-ref.html create mode 100644 layout/reftests/css-grid/grid-justify-content-001.html create mode 100644 layout/reftests/css-grid/grid-justify-content-002-ref.html create mode 100644 layout/reftests/css-grid/grid-justify-content-002.html create mode 100644 layout/reftests/css-grid/grid-justify-content-003-ref.html create mode 100644 layout/reftests/css-grid/grid-justify-content-003.html create mode 100644 layout/reftests/css-grid/grid-row-gap-001-ref.html create mode 100644 layout/reftests/css-grid/grid-row-gap-001.html delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-001-ref.xht delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-001.xht delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-002-ref.xht delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-002.xht delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-003-ref.xht delete mode 100644 layout/reftests/w3c-css/submitted/ui3/box-sizing-padding-box-003.xht create mode 100644 toolkit/components/places/tests/unit/test_svg_favicon.js create mode 100644 tools/profiler/gecko/ProfilerTypes.ipdlh diff --git a/b2g/components/PresentationRequestUIGlue.js b/b2g/components/PresentationRequestUIGlue.js index 45306c825d..6cc0f84b48 100644 --- a/b2g/components/PresentationRequestUIGlue.js +++ b/b2g/components/PresentationRequestUIGlue.js @@ -4,6 +4,10 @@ "use strict" +function debug(aMsg) { + //dump("-*- PresentationRequestUIGlue: " + aMsg + "\n"); +} + const { interfaces: Ci, utils: Cu, classes: Cc } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -26,31 +30,50 @@ function PresentationRequestUIGlue() { SystemAppProxy.addEventListener("mozPresentationContentEvent", aEvent => { let detail = aEvent.detail; - if (detail.type != "presentation-receiver-launched") { - return; - } + switch (detail.type) { + case "presentation-receiver-launched": { + let sessionId = detail.id; + let resolver = this._resolvers[sessionId]; + if (!resolver) { + debug("No correspondent resolver for session ID: " + sessionId); + return; + } - let sessionId = detail.sessionId; - let resolver = this._resolvers[sessionId]; - if (!resolver) { - return; - } + delete this._resolvers[sessionId]; + resolver.resolve(detail.frame); + break; + } + case "presentation-receiver-permission-denied": { + let sessionId = detail.id; + let resolver = this._resolvers[sessionId]; + if (!resolver) { + debug("No correspondent resolver for session ID: " + sessionId); + return; + } - delete this._resolvers[sessionId]; - resolver(detail.frame); + delete this._resolvers[sessionId]; + resolver.reject(); + break; + } + default: + return; + } }); } PresentationRequestUIGlue.prototype = { sendRequest: function(aUrl, aSessionId) { - SystemAppProxy._sendCustomEvent("mozPresentationChromeEvent", - { type: "presentation-launch-receiver", - url: aUrl, - id: aSessionId }); - return new Promise(function(aResolve, aReject) { - this._resolvers[aSessionId] = aResolve; + this._resolvers[aSessionId] = { + resolve: aResolve, + reject: aReject, + }; + + SystemAppProxy._sendCustomEvent("mozPresentationChromeEvent", + { type: "presentation-launch-receiver", + url: aUrl, + id: aSessionId }); }.bind(this)); }, diff --git a/b2g/components/test/mochitest/presentation_ui_glue_handler_chrome.js b/b2g/components/test/mochitest/presentation_ui_glue_handler_chrome.js index 3c98cc74f7..1d1c874bb0 100644 --- a/b2g/components/test/mochitest/presentation_ui_glue_handler_chrome.js +++ b/b2g/components/test/mochitest/presentation_ui_glue_handler_chrome.js @@ -20,16 +20,13 @@ SystemAppProxy.addEventListener('mozPresentationChromeEvent', function(aEvent) { addMessageListener('trigger-ui-glue', function(aData) { var promise = glue.sendRequest(aData.url, aData.sessionId); - promise.then(function(aFrame){ + promise.then(function(aFrame) { sendAsyncMessage('iframe-resolved', aFrame); + }).catch(function() { + sendAsyncMessage('iframe-rejected'); }); }); -addMessageListener('trigger-presentation-content-event', function(aData) { - var detail = { - type: 'presentation-receiver-launched', - sessionId: aData.sessionId, - frame: aData.frame - }; - SystemAppProxy._sendCustomEvent('mozPresentationContentEvent', detail); +addMessageListener('trigger-presentation-content-event', function(aDetail) { + SystemAppProxy._sendCustomEvent('mozPresentationContentEvent', aDetail); }); diff --git a/b2g/components/test/mochitest/test_presentation_request_ui_glue.html b/b2g/components/test/mochitest/test_presentation_request_ui_glue.html index 2f5608f556..29ac37221b 100644 --- a/b2g/components/test/mochitest/test_presentation_request_ui_glue.html +++ b/b2g/components/test/mochitest/test_presentation_request_ui_glue.html @@ -4,7 +4,7 @@ - http://creativecommons.org/publicdomain/zero/1.0/ --> - Test for Presentation Device Selection + Test for Presentation UI Glue @@ -57,14 +57,41 @@ function testReceiverLaunched() { document.body.appendChild(iframe); gScript.sendAsyncMessage('trigger-presentation-content-event', - { sessionId : sessionId, + { type: 'presentation-receiver-launched', + id: sessionId, frame: iframe }); }); } +function testLaunchError() { + return new Promise(function(aResolve, aReject) { + gScript.addMessageListener('presentation-launch-receiver', function launchReceiverHandler(aDetail) { + gScript.removeMessageListener('presentation-launch-receiver', launchReceiverHandler); + ok(true, "A presentation-launch-receiver mozPresentationChromeEvent should be received."); + is(aDetail.url, url, "Url should be the same."); + is(aDetail.id, sessionId, "Session ID should be the same."); + + gScript.addMessageListener('iframe-rejected', function iframeRejectedHandler() { + gScript.removeMessageListener('iframe-rejected', iframeRejectedHandler); + ok(true, "The promise should be rejected."); + aResolve(); + }); + + gScript.sendAsyncMessage('trigger-presentation-content-event', + { type: 'presentation-receiver-permission-denied', + id: sessionId }); + }); + + gScript.sendAsyncMessage('trigger-ui-glue', + { url: url, + sessionId : sessionId }); + }); +} + function runTests() { testLaunchReceiver() .then(testReceiverLaunched) + .then(testLaunchError) .then(function() { info('test finished, teardown'); gScript.destroy(); diff --git a/browser/themes/shared/aboutNetError.css b/browser/themes/shared/aboutNetError.css index 71da6fbf79..205fd431b4 100644 --- a/browser/themes/shared/aboutNetError.css +++ b/browser/themes/shared/aboutNetError.css @@ -6,7 +6,7 @@ body { display: flex; - box-sizing: padding-box; + box-sizing: border-box; min-height: 100vh; padding: 0 48px; align-items: center; diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 0150474de1..1b2b0f86a7 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5959,8 +5959,20 @@ nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen) return NS_OK; } +NS_IMETHODIMP +nsDocShell::SetIsActiveAndForeground(bool aIsActive) +{ + return SetIsActiveInternal(aIsActive, false); +} + NS_IMETHODIMP nsDocShell::SetIsActive(bool aIsActive) +{ + return SetIsActiveInternal(aIsActive, true); +} + +nsresult +nsDocShell::SetIsActiveInternal(bool aIsActive, bool aIsHidden) { // We disallow setting active on chrome docshells. if (mItemType == nsIDocShellTreeItem::typeChrome) { @@ -5973,7 +5985,7 @@ nsDocShell::SetIsActive(bool aIsActive) // Tell the PresShell about it. nsCOMPtr pshell = GetPresShell(); if (pshell) { - pshell->SetIsActive(aIsActive); + pshell->SetIsActive(aIsActive, aIsHidden); } // Tell the window about it @@ -6007,7 +6019,11 @@ nsDocShell::SetIsActive(bool aIsActive) } if (!docshell->GetIsBrowserOrApp()) { - docshell->SetIsActive(aIsActive); + if (aIsHidden) { + docshell->SetIsActive(aIsActive); + } else { + docshell->SetIsActiveAndForeground(aIsActive); + } } } diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 6ef1b9f706..61ce522bbc 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -490,6 +490,8 @@ protected: uint32_t aRedirectFlags, uint32_t aStateFlags) override; + nsresult SetIsActiveInternal(bool aIsActive, bool aIsHidden); + /** * Helper function that determines if channel is an HTTP POST. * diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 16e80f0bf9..5b8162c623 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -46,7 +46,7 @@ interface nsITabParent; typedef unsigned long nsLoadFlags; -[scriptable, builtinclass, uuid(b1df6e41-c8dd-45c2-bc18-dd330d986214)] +[scriptable, builtinclass, uuid(41b1cf17-b37b-4a62-9df8-5f67cfecab3f)] interface nsIDocShell : nsIDocShellTreeItem { /** @@ -617,6 +617,12 @@ interface nsIDocShell : nsIDocShellTreeItem */ attribute boolean isActive; + /** + * Sets whether a docshell is active, as above, but ensuring it does + * not discard its layers + */ + void setIsActiveAndForeground(in boolean aIsActive); + /** * Puts the docshell in prerendering mode. noscript because we want only * native code to be able to put a docshell in prerendering. diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp index 253a919aa7..1c00f0191e 100644 --- a/dom/base/StructuredCloneHolder.cpp +++ b/dom/base/StructuredCloneHolder.cpp @@ -559,14 +559,15 @@ EnsureBlobForBackgroundManager(BlobImpl* aBlobImpl, PBackgroundChild* aManager = nullptr) { MOZ_ASSERT(aBlobImpl); + RefPtr blobImpl = aBlobImpl; if (!aManager) { aManager = BackgroundChild::GetForCurrentThread(); - MOZ_ASSERT(aManager); + if (!aManager) { + return blobImpl.forget(); + } } - RefPtr blobImpl = aBlobImpl; - const nsTArray>* subBlobImpls = aBlobImpl->GetSubBlobImpls(); @@ -671,6 +672,8 @@ WriteBlob(JSStructuredCloneWriter* aWriter, RefPtr blobImpl = EnsureBlobForBackgroundManager(aBlob->Impl()); MOZ_ASSERT(blobImpl); + MOZ_ALWAYS_TRUE(NS_SUCCEEDED(blobImpl->SetMutable(false))); + // We store the position of the blobImpl in the array as index. if (JS_WriteUint32Pair(aWriter, SCTAG_DOM_BLOB, aHolder->BlobImpls().Length())) { diff --git a/dom/base/test/test_bug320799.html b/dom/base/test/test_bug320799.html index c160283aba..c40485d01f 100644 --- a/dom/base/test/test_bug320799.html +++ b/dom/base/test/test_bug320799.html @@ -11,7 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=320799 Mozilla Bug 320799

-