[Webkit-unassigned] [Bug 86557] Allow WebTextFieldDecoratorClient to see applied decorations.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 25 10:06:21 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=86557
--- Comment #29 from Garrett Casto <gcasto at chromium.org> 2012-05-25 10:05:24 PST ---
(In reply to comment #28)
> (From update of attachment 143861 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=143861&action=review
>
> Looks almost ok. r- because of some nits.
>
> > Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:118
> > setInlineStyleProperty(CSSPropertyWebkitBoxFlex, 0.0, CSSPrimitiveValue::CSS_NUMBER);
> > box->appendChild(this);
> > +
> > + if (visible)
> > + setInlineStyleProperty(CSSPropertyDisplay, CSSValueBlock);
> > + else
> > + setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
>
> This should be put before box->appendChild(this) to avoid style-recalc after renderer attachment.
> Also, we can write this as setInlineStyleProperty(CSSPropertyDisplay, visible ? CSSValueBlock : CSSValueNone);
>
> > Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp:64
> > +
> > +
>
> nit: should be one blank line.
>
> > Source/WebKit/chromium/src/WebInputElement.cpp:236
> > + if (decoration
> > + && decoratorClient->isClientFor(decoration->textFieldDecorator())) {
>
> nit: You don't need to wrap these line.
> You don't need { }.
>
> > Source/WebKit/chromium/src/WebTextFieldDecorationElement.cpp:49
> > + if (visible)
> > + unwrap<TextFieldDecorationElement>()->setAttribute(HTMLNames::styleAttr,
> > + "display:block");
> > + else
> > + unwrap<TextFieldDecorationElement>()->setAttribute(HTMLNames::styleAttr,
> > + "display:none");
>
> You should use setInlineStyleProperty() like you did in TextFieldDecorationElement::decorate().
> Setting style attribute is expensive.
I was originally using setInlineStyleProperty, but Dimitri recommended this instead. I'm fine with whichever. Dimitri, do you still think that this should use setAttribute?
--
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