| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 rect = nodeRectInAbsoluteCoordinates(node, true /* ignore border */); | 76 rect = nodeRectInAbsoluteCoordinates(node, true /* ignore border */); |
| 77 } | 77 } |
| 78 | 78 |
| 79 focusableNode = node; | 79 focusableNode = node; |
| 80 isOffscreen = hasOffscreenRect(visibleNode); | 80 isOffscreen = hasOffscreenRect(visibleNode); |
| 81 isOffscreenAfterScrolling = hasOffscreenRect(visibleNode, type); | 81 isOffscreenAfterScrolling = hasOffscreenRect(visibleNode, type); |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool isSpatialNavigationEnabled(const LocalFrame* frame) { | 84 bool isSpatialNavigationEnabled(const LocalFrame* frame) { |
| 85 return (frame && frame->settings() && | 85 return (frame && frame->settings() && |
| 86 frame->settings()->spatialNavigationEnabled()); | 86 frame->settings()->getSpatialNavigationEnabled()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool spatialNavigationIgnoresEventHandlers(const LocalFrame* frame) { | 89 bool spatialNavigationIgnoresEventHandlers(const LocalFrame* frame) { |
| 90 return (frame && frame->settings() && | 90 return (frame && frame->settings() && |
| 91 frame->settings()->deviceSupportsTouch()); | 91 frame->settings()->getDeviceSupportsTouch()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 static bool rectsIntersectOnOrthogonalAxis(WebFocusType type, | 94 static bool rectsIntersectOnOrthogonalAxis(WebFocusType type, |
| 95 const LayoutRect& a, | 95 const LayoutRect& a, |
| 96 const LayoutRect& b) { | 96 const LayoutRect& b) { |
| 97 switch (type) { | 97 switch (type) { |
| 98 case WebFocusTypeLeft: | 98 case WebFocusTypeLeft: |
| 99 case WebFocusTypeRight: | 99 case WebFocusTypeRight: |
| 100 return a.maxY() > b.y() && a.y() < b.maxY(); | 100 return a.maxY() > b.y() && a.y() < b.maxY(); |
| 101 case WebFocusTypeUp: | 101 case WebFocusTypeUp: |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 return rect; | 683 return rect; |
| 684 } | 684 } |
| 685 | 685 |
| 686 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) { | 686 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) { |
| 687 return candidate.isFrameOwnerElement() | 687 return candidate.isFrameOwnerElement() |
| 688 ? toHTMLFrameOwnerElement(candidate.visibleNode) | 688 ? toHTMLFrameOwnerElement(candidate.visibleNode) |
| 689 : nullptr; | 689 : nullptr; |
| 690 }; | 690 }; |
| 691 | 691 |
| 692 } // namespace blink | 692 } // namespace blink |
| OLD | NEW |