Changeset 70959 in webkit


Ignore:
Timestamp:
Oct 29, 2010 5:38:31 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=48663

Reviewed by Sam Weinig.

Make repaint invalidation work with vertical lines. Rewrite linesBoundingBox for RenderText and
RenderInline to give the correct rectangle back for vertical lines. Also patch linesVisibleOverflowBoundingBox
to give back the correct rectangle for vertical lines.

Fix bugs in the overflow accessors of InlineFlowBox when m_overflow was 0.

Added fast/repaint/inline-vertical-lr-overflow.html

WebCore:

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::adjustForFlippedBlocksWritingMode):

  • rendering/InlineFlowBox.h:

(WebCore::InlineFlowBox::logicalLeftVisibleOverflow):
(WebCore::InlineFlowBox::logicalRightVisibleOverflow):
(WebCore::InlineFlowBox::bottomLayoutOverflow):
(WebCore::InlineFlowBox::rightLayoutOverflow):
(WebCore::InlineFlowBox::bottomVisualOverflow):
(WebCore::InlineFlowBox::rightVisualOverflow):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::adjustForFlippedBlocksWritingMode):

  • rendering/RenderBox.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::linesBoundingBox):
(WebCore::RenderInline::linesVisibleOverflowBoundingBox):
(WebCore::RenderInline::clippedOverflowRectForRepaint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::linesBoundingBox):

LayoutTests:

  • fast/repaint/inline-vertical-rl-overflow.html: Added.
  • platform/mac/fast/blockflow/background-vertical-lr-expected.txt:
  • platform/mac/fast/blockflow/background-vertical-rl-expected.txt:
  • platform/mac/fast/blockflow/basic-vertical-line-expected.txt:
  • platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt:
  • platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt:
  • platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.txt:
  • platform/mac/fast/blockflow/border-vertical-lr-expected.checksum:
  • platform/mac/fast/blockflow/border-vertical-lr-expected.png:
  • platform/mac/fast/blockflow/border-vertical-lr-expected.txt:
  • platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt:
  • platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt:
  • platform/mac/fast/blockflow/english-lr-text-expected.txt:
  • platform/mac/fast/blockflow/english-rl-text-expected.txt:
  • platform/mac/fast/blockflow/japanese-lr-text-expected.txt:
  • platform/mac/fast/blockflow/japanese-rl-text-expected.txt:
  • platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.checksum: Added.
  • platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.png: Added.
  • platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.txt: Added.
  • platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt:
