Group `WSRunScanner` members with stack only classes
Categories
(Core :: DOM: Editor, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Whiteboard: [h2review-noted])
Attachments
(8 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Some members of WSRunScanner
should be grouped for managing them easily and making easier to create WSFragment
without WSRunScanner
.
Assignee | ||
Comment 1•5 years ago
|
||
The result should never be modified so that it should return const
-pointer.
Assignee | ||
Comment 2•5 years ago
|
||
Despite the name, it stores range of white-space sequence and/or start/end
reason. Initializing start and end are completely independent. Therefore,
we can move them into independent methods.
Depends on D79964
Assignee | ||
Comment 3•5 years ago
|
||
There are duplicated code in both WSRunScanner::InitializeRangeStart()
and WSRunScanner::InitializeRangeEnd()
. They scan text node to store
first and last NBSP positions and initialize start/end with found visible
character position. This patch makes the loop clearer.
Depends on D79965
Assignee | ||
Comment 4•5 years ago
|
||
Their topmost else
blocks mean there is no visible content before/after the
point. In this case, the initialization is simpler. So, they should be
handled first, and make the other blocks outdented.
Depends on D79966
Assignee | ||
Comment 5•5 years ago
|
||
Similar to the previous patch, this patch moves the last else
block of
the loops in WSRunScanner::InitializeRangeStart()
and
WSRunScanner::InitializeRangeEnd()
to before the text node handling case.
This makes that clearer that the loops are continued only when text node
has no text or only white-spaces.
Depends on D79969
Assignee | ||
Comment 6•5 years ago
|
||
With the previous patches, we know that the loops in
WSRunScanner::InitializeRangeStart()
and WSRunScanner::InitializeRangeEnd()
rarely run twice and more. Therefore, we can make use recursive calls instead
of the loop.
Depends on D79970
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D79971
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D79972
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
Comment 12•5 years ago
|
||
bugherder |
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
bugherder |
Comment 19•5 years ago
|
||
Comment 20•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•