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)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Some members of WSRunScanner
should be grouped for managing them easily and making easier to create WSFragment
without WSRunScanner
.
Assignee | ||
Comment 1•4 years ago
|
||
The result should never be modified so that it should return const
-pointer.
Assignee | ||
Comment 2•4 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•4 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•4 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•4 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•4 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•4 years ago
|
||
Depends on D79971
Assignee | ||
Comment 8•4 years ago
|
||
Depends on D79972
Assignee | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
Comment 12•4 years ago
|
||
bugherder |
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
bugherder |
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
bugherder |
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•