|
|
Created:
4 years, 3 months ago by yosin_UTC9 Modified:
4 years, 3 months ago CC:
blink-reviews, chromium-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSimplify caret color calculation in CaretBase::paintCaret()
This patch simplifies caret color calculation in |CaretBase::paintCaret()| by
using |LayoutObject::resolveColor()| for |CSSColorProperty| for specified
|Node| object rather than using parent element's layout object, since color
value for |Text| node and parent element are same.
BUG=n/a
TEST=n/a; no behavior changes
Committed: https://crrev.com/de6470c2e53aca2dbdf27d5985e7b7aff043337e
Cr-Commit-Position: refs/heads/master@{#417548}
Patch Set 1 : 2016-09-09T15:00:21 #
Total comments: 3
Messages
Total messages: 17 (8 generated)
Description was changed from ========== 2016-09-09T15:00:21 BUG= ========== to ========== Simplify caret color calculation in CaretBase::paintCaret() BUG=n/a TEST=n/a; no behavior changes ==========
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/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Simplify caret color calculation in CaretBase::paintCaret() BUG=n/a TEST=n/a; no behavior changes ========== to ========== Simplify caret color calculation in CaretBase::paintCaret() This patch simplifies caret color calculation in |CaretBase::paintCaret()| by using |LayoutObject::resolveColor()| for |CSSColorProperty| for specified |Node| object rather than using parent element's layout object, since color value for |Text| node and parent element are same. BUG=n/a TEST=n/a; no behavior changes ==========
yosin@chromium.org changed reviewers: + xiaochengh@chromium.org, yoichio@chromium.org
https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/editing/CaretBase.cpp:207: const Color caretColor = node->layoutObject()->resolveColor(CSSPropertyColor); Do you mean |node| is always a |Text|? If so, could you add a DCHECK?
On 2016/09/09 at 07:40:44, xiaochengh wrote: > https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): > > https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/editing/CaretBase.cpp:207: const Color caretColor = node->layoutObject()->resolveColor(CSSPropertyColor); > Do you mean |node| is always a |Text|? If so, could you add a DCHECK? No, |node| can be |Text| or |Element|.
lgtm
The CQ bit was unchecked by yosin@chromium.org
The CQ bit was checked by yosin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/editing/CaretBase.cpp:207: const Color caretColor = node->layoutObject()->resolveColor(CSSPropertyColor); node->layoutObject() exists always?
https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): https://codereview.chromium.org/2322193002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/editing/CaretBase.cpp:207: const Color caretColor = node->layoutObject()->resolveColor(CSSPropertyColor); On 2016/09/09 at 07:53:54, yoichio wrote: > node->layoutObject() exists always? |node| comes from anchor node of VisiblePosition.
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Simplify caret color calculation in CaretBase::paintCaret() This patch simplifies caret color calculation in |CaretBase::paintCaret()| by using |LayoutObject::resolveColor()| for |CSSColorProperty| for specified |Node| object rather than using parent element's layout object, since color value for |Text| node and parent element are same. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Simplify caret color calculation in CaretBase::paintCaret() This patch simplifies caret color calculation in |CaretBase::paintCaret()| by using |LayoutObject::resolveColor()| for |CSSColorProperty| for specified |Node| object rather than using parent element's layout object, since color value for |Text| node and parent element are same. BUG=n/a TEST=n/a; no behavior changes Committed: https://crrev.com/de6470c2e53aca2dbdf27d5985e7b7aff043337e Cr-Commit-Position: refs/heads/master@{#417548} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/de6470c2e53aca2dbdf27d5985e7b7aff043337e Cr-Commit-Position: refs/heads/master@{#417548} |