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

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

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/editing/markup.cpp ('k') | Source/core/html/LabelableElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 1200546e88092bbaeeee22b4d2782a101157a719..f3c583e274073b2b4dc1f8bd9b53896217a91d88 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -929,7 +929,7 @@ void HTMLElement::calculateAndAdjustDirectionality()
void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, int childCountDelta)
{
- if ((!document() || document()->renderer()) && childCountDelta < 0) {
+ if (document()->renderer() && childCountDelta < 0) {
Node* node = beforeChange ? NodeTraversal::nextSkippingChildren(beforeChange) : 0;
for (int counter = 0; node && counter < childCountDelta; counter++, node = NodeTraversal::nextSkippingChildren(node)) {
if (elementAffectsDirectionality(node))
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/LabelableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698