WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190504
[iOS] Allow SPI clients to lay out at arbitrarily scaled sizes and scale to fit the view
https://bugs.webkit.org/show_bug.cgi?id=190504
Summary
[iOS] Allow SPI clients to lay out at arbitrarily scaled sizes and scale to f...
Wenson Hsieh
Reported
2018-10-11 18:50:47 PDT
<
rdar://problem/45117760
>
Attachments
First pass
(45.28 KB, patch)
2018-10-11 20:17 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Fix WPE/GTK builds
(45.84 KB, patch)
2018-10-11 22:40 PDT
,
Wenson Hsieh
thorton
: review+
Details
Formatted Diff
Diff
Patch for EWS
(48.52 KB, patch)
2018-10-12 14:49 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2018-10-11 20:17:08 PDT
Created
attachment 352130
[details]
First pass
Wenson Hsieh
Comment 2
2018-10-11 22:40:28 PDT
Created
attachment 352136
[details]
Fix WPE/GTK builds
Tim Horton
Comment 3
2018-10-12 13:21:24 PDT
Comment on
attachment 352136
[details]
Fix WPE/GTK builds View in context:
https://bugs.webkit.org/attachment.cgi?id=352136&action=review
> Source/WebCore/page/ViewportConfiguration.cpp:434 > + m_configuration.initialScale *= m_layoutSizeScaleFactor;
Hi-larious
> Source/WebCore/page/ViewportConfiguration.cpp:549 > + ts.dumpProperty("initialScaleIgnoringLayoutScaleFactor", parameters.initialScaleIgnoringLayoutScaleFactor);
Probably also print out m_layoutSizeScaleFactor??
> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5166 > if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale)) > [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
Why is this in the !PLATFORM(MAC) section
> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:180 > +@property (nonatomic, setter=_setViewScale:) CGFloat _viewScale WK_API_AVAILABLE(macosx(10.11), ios(9.0));
Whoops
> Tools/ChangeLog:22 > + Add a new file for UIScriptController methods on Cocoa platforms.
Noice. There's some other stuff we can move here.
Wenson Hsieh
Comment 4
2018-10-12 13:44:36 PDT
Comment on
attachment 352136
[details]
Fix WPE/GTK builds View in context:
https://bugs.webkit.org/attachment.cgi?id=352136&action=review
>> Source/WebCore/page/ViewportConfiguration.cpp:549 >> + ts.dumpProperty("initialScaleIgnoringLayoutScaleFactor", parameters.initialScaleIgnoringLayoutScaleFactor); > > Probably also print out m_layoutSizeScaleFactor??
Yes!
>> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5166 >> [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"]; > > Why is this in the !PLATFORM(MAC) section
Can't think of a good reason! Interestingly, WebViewImpl::setViewScale throws this same exception. I'll lift this `+[NSException raise:]` call out of !MAC for now, and move the identical macOS exception throwing logic from WebViewImpl to WKView.
>> Tools/ChangeLog:22 >> + Add a new file for UIScriptController methods on Cocoa platforms. > > Noice. There's some other stuff we can move here.
Indeed! Will move cross-macOS-iOS functionality here in a followup.
> LayoutTests/resources/ui-helper.js:348 > + return new Promise(resolve => testRunner.runUIScript(`uiController.setViewScale(${scale})`, () => resolve()));
Note to self: I should just pass `resolve` here rather than wrapping it in another callback.
Wenson Hsieh
Comment 5
2018-10-12 14:49:04 PDT
Created
attachment 352206
[details]
Patch for EWS
WebKit Commit Bot
Comment 6
2018-10-12 16:13:45 PDT
Comment on
attachment 352206
[details]
Patch for EWS Clearing flags on attachment: 352206 Committed
r237087
: <
https://trac.webkit.org/changeset/237087
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug