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

Side by Side Diff: Source/core/dom/DocumentMarkerController.cpp

Issue 394353002: Replace tests of ASSERT_ENABLED with ENABLE(ASSERT). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (!markers) 606 if (!markers)
607 return; 607 return;
608 608
609 bool docDirty = false; 609 bool docDirty = false;
610 for (size_t markerListIndex = 0; markerListIndex < DocumentMarker::MarkerTyp eIndexesCount; ++markerListIndex) { 610 for (size_t markerListIndex = 0; markerListIndex < DocumentMarker::MarkerTyp eIndexesCount; ++markerListIndex) {
611 OwnPtrWillBeMember<MarkerList>& list = (*markers)[markerListIndex]; 611 OwnPtrWillBeMember<MarkerList>& list = (*markers)[markerListIndex];
612 if (!list) 612 if (!list)
613 continue; 613 continue;
614 MarkerList::iterator startPos = std::lower_bound(list->begin(), list->en d(), startOffset, startsAfter); 614 MarkerList::iterator startPos = std::lower_bound(list->begin(), list->en d(), startOffset, startsAfter);
615 for (MarkerList::iterator marker = startPos; marker != list->end(); ++ma rker) { 615 for (MarkerList::iterator marker = startPos; marker != list->end(); ++ma rker) {
616 #if ASSERT_ENABLED 616 #if ENABLE(ASSERT)
617 int startOffset = (*marker)->startOffset(); 617 int startOffset = (*marker)->startOffset();
618 ASSERT(startOffset + delta >= 0); 618 ASSERT(startOffset + delta >= 0);
619 #endif 619 #endif
620 (*marker)->shiftOffsets(delta); 620 (*marker)->shiftOffsets(delta);
621 docDirty = true; 621 docDirty = true;
622 622
623 // Marker moved, so previously-computed rendered rectangle is now in valid 623 // Marker moved, so previously-computed rendered rectangle is now in valid
624 (*marker)->invalidate(); 624 (*marker)->invalidate();
625 } 625 }
626 } 626 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 } // namespace WebCore 728 } // namespace WebCore
729 729
730 #ifndef NDEBUG 730 #ifndef NDEBUG
731 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller) 731 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
732 { 732 {
733 if (controller) 733 if (controller)
734 controller->showMarkers(); 734 controller->showMarkers();
735 } 735 }
736 #endif 736 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698