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 44719
Fix RenderStyle::addCursor to use a StyleImage, not a CachedImage
https://bugs.webkit.org/show_bug.cgi?id=44719
Summary
Fix RenderStyle::addCursor to use a StyleImage, not a CachedImage
Simon Fraser (smfr)
Reported
2010-08-26 13:47:10 PDT
Per comment in CSSStyleSelector: // FIXME: Temporary clumsiness to pass off a CachedImage to an API that will eventually convert to using // StyleImage.
Attachments
Patch
(11.14 KB, patch)
2010-08-27 16:47 PDT
,
Simon Fraser (smfr)
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2010-08-27 16:47:34 PDT
Created
attachment 65786
[details]
Patch
Darin Adler
Comment 2
2010-08-29 12:54:19 PDT
Comment on
attachment 65786
[details]
Patch
> case CSSPropertyBackgroundImage: > + // FIXME: broken for multiple backgrounds.
It would be better if this was capitalized sentence-style like our comments usually are, and if there was a corresponding bug umber.
> + case CSSPropertyCursor: { > + if (CursorList* cursorList = m_style->cursors()) { > + for (size_t i = 0; i < cursorList->size(); ++i) { > + CursorData& currentCursor = (*cursorList)[i]; > + if (currentCursor.image()->isPendingImage()) { > + CSSImageValue* imageValue = static_cast<StylePendingImage*>(currentCursor.image())->cssImageValue(); > + currentCursor.setImage(imageValue->cachedImage(docLoader)); > + } > + } > + } > break; > + }
Is it correct to do nothing if there are not cursors?
> + void setImage(StyleImage* image) { m_image = image; }
This function should take a PassRefPtr, not a raw pointer.
> + void addCursor(StyleImage*, const IntPoint& = IntPoint());
Should this take a PassRefPtr instead of a raw pointer? The IntPoint argument should have a name, hotSpot, instead of being unnamed. I don't think it's obvious what it is without a name.
Simon Fraser (smfr)
Comment 3
2010-08-30 09:01:05 PDT
http://trac.webkit.org/changeset/66391
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