Title: [119996] trunk
Revision
119996
Author
[email protected]
Date
2012-06-11 11:48:47 -0700 (Mon, 11 Jun 2012)

Log Message

Relative pos. input fields in columns vanish when you start typing in them
https://bugs.webkit.org/show_bug.cgi?id=76834

Patch by Pravin D <[email protected]> on 2012-06-11
Reviewed by Julien Chaffraix.

Source/WebCore:

Test: fast/multicol/multicol-with-child-renderLayer-for-input.html

* page/FrameView.cpp:
(WebCore::updateLayerPositionFlags):
Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters.
If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags.
Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is
included in the flags.

(WebCore):
(WebCore::FrameView::layout):
Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags.

* rendering/RenderLayer.h:
(WebCore::RenderLayer::isPaginated):
(RenderLayer):
isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags.

LayoutTests:

* fast/multicol/multicol-with-child-renderLayer-for-input-expected.html: Added.
* fast/multicol/multicol-with-child-renderLayer-for-input.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (119995 => 119996)


--- trunk/LayoutTests/ChangeLog	2012-06-11 18:37:19 UTC (rev 119995)
+++ trunk/LayoutTests/ChangeLog	2012-06-11 18:48:47 UTC (rev 119996)
@@ -1,3 +1,13 @@
+2012-06-11  Pravin D  <[email protected]>
+
+        Relative pos. input fields in columns vanish when you start typing in them
+        https://bugs.webkit.org/show_bug.cgi?id=76834
+
+        Reviewed by Julien Chaffraix.
+
+        * fast/multicol/multicol-with-child-renderLayer-for-input-expected.html: Added.
+        * fast/multicol/multicol-with-child-renderLayer-for-input.html: Added.
+
 2012-06-11  Ryosuke Niwa  <[email protected]>
 
         Use testRunner instead of layoutTestController in compositing tests

Added: trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input-expected.html (0 => 119996)


--- trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input-expected.html	2012-06-11 18:48:47 UTC (rev 119996)
@@ -0,0 +1,20 @@
+<html>
+<head>
+<title>Testcase for bug https://bugs.webkit.org/show_bug.cgi?id=76834 </title>
+<script>
+function startTest(){
+    var input = document.getElementById('test');
+    input.focus();
+    document.execCommand('InsertText',false,'Testing')
+}
+</script>
+</head>
+<body _onload_="startTest();">
+<div style="-webkit-column-count:2">
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   <input id="test"  />
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input.html (0 => 119996)


--- trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/multicol-with-child-renderLayer-for-input.html	2012-06-11 18:48:47 UTC (rev 119996)
@@ -0,0 +1,20 @@
+<html>
+<head>
+<title>Testcase for bug https://bugs.webkit.org/show_bug.cgi?id=76834 </title>
+<script>
+function startTest(){
+    var input = document.getElementById('test');
+    input.focus();
+    document.execCommand('InsertText',false,'Testing')
+}
+</script>
+</head>
+<body _onload_="startTest();">
+<div style="-webkit-column-count:2">
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   Filler Text  Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+   <input id="test" style="position:relative;" />
+</div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (119995 => 119996)


--- trunk/Source/WebCore/ChangeLog	2012-06-11 18:37:19 UTC (rev 119995)
+++ trunk/Source/WebCore/ChangeLog	2012-06-11 18:48:47 UTC (rev 119996)
@@ -1,3 +1,28 @@
+2012-06-11  Pravin D  <[email protected]>
+
+        Relative pos. input fields in columns vanish when you start typing in them
+        https://bugs.webkit.org/show_bug.cgi?id=76834
+
+        Reviewed by Julien Chaffraix.
+
+        Test: fast/multicol/multicol-with-child-renderLayer-for-input.html
+
+        * page/FrameView.cpp:
+        (WebCore::updateLayerPositionFlags):
+        Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters.
+        If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags.
+        Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is
+        included in the flags. 
+
+        (WebCore):
+        (WebCore::FrameView::layout):
+        Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags.
+
+        * rendering/RenderLayer.h:
+        (WebCore::RenderLayer::isPaginated):
+        (RenderLayer):
+        isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags.
+
 2012-06-11  Mark Pilgrim  <[email protected]>
 
         [Chromium] Remove some dead code in PasteboardChromium

Modified: trunk/Source/WebCore/page/FrameView.cpp (119995 => 119996)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-06-11 18:37:19 UTC (rev 119995)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-06-11 18:48:47 UTC (rev 119996)
@@ -122,6 +122,16 @@
     return view->frame() ? view->frame()->contentRenderer() : 0;
 }
 
+static RenderLayer::UpdateLayerPositionsFlags updateLayerPositionFlags(RenderLayer* layer, bool isRelayoutingSubtree, bool didFullRepaint)
+{
+    RenderLayer::UpdateLayerPositionsFlags flags = RenderLayer::defaultFlags;
+    if (didFullRepaint)
+        flags &= ~RenderLayer::CheckForRepaint;
+    if (isRelayoutingSubtree && layer->isPaginated())
+        flags |= RenderLayer::UpdatePagination;
+    return flags;
+}
+
 FrameView::FrameView(Frame* frame)
     : m_frame(frame)
     , m_canHaveScrollbars(true)
@@ -1117,10 +1127,8 @@
     if (m_doFullRepaint)
         root->view()->repaint(); // FIXME: This isn't really right, since the RenderView doesn't fully encompass the visibleContentRect(). It just happens
                                  // to work out most of the time, since first layouts and printing don't have you scrolled anywhere.
-    layer->updateLayerPositions(hasLayerOffset ? &offsetFromRoot : 0,
-                                (m_doFullRepaint ? 0 : RenderLayer::CheckForRepaint)
-                                | RenderLayer::IsCompositingUpdateRoot
-                                | RenderLayer::UpdateCompositingLayers);
+
+    layer->updateLayerPositions(hasLayerOffset ? &offsetFromRoot : 0, updateLayerPositionFlags(layer, subtree, m_doFullRepaint));
     endDeferredRepaints();
 
 #if USE(ACCELERATED_COMPOSITING)

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (119995 => 119996)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2012-06-11 18:37:19 UTC (rev 119995)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2012-06-11 18:48:47 UTC (rev 119996)
@@ -393,6 +393,8 @@
     // Providing |cachedOffset| prevents a outlineBoxForRepaint from walking back to the root for each layer in our subtree.
     // This is an optimistic optimization that is not guaranteed to succeed.
     void updateLayerPositions(LayoutPoint* offsetFromRoot, UpdateLayerPositionsFlags = defaultFlags);
+    
+    bool isPaginated() const { return m_isPaginated; }
 
     void updateTransform();
 
@@ -813,8 +815,7 @@
     void drawPlatformResizerImage(GraphicsContext*, IntRect resizerCornerRect);
 
     void updatePagination();
-    bool isPaginated() const { return m_isPaginated; }
-
+    
 #if USE(ACCELERATED_COMPOSITING)    
     bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
     void setHasCompositingDescendant(bool b)  { m_hasCompositingDescendant = b; }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to