If posChildNeedsLayout but !m_positionedObjects, normal layout is needed
authorKyungTae Kim <ktf.kim@samsung.com>
Sat, 8 Jun 2013 00:22:59 +0000 (09:22 +0900)
committerKyungTae Kim <ktf.kim@samsung.com>
Mon, 10 Jun 2013 07:20:27 +0000 (16:20 +0900)
[Title]
If posChildNeedsLayout but !m_positionedObjects, normal layout is needed
[Issue]
Docomo Shabette Conciere Web App Issue
[Problem]
The mascot image is not shown when start up
[Cause]
The "content_main" element is a positioned child of "ui-scrollview-view",
but was not registered to m_positionedObjects during first layout of "ui-scrollview-view".
Then, when the mascot image is added to "content_main",
the layout of "ui-scrollview-view" triggered with posChildNeedsLayout flag,
but layoutPositionedObjects called by simplifiedLayout is just returned.
[Solution]
If posChildNeedsLayout but !m_positionedObjects, return the simplifiedLayout with false
to execute normal layoutBlock that register the pos child and execute the layoutPositionedObjects.

Change-Id: Ic116480d7ffde39d617935ff1b5d3e42663a83c4

Source/WTF/wtf/Platform.h
Source/WebCore/rendering/RenderBlock.cpp

index 414f32e..dd07c10 100755 (executable)
 #define ENABLE_TIZEN_INFLATE_NONE_BLUR_SHADOW_AREA 1 /*KyungTae Kim(ktf.kim@samsung.com) : Enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing) if the context is transformed*/
 #define ENABLE_TIZEN_NOT_INITIAIZE_BACKGROUND_SIZE_IN_SHORTHAND_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Do not initialize background-size when the background shorthand doesn't include it(Bug 97761)*/
 #define ENABLE_TIZEN_SET_CARET_HEIGHT_TO_OBJECT_HEIGHT 1 /*KyungTae Kim(ktf.kim@samsung.com) : Set caret height from selection height to object height for fix the case that image and text are in the same line (Bug 116424)*/
+#define ENABLE_TIZEN_POSITIONED_CHILD_RELAYOUT 1 /*KyungTae Kim(ktf.kim@samsung.com) : If posChildNeedsLayout() but !m_positionedObjects, normal layout is needed for updating m_positionedObjects*/
 #if USE(FREETYPE)
 #define ENABLE_TIZEN_FT_EMBOLDEN_FOR_SYNTHETIC_BOLD 1 /*Younghwan Cho(yhwan.cho@samsung.com) : Use freetype's 'embolden' instead of drawing twice for synthetic bold*/
 #endif
index 5565313..df6adea 100755 (executable)
@@ -2538,6 +2538,13 @@ bool RenderBlock::simplifiedLayout()
     if (needsPositionedMovementLayout() && !tryLayoutDoingPositionedMovementOnly())
         return false;
 
+#if ENABLE(TIZEN_POSITIONED_CHILD_RELAYOUT)
+    // If posChildNeedsLayout() but !m_positionedObjects, normal layout is needed for updating m_positionedObjects
+    // FIXME : this could be merged with the below code that checks posChildNeedsLayout.
+    if (posChildNeedsLayout() && !m_positionedObjects)
+        return false;
+#endif
+
     // Lay out positioned descendants or objects that just need to recompute overflow.
     if (needsSimplifiedNormalFlowLayout())
         simplifiedNormalFlowLayout();