Title: [149640] trunk
- Revision
- 149640
- Author
- [email protected]
- Date
- 2013-05-06 14:16:42 -0700 (Mon, 06 May 2013)
Log Message
REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
https://bugs.webkit.org/show_bug.cgi?id=115379
Reviewed by David Hyatt.
Source/WebCore:
When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
for our check instead of updating it.
Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
LayoutTests:
* fast/block/positioning/child-of-fixed-pos-after-movement-expected.txt: Added.
* fast/block/positioning/child-of-fixed-pos-after-movement.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (149639 => 149640)
--- trunk/LayoutTests/ChangeLog 2013-05-06 21:07:35 UTC (rev 149639)
+++ trunk/LayoutTests/ChangeLog 2013-05-06 21:16:42 UTC (rev 149640)
@@ -1,3 +1,13 @@
+2013-05-06 Robert Hogan <[email protected]>
+
+ REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
+ https://bugs.webkit.org/show_bug.cgi?id=115379
+
+ Reviewed by David Hyatt.
+
+ * fast/block/positioning/child-of-fixed-pos-after-movement-expected.txt: Added.
+ * fast/block/positioning/child-of-fixed-pos-after-movement.html: Added.
+
2013-05-06 Bem Jones-Bey <[email protected]>
[CSS Exclusions] remove unused -webkit-wrap property
Added: trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement-expected.txt (0 => 149640)
--- trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement-expected.txt 2013-05-06 21:16:42 UTC (rev 149640)
@@ -0,0 +1,5 @@
+webkit.org/b/115379: Ensure children of fixed pos objects get a layout when the fixed pos object detects that it has to move with an absolute positioned ancestor.
+
+fixed div
+inner div
+PASS
Added: trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement.html (0 => 149640)
--- trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement.html (rev 0)
+++ trunk/LayoutTests/fast/block/positioning/child-of-fixed-pos-after-movement.html 2013-05-06 21:16:42 UTC (rev 149640)
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <style>
+ #abs {
+ position: absolute;
+ }
+ #fixed {
+ position: fixed;
+ background: blue;
+ width: 80%;
+ }
+ #inner {
+ background: lime;
+ }
+ </style>
+ <script src=""
+</head>
+
+<body id="body" style="width:800px;">
+ <p>webkit.org/b/115379: Ensure children of fixed pos objects get a layout when the fixed pos
+ object detects that it has to move with an absolute positioned ancestor.</p>
+ <div id="abs">
+ <div id="fixed">
+ fixed div
+ <div id="inner" data-expected-width=800>inner div</div>
+ </div>
+ </div>
+ <script>
+ document.getElementById('inner').offsetLeft;
+ document.getElementById('fixed').style.width='100%';
+ checkLayout('#fixed');
+ </script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (149639 => 149640)
--- trunk/Source/WebCore/ChangeLog 2013-05-06 21:07:35 UTC (rev 149639)
+++ trunk/Source/WebCore/ChangeLog 2013-05-06 21:16:42 UTC (rev 149640)
@@ -1,3 +1,20 @@
+2013-05-06 Robert Hogan <[email protected]>
+
+ REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
+ https://bugs.webkit.org/show_bug.cgi?id=115379
+
+ Reviewed by David Hyatt.
+
+ When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
+ whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
+ object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
+ for our check instead of updating it.
+
+ Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
+
2013-05-06 Mike Lattanzio <[email protected]>
[BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (149639 => 149640)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-05-06 21:07:35 UTC (rev 149639)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-05-06 21:16:42 UTC (rev 149640)
@@ -2748,9 +2748,10 @@
RenderBox* box = toRenderBox(child);
if (hasStaticInlinePosition) {
- LayoutUnit oldLeft = box->logicalLeft();
- box->updateLogicalWidth();
- if (box->logicalLeft() != oldLeft)
+ LogicalExtentComputedValues computedValues;
+ box->computeLogicalWidthInRegion(computedValues);
+ LayoutUnit newLeft = computedValues.m_position;
+ if (newLeft != box->logicalLeft())
child->setChildNeedsLayout(true, MarkOnlyThis);
} else if (hasStaticBlockPosition) {
LayoutUnit oldTop = box->logicalTop();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes