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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights |
6 * reserved. | 6 * reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 else if (child->isElementNode()) | 1323 else if (child->isElementNode()) |
1324 toElement(child)->rebuildLayoutTree(); | 1324 toElement(child)->rebuildLayoutTree(); |
1325 } | 1325 } |
1326 } | 1326 } |
1327 // This is done in ContainerNode::attachLayoutTree but will never be cleared | 1327 // This is done in ContainerNode::attachLayoutTree but will never be cleared |
1328 // if we don't enter ContainerNode::attachLayoutTree so we do it here. | 1328 // if we don't enter ContainerNode::attachLayoutTree so we do it here. |
1329 clearChildNeedsStyleRecalc(); | 1329 clearChildNeedsStyleRecalc(); |
1330 clearChildNeedsReattachLayoutTree(); | 1330 clearChildNeedsReattachLayoutTree(); |
1331 } | 1331 } |
1332 | 1332 |
| 1333 void ContainerNode::recalcDescendantStylesForReattach() { |
| 1334 for (Node* child = lastChild(); child; child = child->previousSibling()) { |
| 1335 if (child->isElementNode()) |
| 1336 toElement(child)->recalcStyleForReattach(); |
| 1337 } |
| 1338 } |
| 1339 |
1333 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, | 1340 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, |
1334 Element* changedElement, | 1341 Element* changedElement, |
1335 Node* nodeBeforeChange, | 1342 Node* nodeBeforeChange, |
1336 Node* nodeAfterChange) { | 1343 Node* nodeAfterChange) { |
1337 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || | 1344 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || |
1338 getStyleChangeType() >= SubtreeStyleChange) | 1345 getStyleChangeType() >= SubtreeStyleChange) |
1339 return; | 1346 return; |
1340 | 1347 |
1341 if (!hasRestyleFlag(ChildrenAffectedByStructuralRules)) | 1348 if (!hasRestyleFlag(ChildrenAffectedByStructuralRules)) |
1342 return; | 1349 return; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 return true; | 1509 return true; |
1503 | 1510 |
1504 if (node->isElementNode() && toElement(node)->shadow()) | 1511 if (node->isElementNode() && toElement(node)->shadow()) |
1505 return true; | 1512 return true; |
1506 | 1513 |
1507 return false; | 1514 return false; |
1508 } | 1515 } |
1509 #endif | 1516 #endif |
1510 | 1517 |
1511 } // namespace blink | 1518 } // namespace blink |
OLD | NEW |