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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1536 return ""; | 1536 return ""; |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 void RenderObject::repaintTreeAfterLayout(const RenderLayerModelObject& repaintC ontainer) | 1539 void RenderObject::repaintTreeAfterLayout(const RenderLayerModelObject& repaintC ontainer) |
| 1540 { | 1540 { |
| 1541 // If we didn't need invalidation then our children don't need as well. | 1541 // If we didn't need invalidation then our children don't need as well. |
| 1542 // Skip walking down the tree as everything should be fine below us. | 1542 // Skip walking down the tree as everything should be fine below us. |
| 1543 if (!shouldCheckForInvalidationAfterLayout()) | 1543 if (!shouldCheckForInvalidationAfterLayout()) |
| 1544 return; | 1544 return; |
| 1545 | 1545 |
| 1546 clearRepaintState(); | |
| 1547 | |
| 1548 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { | 1546 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { |
| 1549 if (!child->isOutOfFlowPositioned()) | 1547 if (!child->isOutOfFlowPositioned()) |
| 1550 child->repaintTreeAfterLayout(repaintContainer); | 1548 child->repaintTreeAfterLayout(repaintContainer); |
| 1551 } | 1549 } |
| 1550 | |
| 1551 clearRepaintState(); | |
|
dsinclair
2014/05/20 17:37:39
This puts a dependency on the children checking th
| |
| 1552 } | 1552 } |
| 1553 | 1553 |
| 1554 static PassRefPtr<JSONValue> jsonObjectForOldAndNewRects(const LayoutRect& oldRe ct, const LayoutRect& newRect) | 1554 static PassRefPtr<JSONValue> jsonObjectForOldAndNewRects(const LayoutRect& oldRe ct, const LayoutRect& newRect) |
| 1555 { | 1555 { |
| 1556 RefPtr<JSONObject> object = JSONObject::create(); | 1556 RefPtr<JSONObject> object = JSONObject::create(); |
| 1557 | 1557 |
| 1558 object->setValue("old", jsonObjectForRect(oldRect)); | 1558 object->setValue("old", jsonObjectForRect(oldRect)); |
| 1559 object->setValue("new", jsonObjectForRect(newRect)); | 1559 object->setValue("new", jsonObjectForRect(newRect)); |
| 1560 return object.release(); | 1560 return object.release(); |
| 1561 } | 1561 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 void RenderObject::repaintOverflowIfNeeded() | 1710 void RenderObject::repaintOverflowIfNeeded() |
| 1711 { | 1711 { |
| 1712 if (shouldRepaintOverflow()) | 1712 if (shouldRepaintOverflow()) |
| 1713 repaintOverflow(); | 1713 repaintOverflow(); |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 bool RenderObject::checkForRepaint() const | 1716 bool RenderObject::checkForRepaint() const |
| 1717 { | 1717 { |
| 1718 return !document().view()->needsFullRepaint() && everHadLayout(); | 1718 return !view()->shouldDoFullRepaintAfterLayout() && everHadLayout(); |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 bool RenderObject::checkForRepaintDuringLayout() const | 1721 bool RenderObject::checkForRepaintDuringLayout() const |
| 1722 { | 1722 { |
| 1723 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai nt(); | 1723 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai nt(); |
| 1724 } | 1724 } |
| 1725 | 1725 |
| 1726 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const | 1726 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const |
| 1727 { | 1727 { |
| 1728 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); | 1728 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); |
| (...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3460 { | 3460 { |
| 3461 if (object1) { | 3461 if (object1) { |
| 3462 const WebCore::RenderObject* root = object1; | 3462 const WebCore::RenderObject* root = object1; |
| 3463 while (root->parent()) | 3463 while (root->parent()) |
| 3464 root = root->parent(); | 3464 root = root->parent(); |
| 3465 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3465 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3466 } | 3466 } |
| 3467 } | 3467 } |
| 3468 | 3468 |
| 3469 #endif | 3469 #endif |
| OLD | NEW |