Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); | 279 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); |
| 280 | 280 |
| 281 bool boxHasOverflowClip = false; | 281 bool boxHasOverflowClip = false; |
| 282 if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) { | 282 if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) { |
| 283 // If overflow has been propagated to the viewport, it has no effect her e. | 283 // If overflow has been propagated to the viewport, it has no effect her e. |
| 284 if (node() != document().viewportDefiningElement()) { | 284 if (node() != document().viewportDefiningElement()) { |
| 285 boxHasOverflowClip = true; | 285 boxHasOverflowClip = true; |
| 286 if (!hasOverflowClip()) { | 286 if (!hasOverflowClip()) { |
| 287 // If we are getting an overflow clip, preemptively erase any ov erflowing content. | 287 // If we are getting an overflow clip, preemptively erase any ov erflowing content. |
| 288 // FIXME: This should probably consult RenderOverflow. | 288 // FIXME: This should probably consult RenderOverflow. |
| 289 repaint(); | 289 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 290 repaint(); | |
| 290 } | 291 } |
| 291 } | 292 } |
| 292 } | 293 } |
| 294 | |
| 295 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && (boxHasOverflowCl ip != hasOverflowClip())) { | |
| 296 // FIXME: This shouldn't be required if we tracked the visual overflow | |
| 297 // generated by positioned children or self painting layers. crbug.com/3 45403 | |
| 298 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { | |
|
esprehn
2014/02/28 02:54:33
You can't do this, you're looking at your children
dsinclair
2014/02/28 18:58:24
Changed to storing a flag here and checking the is
| |
| 299 if (child->hasLayer() && toRenderLayerModelObject(child)->layer()->i sSelfPaintingLayer()) { | |
| 300 LayoutRectRecorder childRecorder(*child); | |
| 301 child->setShouldDoFullRepaintAfterLayout(true); | |
| 302 } | |
| 303 } | |
| 304 } | |
| 305 | |
| 293 setHasOverflowClip(boxHasOverflowClip); | 306 setHasOverflowClip(boxHasOverflowClip); |
| 294 | 307 |
| 295 setHasTransform(styleToUse->hasTransformRelatedProperty()); | 308 setHasTransform(styleToUse->hasTransformRelatedProperty()); |
| 296 setHasReflection(styleToUse->boxReflect()); | 309 setHasReflection(styleToUse->boxReflect()); |
| 297 } | 310 } |
| 298 | 311 |
| 299 void RenderBox::layout() | 312 void RenderBox::layout() |
| 300 { | 313 { |
| 301 ASSERT(needsLayout()); | 314 ASSERT(needsLayout()); |
| 302 | 315 |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1564 } | 1577 } |
| 1565 | 1578 |
| 1566 return false; | 1579 return false; |
| 1567 } | 1580 } |
| 1568 | 1581 |
| 1569 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) | 1582 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) |
| 1570 { | 1583 { |
| 1571 if (!parent()) | 1584 if (!parent()) |
| 1572 return; | 1585 return; |
| 1573 | 1586 |
| 1587 AllowRepaintScope scoper(frameView()); | |
| 1588 | |
| 1574 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || | 1589 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || |
| 1575 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { | 1590 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { |
| 1576 repaint(); | 1591 repaint(); |
| 1577 return; | 1592 return; |
| 1578 } | 1593 } |
| 1579 | 1594 |
| 1580 ShapeValue* shapeOutsideValue = style()->shapeOutside(); | 1595 ShapeValue* shapeOutsideValue = style()->shapeOutside(); |
| 1581 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { | 1596 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { |
| 1582 ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize(); | 1597 ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize(); |
| 1583 markShapeOutsideDependentsForLayout(); | 1598 markShapeOutsideDependentsForLayout(); |
| (...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4699 return 0; | 4714 return 0; |
| 4700 | 4715 |
| 4701 if (!layoutState && !flowThreadContainingBlock()) | 4716 if (!layoutState && !flowThreadContainingBlock()) |
| 4702 return 0; | 4717 return 0; |
| 4703 | 4718 |
| 4704 RenderBlock* containerBlock = containingBlock(); | 4719 RenderBlock* containerBlock = containingBlock(); |
| 4705 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4720 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4706 } | 4721 } |
| 4707 | 4722 |
| 4708 } // namespace WebCore | 4723 } // namespace WebCore |
| OLD | NEW |