Remove extraneous MathML code before bug 52444 fix

https://bugs.webkit.org/show_bug.cgi?id=78034

Source/WebCore:

Patch by David Barton <dbarton@mathscribe.com> on 2012-02-07
Reviewed by Eric Seidel.

Per Darin Adler, I am breaking up the patch fixing bug 52444 into smaller pieces.
This patch removes a couple unused functions, some extra blank lines, unused #include
directives, etc., and adds a very few WebKit-standard changes to these files.

No new tests.

* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::getBoxModelObjectHeight):
    - changed to a static member function since 'this' is unused;
      removed redundant non-const version
(WebCore::RenderMathMLBlock::getBoxModelObjectWidth):
    - changed to a static member function since 'this' is unused;
      removed redundant non-const version
(WebCore):
* rendering/mathml/RenderMathMLFraction.cpp:
* rendering/mathml/RenderMathMLMath.cpp:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLOperator.h:
(WebCore):
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLSquareRoot.cpp:
* rendering/mathml/RenderMathMLSquareRoot.h:
* rendering/mathml/RenderMathMLSubSup.cpp:
* rendering/mathml/RenderMathMLSubSup.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
* rendering/mathml/RenderMathMLUnderOver.h:

LayoutTests:

Patch by David Barton <dbarton@mathscribe.com> on 2012-02-07
Reviewed by Eric Seidel.

The rendering of the scrollbar in row-expected.png was flaky, presumably due to a test
environment timing issue, so I removed it.

