#include "core/rendering/RenderRubyRun.h"
-#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/RenderRubyBase.h"
#include "core/rendering/RenderRubyText.h"
#include "core/rendering/RenderText.h"
return lastChild() && lastChild()->isRubyBase();
}
-bool RenderRubyRun::isEmpty() const
-{
- return !hasRubyText() && !hasRubyBase();
-}
-
RenderRubyText* RenderRubyRun::rubyText() const
{
RenderObject* child = firstChild();
}
// If any of the above leaves the run empty, destroy it as well.
- if (isEmpty()) {
- parent()->removeChild(this);
+ if (!hasRubyText() && !hasRubyBase()) {
deleteLineBoxTree();
destroy();
}
void RenderRubyRun::layout()
{
- LayoutRectRecorder recorder(*this);
RenderBlockFlow::layout();
RenderRubyText* rt = rubyText();