Title: [187658] branches/safari-601.1-branch/Source/WebCore
- Revision
- 187658
- Author
- [email protected]
- Date
- 2015-07-31 11:01:21 -0700 (Fri, 31 Jul 2015)
Log Message
Merged r187521. rdar://problem/22038421
Modified Paths
Diff
Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (187657 => 187658)
--- branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-07-31 17:56:46 UTC (rev 187657)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-07-31 18:01:21 UTC (rev 187658)
@@ -1,5 +1,30 @@
2015-07-31 Lucas Forschler <[email protected]>
+ Merge r187521
+
+ 2015-07-28 Tim Horton <[email protected]>
+
+ [iOS] Creating a TextIndicator causes the view to scroll to the current selection
+ https://bugs.webkit.org/show_bug.cgi?id=147379
+ <rdar://problem/22038421>
+
+ Reviewed by Beth Dakin.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::setIgnoreCompositionSelectionChange):
+ * editing/Editor.h:
+ Add a flag so that setIgnoreCompositionSelectionChange(false) can still
+ not force-reveal the current selection.
+
+ This is useful for e.g. TextIndicator, who saves the selection, changes it,
+ and then restores it, but doesn't want to scroll to the saved/restored selection.
+
+ * page/TextIndicator.cpp:
+ (WebCore::TextIndicator::createWithRange):
+ Make use of the above flag.
+
+2015-07-31 Lucas Forschler <[email protected]>
+
Merge r187516
2015-07-28 Eric Carlson <[email protected]>
Modified: branches/safari-601.1-branch/Source/WebCore/editing/Editor.cpp (187657 => 187658)
--- branches/safari-601.1-branch/Source/WebCore/editing/Editor.cpp 2015-07-31 17:56:46 UTC (rev 187657)
+++ branches/safari-601.1-branch/Source/WebCore/editing/Editor.cpp 2015-07-31 18:01:21 UTC (rev 187658)
@@ -2757,7 +2757,7 @@
m_frame.selection().revealSelection(alignment, revealExtentOption);
}
-void Editor::setIgnoreCompositionSelectionChange(bool ignore)
+void Editor::setIgnoreCompositionSelectionChange(bool ignore, RevealSelection shouldRevealExistingSelection)
{
if (m_ignoreCompositionSelectionChange == ignore)
return;
@@ -2768,7 +2768,7 @@
if (!ignore)
respondToChangedSelection(m_frame.selection().selection(), 0);
#endif
- if (!ignore)
+ if (!ignore && shouldRevealExistingSelection == RevealSelection::Yes)
revealSelectionAfterEditingOperation(ScrollAlignment::alignToEdgeIfNeeded, RevealExtent);
}
Modified: branches/safari-601.1-branch/Source/WebCore/editing/Editor.h (187657 => 187658)
--- branches/safari-601.1-branch/Source/WebCore/editing/Editor.h 2015-07-31 17:56:46 UTC (rev 187657)
+++ branches/safari-601.1-branch/Source/WebCore/editing/Editor.h 2015-07-31 18:01:21 UTC (rev 187658)
@@ -310,7 +310,8 @@
bool compositionUsesCustomUnderlines() const { return !m_customCompositionUnderlines.isEmpty(); }
const Vector<CompositionUnderline>& customCompositionUnderlines() const { return m_customCompositionUnderlines; }
- WEBCORE_EXPORT void setIgnoreCompositionSelectionChange(bool);
+ enum class RevealSelection { No, Yes };
+ WEBCORE_EXPORT void setIgnoreCompositionSelectionChange(bool, RevealSelection shouldRevealExistingSelection = RevealSelection::Yes);
bool ignoreCompositionSelectionChange() const { return m_ignoreCompositionSelectionChange; }
void setStartNewKillRingSequence(bool);
Modified: branches/safari-601.1-branch/Source/WebCore/page/TextIndicator.cpp (187657 => 187658)
--- branches/safari-601.1-branch/Source/WebCore/page/TextIndicator.cpp 2015-07-31 17:56:46 UTC (rev 187657)
+++ branches/safari-601.1-branch/Source/WebCore/page/TextIndicator.cpp 2015-07-31 18:01:21 UTC (rev 187658)
@@ -71,7 +71,7 @@
indicator->setWantsMargin(!areRangesEqual(&range, oldSelection.toNormalizedRange().get()));
#if PLATFORM(IOS)
- frame->editor().setIgnoreCompositionSelectionChange(false);
+ frame->editor().setIgnoreCompositionSelectionChange(false, Editor::RevealSelection::No);
frame->selection().setUpdateAppearanceEnabled(false);
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes