| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| index c2580420c02f4c091e01ae0b105f340926273b41..4d57d3685eb65a00655bbb01586901599690f3e2 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| @@ -1893,6 +1893,7 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style)
|
| updateImage(oldBoxReflectMaskImage, newBoxReflectMaskImage);
|
|
|
| updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style->shapeOutside());
|
| + updateCursorImages(oldStyle ? oldStyle->cursors() : nullptr, m_style->cursors());
|
|
|
| bool doesNotNeedLayoutOrPaintInvalidation = !m_parent;
|
|
|
| @@ -2117,6 +2118,20 @@ void LayoutObject::updateFillImages(const FillLayer* oldLayers, const FillLayer&
|
| }
|
| }
|
|
|
| +void LayoutObject::updateCursorImages(const CursorList* oldCursors, const CursorList* newCursors)
|
| +{
|
| + if (oldCursors && newCursors && *oldCursors == *newCursors)
|
| + return;
|
| +
|
| + if (newCursors) {
|
| + for (const CursorData& cursorNew : *newCursors) {
|
| + if (cursorNew.image())
|
| + cursorNew.image()->addClient(this);
|
| + }
|
| + }
|
| + removeCursorImageClient(oldCursors);
|
| +}
|
| +
|
| void LayoutObject::updateImage(StyleImage* oldImage, StyleImage* newImage)
|
| {
|
| if (oldImage != newImage) {
|
| @@ -2646,6 +2661,7 @@ void LayoutObject::willBeDestroyed()
|
| m_style->boxReflect()->mask().image()->removeClient(this);
|
|
|
| removeShapeImageClient(m_style->shapeOutside());
|
| + removeCursorImageClient(m_style->cursors());
|
| }
|
|
|
| if (frameView())
|
| @@ -2831,6 +2847,16 @@ void LayoutObject::removeShapeImageClient(ShapeValue* shapeValue)
|
| shapeImage->removeClient(this);
|
| }
|
|
|
| +void LayoutObject::removeCursorImageClient(const CursorList* cursorList)
|
| +{
|
| + if (!cursorList)
|
| + return;
|
| + for (const CursorData& cursor : *cursorList) {
|
| + if (cursor.image())
|
| + cursor.image()->removeClient(this);
|
| + }
|
| +}
|
| +
|
| PositionWithAffinity LayoutObject::positionForPoint(const LayoutPoint&)
|
| {
|
| return createPositionWithAffinity(caretMinOffset());
|
|
|