| 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 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 | 2434 |
| 2435 LayerHitTestRects::iterator iter = layerRects.find(currentLayer); | 2435 LayerHitTestRects::iterator iter = layerRects.find(currentLayer); |
| 2436 Vector<LayoutRect>* iterValue; | 2436 Vector<LayoutRect>* iterValue; |
| 2437 if (iter == layerRects.end()) | 2437 if (iter == layerRects.end()) |
| 2438 iterValue = | 2438 iterValue = |
| 2439 &layerRects.add(currentLayer, Vector<LayoutRect>()).storedValue->value; | 2439 &layerRects.add(currentLayer, Vector<LayoutRect>()).storedValue->value; |
| 2440 else | 2440 else |
| 2441 iterValue = &iter->value; | 2441 iterValue = &iter->value; |
| 2442 for (size_t i = 0; i < ownRects.size(); i++) { | 2442 for (size_t i = 0; i < ownRects.size(); i++) { |
| 2443 if (!containerRect.contains(ownRects[i])) { | 2443 if (!containerRect.contains(ownRects[i])) { |
| 2444 iterValue->append(ownRects[i]); | 2444 iterValue->push_back(ownRects[i]); |
| 2445 if (iterValue->size() > maxRectsPerLayer) { | 2445 if (iterValue->size() > maxRectsPerLayer) { |
| 2446 // Just mark the entire layer instead, and switch to walking the layer | 2446 // Just mark the entire layer instead, and switch to walking the layer |
| 2447 // tree instead of the layout tree. | 2447 // tree instead of the layout tree. |
| 2448 layerRects.remove(currentLayer); | 2448 layerRects.remove(currentLayer); |
| 2449 currentLayer->addLayerHitTestRects(layerRects); | 2449 currentLayer->addLayerHitTestRects(layerRects); |
| 2450 return; | 2450 return; |
| 2451 } | 2451 } |
| 2452 if (newContainerRect.isEmpty()) | 2452 if (newContainerRect.isEmpty()) |
| 2453 newContainerRect = ownRects[i]; | 2453 newContainerRect = ownRects[i]; |
| 2454 } | 2454 } |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3123 if (style()->getDraggableRegionMode() == DraggableRegionNone) | 3123 if (style()->getDraggableRegionMode() == DraggableRegionNone) |
| 3124 return; | 3124 return; |
| 3125 | 3125 |
| 3126 LayoutBox* box = toLayoutBox(this); | 3126 LayoutBox* box = toLayoutBox(this); |
| 3127 FloatRect localBounds(FloatPoint(), FloatSize(box->size())); | 3127 FloatRect localBounds(FloatPoint(), FloatSize(box->size())); |
| 3128 FloatRect absBounds = localToAbsoluteQuad(localBounds).boundingBox(); | 3128 FloatRect absBounds = localToAbsoluteQuad(localBounds).boundingBox(); |
| 3129 | 3129 |
| 3130 AnnotatedRegionValue region; | 3130 AnnotatedRegionValue region; |
| 3131 region.draggable = style()->getDraggableRegionMode() == DraggableRegionDrag; | 3131 region.draggable = style()->getDraggableRegionMode() == DraggableRegionDrag; |
| 3132 region.bounds = LayoutRect(absBounds); | 3132 region.bounds = LayoutRect(absBounds); |
| 3133 regions.append(region); | 3133 regions.push_back(region); |
| 3134 } | 3134 } |
| 3135 | 3135 |
| 3136 bool LayoutObject::willRenderImage() { | 3136 bool LayoutObject::willRenderImage() { |
| 3137 // Without visibility we won't render (and therefore don't care about | 3137 // Without visibility we won't render (and therefore don't care about |
| 3138 // animation). | 3138 // animation). |
| 3139 if (style()->visibility() != EVisibility::kVisible) | 3139 if (style()->visibility() != EVisibility::kVisible) |
| 3140 return false; | 3140 return false; |
| 3141 | 3141 |
| 3142 // We will not render a new image when SuspendableObjects is suspended | 3142 // We will not render a new image when SuspendableObjects is suspended |
| 3143 if (document().isContextSuspended()) | 3143 if (document().isContextSuspended()) |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3537 const blink::LayoutObject* root = object1; | 3537 const blink::LayoutObject* root = object1; |
| 3538 while (root->parent()) | 3538 while (root->parent()) |
| 3539 root = root->parent(); | 3539 root = root->parent(); |
| 3540 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3540 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3541 } else { | 3541 } else { |
| 3542 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3542 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3543 } | 3543 } |
| 3544 } | 3544 } |
| 3545 | 3545 |
| 3546 #endif | 3546 #endif |
| OLD | NEW |