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

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

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible 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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 FloatSize size(toLayoutBox(layoutObject)->size()); 832 FloatSize size(toLayoutBox(layoutObject)->size());
833 printContext.begin(size.width(), size.height()); 833 printContext.begin(size.width(), size.height());
834 } 834 }
835 835
836 return externalRepresentation(toLayoutBox(layoutObject), behavior, 836 return externalRepresentation(toLayoutBox(layoutObject), behavior,
837 markedLayer); 837 markedLayer);
838 } 838 }
839 839
840 String externalRepresentation(Element* element, LayoutAsTextBehavior behavior) { 840 String externalRepresentation(Element* element, LayoutAsTextBehavior behavior) {
841 // Doesn't support printing mode. 841 // Doesn't support printing mode.
842 ASSERT(!(behavior & LayoutAsTextPrintingMode)); 842 DCHECK(!(behavior & LayoutAsTextPrintingMode));
843 if (!(behavior & LayoutAsTextDontUpdateLayout)) 843 if (!(behavior & LayoutAsTextDontUpdateLayout))
844 element->document().updateStyleAndLayout(); 844 element->document().updateStyleAndLayout();
845 845
846 LayoutObject* layoutObject = element->layoutObject(); 846 LayoutObject* layoutObject = element->layoutObject();
847 if (!layoutObject || !layoutObject->isBox()) 847 if (!layoutObject || !layoutObject->isBox())
848 return String(); 848 return String();
849 849
850 return externalRepresentation(toLayoutBox(layoutObject), 850 return externalRepresentation(toLayoutBox(layoutObject),
851 behavior | LayoutAsTextShowAllLayers); 851 behavior | LayoutAsTextShowAllLayers);
852 } 852 }
(...skipping 30 matching lines...) Expand all
883 element->document().updateStyleAndLayout(); 883 element->document().updateStyleAndLayout();
884 884
885 LayoutObject* layoutObject = element->layoutObject(); 885 LayoutObject* layoutObject = element->layoutObject();
886 if (!layoutObject || !layoutObject->isListItem()) 886 if (!layoutObject || !layoutObject->isListItem())
887 return String(); 887 return String();
888 888
889 return toLayoutListItem(layoutObject)->markerText(); 889 return toLayoutListItem(layoutObject)->markerText();
890 } 890 }
891 891
892 } // namespace blink 892 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeTest.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698