Changeset 140816 in webkit
- Timestamp:
- Jan 25, 2013 5:05:06 AM (11 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r140541 r140816 5428 5428 } 5429 5429 5430 void WebPagePrivate::commitRootLayer(const IntRect& layoutRectForCompositing, 5431 const IntSize& contentsSizeForCompositing, 5432 bool drawsRootLayer) 5430 void WebPagePrivate::commitRootLayer(const IntRect& layoutRect, const IntRect& documentRect, bool drawsRootLayer) 5433 5431 { 5434 5432 #if DEBUG_AC_COMMIT … … 5457 5455 m_compositor->setOverlayLayer(overlayLayer->layerCompositingThread()); 5458 5456 5459 m_compositor->setLayoutRect ForCompositing(layoutRectForCompositing);5460 m_compositor->set ContentsSizeForCompositing(contentsSizeForCompositing);5457 m_compositor->setLayoutRect(layoutRect); 5458 m_compositor->setDocumentRect(documentRect); 5461 5459 m_compositor->setDrawsRootLayer(drawsRootLayer); 5462 5460 … … 5531 5529 // This is the rectangle used to layout fixed positioned elements, 5532 5530 // and that's what the layer renderer wants. 5533 IntRect layoutRect ForCompositing(scrollPosition(), actualVisibleSize());5534 Int Size contentsSizeForCompositing = contentsSize();5531 IntRect layoutRect(scrollPosition(), actualVisibleSize()); 5532 IntRect documentRect(view->minimumScrollPosition(), view->contentsSize()); 5535 5533 bool drawsRootLayer = compositorDrawsRootLayer(); 5536 5534 … … 5540 5538 &WebPagePrivate::commitRootLayer, 5541 5539 this, 5542 layoutRect ForCompositing,5543 contentsSizeForCompositing,5540 layoutRect, 5541 documentRect, 5544 5542 drawsRootLayer)); 5545 5543 -
trunk/Source/WebKit/blackberry/Api/WebPageCompositor.cpp
r138024 r140816 141 141 FloatRect contents = m_webPage->mapFromTransformedFloatRect(transformedContents); 142 142 143 m_layerRenderer->setViewport(targetRect, clipRect, contents, m_layoutRect ForCompositing, m_contentsSizeForCompositing);143 m_layerRenderer->setViewport(targetRect, clipRect, contents, m_layoutRect, m_documentRect.size()); 144 144 145 145 TransformationMatrix transform(transformIn); 146 146 transform *= *m_webPage->m_transformationMatrix; 147 transform.translate(-m_documentRect.x(), -m_documentRect.y()); 147 148 148 149 if (!drawsRootLayer()) … … 197 198 IntRect viewport = IntRect(dstRect.x(), viewportY, dstRect.width(), dstRect.height()); 198 199 199 m_layerRenderer->setViewport(viewport, viewport, contents, m_layoutRect ForCompositing, m_contentsSizeForCompositing);200 m_layerRenderer->setViewport(viewport, viewport, contents, m_layoutRect, m_documentRect.size()); 200 201 201 202 // WebKit uses row vectors which are multiplied by the matrix on the left (i.e. v*M) … … 204 205 // as the last transformation. 205 206 TransformationMatrix transform = LayerRenderer::orthoMatrix(0, contents.width(), contents.height(), 0, -1000, 1000); 206 transform.translate3d(-contents.x() , -contents.y(), 0);207 transform.translate3d(-contents.x() - m_documentRect.x(), -contents.y() - m_documentRect.y(), 0); 207 208 compositeLayers(transform); 208 209 -
trunk/Source/WebKit/blackberry/Api/WebPageCompositor_p.h
r122056 r140816 76 76 bool drawLayers(const WebCore::IntRect& dstRect, const WebCore::FloatRect& contents); 77 77 78 WebCore::IntRect layoutRect ForCompositing() const { return m_layoutRectForCompositing; }79 void setLayoutRect ForCompositing(const WebCore::IntRect& rect) { m_layoutRectForCompositing= rect; }78 WebCore::IntRect layoutRect() const { return m_layoutRect; } 79 void setLayoutRect(const WebCore::IntRect& rect) { m_layoutRect = rect; } 80 80 81 WebCore::Int Size contentsSizeForCompositing() const { return m_contentsSizeForCompositing; }82 void set ContentsSizeForCompositing(const WebCore::IntSize& size) { m_contentsSizeForCompositing = size; }81 WebCore::IntRect documentRect() const { return m_documentRect; } 82 void setDocumentRect(const WebCore::IntRect& rect) { m_documentRect = rect; } 83 83 84 84 WebCore::LayerRenderingResults lastCompositingResults() const { return m_lastCompositingResults; } … … 113 113 RefPtr<WebCore::LayerCompositingThread> m_overlayLayer; 114 114 RefPtr<WebCore::LayerCompositingThread> m_compositingThreadOverlayLayer; 115 WebCore::IntRect m_layoutRect ForCompositing;116 WebCore::Int Size m_contentsSizeForCompositing;115 WebCore::IntRect m_layoutRect; 116 WebCore::IntRect m_documentRect; 117 117 WebCore::LayerRenderingResults m_lastCompositingResults; 118 118 WebCore::Color m_backgroundColor; -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r139955 r140816 409 409 // Compositing thread. 410 410 void setRootLayerCompositingThread(WebCore::LayerCompositingThread*); 411 void commitRootLayer(const WebCore::IntRect& , const WebCore::IntSize&, bool);411 void commitRootLayer(const WebCore::IntRect& layoutRect, const WebCore::IntRect& documentRect, bool); 412 412 bool isAcceleratedCompositingActive() const { return m_compositor; } 413 413 WebPageCompositorPrivate* compositor() const { return m_compositor.get(); } -
trunk/Source/WebKit/blackberry/ChangeLog
r140708 r140816 1 2013-01-25 Arvid Nilsson <anilsson@rim.com> 2 3 [BlackBerry] AC layers appear in the wrong place on RTL page 4 https://bugs.webkit.org/show_bug.cgi?id=107930 5 6 Reviewed by George Staikos. 7 8 The public API of the BlackBerry port always reports a minimum scroll 9 position of (0, 0), even on RTL pages with left overflow. We 10 accomplish this by translating the WebCore scroll position by an 11 amount equal in size to the minimum scroll position, to obtain the API 12 scroll position reported to the API client. 13 14 This means the API client will ask us to render a rect that needs to 15 be corrected for the minimum scroll position, or we'll render the wrong 16 part. This is done for BackingStore, but not for WebPageCompositor. 17 18 WebPageCompositor was rendering the wrong part of the web page when 19 the minimum scroll position was non-zero. Fixed by communicating the 20 minimum scroll position to the WebPageCompositor, and accounting for it 21 when interpreting the requested content rectangle to render. 22 23 PR 280229. 24 25 * Api/WebPage.cpp: 26 (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): 27 (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): 28 * Api/WebPageCompositor.cpp: 29 (BlackBerry::WebKit::WebPageCompositorPrivate::render): 30 (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers): 31 * Api/WebPageCompositor_p.h: 32 (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRect): 33 (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRect): 34 (BlackBerry::WebKit::WebPageCompositorPrivate::documentRect): 35 (BlackBerry::WebKit::WebPageCompositorPrivate::setDocumentRect): 36 (WebPageCompositorPrivate): 37 * Api/WebPage_p.h: 38 (WebPagePrivate): 39 1 40 2013-01-24 Nima Ghanavatian <nghanavatian@rim.com> 2 41
Note: See TracChangeset
for help on using the changeset viewer.