Location:
trunk
Files:
4 added
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r70958 r70959  
     12010-10-29  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=48663
     6
     7        Make repaint invalidation work with vertical lines.  Rewrite linesBoundingBox for RenderText and
     8        RenderInline to give the correct rectangle back for vertical lines.  Also patch linesVisibleOverflowBoundingBox
     9        to give back the correct rectangle for vertical lines.
     10       
     11        Fix bugs in the overflow accessors of InlineFlowBox when m_overflow was 0.
     12
     13        Added fast/repaint/inline-vertical-lr-overflow.html
     14
     15        * fast/repaint/inline-vertical-rl-overflow.html: Added.
     16        * platform/mac/fast/blockflow/background-vertical-lr-expected.txt:
     17        * platform/mac/fast/blockflow/background-vertical-rl-expected.txt:
     18        * platform/mac/fast/blockflow/basic-vertical-line-expected.txt:
     19        * platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt:
     20        * platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt:
     21        * platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.txt:
     22        * platform/mac/fast/blockflow/border-vertical-lr-expected.checksum:
     23        * platform/mac/fast/blockflow/border-vertical-lr-expected.png:
     24        * platform/mac/fast/blockflow/border-vertical-lr-expected.txt:
     25        * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt:
     26        * platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt:
     27        * platform/mac/fast/blockflow/english-lr-text-expected.txt:
     28        * platform/mac/fast/blockflow/english-rl-text-expected.txt:
     29        * platform/mac/fast/blockflow/japanese-lr-text-expected.txt:
     30        * platform/mac/fast/blockflow/japanese-rl-text-expected.txt:
     31        * platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.checksum: Added.
     32        * platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.png: Added.
     33        * platform/mac/fast/repaint/inline-vertical-rl-overflow-expected.txt: Added.
     34        * platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt:
     35
    1362010-10-29  James Robinson  <jamesr@chromium.org>
    237
  • trunk/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.txt

    r70816 r70959  
    44  RenderBlock {HTML} at (0,0) size 456x600
    55    RenderBody {BODY} at (8,8) size 440x584
    6       RenderInline {SPAN} at (0,0) size 220x98
     6      RenderInline {SPAN} at (0,0) size 268x50
    77        RenderBlock {DIV} at (71,50) size 0x50
    8         RenderBR {BR} at (50,100) size 0x98
     8        RenderBR {BR} at (50,100) size 98x0
    99        RenderBlock {DIV} at (241,50) size 0x50
    1010      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.txt

    r70816 r70959  
    44  RenderBlock {HTML} at (0,0) size 456x600
    55    RenderBody {BODY} at (8,8) size 440x584
    6       RenderInline {SPAN} at (0,0) size 220x98
     6      RenderInline {SPAN} at (0,0) size 268x50
    77        RenderBlock {DIV} at (163,50) size 0x50
    8         RenderBR {BR} at (86,100) size 0x98
     8        RenderBR {BR} at (86,100) size 98x0
    99        RenderBlock {DIV} at (333,50) size 0x50
    1010      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/basic-vertical-line-expected.txt

    r70172 r70959  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 316x304 [border: (2px solid #800000)]
    7         RenderInline {SPAN} at (0,0) size 220x18 [border: (5px solid #000000) none (5px solid #000000) none]
     7        RenderInline {SPAN} at (0,0) size 18x220 [border: (5px solid #000000) none (5px solid #000000) none]
    88          RenderImage {IMG} at (6,12) size 100x200 [bgcolor=#008000]
    9         RenderText {#text} at (2,222) size 4x18
     9        RenderText {#text} at (2,222) size 18x4
    1010          text run at (2,222) width 4: " "
    1111        RenderBR {BR} at (6,226) size 0x0
    12         RenderInline {SPAN} at (0,0) size 220x18 [border: (5px solid #000000) none (5px solid #000000) none]
     12        RenderInline {SPAN} at (0,0) size 18x220 [border: (5px solid #000000) none (5px solid #000000) none]
    1313          RenderImage {IMG} at (110,12) size 100x200 [bgcolor=#008000]
    14         RenderText {#text} at (106,222) size 4x18
     14        RenderText {#text} at (106,222) size 18x4
    1515          text run at (106,222) width 4: " "
    1616        RenderBR {BR} at (110,226) size 0x0
    17         RenderInline {SPAN} at (0,0) size 220x18 [border: (5px solid #000000) none (5px solid #000000) none]
     17        RenderInline {SPAN} at (0,0) size 18x220 [border: (5px solid #000000) none (5px solid #000000) none]
    1818          RenderImage {IMG} at (214,12) size 100x200 [bgcolor=#008000]
    1919        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt

    r70813 r70959  
    44  RenderBlock {HTML} at (0,0) size 460x600
    55    RenderBody {BODY} at (8,8) size 444x584
    6       RenderInline {SPAN} at (0,0) size 252x121 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
     6      RenderInline {SPAN} at (0,0) size 323x80 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
    77        RenderBlock {DIV} at (93,101) size 0x25
    8         RenderBR {BR} at (71,126) size 0x100
     8        RenderBR {BR} at (71,126) size 100x0
    99        RenderBlock {DIV} at (265,50) size 0x50
    1010      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt

    r70813 r70959  
    44  RenderBlock {HTML} at (0,0) size 460x600
    55    RenderBody {BODY} at (8,8) size 444x584
    6       RenderInline {SPAN} at (0,0) size 252x121 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
     6      RenderInline {SPAN} at (0,0) size 323x80 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
    77        RenderBlock {DIV} at (164,101) size 0x25
    8         RenderBR {BR} at (86,126) size 0x100
     8        RenderBR {BR} at (86,126) size 100x0
    99        RenderBlock {DIV} at (336,50) size 0x50
    1010      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.txt

    r70848 r70959  
    55    RenderBody {BODY} at (8,8) size 727x584
    66      RenderBlock {DIV} at (0,0) size 144x600
    7         RenderInline {SPAN} at (0,0) size 613x65 [bgcolor=#0000FF]
     7        RenderInline {SPAN} at (0,0) size 137x613 [bgcolor=#0000FF]
    88          RenderText {#text} at (0,0) size 0x0
    9           RenderInline {SPAN} at (0,0) size 598x50 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
    10             RenderText {#text} at (5,35) size 578x20
     9          RenderInline {SPAN} at (0,0) size 137x613 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
     10            RenderText {#text} at (5,35) size 127x613
    1111              text run at (5,35) width 578: "This sentence is too long to fit"
    1212              text run at (77,0) width 302: "on a single line."
  • trunk/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.checksum

    r70843 r70959  
    1 30657bb8adbb3c333bf2920cae041ad0
     1902397878764a7659f5b994fc8d5d02c
  • trunk/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.txt

    r70692 r70959  
    1 layer at (0,0) size 1181x585
    2   RenderView at (0,0) size 800x585
    3 layer at (0,0) size 1181x585
    4   RenderBlock {HTML} at (0,0) size 772x585
    5     RenderBody {BODY} at (8,8) size 756x569
    6       RenderInline {SPAN} at (0,0) size 676x29 [border: (2px solid #000000)]
    7         RenderText {#text} at (4,4) size 676x17
    8           text run at (4,4) width 529: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}"
    9           text run at (67,0) width 529: "\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B}\x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}"
    10           text run at (130,0) width 550: "\x{3051}\x{3067}\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}"
    11           text run at (193,0) width 212: "\x{3059}\x{308B}\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}"
    12       RenderText {#text} at (193,216) size 7x21
    13         text run at (193,216) width 7: " "
     1layer at (0,0) size 800x600
     2  RenderView at (0,0) size 800x600
     3layer at (0,0) size 772x600
     4  RenderBlock {HTML} at (0,0) size 772x600
     5    RenderBody {BODY} at (8,8) size 756x584
     6      RenderInline {SPAN} at (0,0) size 218x554 [border: (2px solid #000000)]
     7        RenderText {#text} at (4,4) size 210x554
     8          text run at (4,4) width 550: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}\x{3066}"
     9          text run at (67,0) width 550: "\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B}\x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}"
     10          text run at (130,0) width 550: "\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}\x{3059}\x{308B}"
     11          text run at (193,0) width 170: "\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}"
     12      RenderText {#text} at (193,174) size 21x7
     13        text run at (193,174) width 7: " "
    1414      RenderBR {BR} at (0,0) size 0x0
    15       RenderBR {BR} at (252,0) size 0x21
    16       RenderInline {SPAN} at (0,0) size 858x35 [border: (5px solid #000000)]
    17         RenderText {#text} at (322,7) size 851x14
    18           text run at (322,7) width 529: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}"
    19           text run at (385,0) width 536: "\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B} \x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}"
    20           text run at (448,0) width 550: "\x{3051}\x{3067}\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}"
    21           text run at (511,0) width 550: "\x{3059}\x{308B}\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}"
    22           text run at (574,0) width 529: "\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}\x{3059}\x{308B}\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}"
    23           text run at (637,0) width 529: "\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}"
    24           text run at (700,0) width 473: "\x{307E}\x{3059}\x{304B} \x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}"
     15      RenderBR {BR} at (252,0) size 21x0
     16      RenderInline {SPAN} at (0,0) size 413x558 [border: (5px solid #000000)]
     17        RenderText {#text} at (322,7) size 399x558
     18          text run at (322,7) width 550: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}\x{3066}"
     19          text run at (385,0) width 558: "\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B} \x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}"
     20          text run at (448,0) width 550: "\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}\x{3059}\x{308B}"
     21          text run at (511,0) width 550: "\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}\x{8A2A}\x{554F}\x{3057}\x{305F}\x{30A6}\x{30A7}\x{30D6}\x{30DA}\x{30FC}\x{30B8}\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}"
     22          text run at (574,0) width 550: "\x{3082}\x{691C}\x{7D22}\x{3059}\x{308B}\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}"
     23          text run at (637,0) width 558: "\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B} \x{306A}"
     24          text run at (700,0) width 381: "\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}"
    2525      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt

    r70843 r70959  
    55    RenderBody {BODY} at (8,8) size 769x584
    66      RenderBlock {DIV} at (0,0) size 144x600
    7         RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
    8           RenderText {#text} at (5,21) size 578x173
     7        RenderInline {SPAN} at (0,0) size 137x598 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
     8          RenderText {#text} at (5,21) size 127x578
    99            text run at (5,21) width 578: "This sentence is too long to fit"
    1010            text run at (77,139) width 302: "on a single line."
    1111        RenderText {#text} at (0,0) size 0x0
    1212      RenderBlock {DIV} at (194,0) size 144x600
    13         RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
    14           RenderText {#text} at (5,21) size 578x173
     13        RenderInline {SPAN} at (0,0) size 137x598 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
     14          RenderText {#text} at (5,21) size 127x578
    1515            text run at (5,21) width 578: "This sentence is too long to fit"
    1616            text run at (77,139) width 302: "on a single line."
  • trunk/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt

    r70843 r70959  
    55    RenderBody {BODY} at (8,8) size 769x584
    66      RenderBlock {DIV} at (0,0) size 144x600
    7         RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
    8           RenderText {#text} at (8,21) size 578x173
     7        RenderInline {SPAN} at (0,0) size 137x598 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
     8          RenderText {#text} at (8,21) size 127x578
    99            text run at (8,21) width 578: "This sentence is too long to fit"
    1010            text run at (80,139) width 302: "on a single line."
    1111        RenderText {#text} at (0,0) size 0x0
    1212      RenderBlock {DIV} at (194,0) size 144x600
    13         RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
    14           RenderText {#text} at (8,21) size 578x173
     13        RenderInline {SPAN} at (0,0) size 137x598 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
     14          RenderText {#text} at (8,21) size 127x578
    1515            text run at (8,21) width 578: "This sentence is too long to fit"
    1616            text run at (80,139) width 302: "on a single line."
  • trunk/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.txt

    r70569 r70959  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 132x500
    7         RenderInline {SPAN} at (0,0) size 395x22
    8           RenderText {#text} at (0,0) size 395x22
     7        RenderInline {SPAN} at (0,0) size 22x395
     8          RenderText {#text} at (0,0) size 22x395
    99            text run at (0,0) width 395: "This text should be rotated 90 degrees and underlined."
    10         RenderText {#text} at (0,395) size 5x22
     10        RenderText {#text} at (0,395) size 22x5
    1111          text run at (0,395) width 5: " "
    1212        RenderBR {BR} at (5,400) size 0x0
    13         RenderInline {SPAN} at (0,0) size 386x22
    14           RenderText {#text} at (22,0) size 386x22
     13        RenderInline {SPAN} at (0,0) size 22x386
     14          RenderText {#text} at (22,0) size 22x386
    1515            text run at (22,0) width 386: "This text should be rotated 90 degrees and overlined."
    16         RenderText {#text} at (22,386) size 5x22
     16        RenderText {#text} at (22,386) size 22x5
    1717          text run at (22,386) width 5: " "
    1818        RenderBR {BR} at (27,391) size 0x0
    19         RenderInline {SPAN} at (0,0) size 423x22
    20           RenderText {#text} at (44,0) size 423x22
     19        RenderInline {SPAN} at (0,0) size 22x423
     20          RenderText {#text} at (44,0) size 22x423
    2121            text run at (44,0) width 423: "This text should be rotated 90 degrees and struck through."
    22         RenderText {#text} at (44,423) size 5x22
     22        RenderText {#text} at (44,423) size 22x5
    2323          text run at (44,423) width 5: " "
    2424        RenderBR {BR} at (49,428) size 0x0
    25         RenderInline {SPAN} at (0,0) size 449x22
    26           RenderText {#text} at (66,0) size 449x22
     25        RenderInline {SPAN} at (0,0) size 22x449
     26          RenderText {#text} at (66,0) size 22x449
    2727            text run at (66,0) width 449: "This text should have a red shadow that is offset horizontally."
    28         RenderText {#text} at (66,449) size 5x22
     28        RenderText {#text} at (66,449) size 22x5
    2929          text run at (66,449) width 5: " "
    3030        RenderBR {BR} at (71,454) size 0x0
    31         RenderBR {BR} at (88,0) size 0x22
    32         RenderInline {SPAN} at (0,0) size 460x22
    33           RenderText {#text} at (110,0) size 460x22
     31        RenderBR {BR} at (88,0) size 22x0
     32        RenderInline {SPAN} at (0,0) size 22x460
     33          RenderText {#text} at (110,0) size 22x460
    3434            text run at (110,0) width 460: "This text should have an overline plus horizontal green shadow"
  • trunk/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.txt

    r70569 r70959  
    66      RenderBlock {DIV} at (18,2) size 204x580 [border: (2px solid #800000)]
    77        RenderBlock (floating) {DIV} at (2,478) size 100x100 [bgcolor=#00FF00]
    8         RenderText {#text} at (2,2) size 280x18
     8        RenderText {#text} at (2,2) size 36x472
    99          text run at (2,2) width 280: "Here is some text in a vertical-rl block flow. "
    1010          text run at (2,282) width 192: "The block direction is right-to-"
    1111          text run at (20,2) width 24: "left."
    1212        RenderBR {BR} at (34,26) size 0x0
    13         RenderText {#text} at (38,2) size 203x18
     13        RenderText {#text} at (38,2) size 18x203
    1414          text run at (38,2) width 203: "This line should also be vertical."
  • trunk/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.txt

    r70668 r70959  
    44  RenderBlock {HTML} at (0,0) size 398x600 [border: (10px solid #800000)]
    55    RenderBody {BODY} at (18,18) size 362x564 [border: (5px solid #000000)]
    6       RenderText {#text} at (5,5) size 803x21
     6      RenderText {#text} at (5,5) size 341x529
    77        text run at (5,5) width 529: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}"
    88        text run at (37,5) width 529: "\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B}\x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}"
  • trunk/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.txt

    r70668 r70959  
    44  RenderBlock {HTML} at (0,0) size 398x600 [border: (10px solid #800000)]
    55    RenderBody {BODY} at (18,18) size 362x564 [border: (5px solid #000000)]
    6       RenderText {#text} at (10,5) size 803x21
     6      RenderText {#text} at (10,5) size 341x529
    77        text run at (10,5) width 529: "\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}"
    88        text run at (42,5) width 529: "\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B}\x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}"
  • trunk/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt

    r70569 r70959  
    99      RenderBlock (anonymous) at (0,53) size 769x235
    1010        RenderBlock {SPAN} at (0,0) size 32x226
    11           RenderText {#text} at (5,0) size 226x21
     11          RenderText {#text} at (5,0) size 21x226
    1212            text run at (5,0) width 226: "string\x{300C}\x{3042}\x{3001}\x{5909}\x{3063}\x{FF01}\x{300D}\x{3002}"
    1313        RenderText {#text} at (0,0) size 0x0
     
    1818      RenderBlock (anonymous) at (0,374) size 769x232
    1919        RenderBlock {SPAN} at (0,0) size 32x223
    20           RenderText {#text} at (5,0) size 223x21
     20          RenderText {#text} at (5,0) size 21x223
    2121            text run at (5,0) width 223: "string\x{300C}\x{3042}\x{3001}\x{5909}\x{3063}\x{FF01}\x{300D}\x{3002}"
    2222        RenderText {#text} at (0,0) size 0x0
  • trunk/WebCore/ChangeLog

    r70957 r70959  
     12010-10-29  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=48663
     6
     7        Make repaint invalidation work with vertical lines.  Rewrite linesBoundingBox for RenderText and
     8        RenderInline to give the correct rectangle back for vertical lines.  Also patch linesVisibleOverflowBoundingBox
     9        to give back the correct rectangle for vertical lines.
     10       
     11        Fix bugs in the overflow accessors of InlineFlowBox when m_overflow was 0.
     12
     13        Added fast/repaint/inline-vertical-lr-overflow.html
     14
     15        * rendering/InlineBox.cpp:
     16        (WebCore::InlineBox::adjustForFlippedBlocksWritingMode):
     17        * rendering/InlineFlowBox.h:
     18        (WebCore::InlineFlowBox::logicalLeftVisibleOverflow):
     19        (WebCore::InlineFlowBox::logicalRightVisibleOverflow):
     20        (WebCore::InlineFlowBox::bottomLayoutOverflow):
     21        (WebCore::InlineFlowBox::rightLayoutOverflow):
     22        (WebCore::InlineFlowBox::bottomVisualOverflow):
     23        (WebCore::InlineFlowBox::rightVisualOverflow):
     24        * rendering/RenderBox.cpp:
     25        (WebCore::RenderBox::adjustForFlippedBlocksWritingMode):
     26        * rendering/RenderBox.h:
     27        * rendering/RenderInline.cpp:
     28        (WebCore::RenderInline::linesBoundingBox):
     29        (WebCore::RenderInline::linesVisibleOverflowBoundingBox):
     30        (WebCore::RenderInline::clippedOverflowRectForRepaint):
     31        * rendering/RenderText.cpp:
     32        (WebCore::RenderText::linesBoundingBox):
     33
    1342010-10-29  Mike Lawther  <mikelawther@chromium.org>
    235
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r70904 r70959  
    2130221302                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
    2130321303                        compatibilityVersion = "Xcode 2.4";
     21304                        developmentRegion = English;
    2130421305                        hasScannedForEncodings = 1;
    2130521306                        knownRegions = (
  • trunk/WebCore/rendering/InlineBox.cpp

    r70917 r70959  
    296296    if (!renderer()->style()->isFlippedBlocksWritingMode())
    297297        return;
    298    
    299     RenderBlock* block = root()->block();
    300     if (block->style()->isHorizontalWritingMode())
    301         rect.setY(block->height() - rect.bottom());
    302     else
    303         rect.setX(block->width() - rect.right());
     298    return root()->block()->adjustForFlippedBlocksWritingMode(rect);
    304299}
    305300
  • trunk/WebCore/rendering/InlineFlowBox.h

    r70356 r70959  
    183183    int leftVisibleOverflow() const { return std::min(leftLayoutOverflow(), leftVisualOverflow()); }
    184184    int rightVisibleOverflow() const { return std::max(rightLayoutOverflow(), rightVisualOverflow()); }
     185    int logicalLeftVisibleOverflow() const { return std::min(logicalLeftLayoutOverflow(), logicalLeftVisualOverflow()); }
     186    int logicalRightVisibleOverflow() const { return std::max(logicalRightLayoutOverflow(), logicalRightVisualOverflow()); }
    185187    int logicalTopVisibleOverflow() const { return std::min(logicalTopLayoutOverflow(), logicalTopVisualOverflow()); }
    186188    int logicalBottomVisibleOverflow() const { return std::max(logicalBottomLayoutOverflow(), logicalBottomVisualOverflow()); }
     
    189191
    190192    int topLayoutOverflow() const { return m_overflow ? m_overflow->topLayoutOverflow() : m_y; }
    191     int bottomLayoutOverflow() const { return m_overflow ? m_overflow->bottomLayoutOverflow() : m_y + logicalHeight(); }
     193    int bottomLayoutOverflow() const { return m_overflow ? m_overflow->bottomLayoutOverflow() : m_y + height(); }
    192194    int leftLayoutOverflow() const { return m_overflow ? m_overflow->leftLayoutOverflow() : m_x; }
    193     int rightLayoutOverflow() const { return m_overflow ? m_overflow->rightLayoutOverflow() : m_x + m_logicalWidth; }
     195    int rightLayoutOverflow() const { return m_overflow ? m_overflow->rightLayoutOverflow() : m_x + width(); }
    194196    IntRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : IntRect(m_x, m_y, width(), height()); }
    195197    int logicalLeftLayoutOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? leftLayoutOverflow() : topLayoutOverflow(); }
     
    199201
    200202    int topVisualOverflow() const { return m_overflow ? m_overflow->topVisualOverflow() : m_y; }
    201     int bottomVisualOverflow() const { return m_overflow ? m_overflow->bottomVisualOverflow() : m_y + logicalHeight(); }
     203    int bottomVisualOverflow() const { return m_overflow ? m_overflow->bottomVisualOverflow() : m_y + height(); }
    202204    int leftVisualOverflow() const { return m_overflow ? m_overflow->leftVisualOverflow() : m_x; }
    203     int rightVisualOverflow() const { return m_overflow ? m_overflow->rightVisualOverflow() : m_x + m_logicalWidth; }
     205    int rightVisualOverflow() const { return m_overflow ? m_overflow->rightVisualOverflow() : m_x + width(); }
    204206    IntRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : IntRect(m_x, m_y, width(), height()); }
    205207    int logicalLeftVisualOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? leftVisualOverflow() : topVisualOverflow(); }
  • trunk/WebCore/rendering/RenderBox.cpp

    r70917 r70959  
    32123212}
    32133213
     3214void RenderBox::adjustForFlippedBlocksWritingMode(IntRect& rect)
     3215{
     3216    if (!style()->isFlippedBlocksWritingMode())
     3217        return;
     3218   
     3219    if (style()->isHorizontalWritingMode())
     3220        rect.setY(height() - rect.bottom());
     3221    else
     3222        rect.setX(width() - rect.right());
     3223}
     3224
    32143225int RenderBox::convertFromFlippedWritingMode(int logicalPosition)
    32153226{
  • trunk/WebCore/rendering/RenderBox.h

    r70917 r70959  
    380380    enum FlippingAdjustment { ChildToParentFlippingAdjustment, ParentToChildFlippingAdjustment };
    381381    void adjustForFlippedBlocksWritingMode(RenderBox* child, IntPoint&, FlippingAdjustment);
     382    void adjustForFlippedBlocksWritingMode(IntRect&); // Unflips a rect in our coordinate space.
    382383    int convertFromFlippedWritingMode(int position);
    383384    IntSize locationOffsetIncludingFlipping();
  • trunk/WebCore/rendering/RenderInline.cpp

    r70072 r70959  
    560560    if (firstLineBox() && lastLineBox()) {
    561561        // Return the width of the minimal left side and the maximal right side.
    562         int leftSide = 0;
    563         int rightSide = 0;
     562        int logicalLeftSide = 0;
     563        int logicalRightSide = 0;
    564564        for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
    565             if (curr == firstLineBox() || curr->x() < leftSide)
    566                 leftSide = curr->x();
    567             if (curr == firstLineBox() || curr->x() + curr->logicalWidth() > rightSide)
    568                 rightSide = curr->x() + curr->logicalWidth();
    569         }
    570         result.setWidth(rightSide - leftSide);
    571         result.setX(leftSide);
    572         result.setHeight(lastLineBox()->y() + lastLineBox()->logicalHeight() - firstLineBox()->y());
    573         result.setY(firstLineBox()->y());
     565            if (curr == firstLineBox() || curr->logicalLeft() < logicalLeftSide)
     566                logicalLeftSide = curr->logicalLeft();
     567            if (curr == firstLineBox() || curr->logicalRight() > logicalRightSide)
     568                logicalRightSide = curr->logicalRight();
     569        }
     570       
     571        bool isHorizontal = style()->isHorizontalWritingMode();
     572       
     573        int x = isHorizontal ? logicalLeftSide : firstLineBox()->x();
     574        int y = isHorizontal ? firstLineBox()->y() : logicalLeftSide;
     575        int width = isHorizontal ? logicalRightSide - logicalLeftSide : lastLineBox()->logicalBottom() - x;
     576        int height = isHorizontal ? lastLineBox()->logicalBottom() - y : logicalRightSide - logicalLeftSide;
     577        result = IntRect(x, y, width, height);
    574578    }
    575579
     
    583587
    584588    // Return the width of the minimal left side and the maximal right side.
    585     int leftSide = numeric_limits<int>::max();
    586     int rightSide = numeric_limits<int>::min();
     589    int logicalLeftSide = numeric_limits<int>::max();
     590    int logicalRightSide = numeric_limits<int>::min();
    587591    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
    588         leftSide = min(leftSide, curr->leftVisibleOverflow());
    589         rightSide = max(rightSide, curr->rightVisibleOverflow());
    590     }
    591 
    592     return IntRect(leftSide, firstLineBox()->topVisibleOverflow(), rightSide - leftSide,
    593         lastLineBox()->bottomVisibleOverflow() - firstLineBox()->topVisibleOverflow());
     592        logicalLeftSide = min(logicalLeftSide, curr->logicalLeftVisibleOverflow());
     593        logicalRightSide = max(logicalRightSide, curr->logicalRightVisibleOverflow());
     594    }
     595
     596    bool isHorizontal = style()->isHorizontalWritingMode();
     597       
     598    int x = isHorizontal ? logicalLeftSide : firstLineBox()->topVisibleOverflow();
     599    int y = isHorizontal ? firstLineBox()->leftVisibleOverflow() : logicalLeftSide;
     600    int width = isHorizontal ? logicalRightSide - logicalLeftSide : lastLineBox()->rightVisibleOverflow() - firstLineBox()->leftVisibleOverflow();
     601    int height = isHorizontal ? lastLineBox()->bottomVisibleOverflow() - firstLineBox()->topVisibleOverflow() : logicalRightSide - logicalLeftSide;
     602    return IntRect(x, y, width, height);
    594603}
    595604
     
    620629
    621630    IntRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2);
     631    cb->adjustForFlippedBlocksWritingMode(r);
     632
    622633    if (cb->hasColumns())
    623634        cb->adjustRectForColumns(r);
  • trunk/WebCore/rendering/RenderText.cpp

    r70072 r70959  
    12381238    if (firstTextBox() && lastTextBox()) {
    12391239        // Return the width of the minimal left side and the maximal right side.
    1240         int leftSide = 0;
    1241         int rightSide = 0;
     1240        int logicalLeftSide = 0;
     1241        int logicalRightSide = 0;
    12421242        for (InlineTextBox* curr = firstTextBox(); curr; curr = curr->nextTextBox()) {
    1243             if (curr == firstTextBox() || curr->x() < leftSide)
    1244                 leftSide = curr->x();
    1245             if (curr == firstTextBox() || curr->x() + curr->logicalWidth() > rightSide)
    1246                 rightSide = curr->x() + curr->logicalWidth();
     1243            if (curr == firstTextBox() || curr->logicalLeft() < logicalLeftSide)
     1244                logicalLeftSide = curr->logicalLeft();
     1245            if (curr == firstTextBox() || curr->logicalRight() > logicalRightSide)
     1246                logicalRightSide = curr->logicalRight();
    12471247        }
    1248         result.setWidth(rightSide - leftSide);
    1249         result.setX(leftSide);
    1250         result.setHeight(lastTextBox()->y() + lastTextBox()->logicalHeight() - firstTextBox()->y());
    1251         result.setY(firstTextBox()->y());
     1248       
     1249        bool isHorizontal = style()->isHorizontalWritingMode();
     1250       
     1251        int x = isHorizontal ? logicalLeftSide : firstTextBox()->x();
     1252        int y = isHorizontal ? firstTextBox()->y() : logicalLeftSide;
     1253        int width = isHorizontal ? logicalRightSide - logicalLeftSide : lastTextBox()->logicalBottom() - x;
     1254        int height = isHorizontal ? lastTextBox()->logicalBottom() - y : logicalRightSide - logicalLeftSide;
     1255        result = IntRect(x, y, width, height);
    12521256    }
    12531257
Note: See TracChangeset for help on using the changeset viewer.