From 73f9b2c70d4653fb47c7f60d6c11aa26a0c0b850 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Thu, 23 May 2019 19:47:59 -0400 Subject: Issue #1101 - Support gzip-compressed SVGs in OpenType+SVG fonts --- layout/reftests/text-svgglyphs/reftest.list | 1 + layout/reftests/text-svgglyphs/resources/svg-gz.ttf | Bin 0 -> 113804 bytes .../text-svgglyphs/svg-glyph-compressed-ref.html | 15 +++++++++++++++ .../reftests/text-svgglyphs/svg-glyph-compressed.html | 15 +++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 layout/reftests/text-svgglyphs/resources/svg-gz.ttf create mode 100644 layout/reftests/text-svgglyphs/svg-glyph-compressed-ref.html create mode 100644 layout/reftests/text-svgglyphs/svg-glyph-compressed.html (limited to 'layout') diff --git a/layout/reftests/text-svgglyphs/reftest.list b/layout/reftests/text-svgglyphs/reftest.list index 6f328ab73..7ff341f42 100644 --- a/layout/reftests/text-svgglyphs/reftest.list +++ b/layout/reftests/text-svgglyphs/reftest.list @@ -21,3 +21,4 @@ pref(gfx.font_rendering.opentype_svg.enabled,true) fails == svg-glyph-mask.sv pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-paint-server.svg svg-glyph-paint-server-ref.svg pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-transform.svg svg-glyph-transform-ref.svg pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-extents.html svg-glyph-extents-ref.html +pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-compressed.html svg-glyph-compressed-ref.html diff --git a/layout/reftests/text-svgglyphs/resources/svg-gz.ttf b/layout/reftests/text-svgglyphs/resources/svg-gz.ttf new file mode 100644 index 000000000..3a9660224 Binary files /dev/null and b/layout/reftests/text-svgglyphs/resources/svg-gz.ttf differ diff --git a/layout/reftests/text-svgglyphs/svg-glyph-compressed-ref.html b/layout/reftests/text-svgglyphs/svg-glyph-compressed-ref.html new file mode 100644 index 000000000..9bbfeb748 --- /dev/null +++ b/layout/reftests/text-svgglyphs/svg-glyph-compressed-ref.html @@ -0,0 +1,15 @@ + + +Test for compressed SVG glyphs + +
abcdefg
+
LMNOPQR
+ \ No newline at end of file diff --git a/layout/reftests/text-svgglyphs/svg-glyph-compressed.html b/layout/reftests/text-svgglyphs/svg-glyph-compressed.html new file mode 100644 index 000000000..e8123bba6 --- /dev/null +++ b/layout/reftests/text-svgglyphs/svg-glyph-compressed.html @@ -0,0 +1,15 @@ + + +Test for compressed SVG glyphs + +
abcdefg
+
LMNOPQR
+ \ No newline at end of file -- cgit v1.2.3 From 622ad88c5d0ed8fc301d37b884857123eb17cc56 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Fri, 24 May 2019 20:00:07 +0300 Subject: Lots of time spent maintaining nsDisplayLayerEventRegions (#1116) * Simplify the dispatch-to-content region Simplify the dispatch-to-content region in nsDisplayLayerEventRegions::AddFrame() and AddInactiveScrollPort() if it starts to get large. * tabs to spaces --- layout/base/nsDisplayList.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'layout') diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index c830891a5..a55ec1e39 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -3808,12 +3808,14 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder, // region on scrollbar frames that won't be placed in their own layer. See // bug 1213324 for details. mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox); + mDispatchToContentHitRegion.SimplifyOutward(8); } else if (aFrame->GetType() == nsGkAtoms::objectFrame) { // If the frame is a plugin frame and wants to handle wheel events as // default action, we should add the frame to dispatch-to-content region. nsPluginFrame* pluginFrame = do_QueryFrame(aFrame); if (pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction()) { mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox); + mDispatchToContentHitRegion.SimplifyOutward(8); } } @@ -3850,6 +3852,7 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder, } if (alreadyHadRegions) { mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion()); + mDispatchToContentHitRegion.SimplifyOutward(8); } } } @@ -3859,6 +3862,7 @@ nsDisplayLayerEventRegions::AddInactiveScrollPort(const nsRect& aRect) { mHitRegion.Or(mHitRegion, aRect); mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aRect); + mDispatchToContentHitRegion.SimplifyOutward(8); } bool -- cgit v1.2.3 From fb1b45e5fcb82e76e303665fbb9d04fb2a800b31 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 27 May 2019 19:19:27 +0200 Subject: Improve origin-clean algorithm --- layout/base/nsLayoutUtils.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'layout') diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 07befdc81..17ece8e61 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -8,6 +8,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" +#include "mozilla/dom/CanvasUtils.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/EffectCompositor.h" #include "mozilla/EffectSet.h" @@ -7285,10 +7286,10 @@ nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement, } result.mPrincipal = principal.forget(); - // no images, including SVG images, can load content from another domain. - result.mIsWriteOnly = false; result.mImageRequest = imgRequest.forget(); return result; + result.mIsWriteOnly = + CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); } nsLayoutUtils::SurfaceFromElementResult @@ -7400,7 +7401,8 @@ nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement, result.mHasSize = true; result.mSize = result.mLayersImage->GetSize(); result.mPrincipal = principal.forget(); - result.mIsWriteOnly = false; + result.mIsWriteOnly = + CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); return result; } -- cgit v1.2.3 From f47d45be4b6c8a1fc758d50497a964fc7a75154b Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 4 Jun 2019 23:58:47 +0200 Subject: Revert "Improve origin-clean algorithm" This reverts commit e69b3f567c4b8957cc09ba4359e84939f77781c5. --- layout/base/nsLayoutUtils.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'layout') diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 17ece8e61..07befdc81 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -8,7 +8,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" -#include "mozilla/dom/CanvasUtils.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/EffectCompositor.h" #include "mozilla/EffectSet.h" @@ -7286,10 +7285,10 @@ nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement, } result.mPrincipal = principal.forget(); + // no images, including SVG images, can load content from another domain. + result.mIsWriteOnly = false; result.mImageRequest = imgRequest.forget(); return result; - result.mIsWriteOnly = - CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); } nsLayoutUtils::SurfaceFromElementResult @@ -7401,8 +7400,7 @@ nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement, result.mHasSize = true; result.mSize = result.mLayersImage->GetSize(); result.mPrincipal = principal.forget(); - result.mIsWriteOnly = - CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal); + result.mIsWriteOnly = false; return result; } -- cgit v1.2.3