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 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 | 404 |
| 405 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check | 405 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check |
| 406 // of clipping change. Will remove when we remove rect-based paint invalidat ion. | 406 // of clipping change. Will remove when we remove rect-based paint invalidat ion. |
| 407 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() | 407 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() |
| 408 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( ) | 408 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( ) |
| 409 && !usesCompositedScrolling() | 409 && !usesCompositedScrolling() |
| 410 // Note that isLayoutView() below becomes unnecessary after the launch o f root layer scrolling. | 410 // Note that isLayoutView() below becomes unnecessary after the launch o f root layer scrolling. |
| 411 && (hasOverflowClip() || isLayoutView())) | 411 && (hasOverflowClip() || isLayoutView())) |
| 412 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); | 412 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); |
| 413 | 413 |
| 414 // SVGForeignObject clips descendants and needs to over-invalidate to ensure | |
| 415 // newly exposed content repaints. | |
| 416 // TODO(pdr): SVGForeignObject supports overflow clipping using a different | |
| 417 // approach than LayoutBlock (see LayoutSVGBlock::allowsOverflowClip). This | |
| 418 // over-invalidation should be removed when overflow is unified. | |
| 419 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() | |
|
wkorman
2016/08/23 23:13:10
This is just a minor adaptation of your patch:
htt
pdr.
2016/08/24 18:12:19
I am not sure if my original patch was on the righ
Xianzhu
2016/08/24 18:19:48
I think the zoom case works because we layout the
fs
2016/08/24 19:11:44
Like Xianzhu say, zoom ought to trigger layout for
pdr.
2016/08/24 19:55:23
I see, that makes sense.
Would something like the
| |
| 420 && isSVGForeignObject() | |
| 421 && !styleRef().isOverflowVisible()) { | |
| 422 // We'd like to only force subtree invalidation if the paint | |
| 423 // invalidation rect changes, but on window zoom for foreign objects we | |
| 424 // have to invalidate regardless. | |
| 425 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); | |
| 426 } | |
| 427 | |
| 414 newPaintInvalidationState.updateForChildren(reason); | 428 newPaintInvalidationState.updateForChildren(reason); |
| 415 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); | 429 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); |
| 416 } | 430 } |
| 417 | 431 |
| 418 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason, const LayoutObject& object) c onst | 432 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason, const LayoutObject& object) c onst |
| 419 { | 433 { |
| 420 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. | 434 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. |
| 421 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 435 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 422 | 436 |
| 423 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, | 437 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1138 if (rootElementStyle->hasBackground()) | 1152 if (rootElementStyle->hasBackground()) |
| 1139 return false; | 1153 return false; |
| 1140 | 1154 |
| 1141 if (node() != document().firstBodyElement()) | 1155 if (node() != document().firstBodyElement()) |
| 1142 return false; | 1156 return false; |
| 1143 | 1157 |
| 1144 return true; | 1158 return true; |
| 1145 } | 1159 } |
| 1146 | 1160 |
| 1147 } // namespace blink | 1161 } // namespace blink |
| OLD | NEW |