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()) { |
| 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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 } | 1568 } |
1558 | 1569 |
1559 return false; | 1570 return false; |
1560 } | 1571 } |
1561 | 1572 |
1562 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) | 1573 void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*) |
1563 { | 1574 { |
1564 if (!parent()) | 1575 if (!parent()) |
1565 return; | 1576 return; |
1566 | 1577 |
| 1578 AllowRepaintScope scoper(frameView()); |
| 1579 |
1567 if ((style()->borderImage().image() && style()->borderImage().image()->data(
) == image) || | 1580 if ((style()->borderImage().image() && style()->borderImage().image()->data(
) == image) || |
1568 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat
a() == image)) { | 1581 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat
a() == image)) { |
1569 repaint(); | 1582 repaint(); |
1570 return; | 1583 return; |
1571 } | 1584 } |
1572 | 1585 |
1573 ShapeValue* shapeOutsideValue = style()->shapeOutside(); | 1586 ShapeValue* shapeOutsideValue = style()->shapeOutside(); |
1574 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue &
& shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { | 1587 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue &
& shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { |
1575 ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize(); | 1588 ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize(); |
1576 markShapeOutsideDependentsForLayout(); | 1589 markShapeOutsideDependentsForLayout(); |
(...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4692 return 0; | 4705 return 0; |
4693 | 4706 |
4694 if (!layoutState && !flowThreadContainingBlock()) | 4707 if (!layoutState && !flowThreadContainingBlock()) |
4695 return 0; | 4708 return 0; |
4696 | 4709 |
4697 RenderBlock* containerBlock = containingBlock(); | 4710 RenderBlock* containerBlock = containingBlock(); |
4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4711 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4699 } | 4712 } |
4700 | 4713 |
4701 } // namespace WebCore | 4714 } // namespace WebCore |
OLD | NEW |