WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Removed the dead code
bug-151380-20180926123024.patch (text/plain), 45.42 KB, created by
Ryosuke Niwa
on 2018-09-26 12:30:25 PDT
(
hide
)
Description:
Removed the dead code
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-09-26 12:30:25 PDT
Size:
45.42 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 236493) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,46 @@ >+2018-09-26 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Selection should work across shadow boundary when initiated by a mouse drag >+ https://bugs.webkit.org/show_bug.cgi?id=151380 >+ <rdar://problem/24363872> >+ >+ Reviewed by Antti Koivisto. >+ >+ This patch adds the basic support for selecting content across shadow DOM boundaries to VisibleSelection, >+ which is enough to allow users to select content across shadow DOM boundaries via a mouse drag. >+ >+ This is the first step in allowing users to select, copy and paste content across shadow DOM boundaries, >+ which is a serious user experience regression right now. The new behavior is enabled by default under >+ an interal debug feature flag: selectionAcrossShadowBoundariesEnabled. >+ >+ Like Chrome, we are not going to support selecting editable content across shadow DOM boundaries since >+ we'd have to generalize every editing commands to make that work, and there aren't any HTML editors that >+ use shadow DOM boundaries within an editable region yet. For simplicity, we also don't support extending >+ a selection out of a shadow root which resides inside an editing region. >+ >+ The keyboard based navigation & manipulation of selection as well as allowing copy & paste of content >+ across shadow DOM boundaries will be implemented by separate patches. DOMSelection will not expose this new >+ behavior either. This is tracked in the spec as https://github.com/w3c/webcomponents/issues/79 >+ >+ Tests: editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html >+ editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html >+ editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html >+ editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html >+ editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html >+ editing/selection/selection-across-shadow-boundaries-readonly-1.html >+ editing/selection/selection-across-shadow-boundaries-readonly-2.html >+ editing/selection/selection-across-shadow-boundaries-readonly-3.html >+ editing/selection/selection-across-shadow-boundaries-user-select-all-1.html >+ >+ * editing/VisibleSelection.cpp: >+ (WebCore::isInUserAgentShadowRootOrHasEditableShadowAncestor): Added. >+ (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): When the feature is enabled, >+ allow crossing shadow DOM boundaries except when either end is inside an user agent shadow root, or one of >+ its shadow includign ancestor is inside an editable region. The latter check is needed to disallow >+ an extension of a selection starting in a shadow tree inside a non-editable region inside an editable region >+ to outside the editable region. The rest of the editing code is not ready to deal with selection like that. >+ * page/Settings.yaml: Added an internal debug feature to enable this new behavior. >+ > 2018-09-25 Justin Fan <justin_fan@apple.com> > > WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample >Index: Source/WebCore/editing/VisibleSelection.cpp >=================================================================== >--- Source/WebCore/editing/VisibleSelection.cpp (revision 236493) >+++ Source/WebCore/editing/VisibleSelection.cpp (working copy) >@@ -30,6 +30,7 @@ > #include "Editing.h" > #include "Element.h" > #include "HTMLInputElement.h" >+#include "Settings.h" > #include "TextIterator.h" > #include "VisibleUnits.h" > #include <stdio.h> >@@ -504,23 +505,45 @@ Position VisibleSelection::adjustPositio > return Position(); > } > >+static bool isInUserAgentShadowRootOrHasEditableShadowAncestor(Node& node) >+{ >+ auto* shadowRoot = node.containingShadowRoot(); >+ if (!shadowRoot) >+ return false; >+ >+ if (shadowRoot->mode() == ShadowRootMode::UserAgent) >+ return true; >+ >+ for (RefPtr<Node> currentNode = &node; currentNode; currentNode = currentNode->parentOrShadowHostNode()) { >+ if (currentNode->hasEditableStyle()) >+ return true; >+ } >+ return false; >+} >+ > void VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries() > { > if (m_base.isNull() || m_start.isNull() || m_end.isNull()) > return; > >- if (&m_start.anchorNode()->treeScope() == &m_end.anchorNode()->treeScope()) >+ auto startNode = makeRef(*m_start.anchorNode()); >+ auto endNode = makeRef(*m_end.anchorNode()); >+ if (&startNode->treeScope() == &endNode->treeScope()) > return; > >+ if (startNode->document().settings().selectionAcrossShadowBoundariesEnabled()) { >+ if (!isInUserAgentShadowRootOrHasEditableShadowAncestor(startNode) >+ && !isInUserAgentShadowRootOrHasEditableShadowAncestor(endNode)) >+ return; >+ } >+ > if (m_baseIsFirst) { >- m_extent = adjustPositionForEnd(m_end, m_start.containerNode()); >+ m_extent = adjustPositionForEnd(m_end, startNode.ptr()); > m_end = m_extent; > } else { >- m_extent = adjustPositionForStart(m_start, m_end.containerNode()); >+ m_extent = adjustPositionForStart(m_start, endNode.ptr()); > m_start = m_extent; > } >- >- ASSERT(&m_start.anchorNode()->treeScope() == &m_end.anchorNode()->treeScope()); > } > > void VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries() >Index: Source/WebCore/page/Settings.yaml >=================================================================== >--- Source/WebCore/page/Settings.yaml (revision 236493) >+++ Source/WebCore/page/Settings.yaml (working copy) >@@ -389,6 +389,8 @@ smartInsertDeleteEnabled: > initial: defaultSmartInsertDeleteEnabled > selectTrailingWhitespaceEnabled: > initial: defaultSelectTrailingWhitespaceEnabled >+selectionAcrossShadowBoundariesEnabled: >+ initial: false > > useLegacyBackgroundSizeShorthandBehavior: > initial: false >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 236498) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-09-26 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Selection should work across shadow boundary when initiated by a mouse drag >+ https://bugs.webkit.org/show_bug.cgi?id=151380 >+ <rdar://problem/24363872> >+ >+ Reviewed by Antti Koivisto. >+ >+ Added SelectionAcrossShadowBoundariesEnabled as an internal debug feature, >+ and moved CSSCustomPropertiesAndValuesEnabled to where other experimental features are located. >+ >+ * Shared/WebPreferences.yaml: >+ > 2018-09-25 Ryosuke Niwa <rniwa@webkit.org> > > Make frame flattening an internal debug feature >Index: Source/WebKit/Shared/WebPreferences.yaml >=================================================================== >--- Source/WebKit/Shared/WebPreferences.yaml (revision 236493) >+++ Source/WebKit/Shared/WebPreferences.yaml (working copy) >@@ -1254,6 +1254,14 @@ ServerTimingEnabled: > webcoreBinding: RuntimeEnabledFeatures > webcoreName: serverTimingEnabled > >+CSSCustomPropertiesAndValuesEnabled: >+ type: bool >+ defaultValue: false >+ humanReadableName: "CSS Custom Properties and Values API" >+ humanReadableDescription: "Enable CSS Custom Properties and Values API" >+ webcoreBinding: RuntimeEnabledFeatures >+ category: experimental >+ > # For internal features: > # The type should be boolean. > # You must provide a humanReadableName and humanReadableDescription for all debug features. They >@@ -1338,7 +1346,7 @@ FullScreenEnabled: > > AriaReflectionEnabled: > type: bool >- defaultValue: true >+ defaultValue: false > humanReadableName: "ARIA Reflection" > humanReadableDescription: "ARIA Reflection support" > category: internal >@@ -1352,10 +1360,10 @@ WebAPIStatisticsEnabled: > webcoreBinding: RuntimeEnabledFeatures > category: internal > >-CSSCustomPropertiesAndValuesEnabled: >+SelectionAcrossShadowBoundariesEnabled: > type: bool >- defaultValue: false >- humanReadableName: "CSS Custom Properties and Values API" >- humanReadableDescription: "Enable CSS Custom Properties and Values API" >- webcoreBinding: RuntimeEnabledFeatures >- category: experimental >+ defaultValue: true >+ humanReadableName: "Selection across shadow DOM" >+ humanReadableDescription: "Allow user-initiated selection across shadow DOM boundaries" >+ category: internal >+ webcoreName: selectionAcrossShadowBoundariesEnabled >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 236493) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2018-09-26 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Selection should work across shadow boundary when initiated by a mouse drag >+ https://bugs.webkit.org/show_bug.cgi?id=151380 >+ <rdar://problem/24363872> >+ >+ Reviewed by Antti Koivisto. >+ >+ Added selectionAcrossShadowBoundariesEnabled as a preference to be used in DumpRenderTree. >+ >+ * WebView/WebPreferenceKeysPrivate.h: >+ * WebView/WebPreferences.mm: >+ (+[WebPreferences initialize]): >+ (-[WebPreferences selectionAcrossShadowBoundariesEnabled]): >+ (-[WebPreferences setSelectionAcrossShadowBoundariesEnabled:]): >+ * WebView/WebPreferencesPrivate.h: >+ * WebView/WebView.mm: >+ (-[WebView _preferencesChanged:]): >+ > 2018-09-24 Wenson Hsieh <wenson_hsieh@apple.com> > > Refactor Editor::fontAttributesForSelectionStart to be platform-agnostic >Index: Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (revision 236493) >+++ Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (working copy) >@@ -262,3 +262,4 @@ > #define WebKitAriaReflectionEnabledPreferenceKey @"WebKitAriaReflectionEnabled" > #define WebKitMediaCapabilitiesEnabledPreferenceKey @"WebKitMediaCapabilitiesEnabled" > #define WebKitServerTimingEnabledPreferenceKey @"WebKitServerTimingEnabled" >+#define WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey @"WebKitSelectionAcrossShadowBoundariesEnabled" >Index: Source/WebKitLegacy/mac/WebView/WebPreferences.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebPreferences.mm (revision 236493) >+++ Source/WebKitLegacy/mac/WebView/WebPreferences.mm (working copy) >@@ -664,6 +664,7 @@ + (void)initialize > #if ENABLE(WEB_RTC) > [NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey, > #endif >+ [NSNumber numberWithBool:NO], WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey, > #if ENABLE(INTERSECTION_OBSERVER) > @NO, WebKitIntersectionObserverEnabledPreferenceKey, > #endif >@@ -3365,6 +3366,16 @@ - (void)setServerTimingEnabled:(BOOL)fla > [self _setBoolValue:flag forKey:WebKitServerTimingEnabledPreferenceKey]; > } > >+- (BOOL)selectionAcrossShadowBoundariesEnabled >+{ >+ return [self _boolValueForKey:WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey]; >+} >+ >+- (void)setSelectionAcrossShadowBoundariesEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey]; >+} >+ > @end > > @implementation WebPreferences (WebInternal) >Index: Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (revision 236493) >+++ Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (working copy) >@@ -582,6 +582,9 @@ @interface WebPreferences (WebPrivate) > - (void)setServerTimingEnabled:(BOOL)flag; > - (BOOL)serverTimingEnabled; > >+- (void)setSelectionAcrossShadowBoundariesEnabled:(BOOL)flag; >+- (BOOL)selectionAcrossShadowBoundariesEnabled; >+ > @property (nonatomic) BOOL visualViewportEnabled; > @property (nonatomic) BOOL visualViewportAPIEnabled; > @property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled; >Index: Source/WebKitLegacy/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebView.mm (revision 236493) >+++ Source/WebKitLegacy/mac/WebView/WebView.mm (working copy) >@@ -3170,6 +3170,8 @@ - (void)_preferencesChanged:(WebPreferen > settings.setMediaCapabilitiesEnabled([preferences mediaCapabilitiesEnabled]); > > RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]); >+ >+ settings.setSelectionAcrossShadowBoundariesEnabled(preferences.selectionAcrossShadowBoundariesEnabled); > } > > static inline IMP getMethod(id o, SEL s) >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 236516) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2018-09-26 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Selection should work across shadow boundary when initiated by a mouse drag >+ https://bugs.webkit.org/show_bug.cgi?id=151380 >+ <rdar://problem/24363872> >+ >+ Reviewed by Antti Koivisto. >+ >+ Added the support for internal:selectionAcrossShadowBoundariesEnabled test option. >+ >+ * DumpRenderTree/TestOptions.cpp: >+ (TestOptions::TestOptions): >+ * DumpRenderTree/TestOptions.h: >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (resetWebPreferencesToConsistentValues): >+ (setWebPreferencesForTestOptions): >+ > 2018-09-26 Philippe Normand <pnormand@igalia.com> > > [Flatpak] Bump to apr 1.6.5 >Index: Tools/DumpRenderTree/TestOptions.cpp >=================================================================== >--- Tools/DumpRenderTree/TestOptions.cpp (revision 236493) >+++ Tools/DumpRenderTree/TestOptions.cpp (working copy) >@@ -101,6 +101,8 @@ TestOptions::TestOptions(const std::stri > allowCrossOriginSubresourcesToAskForCredentials = parseBooleanTestHeaderValue(value); > else if (key == "experimental:WebAnimationsCSSIntegrationEnabled") > enableWebAnimationsCSSIntegration = parseBooleanTestHeaderValue(value); >+ else if (key == "internal:selectionAcrossShadowBoundariesEnabled") >+ enableSelectionAcrossShadowBoundaries = parseBooleanTestHeaderValue(value); > else if (key == "enableColorFilter") > enableColorFilter = parseBooleanTestHeaderValue(value); > else if (key == "jscOptions") >Index: Tools/DumpRenderTree/TestOptions.h >=================================================================== >--- Tools/DumpRenderTree/TestOptions.h (revision 236493) >+++ Tools/DumpRenderTree/TestOptions.h (working copy) >@@ -43,6 +43,7 @@ struct TestOptions { > bool dumpJSConsoleLogInStdErr { false }; > bool allowCrossOriginSubresourcesToAskForCredentials { false }; > bool enableColorFilter { false }; >+ bool enableSelectionAcrossShadowBoundaries { false }; > std::string jscOptions; > > TestOptions(const std::string& pathOrURL, const std::string& absolutePath); >Index: Tools/DumpRenderTree/mac/DumpRenderTree.mm >=================================================================== >--- Tools/DumpRenderTree/mac/DumpRenderTree.mm (revision 236493) >+++ Tools/DumpRenderTree/mac/DumpRenderTree.mm (working copy) >@@ -990,6 +990,8 @@ static void resetWebPreferencesToConsist > [preferences setCacheAPIEnabled:NO]; > preferences.mediaCapabilitiesEnabled = YES; > >+ preferences.selectionAcrossShadowBoundariesEnabled = NO; >+ > [WebPreferences _clearNetworkLoaderSession]; > [WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain]; > } >@@ -1008,6 +1010,7 @@ static void setWebPreferencesForTestOpti > preferences.allowCrossOriginSubresourcesToAskForCredentials = options.allowCrossOriginSubresourcesToAskForCredentials; > preferences.webAnimationsCSSIntegrationEnabled = options.enableWebAnimationsCSSIntegration; > preferences.colorFilterEnabled = options.enableColorFilter; >+ preferences.selectionAcrossShadowBoundariesEnabled = options.enableSelectionAcrossShadowBoundaries; > } > > // Called once on DumpRenderTree startup. >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 236493) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,32 @@ >+2018-09-26 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Selection should work across shadow boundary when initiated by a mouse drag >+ https://bugs.webkit.org/show_bug.cgi?id=151380 >+ <rdar://problem/24363872> >+ >+ Reviewed by Antti Koivisto. >+ >+ Added regression tests using ref tests since getSelection() doesn't expose any node inside a shadow tree. >+ >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-1-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-2-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-3-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-4-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-5-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-1-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-1.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-2-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-2.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-3-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-readonly-3.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-user-select-all-1-expected.html: Added. >+ * editing/selection/selection-across-shadow-boundaries-user-select-all-1.html: Added. >+ > 2018-09-25 Justin Fan <justin_fan@apple.com> > > WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1-expected.html (working copy) >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in an editable element to a shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container" contenteditable>hello <div>world</div></div> >+<script> >+container.focus(); >+getSelection().setBaseAndExtent(container, 0, container, 1); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in an editable element to a shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container" contenteditable>hello </div> >+<script> >+ >+const host = document.createElement('div'); >+container.appendChild(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'world'; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + 1, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2-expected.html (working copy) >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree out to an editable element.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container" contenteditable>hello <div>world</div></div> >+<script> >+container.focus(); >+getSelection().setBaseAndExtent(container, 0, container, 1); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree out to an editable element.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container" contenteditable>world</div> >+<script> >+ >+const host = document.createElement('div'); >+container.prepend(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'hello '; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + 1, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3-expected.html (working copy) >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in an editable region in a shadow tree to an editable region in the document tree.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container"><div contenteditable>hello</div> world</div> >+<script> >+container.focus(); >+getSelection().selectAllChildren(container.firstChild); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in an editable region in a shadow tree to an editable region in the document tree.<br> >+To manually test, select "hello world" below by a mouse drag from "h" to "d". WebKit should only select "hello".</p> >+<div id="container" contenteditable>world</div> >+<script> >+ >+const host = document.createElement('div'); >+container.prepend(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.innerHTML = '<div contenteditable>hello </div>'; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + 1, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4-expected.html (working copy) >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside an editable region to the outside.<br> >+To manually test, select "hello world" below by a mouse drag from the bottom right to the top left.<br> >+WebKit should not extend the selection to the editable region outside the shadow tree.</p> >+<div id="container" contenteditable>hello <div>world</div></div> >+<script> >+container.focus(); >+getSelection().selectAllChildren(container.lastChild); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html (working copy) >@@ -0,0 +1,33 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside an editable region to the outside.<br> >+To manually test, select "hello world" below by a mouse drag from the bottom right to the top left.<br> >+WebKit should not extend the selection to the editable region outside the shadow tree.</p> >+<div id="container" contenteditable>hello </div> >+<script> >+ >+const host = document.createElement('div'); >+container.appendChild(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'world'; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft - 1, container.offsetTop - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5-expected.html (working copy) >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside a non-editable region in an editable region to outside the editable region.<br> >+To manually test, select "hello world WebKit" below by a mouse drag from the bottom right to the top left.<br> >+WebKit should not extend the selection to outside the shadow tree.</p> >+<div id="container" contenteditable>hello<br>world<div>WebKit</div></div> >+<script> >+container.focus(); >+getSelection().selectAllChildren(container.lastChild); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html (working copy) >@@ -0,0 +1,33 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside a non-editable region in an editable region to outside the editable region.<br> >+To manually test, select "hello world WebKit" below by a mouse drag from the bottom right to the top left.<br> >+WebKit should not extend the selection to outside the shadow tree.</p> >+<div id="container" contenteditable>hello <div contenteditable="false">world</div></div> >+<script> >+ >+const host = document.createElement('div'); >+container.lastChild.append(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = ' WebKit'; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + 1, container.offsetTop + 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1-expected.html (working copy) >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in the document into a shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container">hello <div>world</div></div> >+<script> >+getSelection().selectAllChildren(container); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-1.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in the document into a shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container">hello </div> >+<script> >+ >+const host = document.createElement('div'); >+container.appendChild(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'world'; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft - 2, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().endContainer.getRootNode() != document) >+ document.write("The end container's root node was not the document"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer.getRootNode() != document) >+ document.write("The range's end container's root node was not the document"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2-expected.html (working copy) >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree out to the document.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container">hello <div>world</div></div> >+<script> >+getSelection().selectAllChildren(container); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-2.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree out to the document.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container">world</div> >+<script> >+ >+const host = document.createElement('div'); >+container.prepend(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'hello '; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft - 2, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().endContainer.getRootNode() != document) >+ document.write("The end container's root node was not the document"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer.getRootNode() != document) >+ document.write("The range's end container's root node was not the document"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3-expected.html (working copy) >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in one shadow tree and ending another shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container">hello <div>world</div></div> >+<script> >+getSelection().selectAllChildren(container); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-readonly-3.html (working copy) >@@ -0,0 +1,36 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in one shadow tree and ending another shadow tree.<br> >+To manually test, select "hello world" below by a mouse drag. WebKit should select the phrase.</p> >+<div id="container"></div> >+<script> >+ >+const host1 = document.createElement('div'); >+const shadowRoot1 = host1.attachShadow({mode: 'closed'}); >+shadowRoot1.textContent = 'hello '; >+ >+const host2 = document.createElement('div'); >+const shadowRoot2 = host2.attachShadow({mode: 'closed'}); >+shadowRoot2.textContent = 'world'; >+container.append(host1, host2); >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft - 2, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().endContainer.getRootNode() != document) >+ document.write("The end container's root node was not the document"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer.getRootNode() != document) >+ document.write("The range's end container's root node was not the document"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1-expected.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1-expected.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1-expected.html (working copy) >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside a <code>user-select: all</code> in an editable region in to outside the editable region.<br> >+To manually test, select "hello world WebKit rocks" below by a mouse drag from "h" to "s". WebKit should select "hello".</p> >+<div id="container"><div contenteditable><div id="selected">hello</div>world<br>WebKit</div>rocks</div> >+<script> >+getSelection().selectAllChildren(selected); >+</script> >+</body> >+</html> >Index: LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1.html >=================================================================== >--- LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1.html (nonexistent) >+++ LayoutTests/editing/selection/selection-across-shadow-boundaries-user-select-all-1.html (working copy) >@@ -0,0 +1,32 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ internal:selectionAcrossShadowBoundariesEnabled=true ] --> >+<html> >+<body> >+<p>This tests selecting content starting in a shadow tree inside a <code>user-select: all</code> in an editable region in to outside the editable region.<br> >+To manually test, select "hello world WebKit rocks" below by a mouse drag from "h" to "s". WebKit should select "hello".</p> >+<div id="container"><div contenteditable><div style="user-select: all">world</div> WebKit</div>rocks</div> >+<script> >+ >+const host = document.createElement('div'); >+container.firstChild.prepend(host); >+const shadowRoot = host.attachShadow({mode: 'closed'}); >+shadowRoot.textContent = 'hello '; >+ >+if (window.eventSender) { >+ eventSender.dragMode = false; >+ eventSender.mouseMoveTo(container.offsetLeft + 1, container.offsetTop + 5); >+ eventSender.mouseDown(); >+ eventSender.mouseMoveTo(container.offsetLeft + container.offsetWidth - 5, container.offsetTop + container.offsetHeight - 5); >+ eventSender.mouseUp(); >+ if (getSelection().startContainer.getRootNode() != document) >+ document.write("The start container's root node was not the document"); >+ if (getSelection().startContainer != getSelection().endContainer) >+ document.write("The end container was different from the start container"); >+ if (getSelection().getRangeAt(0).startContainer.getRootNode() != document) >+ document.write("The range's start container's root node was not the document"); >+ if (getSelection().getRangeAt(0).endContainer != getSelection().getRangeAt(0).startContainer) >+ document.write("The range's end container was different from its start container"); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/platform/win/TestExpectations >=================================================================== >--- LayoutTests/platform/win/TestExpectations (revision 236493) >+++ LayoutTests/platform/win/TestExpectations (working copy) >@@ -101,6 +101,15 @@ webkit.org/b/173281 http/tests/security/ > webkit.org/b/173281 editing/style/set-foreColor-with-color-filter.html [ Skip ] > webkit.org/b/173281 editing/style/set-backColor-with-color-filter.html [ Skip ] > webkit.org/b/173281 editing/style/inverse-color-filter.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-mixed-editability-1.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-mixed-editability-2.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-mixed-editability-3.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-mixed-editability-4.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-mixed-editability-5.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-readonly-1.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-readonly-2.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-readonly-3.html [ Skip ] >+webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-user-select-all-1.html [ Skip ] > > # TODO HW filters not yet supported on Windows > webkit.org/b/74716 css3/filters/effect-blur-hw.html [ Skip ]
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
Flags:
wenson_hsieh
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 151380
:
350744
|
350851
|
350881
| 350882