[Webkit-unassigned] [Bug 47084] [EFL] Support viewport configuration and add new arguments for WebKit EFL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 12 06:01:28 PDT 2010


Gyuyoung Kim <gyuyoung.kim at samsung.com> changed:

           What    |Removed                     |Added
  Attachment #70064|0                           |1
        is obsolete|                            |

--- Comment #6 from Gyuyoung Kim <gyuyoung.kim at samsung.com>  2010-10-12 06:01:27 PST ---
Created an attachment (id=70526)
 --> (https://bugs.webkit.org/attachment.cgi?id=70526&action=review)

I modify previous patch. 

I use pageRect() to set availableSize, on the other hand, windowRect() is used by deviceWidth.

    149 +    int available_width = (int) priv->page->chrome()->client()->pageRect().width();
    150 +    int available_height = (int) priv->page->chrome()->client()->pageRect().height();
    151 +
    152 +    int device_width = (int) priv->page->chrome()->client()->windowRect().width();
    153 +    int device_height = (int) priv->page->chrome()->client()->windowRect().height();

But, width of pageRect() is 20 pixel less than windowRect()'s because EWebLauncher has a pink rectangle inside window.
The computeViewportAttributes() returns the biggest width value between parameters. Eventually, deviceWidth is returned by the computeViewportAttributes(). In mobile sites, EWebLauncher doesn't fit the page perfectly because deviceWidth is 20 pixel bigger than pageRect(). However, I think this is right for other device. As you know, other device doesn't has internal rectangle like EWebLauncher.

BTW, I wonder why default dpi value is 160.

    result.devicePixelRatio = float(deviceDPI / 160.0);

I made a dpi method in Bug 47537. However, the method returns 87 on my linux PC. As you know, 87 is less than 160. Thus, deviceWidth is multiplied by the ratio. Eventually, Layout is broken.

    // Resolve non-'auto' width and height to pixel values.
    if (deviceDPI != 1.0) {
        deviceWidth /= result.devicePixelRatio;
        deviceHeight /= result.devicePixelRatio;

        if (args.width != ViewportArguments::ValueAuto)
            args.width /= result.devicePixelRatio;
        if (args.height != ViewportArguments::ValueAuto)
            args.height /= result.devicePixelRatio;

For the time being, I hardcode the dpi value to 160.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list