Commit 79afa8ce authored by Frédéric Wang's avatar Frédéric Wang Committed by Commit Bot

[mathml] Minor cleanup of LayoutNGMathMLBlock

* Forward declare MathMLElement instead of including the header.
* Use new isA<MathMLElement> cast syntax.

Bug: 6606
Change-Id: I5f8d95668849dc76f2bf05c8c4efb72004466310
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153146Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Cr-Commit-Position: refs/heads/master@{#759799}
parent e292920b
......@@ -6,6 +6,7 @@
#include "third_party/blink/renderer/core/layout/layout_analyzer.h"
#include "third_party/blink/renderer/core/layout/ng/ng_layout_result.h"
#include "third_party/blink/renderer/core/mathml/mathml_element.h"
namespace blink {
......@@ -34,7 +35,7 @@ bool LayoutNGMathMLBlock::IsOfType(LayoutObjectType type) const {
bool LayoutNGMathMLBlock::IsChildAllowed(LayoutObject* child,
const ComputedStyle&) const {
return child->GetNode() && child->GetNode()->IsMathMLElement();
return child->GetNode() && IsA<MathMLElement>(child->GetNode());
}
bool LayoutNGMathMLBlock::CanHaveChildren() const {
......
......@@ -6,10 +6,11 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_MATHML_LAYOUT_NG_MATHML_BLOCK_H_
#include "third_party/blink/renderer/core/layout/ng/layout_ng_mixin.h"
#include "third_party/blink/renderer/core/mathml/mathml_element.h"
namespace blink {
class MathMLElement;
class LayoutNGMathMLBlock : public LayoutNGMixin<LayoutBlock> {
public:
explicit LayoutNGMathMLBlock(MathMLElement*);
......
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