Changeset 142488 in webkit
- Timestamp:
- Feb 11, 2013 10:15:24 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142486 r142488 1 2013-02-11 Andrey Kosyakov <caseq@chromium.org> 2 3 Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton 4 https://bugs.webkit.org/show_bug.cgi?id=109294 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/timeline/timeline-layout-reason-expected.txt: Added. 9 * inspector/timeline/timeline-layout-reason.html: Added. 10 * inspector/timeline/timeline-test.js: 11 (initialize_Timeline.step2): 12 (initialize_Timeline.InspectorTest.evaluateWithTimeline): Extracted "performActions" step from performActionsAndPrint() 13 (initialize_Timeline.): 14 (initialize_Timeline.InspectorTest.performActionsAndPrint): 15 (initialize_Timeline.InspectorTest.findPresentationRecord.findByType): 16 (initialize_Timeline.InspectorTest.findPresentationRecord): 17 1 18 2013-02-01 Andrey Kosyakov <caseq@chromium.org> 2 19 -
trunk/LayoutTests/inspector/timeline/timeline-test.js
r129336 r142488 70 70 }; 71 71 72 InspectorTest. performActionsAndPrint = function(actions, typeName, includeTimeStamps)72 InspectorTest.evaluateWithTimeline = function(actions, doneCallback) 73 73 { 74 74 InspectorTest.startTimeline(step1); … … 80 80 function step2() 81 81 { 82 InspectorTest.stopTimeline(step3); 83 } 84 85 function step3() 82 InspectorTest.stopTimeline(doneCallback); 83 } 84 85 } 86 87 InspectorTest.performActionsAndPrint = function(actions, typeName, includeTimeStamps) 88 { 89 function callback() 86 90 { 87 91 InspectorTest.printTimelineRecords(typeName); … … 92 96 InspectorTest.completeTest(); 93 97 } 98 InspectorTest.evaluateWithTimeline(actions, callback) 94 99 }; 95 100 … … 157 162 }; 158 163 164 InspectorTest.findPresentationRecord = function(type) 165 { 166 var result; 167 function findByType(record) 168 { 169 if (record.type !== type) 170 return false; 171 result = record; 172 return true; 173 } 174 var records = WebInspector.panel("timeline")._rootRecord().children; 175 WebInspector.TimelinePresentationModel.forAllRecords(records, findByType); 176 return result; 177 } 178 159 179 InspectorTest.FakeFileReader = function(input, delegate, callback) 160 180 { -
trunk/Source/WebCore/ChangeLog
r142486 r142488 1 2013-02-11 Andrey Kosyakov <caseq@chromium.org> 2 3 Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton 4 https://bugs.webkit.org/show_bug.cgi?id=109294 5 6 Reviewed by Pavel Feldman. 7 8 Use the stack that caused style recalculation as a cause for relayout performed due to 9 layout invalidation caused by style recalculation. 10 11 * inspector/front-end/TimelinePresentationModel.js: 12 (WebInspector.TimelinePresentationModel.prototype.reset): 13 (WebInspector.TimelinePresentationModel.Record): 14 1 15 2013-02-01 Andrey Kosyakov <caseq@chromium.org> 2 16 -
trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js
r140123 r142488 266 266 this._frames = []; 267 267 this._minimumRecordTime = -1; 268 this._la stInvalidateLayout= {};268 this._layoutInvalidateStack = {}; 269 269 this._lastScheduleStyleRecalculation = {}; 270 270 }, … … 637 637 638 638 case recordTypes.InvalidateLayout: 639 presentationModel._lastInvalidateLayout[this.frameId] = this; 639 // Consider style recalculation as a reason for layout invalidation, 640 // but only if we had no earlier layout invalidation records. 641 var styleRecalcStack; 642 if (!presentationModel._layoutInvalidateStack[this.frameId]) { 643 for (var outerRecord = parentRecord; outerRecord; outerRecord = record.parent) { 644 if (outerRecord.type === recordTypes.RecalculateStyles) { 645 styleRecalcStack = outerRecord.callSiteStackTrace; 646 break; 647 } 648 } 649 } 650 presentationModel._layoutInvalidateStack[this.frameId] = styleRecalcStack || this.stackTrace; 640 651 break; 641 652 642 653 case recordTypes.Layout: 643 var invalidateLayoutRecord = presentationModel._lastInvalidateLayout[this.frameId];644 if ( invalidateLayoutRecord)645 this.callSiteStackTrace = invalidateLayoutRecord.stackTrace || invalidateLayoutRecord.callSiteStackTrace;654 var layoutInvalidateStack = presentationModel._layoutInvalidateStack[this.frameId]; 655 if (layoutInvalidateStack) 656 this.callSiteStackTrace = layoutInvalidateStack; 646 657 if (this.stackTrace) 647 658 this.setHasWarning(); 648 presentationModel._la stInvalidateLayout[this.frameId] = null;659 presentationModel._layoutInvalidateStack[this.frameId] = null; 649 660 break; 650 661 }
Note: See TracChangeset
for help on using the changeset viewer.