Title: [102192] branches/safari-534.53-branch/Source/WebCore
Diff
Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-07 00:45:49 UTC (rev 102192)
@@ -1,5 +1,34 @@
2011-12-06 Lucas Forschler <[email protected]>
+ Merge 95244
+
+ 2011-09-15 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=67884
+ Delete button icon does not properly update when the device resolution changes
+ dynamically
+ -and corresponding-
+ <rdar://problem/10104632>
+
+ Reviewed by Darin Adler.
+
+ In DeleteButtonController::deviceScaleFactorChanged(), if the delete button is
+ currently showing, hide it and re-show it, forcing it to re-create the deletion
+ UI.
+ * editing/DeleteButtonController.cpp:
+ (WebCore::DeleteButtonController::deviceScaleFactorChanged):
+ * editing/DeleteButtonController.h:
+ * editing/Editor.cpp:
+ (WebCore::Editor::deviceScaleFactorChanged):
+ * editing/Editor.h:
+
+ Iterate through all of the frames and propagate the deviceScaleFactorChange()
+ message to Editor.
+ * page/Page.cpp:
+ (WebCore::Page::setDeviceScaleFactor):
+
+2011-12-06 Lucas Forschler <[email protected]>
+
Merge 95129
2011-09-14 David Hyatt <[email protected]>
Modified: branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp 2011-12-07 00:45:49 UTC (rev 102192)
@@ -185,6 +185,20 @@
hide();
}
+void DeleteButtonController::deviceScaleFactorChanged()
+{
+ if (!enabled())
+ return;
+
+ HTMLElement* currentTarget = m_target.get();
+ hide();
+
+ // Setting m_containerElement to 0 will force the deletionUI to be re-created with
+ // artwork of the appropriate resolution in show().
+ m_containerElement = 0;
+ show(currentTarget);
+}
+
void DeleteButtonController::createDeletionUI()
{
RefPtr<HTMLDivElement> container = HTMLDivElement::create(m_target->document());
Modified: branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.h (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.h 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.h 2011-12-07 00:45:49 UTC (rev 102192)
@@ -48,6 +48,8 @@
void respondToChangedSelection(const VisibleSelection& oldSelection);
+ void deviceScaleFactorChanged();
+
void show(HTMLElement*);
void hide();
Modified: branches/safari-534.53-branch/Source/WebCore/editing/Editor.cpp (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/editing/Editor.cpp 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/editing/Editor.cpp 2011-12-07 00:45:49 UTC (rev 102192)
@@ -3261,4 +3261,9 @@
return checkingTypes;
}
+void Editor::deviceScaleFactorChanged()
+{
+ m_deleteButtonController->deviceScaleFactorChanged();
+}
+
} // namespace WebCore
Modified: branches/safari-534.53-branch/Source/WebCore/editing/Editor.h (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/editing/Editor.h 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/editing/Editor.h 2011-12-07 00:45:49 UTC (rev 102192)
@@ -377,6 +377,8 @@
void updateMarkersForWordsAffectedByEditing(bool onlyHandleWordsContainingSelection);
void deletedAutocorrectionAtPosition(const Position&, const String& originalString);
+ void deviceScaleFactorChanged();
+
private:
Frame* m_frame;
OwnPtr<DeleteButtonController> m_deleteButtonController;
Modified: branches/safari-534.53-branch/Source/WebCore/page/Page.cpp (102191 => 102192)
--- branches/safari-534.53-branch/Source/WebCore/page/Page.cpp 2011-12-07 00:41:42 UTC (rev 102191)
+++ branches/safari-534.53-branch/Source/WebCore/page/Page.cpp 2011-12-07 00:45:49 UTC (rev 102192)
@@ -607,6 +607,9 @@
m_mainFrame->deviceOrPageScaleFactorChanged();
#endif
+ for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
+ frame->editor()->deviceScaleFactorChanged();
+
backForward()->markPagesForFullStyleRecalc();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes