Bug 104451 - [BlackBerry] Google results page rendering issue with RTL languages like arabic/hebrew
Summary: [BlackBerry] Google results page rendering issue with RTL languages like arab...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jacky Jiang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-08 12:29 PST by Jacky Jiang
Modified: 2012-12-09 12:14 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.97 KB, patch)
2012-12-08 13:23 PST, Jacky Jiang
rwlbuis: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacky Jiang 2012-12-08 12:29:37 PST
PR:206372.
Comment 1 Jacky Jiang 2012-12-08 13:23:04 PST
Created attachment 178377 [details]
Patch
Comment 2 Rob Buis 2012-12-08 13:34:35 PST
Comment on attachment 178377 [details]
Patch

Patch looks good overall. Are you sure it is not causing extra layouts for instance on ltr?
Comment 3 Rob Buis 2012-12-08 13:35:18 PST
Comment on attachment 178377 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review

> Source/WebKit/blackberry/Api/WebPage.cpp:1557
> +void WebPagePrivate::overflowExceedsContentsSize()

Should this be called setOverflowExceedsContentsSize?
Comment 4 Rob Buis 2012-12-08 13:37:07 PST
Comment on attachment 178377 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review

> Source/WebKit/blackberry/Api/WebPage.cpp:1561
> +        if (setViewMode(viewMode())) {

Here you are setting m_viewMode to the same value, so I guess you want to do the extra stuff in setViewMode, not just setting m_viewMode. Consider splitting it into two methods in a future patch, one for setting m_viewMode, and one to do the extra stuff, above line just looks weird, like a no-op on first glance.
Comment 5 Jacky Jiang 2012-12-08 13:50:58 PST
Comment on attachment 178377 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review

>> Source/WebKit/blackberry/Api/WebPage.cpp:1557
>> +void WebPagePrivate::overflowExceedsContentsSize()
> 
> Should this be called setOverflowExceedsContentsSize?

I think we are fine as that is callback alike in FrameView::adjustViewSize(), just notify the WebPage through Chrome that we overflowed.

>> Source/WebKit/blackberry/Api/WebPage.cpp:1561
>> +        if (setViewMode(viewMode())) {
> 
> Here you are setting m_viewMode to the same value, so I guess you want to do the extra stuff in setViewMode, not just setting m_viewMode. Consider splitting it into two methods in a future patch, one for setting m_viewMode, and one to do the extra stuff, above line just looks weird, like a no-op on first glance.

Hmm, we actually will recalculate fixedLayoutSize and apply fixedLayoutSize to WebCore in setViewMode. Probably I guess we think when view mode is changed which means fixed layout width should be changed as well.
Comment 6 Jacky Jiang 2012-12-08 14:00:51 PST
(In reply to comment #2)
> (From update of attachment 178377 [details])
> Patch looks good overall. Are you sure it is not causing extra layouts for instance on ltr?
It will cause an extra layout  both on RTL and LTR page, as this is trying to layout larger and  get other render Objects updated.
Comment 7 Rob Buis 2012-12-08 14:03:29 PST
Comment on attachment 178377 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review

> Source/WebKit/blackberry/ChangeLog:12
> +        The other renders still stay at the old width unfortunately which

Note, renders should be renderers.

> Source/WebKit/blackberry/ChangeLog:17
> +        DEFAULT_MAX_LAYOUT_WIDTH and update the other renders.

Ditto.
Comment 8 Rob Buis 2012-12-08 14:04:53 PST
(In reply to comment #6)
> (In reply to comment #2)
> > (From update of attachment 178377 [details] [details])
> > Patch looks good overall. Are you sure it is not causing extra layouts for instance on ltr?
> It will cause an extra layout  both on RTL and LTR page, as this is trying to layout larger and  get other render Objects updated.

Do you mean extra layout *always*, or for some special condition? Like for any random page visit?
Comment 9 Jacky Jiang 2012-12-08 14:10:25 PST
(In reply to comment #8)
> (In reply to comment #6)
> > (In reply to comment #2)
> > > (From update of attachment 178377 [details] [details] [details])
> > > Patch looks good overall. Are you sure it is not causing extra layouts for instance on ltr?
> > It will cause an extra layout  both on RTL and LTR page, as this is trying to layout larger and  get other render Objects updated.
> 
> Do you mean extra layout *always*, or for some special condition? Like for any random page visit?

For the page has the following conditions:
1. overflow > ContentsSize.
2. absoluteVisibleOverflowSize().width() < DEFAULT_MAX_LAYOUT_WIDTH(1024)
3. without viewport , !hasVirtualViewport()

If the page (both RTL or LTR) has all the conditions, then we will try to relayout to update the renders as that's possible the issue is the same as Google resultsRTL page(PR:206372).
Comment 10 Jacky Jiang 2012-12-08 14:13:34 PST
(In reply to comment #7)
> (From update of attachment 178377 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review
> 
> > Source/WebKit/blackberry/ChangeLog:12
> > +        The other renders still stay at the old width unfortunately which
> 
> Note, renders should be renderers.
> 
> > Source/WebKit/blackberry/ChangeLog:17
> > +        DEFAULT_MAX_LAYOUT_WIDTH and update the other renders.
> 
> Ditto.

Right, will update.
Comment 11 Rob Buis 2012-12-08 14:20:50 PST
Comment on attachment 178377 [details]
Patch

This seems fine, after discussing it on irc.
Comment 12 Jacky Jiang 2012-12-08 15:09:29 PST
Committed r137049: <http://trac.webkit.org/changeset/137049>
Comment 13 Antonio Gomes 2012-12-09 11:51:52 PST
Comment on attachment 178377 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review

>>> Source/WebKit/blackberry/Api/WebPage.cpp:1557
>>> +void WebPagePrivate::overflowExceedsContentsSize()
>> 
>> Should this be called setOverflowExceedsContentsSize?
> 
> I think we are fine as that is callback alike in FrameView::adjustViewSize(), just notify the WebPage through Chrome that we overflowed.

Correct name should be overflowDidExceedContentsSize.
Comment 14 Jacky Jiang 2012-12-09 12:10:53 PST
(In reply to comment #13)
> (From update of attachment 178377 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review
> 
> >>> Source/WebKit/blackberry/Api/WebPage.cpp:1557
> >>> +void WebPagePrivate::overflowExceedsContentsSize()
> >> 
> >> Should this be called setOverflowExceedsContentsSize?
> > 
> > I think we are fine as that is callback alike in FrameView::adjustViewSize(), just notify the WebPage through Chrome that we overflowed.
> 
> Correct name should be overflowDidExceedContentsSize.

Sounds better to me, we may should clean it up next time if people agree on that.
Comment 15 Rob Buis 2012-12-09 12:14:43 PST
(In reply to comment #14)
> (In reply to comment #13)
> > (From update of attachment 178377 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=178377&action=review
> > 
> > >>> Source/WebKit/blackberry/Api/WebPage.cpp:1557
> > >>> +void WebPagePrivate::overflowExceedsContentsSize()
> > >> 
> > >> Should this be called setOverflowExceedsContentsSize?
> > > 
> > > I think we are fine as that is callback alike in FrameView::adjustViewSize(), just notify the WebPage through Chrome that we overflowed.
> > 
> > Correct name should be overflowDidExceedContentsSize.
> 
> Sounds better to me, we may should clean it up next time if people agree on that.

Yes, sounds good.