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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 iterValue = | 2400 iterValue = |
2401 &layerRects.add(currentLayer, Vector<LayoutRect>()).storedValue->value; | 2401 &layerRects.add(currentLayer, Vector<LayoutRect>()).storedValue->value; |
2402 else | 2402 else |
2403 iterValue = &iter->value; | 2403 iterValue = &iter->value; |
2404 for (size_t i = 0; i < ownRects.size(); i++) { | 2404 for (size_t i = 0; i < ownRects.size(); i++) { |
2405 if (!containerRect.contains(ownRects[i])) { | 2405 if (!containerRect.contains(ownRects[i])) { |
2406 iterValue->push_back(ownRects[i]); | 2406 iterValue->push_back(ownRects[i]); |
2407 if (iterValue->size() > maxRectsPerLayer) { | 2407 if (iterValue->size() > maxRectsPerLayer) { |
2408 // Just mark the entire layer instead, and switch to walking the layer | 2408 // Just mark the entire layer instead, and switch to walking the layer |
2409 // tree instead of the layout tree. | 2409 // tree instead of the layout tree. |
2410 layerRects.remove(currentLayer); | 2410 layerRects.erase(currentLayer); |
2411 currentLayer->addLayerHitTestRects(layerRects); | 2411 currentLayer->addLayerHitTestRects(layerRects); |
2412 return; | 2412 return; |
2413 } | 2413 } |
2414 if (newContainerRect.isEmpty()) | 2414 if (newContainerRect.isEmpty()) |
2415 newContainerRect = ownRects[i]; | 2415 newContainerRect = ownRects[i]; |
2416 } | 2416 } |
2417 } | 2417 } |
2418 if (newContainerRect.isEmpty()) | 2418 if (newContainerRect.isEmpty()) |
2419 newContainerRect = containerRect; | 2419 newContainerRect = containerRect; |
2420 | 2420 |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3492 const blink::LayoutObject* root = object1; | 3492 const blink::LayoutObject* root = object1; |
3493 while (root->parent()) | 3493 while (root->parent()) |
3494 root = root->parent(); | 3494 root = root->parent(); |
3495 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3495 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3496 } else { | 3496 } else { |
3497 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3497 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3498 } | 3498 } |
3499 } | 3499 } |
3500 | 3500 |
3501 #endif | 3501 #endif |
OLD | NEW |