diff options
author | Steve Block <steveblock@google.com> | 2010-08-27 11:02:25 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-02 17:17:20 +0100 |
commit | e8b154fd68f9b33be40a3590e58347f353835f5c (patch) | |
tree | 0733ce26384183245aaa5656af26c653636fe6c1 /WebCore/mathml | |
parent | da56157816334089526a7a115a85fd85a6e9a1dc (diff) | |
download | external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2 |
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebCore/mathml')
-rw-r--r-- | WebCore/mathml/RenderMathMLFraction.cpp | 2 | ||||
-rw-r--r-- | WebCore/mathml/RenderMathMLUnderOver.cpp | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/WebCore/mathml/RenderMathMLFraction.cpp b/WebCore/mathml/RenderMathMLFraction.cpp index 72f7298..914f6fe 100644 --- a/WebCore/mathml/RenderMathMLFraction.cpp +++ b/WebCore/mathml/RenderMathMLFraction.cpp @@ -176,7 +176,7 @@ void RenderMathMLFraction::paint(PaintInfo& info, int tx, int ty) int RenderMathMLFraction::baselinePosition(bool firstLine, bool isRootLineBox) const { - if (firstChild()->isRenderMathMLBlock()) { + if (firstChild() && firstChild()->isRenderMathMLBlock()) { RenderMathMLBlock* numerator = toRenderMathMLBlock(firstChild()); // FIXME: the baseline should adjust so the fraction line aligns // relative certain operators (e.g. aligns with the horizontal diff --git a/WebCore/mathml/RenderMathMLUnderOver.cpp b/WebCore/mathml/RenderMathMLUnderOver.cpp index ad32d59..f015054 100644 --- a/WebCore/mathml/RenderMathMLUnderOver.cpp +++ b/WebCore/mathml/RenderMathMLUnderOver.cpp @@ -236,35 +236,35 @@ void RenderMathMLUnderOver::layout() int RenderMathMLUnderOver::baselinePosition(bool firstLine, bool isRootLineBox) const { + RenderObject* current = firstChild(); + if (!current) + return RenderBlock::baselinePosition(firstLine, isRootLineBox); + int baseline = 0; - RenderObject* current = 0; switch (m_kind) { case UnderOver: case Over: - current = firstChild(); baseline += getOffsetHeight(current); current = current->nextSibling(); if (current) { // actual base RenderObject* base = current->firstChild(); + if (!base) + break; baseline += base->baselinePosition(firstLine, isRootLineBox); // added the negative top margin baseline += current->style()->marginTop().value(); - // FIXME: Where is the extra 2-3px adjusted for zoom coming from? - float zoomFactor = style()->effectiveZoom(); - baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor); } break; case Under: - current = firstChild(); - if (current) { - RenderObject* base = current->firstChild(); + RenderObject* base = current->firstChild(); + if (base) baseline += base->baselinePosition(true); - // FIXME: Where is the extra 2-3px adjusted for zoom coming from? - float zoomFactor = style()->effectiveZoom(); - baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor); - } } + + // FIXME: Where is the extra 2-3px adjusted for zoom coming from? + float zoomFactor = style()->effectiveZoom(); + baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor); return baseline; } |