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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 static RectsAlignment alignmentForRects(FocusType, const LayoutRect&, const Layo
utRect&, const LayoutSize& viewSize); | 48 static RectsAlignment alignmentForRects(FocusType, const LayoutRect&, const Layo
utRect&, const LayoutSize& viewSize); |
49 static bool areRectsFullyAligned(FocusType, const LayoutRect&, const LayoutRect&
); | 49 static bool areRectsFullyAligned(FocusType, const LayoutRect&, const LayoutRect&
); |
50 static bool areRectsPartiallyAligned(FocusType, const LayoutRect&, const LayoutR
ect&); | 50 static bool areRectsPartiallyAligned(FocusType, const LayoutRect&, const LayoutR
ect&); |
51 static bool areRectsMoreThanFullScreenApart(FocusType, const LayoutRect& curRect
, const LayoutRect& targetRect, const LayoutSize& viewSize); | 51 static bool areRectsMoreThanFullScreenApart(FocusType, const LayoutRect& curRect
, const LayoutRect& targetRect, const LayoutSize& viewSize); |
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(nullptr) |
59 , focusableNode(0) | 59 , focusableNode(nullptr) |
60 , enclosingScrollableBox(0) | 60 , enclosingScrollableBox(nullptr) |
61 , distance(maxDistance()) | 61 , distance(maxDistance()) |
62 , alignment(None) | 62 , alignment(None) |
63 , isOffscreen(true) | 63 , isOffscreen(true) |
64 , isOffscreenAfterScrolling(true) | 64 , isOffscreenAfterScrolling(true) |
65 { | 65 { |
66 ASSERT(node); | 66 ASSERT(node); |
67 ASSERT(node->isElementNode()); | 67 ASSERT(node->isElementNode()); |
68 | 68 |
69 if (isHTMLAreaElement(*node)) { | 69 if (isHTMLAreaElement(*node)) { |
70 HTMLAreaElement& area = toHTMLAreaElement(*node); | 70 HTMLAreaElement& area = toHTMLAreaElement(*node); |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 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); |
748 return rect; | 748 return rect; |
749 } | 749 } |
750 | 750 |
751 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) | 751 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) |
752 { | 752 { |
753 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; | 753 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v
isibleNode) : 0; |
754 }; | 754 }; |
755 | 755 |
756 } // namespace blink | 756 } // namespace blink |
OLD | NEW |