|
|
Created:
4 years, 6 months ago by fs Modified:
4 years, 6 months ago CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1 Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionReland of "Remove redundant "layout size changed" state from LayoutSVGRoot"
In LayoutSVGRoot::layout, two slightly different "layout size changed"
values are computed - one which is used for propagation to children
via SVGLayoutSupport::layoutSizeOfNearestViewportChanged
(|m_isLayoutSizeChanged|), and one which is used to mark direct
descendant children (local |layoutSizeChanged|).
Ultimately their use is the same though, so only using the more narrow
predicate for both of these cases should yield the same result.
It also has the side-effect of making it more obvious that changes to
layout-size is only of interest when there exist clients of the SVG
root that have relative lengths.
BUG=603956
Committed: https://crrev.com/2fd756f78f5d05f69bd298515bb7eff07f500b6a
Cr-Commit-Position: refs/heads/master@{#400987}
Patch Set 1 #
Total comments: 2
Messages
Total messages: 28 (12 generated)
Description was changed from ========== Remove redundant "layout size changed" signalling from LayoutSVGRoot In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 ========== to ========== Remove redundant "layout size changed" state from LayoutSVGRoot In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 ==========
fs@opera.com changed reviewers: + pdr@chromium.org
schenney@chromium.org changed reviewers: + schenney@chromium.org
lgtm https://codereview.chromium.org/2065093002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp (right): https://codereview.chromium.org/2065093002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp:158: m_isLayoutSizeChanged = svg->hasRelativeLengths() && (selfNeedsLayout() || oldSize != size()); I built a truth table to verify, as this is messy logic. The only change I see is that now m_isLayoutSizeChanged matches the old values for layoutSizeChanged, while previously it was also true for (selfNeedsLayout && !hasRelativeLengths). I agree that there's no point in doing anything if !hasRelativeLengths, so all of this is a long way of saying I agree with you.
https://codereview.chromium.org/2065093002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp (right): https://codereview.chromium.org/2065093002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp:158: m_isLayoutSizeChanged = svg->hasRelativeLengths() && (selfNeedsLayout() || oldSize != size()); On 2016/06/14 at 20:34:58, Stephen Chennney wrote: > I built a truth table to verify, as this is messy logic. The only change I see is that now m_isLayoutSizeChanged matches the old values for layoutSizeChanged, while previously it was also true for (selfNeedsLayout && !hasRelativeLengths). > > I agree that there's no point in doing anything if !hasRelativeLengths, so all of this is a long way of saying I agree with you. I guess another tidbit of information that might worth mentioning is that the "non-local" flag is not read if !hasRelativeLengths - because of how that relation propagates to ancestors. (The same "guard" is also used in the other place that sets a flag with the same purpose.)
The CQ bit was checked by fs@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065093002/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
CQ bit was unchecked
Message was sent while issue was closed.
Description was changed from ========== Remove redundant "layout size changed" state from LayoutSVGRoot In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 ========== to ========== Remove redundant "layout size changed" state from LayoutSVGRoot In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 Committed: https://crrev.com/30770a70834c73670884f0de91bb7624df0ba003 Cr-Commit-Position: refs/heads/master@{#399791} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/30770a70834c73670884f0de91bb7624df0ba003 Cr-Commit-Position: refs/heads/master@{#399791}
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2071953004/ by fs@opera.com. The reason for reverting is: Possible cause of crbug.com/620228.
Description was changed from ========== Remove redundant "layout size changed" state from LayoutSVGRoot In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 Committed: https://crrev.com/30770a70834c73670884f0de91bb7624df0ba003 Cr-Commit-Position: refs/heads/master@{#399791} ========== to ========== Reland of "Remove redundant "layout size changed" state from LayoutSVGRoot" In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 ==========
On 2016/06/17 at 07:34:22, fs wrote: > A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2071953004/ by fs@opera.com. > > The reason for reverting is: Possible cause of crbug.com/620228. Not the culprit. Relanding.
The CQ bit was checked by fs@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065093002/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by fs@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065093002/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by fs@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065093002/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Reland of "Remove redundant "layout size changed" state from LayoutSVGRoot" In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 ========== to ========== Reland of "Remove redundant "layout size changed" state from LayoutSVGRoot" In LayoutSVGRoot::layout, two slightly different "layout size changed" values are computed - one which is used for propagation to children via SVGLayoutSupport::layoutSizeOfNearestViewportChanged (|m_isLayoutSizeChanged|), and one which is used to mark direct descendant children (local |layoutSizeChanged|). Ultimately their use is the same though, so only using the more narrow predicate for both of these cases should yield the same result. It also has the side-effect of making it more obvious that changes to layout-size is only of interest when there exist clients of the SVG root that have relative lengths. BUG=603956 Committed: https://crrev.com/2fd756f78f5d05f69bd298515bb7eff07f500b6a Cr-Commit-Position: refs/heads/master@{#400987} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/2fd756f78f5d05f69bd298515bb7eff07f500b6a Cr-Commit-Position: refs/heads/master@{#400987} |