| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nuanti Ltd. | 3 * Copyright (C) 2008 Nuanti Ltd. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 document->focusedElement()->dispatchFocusInEvent(EventTypeNames:
:DOMFocusIn, 0); | 167 document->focusedElement()->dispatchFocusInEvent(EventTypeNames:
:DOMFocusIn, 0); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 static inline bool hasCustomFocusLogic(Element* element) | 172 static inline bool hasCustomFocusLogic(Element* element) |
| 173 { | 173 { |
| 174 return element->isHTMLElement() && toHTMLElement(element)->hasCustomFocusLog
ic(); | 174 return element->isHTMLElement() && toHTMLElement(element)->hasCustomFocusLog
ic(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 #if !ASSERT_DISABLED | 177 #if ASSERT_ENABLED |
| 178 static inline bool isNonFocusableShadowHost(Node* node) | 178 static inline bool isNonFocusableShadowHost(Node* node) |
| 179 { | 179 { |
| 180 ASSERT(node); | 180 ASSERT(node); |
| 181 if (!node->isElementNode()) | 181 if (!node->isElementNode()) |
| 182 return false; | 182 return false; |
| 183 Element* element = toElement(node); | 183 Element* element = toElement(node); |
| 184 return !element->isFocusable() && isShadowHost(element) && !hasCustomFocusLo
gic(element); | 184 return !element->isFocusable() && isShadowHost(element) && !hasCustomFocusLo
gic(element); |
| 185 } | 185 } |
| 186 #endif | 186 #endif |
| 187 | 187 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 911 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
| 912 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type,
container); | 912 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type,
container); |
| 913 if (container && container->isDocumentNode()) | 913 if (container && container->isDocumentNode()) |
| 914 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 914 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
| 915 } while (!consumed && container); | 915 } while (!consumed && container); |
| 916 | 916 |
| 917 return consumed; | 917 return consumed; |
| 918 } | 918 } |
| 919 | 919 |
| 920 } // namespace WebCore | 920 } // namespace WebCore |
| OLD | NEW |