Changeset 130555 in webkit
- Timestamp:
- Oct 5, 2012 2:54:20 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130553 r130555 1 2012-10-05 Takashi Sakamoto <tasak@google.com> 2 3 Inline continuations create :after generated content on style recalcs 4 https://bugs.webkit.org/show_bug.cgi?id=93170 5 6 Reviewed by Abhishek Arya. 7 8 * fast/css-generated-content/after-with-inline-continuation-expected.html: Added. 9 * fast/css-generated-content/after-with-inline-continuation.html: Added. 10 * fast/css-generated-content/dynamic-apply-after-for-inline-expected.html: Added. 11 * fast/css-generated-content/dynamic-apply-after-for-inline.html: Added. 12 * http/tests/misc/acid3-expected.txt: 13 The acid3-expected.txt has the duplicate RenderBlock (positioned). 14 Two 'layer at(638, 18) size 20x20, ... text run at (0,0) width 20: "X"' 15 exist. So did reset-results for acid3-expected.txt. 16 1 17 2012-10-05 Tony Chang <tony@chromium.org> 2 18 -
trunk/LayoutTests/http/tests/misc/acid3-expected.txt
r118566 r130555 217 217 RenderText {#text} at (299,39) size 4x17 218 218 text run at (299,39) width 4: "." 219 layer at (638,18) size 20x20220 RenderBlock (positioned) at (638,18) size 20x20 [color=#FFFFFF] [bgcolor=#FF00FF]221 RenderText at (0,0) size 20x20222 text run at (0,0) width 20: "X"223 219 layer at (130,84) size 300x150 224 220 RenderEmbeddedObject {OBJECT} at (130,84) size 300x150 -
trunk/Source/WebCore/ChangeLog
r130554 r130555 1 2012-10-05 Takashi Sakamoto <tasak@google.com> 2 3 Inline continuations create :after generated content on style recalcs 4 https://bugs.webkit.org/show_bug.cgi?id=93170 5 6 Reviewed by Abhishek Arya. 7 8 The bug is caused by RenderInline::styleDidChange's setContinuation(0). 9 RenderObjectChildList uses continuation to know whether the given 10 renderer should have AFTER render object or not. 11 However, setContinuation(0) makes RenderObjectChildList to 12 misunderstand that all continuations are last continuation. 13 To avoid the misunderstanding, added a new flag to class 14 RenderObejctChildList to enable/disable updating :after content (and 15 also :before content). 16 17 Tests: fast/css-generated-content/after-with-inline-continuation.html 18 fast/css-generated-content/dynamic-apply-after-for-inline.html 19 20 * rendering/RenderInline.cpp: 21 (WebCore::RenderInline::styleDidChange): 22 Disable upating :after content for continuations which are not 23 the last one during setStyle just after setContinuation(0). 24 The setStyle invokes RenderInline::styleDidChange and also invokes 25 updateBeforeAfterContent via the styleDidChange. This means, 26 the last continuation's updateBeforeAfterContent is also invoked 27 after setContinuation(0). We have to update :after for the last 28 continuation. 29 * rendering/RenderObjectChildList.cpp: 30 (WebCore): 31 (WebCore::RenderObjectChildList::updateBeforeAfterContent): 32 If s_updateBeforeAfterContent is false, quickly exit 33 updateBeforeAfterContent. 34 * rendering/RenderObjectChildList.h: 35 (RenderObjectChildList): 36 Added a new flag s_enableUpdateBeforeAfterContent to enable/disable 37 updating :before or :after content. 38 1 39 2012-10-05 Simon Fraser <simon.fraser@apple.com> 2 40 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r130081 r130555 41 41 #include "VisiblePosition.h" 42 42 43 #include <wtf/TemporaryChange.h> 44 43 45 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION) 44 46 #include "Frame.h" … … 168 170 RenderStyle* newStyle = style(); 169 171 RenderInline* continuation = inlineElementContinuation(); 170 for (RenderInline* currCont = continuation; currCont; currCont = currCont->inlineElementContinuation()) { 171 RenderBoxModelObject* nextCont = currCont->continuation(); 172 currCont->setContinuation(0); 173 currCont->setStyle(newStyle); 174 currCont->setContinuation(nextCont); 172 { 173 TemporaryChange<bool> enableAfter(RenderObjectChildList::s_enableUpdateBeforeAfterContent, false); 174 RenderInline* nextInlineElementCont = 0; 175 for (RenderInline* currCont = continuation; currCont; currCont = nextInlineElementCont) { 176 nextInlineElementCont = currCont->inlineElementContinuation(); 177 // We need to update :after content for the last continuation in the chain. 178 RenderObjectChildList::s_enableUpdateBeforeAfterContent = !nextInlineElementCont; 179 RenderBoxModelObject* nextCont = currCont->continuation(); 180 currCont->setContinuation(0); 181 currCont->setStyle(newStyle); 182 currCont->setContinuation(nextCont); 183 } 175 184 } 176 185 -
trunk/Source/WebCore/rendering/RenderObjectChildList.cpp
r129423 r130555 46 46 namespace WebCore { 47 47 48 bool RenderObjectChildList::s_enableUpdateBeforeAfterContent = true; 49 48 50 void RenderObjectChildList::destroyLeftoverChildren() 49 51 { … … 375 377 if (owner->style()->styleType() == BEFORE || owner->style()->styleType() == AFTER) 376 378 return; 379 if (!s_enableUpdateBeforeAfterContent) 380 return; 377 381 378 382 if (!styledObject) -
trunk/Source/WebCore/rendering/RenderObjectChildList.h
r126048 r130555 61 61 RenderObject* afterPseudoElementRenderer(const RenderObject* owner) const; 62 62 63 public: 64 static bool s_enableUpdateBeforeAfterContent; 65 63 66 private: 64 67 void updateBeforeAfterStyle(RenderObject* child, PseudoId type, RenderStyle* pseudoElementStyle);
Note: See TracChangeset
for help on using the changeset viewer.