Changeset 207372 in webkit
- Timestamp:
- Oct 15, 2016 1:27:19 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207355 r207372 1 2016-10-14 Antti Koivisto <antti@apple.com> 2 3 100% CPU on homedepot.com page 4 https://bugs.webkit.org/show_bug.cgi?id=163452 5 <rdar://problem/28730708> 6 7 Reviewed by Simon Fraser. 8 9 * fast/animation/animation-style-update-size-expected.txt: Added. 10 * fast/animation/animation-style-update-size.html: Added. 11 1 12 2016-10-14 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r207368 r207372 1 2016-10-14 Antti Koivisto <antti@apple.com> 2 3 100% CPU on homedepot.com page 4 https://bugs.webkit.org/show_bug.cgi?id=163452 5 <rdar://problem/28730708> 6 7 Reviewed by Simon Fraser. 8 9 The site has a keyframe animation on body. Currently this causes the animation to invalidate the 10 style of the entire document. 11 12 Animations use SyntheticStyleChange to invalidate elements when animation progresses and currently 13 that causes full subtree invalidation. However animation only ever affect individual elements and 14 the normal style resolution mechanism should be able to deal with things like inheritance as needed. 15 16 Test: fast/animation/animation-style-update-size.html 17 18 * dom/Document.cpp: 19 (WebCore::Document::recalcStyle): 20 * dom/Document.h: 21 (WebCore::Document::lastStyleUpdateSizeForTesting): 22 23 Testing support. 24 25 * style/StyleTreeResolver.cpp: 26 (WebCore::Style::TreeResolver::resolveElement): 27 28 Don't force subtree style resolution for SyntheticStyleChange. 29 30 * style/StyleUpdate.h: 31 (WebCore::Style::Update::size): 32 * testing/Internals.cpp: 33 (WebCore::Internals::lastStyleUpdateSize): 34 * testing/Internals.h: 35 * testing/Internals.idl: 36 1 37 2016-10-14 Chris Dumez <cdumez@apple.com> 2 38 -
trunk/Source/WebCore/dom/Document.cpp
r207234 r207372 1852 1852 auto styleUpdate = resolver.resolve(change); 1853 1853 1854 m_lastStyleUpdateSizeForTesting = styleUpdate ? styleUpdate->size() : 0; 1855 1854 1856 clearNeedsStyleRecalc(); 1855 1857 clearChildNeedsStyleRecalc(); -
trunk/Source/WebCore/dom/Document.h
r207155 r207372 536 536 WEBCORE_EXPORT void updateStyleIfNeeded(); 537 537 bool needsStyleRecalc() const; 538 unsigned lastStyleUpdateSizeForTesting() const { return m_lastStyleUpdateSizeForTesting; } 538 539 539 540 WEBCORE_EXPORT void updateLayout(); … … 1489 1490 bool m_closeAfterStyleRecalc; 1490 1491 bool m_inRenderTreeUpdate { false }; 1492 unsigned m_lastStyleUpdateSizeForTesting { 0 }; 1491 1493 1492 1494 bool m_gotoAnchorNeededAfterStylesheetsLoad; -
trunk/Source/WebCore/style/StyleTreeResolver.cpp
r206951 r207372 234 234 } 235 235 236 if (update.change != Detach && (parent().change == Force || element.styleChangeType() >= FullStyleChange))236 if (update.change != Detach && (parent().change == Force || element.styleChangeType() == FullStyleChange)) 237 237 update.change = Force; 238 238 -
trunk/Source/WebCore/style/StyleUpdate.h
r200098 r207372 69 69 const Document& document() const { return m_document; } 70 70 71 unsigned size() const { return m_elements.size() + m_texts.size(); } 72 71 73 void addElement(Element&, Element* parent, ElementUpdate&&); 72 74 void addText(Text&, Element* parent); -
trunk/Source/WebCore/testing/Internals.cpp
r207173 r207372 2386 2386 } 2387 2387 2388 unsigned Internals::lastStyleUpdateSize() const 2389 { 2390 Document* document = contextDocument(); 2391 if (!document) 2392 return 0; 2393 return document->lastStyleUpdateSizeForTesting(); 2394 } 2395 2388 2396 void Internals::startTrackingCompositingUpdates(ExceptionCode& ec) 2389 2397 { -
trunk/Source/WebCore/testing/Internals.h
r207173 r207372 330 330 void startTrackingStyleRecalcs(ExceptionCode&); 331 331 unsigned styleRecalcCount(ExceptionCode&); 332 unsigned lastStyleUpdateSize() const; 332 333 333 334 void startTrackingCompositingUpdates(ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r207173 r207372 328 328 [MayThrowLegacyException] void startTrackingStyleRecalcs(); 329 329 [MayThrowLegacyException] unsigned long styleRecalcCount(); 330 readonly attribute unsigned long lastStyleUpdateSize; 330 331 331 332 [MayThrowLegacyException] void startTrackingCompositingUpdates();
Note: See TracChangeset
for help on using the changeset viewer.