Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderFullScreen.cpp
index e767450..41c5ece 100644 (file)
@@ -28,7 +28,7 @@
 #include "core/dom/FullscreenElementStack.h"
 #include "core/rendering/RenderBlockFlow.h"
 
-using namespace WebCore;
+using namespace blink;
 
 class RenderFullScreenPlaceholder FINAL : public RenderBlockFlow {
 public:
@@ -52,7 +52,7 @@ void RenderFullScreenPlaceholder::willBeDestroyed()
 
 RenderFullScreen::RenderFullScreen()
     : RenderFlexibleBox(0)
-    , m_placeholder(0)
+    , m_placeholder(nullptr)
 {
     setReplaced(false);
 }
@@ -64,6 +64,12 @@ RenderFullScreen* RenderFullScreen::createAnonymous(Document* document)
     return renderer;
 }
 
+void RenderFullScreen::trace(Visitor* visitor)
+{
+    visitor->trace(m_placeholder);
+    RenderFlexibleBox::trace(visitor);
+}
+
 void RenderFullScreen::willBeDestroyed()
 {
     if (m_placeholder) {
@@ -74,10 +80,10 @@ void RenderFullScreen::willBeDestroyed()
     }
 
     // RenderObjects are unretained, so notify the document (which holds a pointer to a RenderFullScreen)
-    // if it's RenderFullScreen is destroyed.
-    FullscreenElementStack& controller = FullscreenElementStack::from(document());
-    if (controller.fullScreenRenderer() == this)
-        controller.fullScreenRendererDestroyed();
+    // if its RenderFullScreen is destroyed.
+    FullscreenElementStack& fullscreen = FullscreenElementStack::from(document());
+    if (fullscreen.fullScreenRenderer() == this)
+        fullscreen.fullScreenRendererDestroyed();
 
     RenderFlexibleBox::willBeDestroyed();
 }
@@ -100,8 +106,8 @@ static PassRefPtr<RenderStyle> createFullScreenStyle()
     fullscreenStyle->setPosition(FixedPosition);
     fullscreenStyle->setWidth(Length(100.0, Percent));
     fullscreenStyle->setHeight(Length(100.0, Percent));
-    fullscreenStyle->setLeft(Length(0, WebCore::Fixed));
-    fullscreenStyle->setTop(Length(0, WebCore::Fixed));
+    fullscreenStyle->setLeft(Length(0, blink::Fixed));
+    fullscreenStyle->setTop(Length(0, blink::Fixed));
 
     fullscreenStyle->setBackgroundColor(StyleColor(Color::black));
 
@@ -155,8 +161,7 @@ void RenderFullScreen::unwrapRenderer()
     DeprecatedDisableModifyRenderTreeStructureAsserts disabler;
 
     if (parent()) {
-        RenderObject* child;
-        while ((child = firstChild())) {
+        for (RenderObject* child = firstChild(); child; child = firstChild()) {
             // We have to clear the override size, because as a flexbox, we
             // may have set one on the child, and we don't want to leave that
             // lying around on the child.