Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1500)

Unified Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 2800683003: Workaround for Samsung email issues (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Range.cpp
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index 6dcbf0c142f611fd2919af1e46b77c9985a288af..4611c749cc8d195b85c3f43d5b2d630517d7c013 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -43,6 +43,7 @@
#include "core/editing/iterators/TextIterator.h"
#include "core/editing/serializers/Serialization.h"
#include "core/events/ScopedEventQueue.h"
+#include "core/frame/Settings.h"
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLElement.h"
#include "core/layout/LayoutObject.h"
@@ -77,8 +78,13 @@ class RangeUpdateScope {
DCHECK_GE(s_scopeCount, 1);
if (--s_scopeCount > 0)
return;
- m_range->removeFromSelectionIfInDifferentRoot(*m_oldDocument);
- m_range->updateSelectionIfAddedToSelection();
+ Settings* settings =
+ m_oldDocument->frame() ? m_oldDocument->frame()->settings() : nullptr;
+ if (!settings ||
+ !settings->getDoNotUpdateSelectionOnMutatingSelectionRange()) {
+ m_range->removeFromSelectionIfInDifferentRoot(*m_oldDocument);
+ m_range->updateSelectionIfAddedToSelection();
+ }
#if DCHECK_IS_ON()
s_range = nullptr;
#endif
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698