Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: Source/core/page/FocusController.cpp

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698