[Webkit-unassigned] [Bug 86557] Allow WebTextFieldDecoratorClient to see applied decorations.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 24 18:49:53 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=86557
Kent Tamura <tkent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #143861|review? |review-
Flag| |
--- Comment #28 from Kent Tamura <tkent at chromium.org> 2012-05-24 18:48:57 PST ---
(From update of attachment 143861)
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.
--
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