Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/chromium-headful/client/src/components/controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@click.stop.prevent="toggleMedia"
/>
</li>
<!--KERNEL
<!--KERNEL
<li>
<div class="volume">
<i
Expand Down
3 changes: 1 addition & 2 deletions images/chromium-headful/client/src/components/menu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<ul>
</ul>
<ul></ul>
</template>

<style lang="scss" scoped>
Expand Down
20 changes: 18 additions & 2 deletions images/chromium-headful/client/src/components/video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
@touchmove.stop.prevent="onTouchHandler"
@touchstart.stop.prevent="onTouchHandler"
@touchend.stop.prevent="onTouchHandler"
@paste.stop.prevent="onPaste"
@focus="onOverlayFocus"
/>
<!-- KERNEL
<!-- KERNEL
<div v-if="!playing && playable" class="player-overlay" @click.stop.prevent="playAndUnmute">
<i class="fas fa-play-circle" />
</div>
Expand Down Expand Up @@ -817,12 +819,26 @@
this.focused = false
}

onPaste() {
if (this.hosting) {
this.syncClipboard()
}
}

onOverlayFocus() {
if (this.hosting) {
this.syncClipboard()
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate methods with identical implementations

Low Severity

onPaste() and onOverlayFocus() are identical methods - both check this.hosting and call this.syncClipboard(). Consider either: (1) binding both @paste and @focus events to a single shared handler, or (2) having one method call the other.

Fix in Cursor Fix in Web


onResize() {
const { offsetWidth, offsetHeight } = !this.fullscreen ? this._component : document.body
this._player.style.width = `${offsetWidth}px`
this._player.style.height = `${offsetHeight}px`
const aspectPreservingMaxWidth = (this.horizontal / this.vertical) * offsetHeight
this._container.style.maxWidth = `${!this.fullscreen ? Math.min(this.width, aspectPreservingMaxWidth) : aspectPreservingMaxWidth}px`
this._container.style.maxWidth = `${
!this.fullscreen ? Math.min(this.width, aspectPreservingMaxWidth) : aspectPreservingMaxWidth
}px`
this._aspect.style.paddingBottom = `${(this.vertical / this.horizontal) * 100}%`
}

Expand Down
Loading