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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 static bool isRectInDirection(FocusType, const LayoutRect&, const LayoutRect&); | 52 static bool isRectInDirection(FocusType, const LayoutRect&, const LayoutRect&); |
53 static void deflateIfOverlapped(LayoutRect&, LayoutRect&); | 53 static void deflateIfOverlapped(LayoutRect&, LayoutRect&); |
54 static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame, const Layo
utRect&); | 54 static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame, const Layo
utRect&); |
55 static bool isScrollableNode(const Node*); | 55 static bool isScrollableNode(const Node*); |
56 | 56 |
57 FocusCandidate::FocusCandidate(Node* node, FocusType type) | 57 FocusCandidate::FocusCandidate(Node* node, FocusType type) |
58 : visibleNode(0) | 58 : visibleNode(0) |
59 , focusableNode(0) | 59 , focusableNode(0) |
60 , enclosingScrollableBox(0) | 60 , enclosingScrollableBox(0) |
61 , distance(maxDistance()) | 61 , distance(maxDistance()) |
62 , parentDistance(maxDistance()) | |
63 , alignment(None) | 62 , alignment(None) |
64 , parentAlignment(None) | |
65 , isOffscreen(true) | 63 , isOffscreen(true) |
66 , isOffscreenAfterScrolling(true) | 64 , isOffscreenAfterScrolling(true) |
67 { | 65 { |
68 ASSERT(node); | 66 ASSERT(node); |
69 ASSERT(node->isElementNode()); | 67 ASSERT(node->isElementNode()); |
70 | 68 |
71 if (isHTMLAreaElement(*node)) { | 69 if (isHTMLAreaElement(*node)) { |
72 HTMLAreaElement& area = toHTMLAreaElement(*node); | 70 HTMLAreaElement& area = toHTMLAreaElement(*node); |
73 HTMLImageElement* image = area.imageElement(); | 71 HTMLImageElement* image = area.imageElement(); |
74 if (!image || !image->renderer()) | 72 if (!image || !image->renderer()) |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar
ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1); | 747 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar
ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1); |
750 return rect; | 748 return rect; |
751 } | 749 } |
752 | 750 |
753 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) | 751 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) |
754 { | 752 { |
755 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; | 753 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; |
756 }; | 754 }; |
757 | 755 |
758 } // namespace WebCore | 756 } // namespace WebCore |
OLD | NEW |