[Webkit-unassigned] [Bug 149889] New: Wrong viewport in iframes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 7 13:09:10 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=149889

            Bug ID: 149889
           Summary: Wrong viewport in iframes
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: iOS
                OS: iOS 9.0
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dobkin at google.com

When a page is embedded in an iframe, the viewport expands to the size of the iframe, which causes some pages to render in Desktop mode instead of Mobile.

For example, the following page always renders in 'MOBILE' mode on e.g. Mobile Safari on iPhones.

  <!DOCTYPE html>
  <head>
    <meta content="width=device-width" name="viewport">
    <style>
      body::after {
        content: "DESKTOP"
      }
      @media (max-width:767px) {
        body::after {
          content: "MOBILE"
        }
      }
    </style>
  </head>
  <div style="width: 1000px; border: 1px solid blue;">
    very wide element
  </div>

See this in action at http://output.jsbin.com/tizisoxidu. However, when the same page is embedded in an iframe, it renders in 'DESKTOP' mode:

  <!DOCTYPE html>
  <head>
    <meta content="width=device-width" name="viewport">
  </head>
  <iframe src="//output.jsbin.com/tizisoxidu"></iframe>


See this at http://output.jsbin.com/qagelujucu.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151007/2efdeb94/attachment.html>


More information about the webkit-unassigned mailing list