Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: Source/core/layout/LayoutBox.cpp

Issue 1184563002: Fix broken preferred widths optimization involving subtree layout roots (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove the code! Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/layout/nested-subtree-layout-preferred-widths-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 computedValues.m_extent = logicalWidth(); 1939 computedValues.m_extent = logicalWidth();
1940 computedValues.m_position = logicalLeft(); 1940 computedValues.m_position = logicalLeft();
1941 computedValues.m_margins.m_start = marginStart(); 1941 computedValues.m_margins.m_start = marginStart();
1942 computedValues.m_margins.m_end = marginEnd(); 1942 computedValues.m_margins.m_end = marginEnd();
1943 1943
1944 if (isOutOfFlowPositioned()) { 1944 if (isOutOfFlowPositioned()) {
1945 computePositionedLogicalWidth(computedValues); 1945 computePositionedLogicalWidth(computedValues);
1946 return; 1946 return;
1947 } 1947 }
1948 1948
1949 // If layout is limited to a subtree, the subtree root's logical width does not change.
1950 if (node() && view()->frameView() && view()->frameView()->isLayoutRoot(*this ))
1951 return;
1952
1953 // The parent box is flexing us, so it has increased or decreased our 1949 // The parent box is flexing us, so it has increased or decreased our
1954 // width. Use the width from the style context. 1950 // width. Use the width from the style context.
1955 // FIXME: Account for writing-mode in flexible boxes. 1951 // FIXME: Account for writing-mode in flexible boxes.
1956 // https://bugs.webkit.org/show_bug.cgi?id=46418 1952 // https://bugs.webkit.org/show_bug.cgi?id=46418
1957 if (hasOverrideLogicalContentWidth() && parent()->isFlexibleBoxIncludingDepr ecated()) { 1953 if (hasOverrideLogicalContentWidth() && parent()->isFlexibleBoxIncludingDepr ecated()) {
1958 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth(); 1954 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth();
1959 return; 1955 return;
1960 } 1956 }
1961 1957
1962 // FIXME: Account for writing-mode in flexible boxes. 1958 // FIXME: Account for writing-mode in flexible boxes.
(...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after
4790 bool LayoutBox::canRenderBorderImage() const 4786 bool LayoutBox::canRenderBorderImage() const
4791 { 4787 {
4792 if (!style()->hasBorderDecoration()) 4788 if (!style()->hasBorderDecoration())
4793 return false; 4789 return false;
4794 4790
4795 StyleImage* borderImage = style()->borderImage().image(); 4791 StyleImage* borderImage = style()->borderImage().image();
4796 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded(); 4792 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded();
4797 } 4793 }
4798 4794
4799 } // namespace blink 4795 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/layout/nested-subtree-layout-preferred-widths-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698