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

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

Issue 2316303006: Make default spellchecking behavior in html elements configurable via WebSettings. (Closed)
Patch Set: remove setting of spellcheck default in render_view_impl Created 4 years, 2 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 switch (element->spellcheckAttributeState()) { 3211 switch (element->spellcheckAttributeState()) {
3212 case SpellcheckAttributeTrue: 3212 case SpellcheckAttributeTrue:
3213 return true; 3213 return true;
3214 case SpellcheckAttributeFalse: 3214 case SpellcheckAttributeFalse:
3215 return false; 3215 return false;
3216 case SpellcheckAttributeDefault: 3216 case SpellcheckAttributeDefault:
3217 break; 3217 break;
3218 } 3218 }
3219 } 3219 }
3220 3220
3221 return true; 3221 if (!document().page())
3222 return true;
3223
3224 return document().page()->settings().spellCheckEnabledByDefault();
3222 } 3225 }
3223 3226
3224 #if DCHECK_IS_ON() 3227 #if DCHECK_IS_ON()
3225 bool Element::fastAttributeLookupAllowed(const QualifiedName& name) const 3228 bool Element::fastAttributeLookupAllowed(const QualifiedName& name) const
3226 { 3229 {
3227 if (name == HTMLNames::styleAttr) 3230 if (name == HTMLNames::styleAttr)
3228 return false; 3231 return false;
3229 3232
3230 if (isSVGElement()) 3233 if (isSVGElement())
3231 return !toSVGElement(this)->isAnimatableAttribute(name); 3234 return !toSVGElement(this)->isAnimatableAttribute(name);
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 3832
3830 DEFINE_TRACE_WRAPPERS(Element) 3833 DEFINE_TRACE_WRAPPERS(Element)
3831 { 3834 {
3832 if (hasRareData()) { 3835 if (hasRareData()) {
3833 visitor->traceWrappers(elementRareData()); 3836 visitor->traceWrappers(elementRareData());
3834 } 3837 }
3835 ContainerNode::traceWrappers(visitor); 3838 ContainerNode::traceWrappers(visitor);
3836 } 3839 }
3837 3840
3838 } // namespace blink 3841 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698