|
|
Chromium Code Reviews|
Created:
4 years, 11 months ago by yosin_UTC9 Modified:
4 years, 10 months ago CC:
blink-reviews, chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake associatedLayoutObjectOf() to handle ::first-letter pseudo-element correctly
This patch makes |associatedLayoutObjectOf()| to handle all cases of layout tree
shape for ::first-letter pseudo-element.
Before this patch, |associatedLayoutObjectOf()| handled first-letter only |Text|
node incorrectly.
BUG=560689
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf*
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit
Committed: https://crrev.com/7c9e1437f3de1149a5b1a9437d927d4e0d7802ba
Cr-Commit-Position: refs/heads/master@{#372299}
Patch Set 1 : 2016-01-27T18:23:21 #Patch Set 2 : 2016-01-28T14:03:04 #
Total comments: 6
Patch Set 3 : 2016-01-29T12:43:53 #
Total comments: 2
Patch Set 4 : 2016-01-29T14:19:19 #Patch Set 5 : 2016-01-29T14:21:36 #Patch Set 6 : 2016-01-29T15:21:03 Get rid of unused variable #
Messages
Total messages: 33 (16 generated)
Description was changed from ========== 2016-01-27T18:23:21 BUG=560689 ========== to ========== Make associatedLayoutObjectOf() to handle first-letter character only Text node BUG=560689 TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf* TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit ==========
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636373002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636373002/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_r...) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636373002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636373002/20001
Description was changed from
==========
Make associatedLayoutObjectOf() to handle first-letter character only Text node
BUG=560689
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf*
TEST=webkit_unit_tests
--gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit
==========
to
==========
Make associatedLayoutObjectOf() to handle first-letter character only Text node
This patch makes |associatedLayoutObjectOf()| to handle first-letter character
only |Text| node.
There are three cases for first-letter:
#1 Text node holds first-letter "a", no remaining text. <div>abc</div>, "a" and
"bc" are different text node.
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (0,0) size 0x0
LayoutText {#text} at (21,30) size 16x17
text run at (21,30) width 16: "bc"
#2 Text node hols first-letter "a" and remaining text "bc", <div>abc</div>
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (21,30) size 16x17
text run at (21,30) width 16: "bc"
#3 Text node with trailing whitespace, e.g. <div>a\n</div>
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (0,0) size 0x0
BUG=560689
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf*
TEST=webkit_unit_tests
--gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit
==========
yosin@chromium.org changed reviewers: + hajimehoshi@chromium.org, tkent@chromium.org, xiaochengh@chromium.org, yoichio@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
PTAL
https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2190: ASSERT(layoutTextFragment->isRemainingTextLayoutObject()); This ASSERT isn't helpful because layoutTextFragment->isRemainingTextLayoutObject() was checked at line 2181. https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2193: LayoutObject* firstLetterLayoutObject = layoutTextFragment->firstLetterPseudoElement()->layoutObject(); nullptr-check for firstLetterLayoutObject is removed. Is it intentional? https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.h (right): https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.h:78: CORE_EXPORT LayoutObject* associatedLayoutObjectOf(const Node&, int offsetInNode); Is this |offset functions on Node|?
Description was changed from
==========
Make associatedLayoutObjectOf() to handle first-letter character only Text node
This patch makes |associatedLayoutObjectOf()| to handle first-letter character
only |Text| node.
There are three cases for first-letter:
#1 Text node holds first-letter "a", no remaining text. <div>abc</div>, "a" and
"bc" are different text node.
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (0,0) size 0x0
LayoutText {#text} at (21,30) size 16x17
text run at (21,30) width 16: "bc"
#2 Text node hols first-letter "a" and remaining text "bc", <div>abc</div>
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (21,30) size 16x17
text run at (21,30) width 16: "bc"
#3 Text node with trailing whitespace, e.g. <div>a\n</div>
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x55
LayoutInline {<pseudo:first-letter>} at (0,0) size 22x53
LayoutTextFragment (anonymous) at (0,1) size 22x53
text run at (0,1) width 22: "a"
LayoutTextFragment {#text} at (0,0) size 0x0
BUG=560689
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf*
TEST=webkit_unit_tests
--gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit
==========
to
==========
Make associatedLayoutObjectOf() to handle ::first-letter pseudo-element
correctly
This patch makes |associatedLayoutObjectOf()| to handle all cases of layout tree
shape for ::first-letter pseudo-element.
Before this patch, |associatedLayoutObjectOf()| handled first-letter only |Text|
node incorrectly.
BUG=560689
TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf*
TEST=webkit_unit_tests
--gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit
==========
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
PTAL https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2190: ASSERT(layoutTextFragment->isRemainingTextLayoutObject()); On 2016/01/29 at 00:56:09, tkent wrote: > This ASSERT isn't helpful because layoutTextFragment->isRemainingTextLayoutObject() was checked at line 2181. Done. https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2193: LayoutObject* firstLetterLayoutObject = layoutTextFragment->firstLetterPseudoElement()->layoutObject(); On 2016/01/29 at 00:56:09, tkent wrote: > nullptr-check for firstLetterLayoutObject is removed. Is it intentional? Yes, it is intentional. This case should not be happened. If it is happened, we would like to know the case. I don't add nullptr-check ASSERT, since following line uses it. https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.h (right): https://codereview.chromium.org/1636373002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.h:78: CORE_EXPORT LayoutObject* associatedLayoutObjectOf(const Node&, int offsetInNode); On 2016/01/29 at 00:56:09, tkent wrote: > Is this |offset functions on Node|? Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636373002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636373002/40001
lgtm https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2182: // patter, e.g. "B\n", or remaining part "abc". patter -> part? I don't understand what you mean by "e.g. "B\n", or remaining part "abc"."
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2182: // patter, e.g. "B\n", or remaining part "abc". On 2016/01/29 at 03:52:16, tkent wrote: > patter -> part? > > I don't understand what you mean by "e.g. "B\n", or remaining part "abc"." Add more explanation about first-letter.
On 2016/01/29 at 05:27:45, Yosi_UTC9 wrote: > https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): > > https://codereview.chromium.org/1636373002/diff/40001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2182: // patter, e.g. "B\n", or remaining part "abc". > On 2016/01/29 at 03:52:16, tkent wrote: > > patter -> part? > > > > I don't understand what you mean by "e.g. "B\n", or remaining part "abc"." > > Add more explanation about first-letter. Committing...
The CQ bit was checked by yosin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tkent@chromium.org Link to the patchset: https://codereview.chromium.org/1636373002/#ps80001 (title: "2016-01-29T14:21:36")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636373002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636373002/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yosin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tkent@chromium.org Link to the patchset: https://codereview.chromium.org/1636373002/#ps100001 (title: "2016-01-29T15:21:03")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636373002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636373002/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Make associatedLayoutObjectOf() to handle ::first-letter pseudo-element correctly This patch makes |associatedLayoutObjectOf()| to handle all cases of layout tree shape for ::first-letter pseudo-element. Before this patch, |associatedLayoutObjectOf()| handled first-letter only |Text| node incorrectly. BUG=560689 TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf* TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit ========== to ========== Make associatedLayoutObjectOf() to handle ::first-letter pseudo-element correctly This patch makes |associatedLayoutObjectOf()| to handle all cases of layout tree shape for ::first-letter pseudo-element. Before this patch, |associatedLayoutObjectOf()| handled first-letter only |Text| node incorrectly. BUG=560689 TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.associatedLayoutObjectOf* TEST=webkit_unit_tests --gtest_filter=VisibleUnitsTest.mostBackwardCaretPositionFirstLetterSplit Committed: https://crrev.com/7c9e1437f3de1149a5b1a9437d927d4e0d7802ba Cr-Commit-Position: refs/heads/master@{#372299} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/7c9e1437f3de1149a5b1a9437d927d4e0d7802ba Cr-Commit-Position: refs/heads/master@{#372299} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
