OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |