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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 } | 420 } |
421 | 421 |
422 bool isScrollableNode(const Node* node) | 422 bool isScrollableNode(const Node* node) |
423 { | 423 { |
424 ASSERT(!node->isDocumentNode()); | 424 ASSERT(!node->isDocumentNode()); |
425 | 425 |
426 if (!node) | 426 if (!node) |
427 return false; | 427 return false; |
428 | 428 |
429 if (RenderObject* renderer = node->renderer()) | 429 if (RenderObject* renderer = node->renderer()) |
430 return renderer->isBox() && toRenderBox(renderer)->canBeScrolledAndHasSc
rollableArea() && node->hasChildNodes(); | 430 return renderer->isBox() && toRenderBox(renderer)->canBeScrolledAndHasSc
rollableArea() && node->hasChildren(); |
431 | 431 |
432 return false; | 432 return false; |
433 } | 433 } |
434 | 434 |
435 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusType type, Node
* node) | 435 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusType type, Node
* node) |
436 { | 436 { |
437 ASSERT(node); | 437 ASSERT(node); |
438 Node* parent = node; | 438 Node* parent = node; |
439 do { | 439 do { |
440 if (parent->isDocumentNode()) | 440 if (parent->isDocumentNode()) |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar
ea->document().frame(), area->computeRect(area->imageElement()->renderer())), 1)
; | 731 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar
ea->document().frame(), area->computeRect(area->imageElement()->renderer())), 1)
; |
732 return rect; | 732 return rect; |
733 } | 733 } |
734 | 734 |
735 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) | 735 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) |
736 { | 736 { |
737 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; | 737 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; |
738 }; | 738 }; |
739 | 739 |
740 } // namespace WebCore | 740 } // namespace WebCore |
OLD | NEW |