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

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 DragOperation DataTransfer::destinationOperation() const 400 DragOperation DataTransfer::destinationOperation() const
401 { 401 {
402 DragOperation op = convertEffectAllowedToDragOperation(m_dropEffect); 402 DragOperation op = convertEffectAllowedToDragOperation(m_dropEffect);
403 ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOpera tionLink || op == (DragOperation)(DragOperationGeneric | DragOperationMove) || o p == DragOperationEvery); 403 ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOpera tionLink || op == (DragOperation)(DragOperationGeneric | DragOperationMove) || o p == DragOperationEvery);
404 return op; 404 return op;
405 } 405 }
406 406
407 void DataTransfer::setSourceOperation(DragOperation op) 407 void DataTransfer::setSourceOperation(DragOperation op)
408 { 408 {
409 ASSERT_ARG(op, op != DragOperationPrivate); 409 DCHECK_NE(op, DragOperationPrivate);
410 m_effectAllowed = convertDragOperationToEffectAllowed(op); 410 m_effectAllowed = convertDragOperationToEffectAllowed(op);
411 } 411 }
412 412
413 void DataTransfer::setDestinationOperation(DragOperation op) 413 void DataTransfer::setDestinationOperation(DragOperation op)
414 { 414 {
415 ASSERT_ARG(op, op == DragOperationCopy || op == DragOperationNone || op == D ragOperationLink || op == DragOperationGeneric || op == DragOperationMove || op == (DragOperation)(DragOperationGeneric | DragOperationMove)); 415 DCHECK(op == DragOperationCopy || op == DragOperationNone || op == DragOpera tionLink || op == DragOperationGeneric || op == DragOperationMove || op == stati c_cast<DragOperation>(DragOperationGeneric | DragOperationMove));
416 m_dropEffect = convertDragOperationToEffectAllowed(op); 416 m_dropEffect = convertDragOperationToEffectAllowed(op);
417 } 417 }
418 418
419 bool DataTransfer::hasDropZoneType(const String& keyword) 419 bool DataTransfer::hasDropZoneType(const String& keyword)
420 { 420 {
421 if (keyword.startsWith("file:")) 421 if (keyword.startsWith("file:"))
422 return hasFileOfType(keyword.substring(5)); 422 return hasFileOfType(keyword.substring(5));
423 423
424 if (keyword.startsWith("string:")) 424 if (keyword.startsWith("string:"))
425 return hasStringOfType(keyword.substring(7)); 425 return hasStringOfType(keyword.substring(7));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 DEFINE_TRACE(DataTransfer) 511 DEFINE_TRACE(DataTransfer)
512 { 512 {
513 visitor->trace(m_dataObject); 513 visitor->trace(m_dataObject);
514 visitor->trace(m_dragImage); 514 visitor->trace(m_dragImage);
515 #if ENABLE(OILPAN) 515 #if ENABLE(OILPAN)
516 visitor->trace(m_dragImageElement); 516 visitor->trace(m_dragImageElement);
517 #endif 517 #endif
518 } 518 }
519 519
520 } // namespace blink 520 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698