Diff
Modified: trunk/LayoutTests/ChangeLog (202834 => 202835)
--- trunk/LayoutTests/ChangeLog 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/LayoutTests/ChangeLog 2016-07-05 22:23:49 UTC (rev 202835)
@@ -1,3 +1,18 @@
+2016-07-05 Enrica Casucci <[email protected]>
+
+ HTMLAttachment elements don't receive clicks after the first on iOS.
+ https://bugs.webkit.org/show_bug.cgi?id=159310
+ rdar://problem/25776940
+
+ Reviewed by Tim Horton.
+
+ Updated existing test to correctly reflect the new behavior.
+
+ * fast/attachment/attachment-select-on-click.html:
+ * platform/ios-simulator-wk1/TestExpectations:
+ * platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt:
+ * platform/mac/fast/attachment/attachment-select-on-click-expected.txt:
+
2016-07-05 Benjamin Poulain <[email protected]>
[JSC] The prototype cycle checks throws the wrong error type
Modified: trunk/LayoutTests/fast/attachment/attachment-select-on-click.html (202834 => 202835)
--- trunk/LayoutTests/fast/attachment/attachment-select-on-click.html 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/LayoutTests/fast/attachment/attachment-select-on-click.html 2016-07-05 22:23:49 UTC (rev 202835)
@@ -6,6 +6,7 @@
</script>
<body _onload_="runTest()">
<div>text before <attachment id="attachment"></attachment> text after</div>
+<div id="result"></div>
<script>
var file;
if (window.internals)
@@ -20,6 +21,8 @@
eventSender.mouseMoveTo(attachment.offsetLeft + 10, attachment.offsetTop + 10);
eventSender.mouseDown(0);
eventSender.mouseUp(0);
+ var range = window.getSelection().getRangeAt(0);
+ document.getElementById("result").innerText = 'Start offset ' + range.startOffset + ' End offset ' + range.endOffset;
}
</script>
</body>
Modified: trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt (202834 => 202835)
--- trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:23:49 UTC (rev 202835)
@@ -1,8 +1,8 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x150
- RenderBlock {HTML} at (0,0) size 800x150
- RenderBody {BODY} at (8,8) size 784x134
+layer at (0,0) size 800x170
+ RenderBlock {HTML} at (0,0) size 800x170
+ RenderBody {BODY} at (8,8) size 784x154
RenderBlock {DIV} at (0,0) size 784x134
RenderText {#text} at (0,0) size 73x19
text run at (0,0) width 73: "text before "
@@ -9,3 +9,7 @@
RenderAttachment {ATTACHMENT} at (72,15) size 161x119 [color=#007AFF]
RenderText {#text} at (232,0) size 63x19
text run at (232,0) width 63: " text after"
+ RenderBlock {DIV} at (0,134) size 784x20
+ RenderText {#text} at (0,0) size 181x19
+ text run at (0,0) width 181: "Start offset 12 End offset 12"
+caret: position 12 of child 0 {#text} of child 1 {DIV} of body
Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (202834 => 202835)
--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-07-05 22:23:49 UTC (rev 202835)
@@ -1180,7 +1180,7 @@
editing/selection/mixed-editability-3.html [ Failure ]
editing/style/style-boundary-001.html [ Failure ]
fast/attachment/attachment-select-on-click-inside-user-select-all.html [ Failure ]
-fast/attachment/attachment-select-on-click.html [ Failure ]
+fast/attachment/attachment-select-on-click.html [ Pass ]
fast/block/basic/011.html [ Failure ]
fast/block/basic/minheight.html [ Failure ]
fast/block/margin-collapse/103.html [ Failure ]
Modified: trunk/LayoutTests/platform/mac/fast/attachment/attachment-select-on-click-expected.txt (202834 => 202835)
--- trunk/LayoutTests/platform/mac/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/LayoutTests/platform/mac/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:23:49 UTC (rev 202835)
@@ -1,8 +1,8 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x93
- RenderBlock {HTML} at (0,0) size 800x93
- RenderBody {BODY} at (8,8) size 784x77
+layer at (0,0) size 800x111
+ RenderBlock {HTML} at (0,0) size 800x111
+ RenderBody {BODY} at (8,8) size 784x95
RenderBlock {DIV} at (0,0) size 784x77
RenderText {#text} at (0,54) size 73x18
text run at (0,54) width 73: "text before "
@@ -9,5 +9,8 @@
RenderAttachment {ATTACHMENT} at (72,0) size 77x77
RenderText {#text} at (148,54) size 63x18
text run at (148,54) width 63: " text after"
+ RenderBlock {DIV} at (0,77) size 784x18
+ RenderText {#text} at (0,0) size 165x18
+ text run at (0,0) width 165: "Start offset 1 End offset 2"
selection start: position 0 of child 1 {ATTACHMENT} of child 1 {DIV} of body
selection end: position 1 of child 1 {ATTACHMENT} of child 1 {DIV} of body
Modified: trunk/Source/WebCore/ChangeLog (202834 => 202835)
--- trunk/Source/WebCore/ChangeLog 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/Source/WebCore/ChangeLog 2016-07-05 22:23:49 UTC (rev 202835)
@@ -1,3 +1,15 @@
+2016-07-05 Enrica Casucci <[email protected]>
+
+ HTMLAttachment elements don't receive clicks after the first on iOS.
+ https://bugs.webkit.org/show_bug.cgi?id=159310
+ rdar://problem/25776940
+
+ Reviewed by Tim Horton.
+
+ shouldSelectOnMouseDown() now returns false on iOS.
+
+ * html/HTMLAttachmentElement.h:
+
2016-07-05 Brady Eidson <[email protected]>
IDBDatabase can null deref its ScriptExecutionContext inside connectionToServerLost.
Modified: trunk/Source/WebCore/html/HTMLAttachmentElement.h (202834 => 202835)
--- trunk/Source/WebCore/html/HTMLAttachmentElement.h 2016-07-05 22:21:54 UTC (rev 202834)
+++ trunk/Source/WebCore/html/HTMLAttachmentElement.h 2016-07-05 22:23:49 UTC (rev 202835)
@@ -52,7 +52,13 @@
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
- bool shouldSelectOnMouseDown() override { return true; }
+ bool shouldSelectOnMouseDown() override {
+#if PLATFORM(IOS)
+ return false;
+#else
+ return true;
+#endif
+ }
bool canContainRangeEndPoint() const override { return false; }
void parseAttribute(const QualifiedName&, const AtomicString&) override;