Changeset 54128 in webkit
- Timestamp:
- Feb 1, 2010 1:27:44 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r54127 r54128 1 2010-02-01 Alex Milowski <alex@milowski.com> 2 3 Reviewed by Darin Adler. 4 5 Added compile time debug support for mathml layout (block boundary & baseline) 6 7 * mathml/RenderMathMLBlock.cpp: 8 (WebCore::RenderMathMLBlock::stretchToHeight): 9 (WebCore::RenderMathMLBlock::paint): 10 * mathml/RenderMathMLBlock.h: 11 1 12 2010-02-01 Philippe Normand <pnormand@igalia.com> 2 13 -
trunk/WebCore/mathml/RenderMathMLBlock.cpp
r53764 r54128 31 31 32 32 #include "FontSelector.h" 33 #include "GraphicsContext.h" 33 34 #include "MathMLNames.h" 34 35 #include "RenderInline.h" … … 74 75 } 75 76 77 #if ENABLE(DEBUG_MATH_LAYOUT) 78 void RenderMathMLBlock::paint(PaintInfo& info, int tx, int ty) 79 { 80 RenderBlock::paint(info, tx, ty); 81 82 if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground) 83 return; 84 85 tx += x(); 86 ty += y(); 87 88 info.context->save(); 89 90 info.context->setStrokeThickness(1.0f); 91 info.context->setStrokeStyle(SolidStroke); 92 info.context->setStrokeColor(Color(0, 0, 255), sRGBColorSpace); 93 94 info.context->drawLine(IntPoint(tx, ty), IntPoint(tx + offsetWidth(), ty)); 95 info.context->drawLine(IntPoint(tx + offsetWidth(), ty), IntPoint(tx + offsetWidth(), ty + offsetHeight())); 96 info.context->drawLine(IntPoint(tx, ty + offsetHeight()), IntPoint(tx + offsetWidth(), ty + offsetHeight())); 97 info.context->drawLine(IntPoint(tx, ty), IntPoint(tx, ty + offsetHeight())); 98 99 int baseline = baselinePosition(true); 100 101 info.context->setStrokeColor(Color(255, 0, 0), sRGBColorSpace); 102 103 info.context->drawLine(IntPoint(tx, ty + baseline), IntPoint(tx + offsetWidth(), ty + baseline)); 104 105 info.context->restore(); 106 107 } 108 #endif // ENABLE(DEBUG_MATH_LAYOUT) 109 76 110 77 111 } -
trunk/WebCore/mathml/RenderMathMLBlock.h
r53764 r54128 31 31 #include "RenderBlock.h" 32 32 33 #define ENABLE_DEBUG_MATH_LAYOUT 0 34 33 35 namespace WebCore { 34 36 … … 45 47 virtual int nonOperatorHeight() const; 46 48 virtual void stretchToHeight(int height); 49 50 #if ENABLE(DEBUG_MATH_LAYOUT) 51 virtual void paint(PaintInfo&, int tx, int ty); 52 #endif 47 53 48 54 protected:
Note: See TracChangeset
for help on using the changeset viewer.