Summary: | Support orientation attribute of viewport meta tag. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryuan Choi <ryuan.choi> | ||||||||||
Component: | WebCore Misc. | Assignee: | Ryuan Choi <ryuan.choi> | ||||||||||
Status: | RESOLVED WONTFIX | ||||||||||||
Severity: | Normal | CC: | benjamin, chrisjshull, ddkilzer, donggwan.kim, eoconnor, gyuyoung.kim, joepeck, kenneth, mike, rakuco, sangseok.lim, webkit.review.bot, wonsuk11.lee, zalan | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Ryuan Choi
2011-12-14 00:07:33 PST
Created attachment 119188 [details]
Patch
CC'ing kenneth, he is main developer for viewport meta tag. I have personally been against this as it poses some big usability problems. It is highly confusing for users if the browser automatically rotates when clicking on a link or navigating session history. It is also confusing for the users when the web browser suddently doesn't want to rotate. So I suggest that we only respect the properly for stand-alone web apps and for fullscreen (FullscreenAPI spec). Comment on attachment 119188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119188&action=review > Source/WebCore/dom/ViewportArguments.h:46 > + ViewportOrientationAuto, Can't this use the ValueAuto? > Source/WebKit/efl/ewk/ewk_view.h:84 > + * - "viewport,orientation,changed", Ewk_Viewport_Orientation: reports that orientation of viewport was changed. > * - "viewport,changed", void: reports that viewport was changed. Why doesnt the below cover this? (In reply to comment #3) > I have personally been against this as it poses some big usability problems. It is highly confusing for users if the browser automatically rotates when clicking on a link or navigating session history. It is also confusing for the users when the web browser suddently doesn't want to rotate. > > So I suggest that we only respect the properly for stand-alone web apps and for fullscreen (FullscreenAPI spec). Thanks for the review. I agree. it can make usability problem for the almost case without you mentioned. I think that webkit should just notify this attribute for the application such as web apps framework or browser application which is in fullscreen mode. (In reply to comment #4) > (From update of attachment 119188 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=119188&action=review > > > Source/WebCore/dom/ViewportArguments.h:46 > > + ViewportOrientationAuto, > > Can't this use the ValueAuto? I considered but I thought that ViewportOrientationXXX is clear to convert WebCore's enum into WebKit port's enum. > > > Source/WebKit/efl/ewk/ewk_view.h:84 > > + * - "viewport,orientation,changed", Ewk_Viewport_Orientation: reports that orientation of viewport was changed. > > * - "viewport,changed", void: reports that viewport was changed. > > Why doesnt the below cover this? IMHO, orientation is not proper value for the additional data of "viewport,changed". ViewportArgument looks reasonable as the additional data of "viewport,changed". For now, WebKit/Efl doesn't need to share ViewportArgument values via "viewport,changed" signal because it provide computed ViewportAttribute using ewk_view_viewport_attributes_get(). I sent an email to www-style: http://lists.w3.org/Archives/Public/www-style/2011Dec/0402.html Comment on attachment 119188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119188&action=review > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:299 > +void DumpRenderTreeChrome::onViewportOrientationChanged(void*, Evas_Object*, void* eventInfo) > +{ > + Ewk_Viewport_Orientation* orientation = static_cast<Ewk_Viewport_Orientation*>(eventInfo); > + switch (*orientation) { > + case EWK_VIEWPORT_ORIENTATION_AUTO: > + printf("viewport orientation changed to auto\n"); > + break; > + case EWK_VIEWPORT_ORIENTATION_PORTRAIT: > + printf("viewport orientation changed to portrait\n"); > + break; > + case EWK_VIEWPORT_ORIENTATION_LANDSCAPE: > + printf("viewport orientation changed to landscape\n"); > + break; > + } > +} On the EFL side, this method does not make sense. There is no layout test checking for these messages. (In reply to comment #7) > (From update of attachment 119188 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=119188&action=review > > > Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp:299 > > +void DumpRenderTreeChrome::onViewportOrientationChanged(void*, Evas_Object*, void* eventInfo) > > +{ > > + Ewk_Viewport_Orientation* orientation = static_cast<Ewk_Viewport_Orientation*>(eventInfo); > > + switch (*orientation) { > > + case EWK_VIEWPORT_ORIENTATION_AUTO: > > + printf("viewport orientation changed to auto\n"); > > + break; > > + case EWK_VIEWPORT_ORIENTATION_PORTRAIT: > > + printf("viewport orientation changed to portrait\n"); > > + break; > > + case EWK_VIEWPORT_ORIENTATION_LANDSCAPE: > > + printf("viewport orientation changed to landscape\n"); > > + break; > > + } > > +} > > On the EFL side, this method does not make sense. There is no layout test checking for these messages. Sorry, test case was missed in this patch. This method is for new test case. I'll update patch for the test case. Created attachment 120126 [details]
Patch
Created attachment 122703 [details]
rebase_patch
Comment on attachment 122703 [details] rebase_patch View in context: https://bugs.webkit.org/attachment.cgi?id=122703&action=review > LayoutTests/fast/viewport/viewport-orientation-expected.txt:3 > +viewport orientation changed to landscape > + > +viewport orientation changed to auto I think this should be checked like any other viewport test... here you are testing your specific implementation which sends this out as a separate signal Created attachment 124922 [details]
Patch
Comment on attachment 124922 [details]
Patch
orientation is controversal and will probably be removed from the CSS DA spec.
(In reply to comment #13) > (From update of attachment 124922 [details]) > orientation is controversal and will probably be removed from the CSS DA spec. Close the bug because of above reason. |