Changeset 156742 in webkit
- Timestamp:
- Oct 1, 2013 3:47:49 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156741 r156742 1 2013-10-01 Joone Hur <joone.hur@intel.com> 2 3 Quirksmode: CSS1: WebKit fails dynamic :first-letter test 4 https://bugs.webkit.org/show_bug.cgi?id=15602 5 6 Reviewed by David Hyatt. 7 8 Add a test case that ensures that CSS first-letter property should work 9 properly when the first letter is changed by DOM scripting. 10 11 * fast/css/first-letter-block-change.html: Added. 12 * platform/efl/TestExpectations: 13 * platform/gtk-wk1/fast/css/first-letter-block-change-expected.png: Added. 14 * platform/gtk-wk2/fast/css/first-letter-block-change-expected.png: Added. 15 * platform/gtk/fast/css/first-letter-block-change-expected.txt: Added. 16 * platform/mac/TestExpectations: 17 1 18 2013-10-01 Brent Fulgham <bfulgham@apple.com> 2 19 -
trunk/LayoutTests/platform/efl/TestExpectations
r156692 r156742 1656 1656 webkit.org/b/119782 fast/forms/search-styled.html [ Failure ] 1657 1657 1658 # This test case needs to be rebaselined. 1659 webkit.org/b/15602 fast/css/first-letter-block-change.html [ Failure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r156692 r156742 1364 1364 1365 1365 webkit.org/b/122042 media/media-controller-playback.html [ Pass Failure ] 1366 1367 # This test case needs to be rebaselined. 1368 webkit.org/b/15602 fast/css/first-letter-block-change.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r156738 r156742 1 2013-10-01 Joone Hur <joone.hur@intel.com> 2 3 Quirksmode: CSS1: WebKit fails dynamic :first-letter test 4 https://bugs.webkit.org/show_bug.cgi?id=15602 5 6 Reviewed by David Hyatt. 7 8 CSS first-letter property does not work properly when the first letter is changed 9 by DOM scripting. 10 This patch allows to check if the existing first-letter is no longer the 11 first-letter. In this case, it deletes the old first-letter object and creates 12 a new one. For the remaining text, the oldRemainingText object is used 13 again for containing the full text(first letter + remaining text). 14 15 Test: fast/css/first-letter-block-change.html 16 17 * rendering/RenderBlock.cpp: 18 (WebCore::RenderBlock::updateFirstLetter): 19 1 20 2013-10-01 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r156738 r156742 5955 5955 return; 5956 5956 5957 // FIXME: We need to destroy the first-letter object if it is no longer the first child. Need to find5958 // an efficient way to check for that situation though before implementing anything.5959 5957 RenderElement* firstLetterBlock = findFirstLetterBlock(this); 5960 5958 if (!firstLetterBlock) … … 5988 5986 return; 5989 5987 5990 // If the child already has style, then it has already been created, so we just want5991 // to update it.5992 5988 if (descendant->parent()->style()->styleType() == FIRST_LETTER) { 5989 // Destroy the first-letter object if it is no longer the first child. 5990 RenderObject* remainingText = descendant->parent()->nextSibling(); 5991 if (remainingText && descendant->node() != remainingText->node()) { 5992 if (!remainingText->isText() || remainingText->isBR()) 5993 return; 5994 5995 LayoutStateDisabler layoutStateDisabler(&view()); 5996 5997 if (RenderObject* oldRemainingText = toRenderBoxModelObject(descendant->parent())->firstLetterRemainingText()) 5998 toRenderText(oldRemainingText)->setText(toText(oldRemainingText->node())->data().impl()); 5999 6000 createFirstLetterRenderer(firstLetterBlock, toRenderText(remainingText)); 6001 return; 6002 } 6003 6004 // If the child already has style, then it has already been created, so we just want 6005 // to update it. 5993 6006 updateFirstLetterStyle(firstLetterBlock, descendant); 5994 6007 return;
Note: See TracChangeset
for help on using the changeset viewer.