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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 334463002: Delete MaskImageChanged, VideoChanged, and FullScreenChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 if (shouldDrawBackgroundInSeparateBuffer) 1477 if (shouldDrawBackgroundInSeparateBuffer)
1478 context->endLayer(); 1478 context->endLayer();
1479 } 1479 }
1480 1480
1481 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, 1481 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect,
1482 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject* backgroundObject) 1482 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject* backgroundObject)
1483 { 1483 {
1484 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay outSize(), op, backgroundObject); 1484 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay outSize(), op, backgroundObject);
1485 } 1485 }
1486 1486
1487 static bool layersUseImage(WrappedImagePtr image, const FillLayer* layers)
1488 {
1489 for (const FillLayer* curLayer = layers; curLayer; curLayer = curLayer->next ()) {
1490 if (curLayer->image() && image == curLayer->image()->data())
1491 return true;
1492 }
1493
1494 return false;
1495 }
1496
1497 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) 1487 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*)
1498 { 1488 {
1499 if (!parent()) 1489 if (!parent())
1500 return; 1490 return;
1501 1491
1502 AllowPaintInvalidationScope scoper(frameView()); 1492 AllowPaintInvalidationScope scoper(frameView());
1503 1493
1504 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || 1494 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) ||
1505 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { 1495 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) {
1506 repaint(); 1496 repaint();
1507 return; 1497 return;
1508 } 1498 }
1509 1499
1510 ShapeValue* shapeOutsideValue = style()->shapeOutside(); 1500 ShapeValue* shapeOutsideValue = style()->shapeOutside();
1511 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { 1501 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) {
1512 ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty(); 1502 ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
1513 markShapeOutsideDependentsForLayout(); 1503 markShapeOutsideDependentsForLayout();
1514 } 1504 }
1515 1505
1516 bool didFullRepaint = repaintLayerRectsForImage(image, style()->backgroundLa yers(), true); 1506 bool didFullRepaint = repaintLayerRectsForImage(image, style()->backgroundLa yers(), true);
1517 if (!didFullRepaint) 1507 if (!didFullRepaint)
1518 repaintLayerRectsForImage(image, style()->maskLayers(), false); 1508 repaintLayerRectsForImage(image, style()->maskLayers(), false);
1519
1520 if (hasLayer() && layer()->hasCompositedMask() && layersUseImage(image, styl e()->maskLayers()))
1521 layer()->contentChanged(MaskImageChanged);
1522 } 1509 }
1523 1510
1524 bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer * layers, bool drawingBackground) 1511 bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer * layers, bool drawingBackground)
1525 { 1512 {
1526 LayoutRect rendererRect; 1513 LayoutRect rendererRect;
1527 RenderBox* layerRenderer = 0; 1514 RenderBox* layerRenderer = 0;
1528 1515
1529 for (const FillLayer* curLayer = layers; curLayer; curLayer = curLayer->next ()) { 1516 for (const FillLayer* curLayer = layers; curLayer; curLayer = curLayer->next ()) {
1530 if (curLayer->image() && image == curLayer->image()->data() && curLayer- >image()->canRender(*this, style()->effectiveZoom())) { 1517 if (curLayer->image() && image == curLayer->image()->data() && curLayer- >image()->canRender(*this, style()->effectiveZoom())) {
1531 // Now that we know this image is being used, compute the renderer a nd the rect if we haven't already. 1518 // Now that we know this image is being used, compute the renderer a nd the rect if we haven't already.
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after
4697 return 0; 4684 return 0;
4698 4685
4699 if (!layoutState && !flowThreadContainingBlock()) 4686 if (!layoutState && !flowThreadContainingBlock())
4700 return 0; 4687 return 0;
4701 4688
4702 RenderBlock* containerBlock = containingBlock(); 4689 RenderBlock* containerBlock = containingBlock();
4703 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4690 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4704 } 4691 }
4705 4692
4706 } // namespace WebCore 4693 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderBoxModelObject.h » ('j') | Source/core/rendering/RenderVideo.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698