WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92257
2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute
https://bugs.webkit.org/show_bug.cgi?id=92257
Summary
2% of all samples running grid demo show up in StyleResolver::canShareStyleWi...
Eric Seidel (no email)
Reported
2012-07-25 08:25:01 PDT
2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute
Attachments
Patch
(2.46 KB, patch)
2012-07-25 08:27 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
the grid demo
(2.86 KB, text/html)
2012-07-25 08:28 PDT
,
Eric Seidel (no email)
no flags
Details
Patch
(3.05 KB, patch)
2012-07-26 02:49 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Patch for landing
(3.07 KB, patch)
2012-07-26 02:59 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2012-07-25 08:27:37 PDT
Created
attachment 154362
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-07-25 08:28:02 PDT
The last time this was touched was for kling's rollout in
bug 80245
.
Eric Seidel (no email)
Comment 3
2012-07-25 08:28:29 PDT
Created
attachment 154363
[details]
the grid demo
Eric Seidel (no email)
Comment 4
2012-07-25 17:41:55 PDT
Thoughts, Kling?
Eric Seidel (no email)
Comment 5
2012-07-25 23:38:18 PDT
This is actually higher than I had originally measured, because the getAttribute() call itself shows up as nearly 1%!
Andreas Kling
Comment 6
2012-07-26 01:04:54 PDT
(In reply to
comment #4
)
> Thoughts, Kling?
This looks like a great low-hanging fruit to go after, though I'm afraid that this won't properly serialize the typeAttr on an SVG element that's the target of a property animation. We have this check earlier in the function: if (element->isSVGElement() && static_cast<SVGElement*>(element)->animatedSMILStyleProperties()) return false; But animatedSMILStyleProperties() is only concerned with animations on CSS properties. CC'ing some SVG folks who might know more about this.
Eric Seidel (no email)
Comment 7
2012-07-26 01:35:33 PDT
OK. I suspect we can detect that case and only take the slow path when necessary. WildFox? pdr?
Nikolas Zimmermann
Comment 8
2012-07-26 01:39:48 PDT
(In reply to
comment #6
)
> (In reply to
comment #4
) > > Thoughts, Kling? > > This looks like a great low-hanging fruit to go after, though I'm afraid that this won't properly serialize the typeAttr on an SVG element that's the target of a property animation.
SVGs typeAttr is SVGNames::typeAttr, and shouldn't be affected by this at all. We don't use HTMLNames::typeAttr in SVG except for <script>, which doesn't have a renderer and thus no style as well. I think it's safe from the SVG side.
Eric Seidel (no email)
Comment 9
2012-07-26 01:43:59 PDT
DEFINE_GLOBAL(QualifiedName, typeAttr, nullAtom, "type", svgNamespaceURI) vs. DEFINE_GLOBAL(QualifiedName, typeAttr, nullAtom, "type", xhtmlNamespaceURI) So they only differ in namespace. inline Attribute* findAttributeInVector(const Vector<Attribute>& attributes, const QualifiedName& name) { for (unsigned i = 0; i < attributes.size(); ++i) { if (attributes.at(i).name().matches(name)) return &const_cast<Vector<Attribute>& >(attributes).at(i); } return 0; } uses bool matches(const QualifiedName& other) const { return m_impl == other.m_impl || (localName() == other.localName() && namespaceURI() == other.namespaceURI()); } Which does use namespace. So it appears that HTMLNames::typeAttr and SVGNames::typeAttr function independently, as WildFox suggests. Meaning this patch should have no affect on SVG.
Eric Seidel (no email)
Comment 10
2012-07-26 01:49:47 PDT
Woh, wait a sec. HTMLNames later initializes typeAttr to not include the namespace: new ((void*)&typeAttr) QualifiedName(nullAtom, "type", nullAtom); Clearly makeNames needs to be fixed! Similarly SVGNames does: new ((void*)&typeAttr) QualifiedName(nullAtom, "type", nullAtom);
Eric Seidel (no email)
Comment 11
2012-07-26 02:49:39 PDT
Created
attachment 154591
[details]
Patch
Andreas Kling
Comment 12
2012-07-26 02:50:57 PDT
Comment on
attachment 154591
[details]
Patch Fabulous! r=me
Eric Seidel (no email)
Comment 13
2012-07-26 02:59:16 PDT
Created
attachment 154593
[details]
Patch for landing
WebKit Review Bot
Comment 14
2012-07-26 04:53:04 PDT
Comment on
attachment 154593
[details]
Patch for landing Clearing flags on attachment: 154593 Committed
r123730
: <
http://trac.webkit.org/changeset/123730
>
WebKit Review Bot
Comment 15
2012-07-26 04:53:10 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