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 | |
Julien - ping for review
2014/03/07 18:26:38
Wouldn't the patch on https://codereview.chromium.
| |
298 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { | |
299 LayoutRectRecorder childRecorder(*child); | |
300 child->setShouldDoFullRepaintIfSelfPaintingLayer(true); | |
301 } | |
302 } | |
303 | |
293 setHasOverflowClip(boxHasOverflowClip); | 304 setHasOverflowClip(boxHasOverflowClip); |
294 | 305 |
295 setHasTransform(styleToUse->hasTransformRelatedProperty()); | 306 setHasTransform(styleToUse->hasTransformRelatedProperty()); |
296 setHasReflection(styleToUse->boxReflect()); | 307 setHasReflection(styleToUse->boxReflect()); |
297 } | 308 } |
298 | 309 |
299 void RenderBox::layout() | 310 void RenderBox::layout() |
300 { | 311 { |
301 ASSERT(needsLayout()); | 312 ASSERT(needsLayout()); |
302 | 313 |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1563 } | 1574 } |
1564 | 1575 |
1565 return false; | 1576 return false; |
1566 } | 1577 } |
1567 | 1578 |
1568 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) | 1579 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) |
1569 { | 1580 { |
1570 if (!parent()) | 1581 if (!parent()) |
1571 return; | 1582 return; |
1572 | 1583 |
1584 AllowRepaintScope scoper(frameView()); | |
1585 | |
1573 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || | 1586 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || |
1574 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { | 1587 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { |
1575 repaint(); | 1588 repaint(); |
1576 return; | 1589 return; |
1577 } | 1590 } |
1578 | 1591 |
1579 ShapeValue* shapeOutsideValue = style()->shapeOutside(); | 1592 ShapeValue* shapeOutsideValue = style()->shapeOutside(); |
1580 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { | 1593 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { |
1581 ShapeOutsideInfo::ensureInfo(this)->markShapeAsDirty(); | 1594 ShapeOutsideInfo::ensureInfo(this)->markShapeAsDirty(); |
1582 markShapeOutsideDependentsForLayout(); | 1595 markShapeOutsideDependentsForLayout(); |
(...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4698 return 0; | 4711 return 0; |
4699 | 4712 |
4700 if (!layoutState && !flowThreadContainingBlock()) | 4713 if (!layoutState && !flowThreadContainingBlock()) |
4701 return 0; | 4714 return 0; |
4702 | 4715 |
4703 RenderBlock* containerBlock = containingBlock(); | 4716 RenderBlock* containerBlock = containingBlock(); |
4704 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4717 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4705 } | 4718 } |
4706 | 4719 |
4707 } // namespace WebCore | 4720 } // namespace WebCore |
OLD | NEW |