[Webkit-unassigned] [Bug 128538] New: ContentData equals() methods are not inline-able
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 10 09:30:11 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=128538
Summary: ContentData equals() methods are not inline-able
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ddkilzer at webkit.org
CC: darin at apple.com, ap at webkit.org, koivisto at iki.fi,
akling at apple.com
Per Darin Adler in Bug 128510 Comment #2:
(From update of attachment 223660 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=223660&action=review
> Source/WebCore/rendering/style/ContentData.h:105
> +inline bool ImageContentData::equals(const ContentData& data) const
> +{
> + if (!data.isImage())
> + return false;
> + return *toImageContentData(data).image() == *image();
> +}
I think we could move this to the .cpp file, because I think everyone calls it polymorphically and so nobody really inlines it.
I also think this could read nicely with && rather than early return.
> Source/WebCore/rendering/style/ContentData.h:135
> +inline bool TextContentData::equals(const ContentData& data) const
> +{
> + if (!data.isText())
> + return false;
> + return toTextContentData(data).text() == text();
> +}
Ditto.
> Source/WebCore/rendering/style/ContentData.h:169
> +inline bool CounterContentData::equals(const ContentData& data) const
> +{
> + if (!data.isCounter())
> + return false;
> + return *toCounterContentData(data).counter() == *counter();
> +}
Again.
> Source/WebCore/rendering/style/ContentData.h:199
> +inline bool QuoteContentData::equals(const ContentData& data) const
> +{
> + if (!data.isQuote())
> + return false;
> + return toQuoteContentData(data).quote() == quote();
> +}
Ditto.
--
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