WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
108922
Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
https://bugs.webkit.org/show_bug.cgi?id=108922
Summary
Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
Dongseong Hwang
Reported
2013-02-05 01:24:46 PST
Currently, CoordinatedGraphicsScene has two methods to know contents size: setContentsSize() and setVisibleContentsRect(). Contents size is used when adjusting a scroll position, but adjustment is not needed because PageViewportController already adjusts a scroll position. So this patch makes CoordinatedGraphicsScene not know contents size. In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used to get CoordinatedGraphicsScene.
Attachments
Patch
(14.26 KB, patch)
2013-02-05 01:28 PST
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(14.50 KB, patch)
2013-02-05 02:51 PST
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(14.50 KB, patch)
2013-02-06 02:26 PST
,
Dongseong Hwang
noam
: review+
noam
: commit-queue-
Details
Formatted Diff
Diff
Patch
(14.72 KB, patch)
2013-02-11 21:37 PST
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Dongseong Hwang
Comment 1
2013-02-05 01:28:05 PST
Created
attachment 186573
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2013-02-05 02:23:15 PST
Comment on
attachment 186573
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186573&action=review
> Source/WebCore/ChangeLog:12 > + Currently, CoordinatedGraphicsScene has two methods to know contents size: > + setContentsSize() and setVisibleContentsRect(). Contents size is used when > + adjusting a scroll position, but adjustment is not needed because > + PageViewportController already adjusts a scroll position. So this patch makes > + CoordinatedGraphicsScene not know contents size.
I guess this is not PageViewportController specific... but more about who has the responsibility.
> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:-63 > -static FloatPoint boundedScrollPosition(const FloatPoint& scrollPosition, const FloatRect& visibleContentRect, const FloatSize& contentSize) > -{ > - float scrollPositionX = std::max(scrollPosition.x(), 0.0f); > - scrollPositionX = std::min(scrollPositionX, contentSize.width() - visibleContentRect.width()); > - > - float scrollPositionY = std::max(scrollPosition.y(), 0.0f); > - scrollPositionY = std::min(scrollPositionY, contentSize.height() - visibleContentRect.height()); > - return FloatPoint(scrollPositionX, scrollPositionY); > -} > -
This indeed seems like "view specific" code as as the view might implement bouncing etc, I agree that this might not belong here
Dongseong Hwang
Comment 3
2013-02-05 02:36:31 PST
(In reply to
comment #2
) Thank you for review!
> (From update of
attachment 186573
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=186573&action=review
> > > Source/WebCore/ChangeLog:12 > > + PageViewportController already adjusts a scroll position. So this patch makes > > + CoordinatedGraphicsScene not know contents size. > > I guess this is not PageViewportController specific... but more about who has the responsibility.
I'll change the changelog.
> > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:-63 > This indeed seems like "view specific" code as as the view might implement bouncing etc, I agree that this might not belong here
I think so :) noam, kenneth agreed. could you review? :)
Mikhail Pozdnyakov
Comment 4
2013-02-05 02:45:19 PST
Comment on
attachment 186573
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186573&action=review
> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:192 > + FloatSize delta = m_scrollPosition - m_renderedContentsScrollPosition;
this is used for fixed elements positioning while scrolling. Have you checked that your patch does not bring regressions there?
Dongseong Hwang
Comment 5
2013-02-05 02:51:19 PST
Created
attachment 186589
[details]
Patch
Dongseong Hwang
Comment 6
2013-02-05 02:55:36 PST
(In reply to
comment #4
)
> (From update of
attachment 186573
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=186573&action=review
> > > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:192 > > + FloatSize delta = m_scrollPosition - m_renderedContentsScrollPosition; > > this is used for fixed elements positioning while scrolling. Have you checked that your patch does not bring regressions there?
I tested ManualTests/fixed-position.html and ManualTests/nested-fixed-position.html using Qt and EFL Minibrowser. and I feel the same between before and after. In theory, it is impossible to make regression, because the major two behaviors are not changed: the way to get m_renderedContentsScrollPosition, and the way to get current scroll position.
Mikhail Pozdnyakov
Comment 7
2013-02-05 03:44:35 PST
> In theory, it is impossible to make regression
Well my experience say that it is always possible :) but since you've checked I'm OK with the patch.
Noam Rosenthal
Comment 8
2013-02-05 05:39:16 PST
I'm ok with the patch as well.
Benjamin Poulain
Comment 9
2013-02-05 21:32:12 PST
Comment on
attachment 186589
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186589&action=review
I have no problem with this for WK2. Feel free to go ahead with a real review.
> Source/WebCore/ChangeLog:20 > + Test: ManualTests/fixed-position.html > + ManualTests/nested-fixed-position.html
Is there really no ref-test covering this? :) ManualTests are a very weak tool. If you feel the current ref-tests do not cover everything you need, please improve the test coverage.
Noam Rosenthal
Comment 10
2013-02-05 23:16:47 PST
> Is there really no ref-test covering this? :) > ManualTests are a very weak tool. If you feel the current ref-tests do not cover everything you need, please improve the test coverage.
There are no current facilities to test things "in motion" in the UI process; E.g. how would you test that during a particular touch sequence there are no flickers/shakes?
Benjamin Poulain
Comment 11
2013-02-05 23:50:03 PST
(In reply to
comment #10
)
> There are no current facilities to test things "in motion" in the UI process; E.g. how would you test that during a particular touch sequence there are no flickers/shakes?
Yep, not much you can do for those. Fortunately, such bugs are extremely rare.
Dongseong Hwang
Comment 12
2013-02-06 00:29:42 PST
I wish we can cover this patch automatically. Unfortunately, I couldn't think of a way to test this in an automated fashion. btw, noam, could you review? :)
Noam Rosenthal
Comment 13
2013-02-06 01:41:12 PST
Comment on
attachment 186589
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186589&action=review
>> Source/WebCore/ChangeLog:20 >> + ManualTests/nested-fixed-position.html > > Is there really no ref-test covering this? :) > ManualTests are a very weak tool. If you feel the current ref-tests do not cover everything you need, please improve the test coverage.
Please state in the changelog that this can only be tested manually since there is no automated testing facilities for in-motion touch.
Dongseong Hwang
Comment 14
2013-02-06 02:26:53 PST
Created
attachment 186802
[details]
Patch
Dongseong Hwang
Comment 15
2013-02-06 02:27:41 PST
(In reply to
comment #13
)
> (From update of
attachment 186589
[details]
) > Please state in the changelog that this can only be tested manually since there is no automated testing facilities for in-motion touch.
yes, Done. Thank you for improving changelog.
Noam Rosenthal
Comment 16
2013-02-11 00:35:38 PST
Comment on
attachment 186802
[details]
Patch LGTM. Also signed off by Benjamin for WK2. Please run through EWS before committing; currently patch doesn't apply.
Dongseong Hwang
Comment 17
2013-02-11 21:37:14 PST
Created
attachment 187769
[details]
Patch
WebKit Review Bot
Comment 18
2013-02-11 22:28:29 PST
Comment on
attachment 187769
[details]
Patch Clearing flags on attachment: 187769 Committed
r142579
: <
http://trac.webkit.org/changeset/142579
>
WebKit Review Bot
Comment 19
2013-02-11 22:28:36 PST
All reviewed patches have been landed. Closing bug.
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