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

Issue 22288004: Refactoring code in highestEditableRoot to avoid a redundant call to rendererIsEditable (Closed)

Created:
7 years, 4 months ago by vanihegde
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refactoring code in highestEditableRoot to avoid a redundant call to rendererIsEditable rendererIsEditable check was being done twice for the node obtained from editableRootForPosition, first by Node::rootEditableElement (invoked from editableRootForPosition) and again by an explicit call in highestEditableRoot, once the node is obtained. rendereIsEditable check would be already done for any node returned from editableRootForPosition. Hence we need not invoke rendereIsEditable check for this node again in highestEditableRoot. If the editable node obtained from editableRootForPosition is <body>, exit early as we do not want to go beyond <body>. Otherwise, search for the highest editable root, by traversing up the tree starting from parent of the node obtained by editableRootForPosition, instead of traversing from the node itself. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155650

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M Source/core/editing/htmlediting.cpp View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
vanihegde
Minor refactoring in highestEditableRoot. Please review the changes.
7 years, 4 months ago (2013-08-06 05:27:22 UTC) #1
ojan
lgtm
7 years, 4 months ago (2013-08-06 18:37:37 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vani.hegde@samsung.com/22288004/1
7 years, 4 months ago (2013-08-06 18:37:47 UTC) #3
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=1220
7 years, 4 months ago (2013-08-06 20:39:35 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vani.hegde@samsung.com/22288004/1
7 years, 4 months ago (2013-08-07 02:55:21 UTC) #5
commit-bot: I haz the power
7 years, 4 months ago (2013-08-07 04:15:35 UTC) #6
Message was sent while issue was closed.
Change committed as 155650

Powered by Google App Engine
This is Rietveld 408576698