[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405809 ) Change subject: Remove
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405809 ) Change subject: Remove
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove JSCS comments
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405626 ) Change subject: Remove JSCS comments .. Remove JSCS comments Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd --- M src/ce/ve.ce.TextState.js M tests/ve.qunit.js 2 files changed, 0 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index 15d810d..80f85aa 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -101,7 +101,6 @@ continue; } // Else no child nodes; do nothing - // jscs:enable disallowEmptyBlocks // Step out of this node, then keep stepping outwards until there is a next sibling while ( true ) { diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js index 4d58ab7..436c025 100644 --- a/tests/ve.qunit.js +++ b/tests/ve.qunit.js @@ -324,9 +324,7 @@ var oLines = difflib.stringAsLines( unescapeText( o ) ), nLines = difflib.stringAsLines( unescapeText( n ) ), sm = new difflib.SequenceMatcher( oLines, nLines ), - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers (awaiting eslint replacement; T149261) opcodes = sm.get_opcodes(), - // jscs:enable requireCamelCaseOrUpperCaseIdentifiers $div = $( '' ); $div.append( diffview.buildView( { -- To view, visit https://gerrit.wikimedia.org/r/405626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove JSCS comments
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405626 ) Change subject: Remove JSCS comments .. Remove JSCS comments Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd --- M src/ce/ve.ce.TextState.js M tests/ve.qunit.js 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/26/405626/1 diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index 15d810d..80f85aa 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -101,7 +101,6 @@ continue; } // Else no child nodes; do nothing - // jscs:enable disallowEmptyBlocks // Step out of this node, then keep stepping outwards until there is a next sibling while ( true ) { diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js index 4d58ab7..436c025 100644 --- a/tests/ve.qunit.js +++ b/tests/ve.qunit.js @@ -324,9 +324,7 @@ var oLines = difflib.stringAsLines( unescapeText( o ) ), nLines = difflib.stringAsLines( unescapeText( n ) ), sm = new difflib.SequenceMatcher( oLines, nLines ), - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers (awaiting eslint replacement; T149261) opcodes = sm.get_opcodes(), - // jscs:enable requireCamelCaseOrUpperCaseIdentifiers $div = $( '' ); $div.append( diffview.buildView( { -- To view, visit https://gerrit.wikimedia.org/r/405626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove server-only scripts from visualEditor.rebase
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377768 ) Change subject: Remove server-only scripts from visualEditor.rebase .. Remove server-only scripts from visualEditor.rebase visualEditor.rebase is a client module. The server module is rebaser.build, which already contains these scripts. Adds rebaser.build to the test suite, but we should probably remove ES6 code from client tests and test server code separately. Bug: T175828 Change-Id: I8fc55fa1ab437262240d00a30ab09765fc0ca240 --- M build/modules.json M tests/index.html 2 files changed, 15 insertions(+), 7 deletions(-) Approvals: DLynch: Looks good to me, approved jenkins-bot: Verified diff --git a/build/modules.json b/build/modules.json index ee8f3bc..08ca219 100644 --- a/build/modules.json +++ b/build/modules.json @@ -641,9 +641,6 @@ }, "visualEditor.rebase": { "scripts": [ - "src/ve.utils-es6.js", - "src/dm/ve.dm.RebaseDocState.js", - "src/dm/ve.dm.RebaseServer.js", "src/dm/ve.dm.RebaseClient.js", "src/dm/ve.dm.SurfaceSynchronizer.js", "src/ui/widgets/ve.ui.AuthorItemWidget.js", @@ -779,7 +776,8 @@ "jsdifflib", "qunit", "visualEditor.desktop.standalone", - "visualEditor.rebase" + "visualEditor.rebase", + "rebaser.build" ] }, "visualEditor.theme.apex": { diff --git a/tests/index.html b/tests/index.html index a62d4f0..55eede0 100644 --- a/tests/index.html +++ b/tests/index.html @@ -440,14 +440,24 @@ - - - + + + + + + + + + + + + + -- To view, visit https://gerrit.wikimedia.org/r/377768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8fc55fa1ab437262240d00a30ab09765fc0ca240 Gerrit-PatchSet: 3 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: DLynch Gerrit-Reviewer: Divec Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove server-only scripts from visualEditor.rebase
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377768 ) Change subject: Remove server-only scripts from visualEditor.rebase .. Remove server-only scripts from visualEditor.rebase visualEditor.rebase is a client module. The server module is rebaser.build, which already contains these scripts. Bug: T175828 Change-Id: I8fc55fa1ab437262240d00a30ab09765fc0ca240 --- M build/modules.json M tests/index.html 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/68/377768/1 diff --git a/build/modules.json b/build/modules.json index ee8f3bc..9076416 100644 --- a/build/modules.json +++ b/build/modules.json @@ -641,9 +641,6 @@ }, "visualEditor.rebase": { "scripts": [ - "src/ve.utils-es6.js", - "src/dm/ve.dm.RebaseDocState.js", - "src/dm/ve.dm.RebaseServer.js", "src/dm/ve.dm.RebaseClient.js", "src/dm/ve.dm.SurfaceSynchronizer.js", "src/ui/widgets/ve.ui.AuthorItemWidget.js", diff --git a/tests/index.html b/tests/index.html index a62d4f0..fc5f5ae 100644 --- a/tests/index.html +++ b/tests/index.html @@ -440,9 +440,6 @@ - - - -- To view, visit https://gerrit.wikimedia.org/r/377768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fc55fa1ab437262240d00a30ab09765fc0ca240 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove 'return' mapping as it is aliased to 'enter' below
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377506 ) Change subject: Remove 'return' mapping as it is aliased to 'enter' below .. Remove 'return' mapping as it is aliased to 'enter' below Change-Id: I9d7f03f79796e50cfab79257d3edb41922cee258 --- M src/ui/ve.ui.Trigger.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ui/ve.ui.Trigger.js b/src/ui/ve.ui.Trigger.js index b5ebfcd..e1f0cee 100644 --- a/src/ui/ve.ui.Trigger.js +++ b/src/ui/ve.ui.Trigger.js @@ -193,7 +193,6 @@ meta: '⌘', 'page-down': '⇟', 'page-up': '⇞', - 'return': '↵', right: '→', shift: '⇧', space: '␣', -- To view, visit https://gerrit.wikimedia.org/r/377506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d7f03f79796e50cfab79257d3edb41922cee258 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove 'return' mapping as it is aliased to 'enter' below
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377506 ) Change subject: Remove 'return' mapping as it is aliased to 'enter' below .. Remove 'return' mapping as it is aliased to 'enter' below Change-Id: I9d7f03f79796e50cfab79257d3edb41922cee258 --- M src/ui/ve.ui.Trigger.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/06/377506/1 diff --git a/src/ui/ve.ui.Trigger.js b/src/ui/ve.ui.Trigger.js index b5ebfcd..e1f0cee 100644 --- a/src/ui/ve.ui.Trigger.js +++ b/src/ui/ve.ui.Trigger.js @@ -193,7 +193,6 @@ meta: '⌘', 'page-down': '⇟', 'page-up': '⇞', - 'return': '↵', right: '→', shift: '⇧', space: '␣', -- To view, visit https://gerrit.wikimedia.org/r/377506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d7f03f79796e50cfab79257d3edb41922cee258 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove execute mode from non-executable
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/373590 ) Change subject: Remove execute mode from non-executable .. Remove execute mode from non-executable Change-Id: I15a2197f7395f1d402bfecb3a998de5f33a43855 --- M Gemfile 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Anomie: Looks good to me, approved diff --git a/Gemfile b/Gemfile old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/373590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15a2197f7395f1d402bfecb3a998de5f33a43855 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Anomie Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove execute mode from non-executable
Anomie has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373590 ) Change subject: Remove execute mode from non-executable .. Remove execute mode from non-executable Change-Id: I15a2197f7395f1d402bfecb3a998de5f33a43855 --- M Gemfile 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/90/373590/1 diff --git a/Gemfile b/Gemfile old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/373590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15a2197f7395f1d402bfecb3a998de5f33a43855 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unnecessary mixin from standalone image caption node
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/367883 ) Change subject: Remove unnecessary mixin from standalone image caption node .. Remove unnecessary mixin from standalone image caption node The CE mixin is already mixed in to active node. Change-Id: I2e5ba20ef2e2a226df751c88346d47f829ed12eb --- M src/ce/nodes/ve.ce.BlockImageCaptionNode.js M src/ce/nodes/ve.ce.TableCellNode.js 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ce/nodes/ve.ce.BlockImageCaptionNode.js b/src/ce/nodes/ve.ce.BlockImageCaptionNode.js index 062a7b4..e79f094 100644 --- a/src/ce/nodes/ve.ce.BlockImageCaptionNode.js +++ b/src/ce/nodes/ve.ce.BlockImageCaptionNode.js @@ -9,7 +9,6 @@ * * @class * @extends ve.ce.BranchNode - * @mixins ve.ce.ContentEditableNode * @mixins ve.ce.ActiveNode * * @constructor @@ -21,7 +20,6 @@ ve.ce.BlockImageCaptionNode.super.apply( this, arguments ); // Mixin constructor - ve.ce.ContentEditableNode.call( this ); ve.ce.ActiveNode.call( this ); }; @@ -29,7 +27,6 @@ OO.inheritClass( ve.ce.BlockImageCaptionNode, ve.ce.BranchNode ); -OO.mixinClass( ve.ce.BlockImageCaptionNode, ve.ce.ContentEditableNode ); OO.mixinClass( ve.ce.BlockImageCaptionNode, ve.ce.ActiveNode ); /* Static Properties */ diff --git a/src/ce/nodes/ve.ce.TableCellNode.js b/src/ce/nodes/ve.ce.TableCellNode.js index 46fbc5e..d14a776 100644 --- a/src/ce/nodes/ve.ce.TableCellNode.js +++ b/src/ce/nodes/ve.ce.TableCellNode.js @@ -10,6 +10,7 @@ * @class * @extends ve.ce.BranchNode * @mixins ve.ce.TableCellableNode + * @mixins ve.ce.ContentEditableNode * @constructor * @param {ve.dm.TableCellNode} model Model to observe * @param {Object} [config] Configuration options -- To view, visit https://gerrit.wikimedia.org/r/367883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e5ba20ef2e2a226df751c88346d47f829ed12eb Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unnecessary mixin from standalone image caption node
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367883 ) Change subject: Remove unnecessary mixin from standalone image caption node .. Remove unnecessary mixin from standalone image caption node The CE mixin is already mixed in to active node. Change-Id: I2e5ba20ef2e2a226df751c88346d47f829ed12eb --- M src/ce/nodes/ve.ce.BlockImageCaptionNode.js M src/ce/nodes/ve.ce.TableCellNode.js 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/83/367883/1 diff --git a/src/ce/nodes/ve.ce.BlockImageCaptionNode.js b/src/ce/nodes/ve.ce.BlockImageCaptionNode.js index 062a7b4..e79f094 100644 --- a/src/ce/nodes/ve.ce.BlockImageCaptionNode.js +++ b/src/ce/nodes/ve.ce.BlockImageCaptionNode.js @@ -9,7 +9,6 @@ * * @class * @extends ve.ce.BranchNode - * @mixins ve.ce.ContentEditableNode * @mixins ve.ce.ActiveNode * * @constructor @@ -21,7 +20,6 @@ ve.ce.BlockImageCaptionNode.super.apply( this, arguments ); // Mixin constructor - ve.ce.ContentEditableNode.call( this ); ve.ce.ActiveNode.call( this ); }; @@ -29,7 +27,6 @@ OO.inheritClass( ve.ce.BlockImageCaptionNode, ve.ce.BranchNode ); -OO.mixinClass( ve.ce.BlockImageCaptionNode, ve.ce.ContentEditableNode ); OO.mixinClass( ve.ce.BlockImageCaptionNode, ve.ce.ActiveNode ); /* Static Properties */ diff --git a/src/ce/nodes/ve.ce.TableCellNode.js b/src/ce/nodes/ve.ce.TableCellNode.js index 46fbc5e..d14a776 100644 --- a/src/ce/nodes/ve.ce.TableCellNode.js +++ b/src/ce/nodes/ve.ce.TableCellNode.js @@ -10,6 +10,7 @@ * @class * @extends ve.ce.BranchNode * @mixins ve.ce.TableCellableNode + * @mixins ve.ce.ContentEditableNode * @constructor * @param {ve.dm.TableCellNode} model Model to observe * @param {Object} [config] Configuration options -- To view, visit https://gerrit.wikimedia.org/r/367883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e5ba20ef2e2a226df751c88346d47f829ed12eb Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove custom icon sizing from block slugs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361861 ) Change subject: Remove custom icon sizing from block slugs .. Remove custom icon sizing from block slugs This causes alignment issues since OOUI v0.22.0. Change-Id: I966c59221f0dfcfa3956ec072be8afe74f3f33fd --- M src/ce/styles/nodes/ve.ce.BranchNode.css 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ce/styles/nodes/ve.ce.BranchNode.css b/src/ce/styles/nodes/ve.ce.BranchNode.css index 4e8f033..754ed46 100644 --- a/src/ce/styles/nodes/ve.ce.BranchNode.css +++ b/src/ce/styles/nodes/ve.ce.BranchNode.css @@ -55,12 +55,6 @@ display: block; } -.ve-ce-branchNode-blockSlug > .oo-ui-buttonWidget > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - width: 0.95em; - height: 0.95em; - background-size: auto; -} - .ve-ce-chimera { width: 0; height: 0; -- To view, visit https://gerrit.wikimedia.org/r/361861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I966c59221f0dfcfa3956ec072be8afe74f3f33fd Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove custom icon sizing from block slugs
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/361861 ) Change subject: Remove custom icon sizing from block slugs .. Remove custom icon sizing from block slugs This causes alignment issues since OOUI v0.22.0. Change-Id: I966c59221f0dfcfa3956ec072be8afe74f3f33fd --- M src/ce/styles/nodes/ve.ce.BranchNode.css 1 file changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/61/361861/1 diff --git a/src/ce/styles/nodes/ve.ce.BranchNode.css b/src/ce/styles/nodes/ve.ce.BranchNode.css index 4e8f033..754ed46 100644 --- a/src/ce/styles/nodes/ve.ce.BranchNode.css +++ b/src/ce/styles/nodes/ve.ce.BranchNode.css @@ -55,12 +55,6 @@ display: block; } -.ve-ce-branchNode-blockSlug > .oo-ui-buttonWidget > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - width: 0.95em; - height: 0.95em; - background-size: auto; -} - .ve-ce-chimera { width: 0; height: 0; -- To view, visit https://gerrit.wikimedia.org/r/361861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I966c59221f0dfcfa3956ec072be8afe74f3f33fd Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove ⌘+M shortcut for removing styling on mavs
Deskana has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/359455 ) Change subject: Remove ⌘+M shortcut for removing styling on mavs .. Remove ⌘+M shortcut for removing styling on mavs Per T167898, this overrides what the user expects to be an OS-level shortcut and also behaves inconsistently. Bug: T167898 Change-Id: I2ed8a778f1b4e8b0552eb6a5a5fbd9f61ee03bf3 --- M src/ui/ve.ui.TriggerRegistry.js 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/55/359455/1 diff --git a/src/ui/ve.ui.TriggerRegistry.js b/src/ui/ve.ui.TriggerRegistry.js index f5cb521..525f269 100644 --- a/src/ui/ve.ui.TriggerRegistry.js +++ b/src/ui/ve.ui.TriggerRegistry.js @@ -106,8 +106,7 @@ ve.ui.triggerRegistry.register( 'clear', { mac: [ - new ve.ui.Trigger( 'cmd+\\' ), - new ve.ui.Trigger( 'cmd+m' ) + new ve.ui.Trigger( 'cmd+\\' ) ], pc: [ new ve.ui.Trigger( 'ctrl+\\' ), -- To view, visit https://gerrit.wikimedia.org/r/359455 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ed8a778f1b4e8b0552eb6a5a5fbd9f61ee03bf3 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Deskana ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused filibuster CSS
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/357579 ) Change subject: Remove unused filibuster CSS .. Remove unused filibuster CSS Filibuster doesn't generate any table cells. Change-Id: I35f29e6e6be64d2bdc3d3d8377e1232805522ba7 --- M src/ui/styles/ve.ui.DebugBar.css 1 file changed, 0 insertions(+), 12 deletions(-) Approvals: Divec: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/styles/ve.ui.DebugBar.css b/src/ui/styles/ve.ui.DebugBar.css index adafebf..719d93a 100644 --- a/src/ui/styles/ve.ui.DebugBar.css +++ b/src/ui/styles/ve.ui.DebugBar.css @@ -118,18 +118,6 @@ border-top-left-radius: 0.25em; } -.ve-ui-debugBar-filibuster td { - padding: 0.25em 1em; - background-color: #fff; - vertical-align: top; -} - -.ve-ui-debugBar-filibuster th { - padding: 0.5em 1em; - color: #555; - text-shadow: 0 1px 1px #fff; -} - .ve-ui-debugBar-transactions { display: none; } -- To view, visit https://gerrit.wikimedia.org/r/357579 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35f29e6e6be64d2bdc3d3d8377e1232805522ba7 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Divec Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused MWImage-specific CSS
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/357578 ) Change subject: Remove unused MWImage-specific CSS .. Remove unused MWImage-specific CSS This was moved into MW 3 years ago. Change-Id: Ib2947bf39d20f900773a739120e99608e5523dd3 --- M src/ce/styles/ve.ce.Surface.css 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css index a95f902..95d560e 100644 --- a/src/ce/styles/ve.ce.Surface.css +++ b/src/ce/styles/ve.ce.Surface.css @@ -110,19 +110,6 @@ color: #06c; } -/* MediaWiki PHP Parser does not wrap text inside image captions in but we do (cause we have to). - * Let's make those looks like they are not there by proper CSS styling. - */ -.ve-ce-surface .thumbcaption p.ve-ce-generated-wrapper { - display: inline; - padding: 0; - line-height: inherit; -} - -.ve-ce-surface .thumbcaption .ve-ce-branchNode-slug { - display: none; -} - .ve-ce-cursorHolder { position: absolute; width: 0; -- To view, visit https://gerrit.wikimedia.org/r/357578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2947bf39d20f900773a739120e99608e5523dd3 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused table editor CSS
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/357577 ) Change subject: Remove unused table editor CSS .. Remove unused table editor CSS This is left over from before we implemented TableLineContext. Change-Id: Ie4fc792bd753d24a81f0848adc6fdd8b4581b503 --- M src/ce/styles/nodes/ve.ce.TableNode.css 1 file changed, 0 insertions(+), 22 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ce/styles/nodes/ve.ce.TableNode.css b/src/ce/styles/nodes/ve.ce.TableNode.css index 04b733d..8e2ab79 100644 --- a/src/ce/styles/nodes/ve.ce.TableNode.css +++ b/src/ce/styles/nodes/ve.ce.TableNode.css @@ -69,28 +69,6 @@ background: transparent; } -.ve-ce-tableNodeOverlay-row-bracket, -.ve-ce-tableNodeOverlay-column-bracket { - position: absolute; - border: solid 3px #6da9f7; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - opacity: 0.6; -} - -.ve-ce-tableNodeOverlay-row-bracket { - left: -12px; - width: 6px; - border-right: 0; -} - -.ve-ce-tableNodeOverlay-column-bracket { - top: -12px; - height: 6px; - border-bottom: 0; -} - .ve-ce-tableNode-missingCell { background-repeat: no-repeat; background-position: center center; -- To view, visit https://gerrit.wikimedia.org/r/357577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4fc792bd753d24a81f0848adc6fdd8b4581b503 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused MWImage-specific CSS
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/357578 ) Change subject: Remove unused MWImage-specific CSS .. Remove unused MWImage-specific CSS This was moved into MW 3 years ago. Change-Id: Ib2947bf39d20f900773a739120e99608e5523dd3 --- M src/ce/styles/ve.ce.Surface.css 1 file changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/78/357578/1 diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css index a95f902..95d560e 100644 --- a/src/ce/styles/ve.ce.Surface.css +++ b/src/ce/styles/ve.ce.Surface.css @@ -110,19 +110,6 @@ color: #06c; } -/* MediaWiki PHP Parser does not wrap text inside image captions in but we do (cause we have to). - * Let's make those looks like they are not there by proper CSS styling. - */ -.ve-ce-surface .thumbcaption p.ve-ce-generated-wrapper { - display: inline; - padding: 0; - line-height: inherit; -} - -.ve-ce-surface .thumbcaption .ve-ce-branchNode-slug { - display: none; -} - .ve-ce-cursorHolder { position: absolute; width: 0; -- To view, visit https://gerrit.wikimedia.org/r/357578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2947bf39d20f900773a739120e99608e5523dd3 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused filibuster CSS
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/357579 ) Change subject: Remove unused filibuster CSS .. Remove unused filibuster CSS Filibuster doesn't generate any table cells. Change-Id: I35f29e6e6be64d2bdc3d3d8377e1232805522ba7 --- M src/ui/styles/ve.ui.DebugBar.css 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/79/357579/1 diff --git a/src/ui/styles/ve.ui.DebugBar.css b/src/ui/styles/ve.ui.DebugBar.css index adafebf..719d93a 100644 --- a/src/ui/styles/ve.ui.DebugBar.css +++ b/src/ui/styles/ve.ui.DebugBar.css @@ -118,18 +118,6 @@ border-top-left-radius: 0.25em; } -.ve-ui-debugBar-filibuster td { - padding: 0.25em 1em; - background-color: #fff; - vertical-align: top; -} - -.ve-ui-debugBar-filibuster th { - padding: 0.5em 1em; - color: #555; - text-shadow: 0 1px 1px #fff; -} - .ve-ui-debugBar-transactions { display: none; } -- To view, visit https://gerrit.wikimedia.org/r/357579 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35f29e6e6be64d2bdc3d3d8377e1232805522ba7 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused table editor CSS
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/357577 ) Change subject: Remove unused table editor CSS .. Remove unused table editor CSS This is left over from before we implemented TableLineContext. Change-Id: Ie4fc792bd753d24a81f0848adc6fdd8b4581b503 --- M src/ce/styles/nodes/ve.ce.TableNode.css 1 file changed, 0 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/77/357577/1 diff --git a/src/ce/styles/nodes/ve.ce.TableNode.css b/src/ce/styles/nodes/ve.ce.TableNode.css index 04b733d..8e2ab79 100644 --- a/src/ce/styles/nodes/ve.ce.TableNode.css +++ b/src/ce/styles/nodes/ve.ce.TableNode.css @@ -69,28 +69,6 @@ background: transparent; } -.ve-ce-tableNodeOverlay-row-bracket, -.ve-ce-tableNodeOverlay-column-bracket { - position: absolute; - border: solid 3px #6da9f7; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - opacity: 0.6; -} - -.ve-ce-tableNodeOverlay-row-bracket { - left: -12px; - width: 6px; - border-right: 0; -} - -.ve-ce-tableNodeOverlay-column-bracket { - top: -12px; - height: 6px; - border-bottom: 0; -} - .ve-ce-tableNode-missingCell { background-repeat: no-repeat; background-position: center center; -- To view, visit https://gerrit.wikimedia.org/r/357577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4fc792bd753d24a81f0848adc6fdd8b4581b503 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove 'cellable' attribute
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/353712 ) Change subject: Remove 'cellable' attribute .. Remove 'cellable' attribute Now we have a separate class for AlienTableCell we can set it properly as a static property. Change-Id: Ic4da0433eec1332d9198de671dc2cba2f9164809 --- M src/dm/nodes/ve.dm.AlienNode.js M tests/ce/ve.ce.Surface.test.js 2 files changed, 14 insertions(+), 14 deletions(-) Approvals: DLynch: Looks good to me, approved jenkins-bot: Verified Jforrester: Looks good to me, but someone else must approve diff --git a/src/dm/nodes/ve.dm.AlienNode.js b/src/dm/nodes/ve.dm.AlienNode.js index 60765b7..208f095 100644 --- a/src/dm/nodes/ve.dm.AlienNode.js +++ b/src/dm/nodes/ve.dm.AlienNode.js @@ -44,28 +44,26 @@ ve.dm.AlienNode.static.matchRdfaTypes = [ 've:Alien' ]; ve.dm.AlienNode.static.toDataElement = function ( domElements, converter ) { - var element, + var element, attributes, isInline = this.isHybridInline( domElements, converter ), type = isInline ? 'alienInline' : 'alienBlock'; - element = { type: type }; - if ( domElements.length === 1 && [ 'td', 'th' ].indexOf( domElements[ 0 ].nodeName.toLowerCase() ) !== -1 ) { - element.type = 'alienTableCell'; - element.attributes = { cellable: true }; - ve.dm.TableCellableNode.static.setAttributes( element.attributes, domElements ); + attributes = {}; + ve.dm.TableCellableNode.static.setAttributes( attributes, domElements ); + element = { + type: 'alienTableCell', + attributes: attributes + }; + } else { + element = { type: type }; } + return element; }; ve.dm.AlienNode.static.toDomElements = function ( dataElement, doc, converter ) { return ve.copyDomElements( converter.getStore().value( dataElement.originalDomElementsIndex ) || [], doc ); -}; - -/* Methods */ - -ve.dm.AlienNode.prototype.isCellable = function () { - return !!this.getAttribute( 'cellable' ); }; /* Concrete subclasses */ @@ -126,6 +124,8 @@ ve.dm.AlienTableCellNode.static.name = 'alienTableCell'; +ve.dm.AlienTableCellNode.static.isCellable = true; + /* Registration */ ve.dm.modelRegistry.register( ve.dm.AlienBlockNode ); diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js index a8e58c6..b313731 100644 --- a/tests/ce/ve.ce.Surface.test.js +++ b/tests/ce/ve.ce.Surface.test.js @@ -2218,7 +2218,7 @@ { type: 'replace', insert: [ - { type: 'alienTableCell', attributes: { cellable: true, style: 'data' } }, + { type: 'alienTableCell', attributes: { style: 'data' } }, { type: '/alienTableCell' } ], remove: [ @@ -2258,7 +2258,7 @@ { type: 'replace', remove: [ - { type: 'alienTableCell', attributes: { cellable: true, style: 'data' } }, + { type: 'alienTableCell', attributes: { style: 'data' } }, { type: '/alienTableCell' } ], insert: [ -- To view, visit https://gerrit.wikimedia.org/r/353712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4da0433eec1332d9198de671dc2cba2f9164809 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: DLynch Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove eslint:fix
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/350872 ) Change subject: Remove eslint:fix .. Remove eslint:fix Not very useful now rules are stable. Change-Id: I62a84b89f1cbb5d66cd9a5f62bc941ebb6889352 --- M Gruntfile.js 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/Gruntfile.js b/Gruntfile.js index fa14180..30d9f3a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -266,14 +266,6 @@ ] }, eslint: { - fix: { - options: { - fix: true - }, - src: [ - '<%= eslint.main %>' - ] - }, main: [ '*.js', '{bin,build,demos,src,tests,rebaser}/**/*.js', @@ -412,9 +404,8 @@ } ); grunt.registerTask( 'build', [ 'clean', 'concat', 'cssjanus', 'cssUrlEmbed', 'copy', 'buildloader' ] ); - grunt.registerTask( 'lint', [ 'tyops', 'eslint:main', 'stylelint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'tyops', 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'unit', [ 'karma:main' ] ); - grunt.registerTask( 'fix', [ 'eslint:fix' ] ); grunt.registerTask( '_test', [ 'lint', 'git-build', 'build', 'unit' ] ); grunt.registerTask( 'ci', [ '_test', 'git-status' ] ); grunt.registerTask( 'watch', [ 'karma:bg:start', 'runwatch' ] ); -- To view, visit https://gerrit.wikimedia.org/r/350872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62a84b89f1cbb5d66cd9a5f62bc941ebb6889352 Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove eslint:fix
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/350872 ) Change subject: Remove eslint:fix .. Remove eslint:fix Not very useful now rules are stable. Change-Id: I62a84b89f1cbb5d66cd9a5f62bc941ebb6889352 --- M Gruntfile.js 1 file changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/72/350872/1 diff --git a/Gruntfile.js b/Gruntfile.js index fa14180..702ad33 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -266,14 +266,6 @@ ] }, eslint: { - fix: { - options: { - fix: true - }, - src: [ - '<%= eslint.main %>' - ] - }, main: [ '*.js', '{bin,build,demos,src,tests,rebaser}/**/*.js', @@ -414,7 +406,6 @@ grunt.registerTask( 'build', [ 'clean', 'concat', 'cssjanus', 'cssUrlEmbed', 'copy', 'buildloader' ] ); grunt.registerTask( 'lint', [ 'tyops', 'eslint:main', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'unit', [ 'karma:main' ] ); - grunt.registerTask( 'fix', [ 'eslint:fix' ] ); grunt.registerTask( '_test', [ 'lint', 'git-build', 'build', 'unit' ] ); grunt.registerTask( 'ci', [ '_test', 'git-status' ] ); grunt.registerTask( 'watch', [ 'karma:bg:start', 'runwatch' ] ); -- To view, visit https://gerrit.wikimedia.org/r/350872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62a84b89f1cbb5d66cd9a5f62bc941ebb6889352 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove builtin padding from .ve-ce-documentNode
Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/347977 ) Change subject: Remove builtin padding from .ve-ce-documentNode .. Remove builtin padding from .ve-ce-documentNode I think it's a lot easier if setting up paddings and margins on the DocumentNode that work well with everything else on the page is the responsibility of the Target, rather than DocumentNode/Surface. For example, we set .ve-ce-documentNode padding in: * ve.init.sa.css (standalone Target in the demos) * ve.init.mw.DesktopArticleTarget-vector.css (VE-MW) * ve.ui.TargetWidget.css (used in VE-MW dialogs) Also, follow-up to d426f806639fd1682be8eef241a1cd31172d8f91: removing a dead line of CSS (it was always overridden), and a misleading comment in TargetWidget. Bug: T162493 Change-Id: Ie2431ea9816e563702a84c202d7e52e4f1ca6e85 --- M src/init/sa/styles/ve.init.sa.css M src/ui/styles/ve.ui.Surface.css M src/ui/styles/widgets/ve.ui.TargetWidget.css 3 files changed, 5 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/77/347977/1 diff --git a/src/init/sa/styles/ve.init.sa.css b/src/init/sa/styles/ve.init.sa.css index 043a5e6..8960518 100644 --- a/src/init/sa/styles/ve.init.sa.css +++ b/src/init/sa/styles/ve.init.sa.css @@ -31,3 +31,8 @@ margin: 0.5em auto 1em auto; display: table; } + +.ve-init-sa-target .ve-ce-documentNode, +.ve-init-sa-target .ve-ui-surface-placeholder { + padding: 0.75em 1.5em; +} diff --git a/src/ui/styles/ve.ui.Surface.css b/src/ui/styles/ve.ui.Surface.css index e3b1887..bfce4de 100644 --- a/src/ui/styles/ve.ui.Surface.css +++ b/src/ui/styles/ve.ui.Surface.css @@ -22,19 +22,12 @@ position: absolute; left: 0; right: 0; - /* Match .ve-ce-documentNode */ - padding: 0.9375em 1.875em; } .ve-ui-surface-placeholder > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -} - -.ve-ui-surface-placeholder, -.ve-ui-surface .ve-ce-documentNode { - padding: 0.5em 1.5em; } .ve-ui-surface-source .ve-ce-documentNode { diff --git a/src/ui/styles/widgets/ve.ui.TargetWidget.css b/src/ui/styles/widgets/ve.ui.TargetWidget.css index 56d73b5..2cce8b1 100644 --- a/src/ui/styles/widgets/ve.ui.TargetWidget.css +++ b/src/ui/styles/widgets/ve.ui.TargetWidget.css @@ -6,7 +6,6 @@ .ve-ui-targetWidget .ve-ce-documentNode, .ve-ui-targetWidget .ve-ui-surface-placeholder { - /* target default padding is 0.75, 1.5. Use 0.5, 1 for the widget */ /* 0.5/0.8, 1/0.8 */ padding: 0.625em 1.25em; } -- To view, visit https://gerrit.wikimedia.org/r/347977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2431ea9816e563702a84c202d7e52e4f1ca6e85 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove more IE9 hacks
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/346815 ) Change subject: Remove more IE9 hacks .. Remove more IE9 hacks Change-Id: I0811ebd250ec8c87713440cbe4d8fbfab20a5aa8 --- M src/ce/styles/nodes/ve.ce.AlienNode.css M src/ce/styles/nodes/ve.ce.TableNode.css M src/ce/styles/ve.ce.Surface.css M src/ui/styles/elements/ve.ui.DiffElement.css M src/ve.utils.js 5 files changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/15/346815/1 diff --git a/src/ce/styles/nodes/ve.ce.AlienNode.css b/src/ce/styles/nodes/ve.ce.AlienNode.css index 0d246e4..24a2b98 100644 --- a/src/ce/styles/nodes/ve.ce.AlienNode.css +++ b/src/ce/styles/nodes/ve.ce.AlienNode.css @@ -6,7 +6,6 @@ .ve-ce-alienNode-highlights .ve-ce-focusableNode-highlight { background-color: #95d14f; - /* TODO: Support IE9 with fallback T135497 */ /* stylelint-disable no-unsupported-browser-features */ background-image: -webkit-repeating-linear-gradient( -45deg, #fff 0, #fff 5px, #95d14f 5px, #95d14f 10px ); background-image: -moz-repeating-linear-gradient( -45deg, #fff 0, #fff 5px, #95d14f 5px, #95d14f 10px ); @@ -17,7 +16,6 @@ } .ve-ce-surface-highlights-focused .ve-ce-alienNode-highlights .ve-ce-focusableNode-highlight { - /* TODO: Support IE9 with fallback T135497 */ /* stylelint-disable no-unsupported-browser-features */ background-image: -webkit-repeating-linear-gradient( -45deg, #6da9f7 0, #6da9f7 5px, #95d14f 5px, #95d14f 10px ); background-image: -moz-repeating-linear-gradient( -45deg, #6da9f7 0, #6da9f7 5px, #95d14f 5px, #95d14f 10px ); diff --git a/src/ce/styles/nodes/ve.ce.TableNode.css b/src/ce/styles/nodes/ve.ce.TableNode.css index 06ea1b6..e037dae 100644 --- a/src/ce/styles/nodes/ve.ce.TableNode.css +++ b/src/ce/styles/nodes/ve.ce.TableNode.css @@ -50,7 +50,6 @@ } .ve-ce-tableNodeOverlay-selection-box-notEditable { - /* TODO: Support IE9 with fallback T135497 */ /* stylelint-disable no-unsupported-browser-features */ background-image: -webkit-repeating-linear-gradient( -45deg, transparent 0 transparent 5px, #95d14f 5px, #95d14f 10px ); background-image: -moz-repeating-linear-gradient( -45deg, transparent 0, transparent 5px, #95d14f 5px, #95d14f 10px ); diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css index eb078e2..9f93e77 100644 --- a/src/ce/styles/ve.ce.Surface.css +++ b/src/ce/styles/ve.ce.Surface.css @@ -20,7 +20,6 @@ top: 0; left: 0; opacity: 0.5; - /* TODO: Support IE9 with JS mouse events */ pointer-events: none; /* stylelint-disable-line no-unsupported-browser-features */ } diff --git a/src/ui/styles/elements/ve.ui.DiffElement.css b/src/ui/styles/elements/ve.ui.DiffElement.css index eb032f0..9e8edb7 100644 --- a/src/ui/styles/elements/ve.ui.DiffElement.css +++ b/src/ui/styles/elements/ve.ui.DiffElement.css @@ -47,7 +47,6 @@ outline: 3px solid #6da9f7; padding: 2px; margin: -2px 0 0 -2px; - /* TODO: Support IE9 with JS mouse events */ pointer-events: none; /* stylelint-disable-line no-unsupported-browser-features */ } diff --git a/src/ve.utils.js b/src/ve.utils.js index 2a9071e..029ba1a 100644 --- a/src/ve.utils.js +++ b/src/ve.utils.js @@ -839,7 +839,6 @@ // value is not actually a Document, but something which behaves just like an empty regular // object...), so we're detecting that and using the innerHTML hack described above. - // Support: IE9 // Support: Firefox 20 // Support: Opera 12 @@ -857,10 +856,6 @@ newDocument.close(); // Detach the iframe iframe.parentNode.removeChild( iframe ); - // Support: IE9 - // Prevent garbage collection of iframe as long as newDocument exists, as destroying - // the original iframe makes access to the document impossible in IE9 - newDocument.originalIframe = iframe; if ( !newDocument.documentElement || newDocument.documentElement.cloneNode( false ) === undefined ) { // Surprise! The document is not a document! Only happens on Opera. -- To view, visit https://gerrit.wikimedia.org/r/346815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0811ebd250ec8c87713440cbe4d8fbfab20a5aa8 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove DiffElement DOM element when destroying
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/346201 ) Change subject: Remove DiffElement DOM element when destroying .. Remove DiffElement DOM element when destroying Bug: T161877 Change-Id: I1631c4c160ff2bcf4fdbb466ed6294bd6a2f8be3 --- M src/ui/elements/ve.ui.DiffElement.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ui/elements/ve.ui.DiffElement.js b/src/ui/elements/ve.ui.DiffElement.js index 1b16c29..c97385c 100644 --- a/src/ui/elements/ve.ui.DiffElement.js +++ b/src/ui/elements/ve.ui.DiffElement.js @@ -190,6 +190,7 @@ */ ve.ui.DiffElement.prototype.destroy = function () { $( this.getElementWindow() ).off( 'resize', this.onWindowResizeDebounced ); + this.$element.remove(); }; /** -- To view, visit https://gerrit.wikimedia.org/r/346201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1631c4c160ff2bcf4fdbb466ed6294bd6a2f8be3 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove DiffElement DOM element when destroying
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/346201 ) Change subject: Remove DiffElement DOM element when destroying .. Remove DiffElement DOM element when destroying Bug: T161877 Change-Id: I1631c4c160ff2bcf4fdbb466ed6294bd6a2f8be3 --- M src/ui/elements/ve.ui.DiffElement.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/01/346201/1 diff --git a/src/ui/elements/ve.ui.DiffElement.js b/src/ui/elements/ve.ui.DiffElement.js index 1b16c29..c97385c 100644 --- a/src/ui/elements/ve.ui.DiffElement.js +++ b/src/ui/elements/ve.ui.DiffElement.js @@ -190,6 +190,7 @@ */ ve.ui.DiffElement.prototype.destroy = function () { $( this.getElementWindow() ).off( 'resize', this.onWindowResizeDebounced ); + this.$element.remove(); }; /** -- To view, visit https://gerrit.wikimedia.org/r/346201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1631c4c160ff2bcf4fdbb466ed6294bd6a2f8be3 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove superfluous setting of canContainContent when inherit...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/344800 ) Change subject: Remove superfluous setting of canContainContent when inheriting from CBN .. Remove superfluous setting of canContainContent when inheriting from CBN Change-Id: Ieb318ad9febb155e669fbd52cdd53a7a19d1b927 --- M src/dm/nodes/ve.dm.HeadingNode.js M src/dm/nodes/ve.dm.ParagraphNode.js M src/dm/nodes/ve.dm.PreformattedNode.js 3 files changed, 0 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/dm/nodes/ve.dm.HeadingNode.js b/src/dm/nodes/ve.dm.HeadingNode.js index a0a6ec0..495fa73 100644 --- a/src/dm/nodes/ve.dm.HeadingNode.js +++ b/src/dm/nodes/ve.dm.HeadingNode.js @@ -27,8 +27,6 @@ ve.dm.HeadingNode.static.name = 'heading'; -ve.dm.HeadingNode.static.canContainContent = true; - ve.dm.HeadingNode.static.defaultAttributes = { level: 1 }; diff --git a/src/dm/nodes/ve.dm.ParagraphNode.js b/src/dm/nodes/ve.dm.ParagraphNode.js index 8d30baf..2261fd6 100644 --- a/src/dm/nodes/ve.dm.ParagraphNode.js +++ b/src/dm/nodes/ve.dm.ParagraphNode.js @@ -27,8 +27,6 @@ ve.dm.ParagraphNode.static.name = 'paragraph'; -ve.dm.ParagraphNode.static.canContainContent = true; - ve.dm.ParagraphNode.static.matchTagNames = [ 'p' ]; /* Registration */ diff --git a/src/dm/nodes/ve.dm.PreformattedNode.js b/src/dm/nodes/ve.dm.PreformattedNode.js index 94ad080..98b5ecf 100644 --- a/src/dm/nodes/ve.dm.PreformattedNode.js +++ b/src/dm/nodes/ve.dm.PreformattedNode.js @@ -27,8 +27,6 @@ ve.dm.PreformattedNode.static.name = 'preformatted'; -ve.dm.PreformattedNode.static.canContainContent = true; - ve.dm.PreformattedNode.static.hasSignificantWhitespace = true; ve.dm.PreformattedNode.static.matchTagNames = [ 'pre' ]; -- To view, visit https://gerrit.wikimedia.org/r/344800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb318ad9febb155e669fbd52cdd53a7a19d1b927 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove superfluous setting of canContainContent when inherit...
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/344800 ) Change subject: Remove superfluous setting of canContainContent when inheriting from CBN .. Remove superfluous setting of canContainContent when inheriting from CBN Change-Id: Ieb318ad9febb155e669fbd52cdd53a7a19d1b927 --- M src/dm/nodes/ve.dm.HeadingNode.js M src/dm/nodes/ve.dm.ParagraphNode.js M src/dm/nodes/ve.dm.PreformattedNode.js 3 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/00/344800/1 diff --git a/src/dm/nodes/ve.dm.HeadingNode.js b/src/dm/nodes/ve.dm.HeadingNode.js index a0a6ec0..495fa73 100644 --- a/src/dm/nodes/ve.dm.HeadingNode.js +++ b/src/dm/nodes/ve.dm.HeadingNode.js @@ -27,8 +27,6 @@ ve.dm.HeadingNode.static.name = 'heading'; -ve.dm.HeadingNode.static.canContainContent = true; - ve.dm.HeadingNode.static.defaultAttributes = { level: 1 }; diff --git a/src/dm/nodes/ve.dm.ParagraphNode.js b/src/dm/nodes/ve.dm.ParagraphNode.js index 8d30baf..2261fd6 100644 --- a/src/dm/nodes/ve.dm.ParagraphNode.js +++ b/src/dm/nodes/ve.dm.ParagraphNode.js @@ -27,8 +27,6 @@ ve.dm.ParagraphNode.static.name = 'paragraph'; -ve.dm.ParagraphNode.static.canContainContent = true; - ve.dm.ParagraphNode.static.matchTagNames = [ 'p' ]; /* Registration */ diff --git a/src/dm/nodes/ve.dm.PreformattedNode.js b/src/dm/nodes/ve.dm.PreformattedNode.js index 94ad080..98b5ecf 100644 --- a/src/dm/nodes/ve.dm.PreformattedNode.js +++ b/src/dm/nodes/ve.dm.PreformattedNode.js @@ -27,8 +27,6 @@ ve.dm.PreformattedNode.static.name = 'preformatted'; -ve.dm.PreformattedNode.static.canContainContent = true; - ve.dm.PreformattedNode.static.hasSignificantWhitespace = true; ve.dm.PreformattedNode.static.matchTagNames = [ 'pre' ]; -- To view, visit https://gerrit.wikimedia.org/r/344800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb318ad9febb155e669fbd52cdd53a7a19d1b927 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove redundant setDisabled calls from tools extending ve.u...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/343034 ) Change subject: Remove redundant setDisabled calls from tools extending ve.ui.Tool .. Remove redundant setDisabled calls from tools extending ve.ui.Tool Parent constructor already does this. Change-Id: Ied722d9fe8219a4596688affe58649e990058812 --- M src/ui/tools/ve.ui.ClearAnnotationTool.js M src/ui/tools/ve.ui.HistoryTool.js 2 files changed, 0 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ui/tools/ve.ui.ClearAnnotationTool.js b/src/ui/tools/ve.ui.ClearAnnotationTool.js index ce5737b..3508157 100644 --- a/src/ui/tools/ve.ui.ClearAnnotationTool.js +++ b/src/ui/tools/ve.ui.ClearAnnotationTool.js @@ -16,9 +16,6 @@ ve.ui.ClearAnnotationTool = function VeUiClearAnnotationTool() { // Parent constructor ve.ui.ClearAnnotationTool.super.apply( this, arguments ); - - // Initialization - this.setDisabled( true ); }; /* Inheritance */ diff --git a/src/ui/tools/ve.ui.HistoryTool.js b/src/ui/tools/ve.ui.HistoryTool.js index 3886e98..350ebd9 100644 --- a/src/ui/tools/ve.ui.HistoryTool.js +++ b/src/ui/tools/ve.ui.HistoryTool.js @@ -19,9 +19,6 @@ // Events this.toolbar.getSurface().getModel().connect( this, { history: 'onHistory' } ); - - // Initialization - this.setDisabled( true ); }; /* Inheritance */ -- To view, visit https://gerrit.wikimedia.org/r/343034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied722d9fe8219a4596688affe58649e990058812 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove redundant setDisabled calls from tools extending ve.u...
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343034 ) Change subject: Remove redundant setDisabled calls from tools extending ve.ui.Tool .. Remove redundant setDisabled calls from tools extending ve.ui.Tool Parent constructor already does this. Change-Id: Ied722d9fe8219a4596688affe58649e990058812 --- M src/ui/tools/ve.ui.ClearAnnotationTool.js M src/ui/tools/ve.ui.HistoryTool.js 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/34/343034/1 diff --git a/src/ui/tools/ve.ui.ClearAnnotationTool.js b/src/ui/tools/ve.ui.ClearAnnotationTool.js index ce5737b..3508157 100644 --- a/src/ui/tools/ve.ui.ClearAnnotationTool.js +++ b/src/ui/tools/ve.ui.ClearAnnotationTool.js @@ -16,9 +16,6 @@ ve.ui.ClearAnnotationTool = function VeUiClearAnnotationTool() { // Parent constructor ve.ui.ClearAnnotationTool.super.apply( this, arguments ); - - // Initialization - this.setDisabled( true ); }; /* Inheritance */ diff --git a/src/ui/tools/ve.ui.HistoryTool.js b/src/ui/tools/ve.ui.HistoryTool.js index 3886e98..350ebd9 100644 --- a/src/ui/tools/ve.ui.HistoryTool.js +++ b/src/ui/tools/ve.ui.HistoryTool.js @@ -19,9 +19,6 @@ // Events this.toolbar.getSurface().getModel().connect( this, { history: 'onHistory' } ); - - // Initialization - this.setDisabled( true ); }; /* Inheritance */ -- To view, visit https://gerrit.wikimedia.org/r/343034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied722d9fe8219a4596688affe58649e990058812 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove $returnFocusTo hack now null is supported upstream
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/342227 ) Change subject: Remove $returnFocusTo hack now null is supported upstream .. Remove $returnFocusTo hack now null is supported upstream Change-Id: Iea627aed990eb4bc54b43cfb9ae8e4dd5e2d072e --- M src/ui/actions/ve.ui.WindowAction.js M src/ui/ve.ui.Surface.js M src/ui/widgets/ve.ui.LanguageInputWidget.js 3 files changed, 5 insertions(+), 11 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ui/actions/ve.ui.WindowAction.js b/src/ui/actions/ve.ui.WindowAction.js index 63b7089..5e3d83c 100644 --- a/src/ui/actions/ve.ui.WindowAction.js +++ b/src/ui/actions/ve.ui.WindowAction.js @@ -55,8 +55,6 @@ surface = this.surface, fragment = surface.getModel().getFragment( undefined, true ), dir = surface.getView().getSelection().getDirection(), - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ], windowClass = ve.ui.windowFactory.lookup( name ), mayContainFragment = windowClass.prototype instanceof ve.ui.FragmentDialog || windowClass.prototype instanceof ve.ui.FragmentInspector || @@ -90,7 +88,7 @@ fragmentPromise = $.Deferred().resolve( fragment ).promise(); } - data = ve.extendObject( { dir: dir }, data, { $returnFocusTo: $noFocus } ); + data = ve.extendObject( { dir: dir }, data, { $returnFocusTo: null } ); if ( windowType === 'toolbar' || windowType === 'inspector' ) { data = ve.extendObject( data, { surface: surface } ); diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js index 750acf0..e25a74b 100644 --- a/src/ui/ve.ui.Surface.js +++ b/src/ui/ve.ui.Surface.js @@ -738,11 +738,9 @@ ve.ui.Surface.prototype.showProgress = function () { var dialogs = this.dialogs, - progresses = this.progresses, - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ]; + progresses = this.progresses; - dialogs.openWindow( 'progress', { progresses: progresses, $returnFocusTo: $noFocus } ); + dialogs.openWindow( 'progress', { progresses: progresses, $returnFocusTo: null } ); this.progresses = []; }; diff --git a/src/ui/widgets/ve.ui.LanguageInputWidget.js b/src/ui/widgets/ve.ui.LanguageInputWidget.js index 0645479..81fd989 100644 --- a/src/ui/widgets/ve.ui.LanguageInputWidget.js +++ b/src/ui/widgets/ve.ui.LanguageInputWidget.js @@ -122,10 +122,8 @@ * Handle find language button click events. */ ve.ui.LanguageInputWidget.prototype.onFindLanguageButtonClick = function () { - var widget = this, - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ]; - this.dialogs.openWindow( 'languageSearch', { availableLanguages: this.availableLanguages, $returnFocusTo: $noFocus } ) + var widget = this; + this.dialogs.openWindow( 'languageSearch', { availableLanguages: this.availableLanguages, $returnFocusTo: null } ) .then( function ( opened ) { opened.then( function ( closing ) { closing.then( function ( data ) { -- To view, visit https://gerrit.wikimedia.org/r/342227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea627aed990eb4bc54b43cfb9ae8e4dd5e2d072e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove $returnFocusTo hack now null is supported upstream
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/342227 ) Change subject: Remove $returnFocusTo hack now null is supported upstream .. Remove $returnFocusTo hack now null is supported upstream Change-Id: Iea627aed990eb4bc54b43cfb9ae8e4dd5e2d072e --- M src/ui/actions/ve.ui.WindowAction.js M src/ui/ve.ui.Surface.js M src/ui/widgets/ve.ui.LanguageInputWidget.js 3 files changed, 5 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/27/342227/1 diff --git a/src/ui/actions/ve.ui.WindowAction.js b/src/ui/actions/ve.ui.WindowAction.js index 63b7089..5e3d83c 100644 --- a/src/ui/actions/ve.ui.WindowAction.js +++ b/src/ui/actions/ve.ui.WindowAction.js @@ -55,8 +55,6 @@ surface = this.surface, fragment = surface.getModel().getFragment( undefined, true ), dir = surface.getView().getSelection().getDirection(), - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ], windowClass = ve.ui.windowFactory.lookup( name ), mayContainFragment = windowClass.prototype instanceof ve.ui.FragmentDialog || windowClass.prototype instanceof ve.ui.FragmentInspector || @@ -90,7 +88,7 @@ fragmentPromise = $.Deferred().resolve( fragment ).promise(); } - data = ve.extendObject( { dir: dir }, data, { $returnFocusTo: $noFocus } ); + data = ve.extendObject( { dir: dir }, data, { $returnFocusTo: null } ); if ( windowType === 'toolbar' || windowType === 'inspector' ) { data = ve.extendObject( data, { surface: surface } ); diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js index 750acf0..e25a74b 100644 --- a/src/ui/ve.ui.Surface.js +++ b/src/ui/ve.ui.Surface.js @@ -738,11 +738,9 @@ ve.ui.Surface.prototype.showProgress = function () { var dialogs = this.dialogs, - progresses = this.progresses, - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ]; + progresses = this.progresses; - dialogs.openWindow( 'progress', { progresses: progresses, $returnFocusTo: $noFocus } ); + dialogs.openWindow( 'progress', { progresses: progresses, $returnFocusTo: null } ); this.progresses = []; }; diff --git a/src/ui/widgets/ve.ui.LanguageInputWidget.js b/src/ui/widgets/ve.ui.LanguageInputWidget.js index 0645479..81fd989 100644 --- a/src/ui/widgets/ve.ui.LanguageInputWidget.js +++ b/src/ui/widgets/ve.ui.LanguageInputWidget.js @@ -122,10 +122,8 @@ * Handle find language button click events. */ ve.ui.LanguageInputWidget.prototype.onFindLanguageButtonClick = function () { - var widget = this, - // HACK: Allow $returnFocusTo to take null upstream - $noFocus = [ { focus: function () {} } ]; - this.dialogs.openWindow( 'languageSearch', { availableLanguages: this.availableLanguages, $returnFocusTo: $noFocus } ) + var widget = this; + this.dialogs.openWindow( 'languageSearch', { availableLanguages: this.availableLanguages, $returnFocusTo: null } ) .then( function ( opened ) { opened.then( function ( closing ) { closing.then( function ( data ) { -- To view, visit https://gerrit.wikimedia.org/r/342227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea627aed990eb4bc54b43cfb9ae8e4dd5e2d072e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove used 'header' params from toolbar config
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/338637 ) Change subject: Remove used 'header' params from toolbar config .. Remove used 'header' params from toolbar config Change-Id: I0611bd5d46679880f39ea2c7f27c24d240822960 --- M src/init/sa/ve.init.sa.MobileTarget.js M src/init/ve.init.Target.js 2 files changed, 12 insertions(+), 28 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/init/sa/ve.init.sa.MobileTarget.js b/src/init/sa/ve.init.sa.MobileTarget.js index c7422a2..c8bd7d3 100644 --- a/src/init/sa/ve.init.sa.MobileTarget.js +++ b/src/init/sa/ve.init.sa.MobileTarget.js @@ -27,44 +27,37 @@ ve.init.sa.MobileTarget.static.toolbarGroups = [ // History - { - header: OO.ui.deferMsg( 'visualeditor-toolbar-history' ), - include: [ 'undo' ] - }, + { include: [ 'undo' ] }, // Style { + header: OO.ui.deferMsg( 'visualeditor-toolbar-text-style' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), classes: [ 've-test-toolbar-style' ], type: 'list', icon: 'textStyle', - indicator: 'down', - title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), include: [ { group: 'textStyle' }, 'language', 'clear' ], forceExpand: [ 'bold', 'italic', 'clear' ], promote: [ 'bold', 'italic' ], demote: [ 'strikethrough', 'code', 'underline', 'language', 'clear' ] }, // Link - { - header: OO.ui.deferMsg( 'visualeditor-linkinspector-title' ), - include: [ 'link' ] - }, + { include: [ 'link' ] }, // Structure { header: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), type: 'list', icon: 'listBullet', - indicator: 'down', include: [ { group: 'structure' } ], demote: [ 'outdent', 'indent' ] }, // Insert { header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), type: 'list', icon: 'add', label: '', - title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), - indicator: 'down', include: '*' } ]; diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js index 970a69d..a2705d0 100644 --- a/src/init/ve.init.Target.js +++ b/src/init/ve.init.Target.js @@ -88,15 +88,12 @@ ve.init.Target.static.toolbarGroups = [ // History - { - header: OO.ui.deferMsg( 'visualeditor-toolbar-history' ), - include: [ 'undo', 'redo' ] - }, + { include: [ 'undo', 'redo' ] }, // Format { header: OO.ui.deferMsg( 'visualeditor-toolbar-paragraph-format' ), - type: 'menu', title: OO.ui.deferMsg( 'visualeditor-toolbar-format-tooltip' ), + type: 'menu', include: [ { group: 'format' } ], promote: [ 'paragraph' ], demote: [ 'preformatted', 'blockquote' ] @@ -108,33 +105,27 @@ include: [ 'bold', 'italic', 'moreTextStyle' ] }, // Link - { - header: OO.ui.deferMsg( 'visualeditor-linkinspector-title' ), - include: [ 'link' ] - }, + { include: [ 'link' ] }, // Structure { header: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), type: 'list', icon: 'listBullet', - title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), include: [ { group: 'structure' } ], demote: [ 'outdent', 'indent' ] }, // Insert { header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), type: 'list', icon: 'add', label: '', - title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), include: '*' }, // Special character toolbar - { - header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), - include: [ 'specialCharacter' ] - } + { include: [ 'specialCharacter' ] } ]; ve.init.Target.static.actionGroups = []; -- To view, visit https://gerrit.wikimedia.org/r/338637 To unsubscribe, visit https://gerrit.wikimedia.org/r/setting
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove styles for non-existent toolbar-shadow
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/338742 ) Change subject: Remove styles for non-existent toolbar-shadow .. Remove styles for non-existent toolbar-shadow Change-Id: I49b4387314b893fb945bb2bf03f3062da42c6000 --- M src/ui/styles/ve.ui.Toolbar.css 1 file changed, 0 insertions(+), 8 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/styles/ve.ui.Toolbar.css b/src/ui/styles/ve.ui.Toolbar.css index e5d2817..9daf4a8 100644 --- a/src/ui/styles/ve.ui.Toolbar.css +++ b/src/ui/styles/ve.ui.Toolbar.css @@ -9,10 +9,6 @@ position: relative; } -.ve-ui-toolbar .oo-ui-toolbar-shadow { - opacity: 0; -} - /* PositionedTargetToolbar */ .ve-ui-toolbar-floating > .oo-ui-toolbar-bar { @@ -20,8 +16,4 @@ top: 0; z-index: 2; border-top: 0; -} - -.ve-ui-toolbar-floating .oo-ui-toolbar-shadow { - opacity: 0.5; } -- To view, visit https://gerrit.wikimedia.org/r/338742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49b4387314b893fb945bb2bf03f3062da42c6000 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove styles for non-existent toolbar-shadow
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/338742 ) Change subject: Remove styles for non-existent toolbar-shadow .. Remove styles for non-existent toolbar-shadow Change-Id: I49b4387314b893fb945bb2bf03f3062da42c6000 --- M src/ui/styles/ve.ui.Toolbar.css 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/42/338742/1 diff --git a/src/ui/styles/ve.ui.Toolbar.css b/src/ui/styles/ve.ui.Toolbar.css index e5d2817..9daf4a8 100644 --- a/src/ui/styles/ve.ui.Toolbar.css +++ b/src/ui/styles/ve.ui.Toolbar.css @@ -9,10 +9,6 @@ position: relative; } -.ve-ui-toolbar .oo-ui-toolbar-shadow { - opacity: 0; -} - /* PositionedTargetToolbar */ .ve-ui-toolbar-floating > .oo-ui-toolbar-bar { @@ -20,8 +16,4 @@ top: 0; z-index: 2; border-top: 0; -} - -.ve-ui-toolbar-floating .oo-ui-toolbar-shadow { - opacity: 0.5; } -- To view, visit https://gerrit.wikimedia.org/r/338742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49b4387314b893fb945bb2bf03f3062da42c6000 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove used 'header' params from toolbar config
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/338637 ) Change subject: Remove used 'header' params from toolbar config .. Remove used 'header' params from toolbar config Change-Id: I0611bd5d46679880f39ea2c7f27c24d240822960 --- M src/init/ve.init.Target.js 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/37/338637/1 diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js index 8571a98..2dae4db 100644 --- a/src/init/ve.init.Target.js +++ b/src/init/ve.init.Target.js @@ -89,14 +89,13 @@ ve.init.Target.static.toolbarGroups = [ // History { - header: OO.ui.deferMsg( 'visualeditor-toolbar-history' ), include: [ 'undo', 'redo' ] }, // Format { header: OO.ui.deferMsg( 'visualeditor-toolbar-paragraph-format' ), - type: 'menu', title: OO.ui.deferMsg( 'visualeditor-toolbar-format-tooltip' ), + type: 'menu', include: [ { group: 'format' } ], promote: [ 'paragraph' ], demote: [ 'preformatted', 'blockquote' ] @@ -109,30 +108,28 @@ }, // Link { - header: OO.ui.deferMsg( 'visualeditor-linkinspector-title' ), include: [ 'link' ] }, // Structure { header: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), type: 'list', icon: 'listBullet', - title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), include: [ { group: 'structure' } ], demote: [ 'outdent', 'indent' ] }, // Insert { header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), + title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), type: 'list', icon: 'add', label: '', - title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), include: '*' }, // Special character toolbar { - header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), include: [ 'specialCharacter' ] } ]; -- To view, visit https://gerrit.wikimedia.org/r/338637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0611bd5d46679880f39ea2c7f27c24d240822960 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove explicit toolbar indicator definitions
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335990 ) Change subject: Remove explicit toolbar indicator definitions .. Remove explicit toolbar indicator definitions These are now computed upstream based on position of toolbar. The menu tool now needs its indicator explicitly hidden. Change-Id: If482a61937bf60c298c67567299b7b63ac043c02 --- M src/init/sa/ve.init.sa.Target.js M src/init/ve.init.Target.js 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/init/sa/ve.init.sa.Target.js b/src/init/sa/ve.init.sa.Target.js index bab83a9..6eee832 100644 --- a/src/init/sa/ve.init.sa.Target.js +++ b/src/init/sa/ve.init.sa.Target.js @@ -50,6 +50,7 @@ { type: 'list', icon: 'menu', + indicator: null, title: OO.ui.deferMsg( 'visualeditor-pagemenu-tooltip' ), include: [ 'findAndReplace', 'commandHelp' ] } diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js index 0213b08..8571a98 100644 --- a/src/init/ve.init.Target.js +++ b/src/init/ve.init.Target.js @@ -96,7 +96,6 @@ { header: OO.ui.deferMsg( 'visualeditor-toolbar-paragraph-format' ), type: 'menu', - indicator: 'down', title: OO.ui.deferMsg( 'visualeditor-toolbar-format-tooltip' ), include: [ { group: 'format' } ], promote: [ 'paragraph' ], @@ -119,7 +118,6 @@ type: 'list', icon: 'listBullet', title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), - indicator: 'down', include: [ { group: 'structure' } ], demote: [ 'outdent', 'indent' ] }, @@ -130,7 +128,6 @@ icon: 'add', label: '', title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), - indicator: 'down', include: '*' }, // Special character toolbar -- To view, visit https://gerrit.wikimedia.org/r/335990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If482a61937bf60c298c67567299b7b63ac043c02 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove explicit toolbar indicator definitions
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335990 ) Change subject: Remove explicit toolbar indicator definitions .. Remove explicit toolbar indicator definitions These are now computed upstream based on position of toolbar. The menu tool now needs its indicator explicitly hidden. Change-Id: If482a61937bf60c298c67567299b7b63ac043c02 --- M src/init/sa/ve.init.sa.Target.js M src/init/ve.init.Target.js 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/90/335990/1 diff --git a/src/init/sa/ve.init.sa.Target.js b/src/init/sa/ve.init.sa.Target.js index bab83a9..6eee832 100644 --- a/src/init/sa/ve.init.sa.Target.js +++ b/src/init/sa/ve.init.sa.Target.js @@ -50,6 +50,7 @@ { type: 'list', icon: 'menu', + indicator: null, title: OO.ui.deferMsg( 'visualeditor-pagemenu-tooltip' ), include: [ 'findAndReplace', 'commandHelp' ] } diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js index 0213b08..8571a98 100644 --- a/src/init/ve.init.Target.js +++ b/src/init/ve.init.Target.js @@ -96,7 +96,6 @@ { header: OO.ui.deferMsg( 'visualeditor-toolbar-paragraph-format' ), type: 'menu', - indicator: 'down', title: OO.ui.deferMsg( 'visualeditor-toolbar-format-tooltip' ), include: [ { group: 'format' } ], promote: [ 'paragraph' ], @@ -119,7 +118,6 @@ type: 'list', icon: 'listBullet', title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), - indicator: 'down', include: [ { group: 'structure' } ], demote: [ 'outdent', 'indent' ] }, @@ -130,7 +128,6 @@ icon: 'add', label: '', title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), - indicator: 'down', include: '*' }, // Special character toolbar -- To view, visit https://gerrit.wikimedia.org/r/335990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If482a61937bf60c298c67567299b7b63ac043c02 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove presynchronize, use precommit instead
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335640 ) Change subject: Remove presynchronize, use precommit instead .. Remove presynchronize, use precommit instead The presynchronize event didn't make much sense: it fired after the linear model was updated but before the tree was synchronized, but this property wasn't being used at all. Passing the transaction to the precommit event is sufficient and allows us to remove presynchronize. Change-Id: Iebd9b571fc093dca12787061e2787e3a75cd3969 --- M src/dm/ve.dm.Document.js M src/dm/ve.dm.Surface.js M src/dm/ve.dm.TransactionProcessor.js 3 files changed, 11 insertions(+), 34 deletions(-) Approvals: Divec: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js index 38efcee..548027a 100644 --- a/src/dm/ve.dm.Document.js +++ b/src/dm/ve.dm.Document.js @@ -89,13 +89,7 @@ /** * @event precommit * Emitted when a transaction is about to be committed. - */ - -/** - * @event presynchronize - * Emitted when a transaction has been applied to the linear model - * but the model tree has not yet been synchronized. - * @param {ve.dm.Transaction} tx Transaction that is about to be synchronized + * @param {ve.dm.Transaction} tx Transaction that is about to be committed */ /** @@ -328,18 +322,16 @@ * @method * @param {ve.dm.Transaction} transaction Transaction to apply * @param {boolean} isStaging Transaction is being applied in staging mode + * @fires precommit * @fires transact * @throws {Error} Cannot commit a transaction that has already been committed */ ve.dm.Document.prototype.commit = function ( transaction, isStaging ) { - var doc = this; if ( transaction.hasBeenApplied() ) { throw new Error( 'Cannot commit a transaction that has already been committed' ); } - this.emit( 'precommit' ); - new ve.dm.TransactionProcessor( this, transaction, isStaging ).process( function () { - doc.emit( 'presynchronize', transaction ); - } ); + this.emit( 'precommit', transaction ); + new ve.dm.TransactionProcessor( this, transaction, isStaging ).process(); this.completeHistory.push( transaction ); this.storeLengthAtHistoryLength[ this.completeHistory.length ] = this.store.getLength(); this.emit( 'transact', transaction ); diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js index aae8cdc..ba06c71 100644 --- a/src/dm/ve.dm.Surface.js +++ b/src/dm/ve.dm.Surface.js @@ -47,8 +47,7 @@ // Events this.getDocument().connect( this, { transact: 'onDocumentTransact', - precommit: 'onDocumentPreCommit', - presynchronize: 'onDocumentPreSynchronize' + precommit: 'onDocumentPreCommit' } ); }; @@ -999,25 +998,15 @@ }; /** - * Clone the selection ready for early translation (before synchronization). + * Update translatedSelection early (before the commit actually occurs) * - * This is so #ve.ce.ContentBranchNode.getRenderedContents can consider the translated + * This is so ve.ce.ContentBranchNode#getRenderedContents can consider the translated * selection for unicorn rendering. - */ -ve.dm.Surface.prototype.onDocumentPreCommit = function () { - this.translatedSelection = this.selection.clone(); -}; - -/** - * Update translatedSelection early (before synchronization) * - * @param {ve.dm.Transaction} tx Transaction that was processed - * @fires documentUpdate + * @param {ve.dm.Transaction} tx Transaction that's about to be committed */ -ve.dm.Surface.prototype.onDocumentPreSynchronize = function ( tx ) { - if ( this.translatedSelection ) { - this.translatedSelection = this.translatedSelection.translateByTransaction( tx ); - } +ve.dm.Surface.prototype.onDocumentPreCommit = function ( tx ) { + this.translatedSelection = this.selection.translateByTransaction( tx ); }; /** diff --git a/src/dm/ve.dm.TransactionProcessor.js b/src/dm/ve.dm.TransactionProcessor.js index e69db14..2c7baef 100644 --- a/src/dm/ve.dm.TransactionProcessor.js +++ b/src/dm/ve.dm.TransactionProcessor.js @@ -81,9 +81,8 @@ * When all operations are done being processed, the document will be synchronized. * * @method - * @param {Function} [presynchronizeHandler] Callback to emit before synchronizing */ -ve.dm.TransactionProcessor.prototype.process = function ( presynchronizeHandler ) { +ve.dm.TransactionProcessor.prototype.process = function () { var op, completed; // First process each operation to gather modifications in the modification queue. @@ -114,9 +113,6 @@ // Synchronize the node tree for the modifications we just made try { completed = false; - if ( presynchronizeHandler ) { -
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove presynchronize, use precommit instead
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335640 ) Change subject: Remove presynchronize, use precommit instead .. Remove presynchronize, use precommit instead The presynchronize event didn't make much sense: it fired after the linear model was updated but before the tree was synchronized, but this property wasn't being used at all. Passing the transaction to the precommit event is sufficient and allows us to remove presynchronize. Change-Id: Iebd9b571fc093dca12787061e2787e3a75cd3969 --- M src/dm/ve.dm.Document.js M src/dm/ve.dm.Surface.js M src/dm/ve.dm.TransactionProcessor.js 3 files changed, 11 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/40/335640/1 diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js index 38efcee..548027a 100644 --- a/src/dm/ve.dm.Document.js +++ b/src/dm/ve.dm.Document.js @@ -89,13 +89,7 @@ /** * @event precommit * Emitted when a transaction is about to be committed. - */ - -/** - * @event presynchronize - * Emitted when a transaction has been applied to the linear model - * but the model tree has not yet been synchronized. - * @param {ve.dm.Transaction} tx Transaction that is about to be synchronized + * @param {ve.dm.Transaction} tx Transaction that is about to be committed */ /** @@ -328,18 +322,16 @@ * @method * @param {ve.dm.Transaction} transaction Transaction to apply * @param {boolean} isStaging Transaction is being applied in staging mode + * @fires precommit * @fires transact * @throws {Error} Cannot commit a transaction that has already been committed */ ve.dm.Document.prototype.commit = function ( transaction, isStaging ) { - var doc = this; if ( transaction.hasBeenApplied() ) { throw new Error( 'Cannot commit a transaction that has already been committed' ); } - this.emit( 'precommit' ); - new ve.dm.TransactionProcessor( this, transaction, isStaging ).process( function () { - doc.emit( 'presynchronize', transaction ); - } ); + this.emit( 'precommit', transaction ); + new ve.dm.TransactionProcessor( this, transaction, isStaging ).process(); this.completeHistory.push( transaction ); this.storeLengthAtHistoryLength[ this.completeHistory.length ] = this.store.getLength(); this.emit( 'transact', transaction ); diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js index aae8cdc..ba06c71 100644 --- a/src/dm/ve.dm.Surface.js +++ b/src/dm/ve.dm.Surface.js @@ -47,8 +47,7 @@ // Events this.getDocument().connect( this, { transact: 'onDocumentTransact', - precommit: 'onDocumentPreCommit', - presynchronize: 'onDocumentPreSynchronize' + precommit: 'onDocumentPreCommit' } ); }; @@ -999,25 +998,15 @@ }; /** - * Clone the selection ready for early translation (before synchronization). + * Update translatedSelection early (before the commit actually occurs) * - * This is so #ve.ce.ContentBranchNode.getRenderedContents can consider the translated + * This is so ve.ce.ContentBranchNode#getRenderedContents can consider the translated * selection for unicorn rendering. - */ -ve.dm.Surface.prototype.onDocumentPreCommit = function () { - this.translatedSelection = this.selection.clone(); -}; - -/** - * Update translatedSelection early (before synchronization) * - * @param {ve.dm.Transaction} tx Transaction that was processed - * @fires documentUpdate + * @param {ve.dm.Transaction} tx Transaction that's about to be committed */ -ve.dm.Surface.prototype.onDocumentPreSynchronize = function ( tx ) { - if ( this.translatedSelection ) { - this.translatedSelection = this.translatedSelection.translateByTransaction( tx ); - } +ve.dm.Surface.prototype.onDocumentPreCommit = function ( tx ) { + this.translatedSelection = this.selection.translateByTransaction( tx ); }; /** diff --git a/src/dm/ve.dm.TransactionProcessor.js b/src/dm/ve.dm.TransactionProcessor.js index e69db14..2c7baef 100644 --- a/src/dm/ve.dm.TransactionProcessor.js +++ b/src/dm/ve.dm.TransactionProcessor.js @@ -81,9 +81,8 @@ * When all operations are done being processed, the document will be synchronized. * * @method - * @param {Function} [presynchronizeHandler] Callback to emit before synchronizing */ -ve.dm.TransactionProcessor.prototype.process = function ( presynchronizeHandler ) { +ve.dm.TransactionProcessor.prototype.process = function () { var op, completed; // First process each operation to gather modifications in the modification queue. @@ -114,9 +113,6 @@ // Synchronize the node tree for the modifications we just made try { completed = false; - if ( presynchronizeHandler ) { -
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove mobile window logic upstreamed to OOUI
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328518 ) Change subject: Remove mobile window logic upstreamed to OOUI .. Remove mobile window logic upstreamed to OOUI Depends on Idc49819cd (likely OOUI 0.18.3). Bug: T126029 Change-Id: I867eb9f2d1864f47fec15118784f938efff44e62 --- M demos/ve/demo.mobile.js M src/ui/windowmanagers/ve.ui.MobileWindowManager.js 2 files changed, 4 insertions(+), 31 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/demos/ve/demo.mobile.js b/demos/ve/demo.mobile.js index 7442165..ad8fae7 100644 --- a/demos/ve/demo.mobile.js +++ b/demos/ve/demo.mobile.js @@ -5,3 +5,7 @@ */ ve.demo.target = ve.init.sa.MobileTarget; + +OO.ui.isMobile = function () { + return true; +}; diff --git a/src/ui/windowmanagers/ve.ui.MobileWindowManager.js b/src/ui/windowmanagers/ve.ui.MobileWindowManager.js index 8e3b65f..18d7468 100644 --- a/src/ui/windowmanagers/ve.ui.MobileWindowManager.js +++ b/src/ui/windowmanagers/ve.ui.MobileWindowManager.js @@ -19,9 +19,6 @@ // Parent constructor ve.ui.MobileWindowManager.super.call( this, surface, config ); - // Events - this.connect( this, { opening: 'onMobileOpening' } ); - // Initialization this.$element.addClass( 've-ui-mobileWindowManager' ); }; @@ -39,31 +36,3 @@ } }; ve.ui.MobileWindowManager.static.defaultSize = 'full'; - -/* Methods */ - -/** - * Handle window opening events - * - * @param {OO.ui.Window} win Window - * @param {jQuery.Promise} opening Opening promise - */ -ve.ui.MobileWindowManager.prototype.onMobileOpening = function ( win, opening ) { - // FIXME T126029: un-frame buttons and convert 'back' buttons to icon only - opening.done( function () { - var i, l, list, action; - if ( win instanceof OO.ui.ProcessDialog ) { - list = win.actions.list; - for ( i = 0, l = list.length; i < l; i++ ) { - action = list[ i ]; - action.toggleFramed( false ); - if ( action.hasFlag( 'back' ) ) { - action - .setIcon( 'previous' ) - .setLabel( '' ); - } - } - win.fitLabel(); - } - } ); -}; -- To view, visit https://gerrit.wikimedia.org/r/328518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I867eb9f2d1864f47fec15118784f938efff44e62 Gerrit-PatchSet: 3 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both u...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/327148 ) Change subject: Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both unused) .. Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both unused) They seem to have been unused since I31991488579b8cce6d98ed8b29b486ba5ec38cdc . Change-Id: I7185bb529827e0163ac4798ca60c3b61781e3c81 --- M src/ve.utils.js M tests/ve.test.js 2 files changed, 0 insertions(+), 107 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/ve.utils.js b/src/ve.utils.js index 52b259d..6c75610 100644 --- a/src/ve.utils.js +++ b/src/ve.utils.js @@ -570,57 +570,6 @@ }() ); /** - * Generate HTML attributes. - * - * NOTE: While the values of attributes are escaped, the names of attributes (i.e. the keys in - * the attributes objects) are NOT ESCAPED. The caller is responsible for making sure these are - * sane tag/attribute names and do not contain unsanitized content from an external source - * (e.g. from the user or from the web). - * - * @param {Object} [attributes] Key-value map of attributes for the tag - * @return {string} HTML attributes - */ -ve.getHtmlAttributes = function ( attributes ) { - var attrName, attrValue, - parts = []; - - if ( !ve.isPlainObject( attributes ) || ve.isEmptyObject( attributes ) ) { - return ''; - } - - for ( attrName in attributes ) { - attrValue = attributes[ attrName ]; - if ( attrValue === true ) { - // Convert name=true to name=name - attrValue = attrName; - } else if ( attrValue === false ) { - // Skip name=false - continue; - } - parts.push( attrName + '="' + ve.escapeHtml( String( attrValue ) ) + '"' ); - } - - return parts.join( ' ' ); -}; - -/** - * Generate an opening HTML tag. - * - * NOTE: While the values of attributes are escaped, the tag name and the names of - * attributes (i.e. the keys in the attributes objects) are NOT ESCAPED. The caller is - * responsible for making sure these are sane tag/attribute names and do not contain - * unsanitized content from an external source (e.g. from the user or from the web). - * - * @param {string} tagName HTML tag name - * @param {Object} [attributes] Key-value map of attributes for the tag - * @return {string} Opening HTML tag - */ -ve.getOpeningHtmlTag = function ( tagName, attributes ) { - var attr = ve.getHtmlAttributes( attributes ); - return '<' + tagName + ( attr ? ' ' + attr : '' ) + '>'; -}; - -/** * Get the attributes of a DOM element as an object with key/value pairs. * * @param {HTMLElement} element diff --git a/tests/ve.test.js b/tests/ve.test.js index 3983ad3..5481fff 100644 --- a/tests/ve.test.js +++ b/tests/ve.test.js @@ -211,62 +211,6 @@ ); } ); -QUnit.test( 'getHtmlAttributes', 7, function ( assert ) { - assert.deepEqual( - ve.getHtmlAttributes(), - '', - 'no attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( NaN + 'px' ), - '', - 'invalid attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( {} ), - '', - 'empty attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( { src: 'foo' } ), - 'src="foo"', - 'one attribute' - ); - assert.deepEqual( - ve.getHtmlAttributes( { href: 'foo', rel: 'bar' } ), - 'href="foo" rel="bar"', - 'two attributes' - ); - assert.deepEqual( - ve.getHtmlAttributes( { selected: true, blah: false, value: 3 } ), - 'selected="selected" value="3"', - 'handling of booleans and numbers' - ); - assert.deepEqual( - ve.getHtmlAttributes( { placeholder: '&"bar"&\'baz\'' } ), - 'placeholder="&"bar"&'baz'"', - 'escaping of attribute values' - ); -} ); - -QUnit.test( 'getOpeningHtmlTag', 3, function ( assert ) { - assert.deepEqual( - ve.getOpeningHtmlTag( 'code', {} ), - '', - 'opening tag without attributes' - ); - assert.deepEqual( - ve.getOpeningHtmlTag( 'img', { src: 'foo' } ), - '', - 'opening tag with one attribute' - ); - assert.deepEqual( - ve.getOpeningHtmlTag( 'a', { href: 'foo', rel: 'bar' } ), - '', - 'tag with two attributes' - ); -} ); - QUnit.test( 'sparseSplice', function ( assert ) { var tests, i, len, test; // Conver
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unit test hack, no longer needed.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/329690 ) Change subject: Remove unit test hack, no longer needed. .. Remove unit test hack, no longer needed. Change-Id: Iff757ba0eac1efb76ce343f334470e8f733f649f --- M src/dm/ve.dm.SurfaceSynchronizer.js 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.SurfaceSynchronizer.js b/src/dm/ve.dm.SurfaceSynchronizer.js index ed6fac7..ddacf20 100644 --- a/src/dm/ve.dm.SurfaceSynchronizer.js +++ b/src/dm/ve.dm.SurfaceSynchronizer.js @@ -35,11 +35,6 @@ // Whether we are currently synchronizing the model this.applying = false; - // HACK: Disable in unit tests - if ( window.QUnit ) { - return; - } - // HACK this.socket = io( ( config.server || '' ) + '/' + this.documentId ); this.socket.on( 'registered', this.onRegistered.bind( this ) ); @@ -197,9 +192,7 @@ this.setAuthor( author ); this.surface.setAuthor( this.author ); // HACK - if ( !window.QUnit ) { - $( '.ve-demo-editor' ).prepend( $( '' ).text( this.author ) ); - } + $( '.ve-demo-editor' ).prepend( $( '' ).text( this.author ) ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/329690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff757ba0eac1efb76ce343f334470e8f733f649f Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove serialization test cheat; make tests actually pass
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/329657 ) Change subject: Remove serialization test cheat; make tests actually pass .. Remove serialization test cheat; make tests actually pass The author of I1eccd4ef99d764911994d11d747f13ae42919eff is clearly a very shady character Change-Id: I69038332adf57ce43edd85930028d337a4946356 --- M tests/dm/ve.dm.Change.test.js 1 file changed, 32 insertions(+), 24 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/dm/ve.dm.Change.test.js b/tests/dm/ve.dm.Change.test.js index ef67971..53e404e 100644 --- a/tests/dm/ve.dm.Change.test.js +++ b/tests/dm/ve.dm.Change.test.js @@ -269,28 +269,34 @@ serialized = { start: 0, transactions: [ - [ - { type: 'retain', length: 1 }, - { - type: 'replace', - remove: [], - insert: [ [ 'f', bIndex ] ], - insertedDataOffset: 0, - insertedDataLength: 1 - }, - { type: 'retain', length: 4 } - ], - [ - { type: 'retain', length: 2 }, - { - type: 'replace', - remove: [], - insert: [ [ 'u', bIndex ] ], - insertedDataOffset: 0, - insertedDataLength: 1 - }, - { type: 'retain', length: 4 } - ] + { + author: null, + operations: [ + { type: 'retain', length: 1 }, + { + type: 'replace', + remove: [], + insert: [ [ 'f', bIndex ] ], + insertedDataOffset: 0, + insertedDataLength: 1 + }, + { type: 'retain', length: 4 } + ] + }, + { + author: null, + operations: [ + { type: 'retain', length: 2 }, + { + type: 'replace', + remove: [], + insert: [ [ 'u', bIndex ] ], + insertedDataOffset: 0, + insertedDataLength: 1 + }, + { type: 'retain', length: 4 } + ] + } ], stores: [ { @@ -305,7 +311,10 @@ }, hashes: bIndex }, - {} + { + hashStore: {}, + hashes: [] + } ], selections: {} }; @@ -313,7 +322,6 @@ // Fixup second insert change.transactions[ 1 ].operations[ 2 ].length += 1; - serialized = change.serialize(); assert.deepEqual( change.serialize(), serialized, 'Serialize' ); assert.deepEqual( -- To view, visit https://gerrit.wikimedia.org/r/329657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69038332adf57ce43edd85930028d337a4946356 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch:
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unit test hack, no longer needed.
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329690 ) Change subject: Remove unit test hack, no longer needed. .. Remove unit test hack, no longer needed. Change-Id: Iff757ba0eac1efb76ce343f334470e8f733f649f --- M src/dm/ve.dm.SurfaceSynchronizer.js 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/90/329690/1 diff --git a/src/dm/ve.dm.SurfaceSynchronizer.js b/src/dm/ve.dm.SurfaceSynchronizer.js index ed6fac7..c391a5d 100644 --- a/src/dm/ve.dm.SurfaceSynchronizer.js +++ b/src/dm/ve.dm.SurfaceSynchronizer.js @@ -35,11 +35,6 @@ // Whether we are currently synchronizing the model this.applying = false; - // HACK: Disable in unit tests - if ( window.QUnit ) { - return; - } - // HACK this.socket = io( ( config.server || '' ) + '/' + this.documentId ); this.socket.on( 'registered', this.onRegistered.bind( this ) ); -- To view, visit https://gerrit.wikimedia.org/r/329690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff757ba0eac1efb76ce343f334470e8f733f649f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove serialization test cheat; make tests actually pass
Divec has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329657 ) Change subject: Remove serialization test cheat; make tests actually pass .. Remove serialization test cheat; make tests actually pass The author of I1eccd4ef99d764911994d11d747f13ae42919eff is clearly a very shady character Change-Id: I69038332adf57ce43edd85930028d337a4946356 --- M tests/dm/ve.dm.Change.test.js 1 file changed, 32 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/57/329657/1 diff --git a/tests/dm/ve.dm.Change.test.js b/tests/dm/ve.dm.Change.test.js index ef67971..53e404e 100644 --- a/tests/dm/ve.dm.Change.test.js +++ b/tests/dm/ve.dm.Change.test.js @@ -269,28 +269,34 @@ serialized = { start: 0, transactions: [ - [ - { type: 'retain', length: 1 }, - { - type: 'replace', - remove: [], - insert: [ [ 'f', bIndex ] ], - insertedDataOffset: 0, - insertedDataLength: 1 - }, - { type: 'retain', length: 4 } - ], - [ - { type: 'retain', length: 2 }, - { - type: 'replace', - remove: [], - insert: [ [ 'u', bIndex ] ], - insertedDataOffset: 0, - insertedDataLength: 1 - }, - { type: 'retain', length: 4 } - ] + { + author: null, + operations: [ + { type: 'retain', length: 1 }, + { + type: 'replace', + remove: [], + insert: [ [ 'f', bIndex ] ], + insertedDataOffset: 0, + insertedDataLength: 1 + }, + { type: 'retain', length: 4 } + ] + }, + { + author: null, + operations: [ + { type: 'retain', length: 2 }, + { + type: 'replace', + remove: [], + insert: [ [ 'u', bIndex ] ], + insertedDataOffset: 0, + insertedDataLength: 1 + }, + { type: 'retain', length: 4 } + ] + } ], stores: [ { @@ -305,7 +311,10 @@ }, hashes: bIndex }, - {} + { + hashStore: {}, + hashes: [] + } ], selections: {} }; @@ -313,7 +322,6 @@ // Fixup second insert change.transactions[ 1 ].operations[ 2 ].length += 1; - serialized = change.serialize(); assert.deepEqual( change.serialize(), serialized, 'Serialize' ); assert.deepEqual( -- To view, visit https://gerrit.wikimedia.org/r/329657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69038332adf57ce43edd85930028d337a4946356 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerr
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove mobile window logic upstreamed to OOUI
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328518 ) Change subject: Remove mobile window logic upstreamed to OOUI .. Remove mobile window logic upstreamed to OOUI Depends on Idc49819cd (likely OOUI 0.18.3). Change-Id: I867eb9f2d1864f47fec15118784f938efff44e62 --- M demos/ve/demo.mobile.js M src/ui/windowmanagers/ve.ui.MobileWindowManager.js 2 files changed, 4 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/18/328518/1 diff --git a/demos/ve/demo.mobile.js b/demos/ve/demo.mobile.js index 83d7ca6..9b63643 100644 --- a/demos/ve/demo.mobile.js +++ b/demos/ve/demo.mobile.js @@ -5,3 +5,7 @@ */ ve.demo.target = ve.init.sa.MobileTarget; + +OO.ui.isMobile = function () { + return true; +}; diff --git a/src/ui/windowmanagers/ve.ui.MobileWindowManager.js b/src/ui/windowmanagers/ve.ui.MobileWindowManager.js index 03a420b..ed25fc5 100644 --- a/src/ui/windowmanagers/ve.ui.MobileWindowManager.js +++ b/src/ui/windowmanagers/ve.ui.MobileWindowManager.js @@ -19,9 +19,6 @@ // Parent constructor ve.ui.MobileWindowManager.super.call( this, surface, config ); - // Events - this.connect( this, { opening: 'onMobileOpening' } ); - // Initialization this.$element.addClass( 've-ui-mobileWindowManager' ); }; @@ -39,31 +36,3 @@ } }; ve.ui.MobileWindowManager.static.defaultSize = 'full'; - -/* Methods */ - -/** - * Handle window opening events - * - * @param {OO.ui.Window} win Window - * @param {jQuery.Promise} opening Opening promise - */ -ve.ui.MobileWindowManager.prototype.onMobileOpening = function ( win, opening ) { - // FIXME T126029: un-frame buttons and convert 'back' buttons to icon only - opening.done( function () { - var i, l, list, action; - if ( win instanceof OO.ui.ProcessDialog ) { - list = win.actions.list; - for ( i = 0, l = list.length; i < l; i++ ) { - action = list[ i ]; - action.toggleFramed( false ); - if ( action.hasFlag( 'back' ) ) { - action - .setIcon( 'previous' ) - .setLabel( '' ); - } - } - win.fitLabel(); - } - } ); -}; -- To view, visit https://gerrit.wikimedia.org/r/328518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I867eb9f2d1864f47fec15118784f938efff44e62 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both u...
Divec has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/327148 ) Change subject: Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both unused) .. Remove ve.getHtmlAttributes and ve.getOpeningHtmlTag (both unused) They seem to have been unused since I31991488579b8cce6d98ed8b29b486ba5ec38cdc . Change-Id: I7185bb529827e0163ac4798ca60c3b61781e3c81 --- M src/ve.utils.js M tests/ve.test.js 2 files changed, 0 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/48/327148/1 diff --git a/src/ve.utils.js b/src/ve.utils.js index 52b259d..6c75610 100644 --- a/src/ve.utils.js +++ b/src/ve.utils.js @@ -570,57 +570,6 @@ }() ); /** - * Generate HTML attributes. - * - * NOTE: While the values of attributes are escaped, the names of attributes (i.e. the keys in - * the attributes objects) are NOT ESCAPED. The caller is responsible for making sure these are - * sane tag/attribute names and do not contain unsanitized content from an external source - * (e.g. from the user or from the web). - * - * @param {Object} [attributes] Key-value map of attributes for the tag - * @return {string} HTML attributes - */ -ve.getHtmlAttributes = function ( attributes ) { - var attrName, attrValue, - parts = []; - - if ( !ve.isPlainObject( attributes ) || ve.isEmptyObject( attributes ) ) { - return ''; - } - - for ( attrName in attributes ) { - attrValue = attributes[ attrName ]; - if ( attrValue === true ) { - // Convert name=true to name=name - attrValue = attrName; - } else if ( attrValue === false ) { - // Skip name=false - continue; - } - parts.push( attrName + '="' + ve.escapeHtml( String( attrValue ) ) + '"' ); - } - - return parts.join( ' ' ); -}; - -/** - * Generate an opening HTML tag. - * - * NOTE: While the values of attributes are escaped, the tag name and the names of - * attributes (i.e. the keys in the attributes objects) are NOT ESCAPED. The caller is - * responsible for making sure these are sane tag/attribute names and do not contain - * unsanitized content from an external source (e.g. from the user or from the web). - * - * @param {string} tagName HTML tag name - * @param {Object} [attributes] Key-value map of attributes for the tag - * @return {string} Opening HTML tag - */ -ve.getOpeningHtmlTag = function ( tagName, attributes ) { - var attr = ve.getHtmlAttributes( attributes ); - return '<' + tagName + ( attr ? ' ' + attr : '' ) + '>'; -}; - -/** * Get the attributes of a DOM element as an object with key/value pairs. * * @param {HTMLElement} element diff --git a/tests/ve.test.js b/tests/ve.test.js index 3983ad3..5481fff 100644 --- a/tests/ve.test.js +++ b/tests/ve.test.js @@ -211,62 +211,6 @@ ); } ); -QUnit.test( 'getHtmlAttributes', 7, function ( assert ) { - assert.deepEqual( - ve.getHtmlAttributes(), - '', - 'no attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( NaN + 'px' ), - '', - 'invalid attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( {} ), - '', - 'empty attributes argument' - ); - assert.deepEqual( - ve.getHtmlAttributes( { src: 'foo' } ), - 'src="foo"', - 'one attribute' - ); - assert.deepEqual( - ve.getHtmlAttributes( { href: 'foo', rel: 'bar' } ), - 'href="foo" rel="bar"', - 'two attributes' - ); - assert.deepEqual( - ve.getHtmlAttributes( { selected: true, blah: false, value: 3 } ), - 'selected="selected" value="3"', - 'handling of booleans and numbers' - ); - assert.deepEqual( - ve.getHtmlAttributes( { placeholder: '&"bar"&\'baz\'' } ), - 'placeholder="&"bar"&'baz'"', - 'escaping of attribute values' - ); -} ); - -QUnit.test( 'getOpeningHtmlTag', 3, function ( assert ) { - assert.deepEqual( - ve.getOpeningHtmlTag( 'code', {} ), - '', - 'opening tag without attributes' - ); - assert.deepEqual( - ve.getOpeningHtmlTag( 'img', { src: 'foo' } ), - '', - 'opening tag with one attribute' - ); - assert.deepEqual( - ve.getOpeningHtmlTag( 'a', { href: 'foo', rel: 'bar' } ), - '', - 'tag with two attributes' - ); -} ); - QUnit.test( 'sparseSplice', function ( assert ) { var tests, i, len, test; // C
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unnecessary double-negation cast in if()
jenkins-bot has submitted this change and it was merged. Change subject: Remove unnecessary double-negation cast in if() .. Remove unnecessary double-negation cast in if() if() expressions are automatically cast to booleans. This is required to pass eslint:recommended. Change-Id: I19644cb7f7dc8246d88016a3a2ec0e2b621361da --- M src/dm/ve.dm.Scalable.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.Scalable.js b/src/dm/ve.dm.Scalable.js index ed000ae..4aa69fc 100644 --- a/src/dm/ve.dm.Scalable.js +++ b/src/dm/ve.dm.Scalable.js @@ -55,7 +55,7 @@ if ( config.defaultDimensions ) { this.setDefaultDimensions( config.defaultDimensions ); } - if ( !!config.isDefault ) { + if ( config.isDefault ) { this.toggleDefault( !!config.isDefault ); } if ( config.minDimensions ) { -- To view, visit https://gerrit.wikimedia.org/r/320399 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19644cb7f7dc8246d88016a3a2ec0e2b621361da Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unnecessary double-negation cast in if()
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/320399 Change subject: Remove unnecessary double-negation cast in if() .. Remove unnecessary double-negation cast in if() if() expressions are automatically cast to booleans. This is required to pass eslint:recommended. Change-Id: I19644cb7f7dc8246d88016a3a2ec0e2b621361da --- M src/dm/ve.dm.Scalable.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/99/320399/1 diff --git a/src/dm/ve.dm.Scalable.js b/src/dm/ve.dm.Scalable.js index ed000ae..4aa69fc 100644 --- a/src/dm/ve.dm.Scalable.js +++ b/src/dm/ve.dm.Scalable.js @@ -55,7 +55,7 @@ if ( config.defaultDimensions ) { this.setDefaultDimensions( config.defaultDimensions ); } - if ( !!config.isDefault ) { + if ( config.isDefault ) { this.toggleDefault( !!config.isDefault ); } if ( config.minDimensions ) { -- To view, visit https://gerrit.wikimedia.org/r/320399 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19644cb7f7dc8246d88016a3a2ec0e2b621361da Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused eslint exceptions and old jshint comments
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused eslint exceptions and old jshint comments .. Remove unused eslint exceptions and old jshint comments Change-Id: I5140c7b1f949b9660b469d8add08c4235d32c460 --- M src/ui/actions/ve.ui.TableAction.js M src/ui/dialogs/ve.ui.ProgressDialog.js M src/ui/ve.ui.DebugBar.js M tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js 4 files changed, 0 insertions(+), 4 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/actions/ve.ui.TableAction.js b/src/ui/actions/ve.ui.TableAction.js index 68b711f..b764a4c 100644 --- a/src/ui/actions/ve.ui.TableAction.js +++ b/src/ui/actions/ve.ui.TableAction.js @@ -855,7 +855,6 @@ rowData.splice( 1, rowData.length - 2 ); removedMatrix[ row - minIndex ] = { row: rowData, - // eslint-disable-next-line no-loop-func cells: cells.map( function ( cell ) { if ( cell && !cell.isPlaceholder() ) { cell.data = documentModel.getData( cell.node.getOuterRange(), true ); diff --git a/src/ui/dialogs/ve.ui.ProgressDialog.js b/src/ui/dialogs/ve.ui.ProgressDialog.js index 467a812..ba5cc7b 100644 --- a/src/ui/dialogs/ve.ui.ProgressDialog.js +++ b/src/ui/dialogs/ve.ui.ProgressDialog.js @@ -94,7 +94,6 @@ this.text.$element.append( $row ); progresses[ i ].progressBarDeferred.resolve( progressBar, cancelDeferred.promise() ); - /* jshint loopfunc:true (awaiting eslint replacement; T149264) */ progresses[ i ].progressCompletePromise.then( this.progressComplete.bind( this, $row, false ), this.progressComplete.bind( this, $row, true ) diff --git a/src/ui/ve.ui.DebugBar.js b/src/ui/ve.ui.DebugBar.js index 12c391f..743772f 100644 --- a/src/ui/ve.ui.DebugBar.js +++ b/src/ui/ve.ui.DebugBar.js @@ -211,7 +211,6 @@ $label.html( ( text.match( /\S/ ) ? text : ' ' ) + ' ' ); if ( annotations ) { $label.append( - // eslint-disable-next-line no-loop-func $( '' ).text( '[' + this.getSurface().getModel().getDocument().getStore().values( annotations ).map( function ( ann ) { return JSON.stringify( ann.getComparableObject() ); diff --git a/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js b/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js index 9ad77ca..ed3f372 100644 --- a/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js +++ b/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js @@ -86,7 +86,6 @@ dialog.matchCaseToggle.setValue( !!cases[ i ].matchCase ); dialog.regexToggle.setValue( !!cases[ i ].regex ); dialog.findText.setValue( cases[ i ].find ); - /* jshint loopfunc:true */ ranges = dialog.fragments.map( function ( fragment ) { return fragment.getSelection().getRange(); } ); -- To view, visit https://gerrit.wikimedia.org/r/319312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5140c7b1f949b9660b469d8add08c4235d32c460 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove unused eslint exceptions and old jshint comments
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/319312 Change subject: Remove unused eslint exceptions and old jshint comments .. Remove unused eslint exceptions and old jshint comments Change-Id: I5140c7b1f949b9660b469d8add08c4235d32c460 --- M src/ui/actions/ve.ui.TableAction.js M src/ui/dialogs/ve.ui.ProgressDialog.js M src/ui/ve.ui.DebugBar.js M tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js 4 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/12/319312/1 diff --git a/src/ui/actions/ve.ui.TableAction.js b/src/ui/actions/ve.ui.TableAction.js index 68b711f..b764a4c 100644 --- a/src/ui/actions/ve.ui.TableAction.js +++ b/src/ui/actions/ve.ui.TableAction.js @@ -855,7 +855,6 @@ rowData.splice( 1, rowData.length - 2 ); removedMatrix[ row - minIndex ] = { row: rowData, - // eslint-disable-next-line no-loop-func cells: cells.map( function ( cell ) { if ( cell && !cell.isPlaceholder() ) { cell.data = documentModel.getData( cell.node.getOuterRange(), true ); diff --git a/src/ui/dialogs/ve.ui.ProgressDialog.js b/src/ui/dialogs/ve.ui.ProgressDialog.js index 467a812..ba5cc7b 100644 --- a/src/ui/dialogs/ve.ui.ProgressDialog.js +++ b/src/ui/dialogs/ve.ui.ProgressDialog.js @@ -94,7 +94,6 @@ this.text.$element.append( $row ); progresses[ i ].progressBarDeferred.resolve( progressBar, cancelDeferred.promise() ); - /* jshint loopfunc:true (awaiting eslint replacement; T149264) */ progresses[ i ].progressCompletePromise.then( this.progressComplete.bind( this, $row, false ), this.progressComplete.bind( this, $row, true ) diff --git a/src/ui/ve.ui.DebugBar.js b/src/ui/ve.ui.DebugBar.js index 12c391f..743772f 100644 --- a/src/ui/ve.ui.DebugBar.js +++ b/src/ui/ve.ui.DebugBar.js @@ -211,7 +211,6 @@ $label.html( ( text.match( /\S/ ) ? text : ' ' ) + ' ' ); if ( annotations ) { $label.append( - // eslint-disable-next-line no-loop-func $( '' ).text( '[' + this.getSurface().getModel().getDocument().getStore().values( annotations ).map( function ( ann ) { return JSON.stringify( ann.getComparableObject() ); diff --git a/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js b/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js index 9ad77ca..ed3f372 100644 --- a/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js +++ b/tests/ui/dialogs/ve.ui.FindAndReplaceDialog.test.js @@ -86,7 +86,6 @@ dialog.matchCaseToggle.setValue( !!cases[ i ].matchCase ); dialog.regexToggle.setValue( !!cases[ i ].regex ); dialog.findText.setValue( cases[ i ].find ); - /* jshint loopfunc:true */ ranges = dialog.fragments.map( function ( fragment ) { return fragment.getSelection().getRange(); } ); -- To view, visit https://gerrit.wikimedia.org/r/319312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5140c7b1f949b9660b469d8add08c4235d32c460 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove #rebuildTree calls and ensure #getDocumentNode is used
jenkins-bot has submitted this change and it was merged. Change subject: Remove #rebuildTree calls and ensure #getDocumentNode is used .. Remove #rebuildTree calls and ensure #getDocumentNode is used Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8 --- M demos/ve/ve.demo.SurfaceContainer.js M src/dm/ve.dm.VisualDiff.js M src/ui/elements/ve.ui.DiffElement.js 3 files changed, 4 insertions(+), 10 deletions(-) Approvals: Tchanders: Looks good to me, approved jenkins-bot: Verified diff --git a/demos/ve/ve.demo.SurfaceContainer.js b/demos/ve/ve.demo.SurfaceContainer.js index 251be23..1ba1f68 100644 --- a/demos/ve/ve.demo.SurfaceContainer.js +++ b/demos/ve/ve.demo.SurfaceContainer.js @@ -83,7 +83,6 @@ diffButton.on( 'click', function () { var windowManager = new OO.ui.WindowManager( { factory: ve.ui.windowFactory } ); $( 'body' ).append( windowManager.$element ); - container.target.oldDoc.rebuildTree(); windowManager.openWindow( 'diff' ); } ); @@ -290,7 +289,6 @@ dmDoc = this.surface.getModel().getDocument(); this.target.oldDoc = dmDoc.cloneFromRange( new ve.Range( 0, dmDoc.data.getLength() ) ); - // rebuildTree is called when getDiff is run this.$surfaceWrapper.empty().append( this.surface.$element.parent() ) .hide().slideDown().promise().done( function () { diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js index 7368e1c..611e7eb 100644 --- a/src/dm/ve.dm.VisualDiff.js +++ b/src/dm/ve.dm.VisualDiff.js @@ -21,10 +21,8 @@ this.oldDoc = oldDoc.cloneFromRange(); this.newDoc = newDoc.cloneFromRange(); - this.oldDoc.rebuildTree(); - this.newDoc.rebuildTree(); - this.oldDocNode = oldDoc.documentNode; - this.newDocNode = newDoc.documentNode; + this.oldDocNode = oldDoc.getDocumentNode(); + this.newDocNode = newDoc.getDocumentNode(); this.oldDocChildren = this.oldDocNode.children; this.newDocChildren = this.newDocNode.children; this.treeDiffer = treeDiffer; diff --git a/src/ui/elements/ve.ui.DiffElement.js b/src/ui/elements/ve.ui.DiffElement.js index 7ccd650..cb88dee 100644 --- a/src/ui/elements/ve.ui.DiffElement.js +++ b/src/ui/elements/ve.ui.DiffElement.js @@ -28,10 +28,8 @@ // Documents this.oldDoc = visualDiff.oldDoc; this.newDoc = visualDiff.newDoc; - this.oldDoc.rebuildTree(); - this.newDoc.rebuildTree(); - this.oldDocChildren = this.oldDoc.documentNode.children; - this.newDocChildren = this.newDoc.documentNode.children; + this.oldDocChildren = this.oldDoc.getDocumentNode().children; + this.newDocChildren = this.newDoc.getDocumentNode().children; // Diff this.oldToNew = diff.docChildrenOldToNew; -- To view, visit https://gerrit.wikimedia.org/r/318788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Tchanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove #rebuildTree calls and ensure #getDocumentNode is used
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318788 Change subject: Remove #rebuildTree calls and ensure #getDocumentNode is used .. Remove #rebuildTree calls and ensure #getDocumentNode is used Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8 --- M demos/ve/ve.demo.SurfaceContainer.js M src/dm/ve.dm.VisualDiff.js M src/ui/elements/ve.ui.DiffElement.js 3 files changed, 4 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/88/318788/1 diff --git a/demos/ve/ve.demo.SurfaceContainer.js b/demos/ve/ve.demo.SurfaceContainer.js index 251be23..1ba1f68 100644 --- a/demos/ve/ve.demo.SurfaceContainer.js +++ b/demos/ve/ve.demo.SurfaceContainer.js @@ -83,7 +83,6 @@ diffButton.on( 'click', function () { var windowManager = new OO.ui.WindowManager( { factory: ve.ui.windowFactory } ); $( 'body' ).append( windowManager.$element ); - container.target.oldDoc.rebuildTree(); windowManager.openWindow( 'diff' ); } ); @@ -290,7 +289,6 @@ dmDoc = this.surface.getModel().getDocument(); this.target.oldDoc = dmDoc.cloneFromRange( new ve.Range( 0, dmDoc.data.getLength() ) ); - // rebuildTree is called when getDiff is run this.$surfaceWrapper.empty().append( this.surface.$element.parent() ) .hide().slideDown().promise().done( function () { diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js index 7368e1c..611e7eb 100644 --- a/src/dm/ve.dm.VisualDiff.js +++ b/src/dm/ve.dm.VisualDiff.js @@ -21,10 +21,8 @@ this.oldDoc = oldDoc.cloneFromRange(); this.newDoc = newDoc.cloneFromRange(); - this.oldDoc.rebuildTree(); - this.newDoc.rebuildTree(); - this.oldDocNode = oldDoc.documentNode; - this.newDocNode = newDoc.documentNode; + this.oldDocNode = oldDoc.getDocumentNode(); + this.newDocNode = newDoc.getDocumentNode(); this.oldDocChildren = this.oldDocNode.children; this.newDocChildren = this.newDocNode.children; this.treeDiffer = treeDiffer; diff --git a/src/ui/elements/ve.ui.DiffElement.js b/src/ui/elements/ve.ui.DiffElement.js index 7ccd650..cb88dee 100644 --- a/src/ui/elements/ve.ui.DiffElement.js +++ b/src/ui/elements/ve.ui.DiffElement.js @@ -28,10 +28,8 @@ // Documents this.oldDoc = visualDiff.oldDoc; this.newDoc = visualDiff.newDoc; - this.oldDoc.rebuildTree(); - this.newDoc.rebuildTree(); - this.oldDocChildren = this.oldDoc.documentNode.children; - this.newDocChildren = this.newDoc.documentNode.children; + this.oldDocChildren = this.oldDoc.getDocumentNode().children; + this.newDocChildren = this.newDoc.getDocumentNode().children; // Diff this.oldToNew = diff.docChildrenOldToNew; -- To view, visit https://gerrit.wikimedia.org/r/318788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove rules which have been moved upstream
jenkins-bot has submitted this change and it was merged. Change subject: Remove rules which have been moved upstream .. Remove rules which have been moved upstream Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4 --- M .eslintrc.json M Gruntfile.js 2 files changed, 2 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json index 10222e1..d9b251f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,8 +15,6 @@ }, "rules": { "dot-notation": 0, - "wrap-iife": 0, - "no-console": "error", - "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }] + "wrap-iife": 0 } } diff --git a/Gruntfile.js b/Gruntfile.js index aec1229..4e5e86b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,6 +5,7 @@ */ /* eslint-env node */ + module.exports = function ( grunt ) { var modules = grunt.file.readJSON( 'build/modules.json' ), moduleUtils = require( './build/moduleUtils' ), -- To view, visit https://gerrit.wikimedia.org/r/318578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4 Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove rules which have been moved upstream
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318578 Change subject: Remove rules which have been moved upstream .. Remove rules which have been moved upstream Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4 --- M .eslintrc.json M Gruntfile.js 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/78/318578/1 diff --git a/.eslintrc.json b/.eslintrc.json index 10222e1..d9b251f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,8 +15,6 @@ }, "rules": { "dot-notation": 0, - "wrap-iife": 0, - "no-console": "error", - "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }] + "wrap-iife": 0 } } diff --git a/Gruntfile.js b/Gruntfile.js index aec1229..4e5e86b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,6 +5,7 @@ */ /* eslint-env node */ + module.exports = function ( grunt ) { var modules = grunt.file.readJSON( 'build/modules.json' ), moduleUtils = require( './build/moduleUtils' ), -- To view, visit https://gerrit.wikimedia.org/r/318578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs binary space rule
jenkins-bot has submitted this change and it was merged. Change subject: Remove comment about jscs binary space rule .. Remove comment about jscs binary space rule This is correctly enforced in eslint. Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6 --- M tests/ve.test.js 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ve.test.js b/tests/ve.test.js index f62534e..366017a 100644 --- a/tests/ve.test.js +++ b/tests/ve.test.js @@ -297,7 +297,6 @@ } tests = [ /* jshint elision:true (awaiting eslint replacement; T149262) */ - // jscs:disable disallowSpaceBeforeBinaryOperators (awaiting eslint replacement; T149263) // arr, offset, remove, data, expectedReturn, expectedArray, msg [ [], 0, 0, [ , 3 ], [], [ , 3 ], 'insert empty, leading hole' ], [ [], 0, 0, [ 1, , 3 ], [], [ 1, , 3 ], 'insert empty, middle hole' ], @@ -318,7 +317,6 @@ [ [ 4, , 5, , 6 ], 0, 3, [ 1, , 3 ], [ 4, , 5 ], [ 1, , 3, , 6 ], 'diff=0 start' ], [ [ 4, , 5, , 6 ], 1, 3, [ 1, , 3 ], [ , 5, , ], [ 4, 1, , 3, 6 ], 'diff=0 mid' ], [ [ 4, , 5, , 6 ], 2, 3, [ 1, , 3 ], [ 5, , 6 ], [ 4, , 1, , 3 ], 'diff=0 end' ] - // jscs:enable disallowSpaceBeforeBinaryOperators /* jshint elision:false */ ]; QUnit.expect( 2 * tests.length + 1 ); -- To view, visit https://gerrit.wikimedia.org/r/318482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs empty blocks rule
jenkins-bot has submitted this change and it was merged. Change subject: Remove comment about jscs empty blocks rule .. Remove comment about jscs empty blocks rule We do have an eslint rule, it just allows blocks with comments. Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977 --- M src/ce/ve.ce.TextState.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index dbc8d42..dee3553 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -69,7 +69,6 @@ // If appropriate, step into first child and loop // If no next sibling, step out until there is (breaking if we leave element) // Step to next sibling and loop - // jscs:disable disallowEmptyBlocks (awaiting eslint replacement; T149266) if ( node.nodeType === Node.TEXT_NODE ) { add( node.data.replace( /\u00A0/g, ' ' ) ); } else if ( -- To view, visit https://gerrit.wikimedia.org/r/318481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove jshint comment, no rule required
jenkins-bot has submitted this change and it was merged. Change subject: Remove jshint comment, no rule required .. Remove jshint comment, no rule required Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d --- M src/ce/ve.ce.Surface.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index 4aeab2e..9530472 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -1870,7 +1870,6 @@ * @return {boolean} False if the event is cancelled */ ve.ce.Surface.prototype.afterPaste = function () { - // jshint unused:false (awaiting eslint replacement; T149267) var clipboardKey, clipboardHash, $elements, pasteData, slice, internalListRange, data, pastedDocumentModel, htmlDoc, $body, $images, i, -- To view, visit https://gerrit.wikimedia.org/r/318480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs binary space rule
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318482 Change subject: Remove comment about jscs binary space rule .. Remove comment about jscs binary space rule This is correctly enforced in eslint. Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6 --- M tests/ve.test.js 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/82/318482/1 diff --git a/tests/ve.test.js b/tests/ve.test.js index f62534e..366017a 100644 --- a/tests/ve.test.js +++ b/tests/ve.test.js @@ -297,7 +297,6 @@ } tests = [ /* jshint elision:true (awaiting eslint replacement; T149262) */ - // jscs:disable disallowSpaceBeforeBinaryOperators (awaiting eslint replacement; T149263) // arr, offset, remove, data, expectedReturn, expectedArray, msg [ [], 0, 0, [ , 3 ], [], [ , 3 ], 'insert empty, leading hole' ], [ [], 0, 0, [ 1, , 3 ], [], [ 1, , 3 ], 'insert empty, middle hole' ], @@ -318,7 +317,6 @@ [ [ 4, , 5, , 6 ], 0, 3, [ 1, , 3 ], [ 4, , 5 ], [ 1, , 3, , 6 ], 'diff=0 start' ], [ [ 4, , 5, , 6 ], 1, 3, [ 1, , 3 ], [ , 5, , ], [ 4, 1, , 3, 6 ], 'diff=0 mid' ], [ [ 4, , 5, , 6 ], 2, 3, [ 1, , 3 ], [ 5, , 6 ], [ 4, , 1, , 3 ], 'diff=0 end' ] - // jscs:enable disallowSpaceBeforeBinaryOperators /* jshint elision:false */ ]; QUnit.expect( 2 * tests.length + 1 ); -- To view, visit https://gerrit.wikimedia.org/r/318482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs empty blocks rule
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318481 Change subject: Remove comment about jscs empty blocks rule .. Remove comment about jscs empty blocks rule We do have an eslint rule, it just allows blocks with comments. Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977 --- M src/ce/ve.ce.TextState.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/81/318481/1 diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index dbc8d42..dee3553 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -69,7 +69,6 @@ // If appropriate, step into first child and loop // If no next sibling, step out until there is (breaking if we leave element) // Step to next sibling and loop - // jscs:disable disallowEmptyBlocks (awaiting eslint replacement; T149266) if ( node.nodeType === Node.TEXT_NODE ) { add( node.data.replace( /\u00A0/g, ' ' ) ); } else if ( -- To view, visit https://gerrit.wikimedia.org/r/318481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove jshint comment, no rule required
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318480 Change subject: Remove jshint comment, no rule required .. Remove jshint comment, no rule required Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d --- M src/ce/ve.ce.Surface.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/80/318480/1 diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index 4aeab2e..9530472 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -1870,7 +1870,6 @@ * @return {boolean} False if the event is cancelled */ ve.ce.Surface.prototype.afterPaste = function () { - // jshint unused:false (awaiting eslint replacement; T149267) var clipboardKey, clipboardHash, $elements, pasteData, slice, internalListRange, data, pastedDocumentModel, htmlDoc, $body, $images, i, -- To view, visit https://gerrit.wikimedia.org/r/318480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove items from DTH factory indexes when unregistering
jenkins-bot has submitted this change and it was merged. Change subject: Remove items from DTH factory indexes when unregistering .. Remove items from DTH factory indexes when unregistering Bug: T143954 Change-Id: I4a5a5de4dbd234f752f0111b086f2e63dec43ba2 --- M src/ui/ve.ui.DataTransferHandlerFactory.js 1 file changed, 50 insertions(+), 12 deletions(-) Approvals: DLynch: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/src/ui/ve.ui.DataTransferHandlerFactory.js b/src/ui/ve.ui.DataTransferHandlerFactory.js index 1b649e4..a64302b 100644 --- a/src/ui/ve.ui.DataTransferHandlerFactory.js +++ b/src/ui/ve.ui.DataTransferHandlerFactory.js @@ -33,14 +33,33 @@ * @inheritdoc */ ve.ui.DataTransferHandlerFactory.prototype.register = function ( constructor ) { - var i, j, ilen, jlen, kinds, types, extensions; - // Parent method - ve.ui.DataTransferHandlerFactory.super.prototype.register.call( this, constructor ); + ve.ui.DataTransferHandlerFactory.super.prototype.register.apply( this, arguments ); - kinds = constructor.static.kinds; - types = constructor.static.types; - extensions = constructor.static.extensions; + this.updateIndexes( constructor, true ); +}; + +/** + * @inheritdoc + */ +ve.ui.DataTransferHandlerFactory.prototype.unregister = function ( constructor ) { + // Parent method + ve.ui.DataTransferHandlerFactory.super.prototype.unregister.apply( this, arguments ); + + this.updateIndexes( constructor, false ); +}; + +/** + * Update indexes used for handler loopup + * + * @param {Function} constructor Handler's constructor to insert/remove + * @param {boolean} insert Insert the handler into the indexes, remove otherwise + */ +ve.ui.DataTransferHandlerFactory.prototype.updateIndexes = function ( constructor, insert ) { + var i, j, ilen, jlen, + kinds = constructor.static.kinds, + types = constructor.static.types, + extensions = constructor.static.extensions; function ensureArray( obj, prop ) { if ( obj[ prop ] === undefined ) { @@ -56,23 +75,42 @@ return obj[ prop ]; } + function remove( arr, item ) { + var index; + if ( ( index = arr.indexOf( item ) ) !== -1 ) { + arr.splice( index, 1 ); + } + } + if ( !kinds ) { for ( j = 0, jlen = types.length; j < jlen; j++ ) { - ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByType[ types[ j ] ], constructor.static.name ); + } } } else { for ( i = 0, ilen = kinds.length; i < ilen; i++ ) { for ( j = 0, jlen = types.length; j < jlen; j++ ) { - ensureArray( - ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ), - types[ j ] - ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( + ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ), + types[ j ] + ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByKindAndType[ kinds[ i ] ][ types[ j ] ], constructor.static.name ); + } } } } if ( constructor.prototype instanceof ve.ui.FileTransferHandler ) { for ( i = 0, ilen = extensions.length; i < ilen; i++ ) { - ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByExtension[ extensions[ i ] ], constructor.static.name ); + } } } }; -- To view, visit https://gerrit.wikimedia.org/r/306967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a5a5de4dbd234f752f0111b086f2e63dec43ba2 Gerrit-PatchSet:
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove items from DTH factory caches when unregistering
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/306967 Change subject: Remove items from DTH factory caches when unregistering .. Remove items from DTH factory caches when unregistering Bug: T143954 Change-Id: I4a5a5de4dbd234f752f0111b086f2e63dec43ba2 --- M src/ui/ve.ui.DataTransferHandlerFactory.js 1 file changed, 47 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/67/306967/1 diff --git a/src/ui/ve.ui.DataTransferHandlerFactory.js b/src/ui/ve.ui.DataTransferHandlerFactory.js index 1b649e4..d4116db 100644 --- a/src/ui/ve.ui.DataTransferHandlerFactory.js +++ b/src/ui/ve.ui.DataTransferHandlerFactory.js @@ -33,14 +33,30 @@ * @inheritdoc */ ve.ui.DataTransferHandlerFactory.prototype.register = function ( constructor ) { - var i, j, ilen, jlen, kinds, types, extensions; - // Parent method - ve.ui.DataTransferHandlerFactory.super.prototype.register.call( this, constructor ); + ve.ui.DataTransferHandlerFactory.super.prototype.register.apply( this, arguments ); - kinds = constructor.static.kinds; - types = constructor.static.types; - extensions = constructor.static.extensions; + this.updateIndexes( constructor, true ); +}; + +/** + * @inheritdoc + */ +ve.ui.DataTransferHandlerFactory.prototype.unregister = function ( constructor ) { + // Parent method + ve.ui.DataTransferHandlerFactory.super.prototype.unregister.apply( this, arguments ); + + this.updateIndexes( constructor, false ); +}; + +/** + * @inheritdoc + */ +ve.ui.DataTransferHandlerFactory.prototype.updateIndexes = function ( constructor, insert ) { + var i, j, ilen, jlen, + kinds = constructor.static.kinds, + types = constructor.static.types, + extensions = constructor.static.extensions; function ensureArray( obj, prop ) { if ( obj[ prop ] === undefined ) { @@ -56,23 +72,42 @@ return obj[ prop ]; } + function remove( arr, item ) { + var index; + if ( ( index = arr.indexOf( item ) ) !== -1 ) { + arr.splice( index, 1 ); + } + } + if ( !kinds ) { for ( j = 0, jlen = types.length; j < jlen; j++ ) { - ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByType[ types[ j ] ], constructor.static.name ); + } } } else { for ( i = 0, ilen = kinds.length; i < ilen; i++ ) { for ( j = 0, jlen = types.length; j < jlen; j++ ) { - ensureArray( - ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ), - types[ j ] - ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( + ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ), + types[ j ] + ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByKindAndType[ kinds[ i ] ][ types[ j ] ], constructor.static.name ); + } } } } if ( constructor.prototype instanceof ve.ui.FileTransferHandler ) { for ( i = 0, ilen = extensions.length; i < ilen; i++ ) { - ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name ); + if ( insert ) { + ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name ); + } else { + remove( this.handlerNamesByExtension[ extensions[ i ] ], constructor.static.name ); + } } } }; -- To view, visit https://gerrit.wikimedia.org/r/306967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a5a5de4dbd234f752f0111b086f2e63dec43ba2 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.w
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove duplicate properties defined in mixin ve.Node
jenkins-bot has submitted this change and it was merged. Change subject: Remove duplicate properties defined in mixin ve.Node .. Remove duplicate properties defined in mixin ve.Node Change-Id: I6bb3017b6b27e7f5ee4bf1423c3780b761c4218c --- M src/ce/ve.ce.Node.js M src/dm/ve.dm.Node.js 2 files changed, 0 insertions(+), 4 deletions(-) Approvals: DLynch: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/ve.ce.Node.js b/src/ce/ve.ce.Node.js index 78bb798..374c564 100644 --- a/src/ce/ve.ce.Node.js +++ b/src/ce/ve.ce.Node.js @@ -21,9 +21,6 @@ // Mixin constructor ve.Node.call( this ); - - // Properties - this.parent = null; }; /* Inheritance */ diff --git a/src/dm/ve.dm.Node.js b/src/dm/ve.dm.Node.js index 004995e..0401dc6 100644 --- a/src/dm/ve.dm.Node.js +++ b/src/dm/ve.dm.Node.js @@ -26,7 +26,6 @@ // Properties this.length = 0; this.element = element; - this.doc = undefined; }; /** -- To view, visit https://gerrit.wikimedia.org/r/304969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bb3017b6b27e7f5ee4bf1423c3780b761c4218c Gerrit-PatchSet: 3 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: DLynch Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove duplicate properties defined in mixin ve.Node
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/304969 Change subject: Remove duplicate properties defined in mixin ve.Node .. Remove duplicate properties defined in mixin ve.Node Change-Id: I6bb3017b6b27e7f5ee4bf1423c3780b761c4218c --- M src/ce/ve.ce.Node.js M src/dm/ve.dm.Node.js 2 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/69/304969/1 diff --git a/src/ce/ve.ce.Node.js b/src/ce/ve.ce.Node.js index 78bb798..374c564 100644 --- a/src/ce/ve.ce.Node.js +++ b/src/ce/ve.ce.Node.js @@ -21,9 +21,6 @@ // Mixin constructor ve.Node.call( this ); - - // Properties - this.parent = null; }; /* Inheritance */ diff --git a/src/dm/ve.dm.Node.js b/src/dm/ve.dm.Node.js index 004995e..0401dc6 100644 --- a/src/dm/ve.dm.Node.js +++ b/src/dm/ve.dm.Node.js @@ -26,7 +26,6 @@ // Properties this.length = 0; this.element = element; - this.doc = undefined; }; /** -- To view, visit https://gerrit.wikimedia.org/r/304969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bb3017b6b27e7f5ee4bf1423c3780b761c4218c Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits