Title: [187366] trunk/Source/WebCore
- Revision
- 187366
- Author
- [email protected]
- Date
- 2015-07-24 15:25:52 -0700 (Fri, 24 Jul 2015)
Log Message
[iOS]: Inline video controls are blurry on scaled-down pages on non-retina devices.
https://bugs.webkit.org/show_bug.cgi?id=147272
rdar://problem/21429111
Reviewed by Simon Fraser.
Blurry inline video controls are the result of transform scaling up the content when the page
is zoomed out (page scale > 1).
This patch addresses the blurriness by switching to css zoom when the content is being scaled up.
While transform scale is a paint time operation, css zoom triggers layout and the content is getting
painted on a non-scaled graphics context.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-timeline-container):
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.set pageScaleFactor):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (187365 => 187366)
--- trunk/Source/WebCore/ChangeLog 2015-07-24 22:15:50 UTC (rev 187365)
+++ trunk/Source/WebCore/ChangeLog 2015-07-24 22:25:52 UTC (rev 187366)
@@ -1,3 +1,22 @@
+2015-07-24 Zalan Bujtas <[email protected]>
+
+ [iOS]: Inline video controls are blurry on scaled-down pages on non-retina devices.
+ https://bugs.webkit.org/show_bug.cgi?id=147272
+ rdar://problem/21429111
+
+ Reviewed by Simon Fraser.
+
+ Blurry inline video controls are the result of transform scaling up the content when the page
+ is zoomed out (page scale > 1).
+ This patch addresses the blurriness by switching to css zoom when the content is being scaled up.
+ While transform scale is a paint time operation, css zoom triggers layout and the content is getting
+ painted on a non-scaled graphics context.
+
+ * Modules/mediacontrols/mediaControlsiOS.css:
+ (audio::-webkit-media-controls-timeline-container):
+ * Modules/mediacontrols/mediaControlsiOS.js:
+ (ControllerIOS.prototype.set pageScaleFactor):
+
2015-07-24 Alexey Proskuryakov <[email protected]>
Remove WEBCORE_EXPORT from Page::allowsMediaDocumentInlinePlayback()
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css (187365 => 187366)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-07-24 22:15:50 UTC (rev 187365)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-07-24 22:25:52 UTC (rev 187366)
@@ -478,6 +478,7 @@
position: relative;
padding: 0;
-webkit-order: 2;
+ -webkit-text-size-adjust: auto;
}
audio::-webkit-media-controls-timeline-container {
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (187365 => 187366)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-07-24 22:15:50 UTC (rev 187365)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-07-24 22:25:52 UTC (rev 187366)
@@ -674,12 +674,20 @@
if (this.controls.startPlaybackButton)
this.controls.startPlaybackButton.style.webkitTransform = scaleTransform;
if (this.controls.panel) {
- var bottomAligment = -2 * scaleValue;
- this.controls.panel.style.bottom = bottomAligment + "px";
- this.controls.panel.style.paddingBottom = -(newScaleFactor * bottomAligment) + "px";
- this.controls.panel.style.width = Math.round(newScaleFactor * 100) + "%";
- this.controls.panel.style.webkitTransform = scaleTransform;
-
+ if (scaleValue > 1) {
+ this.controls.panel.style.width = "100%";
+ this.controls.panel.style.zoom = scaleValue;
+ this.controls.panel.style.webkitTransform = "scale(1)";
+ this.controls.timelineBox.style.webkitTextSizeAdjust = (100 * scaleValue) + "%";
+ } else {
+ var bottomAligment = -2 * scaleValue;
+ this.controls.panel.style.bottom = bottomAligment + "px";
+ this.controls.panel.style.paddingBottom = -(newScaleFactor * bottomAligment) + "px";
+ this.controls.panel.style.width = Math.round(newScaleFactor * 100) + "%";
+ this.controls.panel.style.webkitTransform = scaleTransform;
+ this.controls.timelineBox.style.webkitTextSizeAdjust = "auto";
+ this.controls.panel.style.zoom = 1;
+ }
this.controls.panelBackground.style.height = (50 * scaleValue) + "px";
this.setNeedsTimelineMetricsUpdate();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes