Changeset 206230 in webkit
- Timestamp:
- Sep 21, 2016, 12:59:47 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206227 r206230 1 2016-09-21 Antti Koivisto <antti@apple.com> 2 3 Document::styleResolverChanged simplification 4 https://bugs.webkit.org/show_bug.cgi?id=162347 5 6 Reviewed by Anders Carlsson. 7 8 * dom/Document.cpp: 9 (WebCore::Document::implicitClose): 10 (WebCore::Document::setParsing): 11 (WebCore::Document::write): 12 (WebCore::Document::styleResolverChanged): 13 14 - Remove unncessary AnimationUpdateBlock, it is created by recalcStyle. 15 - Remove explicit setNeedsLayoutAndPrefWidthsRecalc/scheduleRelayout calls, style resolution 16 invalidates those as needed. 17 - Remove evaluateMediaQueryList call, that is done on layout as needed. 18 - Remove the ancient INSTRUMENT_LAYOUT_SCHEDULING and the related printfs. 19 1 20 2016-09-21 Keith Miller <keith_miller@apple.com> 2 21 -
trunk/Source/WebCore/dom/Document.cpp
r206196 r206230 275 275 using namespace HTMLNames; 276 276 277 // #define INSTRUMENT_LAYOUT_SCHEDULING 1278 279 277 static const unsigned cMaxWriteRecursionDepth = 21; 280 278 … … 2752 2750 if (f) 2753 2751 f->loader().dispatchOnloadEvents(); 2754 #ifdef INSTRUMENT_LAYOUT_SCHEDULING2755 if (!ownerElement())2756 printf("onload fired at %lld\n", elapsedTime().count());2757 #endif2758 2752 2759 2753 // An event handler may have removed the frame … … 2825 2819 if (!m_bParsing && view() && !view()->needsLayout()) 2826 2820 view()->fireLayoutRelatedMilestonesIfNeeded(); 2827 2828 #ifdef INSTRUMENT_LAYOUT_SCHEDULING2829 if (!ownerElement() && !m_bParsing)2830 printf("Parsing finished at %lld\n", elapsedTime().count());2831 #endif2832 2821 } 2833 2822 … … 2878 2867 return; 2879 2868 2880 #ifdef INSTRUMENT_LAYOUT_SCHEDULING2881 if (!ownerElement())2882 printf("Beginning a document.write at %lld\n", elapsedTime().count());2883 #endif2884 2885 2869 bool hasInsertionPoint = m_parser && m_parser->hasInsertionPoint(); 2886 2870 if (!hasInsertionPoint && (m_ignoreOpensDuringUnloadCount || m_ignoreDestructiveWriteCount)) … … 2892 2876 ASSERT(m_parser); 2893 2877 m_parser->insert(text); 2894 2895 #ifdef INSTRUMENT_LAYOUT_SCHEDULING2896 if (!ownerElement())2897 printf("Ending a document.write at %lld\n", elapsedTime().count());2898 #endif2899 2878 } 2900 2879 … … 3659 3638 m_didCalculateStyleResolver = true; 3660 3639 3661 #ifdef INSTRUMENT_LAYOUT_SCHEDULING3662 if (!ownerElement())3663 printf("Beginning update of style selector at time %lld.\n", elapsedTime().count());3664 #endif3665 3666 3640 auto styleSheetUpdate = (updateFlag == RecalcStyleIfNeeded || updateFlag == DeferRecalcStyleIfNeeded) 3667 3641 ? AuthorStyleSheets::OptimizedUpdate … … 3680 3654 } 3681 3655 3682 if (!stylesheetChangeRequiresStyleRecalc) 3683 return; 3684 3685 // This recalcStyle initiates a new recalc cycle. We need to bracket it to 3686 // make sure animations get the correct update time 3687 { 3688 AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : nullptr); 3656 if (stylesheetChangeRequiresStyleRecalc) 3689 3657 recalcStyle(Style::Force); 3690 }3691 3692 #ifdef INSTRUMENT_LAYOUT_SCHEDULING3693 if (!ownerElement())3694 printf("Finished update of style selector at time %lld\n", elapsedTime().count());3695 #endif3696 3697 if (renderView()) {3698 renderView()->setNeedsLayoutAndPrefWidthsRecalc();3699 if (view())3700 view()->scheduleRelayout();3701 }3702 3703 evaluateMediaQueryList();3704 3658 } 3705 3659
Note:
See TracChangeset
for help on using the changeset viewer.