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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 } 647 }
648 } 648 }
649 649
650 LayoutUnit RootInlineBox::verticalPositionForBox( 650 LayoutUnit RootInlineBox::verticalPositionForBox(
651 InlineBox* box, 651 InlineBox* box,
652 VerticalPositionCache& verticalPositionCache) { 652 VerticalPositionCache& verticalPositionCache) {
653 if (box->getLineLayoutItem().isText()) 653 if (box->getLineLayoutItem().isText())
654 return box->parent()->logicalTop(); 654 return box->parent()->logicalTop();
655 655
656 LineLayoutBoxModel boxModel = box->boxModelObject(); 656 LineLayoutBoxModel boxModel = box->boxModelObject();
657 ASSERT(boxModel.isInline()); 657 DCHECK(boxModel.isInline());
658 if (!boxModel.isInline()) 658 if (!boxModel.isInline())
659 return LayoutUnit(); 659 return LayoutUnit();
660 660
661 // This method determines the vertical position for inline elements. 661 // This method determines the vertical position for inline elements.
662 bool firstLine = isFirstLineStyle(); 662 bool firstLine = isFirstLineStyle();
663 if (firstLine && !boxModel.document().styleEngine().usesFirstLineRules()) 663 if (firstLine && !boxModel.document().styleEngine().usesFirstLineRules())
664 firstLine = false; 664 firstLine = false;
665 665
666 // Check the cache. 666 // Check the cache.
667 bool isLayoutInline = boxModel.isLayoutInline(); 667 bool isLayoutInline = boxModel.isLayoutInline();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 endBox = nullptr; 775 endBox = nullptr;
776 return nullptr; 776 return nullptr;
777 } 777 }
778 778
779 const char* RootInlineBox::boxName() const { 779 const char* RootInlineBox::boxName() const {
780 return "RootInlineBox"; 780 return "RootInlineBox";
781 } 781 }
782 782
783 } // namespace blink 783 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698