| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) |
| 3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org> | 3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org> |
| 4 * | 4 * |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 } | 432 } |
| 433 | 433 |
| 434 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection direc
tion, Node* node) | 434 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection direc
tion, Node* node) |
| 435 { | 435 { |
| 436 ASSERT(node); | 436 ASSERT(node); |
| 437 Node* parent = node; | 437 Node* parent = node; |
| 438 do { | 438 do { |
| 439 if (parent->isDocumentNode()) | 439 if (parent->isDocumentNode()) |
| 440 parent = toDocument(parent)->document()->frame()->ownerElement(); | 440 parent = toDocument(parent)->document()->frame()->ownerElement(); |
| 441 else | 441 else |
| 442 parent = parent->parentNode(); | 442 parent = parent->parentOrShadowHostNode(); |
| 443 } while (parent && !canScrollInDirection(parent, direction) && !parent->isDo
cumentNode()); | 443 } while (parent && !canScrollInDirection(parent, direction) && !parent->isDo
cumentNode()); |
| 444 | 444 |
| 445 return parent; | 445 return parent; |
| 446 } | 446 } |
| 447 | 447 |
| 448 bool canScrollInDirection(const Node* container, FocusDirection direction) | 448 bool canScrollInDirection(const Node* container, FocusDirection direction) |
| 449 { | 449 { |
| 450 ASSERT(container); | 450 ASSERT(container); |
| 451 if (container->isDocumentNode()) | 451 if (container->isDocumentNode()) |
| 452 return canScrollInDirection(toDocument(container)->frame(), direction); | 452 return canScrollInDirection(toDocument(container)->frame(), direction); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 LayoutRect rect = virtualRectForDirection(direction, rectToAbsoluteCoordinat
es(area->document()->frame(), area->computeRect(area->imageElement()->renderer()
)), 1); | 730 LayoutRect rect = virtualRectForDirection(direction, rectToAbsoluteCoordinat
es(area->document()->frame(), area->computeRect(area->imageElement()->renderer()
)), 1); |
| 731 return rect; | 731 return rect; |
| 732 } | 732 } |
| 733 | 733 |
| 734 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) | 734 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) |
| 735 { | 735 { |
| 736 return candidate.isFrameOwnerElement() ? static_cast<HTMLFrameOwnerElement*>
(candidate.visibleNode) : 0; | 736 return candidate.isFrameOwnerElement() ? static_cast<HTMLFrameOwnerElement*>
(candidate.visibleNode) : 0; |
| 737 }; | 737 }; |
| 738 | 738 |
| 739 } // namespace WebCore | 739 } // namespace WebCore |
| OLD | NEW |