Changeset 126840 in webkit
- Timestamp:
- Aug 27, 2012, 9:26:48 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/overflow/paged-x-div-with-column-gap.html (added)
-
LayoutTests/fast/overflow/paged-x-with-column-gap.html (added)
-
LayoutTests/platform/chromium/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.png (added)
-
LayoutTests/platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.txt (added)
-
LayoutTests/platform/mac/fast/overflow/paged-x-with-column-gap-expected.png (added)
-
LayoutTests/platform/mac/fast/overflow/paged-x-with-column-gap-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (4 diffs)
-
Source/WebCore/page/FrameView.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderView.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r126839 r126840 1 2012-08-27 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=94848 4 When paged-x/y is specified on the root, columnGap is ignored, and garbage pixels 5 are likely 6 7 Reviewed by Dan Bernsetin. 8 9 New tests. 10 * fast/overflow/paged-x-div-with-column-gap.html: Added. 11 * fast/overflow/paged-x-with-column-gap.html: Added. 12 * platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.png: Added. 13 * platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.txt: Added. 14 * platform/mac/fast/overflow/paged-x-with-column-gap-expected.png: Added. 15 * platform/mac/fast/overflow/paged-x-with-column-gap-expected.txt: Added. 16 17 Updated results needed for Chromium. 18 * platform/chromium/TestExpectations: 19 1 20 2012-08-27 Kent Tamura <tkent@chromium.org> 2 21 -
trunk/LayoutTests/platform/chromium/TestExpectations
r126832 r126840 3467 3467 BUGCR67540 BUGWK94735 LINUX : fast/text/emphasis-overlap.html = IMAGE IMAGE+TEXT 3468 3468 3469 BUGWK95167 : fast/overflow/paged-x-with-column-gap.html = IMAGE IMAGE+TEXT TEXT MISSING 3470 BUGWK95167 : fast/overflow/paged-x-div-with-column-gap.html = IMAGE IMAGE+TEXT TEXT MISSING 3471 3469 3472 BUGWK94793 : fast/notifications/notifications-event-listener-crash.html = TEXT PASS 3470 3473 -
trunk/Source/WebCore/ChangeLog
r126839 r126840 1 2012-08-27 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=94848 4 When paged-x/y is specified on the root, columnGap is ignored, and garbage pixels 5 are likely 6 7 Reviewed by Dan Bernstein. 8 9 We used to call setPagination() from applyOverflowToViewport(), but that is too 10 late. We want to setPagination() before we actually lay anything out so that all 11 of the styles (including columnGap!) will be properly set on the RenderView. 12 13 No longer handle pagination here since we take care of it in 14 applyPaginationToViewport() 15 * page/FrameView.cpp: 16 (WebCore::FrameView::applyOverflowToViewport): 17 18 New function to call setPagination(). This function gets the appropriate renderer 19 and uses its RenderStyle to determine if pagination should be set. 20 (WebCore::FrameView::applyPaginationToViewport): 21 (WebCore): 22 23 Call applyPaginationToViewport() before the call to updateStyleIfNeeded(). 24 (WebCore::FrameView::layout): 25 26 This code was meant to prevent garbage pixels in column gaps for pagination on the 27 RenderView, but paintContents() does not always get called when we paint into 28 tiles, so I moved this code to RenderView. 29 (WebCore::FrameView::paintContents): 30 * page/FrameView.h: 31 (FrameView): 32 33 The code from RenderView::paintContents() to prevent garbage pixels is moved here. 34 * rendering/RenderView.cpp: 35 (WebCore::RenderView::paint): 36 1 37 2012-08-27 Kent Tamura <tkent@chromium.org> 2 38 -
trunk/Source/WebCore/page/FrameView.cpp
r126774 r126840 610 610 ; 611 611 } 612 613 Pagination pagination;614 612 615 613 switch (overflowY) { … … 626 624 vMode = ScrollbarAuto; 627 625 break; 628 case OPAGEDX:629 pagination.mode = WebCore::paginationModeForRenderStyle(o->style());630 break;631 case OPAGEDY:632 pagination.mode = WebCore::paginationModeForRenderStyle(o->style());633 break;634 626 default: 635 // Don't set it at all. 627 // Don't set it at all. Values of OPAGEDX and OPAGEDY are handled by applyPaginationToViewPort(). 636 628 ; 637 629 } 638 630 631 m_viewportRenderer = o; 632 } 633 634 void FrameView::applyPaginationToViewport() 635 { 636 Document* document = m_frame->document(); 637 Node* documentElement = document->documentElement(); 638 RenderObject* documentRenderer = documentElement ? documentElement->renderer() : 0; 639 RenderObject* documentOrBodyRenderer = documentRenderer; 640 Node* body = document->body(); 641 if (body && body->renderer()) { 642 if (body->hasTagName(bodyTag)) 643 documentOrBodyRenderer = documentRenderer->style()->overflowX() == OVISIBLE && documentElement->hasTagName(htmlTag) ? body->renderer() : documentRenderer; 644 } 645 646 Pagination pagination; 647 648 if (!documentOrBodyRenderer) { 649 setPagination(pagination); 650 return; 651 } 652 653 EOverflow overflowY = documentOrBodyRenderer->style()->overflowY(); 654 if (overflowY == OPAGEDX || overflowY == OPAGEDY) { 655 pagination.mode = WebCore::paginationModeForRenderStyle(documentOrBodyRenderer->style()); 656 pagination.gap = static_cast<unsigned>(documentOrBodyRenderer->style()->columnGap()); 657 } 658 639 659 setPagination(pagination); 640 641 m_viewportRenderer = o;642 660 } 643 661 … … 1036 1054 document->evaluateMediaQueryList(); 1037 1055 1056 // If there is any pagination to apply, it will affect the RenderView's style, so we should 1057 // take care of that now. 1058 applyPaginationToViewport(); 1059 1038 1060 // Always ensure our style info is up-to-date. This can happen in situations where 1039 1061 // the layout beats any sort of style recalc update that needs to occur. … … 3114 3136 #endif 3115 3137 3116 if (pagination().mode != Pagination::Unpaginated)3117 p->fillRect(rect, baseBackgroundColor(), ColorSpaceDeviceRGB);3118 3119 3138 bool isTopLevelPainter = !sCurrentPaintTimeStamp; 3120 3139 if (isTopLevelPainter) -
trunk/Source/WebCore/page/FrameView.h
r126774 r126840 383 383 384 384 void applyOverflowToViewport(RenderObject*, ScrollbarMode& hMode, ScrollbarMode& vMode); 385 void applyPaginationToViewport(); 385 386 386 387 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); -
trunk/Source/WebCore/rendering/RenderView.cpp
r126837 r126840 249 249 // RenderViews should never be called to paint with an offset not on device pixels. 250 250 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffset); 251 252 // This avoids painting garbage between columns if there is a column gap. 253 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated) 254 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundColor(), ColorSpaceDeviceRGB); 255 251 256 paintObject(paintInfo, paintOffset); 252 257 }
Note:
See TracChangeset
for help on using the changeset viewer.