WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
87694
[CSS] Move StyleResolver::canShareStyleWithElement to StyledElement as virtual method
https://bugs.webkit.org/show_bug.cgi?id=87694
Summary
[CSS] Move StyleResolver::canShareStyleWithElement to StyledElement as virtua...
yosin
Reported
2012-05-28 22:42:07 PDT
I would like to move StyleResolver::canShareStyleWithElement to StyleElement class as virtual method. The reasons are: 1. Move hasTagName checking to class which implements element. This also removes some #if, e.g. ENABLE(PROGRESS_TAG) 2. Control sharing in fine grain, e.g. if (element->hasTagName(optionTag)) return false is too conservative. Call site changes are: inline StyledElement* StyleResolver::findSiblingForStyleSharing(Node* node, unsigned& count) const { for (; node; node = node->previousSibling()) { if (!node->isStyledElement()) continue; NOW: if (canShareStyleWithElement(static_cast<StyledElement*>(node))) NEW: if (m_element->canShareStyleWithElement(static_cast<StyledElement*>(node))) break; .... }
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2013-03-22 14:16:45 PDT
canShareStyleWith is an insanity-hot function. I do not recommend this approach, unless you're finding ways to avoid calling it.
Brent Fulgham
Comment 2
2022-07-13 15:33:07 PDT
This code has been significantly refactored since this patch was proposed. There doesn't seem to be any action we can take here.
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