WebKit Bugzilla
Attachment 343225 Details for
Bug 186881
: Move clearChildNeedsStyleRecalc into resetStyleForNonRenderedDescendants.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186881-20180621104553.patch (text/plain), 3.54 KB, created by
Emilio Cobos Álvarez (:emilio)
on 2018-06-21 01:45:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Emilio Cobos Álvarez (:emilio)
Created:
2018-06-21 01:45:55 PDT
Size:
3.54 KB
patch
obsolete
>Subversion Revision: 233029 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6b71bfb2a8b40c967830b01885d1f2a5a7b51ad8..ccd3b6b2ff2b5427389a425fb0ff50b8f7bf6916 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,8 +1,23 @@ >+2018-06-21 Emilio Cobos Ãlvarez <emilio@crisal.io> >+ >+ Move clearChildNeedsStyleRecalc into resetStyleForNonRenderedDescendants. >+ https://bugs.webkit.org/show_bug.cgi?id=186881 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Every caller does this already. >+ >+ No new tests, no change in behavior. >+ >+ * style/StyleTreeResolver.cpp: >+ (WebCore::Style::resetStyleForNonRenderedDescendants): >+ (WebCore::Style::TreeResolver::resolveComposedTree): >+ > 2018-06-20 David Kilzer <ddkilzer@apple.com> > > Fix leaks in WebCore found by clang static analyzer in deep mode > <https://webkit.org/b/186865> > > Reviewed by Joseph Pecoraro. > > * platform/mac/WebCoreNSURLExtras.mm: >diff --git a/Source/WebCore/style/StyleTreeResolver.cpp b/Source/WebCore/style/StyleTreeResolver.cpp >index e54ce5210e1c335c92543046690aca10c2ef1f77..7083dd226daa0c2a386c30a9cfb0532d8bf4b67b 100644 >--- a/Source/WebCore/style/StyleTreeResolver.cpp >+++ b/Source/WebCore/style/StyleTreeResolver.cpp >@@ -140,21 +140,20 @@ static void resetStyleForNonRenderedDescendants(Element& current) > { > for (auto& child : childrenOfType<Element>(current)) { > if (child.needsStyleRecalc()) { > child.resetComputedStyle(); > child.resetStyleRelations(); > child.setHasValidStyle(); > } > >- if (child.childNeedsStyleRecalc()) { >+ if (child.childNeedsStyleRecalc()) > resetStyleForNonRenderedDescendants(child); >- child.clearChildNeedsStyleRecalc(); >- } > } >+ current.clearChildNeedsStyleRecalc(); > } > > static bool affectsRenderedSubtree(Element& element, const RenderStyle& newStyle) > { > if (element.renderer()) > return true; > if (newStyle.display() != DisplayType::None) > return true; >@@ -478,17 +477,16 @@ void TreeResolver::resolveComposedTree() > it.traverseNextSkippingChildren(); > continue; > } > > auto& element = downcast<Element>(node); > > if (it.depth() > Settings::defaultMaximumRenderTreeDepth) { > resetStyleForNonRenderedDescendants(element); >- element.clearChildNeedsStyleRecalc(); > it.traverseNextSkippingChildren(); > continue; > } > > auto* style = renderOrDisplayContentsStyle(element); > auto change = NoChange; > auto descendantsToResolve = DescendantsToResolve::None; > >@@ -511,20 +509,18 @@ void TreeResolver::resolveComposedTree() > descendantsToResolve = elementUpdates.descendantsToResolve; > > if (elementUpdates.update.style) > m_update->addElement(element, parent.element, WTFMove(elementUpdates)); > > clearNeedsStyleResolution(element); > } > >- if (!style) { >+ if (!style) > resetStyleForNonRenderedDescendants(element); >- element.clearChildNeedsStyleRecalc(); >- } > > bool shouldIterateChildren = style && (element.childNeedsStyleRecalc() || descendantsToResolve != DescendantsToResolve::None); > > if (!m_didSeePendingStylesheet) > m_didSeePendingStylesheet = hasLoadingStylesheet(m_document.styleScope(), element, !shouldIterateChildren); > > if (!shouldIterateChildren) { > it.traverseNextSkippingChildren();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koivisto
:
review+
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186881
: 343225