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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1378 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onSelection, nullptr); | 1378 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onSelection, nullptr); |
1379 | 1379 |
1380 if (fullInvalidation) | 1380 if (fullInvalidation) |
1381 return; | 1381 return; |
1382 | 1382 |
1383 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection, oldSelectionRect, newSelectionRect); | 1383 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection, oldSelectionRect, newSelectionRect); |
1384 } | 1384 } |
1385 | 1385 |
1386 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS tate& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationConta iner) | 1386 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS tate& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationConta iner) |
1387 { | 1387 { |
1388 if (styleRef().hasOutline()) { | |
1389 PaintLayer* layer = enclosingLayer()->enclosingSelfPaintingLayer(); | |
chrishtr
2016/01/12 23:52:24
This is a tree walk for every LayoutObject. PaintI
Xianzhu
2016/01/13 00:11:03
Not every LayoutObject, but only LayoutObject havi
chrishtr
2016/01/13 05:01:17
I'll wait for that patch first then.
| |
1390 if (layer->layoutObject() != this) | |
chrishtr
2016/01/12 23:52:24
Why this conditional?
Xianzhu
2016/01/13 00:11:03
We paint self outline and child outlines in differ
| |
1391 layer->setNeedsPaintPhaseChildOutlines(); | |
1392 } | |
1393 | |
1388 LayoutView* v = view(); | 1394 LayoutView* v = view(); |
1389 if (v->document().printing()) | 1395 if (v->document().printing()) |
1390 return PaintInvalidationNone; // Don't invalidate paints if we're printi ng. | 1396 return PaintInvalidationNone; // Don't invalidate paints if we're printi ng. |
1391 | 1397 |
1392 const LayoutRect oldBounds = previousPaintInvalidationRect(); | 1398 const LayoutRect oldBounds = previousPaintInvalidationRect(); |
1393 const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintOffsetC achingEnabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking() ; | 1399 const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintOffsetC achingEnabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking() ; |
1394 LayoutRect newBounds = boundsRectForPaintInvalidation(paintInvalidationConta iner, &paintInvalidationState); | 1400 LayoutRect newBounds = boundsRectForPaintInvalidation(paintInvalidationConta iner, &paintInvalidationState); |
1395 LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCaching Enabled() ? LayoutPoint() : PaintLayer::positionFromPaintInvalidationBacking(thi s, &paintInvalidationContainer, &paintInvalidationState); | 1401 LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCaching Enabled() ? LayoutPoint() : PaintLayer::positionFromPaintInvalidationBacking(thi s, &paintInvalidationContainer, &paintInvalidationState); |
1396 | 1402 |
1397 // Composited scrolling should not be included in the bounds and position tr acking, because the graphics layer backing the scroller | 1403 // Composited scrolling should not be included in the bounds and position tr acking, because the graphics layer backing the scroller |
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3520 const blink::LayoutObject* root = object1; | 3526 const blink::LayoutObject* root = object1; |
3521 while (root->parent()) | 3527 while (root->parent()) |
3522 root = root->parent(); | 3528 root = root->parent(); |
3523 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3529 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3524 } else { | 3530 } else { |
3525 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3531 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3526 } | 3532 } |
3527 } | 3533 } |
3528 | 3534 |
3529 #endif | 3535 #endif |
OLD | NEW |