diff options
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/nsDisplayList.cpp | 5 | ||||
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 2 | ||||
-rw-r--r-- | layout/style/nsCSSPseudoElements.h | 2 | ||||
-rw-r--r-- | layout/style/nsCSSRuleProcessor.cpp | 15 | ||||
-rw-r--r-- | layout/style/nsMediaFeatures.cpp | 10 | ||||
-rw-r--r-- | layout/style/test/test_media_queries.html | 7 | ||||
-rw-r--r-- | layout/svg/SVGFEImageFrame.cpp | 6 | ||||
-rw-r--r-- | layout/svg/nsSVGImageFrame.cpp | 6 |
8 files changed, 43 insertions, 10 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 8035269e3..cb55bb2da 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -3513,6 +3513,11 @@ nsDisplayImageContainer::CanOptimizeToImageLayer(LayerManager* aManager, return false; } + if (gfxPrefs::ImageLayerizeAlways()) { + // If the user decides to trade off quality for performance, so be it! + return true; + } + const int32_t factor = mFrame->PresContext()->AppUnitsPerDevPixel(); const LayoutDeviceRect destRect = LayoutDeviceRect::FromAppUnits(GetDestRect(), factor); diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 9d8dd81bf..062fbfe15 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -5057,7 +5057,7 @@ nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis, NS_PRECONDITION(aFrame->GetParent(), "IntrinsicForAxis called on frame not in tree"); NS_PRECONDITION(aType == MIN_ISIZE || aType == PREF_ISIZE, "bad type"); - MOZ_ASSERT(aFrame->GetParent()->Type() != LayoutFrameType::GridContainer || + MOZ_ASSERT(aFrame->GetParent()->GetType() != nsGkAtoms::gridContainerFrame || aPercentageBasis.isSome(), "grid layout should always pass a percentage basis"); diff --git a/layout/style/nsCSSPseudoElements.h b/layout/style/nsCSSPseudoElements.h index eaf8d966b..acf818a2c 100644 --- a/layout/style/nsCSSPseudoElements.h +++ b/layout/style/nsCSSPseudoElements.h @@ -111,7 +111,7 @@ private: // which is a general gcc bug that we seem to have hit only on Android/x86. #if defined(ANDROID) && defined(__i386__) && defined(__GNUC__) && \ !defined(__clang__) -#if (MOZ_GCC_VERSION_AT_LEAST(4,9,0) && MOZ_GCC_VERSION_AT_MOST(4,9,2)) +#if (MOZ_GCC_VERSION_AT_MOST(4,9,2)) __attribute__((noinline)) #endif #endif diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 8760a330e..810a8f8f0 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -1122,6 +1122,11 @@ InitSystemMetrics() sSystemMetrics->AppendElement(nsGkAtoms::mac_graphite_theme); } + rv = LookAndFeel::GetInt(LookAndFeel::eIntID_MacLionTheme, &metricResult); + if (NS_SUCCEEDED(rv) && metricResult) { + sSystemMetrics->AppendElement(nsGkAtoms::mac_lion_theme); + } + rv = LookAndFeel::GetInt(LookAndFeel::eIntID_MacYosemiteTheme, &metricResult); if (NS_SUCCEEDED(rv) && metricResult) { sSystemMetrics->AppendElement(nsGkAtoms::mac_yosemite_theme); @@ -1161,7 +1166,7 @@ InitSystemMetrics() if (NS_SUCCEEDED(rv) && metricResult) { sSystemMetrics->AppendElement(nsGkAtoms::touch_enabled); } - + rv = LookAndFeel::GetInt(LookAndFeel::eIntID_SwipeAnimationEnabled, &metricResult); if (NS_SUCCEEDED(rv) && metricResult) { @@ -1539,7 +1544,7 @@ checkGenericEmptyMatches(Element* aElement, do { child = aElement->GetChildAt(++index); // stop at first non-comment (and non-whitespace for - // :-moz-only-whitespace) node + // :-moz-only-whitespace) node } while (child && !IsSignificantChild(child, true, isWhitespaceSignificant)); return (child == nullptr); } @@ -2233,7 +2238,7 @@ static bool SelectorMatches(Element* aElement, NS_ASSERTION(hasAttr, "HasAttr lied"); result = AttrMatchesValue(attr, value, isHTML); } - + attr = attr->mNext; } while (attr && result); } @@ -3085,7 +3090,7 @@ nsCSSRuleProcessor::AppendFontFaceRules( if (!aArray.AppendElements(cascade->mFontFaceRules)) return false; } - + return true; } @@ -3129,7 +3134,7 @@ nsCSSRuleProcessor::AppendPageRules( return false; } } - + return true; } diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp index 5a54d5455..854236e51 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -706,6 +706,14 @@ nsMediaFeatures::features[] = { GetSystemMetric }, { + &nsGkAtoms::_moz_mac_lion_theme, + nsMediaFeature::eMinMaxNotAllowed, + nsMediaFeature::eBoolInteger, + nsMediaFeature::eNoRequirements, + { &nsGkAtoms::mac_lion_theme }, + GetSystemMetric + }, + { &nsGkAtoms::_moz_mac_yosemite_theme, nsMediaFeature::eMinMaxNotAllowed, nsMediaFeature::eBoolInteger, @@ -728,7 +736,7 @@ nsMediaFeatures::features[] = { nsMediaFeature::eNoRequirements, { &nsGkAtoms::windows_accent_color_is_dark }, GetSystemMetric - }, + }, { &nsGkAtoms::_moz_windows_compositor, nsMediaFeature::eMinMaxNotAllowed, diff --git a/layout/style/test/test_media_queries.html b/layout/style/test/test_media_queries.html index d503fad0b..59fe030c2 100644 --- a/layout/style/test/test_media_queries.html +++ b/layout/style/test/test_media_queries.html @@ -627,6 +627,7 @@ function run() { expression_should_be_parseable("-moz-overlay-scrollbars"); expression_should_be_parseable("-moz-windows-default-theme"); expression_should_be_parseable("-moz-mac-graphite-theme"); + expression_should_be_parseable("-moz-mac-lion-theme"); expression_should_be_parseable("-moz-mac-yosemite-theme"); expression_should_be_parseable("-moz-windows-accent-color-applies"); expression_should_be_parseable("-moz-windows-compositor"); @@ -643,6 +644,7 @@ function run() { expression_should_be_parseable("-moz-overlay-scrollbars: 0"); expression_should_be_parseable("-moz-windows-default-theme: 0"); expression_should_be_parseable("-moz-mac-graphite-theme: 0"); + expression_should_be_parseable("-moz-mac-lion-theme: 0"); expression_should_be_parseable("-moz-mac-yosemite-theme: 0"); expression_should_be_parseable("-moz-windows-accent-color-applies: 0"); expression_should_be_parseable("-moz-windows-compositor: 0"); @@ -659,6 +661,7 @@ function run() { expression_should_be_parseable("-moz-overlay-scrollbars: 1"); expression_should_be_parseable("-moz-windows-default-theme: 1"); expression_should_be_parseable("-moz-mac-graphite-theme: 1"); + expression_should_be_parseable("-moz-mac-lion-theme: 1"); expression_should_be_parseable("-moz-mac-yosemite-theme: 1"); expression_should_be_parseable("-moz-windows-accent-color-applies: 1"); expression_should_be_parseable("-moz-windows-compositor: 1"); @@ -675,6 +678,7 @@ function run() { expression_should_not_be_parseable("-moz-overlay-scrollbars: -1"); expression_should_not_be_parseable("-moz-windows-default-theme: -1"); expression_should_not_be_parseable("-moz-mac-graphite-theme: -1"); + expression_should_not_be_parseable("-moz-mac-lion-theme: -1"); expression_should_not_be_parseable("-moz-mac-yosemite-theme: -1"); expression_should_not_be_parseable("-moz-windows-accent-color-applies: -1"); expression_should_not_be_parseable("-moz-windows-compositor: -1"); @@ -691,6 +695,7 @@ function run() { expression_should_not_be_parseable("-moz-overlay-scrollbars: true"); expression_should_not_be_parseable("-moz-windows-default-theme: true"); expression_should_not_be_parseable("-moz-mac-graphite-theme: true"); + expression_should_not_be_parseable("-moz-mac-lion-theme: true"); expression_should_not_be_parseable("-moz-mac-yosemite-theme: true"); expression_should_not_be_parseable("-moz-windows-accent-color-applies: true"); expression_should_not_be_parseable("-moz-windows-compositor: true"); @@ -844,5 +849,3 @@ function handle_iframe_onload(event) </pre> </body> </html> - - diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index 185096a93..b1f98c421 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -107,6 +107,12 @@ SVGFEImageFrame::Init(nsIContent* aContent, nsFrame::Init(aContent, aParent, aPrevInFlow); // We assume that feImage's are always visible. + // This call must happen before the FrameCreated. This is because the + // primary frame pointer on our content node isn't set until after this + // function ends, so there is no way for the resulting OnVisibilityChange + // notification to get a frame. FrameCreated has a workaround for this in + // that it passes our frame around so it can be accessed. OnVisibilityChange + // doesn't have that workaround. IncApproximateVisibleCount(); nsCOMPtr<nsIImageLoadingContent> imageLoader = diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index c0a7f9419..2d6f75d26 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -159,6 +159,12 @@ nsSVGImageFrame::Init(nsIContent* aContent, if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) { // Non-display frames are likely to be patterns, masks or the like. // Treat them as always visible. + // This call must happen before the FrameCreated. This is because the + // primary frame pointer on our content node isn't set until after this + // function ends, so there is no way for the resulting OnVisibilityChange + // notification to get a frame. FrameCreated has a workaround for this in + // that it passes our frame around so it can be accessed. OnVisibilityChange + // doesn't have that workaround. IncApproximateVisibleCount(); } |