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: Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

Issue 10383285: Merge 116174 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 7 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) 2010 Alex Milowski (alex@milowski.com). All rights reserved. 2 * Copyright (C) 2010 Alex Milowski (alex@milowski.com). 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 26 matching lines...) Expand all
37 using namespace MathMLNames; 37 using namespace MathMLNames;
38 38
39 RenderMathMLRow::RenderMathMLRow(Element* element) 39 RenderMathMLRow::RenderMathMLRow(Element* element)
40 : RenderMathMLBlock(element) 40 : RenderMathMLBlock(element)
41 { 41 {
42 } 42 }
43 43
44 void RenderMathMLRow::layout() 44 void RenderMathMLRow::layout()
45 { 45 {
46 RenderBlock::layout(); 46 RenderBlock::layout();
47 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), INLINE_BLOCK);
48 RenderMathMLRow* newMRow = new (parent->renderArena()) RenderMathMLRow(paren t->document() /* is anonymous */);
49 newMRow->setStyle(newStyle.release());
50 return newMRow;
51 }
52
53 void RenderMathMLRow::computePreferredLogicalWidths()
54 {
55 ASSERT(preferredLogicalWidthsDirty() && needsLayout());
47 56
48 int maxHeight = 0; 57 int maxHeight = 0;
49 58
50 // Calculate the non-operator max height of the row. 59 // Calculate the non-operator max height of the row.
51 for (RenderObject* current = firstChild(); current; current = current->nextS ibling()) { 60 for (RenderObject* current = firstChild(); current; current = current->nextS ibling()) {
52 if (current->isRenderMathMLBlock()) { 61 if (current->isRenderMathMLBlock()) {
53 RenderMathMLBlock* block = toRenderMathMLBlock(current); 62 RenderMathMLBlock* block = toRenderMathMLBlock(current);
54 if (!block->unembellishedOperator() && block->offsetHeight() > maxHe ight) 63 if (!block->unembellishedOperator() && block->offsetHeight() > maxHe ight)
55 maxHeight = block->offsetHeight(); 64 maxHeight = block->offsetHeight();
56 } else if (current->isBoxModelObject()) { 65 } else if (current->isBoxModelObject()) {
(...skipping 22 matching lines...) Expand all
79 setPreferredLogicalWidthsDirty(true, false); 88 setPreferredLogicalWidthsDirty(true, false);
80 RenderBlock::layout(); 89 RenderBlock::layout();
81 } 90 }
82 } 91 }
83 92
84 } 93 }
85 94
86 } 95 }
87 96
88 #endif // ENABLE(MATHML) 97 #endif // ENABLE(MATHML)
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp ('k') | Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698