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

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 395253002: Fix unsigned comparison in previousIfPositionIsAfterLineBreak (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index d6470ef46cfe6c21126637ee87e209af787ae120..d9b2c5b31cea91ae5ddde9009fd204eb6d2f5319 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -825,7 +825,7 @@ static Position previousIfPositionIsAfterLineBreak(const Position& position, HTM
} else if (position.anchorNode()->isTextNode()) {
Text* textNode = toText(position.anchorNode());
unsigned offset = position.offsetInContainerNode();
- if (textNode->length() == 0 || offset <= 0) {
+ if (textNode->length() == 0 || offset == 0) {
return previousIfPositionIsAfterLineBreak(endOfPrevious(*position.anchorNode(), innerEditor), innerEditor);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698