Diff
Modified: trunk/Source/WebCore/ChangeLog (200411 => 200412)
--- trunk/Source/WebCore/ChangeLog 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebCore/ChangeLog 2016-05-04 08:39:07 UTC (rev 200412)
@@ -1,3 +1,21 @@
+2016-05-04 Gyuyoung Kim <[email protected]>
+
+ Add WKPreference for SelectionPaintingWithoutSelectionGaps
+ https://bugs.webkit.org/show_bug.cgi?id=156900
+
+ Reviewed by Michael Catanzaro.
+
+ Unlike other browsers WebKit has been drawing selection gaps
+ between render blocks during the text selection. This often
+ cause text selection screen looks messy.
+
+ This patch adds a setting method to disable the functionality,
+ and EFL port disables it by default.
+
+ * page/Settings.in:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::shouldPaintSelectionGaps):
+
2016-05-04 Youenn Fablet <[email protected]>
Rename JSKeyValueIterator as JSDOMIterator
Modified: trunk/Source/WebCore/page/Settings.in (200411 => 200412)
--- trunk/Source/WebCore/page/Settings.in 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebCore/page/Settings.in 2016-05-04 08:39:07 UTC (rev 200412)
@@ -256,3 +256,6 @@
systemLayoutDirection type=TextDirection, initial=LTR
allowContentSecurityPolicySourceStarToMatchAnyProtocol initial=false
+
+selectionPaintingWithoutSelectionGapsEnabled initial=false
+
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (200411 => 200412)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2016-05-04 08:39:07 UTC (rev 200412)
@@ -1714,6 +1714,9 @@
bool RenderBlock::shouldPaintSelectionGaps() const
{
+ if (frame().settings().selectionPaintingWithoutSelectionGapsEnabled())
+ return false;
+
return selectionState() != SelectionNone && style().visibility() == VISIBLE && isSelectionRoot();
}
Modified: trunk/Source/WebKit2/ChangeLog (200411 => 200412)
--- trunk/Source/WebKit2/ChangeLog 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebKit2/ChangeLog 2016-05-04 08:39:07 UTC (rev 200412)
@@ -1,3 +1,25 @@
+2016-05-04 Gyuyoung Kim <[email protected]>
+
+ Add WKPreference for SelectionPaintingWithoutSelectionGaps
+ https://bugs.webkit.org/show_bug.cgi?id=156900
+
+ Reviewed by Michael Catanzaro.
+
+ Unlike other browsers WebKit has been drawing selection gaps
+ between render blocks during the text selection. This often
+ cause text selection screen looks messy.
+
+ This patch adds a setting method to disable the functionality,
+ and EFL port disables it by default.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled):
+ (WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled):
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2016-05-04 Zan Dobersek <[email protected]>
[CoordGraphics] CompositingCoordinator should hande root compositing and view overlay layers separately
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (200411 => 200412)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-05-04 08:39:07 UTC (rev 200412)
@@ -40,6 +40,12 @@
#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED false
#endif
+#if PLATFORM(EFL)
+#define DEFAULT_SELECTION_PAINTING_WITHOUT_SELECTION_GAPS_ENABLED true
+#else
+#define DEFAULT_SELECTION_PAINTING_WITHOUT_SELECTION_GAPS_ENABLED false
+#endif
+
#if ENABLE(SMOOTH_SCROLLING)
#define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED true
#else
@@ -230,6 +236,7 @@
macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, false, "", "") \
macro(WebGL2Enabled, webGL2Enabled, Bool, bool, false, "", "") \
macro(DownloadAttributeEnabled, downloadAttributeEnabled, Bool, bool, false, "", "") \
+ macro(SelectionPaintingWithoutSelectionGapsEnabled, selectionPaintingWithoutSelectionGapsEnabled, Bool, bool, DEFAULT_SELECTION_PAINTING_WITHOUT_SELECTION_GAPS_ENABLED, "", "") \
FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE(macro) \
\
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (200411 => 200412)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2016-05-04 08:39:07 UTC (rev 200412)
@@ -1540,3 +1540,13 @@
{
return toImpl(preferencesRef)->downloadAttributeEnabled();
}
+
+void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);
+}
+
+bool WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->selectionPaintingWithoutSelectionGapsEnabled();
+}
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (200411 => 200412)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-05-04 08:39:07 UTC (rev 200412)
@@ -431,6 +431,10 @@
WK_EXPORT void WKPreferencesSetDownloadAttributeEnabled(WKPreferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef);
+// Defaults to false
+WK_EXPORT void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (200411 => 200412)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-05-04 08:22:18 UTC (rev 200411)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-05-04 08:39:07 UTC (rev 200412)
@@ -2949,6 +2949,8 @@
settings.setHttpEquivEnabled(store.getBoolValueForKey(WebPreferencesKey::httpEquivEnabledKey()));
+ settings.setSelectionPaintingWithoutSelectionGapsEnabled(store.getBoolValueForKey(WebPreferencesKey::selectionPaintingWithoutSelectionGapsEnabledKey()));
+
DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
#if ENABLE(FULLSCREEN_API)