Changeset 61065 in webkit


Ignore:
Timestamp:
Jun 12, 2010 1:05:08 PM (14 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/7882140> -webkit-column-break-* properties don’t do anything
https://bugs.webkit.org/show_bug.cgi?id=40531

Reviewed by Dave Hyatt.

WebCore:

Test: fast/multicol/break-properties.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintChildren): Check for -webkit-column-break-{before,after}: always
and -webkit-column-break-inside: avoid when doing column layout.

LayoutTests:

  • fast/multicol/break-properties-expected.txt: Added.
  • fast/multicol/break-properties.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61062 r61065  
     12010-06-12  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        <rdar://problem/7882140> -webkit-column-break-* properties don’t do anything
     6        https://bugs.webkit.org/show_bug.cgi?id=40531
     7
     8        * fast/multicol/break-properties-expected.txt: Added.
     9        * fast/multicol/break-properties.html: Added.
     10
    1112010-06-13  Robert Hogan  <robert@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r61062 r61065  
     12010-06-12  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        <rdar://problem/7882140> -webkit-column-break-* properties don’t do anything
     6        https://bugs.webkit.org/show_bug.cgi?id=40531
     7
     8        Test: fast/multicol/break-properties.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::paintChildren): Check for -webkit-column-break-{before,after}: always
     12        and -webkit-column-break-inside: avoid when doing column layout.
     13
    1142010-06-13  Robert Hogan  <robert@webkit.org>
    215
  • trunk/WebCore/rendering/RenderBlock.cpp

    r61044 r61065  
    21022102    info.paintingRoot = paintingRootForChildren(paintInfo);
    21032103    bool checkPageBreaks = document()->printing() && !document()->settings()->paginateDuringLayoutEnabled();
     2104    bool checkColumnBreaks = !checkPageBreaks && !view()->printRect().isEmpty() && !document()->settings()->paginateDuringLayoutEnabled();
    21042105
    21052106    for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {       
    21062107        // Check for page-break-before: always, and if it's set, break and bail.
    2107         if (checkPageBreaks && !childrenInline() && child->style()->pageBreakBefore() == PBALWAYS
     2108        bool checkBeforeAlways = !childrenInline() && (checkPageBreaks && child->style()->pageBreakBefore() == PBALWAYS || checkColumnBreaks && child->style()->columnBreakBefore() == PBALWAYS);
     2109        if (checkBeforeAlways
    21082110            && (ty + child->y()) > paintInfo.rect.y()
    21092111            && (ty + child->y()) < paintInfo.rect.bottom()) {
     
    21132115
    21142116        // Check for page-break-inside: avoid, and it it's set, break and bail.
    2115         if (checkPageBreaks && !childrenInline() && child->style()->pageBreakInside() == PBAVOID
     2117        bool checkInsideAvoid = !childrenInline() && (checkPageBreaks && child->style()->pageBreakInside() == PBAVOID || checkColumnBreaks && child->style()->columnBreakInside() == PBAVOID);
     2118        if (checkInsideAvoid
    21162119            && ty + child->y() > paintInfo.rect.y()
    21172120            && ty + child->y() < paintInfo.rect.bottom()
     
    21252128
    21262129        // Check for page-break-after: always, and if it's set, break and bail.
    2127         if (checkPageBreaks && !childrenInline() && child->style()->pageBreakAfter() == PBALWAYS
     2130        bool checkAfterAlways = !childrenInline() && (checkPageBreaks && child->style()->pageBreakAfter() == PBALWAYS || checkColumnBreaks && child->style()->columnBreakAfter() == PBALWAYS);
     2131        if (checkAfterAlways
    21282132            && (ty + child->y() + child->height()) > paintInfo.rect.y()
    21292133            && (ty + child->y() + child->height()) < paintInfo.rect.bottom()) {
Note: See TracChangeset for help on using the changeset viewer.