Bug 83118 - Assert triggers VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries
Summary: Assert triggers VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shinya Kawanaka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-03 22:25 PDT by Shinya Kawanaka
Modified: 2012-04-09 22:39 PDT (History)
5 users (show)

See Also:


Attachments
Repro (3.25 KB, text/plain)
2012-04-03 22:27 PDT, Shinya Kawanaka
no flags Details
Patch (9.85 KB, patch)
2012-04-04 22:37 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
WIP (37.46 KB, patch)
2012-04-05 19:14 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (38.29 KB, patch)
2012-04-05 19:26 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (38.35 KB, patch)
2012-04-05 23:38 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (39.12 KB, patch)
2012-04-06 05:52 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
BulidTest (38.38 KB, patch)
2012-04-09 00:53 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (39.15 KB, patch)
2012-04-09 01:21 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (23.78 KB, patch)
2012-04-09 02:29 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (46.25 KB, patch)
2012-04-09 20:40 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (45.82 KB, patch)
2012-04-09 21:16 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinya Kawanaka 2012-04-03 22:25:20 PDT
This assertion is triggered by the attached repro.
Comment 1 Shinya Kawanaka 2012-04-03 22:27:00 PDT
Created attachment 135514 [details]
Repro
Comment 2 Shinya Kawanaka 2012-04-03 22:38:48 PDT
ASSERTION FAILED: m_start.anchorNode()->treeScope() == m_end.anchorNode()->treeScope()
third_party/WebKit/Source/WebCore/editing/VisibleSelection.cpp(481) : void WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries()
1   0x149999b
2   0x14994f8
3   0x1497797
4   0x15f38e1
5   0x15f31d7
6   0x15f70a0
7   0x15f67dc
8   0x4bf848
9   0x4c3fbc
10  0x438350
11  0x4392bb
12  0x437f05
13  0x43dfd0
14  0x42b4da
15  0x42ab97
16  0x130e497
17  0x130e60d
18  0xb2b8b5
19  0xb26344
20  0xb26315
21  0xe7eeec0618e
[27468:27468:1116372213327:ERROR:process_util_posix.cc(142)] Received signal 11
	base::debug::StackTrace::StackTrace() [0x8562e2]
	base::(anonymous namespace)::StackDumpSignalHandler() [0x80fe61]
	0x7fa953064af0
	WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries() [0x14999a5]
	WebCore::VisibleSelection::validate() [0x14994f8]
	WebCore::VisibleSelection::setExtent() [0x1497797]
	WebCore::EventHandler::updateSelectionForMouseDrag() [0x15f38e1]
	WebCore::EventHandler::handleMouseDraggedEvent() [0x15f31d7]
	WebCore::EventHandler::handleMouseMoveEvent() [0x15f70a0]
	WebCore::EventHandler::mouseMoved() [0x15f67dc]
	WebKit::WebViewImpl::mouseMove() [0x4bf848]
	WebKit::WebViewImpl::handleInputEvent() [0x4c3fbc]
	EventSender::doMouseMove() [0x438350]
	EventSender::replaySavedEvents() [0x4392bb]
	EventSender::mouseUp() [0x437f05]
	CppBoundClass::MemberCallback<>::run() [0x43dfd0]
	CppBoundClass::invoke() [0x42b4da]
	CppNPObject::invoke() [0x42ab97]
	WebCore::npObjectInvokeImpl() [0x130e497]
	WebCore::npObjectMethodHandler() [0x130e60d]
	v8::internal::HandleApiCallHelper<>() [0xb2b8b5]
	v8::internal::Builtin_Impl_HandleApiCall() [0xb26344]
	v8::internal::Builtin_HandleApiCall() [0xb26315]
	0xe7eeec0618e
Comment 3 Shinya Kawanaka 2012-04-04 22:37:32 PDT
Created attachment 135756 [details]
Patch
Comment 4 Hajime Morrita 2012-04-04 23:00:39 PDT
Comment on attachment 135756 [details]
Patch

It looks All code in the change touches anchorNode()->treeScope().
My feeling is that we could model stuff with TreeScope as the center.
Such refactoring may clarify the fact the scope guards shadow nodes from from leaking.
Comment 5 Shinya Kawanaka 2012-04-05 19:14:10 PDT
Created attachment 135968 [details]
WIP
Comment 6 WebKit Review Bot 2012-04-05 19:22:52 PDT
Attachment 135968 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1
Source/WebCore/dom/TreeScopeAdjuster.cpp:29:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebCore/dom/TreeScopeAdjuster.cpp:39:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Shinya Kawanaka 2012-04-05 19:26:04 PDT
Created attachment 135970 [details]
Patch
Comment 8 Build Bot 2012-04-05 20:49:59 PDT
Comment on attachment 135970 [details]
Patch

Attachment 135970 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12335693
Comment 9 Build Bot 2012-04-05 20:55:11 PDT
Comment on attachment 135970 [details]
Patch

Attachment 135970 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12264669
Comment 10 Shinya Kawanaka 2012-04-05 23:38:38 PDT
Created attachment 135985 [details]
Patch
Comment 11 Build Bot 2012-04-06 00:17:05 PDT
Comment on attachment 135985 [details]
Patch

Attachment 135985 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12339763
Comment 12 Shinya Kawanaka 2012-04-06 05:52:43 PDT
Created attachment 136010 [details]
Patch
Comment 13 Shinya Kawanaka 2012-04-06 05:53:31 PDT
The build passes in my local environment on Mac, but bot gets angry.... I've added a symbol in WebCore.exp.in.
Comment 14 Philippe Normand 2012-04-06 06:14:28 PDT
Comment on attachment 136010 [details]
Patch

Attachment 136010 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/12339890
Comment 15 Build Bot 2012-04-06 06:20:09 PDT
Comment on attachment 136010 [details]
Patch

Attachment 136010 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12264877
Comment 16 Shinya Kawanaka 2012-04-09 00:53:45 PDT
Created attachment 136195 [details]
BulidTest
Comment 17 Shinya Kawanaka 2012-04-09 01:21:09 PDT
Created attachment 136197 [details]
Patch
Comment 18 Shinya Kawanaka 2012-04-09 02:29:15 PDT
Created attachment 136200 [details]
Patch
Comment 19 Shinya Kawanaka 2012-04-09 20:40:09 PDT
Created attachment 136387 [details]
Patch
Comment 20 Hajime Morrita 2012-04-09 20:42:38 PDT
Comment on attachment 136387 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=136387&action=review

> Source/WebCore/dom/TreeScope.h:79
> +    Node* boundaryNode(Node*) const;

It looks this isn't used.
Comment 21 Shinya Kawanaka 2012-04-09 21:16:30 PDT
Created attachment 136392 [details]
Patch
Comment 22 WebKit Review Bot 2012-04-09 22:39:40 PDT
Comment on attachment 136392 [details]
Patch

Clearing flags on attachment: 136392

Committed r113681: <http://trac.webkit.org/changeset/113681>
Comment 23 WebKit Review Bot 2012-04-09 22:39:47 PDT
All reviewed patches have been landed.  Closing bug.