Changeset 123977 in webkit


Ignore:
Timestamp:
Jul 28, 2012 9:59:30 PM (12 years ago)
Author:
mitz@apple.com
Message:

Source/WebCore: RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
https://bugs.webkit.org/show_bug.cgi?id=92588

Reviewed by Sam Weinig.

Tests: fast/multicol/hit-test-block-axis-flipped.html

fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
(WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
work with an unflipped point.

LayoutTests: Hit test results are wrong in flipped blocks writing modes with block column axis
https://bugs.webkit.org/show_bug.cgi?id=92588

Reviewed by Sam Weinig.

  • fast/multicol/hit-test-block-axis-flipped-expected.txt: Added.
  • fast/multicol/hit-test-block-axis-flipped.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123975 r123977  
     12012-07-28  Dan Bernstein  <mitz@apple.com>
     2
     3        Hit test results are wrong in flipped blocks writing modes with block column axis
     4        https://bugs.webkit.org/show_bug.cgi?id=92588
     5
     6        Reviewed by Sam Weinig.
     7
     8        * fast/multicol/hit-test-block-axis-flipped-expected.txt: Added.
     9        * fast/multicol/hit-test-block-axis-flipped.html: Added.
     10
    1112012-07-28  Peter Kasting  <pkasting@google.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r123973 r123977  
     12012-07-28  Dan Bernstein  <mitz@apple.com>
     2
     3        RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
     4        https://bugs.webkit.org/show_bug.cgi?id=92588
     5
     6        Reviewed by Sam Weinig.
     7
     8        Tests: fast/multicol/hit-test-block-axis-flipped.html
     9               fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html
     10
     11        * rendering/RenderBlock.cpp:
     12        (WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
     13        coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
     14        (WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
     15        work with an unflipped point.
     16
    1172012-07-28  Dan Bernstein  <mitz@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r123973 r123977  
    50435043void RenderBlock::offsetForContents(LayoutPoint& offset) const
    50445044{
     5045    offset = flipForWritingMode(offset);
     5046
    50455047    if (hasOverflowClip())
    50465048        offset += scrolledContentOffset();
     
    50485050    if (hasColumns())
    50495051        adjustPointToColumnContents(offset);
     5052
     5053    offset = flipForWritingMode(offset);
    50505054}
    50515055
     
    52835287                // We're inside the column.  Translate the x and y into our column coordinate space.
    52845288                if (colInfo->progressionAxis() == ColumnInfo::InlineAxis)
    5285                     point.move(columnPoint.x() - colRect.x(), logicalOffset);
     5289                    point.move(columnPoint.x() - colRect.x(), (!style()->isFlippedBlocksWritingMode() ? logicalOffset : -logicalOffset));
    52865290                else
    52875291                    point.move((!style()->isFlippedBlocksWritingMode() ? logicalOffset : -logicalOffset) - colRect.x() + borderLeft() + paddingLeft(), 0);
    52885292                return;
    52895293            }
    5290            
     5294
    52915295            // Move to the next position.
    52925296            logicalOffset += colInfo->progressionAxis() == ColumnInfo::InlineAxis ? colRect.height() : colRect.width();
     
    53155319                // We're inside the column.  Translate the x and y into our column coordinate space.
    53165320                if (colInfo->progressionAxis() == ColumnInfo::InlineAxis)
    5317                     point.move(logicalOffset, columnPoint.y() - colRect.y());
     5321                    point.move((!style()->isFlippedBlocksWritingMode() ? logicalOffset : -logicalOffset), columnPoint.y() - colRect.y());
    53185322                else
    53195323                    point.move(0, (!style()->isFlippedBlocksWritingMode() ? logicalOffset : -logicalOffset) - colRect.y() + borderTop() + paddingTop());
    53205324                return;
    53215325            }
    5322            
     5326
    53235327            // Move to the next position.
    53245328            logicalOffset += colInfo->progressionAxis() == ColumnInfo::InlineAxis ? colRect.width() : colRect.height();
Note: See TracChangeset for help on using the changeset viewer.