WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157771
AX: iOS: when bringing focus to a text field we may zoom the page even if author wanted max scale = 1
https://bugs.webkit.org/show_bug.cgi?id=157771
Summary
AX: iOS: when bringing focus to a text field we may zoom the page even if aut...
chris fleizach
Reported
2016-05-16 16:48:34 PDT
If a user taps on a text field to bring keyboard focus, we should not zoom the page in if the author had set scaling to NO We should only do scaling if the user does it themselves <
rdar://problem/25443355
>
Attachments
Patch
(12.15 KB, patch)
2016-05-16 16:52 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(12.80 KB, patch)
2016-05-16 16:56 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(11.06 KB, patch)
2016-05-17 16:32 PDT
,
chris fleizach
simon.fraser
: review-
Details
Formatted Diff
Diff
Patch
(12.99 KB, patch)
2016-05-17 16:54 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(13.96 KB, patch)
2016-05-18 11:44 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(18.73 KB, patch)
2016-05-19 10:11 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(11.29 KB, patch)
2016-05-22 13:51 PDT
,
chris fleizach
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
chris fleizach
Comment 1
2016-05-16 16:52:48 PDT
Created
attachment 279068
[details]
Patch
chris fleizach
Comment 2
2016-05-16 16:56:08 PDT
Created
attachment 279070
[details]
Patch
WebKit Commit Bot
Comment 3
2016-05-16 16:57:56 PDT
Attachment 279070
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1053: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 4
2016-05-16 17:09:13 PDT
Comment on
attachment 279070
[details]
Patch ToT changed on me
chris fleizach
Comment 5
2016-05-17 16:32:15 PDT
Created
attachment 279180
[details]
Patch
WebKit Commit Bot
Comment 6
2016-05-17 16:33:26 PDT
Attachment 279180
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1053: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 7
2016-05-17 16:44:39 PDT
Comment on
attachment 279180
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279180&action=review
> Source/WebKit2/WebProcess/WebPage/WebPage.h:512 > + // maximumPageScaleFactor accounts for when user scaling is enabled by force. > double maximumPageScaleFactor() const; > + > + // originalMaximumScaleFactor is the default page scaling of the page. > + double originalMaximumScaleFactor() const;
I don't think these names are clear. In particular, "by force" is unclear. Maybe: maximumAllowablePageScaleFactor() maximumPageScaleFactorFromViewportTag()
chris fleizach
Comment 8
2016-05-17 16:54:50 PDT
Created
attachment 279186
[details]
Patch
WebKit Commit Bot
Comment 9
2016-05-17 16:56:41 PDT
Attachment 279186
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1053: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 10
2016-05-17 17:14:08 PDT
Comment on
attachment 279186
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279186&action=review
> Source/WebCore/page/ViewportConfiguration.h:89 > + bool forceAlwaysUserScalable() { return m_forceAlwaysUserScalable; }
This should be const
> Source/WebKit2/Shared/AssistedNodeInformation.h:103 > + bool userScalingForced { false };
This is also ambiguous. Does it mean that the user has zoomed when forceAlwaysUserScalable() is true, or does it just reflect forceAlwaysUserScalable()? I can't tell from this patch.
chris fleizach
Comment 11
2016-05-18 11:44:16 PDT
Created
attachment 279265
[details]
Patch
WebKit Commit Bot
Comment 12
2016-05-18 11:46:04 PDT
Attachment 279265
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1053: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 13
2016-05-18 11:58:35 PDT
Comment on
attachment 279265
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279265&action=review
> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054 > + allowScaling:(_assistedNodeInformation.allowsUserScaling && !_assistedNodeInformation.forceAlwaysUserScalable && !UICurrentUserInterfaceIdiomIsPad())
Doesn't this mean that a user with "always allow scaling" set is going to never get zooming on an input on iPhone?
chris fleizach
Comment 14
2016-05-18 12:33:29 PDT
(In reply to
comment #13
)
> Comment on
attachment 279265
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=279265&action=review
> > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054 > > + allowScaling:(_assistedNodeInformation.allowsUserScaling && !_assistedNodeInformation.forceAlwaysUserScalable && !UICurrentUserInterfaceIdiomIsPad()) > > Doesn't this mean that a user with "always allow scaling" set is going to > never get zooming on an input on iPhone?
Possibly... Looking
chris fleizach
Comment 15
2016-05-18 12:38:35 PDT
(In reply to
comment #14
)
> (In reply to
comment #13
) > > Comment on
attachment 279265
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=279265&action=review
> > > > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054 > > > + allowScaling:(_assistedNodeInformation.allowsUserScaling && !_assistedNodeInformation.forceAlwaysUserScalable && !UICurrentUserInterfaceIdiomIsPad()) > > > > Doesn't this mean that a user with "always allow scaling" set is going to > > never get zooming on an input on iPhone? > > Possibly... Looking
Probably don't need _assistedNodeInformation.forceAlwaysUserScalable at all, since maximumPageScaleFactorFromViewportTag will be 1x in this case Rebuilding and testing...
Simon Fraser (smfr)
Comment 16
2016-05-18 12:53:51 PDT
(In reply to
comment #15
)
> (In reply to
comment #14
) > > (In reply to
comment #13
) > > > Comment on
attachment 279265
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=279265&action=review
> > > > > > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054 > > > > + allowScaling:(_assistedNodeInformation.allowsUserScaling && !_assistedNodeInformation.forceAlwaysUserScalable && !UICurrentUserInterfaceIdiomIsPad()) > > > > > > Doesn't this mean that a user with "always allow scaling" set is going to > > > never get zooming on an input on iPhone? > > > > Possibly... Looking > > Probably don't need _assistedNodeInformation.forceAlwaysUserScalable at > all, since maximumPageScaleFactorFromViewportTag will be 1x in this case > > Rebuilding and testing...
Please add a layout test for that case too.
chris fleizach
Comment 17
2016-05-19 10:11:26 PDT
Created
attachment 279397
[details]
Patch Added a unit test for the case where we don't want to zoom in and the case where we DO want to zoom in
WebKit Commit Bot
Comment 18
2016-05-19 10:13:38 PDT
Attachment 279397
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1054: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 19
2016-05-19 23:08:40 PDT
@simon: how does this look?
Tim Horton
Comment 20
2016-05-21 19:03:45 PDT
Comment on
attachment 279397
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279397&action=review
> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1047 > + // In case user scaling is force enabled, do not use that scaling when zomming in with an input field.
sp: zomming
> Source/WebKit2/WebProcess/WebPage/WebPage.h:509 > + // maximumAllowablePageScaleFactor is the max page scaling that also accounts for whether the preference for "always scale" is enabled.
s/scaling/scale/
> Source/WebKit2/WebProcess/WebPage/WebPage.h:511 > + // maximumPageScaleFactorFromViewportTag is the default page scaling of the page. It does not account for when the preference for "always scale" is enabled.
ditto.
> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:340 > + return m_page->pageScaleFactor();
How is the current live page scale a "maximum" of any sort?
chris fleizach
Comment 21
2016-05-22 13:51:47 PDT
Created
attachment 279552
[details]
Patch
WebKit Commit Bot
Comment 22
2016-05-22 13:52:36 PDT
Attachment 279552
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1055: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 23
2016-05-22 13:52:44 PDT
(In reply to
comment #20
)
> Comment on
attachment 279397
[details]
> Patch >
Thanks for review. Addressed comments and also removed unnecessary changes. The patch had morphed a bit from the beginning and we don't need nearly as many changes as originally thought thanks
> View in context: >
https://bugs.webkit.org/attachment.cgi?id=279397&action=review
> > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1047 > > + // In case user scaling is force enabled, do not use that scaling when zomming in with an input field. > > sp: zomming > > > Source/WebKit2/WebProcess/WebPage/WebPage.h:509 > > + // maximumAllowablePageScaleFactor is the max page scaling that also accounts for whether the preference for "always scale" is enabled. > > s/scaling/scale/ > > > Source/WebKit2/WebProcess/WebPage/WebPage.h:511 > > + // maximumPageScaleFactorFromViewportTag is the default page scaling of the page. It does not account for when the preference for "always scale" is enabled. > > ditto. > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:340 > > + return m_page->pageScaleFactor(); > > How is the current live page scale a "maximum" of any sort?
Tim Horton
Comment 24
2016-05-23 10:20:51 PDT
Comment on
attachment 279552
[details]
Patch This seems much less crazy.
chris fleizach
Comment 25
2016-05-23 13:43:15 PDT
http://trac.webkit.org/changeset/201294
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