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

Side by Side Diff: third_party/WebKit/Source/core/page/TouchAdjustment.cpp

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: Created 3 years, 7 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) 2012 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return false; 110 return false;
111 111
112 DCHECK(node->GetLayoutObject()); 112 DCHECK(node->GetLayoutObject());
113 return node->GetLayoutObject()->IsBox(); 113 return node->GetLayoutObject()->IsBox();
114 } 114 }
115 115
116 bool ProvidesContextMenuItems(Node* node) { 116 bool ProvidesContextMenuItems(Node* node) {
117 // This function tries to match the nodes that receive special context-menu 117 // This function tries to match the nodes that receive special context-menu
118 // items in ContextMenuController::populate(), and should be kept uptodate 118 // items in ContextMenuController::populate(), and should be kept uptodate
119 // with those. 119 // with those.
120 ASSERT(node->GetLayoutObject() || node->IsShadowRoot()); 120 DCHECK(node->GetLayoutObject() || node->IsShadowRoot());
121 if (!node->GetLayoutObject()) 121 if (!node->GetLayoutObject())
122 return false; 122 return false;
123 node->GetDocument().UpdateStyleAndLayoutTree(); 123 node->GetDocument().UpdateStyleAndLayoutTree();
124 if (HasEditableStyle(*node)) 124 if (HasEditableStyle(*node))
125 return true; 125 return true;
126 if (node->IsLink()) 126 if (node->IsLink())
127 return true; 127 return true;
128 if (node->GetLayoutObject()->IsImage()) 128 if (node->GetLayoutObject()->IsImage())
129 return true; 129 return true;
130 if (node->GetLayoutObject()->IsMedia()) 130 if (node->GetLayoutObject()->IsMedia())
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 const HeapVector<Member<Node>>& nodes) { 564 const HeapVector<Member<Node>>& nodes) {
565 IntPoint target_point; 565 IntPoint target_point;
566 TouchAdjustment::SubtargetGeometryList subtargets; 566 TouchAdjustment::SubtargetGeometryList subtargets;
567 TouchAdjustment::CompileZoomableSubtargets(nodes, subtargets); 567 TouchAdjustment::CompileZoomableSubtargets(nodes, subtargets);
568 return TouchAdjustment::FindNodeWithLowestDistanceMetric( 568 return TouchAdjustment::FindNodeWithLowestDistanceMetric(
569 target_node, target_point, target_area, touch_hotspot, touch_area, 569 target_node, target_point, target_area, touch_hotspot, touch_area,
570 subtargets, TouchAdjustment::ZoomableIntersectionQuotient); 570 subtargets, TouchAdjustment::ZoomableIntersectionQuotient);
571 } 571 }
572 572
573 } // namespace blink 573 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698