Title: [143293] trunk/Source/WebCore
Revision
143293
Author
[email protected]
Date
2013-02-18 22:12:57 -0800 (Mon, 18 Feb 2013)

Log Message

Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
Work around it by directly instantiating the class inside createFloatingObjects.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
* rendering/RenderBlock.h:
(RenderBlock): Moved the declaration of createFloatingObjects up.
(FloatingObjects::FloatingObjects):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (143292 => 143293)


--- trunk/Source/WebCore/ChangeLog	2013-02-19 05:51:18 UTC (rev 143292)
+++ trunk/Source/WebCore/ChangeLog	2013-02-19 06:12:57 UTC (rev 143293)
@@ -1,5 +1,16 @@
 2013-02-18  Ryosuke Niwa  <[email protected]>
 
+        Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
+        Work around it by directly instantiating the class inside createFloatingObjects.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
+        * rendering/RenderBlock.h:
+        (RenderBlock): Moved the declaration of createFloatingObjects up.
+        (FloatingObjects::FloatingObjects):
+
+2013-02-18  Ryosuke Niwa  <[email protected]>
+
         Merge handleSpecialChild into layoutBlockChildren
         https://bugs.webkit.org/show_bug.cgi?id=110165
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (143292 => 143293)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-02-19 05:51:18 UTC (rev 143292)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-02-19 06:12:57 UTC (rev 143293)
@@ -7746,16 +7746,9 @@
 {
 }
 
-inline PassOwnPtr<RenderBlock::FloatingObjects> RenderBlock::FloatingObjects::create(const RenderBlock* renderer, bool horizontalWritingMode)
-{
-    return adoptPtr(new FloatingObjects(renderer, horizontalWritingMode));
-}
-
 void RenderBlock::createFloatingObjects()
 {
-    if (m_floatingObjects)
-        return;
-    m_floatingObjects = FloatingObjects::create(this, isHorizontalWritingMode());
+    m_floatingObjects = adoptPtr(new FloatingObjects(this, isHorizontalWritingMode()));
 }
 
 inline void RenderBlock::FloatingObjects::clear()

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (143292 => 143293)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2013-02-19 05:51:18 UTC (rev 143292)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2013-02-19 06:12:57 UTC (rev 143293)
@@ -1135,10 +1135,11 @@
         LayoutUnit* m_heightRemaining;
     };
 
+    void createFloatingObjects();
+
     class FloatingObjects {
         WTF_MAKE_NONCOPYABLE(FloatingObjects); WTF_MAKE_FAST_ALLOCATED;
     public:
-        static PassOwnPtr<FloatingObjects> create(const RenderBlock*, bool horizontalWritingMode);
         void clear();
         void add(FloatingObject*);
         void remove(FloatingObject*);
@@ -1172,13 +1173,12 @@
         unsigned m_rightObjectsCount;
         bool m_horizontalWritingMode;
         const RenderBlock* m_renderer;
+
+        friend void RenderBlock::createFloatingObjects();
     };
 
     OwnPtr<FloatingObjects> m_floatingObjects;
 
-    void createFloatingObjects();
-
-
     // Allocated only when some of these fields have non-default values
     struct RenderBlockRareData {
         WTF_MAKE_NONCOPYABLE(RenderBlockRareData); WTF_MAKE_FAST_ALLOCATED;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to