diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-29 22:58:52 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-29 22:58:52 +0200 |
commit | e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51 (patch) | |
tree | f8d4d2b62b2bcd2f5b37ce7cbf6fa873cff185b0 /layout | |
parent | bfb36627c66ff8a27da7c1bace60496352fd096b (diff) | |
parent | e4b2fa17baea1d35d80de19ffb90d9ba2a1033f8 (diff) | |
download | UXP-e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51.tar UXP-e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51.tar.gz UXP-e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51.tar.lz UXP-e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51.tar.xz UXP-e09746b2f34ce69c7bc4c86b1f90f62b7c8d9c51.zip |
Merge branch 'master' into Pale_Moon-release
# Conflicts:
# application/palemoon/config/version.txt
# security/manager/ssl/nsSTSPreloadList.errors
# security/manager/ssl/nsSTSPreloadList.inc
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/FrameLayerBuilder.cpp | 4 | ||||
-rw-r--r-- | layout/base/nsDisplayList.cpp | 6 | ||||
-rw-r--r-- | layout/base/nsDisplayList.h | 2 | ||||
-rw-r--r-- | layout/reftests/text-svgglyphs/reftest.list | 1 | ||||
-rw-r--r-- | layout/reftests/text-svgglyphs/resources/svg-gz.ttf | bin | 0 -> 113804 bytes | |||
-rw-r--r-- | layout/reftests/text-svgglyphs/svg-glyph-compressed-ref.html | 15 | ||||
-rw-r--r-- | layout/reftests/text-svgglyphs/svg-glyph-compressed.html | 15 |
7 files changed, 41 insertions, 2 deletions
diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 183285439..9aaa28fb5 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3648,6 +3648,10 @@ PaintedLayerData::AccumulateEventRegions(ContainerState* aState, nsDisplayLayerE if (alreadyHadRegions) { mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion()); } + + // Avoid quadratic performance as a result of the region growing to include + // and arbitrarily large number of rects, which can happen on some pages. + mMaybeHitRegion.SimplifyOutward(8); // Calculate scaled versions of the bounds of mHitRegion and mMaybeHitRegion // for quick access in FindPaintedLayerFor(). diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index d619576ba..a55ec1e39 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1096,7 +1096,6 @@ void nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame, const nsFrameList& aFrames, const nsRect& aDirtyRect) { - mFramesMarkedForDisplay.SetCapacity(mFramesMarkedForDisplay.Length() + aFrames.GetLength()); for (nsIFrame* e : aFrames) { // Skip the AccessibleCaret frame when building no caret. if (!IsBuildingCaret()) { @@ -1108,6 +1107,7 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame, } } } + mFramesMarkedForDisplay.AppendElement(e); MarkOutOfFlowFrameForDisplay(aDirtyFrame, e, aDirtyRect); } @@ -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 diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index c9f773f5b..fcdc9e4fc 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -1200,7 +1200,7 @@ private: PLArenaPool mPool; nsCOMPtr<nsISelection> mBoundingSelection; AutoTArray<PresShellState,8> mPresShellStates; - AutoTArray<nsIFrame*,100> mFramesMarkedForDisplay; + AutoTArray<nsIFrame*,400> mFramesMarkedForDisplay; AutoTArray<ThemeGeometry,2> mThemeGeometries; nsDisplayTableItem* mCurrentTableItem; DisplayListClipState mClipState; 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 Binary files differnew file mode 100644 index 000000000..3a9660224 --- /dev/null +++ b/layout/reftests/text-svgglyphs/resources/svg-gz.ttf 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 @@ +<!DOCTYPE html> +<html><head> +<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Test for compressed SVG glyphs</title> +<style> + @font-face { + font-family: test; + src: url(resources/svg.woff); /* uses uncompressed SVG documents */ + } + html { width: 400px; height: 400px; background-color: white; } + body { margin: 0; } + div { font: 200px test; color: fuchsia; line-height: 1; stroke: none; } +</style> +</head><body><div>abcdefg</div> +<div>LMNOPQR</div> +</body></html>
\ 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 @@ +<!DOCTYPE html> +<html><head> +<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Test for compressed SVG glyphs</title> +<style> + @font-face { + font-family: test; + src: url(resources/svg-gz.ttf); /* copy of svg.woff using gzip-compressed SVG documents */ + } + html { width: 400px; height: 400px; background-color: white; } + body { margin: 0; } + div { font: 200px test; color: fuchsia; line-height: 1; stroke: none; } +</style> +</head><body><div>abcdefg</div> +<div>LMNOPQR</div> +</body></html>
\ No newline at end of file |