Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Issue 25490002: Refactoring: Change the order of conditions to avoid computing rendererIsEditable() (Closed)

Created:
7 years, 2 months ago by vanihegde
Modified:
7 years, 2 months ago
Reviewers:
yosin, ojan
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org, vanivhegde
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refactoring: Change the order of conditions to avoid computing rendererIsEditable() When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform some operation, it is more effective to check for renderer() first, so that if this condition fails we can avoid unnecessary computation of rendererIsEditable(). All the layout tests have been successfully run with this change. R=ojan, yosin Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158856

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review comments incorporated #

Patch Set 3 : Removed unrelated changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M Source/core/dom/Position.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/page/EventHandler.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
vanihegde
Please have a look at this minor code refactoring.
7 years, 2 months ago (2013-10-01 10:56:30 UTC) #1
ojan
https://codereview.chromium.org/25490002/diff/1/Source/core/dom/Position.cpp File Source/core/dom/Position.cpp (right): https://codereview.chromium.org/25490002/diff/1/Source/core/dom/Position.cpp#newcode601 Source/core/dom/Position.cpp:601: RenderObject* renderer = currentNode->renderer(); Doesn't this change behavior because ...
7 years, 2 months ago (2013-10-01 19:21:38 UTC) #2
yosin_UTC9
On 2013/10/01 19:21:38, ojan wrote: > https://codereview.chromium.org/25490002/diff/1/Source/core/dom/Position.cpp > File Source/core/dom/Position.cpp (right): > > https://codereview.chromium.org/25490002/diff/1/Source/core/dom/Position.cpp#newcode601 > ...
7 years, 2 months ago (2013-10-02 01:51:50 UTC) #3
vanihegde
On 2013/10/02 01:51:50, Yoshifumi Inoue wrote: > On 2013/10/01 19:21:38, ojan wrote: > > https://codereview.chromium.org/25490002/diff/1/Source/core/dom/Position.cpp ...
7 years, 2 months ago (2013-10-03 04:13:53 UTC) #4
yosin_UTC9
> Additionally did a minor cleanup - removing unused variable etc. which I had > ...
7 years, 2 months ago (2013-10-03 09:56:31 UTC) #5
vanihegde
On 2013/10/03 09:56:31, Yoshifumi Inoue wrote: > > Additionally did a minor cleanup - removing ...
7 years, 2 months ago (2013-10-03 09:59:55 UTC) #6
vanihegde
Knocked off changes not related. Please have a look. Sorry for the trouble.
7 years, 2 months ago (2013-10-03 10:07:37 UTC) #7
ojan
lgtm
7 years, 2 months ago (2013-10-03 19:59:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vani.hegde@samsung.com/25490002/12001
7 years, 2 months ago (2013-10-03 20:02:16 UTC) #9
commit-bot: I haz the power
7 years, 2 months ago (2013-10-04 01:25:09 UTC) #10
Message was sent while issue was closed.
Change committed as 158856

Powered by Google App Engine
This is Rietveld 408576698