[Webkit-unassigned] [Bug 93170] Inline continuations create :after generated content on style recalcs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 2 09:07:52 PDT 2012


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





--- Comment #18 from Abhishek Arya <inferno at chromium.org>  2012-10-02 09:08:13 PST ---
(In reply to comment #15)
> I forgot to say about :before content.
> 
> The reason why we don't need to do anything for :before content in RenderInline::styleDidChange is that it is easy to know whether the given render object is the top renderer of continuation list.
> Just compare renderer with renderer->node()->renderer(). This is not affected by setContinuation(0).

Yeah i know it will bail out on "if (newContentWanted && type == BEFORE && owner->isElementContinuation())", but we will waste on every continuation calculating before content, when we could bail out early.
switch (type) {
    case BEFORE:
        child = beforePseudoElementRenderer(owner);
        break;

> 
> Best regards,
> Takashi Sakamoto
> 
> (In reply to comment #14)
> > I'm sorry. I said wrong things.
> > I looked at my old patch for bug 93707 again and found that we need to enable updating :after content during curr->setStyle.
> > To show why we need, I added one more layout test to this patch. The test updates className to apply / not to apply :after to inline elements. If we disable updating :after content in curr->setStyle, no generated renderer for :after content is created.
> > 
> > Best regards,
> > Takashi Sakamoto
> > 
> > (In reply to comment #11)
> > > (From update of attachment 166603 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=166603&action=review
> > > 
> > > One more round.
> > > 
> > > > Source/WebCore/rendering/RenderInline.cpp:169
> > > > +    bool updateEnabled = RenderObjectChildList::enableUpdateBeforeAfterContent(false);
> > > 
> > > you can use TemporaryChange to scope this easily. see comment below.
> > > 
> > > > Source/WebCore/rendering/RenderObjectChildList.cpp:443
> > > > +    if (!m_enableUpdateBeforeAfterContent)
> > > 
> > > Why so late return ? Why not after the line " if (owner->style()->styleType() == BEFORE || owner->style()->styleType() == AFTER)"
> > > 
> > > > Source/WebCore/rendering/RenderObjectChildList.h:59
> > > > +    static bool enableUpdateBeforeAfterContent(bool enable)
> > > 
> > > You don't need this. Just use TemporaryChange.h, see http://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp&exact_package=chromium&q=%22TemporaryChange%3Cbool%22&type=cs&l=36. Make m_enableUpdateBeforeAfterContent a global static that could be manipulated by  RenderInline::styleDidChange.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list