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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1362 bool fullInvalidation = view()->doingFullPaintInvalidation() || isFullPaintI nvalidationReason(invalidationReason); | 1362 bool fullInvalidation = view()->doingFullPaintInvalidation() || isFullPaintI nvalidationReason(invalidationReason); |
1363 if (!fullInvalidation && !shouldInvalidateSelection()) | 1363 if (!fullInvalidation && !shouldInvalidateSelection()) |
1364 return; | 1364 return; |
1365 | 1365 |
1366 LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation(); | 1366 LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation(); |
1367 LayoutRect newSelectionRect = selectionRectForPaintInvalidation(&paintInvali dationContainer); | 1367 LayoutRect newSelectionRect = selectionRectForPaintInvalidation(&paintInvali dationContainer); |
1368 | 1368 |
1369 // Composited scrolling should not be included in the bounds and position tr acking, because the graphics layer backing the scroller | 1369 // Composited scrolling should not be included in the bounds and position tr acking, because the graphics layer backing the scroller |
1370 // does not move on scroll. | 1370 // does not move on scroll. |
1371 if (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidati onContainer != this) { | 1371 if (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidati onContainer != this) { |
1372 LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrol ledContentOffset()); | 1372 LayoutSize inverseOffset= LayoutSize(toLayoutBox(&paintInvalidationConta iner)->scrolledContentOffset()); |
chrishtr
2015/12/18 01:58:07
space before =
Xianzhu
2015/12/18 18:28:24
An incomplete cleanup of debug code. Reverted.
| |
1373 newSelectionRect.move(inverseOffset); | 1373 newSelectionRect.move(inverseOffset); |
1374 } | 1374 } |
1375 | 1375 |
1376 setPreviousSelectionRectForPaintInvalidation(newSelectionRect); | 1376 setPreviousSelectionRectForPaintInvalidation(newSelectionRect); |
1377 | 1377 |
1378 if (shouldInvalidateSelection()) | 1378 if (shouldInvalidateSelection()) |
1379 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onSelection, nullptr); | 1379 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onSelection, nullptr); |
1380 | 1380 |
1381 if (fullInvalidation) | 1381 if (fullInvalidation) |
1382 return; | 1382 return; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1594 return; | 1594 return; |
1595 | 1595 |
1596 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) { | 1596 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) { |
1597 rect.move(paintInvalidationState->paintOffset()); | 1597 rect.move(paintInvalidationState->paintOffset()); |
1598 if (paintInvalidationState->isClipped()) | 1598 if (paintInvalidationState->isClipped()) |
1599 rect.intersect(paintInvalidationState->clipRect()); | 1599 rect.intersect(paintInvalidationState->clipRect()); |
1600 return; | 1600 return; |
1601 } | 1601 } |
1602 | 1602 |
1603 if (LayoutObject* o = parent()) { | 1603 if (LayoutObject* o = parent()) { |
1604 if (o != paintInvalidationContainer && o->hasOverflowClip()) { | 1604 if (o->hasOverflowClip()) { |
szager1
2015/12/18 17:30:51
Doh! Thanks for fixing this.
| |
1605 LayoutBox* boxParent = toLayoutBox(o); | 1605 toLayoutBox(o)->applyCachedClipAndScrollOffsetForPaintInvalidationIf Needed(paintInvalidationContainer, rect); |
1606 if (o == paintInvalidationContainer) | |
1607 boxParent->applyCachedScrollOffsetForPaintInvalidation(rect); | |
1608 else | |
1609 boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(re ct); | |
1610 if (rect.isEmpty()) | 1606 if (rect.isEmpty()) |
1611 return; | 1607 return; |
1612 } | 1608 } |
1613 | |
1614 o->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, pa intInvalidationState); | 1609 o->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, pa intInvalidationState); |
1615 } | 1610 } |
1616 } | 1611 } |
1617 | 1612 |
1618 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) | 1613 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) |
1619 { | 1614 { |
1620 } | 1615 } |
1621 | 1616 |
1622 #ifndef NDEBUG | 1617 #ifndef NDEBUG |
1623 | 1618 |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3522 const blink::LayoutObject* root = object1; | 3517 const blink::LayoutObject* root = object1; |
3523 while (root->parent()) | 3518 while (root->parent()) |
3524 root = root->parent(); | 3519 root = root->parent(); |
3525 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3520 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3526 } else { | 3521 } else { |
3527 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3522 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3528 } | 3523 } |
3529 } | 3524 } |
3530 | 3525 |
3531 #endif | 3526 #endif |
OLD | NEW |