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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 void RenderObject::repaintOverflowIfNeeded() | 1617 void RenderObject::repaintOverflowIfNeeded() |
| 1618 { | 1618 { |
| 1619 if (shouldRepaintOverflow()) | 1619 if (shouldRepaintOverflow()) |
| 1620 repaintOverflow(); | 1620 repaintOverflow(); |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 bool RenderObject::checkForRepaint() const | 1623 bool RenderObject::checkForRepaint() const |
| 1624 { | 1624 { |
| 1625 return !document().view()->needsFullRepaint() && !hasLayer() && everHadLayou t(); | 1625 return !hasLayer() && everHadLayout(); |
|
dsinclair
2014/03/20 10:41:41
Won't this end up triggering more invalidations? P
Xianzhu
2014/03/20 17:47:43
It seems hard to weigh between full repaint and ch
| |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 bool RenderObject::checkForRepaintDuringLayout() const | 1628 bool RenderObject::checkForRepaintDuringLayout() const |
| 1629 { | 1629 { |
| 1630 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai nt(); | 1630 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai nt(); |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const | 1633 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const |
| 1634 { | 1634 { |
| 1635 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); | 1635 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3352 { | 3352 { |
| 3353 if (object1) { | 3353 if (object1) { |
| 3354 const WebCore::RenderObject* root = object1; | 3354 const WebCore::RenderObject* root = object1; |
| 3355 while (root->parent()) | 3355 while (root->parent()) |
| 3356 root = root->parent(); | 3356 root = root->parent(); |
| 3357 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3357 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3358 } | 3358 } |
| 3359 } | 3359 } |
| 3360 | 3360 |
| 3361 #endif | 3361 #endif |
| OLD | NEW |