WebKit Bugzilla
Attachment 346999 Details for
Bug 188500
: Use OptionSet more in editing code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
optionset-editor-6.patch (text/plain), 24.11 KB, created by
Antti Koivisto
on 2018-08-13 00:37:42 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2018-08-13 00:37:42 PDT
Size:
24.11 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234794) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,47 @@ >+2018-08-13 Antti Koivisto <antti@apple.com> >+ >+ Use OptionSet in editing code >+ https://bugs.webkit.org/show_bug.cgi?id=188500 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Typesafe flags. >+ >+ * editing/CompositeEditCommand.cpp: >+ (WebCore::CompositeEditCommand::moveParagraphs): >+ * editing/Editor.cpp: >+ (WebCore::TemporarySelectionChange::TemporarySelectionChange): >+ (WebCore::Editor::replaceSelectionWithFragment): >+ (WebCore::Editor::appliedEditing): >+ (WebCore::Editor::selectComposition): >+ (WebCore::Editor::changeSelectionAfterCommand): >+ (WebCore::Editor::respondToChangedSelection): >+ * editing/Editor.h: >+ (WebCore::TemporarySelectionChange::TemporarySelectionChange): >+ * editing/FrameSelection.cpp: >+ (WebCore::FrameSelection::moveWithoutValidationTo): >+ (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): >+ (WebCore::FrameSelection::setSelection): >+ (WebCore::FrameSelection::setSelectedRange): >+ * editing/FrameSelection.h: >+ (WebCore::FrameSelection::defaultSetSelectionOptions): >+ * editing/MoveSelectionCommand.cpp: >+ (WebCore::MoveSelectionCommand::doApply): >+ * editing/ReplaceSelectionCommand.cpp: >+ (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): >+ * editing/ReplaceSelectionCommand.h: >+ (WebCore::ReplaceSelectionCommand::create): >+ * editing/SetSelectionCommand.cpp: >+ (WebCore::SetSelectionCommand::SetSelectionCommand): >+ * editing/SetSelectionCommand.h: >+ (WebCore::SetSelectionCommand::create): >+ * page/ContextMenuController.cpp: >+ (WebCore::ContextMenuController::contextMenuItemSelected): >+ * page/DragController.cpp: >+ (WebCore::DragController::concludeEditDrag): >+ * page/TextIndicator.cpp: >+ (WebCore::TextIndicator::createWithRange): >+ > 2018-08-12 Sihui Liu <sihui_liu@apple.com> > > CrashTracer: com.apple.WebKit.Storage at WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient(WebCore::IDBServer::UniqueIDBDatabaseConnection&) >Index: Source/WebCore/editing/CompositeEditCommand.cpp >=================================================================== >--- Source/WebCore/editing/CompositeEditCommand.cpp (revision 234792) >+++ Source/WebCore/editing/CompositeEditCommand.cpp (working copy) >@@ -1489,7 +1489,7 @@ void CompositeEditCommand::moveParagraph > > setEndingSelection(VisibleSelection(destination, originalIsDirectional)); > ASSERT(endingSelection().isCaretOrRange()); >- ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::MovingParagraph; >+ OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::MovingParagraph }; > if (!preserveStyle) > options |= ReplaceSelectionCommand::MatchStyle; > applyCommandToComposite(ReplaceSelectionCommand::create(document(), WTFMove(fragment), options)); >Index: Source/WebCore/editing/Editor.cpp >=================================================================== >--- Source/WebCore/editing/Editor.cpp (revision 234792) >+++ Source/WebCore/editing/Editor.cpp (working copy) >@@ -190,7 +190,7 @@ using namespace HTMLNames; > using namespace WTF; > using namespace Unicode; > >-TemporarySelectionChange::TemporarySelectionChange(Frame& frame, std::optional<VisibleSelection> temporarySelection, TemporarySelectionOptions options) >+TemporarySelectionChange::TemporarySelectionChange(Frame& frame, std::optional<VisibleSelection> temporarySelection, OptionSet<TemporarySelectionOption> options) > : m_frame(frame) > , m_options(options) > , m_wasIgnoringSelectionChanges(frame.editor().ignoreSelectionChanges()) >@@ -635,7 +635,7 @@ void Editor::replaceSelectionWithFragmen > if (AXObjectCache::accessibilityEnabled() && editingAction == EditActionPaste) > replacedText = AccessibilityReplacedText(selection); > >- ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::PreventNesting | ReplaceSelectionCommand::SanitizeFragment; >+ OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::PreventNesting, ReplaceSelectionCommand::SanitizeFragment }; > if (selectReplacement) > options |= ReplaceSelectionCommand::SelectReplacement; > if (smartReplace) >@@ -1073,7 +1073,9 @@ void Editor::appliedEditing(CompositeEdi > > if (command.isTopLevelCommand()) { > // Don't clear the typing style with this selection change. We do those things elsewhere if necessary. >- FrameSelection::SetSelectionOptions options = command.isDictationCommand() ? FrameSelection::DictationTriggered : 0; >+ OptionSet<FrameSelection::SetSelectionOption> options; >+ if (command.isDictationCommand()) >+ options |= FrameSelection::DictationTriggered; > > changeSelectionAfterCommand(newSelection, options); > } >@@ -1781,7 +1783,7 @@ void Editor::selectComposition() > // See <http://bugs.webkit.org/show_bug.cgi?id=15781> > VisibleSelection selection; > selection.setWithoutValidation(range->startPosition(), range->endPosition()); >- m_frame.selection().setSelection(selection, 0); >+ m_frame.selection().setSelection(selection, { }); > } > > void Editor::confirmComposition() >@@ -3107,7 +3109,7 @@ void Editor::dismissCorrectionPanelAsIgn > m_alternativeTextController->dismiss(ReasonForDismissingAlternativeTextIgnored); > } > >-void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions options) >+void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, OptionSet<FrameSelection::SetSelectionOption> options) > { > Ref<Frame> protection(m_frame); > >@@ -3470,7 +3472,7 @@ void Editor::selectionWillChange() > } > #endif > >-void Editor::respondToChangedSelection(const VisibleSelection&, FrameSelection::SetSelectionOptions options) >+void Editor::respondToChangedSelection(const VisibleSelection&, OptionSet<FrameSelection::SetSelectionOption> options) > { > #if PLATFORM(IOS) > // FIXME: Should suppress selection change notifications during a composition change <https://webkit.org/b/38830> >@@ -3492,9 +3494,8 @@ void Editor::respondToChangedSelection(c > return; > > // Don't check spelling and grammar if the change of selection is triggered by spelling correction itself. >- m_editorUIUpdateTimerShouldCheckSpellingAndGrammar = options & FrameSelection::CloseTyping >- && !(options & FrameSelection::SpellCorrectionTriggered); >- m_editorUIUpdateTimerWasTriggeredByDictation = options & FrameSelection::DictationTriggered; >+ m_editorUIUpdateTimerShouldCheckSpellingAndGrammar = options.contains(FrameSelection::CloseTyping) && !options.contains(FrameSelection::SpellCorrectionTriggered); >+ m_editorUIUpdateTimerWasTriggeredByDictation = options.contains(FrameSelection::DictationTriggered); > scheduleEditorUIUpdate(); > } > >Index: Source/WebCore/editing/Editor.h >=================================================================== >--- Source/WebCore/editing/Editor.h (revision 234792) >+++ Source/WebCore/editing/Editor.h (working copy) >@@ -99,9 +99,6 @@ struct AttachmentDisplayOptions; > #endif > > enum TemporarySelectionOption : uint8_t { >- // By default, no additional options are enabled. >- TemporarySelectionOptionDefault = 0, >- > // Scroll to reveal the selection. > TemporarySelectionOptionRevealSelection = 1 << 0, > >@@ -112,16 +109,14 @@ enum TemporarySelectionOption : uint8_t > TemporarySelectionOptionEnableAppearanceUpdates = 1 << 2 > }; > >-using TemporarySelectionOptions = uint8_t; >- > class TemporarySelectionChange { > public: >- TemporarySelectionChange(Frame&, std::optional<VisibleSelection> = std::nullopt, TemporarySelectionOptions = TemporarySelectionOptionDefault); >+ TemporarySelectionChange(Frame&, std::optional<VisibleSelection> = std::nullopt, OptionSet<TemporarySelectionOption> = { }); > ~TemporarySelectionChange(); > > private: > Ref<Frame> m_frame; >- TemporarySelectionOptions m_options; >+ OptionSet<TemporarySelectionOption> m_options; > bool m_wasIgnoringSelectionChanges; > #if PLATFORM(IOS) > bool m_appearanceUpdatesWereEnabled; >@@ -414,7 +409,7 @@ public: > WEBCORE_EXPORT IntRect firstRectForRange(Range*) const; > > void selectionWillChange(); >- void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions); >+ void respondToChangedSelection(const VisibleSelection& oldSelection, OptionSet<FrameSelection::SetSelectionOption>); > WEBCORE_EXPORT void updateEditorUINowIfScheduled(); > bool shouldChangeSelection(const VisibleSelection& oldSelection, const VisibleSelection& newSelection, EAffinity, bool stillSelecting) const; > WEBCORE_EXPORT unsigned countMatchesForText(const String&, Range*, FindOptions, unsigned limit, bool markMatches, Vector<RefPtr<Range>>*); >@@ -541,7 +536,7 @@ private: > enum SetCompositionMode { ConfirmComposition, CancelComposition }; > void setComposition(const String&, SetCompositionMode); > >- void changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions); >+ void changeSelectionAfterCommand(const VisibleSelection& newSelection, OptionSet<FrameSelection::SetSelectionOption>); > > enum EditorActionSpecifier { CutAction, CopyAction }; > void performCutOrCopy(EditorActionSpecifier); >Index: Source/WebCore/editing/FrameSelection.cpp >=================================================================== >--- Source/WebCore/editing/FrameSelection.cpp (revision 234792) >+++ Source/WebCore/editing/FrameSelection.cpp (working copy) >@@ -185,7 +185,7 @@ void FrameSelection::moveWithoutValidati > newSelection.setWithoutValidation(base, extent); > newSelection.setIsDirectional(selectionHasDirection); > AXTextStateChangeIntent newIntent = intent.type == AXTextStateChangeTypeUnknown ? AXTextStateChangeIntent(AXTextStateChangeTypeSelectionMove, AXTextSelection { AXTextSelectionDirectionDiscontiguous, AXTextSelectionGranularityUnknown, false }) : intent; >- SetSelectionOptions options = defaultSetSelectionOptions(); >+ auto options = defaultSetSelectionOptions(); > if (!shouldSetFocus) > options |= DoNotSetFocus; > switch (revealMode) { >@@ -291,10 +291,10 @@ void FrameSelection::setSelectionByMouse > setSelection(newSelection, defaultSetSelectionOptions() | FireSelectEvent, intent, AlignCursorOnScrollIfNeeded, granularity); > } > >-bool FrameSelection::setSelectionWithoutUpdatingAppearance(const VisibleSelection& newSelectionPossiblyWithoutDirection, SetSelectionOptions options, CursorAlignOnScroll align, TextGranularity granularity) >+bool FrameSelection::setSelectionWithoutUpdatingAppearance(const VisibleSelection& newSelectionPossiblyWithoutDirection, OptionSet<SetSelectionOption> options, CursorAlignOnScroll align, TextGranularity granularity) > { >- bool closeTyping = options & CloseTyping; >- bool shouldClearTypingStyle = options & ClearTypingStyle; >+ bool closeTyping = options.contains(CloseTyping); >+ bool shouldClearTypingStyle = options.contains(ClearTypingStyle); > > VisibleSelection newSelection = newSelectionPossiblyWithoutDirection; > if (shouldAlwaysUseDirectionalSelection(m_frame)) >@@ -338,7 +338,7 @@ bool FrameSelection::setSelectionWithout > > // Selection offsets should increase when LF is inserted before the caret in InsertLineBreakCommand. See <https://webkit.org/b/56061>. > if (HTMLTextFormControlElement* textControl = enclosingTextFormControl(newSelection.start())) >- textControl->selectionChanged(options & FireSelectEvent); >+ textControl->selectionChanged(options.contains(FireSelectEvent)); > > if (!didMutateSelection) > return false; >@@ -358,7 +358,7 @@ bool FrameSelection::setSelectionWithout > return true; > } > >-void FrameSelection::setSelection(const VisibleSelection& selection, SetSelectionOptions options, AXTextStateChangeIntent intent, CursorAlignOnScroll align, TextGranularity granularity) >+void FrameSelection::setSelection(const VisibleSelection& selection, OptionSet<SetSelectionOption> options, AXTextStateChangeIntent intent, CursorAlignOnScroll align, TextGranularity granularity) > { > RefPtr<Frame> protectedFrame(m_frame); > if (!setSelectionWithoutUpdatingAppearance(selection, options, align, granularity)) >@@ -1993,15 +1993,22 @@ bool FrameSelection::setSelectedRange(Ra > return false; > #endif > >+ OptionSet<SetSelectionOption> selectionOptions { ClearTypingStyle }; >+ if (closeTyping) >+ selectionOptions |= CloseTyping; >+ > if (userTriggered == UserTriggered) { > FrameSelection trialFrameSelection; >- trialFrameSelection.setSelection(newSelection, ClearTypingStyle | (closeTyping ? CloseTyping : 0)); >+ >+ trialFrameSelection.setSelection(newSelection, selectionOptions); > > if (!shouldChangeSelection(trialFrameSelection.selection())) > return false; >+ >+ selectionOptions |= IsUserTriggered; > } > >- setSelection(newSelection, ClearTypingStyle | (closeTyping ? CloseTyping : 0) | (userTriggered == UserTriggered ? IsUserTriggered : 0)); >+ setSelection(newSelection, selectionOptions); > return true; > } > >Index: Source/WebCore/editing/FrameSelection.h >=================================================================== >--- Source/WebCore/editing/FrameSelection.h (revision 234792) >+++ Source/WebCore/editing/FrameSelection.h (working copy) >@@ -129,10 +129,12 @@ public: > RevealSelection = 1 << 7, > RevealSelectionUpToMainFrame = 1 << 8, > }; >- typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOption and EUserTriggered >- static inline SetSelectionOptions defaultSetSelectionOptions(EUserTriggered userTriggered = NotUserTriggered) >+ static constexpr OptionSet<SetSelectionOption> defaultSetSelectionOptions(EUserTriggered userTriggered = NotUserTriggered) > { >- return CloseTyping | ClearTypingStyle | (userTriggered ? (RevealSelection | FireSelectEvent | IsUserTriggered) : 0); >+ OptionSet<SetSelectionOption> options { CloseTyping, ClearTypingStyle }; >+ if (userTriggered == UserTriggered) >+ options |= { RevealSelection, FireSelectEvent, IsUserTriggered }; >+ return options; > } > > WEBCORE_EXPORT explicit FrameSelection(Frame* = nullptr); >@@ -147,7 +149,7 @@ public: > void moveWithoutValidationTo(const Position&, const Position&, bool selectionHasDirection, bool shouldSetFocus, SelectionRevealMode, const AXTextStateChangeIntent& = AXTextStateChangeIntent()); > > const VisibleSelection& selection() const { return m_selection; } >- WEBCORE_EXPORT void setSelection(const VisibleSelection&, SetSelectionOptions = defaultSetSelectionOptions(), AXTextStateChangeIntent = AXTextStateChangeIntent(), CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGranularity = CharacterGranularity); >+ WEBCORE_EXPORT void setSelection(const VisibleSelection&, OptionSet<SetSelectionOption> = defaultSetSelectionOptions(), AXTextStateChangeIntent = AXTextStateChangeIntent(), CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGranularity = CharacterGranularity); > WEBCORE_EXPORT bool setSelectedRange(Range*, EAffinity, bool closeTyping, EUserTriggered = NotUserTriggered); > WEBCORE_EXPORT void selectAll(); > WEBCORE_EXPORT void clear(); >@@ -282,7 +284,7 @@ private: > void updateAndRevealSelection(const AXTextStateChangeIntent&); > void updateDataDetectorsForSelection(); > >- bool setSelectionWithoutUpdatingAppearance(const VisibleSelection&, SetSelectionOptions, CursorAlignOnScroll, TextGranularity); >+ bool setSelectionWithoutUpdatingAppearance(const VisibleSelection&, OptionSet<SetSelectionOption>, CursorAlignOnScroll, TextGranularity); > > void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved); > TextDirection directionOfEnclosingBlock(); >Index: Source/WebCore/editing/MoveSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/MoveSelectionCommand.cpp (revision 234792) >+++ Source/WebCore/editing/MoveSelectionCommand.cpp (working copy) >@@ -82,7 +82,7 @@ void MoveSelectionCommand::doApply() > // Document was modified out from under us. > return; > } >- ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::PreventNesting; >+ OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::PreventNesting }; > if (m_smartInsert) > options |= ReplaceSelectionCommand::SmartReplace; > >Index: Source/WebCore/editing/ReplaceSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/ReplaceSelectionCommand.cpp (revision 234792) >+++ Source/WebCore/editing/ReplaceSelectionCommand.cpp (working copy) >@@ -377,7 +377,7 @@ inline void ReplaceSelectionCommand::Ins > m_lastNodeInserted = newNode; > } > >-ReplaceSelectionCommand::ReplaceSelectionCommand(Document& document, RefPtr<DocumentFragment>&& fragment, CommandOptions options, EditAction editAction) >+ReplaceSelectionCommand::ReplaceSelectionCommand(Document& document, RefPtr<DocumentFragment>&& fragment, OptionSet<CommandOption> options, EditAction editAction) > : CompositeEditCommand(document, editAction) > , m_selectReplacement(options & SelectReplacement) > , m_smartReplace(options & SmartReplace) >Index: Source/WebCore/editing/ReplaceSelectionCommand.h >=================================================================== >--- Source/WebCore/editing/ReplaceSelectionCommand.h (revision 234792) >+++ Source/WebCore/editing/ReplaceSelectionCommand.h (working copy) >@@ -45,9 +45,7 @@ public: > IgnoreMailBlockquote = 1 << 6, > }; > >- typedef unsigned CommandOptions; >- >- static Ref<ReplaceSelectionCommand> create(Document& document, RefPtr<DocumentFragment>&& fragment, CommandOptions options, EditAction editingAction = EditActionInsert) >+ static Ref<ReplaceSelectionCommand> create(Document& document, RefPtr<DocumentFragment>&& fragment, OptionSet<CommandOption> options, EditAction editingAction = EditActionInsert) > { > return adoptRef(*new ReplaceSelectionCommand(document, WTFMove(fragment), options, editingAction)); > } >@@ -55,7 +53,7 @@ public: > VisibleSelection visibleSelectionForInsertedText() const { return m_visibleSelectionForInsertedText; } > > private: >- ReplaceSelectionCommand(Document&, RefPtr<DocumentFragment>&&, CommandOptions, EditAction); >+ ReplaceSelectionCommand(Document&, RefPtr<DocumentFragment>&&, OptionSet<CommandOption>, EditAction); > > String inputEventData() const final; > RefPtr<DataTransfer> inputEventDataTransfer() const final; >Index: Source/WebCore/editing/SetSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/SetSelectionCommand.cpp (revision 234792) >+++ Source/WebCore/editing/SetSelectionCommand.cpp (working copy) >@@ -31,7 +31,7 @@ > > namespace WebCore { > >-SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options) >+SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, OptionSet<FrameSelection::SetSelectionOption> options) > : SimpleEditCommand(selection.base().anchorNode()->document()) > , m_options(options) > , m_selectionToSet(selection) >Index: Source/WebCore/editing/SetSelectionCommand.h >=================================================================== >--- Source/WebCore/editing/SetSelectionCommand.h (revision 234792) >+++ Source/WebCore/editing/SetSelectionCommand.h (working copy) >@@ -32,13 +32,13 @@ namespace WebCore { > > class SetSelectionCommand : public SimpleEditCommand { > public: >- static Ref<SetSelectionCommand> create(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options) >+ static Ref<SetSelectionCommand> create(const VisibleSelection& selection, OptionSet<FrameSelection::SetSelectionOption> options) > { > return adoptRef(*new SetSelectionCommand(selection, options)); > } > > private: >- SetSelectionCommand(const VisibleSelection&, FrameSelection::SetSelectionOptions); >+ SetSelectionCommand(const VisibleSelection&, OptionSet<FrameSelection::SetSelectionOption>); > > void doApply() override; > void doUnapply() override; >@@ -47,7 +47,7 @@ private: > void getNodesInCommand(HashSet<Node*>&) override { } > #endif > >- FrameSelection::SetSelectionOptions m_options; >+ OptionSet<FrameSelection::SetSelectionOption> m_options; > VisibleSelection m_selectionToSet; > }; > >Index: Source/WebCore/page/ContextMenuController.cpp >=================================================================== >--- Source/WebCore/page/ContextMenuController.cpp (revision 234792) >+++ Source/WebCore/page/ContextMenuController.cpp (working copy) >@@ -360,7 +360,7 @@ void ContextMenuController::contextMenuI > case ContextMenuItemTagSpellingGuess: { > VisibleSelection selection = frame->selection().selection(); > if (frame->editor().shouldInsertText(title, selection.toNormalizedRange().get(), EditorInsertAction::Pasted)) { >- ReplaceSelectionCommand::CommandOptions replaceOptions = ReplaceSelectionCommand::MatchStyle | ReplaceSelectionCommand::PreventNesting; >+ OptionSet<ReplaceSelectionCommand::CommandOption> replaceOptions { ReplaceSelectionCommand::MatchStyle, ReplaceSelectionCommand::PreventNesting }; > > if (frame->editor().behavior().shouldAllowSpellingSuggestionsWithoutSelection()) { > ASSERT(selection.isCaretOrRange()); >Index: Source/WebCore/page/DragController.cpp >=================================================================== >--- Source/WebCore/page/DragController.cpp (revision 234792) >+++ Source/WebCore/page/DragController.cpp (working copy) >@@ -595,7 +595,7 @@ bool DragController::concludeEditDrag(co > MoveSelectionCommand::create(fragment.releaseNonNull(), dragCaret.base(), smartInsert, smartDelete)->apply(); > } else { > if (setSelectionToDragCaret(innerFrame.get(), dragCaret, range, point)) { >- ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::PreventNesting; >+ OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::PreventNesting }; > if (dragData.canSmartReplace()) > options |= ReplaceSelectionCommand::SmartReplace; > if (chosePlainText) >@@ -617,7 +617,7 @@ bool DragController::concludeEditDrag(co > return true; > > if (setSelectionToDragCaret(innerFrame.get(), dragCaret, range, point)) >- ReplaceSelectionCommand::create(*m_documentUnderMouse, fragment.get(), ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::MatchStyle | ReplaceSelectionCommand::PreventNesting, EditActionInsertFromDrop)->apply(); >+ ReplaceSelectionCommand::create(*m_documentUnderMouse, fragment.get(), { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::MatchStyle, ReplaceSelectionCommand::PreventNesting }, EditActionInsertFromDrop)->apply(); > } > > if (rootEditableElement) { >Index: Source/WebCore/page/TextIndicator.cpp >=================================================================== >--- Source/WebCore/page/TextIndicator.cpp (revision 234792) >+++ Source/WebCore/page/TextIndicator.cpp (working copy) >@@ -78,7 +78,7 @@ RefPtr<TextIndicator> TextIndicator::cre > Ref<Frame> protector(*frame); > > VisibleSelection oldSelection = frame->selection().selection(); >- TemporarySelectionOptions temporarySelectionOptions = TemporarySelectionOptionDefault; >+ OptionSet<TemporarySelectionOption> temporarySelectionOptions; > #if PLATFORM(IOS) > temporarySelectionOptions |= TemporarySelectionOptionIgnoreSelectionChanges; > temporarySelectionOptions |= TemporarySelectionOptionEnableAppearanceUpdates;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188500
:
346999
|
347003
|
347004
|
347008
|
347009