| 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 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 while (parentNode && !parentNode->isElementNode()) | 2983 while (parentNode && !parentNode->isElementNode()) |
| 2984 parentNode = parentNode->parentNode(); | 2984 parentNode = parentNode->parentNode(); |
| 2985 return parentNode && toElement(parentNode)->isInert(); | 2985 return parentNode && toElement(parentNode)->isInert(); |
| 2986 } | 2986 } |
| 2987 | 2987 |
| 2988 void RenderObject::imageChanged(CachedImage* image, const IntRect* rect) | 2988 void RenderObject::imageChanged(CachedImage* image, const IntRect* rect) |
| 2989 { | 2989 { |
| 2990 imageChanged(static_cast<WrappedImagePtr>(image), rect); | 2990 imageChanged(static_cast<WrappedImagePtr>(image), rect); |
| 2991 } | 2991 } |
| 2992 | 2992 |
| 2993 RenderObject* RenderObject::hoverAncestor() const | |
| 2994 { | |
| 2995 // When searching for the hover ancestor and encountering a named flow threa
d, | |
| 2996 // the search will continue with the DOM ancestor of the top-most element | |
| 2997 // in the named flow thread. | |
| 2998 // See https://code.google.com/p/chromium/issues/detail?id=243278 | |
| 2999 RenderObject* hoverAncestor = parent(); | |
| 3000 | |
| 3001 // Skip anonymous blocks. There's no point in treating them as hover ancesto
rs | |
| 3002 // and it would also prevent us from continuing the search on the DOM tree | |
| 3003 // when reaching the named flow thread. | |
| 3004 if (hoverAncestor && hoverAncestor->isAnonymousBlock()) | |
| 3005 hoverAncestor = hoverAncestor->parent(); | |
| 3006 | |
| 3007 if (hoverAncestor && hoverAncestor->isRenderNamedFlowThread()) { | |
| 3008 hoverAncestor = 0; | |
| 3009 | |
| 3010 Node* node = this->node(); | |
| 3011 if (node) { | |
| 3012 Node* domAncestorNode = node->parentNode(); | |
| 3013 if (domAncestorNode) | |
| 3014 hoverAncestor = domAncestorNode->renderer(); | |
| 3015 } | |
| 3016 } | |
| 3017 | |
| 3018 return hoverAncestor; | |
| 3019 } | |
| 3020 | |
| 3021 Element* RenderObject::offsetParent() const | 2993 Element* RenderObject::offsetParent() const |
| 3022 { | 2994 { |
| 3023 if (isRoot() || isBody()) | 2995 if (isRoot() || isBody()) |
| 3024 return 0; | 2996 return 0; |
| 3025 | 2997 |
| 3026 if (isOutOfFlowPositioned() && style()->position() == FixedPosition) | 2998 if (isOutOfFlowPositioned() && style()->position() == FixedPosition) |
| 3027 return 0; | 2999 return 0; |
| 3028 | 3000 |
| 3029 // If A is an area HTML element which has a map HTML element somewhere in th
e ancestor | 3001 // If A is an area HTML element which has a map HTML element somewhere in th
e ancestor |
| 3030 // chain return the nearest ancestor map HTML element and stop this algorith
m. | 3002 // chain return the nearest ancestor map HTML element and stop this algorith
m. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3227 { | 3199 { |
| 3228 if (object1) { | 3200 if (object1) { |
| 3229 const WebCore::RenderObject* root = object1; | 3201 const WebCore::RenderObject* root = object1; |
| 3230 while (root->parent()) | 3202 while (root->parent()) |
| 3231 root = root->parent(); | 3203 root = root->parent(); |
| 3232 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3204 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3233 } | 3205 } |
| 3234 } | 3206 } |
| 3235 | 3207 |
| 3236 #endif | 3208 #endif |
| OLD | NEW |