| 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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2396 return CompositingReasonNone; | 2396 return CompositingReasonNone; |
| 2397 } | 2397 } |
| 2398 | 2398 |
| 2399 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result,
const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse
t, HitTestFilter hitTestFilter) | 2399 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result,
const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse
t, HitTestFilter hitTestFilter) |
| 2400 { | 2400 { |
| 2401 bool inside = false; | 2401 bool inside = false; |
| 2402 if (hitTestFilter != HitTestSelf) { | 2402 if (hitTestFilter != HitTestSelf) { |
| 2403 // First test the foreground layer (lines and inlines). | 2403 // First test the foreground layer (lines and inlines). |
| 2404 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestForeground); | 2404 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestForeground); |
| 2405 | 2405 |
| 2406 // Test floats next. | |
| 2407 if (!inside) | |
| 2408 inside = nodeAtPoint(request, result, locationInContainer, accumulat
edOffset, HitTestFloat); | |
| 2409 | |
| 2410 // Finally test to see if the mouse is in the background (within a child
block's background). | 2406 // Finally test to see if the mouse is in the background (within a child
block's background). |
| 2411 if (!inside) | 2407 if (!inside) |
| 2412 inside = nodeAtPoint(request, result, locationInContainer, accumulat
edOffset, HitTestChildBlockBackgrounds); | 2408 inside = nodeAtPoint(request, result, locationInContainer, accumulat
edOffset, HitTestChildBlockBackgrounds); |
| 2413 } | 2409 } |
| 2414 | 2410 |
| 2415 // See if the mouse is inside us but not any of our descendants | 2411 // See if the mouse is inside us but not any of our descendants |
| 2416 if (hitTestFilter != HitTestDescendants && !inside) | 2412 if (hitTestFilter != HitTestDescendants && !inside) |
| 2417 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestBlockBackground); | 2413 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestBlockBackground); |
| 2418 | 2414 |
| 2419 return inside; | 2415 return inside; |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 { | 2813 { |
| 2818 if (object1) { | 2814 if (object1) { |
| 2819 const blink::RenderObject* root = object1; | 2815 const blink::RenderObject* root = object1; |
| 2820 while (root->parent()) | 2816 while (root->parent()) |
| 2821 root = root->parent(); | 2817 root = root->parent(); |
| 2822 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2818 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2823 } | 2819 } |
| 2824 } | 2820 } |
| 2825 | 2821 |
| 2826 #endif | 2822 #endif |
| OLD | NEW |