* mathml/presentation/row.xhtml:
* platform/mac/mathml/presentation/row-expected.png:
* platform/mac/mathml/presentation/row-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 20bf2a9a
2012-02-07 David Barton <dbarton@mathscribe.com>
Remove extraneous MathML code before bug 52444 fix
https://bugs.webkit.org/show_bug.cgi?id=78034
Reviewed by Eric Seidel.
The rendering of the scrollbar in row-expected.png was flaky, presumably due to a test
environment timing issue, so I removed it.
* mathml/presentation/row.xhtml:
* platform/mac/mathml/presentation/row-expected.png:
* platform/mac/mathml/presentation/row-expected.txt:
2012-02-07 Ami Fischman <fischman@chromium.org>
Override expected-failure mac-leopard/media/media-blocked-by-beforeload-expected.txt with copy of expected-success expectation, for chromium-mac-leopard.
......@@ -5,6 +5,9 @@
mo {
background-color: rgb(200,200,200);
}
body {
overflow: hidden;
}
</style>
</head>
<body>
......
layer at (0,0) size 785x614
RenderView at (0,0) size 785x600
layer at (0,0) size 785x614
RenderBlock {html} at (0,0) size 785x614
RenderBody {body} at (8,16) size 769x582
RenderBlock {p} at (0,0) size 769x19
layer at (0,0) size 800x614
RenderView at (0,0) size 800x600
layer at (0,0) size 800x614
RenderBlock {html} at (0,0) size 800x614
RenderBody {body} at (8,16) size 784x582
RenderBlock {p} at (0,0) size 784x19
RenderMathMLMath {math} at (0,3) size 27x16
RenderInline {mi} at (0,0) size 7x16
RenderText {#text} at (1,0) size 7x16
......@@ -16,7 +16,7 @@ layer at (0,0) size 785x614
RenderText {#text} at (18,0) size 8x16
text run at (18,0) width 8: "1"
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,35) size 769x21
RenderBlock {p} at (0,35) size 784x21
RenderText {#text} at (0,2) size 40x18
text run at (0,2) width 40: "16px: "
RenderMathMLMath {math} at (40,0) size 45x21
......@@ -94,7 +94,7 @@ layer at (0,0) size 785x614
text run at (6,5) width 7: "x"
RenderBlock {div} at (13,5) size 16x16 [bgcolor=#00FF00]
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,72) size 769x36
RenderBlock {p} at (0,72) size 784x36
RenderText {#text} at (0,8) size 40x18
text run at (0,8) width 40: "24px: "
RenderMathMLMath {math} at (40,0) size 49x36
......@@ -145,7 +145,7 @@ layer at (0,0) size 785x614
text run at (11,11) width 7: "x"
RenderBlock {div} at (18,5) size 24x24 [bgcolor=#00FF00]
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,124) size 769x50
RenderBlock {p} at (0,124) size 784x50
RenderText {#text} at (0,19) size 40x18
text run at (0,19) width 40: "32px: "
RenderMathMLMath {math} at (40,0) size 57x50
......@@ -196,7 +196,7 @@ layer at (0,0) size 785x614
text run at (11,22) width 7: "x"
RenderBlock {div} at (18,11) size 32x32 [bgcolor=#00FF00]
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,190) size 769x80
RenderBlock {p} at (0,190) size 784x80
RenderText {#text} at (0,41) size 40x18
text run at (0,41) width 40: "48px: "
RenderMathMLMath {math} at (40,0) size 73x80
......@@ -247,7 +247,7 @@ layer at (0,0) size 785x614
text run at (11,44) width 7: "x"
RenderBlock {div} at (18,22) size 48x48 [bgcolor=#00FF00]
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,286) size 769x215
RenderBlock {p} at (0,286) size 784x215
RenderText {#text} at (0,140) size 48x18
text run at (0,140) width 48: "120px: "
RenderMathMLMath {math} at (48,0) size 73x215
......@@ -298,7 +298,7 @@ layer at (0,0) size 785x614
text run at (11,143) width 7: "x"
RenderBlock {div} at (18,73) size 48x120 [bgcolor=#00FF00]
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,517) size 769x65
RenderBlock {p} at (0,517) size 784x65
RenderMathMLMath {math} at (0,0) size 156x65
RenderMathMLRow {mrow} at (1,0) size 154x65
RenderMathMLOperator {mo} at (0,16) size 6x49 [bgcolor=#C8C8C8]
......
2012-02-07 David Barton <dbarton@mathscribe.com>
Remove extraneous MathML code before bug 52444 fix
https://bugs.webkit.org/show_bug.cgi?id=78034
Reviewed by Eric Seidel.
Per Darin Adler, I am breaking up the patch fixing bug 52444 into smaller pieces.
This patch removes a couple unused functions, some extra blank lines, unused #include
directives, etc., and adds a very few WebKit-standard changes to these files.
No new tests.
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::getBoxModelObjectHeight):
- changed to a static member function since 'this' is unused;
removed redundant non-const version
(WebCore::RenderMathMLBlock::getBoxModelObjectWidth):
- changed to a static member function since 'this' is unused;
removed redundant non-const version
(WebCore):
* rendering/mathml/RenderMathMLFraction.cpp:
* rendering/mathml/RenderMathMLMath.cpp:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLOperator.h:
(WebCore):
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLSquareRoot.cpp:
* rendering/mathml/RenderMathMLSquareRoot.h:
* rendering/mathml/RenderMathMLSubSup.cpp:
* rendering/mathml/RenderMathMLSubSup.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
* rendering/mathml/RenderMathMLUnderOver.h:
2012-02-07 David Reveman <reveman@chromium.org>
[Chromium] REGRESSION(r101854): Causing large amounts of unnecessary repainting.
......@@ -109,7 +109,6 @@ void RenderMathMLBlock::paint(PaintInfo& info, const LayoutPoint& paintOffset)
}
#endif // ENABLE(DEBUG_MATH_LAYOUT)
}
#endif
......@@ -52,16 +52,7 @@ public:
#endif
protected:
int getBoxModelObjectHeight(RenderObject* object)
{
if (object && object->isBoxModelObject()) {
RenderBoxModelObject* box = toRenderBoxModelObject(object);
return box->offsetHeight();
}
return 0;
}
int getBoxModelObjectHeight(const RenderObject* object)
static LayoutUnit getBoxModelObjectHeight(const RenderObject* object)
{
if (object && object->isBoxModelObject()) {
const RenderBoxModelObject* box = toRenderBoxModelObject(object);
......@@ -70,16 +61,7 @@ protected:
return 0;
}
int getBoxModelObjectWidth(RenderObject* object)
{
if (object && object->isBoxModelObject()) {
RenderBoxModelObject* box = toRenderBoxModelObject(object);
return box->offsetWidth();
}
return 0;
}
int getBoxModelObjectWidth(const RenderObject* object)
static LayoutUnit getBoxModelObjectWidth(const RenderObject* object)
{
if (object && object->isBoxModelObject()) {
const RenderBoxModelObject* box = toRenderBoxModelObject(object);
......@@ -106,8 +88,10 @@ inline const RenderMathMLBlock* toRenderMathMLBlock(const RenderObject* object)
return static_cast<const RenderMathMLBlock*>(object);
}
}
// This will catch anyone doing an unnecessary cast.
void toRenderMathMLBlock(const RenderMathMLBlock*);
}
#endif // ENABLE(MATHML)
#endif // RenderMathMLBlock_h
......@@ -182,5 +182,4 @@ LayoutUnit RenderMathMLFraction::baselinePosition(FontBaseline, bool firstLine,
}
#endif // ENABLE(MATHML)
......@@ -43,4 +43,3 @@ RenderMathMLMath::RenderMathMLMath(Node* math)
}
#endif // ENABLE(MATHML)
......@@ -43,6 +43,5 @@ private:
}
#endif // ENABLE(MATHML)
#endif // RenderMathMLMath_h
......@@ -68,6 +68,9 @@ inline const RenderMathMLOperator* toRenderMathMLOperator(const RenderMathMLBloc
return static_cast<const RenderMathMLOperator*>(block);
}
// This will catch anyone doing an unnecessary cast.
void toRenderMathMLOperator(const RenderMathMLOperator*);
inline UChar convertHyphenMinusToMinusSign(UChar glyph)
{
// When rendered as a mathematical operator, minus glyph should be larger.
......
......@@ -252,5 +252,3 @@ void RenderMathMLRoot::layout()
}
#endif // ENABLE(MATHML)
......@@ -133,4 +133,3 @@ LayoutUnit RenderMathMLRow::baselinePosition(FontBaseline, bool firstLine, LineD
}
#endif // ENABLE(MATHML)
......@@ -48,6 +48,5 @@ private:
}
#endif // ENABLE(MATHML)
#endif // RenderMathMLRow_h
......@@ -189,5 +189,3 @@ void RenderMathMLSquareRoot::layout()
}
#endif // ENABLE(MATHML)
......@@ -48,6 +48,3 @@ private:
#endif // ENABLE(MATHML)
#endif // RenderMathMLSquareRoot_h
......@@ -29,14 +29,7 @@
#include "RenderMathMLSubSup.h"
#include "FontSelector.h"
#include "MathMLNames.h"
#include "RenderInline.h"
#include "RenderTable.h"
#include "RenderTableCell.h"
#include "RenderTableRow.h"
#include "RenderTableSection.h"
#include "RenderText.h"
namespace WebCore {
......
......@@ -23,14 +23,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderMathMLSubSup_h
#define RenderMathMLSubSup_h
#if ENABLE(MATHML)
#include "RenderMathMLBlock.h"
#include "RenderTable.h"
namespace WebCore {
......
......@@ -292,5 +292,4 @@ int RenderMathMLUnderOver::nonOperatorHeight() const
}
#endif // ENABLE(MATHML)
......@@ -23,7 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderMathMLUnderOver_h
#define RenderMathMLUnderOver_h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment