Index: Source/core/css/mathml.css |
diff --git a/Source/core/dom/ClientRectList.cpp b/Source/core/css/mathml.css |
similarity index 50% |
copy from Source/core/dom/ClientRectList.cpp |
copy to Source/core/css/mathml.css |
index c7d054c15940db63259a892d68e63217259a9df5..cef10e3f7b0cc95d86a0093dadf38f535128eb75 100644 |
--- a/Source/core/dom/ClientRectList.cpp |
+++ b/Source/core/css/mathml.css |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
+ * The default style sheet used to render MathML. |
+ * |
+ * Copyright (C) 2014 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -21,47 +23,27 @@ |
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- * |
*/ |
-#include "config.h" |
-#include "core/dom/ClientRectList.h" |
- |
-#include "core/dom/ClientRect.h" |
- |
-namespace WebCore { |
+@namespace "http://www.w3.org/1998/Math/MathML"; |
-ClientRectList::ClientRectList() |
-{ |
- ScriptWrappable::init(this); |
+/* By default, we only display the MathML formulas without any formatting other than the one specified by the display attribute. */ |
+math { |
+ display: inline; |
} |
-ClientRectList::ClientRectList(const Vector<FloatQuad>& quads) |
-{ |
- ScriptWrappable::init(this); |
- m_list.reserveInitialCapacity(quads.size()); |
- for (size_t i = 0; i < quads.size(); ++i) |
- m_list.append(ClientRect::create(quads[i].enclosingBoundingBox())); |
+math[display="block"] { |
+ display: block; |
+ text-align: center; |
} |
-ClientRectList::~ClientRectList() |
-{ |
+/* We hide the PresentationExpression constructions that are children of a <semantics> element. |
+ http://www.w3.org/TR/MathML/appendixa.html#parsing_PresentationExpression */ |
+semantics > mi, semantics > mn, semantics > mo, semantics > mtext, semantics > mspace, semantics > ms, semantics > maligngroup, semantics > malignmark, semantics > mrow, semantics > mfrac, semantics > msqrt, semantics > mroot, semantics > mstyle, semantics > merror, semantics > mpadded, semantics > mphantom, semantics > mfenced, semantics > menclose, semantics > msub, semantics > msup, semantics > msubsup, semantics > munder, semantics > mover, semantics > munderover, semantics > mmultiscripts, semantics > mtable, semantics > mstack, semantics > mlongdiv, semantics > maction { |
+ display: none; |
} |
-unsigned ClientRectList::length() const |
-{ |
- return m_list.size(); |
+/* However, we display all the annotations. */ |
+annotation, annotation-xml { |
+ display: inline-block; |
} |
- |
-ClientRect* ClientRectList::item(unsigned index) |
-{ |
- if (index >= m_list.size()) { |
- // FIXME: this should throw an exception. |
- // ec = IndexSizeError; |
- return 0; |
- } |
- |
- return m_list[index].get(); |
-} |
- |
-} // namespace WebCore |