Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderRubyRun.cpp
index d89704c..09c0146 100644 (file)
@@ -32,7 +32,6 @@
 
 #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"
@@ -66,11 +65,6 @@ bool RenderRubyRun::hasRubyBase() const
     return lastChild() && lastChild()->isRubyBase();
 }
 
-bool RenderRubyRun::isEmpty() const
-{
-    return !hasRubyText() && !hasRubyBase();
-}
-
 RenderRubyText* RenderRubyRun::rubyText() const
 {
     RenderObject* child = firstChild();
@@ -188,8 +182,7 @@ void RenderRubyRun::removeChild(RenderObject* child)
         }
 
         // If any of the above leaves the run empty, destroy it as well.
-        if (isEmpty()) {
-            parent()->removeChild(this);
+        if (!hasRubyText() && !hasRubyBase()) {
             deleteLineBoxTree();
             destroy();
         }
@@ -229,7 +222,6 @@ RenderObject* RenderRubyRun::layoutSpecialExcludedChild(bool relayoutChildren, S
 
 void RenderRubyRun::layout()
 {
-    LayoutRectRecorder recorder(*this);
     RenderBlockFlow::layout();
 
     RenderRubyText* rt = rubyText();