WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 82572
Add TextFieldDecorationElement::decorate()
https://bugs.webkit.org/show_bug.cgi?id=82572
Summary
Add TextFieldDecorationElement::decorate()
Kent Tamura
Reported
2012-03-28 21:43:27 PDT
Add TextFieldDecorationElement::decorate()
Attachments
Patch
(4.65 KB, patch)
2012-03-28 21:48 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch 2
(4.52 KB, patch)
2012-03-28 22:17 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-03-28 21:48:00 PDT
Created
attachment 134495
[details]
Patch
Hajime Morrita
Comment 2
2012-03-28 22:00:47 PDT
Comment on
attachment 134495
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134495&action=review
> Source/WebCore/dom/ShadowRoot.cpp:-116 > - ASSERT(purpose != CreatingUserAgentShadowRoot || !element->hasShadowRoot());
Looks like this assertion should be corrected instead of removed. ASSERT(purpose == CreatingUserAgentShadowRoot || !element->hasShadowRoot()) will be an expected form.
> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:80 > + ASSERT(existingRoot->firstChild() == existingRoot->lastChild());
You mean existingRoot->childNodeCount() == 1 ?
> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:82 > + static_cast<HTMLElement*>(existingRoot->firstChild())->setInlineStyleProperty(CSSPropertyWebkitBoxFlex, 1.0, CSSPrimitiveValue::CSS_NUMBER);
toHTMLElement() has captured this assert-and-cast pattern.
Kent Tamura
Comment 3
2012-03-28 22:11:13 PDT
Comment on
attachment 134495
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134495&action=review
>> Source/WebCore/dom/ShadowRoot.cpp:-116 >> - ASSERT(purpose != CreatingUserAgentShadowRoot || !element->hasShadowRoot()); > > Looks like this assertion should be corrected instead of removed. > ASSERT(purpose == CreatingUserAgentShadowRoot || !element->hasShadowRoot()) will be an expected form.
Really? Your expected form means that one can't add multiple author shadow roots to an element.
>> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:80 >> + ASSERT(existingRoot->firstChild() == existingRoot->lastChild()); > > You mean existingRoot->childNodeCount() == 1 ?
Yes. I thought I should have avoided childNodeCount because it's O(N), but it's acceptable because the child node count should be 1. I'll change it to childNodeCount()==1.
>> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:82 >> + static_cast<HTMLElement*>(existingRoot->firstChild())->setInlineStyleProperty(CSSPropertyWebkitBoxFlex, 1.0, CSSPrimitiveValue::CSS_NUMBER); > > toHTMLElement() has captured this assert-and-cast pattern.
will do.
Kent Tamura
Comment 4
2012-03-28 22:17:14 PDT
Created
attachment 134499
[details]
Patch 2
Hajime Morrita
Comment 5
2012-03-28 22:42:13 PDT
(In reply to
comment #3
)
> (From update of
attachment 134495
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=134495&action=review
> > >> Source/WebCore/dom/ShadowRoot.cpp:-116 > >> - ASSERT(purpose != CreatingUserAgentShadowRoot || !element->hasShadowRoot()); > > > > Looks like this assertion should be corrected instead of removed. > > ASSERT(purpose == CreatingUserAgentShadowRoot || !element->hasShadowRoot()) will be an expected form. > > Really? >> Your expected form means that one can't add multiple author shadow roots to an element.
You're right. I was confused.
> > >> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:80 > >> + ASSERT(existingRoot->firstChild() == existingRoot->lastChild()); > > > > You mean existingRoot->childNodeCount() == 1 ? > > Yes. I thought I should have avoided childNodeCount because it's O(N), but it's acceptable because the child node count should be 1. I'll change it to childNodeCount()==1. > > >> Source/WebCore/html/shadow/TextFieldDecorationElement.cpp:82 > >> + static_cast<HTMLElement*>(existingRoot->firstChild())->setInlineStyleProperty(CSSPropertyWebkitBoxFlex, 1.0, CSSPrimitiveValue::CSS_NUMBER); > > > > toHTMLElement() has captured this assert-and-cast pattern. > > will do.
WebKit Review Bot
Comment 6
2012-03-28 23:00:40 PDT
Comment on
attachment 134499
[details]
Patch 2 Clearing flags on attachment: 134499 Committed
r112503
: <
http://trac.webkit.org/changeset/112503
>
WebKit Review Bot
Comment 7
2012-03-28 23:00:44 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug