Changeset 197059 in webkit
- Timestamp:
- Feb 24, 2016, 5:28:51 PM (11 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/VisualStyleDetailsPanel.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r197046 r197059 1 2016-02-24 Devin Rousso <dcrousso+webkit@gmail.com> 2 3 Web Inspector: Visual Styles sidebar should support multiple animations 4 https://bugs.webkit.org/show_bug.cgi?id=154546 5 <rdar://problem/24773861> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/VisualStyleDetailsPanel.js: 10 (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection): 11 Set additional flags on the optional properties of transition to ensure 12 that the initial value of a new row is not considered invalid. 13 14 (WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection): 15 Added a comma-separated keyword list to provide support for multiple 16 animations per rule. 17 1 18 2016-02-24 Timothy Hatcher <timothy@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js
r196869 r197059 1265 1265 1266 1266 let transitionProperty = new WebInspector.VisualStylePropertyNameInput("transition-property", WebInspector.UIString("Property")); 1267 transitionProperty.masterProperty = true; 1267 1268 let transitionTiming = new WebInspector.VisualStyleTimingEditor("transition-timing-function", WebInspector.UIString("Timing"), ["Linear", "Ease", "Ease In", "Ease Out", "Ease In Out"]); 1269 transitionTiming.optionalProperty = true; 1268 1270 1269 1271 transitionPropertyRow.element.appendChild(transitionProperty.element); … … 1274 1276 let transitionTimeKeywords = ["s", "ms"]; 1275 1277 let transitionDuration = new WebInspector.VisualStyleNumberInputBox("transition-duration", WebInspector.UIString("Duration"), null, transitionTimeKeywords); 1278 transitionDuration.optionalProperty = true; 1276 1279 let transitionDelay = new WebInspector.VisualStyleNumberInputBox("transition-delay", WebInspector.UIString("Delay"), null, transitionTimeKeywords); 1277 1280 transitionDelay.optionalProperty = true; … … 1280 1283 transitionDurationRow.element.appendChild(transitionDelay.element); 1281 1284 1282 let transitionProperties = [transitionProperty, transition Timing, transitionDuration, transitionDelay];1285 let transitionProperties = [transitionProperty, transitionDuration, transitionTiming, transitionDelay]; 1283 1286 let transitionPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("transition", transitionProperties); 1284 1287 … … 1304 1307 let properties = group.properties; 1305 1308 1309 let animationRow = new WebInspector.DetailsSectionRow; 1310 1311 properties.animation = new WebInspector.VisualStyleCommaSeparatedKeywordEditor("animation", null, { 1312 "animation-name": "none", 1313 "animation-timing-function": "ease", 1314 "animation-iteration-count": "1", 1315 "animation-duration": "0", 1316 "animation-delay": "0", 1317 "animation-direction": "normal", 1318 "animation-fill-mode": "none", 1319 "animation-play-state": "running" 1320 }); 1321 1322 animationRow.element.appendChild(properties.animation.element); 1323 1306 1324 let animationNameRow = new WebInspector.DetailsSectionRow; 1307 1325 1308 properties.animationName = new WebInspector.VisualStyleBasicInput("animation-name", WebInspector.UIString("Name"), WebInspector.UIString("Enter the name of a Keyframe")); 1309 1310 animationNameRow.element.appendChild(properties.animationName.element); 1326 let animationName = new WebInspector.VisualStyleBasicInput("animation-name", WebInspector.UIString("Name"), WebInspector.UIString("Enter the name of a Keyframe")); 1327 animationName.masterProperty = true; 1328 1329 animationNameRow.element.appendChild(animationName.element); 1311 1330 1312 1331 let animationTimingRow = new WebInspector.DetailsSectionRow; 1313 1332 1314 properties.animationTiming = new WebInspector.VisualStyleTimingEditor("animation-timing-function", WebInspector.UIString("Timing"), ["Linear", "Ease", "Ease In", "Ease Out", "Ease In Out"]); 1315 properties.animationIterationCount = new WebInspector.VisualStyleNumberInputBox("animation-iteration-count", WebInspector.UIString("Iterations"), this._keywords.defaults.concat(["Infinite"]), null); 1316 1317 animationTimingRow.element.appendChild(properties.animationTiming.element); 1318 animationTimingRow.element.appendChild(properties.animationIterationCount.element); 1333 let animationTiming = new WebInspector.VisualStyleTimingEditor("animation-timing-function", WebInspector.UIString("Timing"), ["Linear", "Ease", "Ease In", "Ease Out", "Ease In Out"]); 1334 animationTiming.optionalProperty = true; 1335 let animationIterationCount = new WebInspector.VisualStyleNumberInputBox("animation-iteration-count", WebInspector.UIString("Iterations"), this._keywords.defaults.concat(["Infinite"]), null); 1336 animationIterationCount.optionalProperty = true; 1337 1338 animationTimingRow.element.appendChild(animationTiming.element); 1339 animationTimingRow.element.appendChild(animationIterationCount.element); 1319 1340 1320 1341 let animationDurationRow = new WebInspector.DetailsSectionRow; 1321 1342 1322 1343 let animationTimeKeywords = ["s", "ms"]; 1323 properties.animationDuration = new WebInspector.VisualStyleNumberInputBox("animation-duration", WebInspector.UIString("Duration"), null, animationTimeKeywords); 1324 properties.animationDelay = new WebInspector.VisualStyleNumberInputBox("animation-delay", WebInspector.UIString("Delay"), null, animationTimeKeywords); 1325 1326 animationDurationRow.element.appendChild(properties.animationDuration.element); 1327 animationDurationRow.element.appendChild(properties.animationDelay.element); 1344 let animationDuration = new WebInspector.VisualStyleNumberInputBox("animation-duration", WebInspector.UIString("Duration"), null, animationTimeKeywords); 1345 animationDuration.optionalProperty = true; 1346 let animationDelay = new WebInspector.VisualStyleNumberInputBox("animation-delay", WebInspector.UIString("Delay"), null, animationTimeKeywords); 1347 animationDelay.optionalProperty = true; 1348 1349 animationDurationRow.element.appendChild(animationDuration.element); 1350 animationDurationRow.element.appendChild(animationDelay.element); 1328 1351 1329 1352 let animationDirectionRow = new WebInspector.DetailsSectionRow; 1330 1353 1331 properties.animationDirection = new WebInspector.VisualStyleKeywordPicker("animation-direction", WebInspector.UIString("Direction"), {1354 let animationDirection = new WebInspector.VisualStyleKeywordPicker("animation-direction", WebInspector.UIString("Direction"), { 1332 1355 basic: this._keywords.normal.concat(["Reverse"]), 1333 1356 advanced: ["Alternate", "Alternate Reverse"] 1334 1357 }); 1335 properties.animationFillMode = new WebInspector.VisualStyleKeywordPicker("animation-fill-mode", WebInspector.UIString("Fill Mode"), this._keywords.defaults.concat(["None", "Forwards", "Backwards", "Both"])); 1336 1337 animationDirectionRow.element.appendChild(properties.animationDirection.element); 1338 animationDirectionRow.element.appendChild(properties.animationFillMode.element); 1358 animationDirection.optionalProperty = true; 1359 let animationFillMode = new WebInspector.VisualStyleKeywordPicker("animation-fill-mode", WebInspector.UIString("Fill Mode"), this._keywords.defaults.concat(["None", "Forwards", "Backwards", "Both"])); 1360 animationFillMode.optionalProperty = true; 1361 1362 animationDirectionRow.element.appendChild(animationDirection.element); 1363 animationDirectionRow.element.appendChild(animationFillMode.element); 1339 1364 1340 1365 let animationStateRow = new WebInspector.DetailsSectionRow; 1341 1366 1342 properties.animationPlayState = new WebInspector.VisualStyleKeywordIconList("animation-play-state", WebInspector.UIString("State"), ["Running", "Paused", "Initial"]); 1343 1344 animationStateRow.element.appendChild(properties.animationPlayState.element); 1345 1346 let animationGroup = new WebInspector.DetailsSectionGroup([animationNameRow, animationTimingRow, animationDurationRow, animationDirectionRow, animationStateRow]); 1367 let animationPlayState = new WebInspector.VisualStyleKeywordIconList("animation-play-state", WebInspector.UIString("State"), ["Running", "Paused", "Initial"]); 1368 animationPlayState.optionalProperty = true; 1369 1370 animationStateRow.element.appendChild(animationPlayState.element); 1371 1372 let animationProperties = [animationName, animationDuration, animationTiming, animationDelay, animationIterationCount, animationDirection, animationFillMode, animationPlayState]; 1373 let animationPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("animation", animationProperties); 1374 1375 let noRemainingCommaSeparatedEditorItems = this._noRemainingCommaSeparatedEditorItems.bind(this, animationPropertyCombiner, animationProperties); 1376 properties.animation.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingCommaSeparatedEditorItems, this); 1377 1378 let selectedCommaSeparatedEditorItemValueChanged = this._selectedCommaSeparatedEditorItemValueChanged.bind(this, properties.animation, animationPropertyCombiner); 1379 animationPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedCommaSeparatedEditorItemValueChanged, this); 1380 1381 let commaSeparatedEditorTreeItemSelected = this._commaSeparatedEditorTreeItemSelected.bind(animationPropertyCombiner); 1382 properties.animation.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, commaSeparatedEditorTreeItemSelected, this); 1383 1384 group.specifiedWidthProperties = [properties.animation]; 1385 1386 let animationGroup = new WebInspector.DetailsSectionGroup([animationRow, animationNameRow, animationTimingRow, animationDurationRow, animationDirectionRow, animationStateRow]); 1347 1387 this._populateSection(group, [animationGroup]); 1348 1388 }
Note:
See TracChangeset
for help on using the changeset viewer.