Changeset 70813 in webkit
- Timestamp:
- Oct 28, 2010 2:44:40 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70810 r70813 1 2010-10-28 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 https://bugs.webkit.org/show_bug.cgi?id=48443 6 7 Border images don't work right with vertical RenderInlines. Make border/mask/background painting 8 do the right thing for vertical strips. 9 10 * fast/blockflow/border-image-horizontal-bt.html: Added. 11 * fast/blockflow/border-image-vertical-lr.html: Added. 12 * fast/blockflow/border-image-vertical-rl.html: Added. 13 1 14 2010-10-28 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/WebCore/ChangeLog
r70812 r70813 1 2010-10-28 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 https://bugs.webkit.org/show_bug.cgi?id=48443 6 7 Border images don't work right with vertical RenderInlines. Make border/mask/background painting 8 do the right thing for vertical strips. 9 10 Added fast/blockflow/border-image-* tests. 11 12 * rendering/InlineFlowBox.cpp: 13 (WebCore::InlineFlowBox::paintBoxDecorations): 14 (WebCore::InlineFlowBox::paintMask): 15 1 16 2010-10-28 Patrick Gansterer <paroga@webkit.org> 2 17 -
trunk/WebCore/rendering/InlineFlowBox.cpp
r70482 r70813 845 845 else { 846 846 // We have a border image that spans multiple lines. 847 // We need to adjust _tx and _ty by the width of all previous lines.847 // We need to adjust tx and ty by the width of all previous lines. 848 848 // Think of border image painting on inlines as though you had one long line, a single continuous 849 849 // strip. Even though that strip has been broken up across multiple lines, you still paint it … … 852 852 // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right, 853 853 // but it isn't even clear how this should work at all. 854 int xOffsetOnLine = 0;854 int logicalOffsetOnLine = 0; 855 855 for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox()) 856 xOffsetOnLine += curr->logicalWidth(); 857 int startX = tx - xOffsetOnLine; 858 int totalWidth = xOffsetOnLine; 856 logicalOffsetOnLine += curr->logicalWidth(); 857 int totalLogicalWidth = logicalOffsetOnLine; 859 858 for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox()) 860 totalWidth += curr->logicalWidth(); 859 totalLogicalWidth += curr->logicalWidth(); 860 int stripX = tx - (isVertical() ? 0 : logicalOffsetOnLine); 861 int stripY = ty - (isVertical() ? logicalOffsetOnLine : 0); 862 int stripWidth = isVertical() ? w : totalLogicalWidth; 863 int stripHeight = isVertical() ? totalLogicalWidth : h; 861 864 context->save(); 862 865 context->clip(IntRect(tx, ty, w, h)); 863 boxModelObject()->paintBorder(context, st artX, ty, totalWidth, h, renderer()->style());866 boxModelObject()->paintBorder(context, stripX, stripY, stripWidth, stripHeight, renderer()->style()); 864 867 context->restore(); 865 868 } … … 927 930 // We have a mask image that spans multiple lines. 928 931 // We need to adjust _tx and _ty by the width of all previous lines. 929 int xOffsetOnLine = 0;932 int logicalOffsetOnLine = 0; 930 933 for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox()) 931 xOffsetOnLine += curr->logicalWidth(); 932 int startX = tx - xOffsetOnLine; 933 int totalWidth = xOffsetOnLine; 934 logicalOffsetOnLine += curr->logicalWidth(); 935 int totalLogicalWidth = logicalOffsetOnLine; 934 936 for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox()) 935 totalWidth += curr->logicalWidth(); 937 totalLogicalWidth += curr->logicalWidth(); 938 int stripX = tx - (isVertical() ? 0 : logicalOffsetOnLine); 939 int stripY = ty - (isVertical() ? logicalOffsetOnLine : 0); 940 int stripWidth = isVertical() ? w : totalLogicalWidth; 941 int stripHeight = isVertical() ? totalLogicalWidth : h; 936 942 paintInfo.context->save(); 937 943 paintInfo.context->clip(IntRect(tx, ty, w, h)); 938 boxModelObject()->paintNinePieceImage(paintInfo.context, st artX, ty, totalWidth, h, renderer()->style(), maskNinePieceImage, compositeOp);944 boxModelObject()->paintNinePieceImage(paintInfo.context, stripX, stripY, stripWidth, stripHeight, renderer()->style(), maskNinePieceImage, compositeOp); 939 945 paintInfo.context->restore(); 940 946 }
Note: See TracChangeset
for help on using the changeset viewer.