Commit a801ef1d authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by John Sullivan.

        - fix https://bugs.webkit.org/show_bug.cgi?id=18909
          <rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com

        Test: fast/dynamic/positioned-movement-with-positioned-children.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutOnlyPositionedObjects): Cover the case of
        a positioned object that has only moved and has only positioned children
        that have changed.
        * rendering/RenderObject.h:
        (WebCore::RenderObject::needsPositionedMovementLayout): Added this
        accessor.

LayoutTests:

        Reviewed by John Sullivan.

        - test for https://bugs.webkit.org/show_bug.cgi?id=18909
          <rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com

        * fast/dynamic/positioned-movement-with-positioned-children.html: Added.
        * platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.checksum: Added.
        * platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.png: Added.
        * platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4a39d546
2008-05-07 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
- test for https://bugs.webkit.org/show_bug.cgi?id=18909
<rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com
* fast/dynamic/positioned-movement-with-positioned-children.html: Added.
* platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.checksum: Added.
* platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.png: Added.
* platform/mac/fast/dynamic/positioned-movement-with-positioned-children-expected.txt: Added.
2008-05-07 Justin Garcia <justin.garcia@apple.com>
Reviewed by John Sullivan.
<body>
<div style="background-color: red; width: 100px; height: 100px;">You should not see this. Resize the window.</div>
<div id="target" style="position: absolute; left: 8; top: 108px;">
<div style="position: absolute; left: 0; top: 0;">
<div style="visibility: visible; width: 100px; height: 100px; background-color: green;"></div>
<button>Button</button>
</div>
</div>
<script>
function test()
{
document.body.offsetTop;
var t = document.getElementById("target");
t.style.visibility = "hidden";
t.style.top = "8";
}
test();
</script>
</body>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 98x54
text run at (0,0) width 98: "You should not"
text run at (0,18) width 96: "see this. Resize"
text run at (0,36) width 79: "the window."
layer at (8,8) size 100x122
RenderBlock (positioned) {DIV} at (0,0) size 100x122
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
RenderBlock (anonymous) at (0,100) size 100x22
RenderButton {BUTTON} at (2,2) size 51x18 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0) none (2px outset #C0C0C0)]
RenderBlock (anonymous) at (8,2) size 35x13
RenderText {#text} at (0,0) size 35x13
text run at (0,0) width 35: "Button"
RenderText {#text} at (0,0) size 0x0
2008-05-07 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
- fix https://bugs.webkit.org/show_bug.cgi?id=18909
<rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com
Test: fast/dynamic/positioned-movement-with-positioned-children.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutOnlyPositionedObjects): Cover the case of
a positioned object that has only moved and has only positioned children
that have changed.
* rendering/RenderObject.h:
(WebCore::RenderObject::needsPositionedMovementLayout): Added this
accessor.
2008-05-07 Anders Carlsson <andersca@apple.com>
Reviewed by John.
......@@ -1330,6 +1330,11 @@ bool RenderBlock::layoutOnlyPositionedObjects()
else
view()->disableLayoutState();
if (needsPositionedMovementLayout()) {
calcWidth();
calcHeight();
}
// All we have to is lay out our positioned objects.
layoutPositionedObjects(false);
......
......@@ -344,6 +344,7 @@ public:
bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsPositionedMovementLayout; }
bool selfNeedsLayout() const { return m_needsLayout; }
bool needsPositionedMovementLayout() const { return m_needsPositionedMovementLayout; }
bool needsPositionedMovementLayoutOnly() const { return m_needsPositionedMovementLayout && !m_needsLayout && !m_normalChildNeedsLayout && !m_posChildNeedsLayout; }
bool posChildNeedsLayout() const { return m_posChildNeedsLayout; }
bool normalChildNeedsLayout() const { return m_normalChildNeedsLayout; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment