Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 711203002: Remove zoom() and effectiveZoom(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 7369453da0a1acee726c1b4825807caa72dc064e..4639623dbf4f3e971e1d9d7c3b9eb35d6fdc2a04 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -130,19 +130,6 @@ void RenderBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle
parent()->setChildNeedsLayout();
}
- // If our zoom factor changes and we have a defined scrollLeft/Top, we need to adjust that value into the
- // new zoomed coordinate space.
- if (hasOverflowClip() && oldStyle && newStyle && oldStyle->effectiveZoom() != newStyle->effectiveZoom() && layer()) {
- if (int left = layer()->scrollableArea()->scrollXOffset()) {
- left = (left / oldStyle->effectiveZoom()) * newStyle->effectiveZoom();
- layer()->scrollableArea()->scrollToXOffset(left);
- }
- if (int top = layer()->scrollableArea()->scrollYOffset()) {
- top = (top / oldStyle->effectiveZoom()) * newStyle->effectiveZoom();
- layer()->scrollableArea()->scrollToYOffset(top);
- }
- }
-
// Our opaqueness might have changed without triggering layout.
if (diff.needsPaintInvalidation()) {
RenderObject* parentToInvalidate = parent();
@@ -976,7 +963,7 @@ bool RenderBox::backgroundHasOpaqueTopLayer() const
if (hasOverflowClip() && fillLayer.attachment() == LocalBackgroundAttachment)
return false;
- if (fillLayer.hasOpaqueImage(this) && fillLayer.hasRepeatXY() && fillLayer.image()->canRender(*this, style()->effectiveZoom()))
+ if (fillLayer.hasOpaqueImage(this) && fillLayer.hasRepeatXY() && fillLayer.image()->canRender(*this))
return true;
// If there is only one layer and no image, check whether the background color is opaque
@@ -1070,7 +1057,7 @@ void RenderBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, cons
shouldDrawBackgroundInSeparateBuffer = true;
// The clipOccludesNextLayers condition must be evaluated first to avoid short-circuiting.
- if (curLayer->clipOccludesNextLayers(curLayer == &fillLayer) && curLayer->hasOpaqueImage(this) && curLayer->image()->canRender(*this, style()->effectiveZoom()) && curLayer->hasRepeatXY() && curLayer->blendMode() == WebBlendModeNormal && !boxShadowShouldBeAppliedToBackground(bleedAvoidance))
+ if (curLayer->clipOccludesNextLayers(curLayer == &fillLayer) && curLayer->hasOpaqueImage(this) && curLayer->image()->canRender(*this) && curLayer->hasRepeatXY() && curLayer->blendMode() == WebBlendModeNormal && !boxShadowShouldBeAppliedToBackground(bleedAvoidance))
break;
curLayer = curLayer->next();
}
@@ -1135,7 +1122,7 @@ bool RenderBox::paintInvalidationLayerRectsForImage(WrappedImagePtr image, const
layerRenderer = this;
for (const FillLayer* curLayer = &layers; curLayer; curLayer = curLayer->next()) {
- if (curLayer->image() && image == curLayer->image()->data() && curLayer->image()->canRender(*this, style()->effectiveZoom())) {
+ if (curLayer->image() && image == curLayer->image()->data() && curLayer->image()->canRender(*this)) {
layerRenderer->setShouldDoFullPaintInvalidation(true);
return true;
}
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698