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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann <hausmann@kde.org> 4 * (C) 2000 Simon Hausmann <hausmann@kde.org>
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 bool HTMLAnchorElement::isMouseFocusable() const 170 bool HTMLAnchorElement::isMouseFocusable() const
171 { 171 {
172 if (isLink()) 172 if (isLink())
173 return supportsFocus(); 173 return supportsFocus();
174 174
175 return HTMLElement::isMouseFocusable(); 175 return HTMLElement::isMouseFocusable();
176 } 176 }
177 177
178 bool HTMLAnchorElement::isKeyboardFocusable() const 178 bool HTMLAnchorElement::isKeyboardFocusable() const
179 { 179 {
180 ASSERT(document().isActive()); 180 DCHECK(document().isActive());
181 181
182 if (isFocusable() && Element::supportsFocus()) 182 if (isFocusable() && Element::supportsFocus())
183 return HTMLElement::isKeyboardFocusable(); 183 return HTMLElement::isKeyboardFocusable();
184 184
185 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks()) 185 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks())
186 return false; 186 return false;
187 return HTMLElement::isKeyboardFocusable(); 187 return HTMLElement::isKeyboardFocusable();
188 } 188 }
189 189
190 static void appendServerMapMousePosition(StringBuilder& url, Event* event) 190 static void appendServerMapMousePosition(StringBuilder& url, Event* event)
191 { 191 {
192 if (!event->isMouseEvent()) 192 if (!event->isMouseEvent())
193 return; 193 return;
194 194
195 ASSERT(event->target()); 195 DCHECK(event->target());
196 Node* target = event->target()->toNode(); 196 Node* target = event->target()->toNode();
197 ASSERT(target); 197 DCHECK(target);
198 if (!isHTMLImageElement(*target)) 198 if (!isHTMLImageElement(*target))
199 return; 199 return;
200 200
201 HTMLImageElement& imageElement = toHTMLImageElement(*target); 201 HTMLImageElement& imageElement = toHTMLImageElement(*target);
202 if (!imageElement.isServerMap()) 202 if (!imageElement.isServerMap())
203 return; 203 return;
204 204
205 LayoutObject* layoutObject = imageElement.layoutObject(); 205 LayoutObject* layoutObject = imageElement.layoutObject();
206 if (!layoutObject || !layoutObject->isBox()) 206 if (!layoutObject || !layoutObject->isBox())
207 return; 207 return;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 476 }
477 477
478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint Sender() 478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint Sender()
479 { 479 {
480 if (!m_navigationHintSender) 480 if (!m_navigationHintSender)
481 m_navigationHintSender = NavigationHintSender::create(this); 481 m_navigationHintSender = NavigationHintSender::create(this);
482 return m_navigationHintSender; 482 return m_navigationHintSender;
483 } 483 }
484 484
485 } // namespace blink 485 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAllCollection.cpp ('k') | third_party/WebKit/Source/core/html/HTMLAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698