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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2171493003: [Editing][DOM][CodeHealth] Make Node::hasEditableStyle global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 static Widget* widgetForElement(const Element& focusedElement) 353 static Widget* widgetForElement(const Element& focusedElement)
354 { 354 {
355 LayoutObject* layoutObject = focusedElement.layoutObject(); 355 LayoutObject* layoutObject = focusedElement.layoutObject();
356 if (!layoutObject || !layoutObject->isLayoutPart()) 356 if (!layoutObject || !layoutObject->isLayoutPart())
357 return 0; 357 return 0;
358 return toLayoutPart(layoutObject)->widget(); 358 return toLayoutPart(layoutObject)->widget();
359 } 359 }
360 360
361 static bool acceptsEditingFocus(const Element& element) 361 static bool acceptsEditingFocus(const Element& element)
362 { 362 {
363 DCHECK(element.hasEditableStyle()); 363 DCHECK(hasEditableStyle(element));
364 364
365 return element.document().frame() && rootEditableElement(element); 365 return element.document().frame() && rootEditableElement(element);
366 } 366 }
367 367
368 uint64_t Document::s_globalTreeVersion = 0; 368 uint64_t Document::s_globalTreeVersion = 0;
369 369
370 static bool s_threadedParsingEnabledForTesting = true; 370 static bool s_threadedParsingEnabledForTesting = true;
371 371
372 // This doesn't work with non-Document ExecutionContext. 372 // This doesn't work with non-Document ExecutionContext.
373 static void runAutofocusTask(ExecutionContext* context) 373 static void runAutofocusTask(ExecutionContext* context)
(...skipping 5665 matching lines...) Expand 10 before | Expand all | Expand 10 after
6039 } 6039 }
6040 6040
6041 void showLiveDocumentInstances() 6041 void showLiveDocumentInstances()
6042 { 6042 {
6043 WeakDocumentSet& set = liveDocumentSet(); 6043 WeakDocumentSet& set = liveDocumentSet();
6044 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6044 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6045 for (Document* document : set) 6045 for (Document* document : set)
6046 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6046 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6047 } 6047 }
6048 #endif 6048 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | third_party/WebKit/Source/core/dom/Node.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698