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

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

Issue 878743003: Use the tree of trees for the lang attributes in Shadow DOM (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 if (const Attribute* attribute = attributes.find(XMLNames::langA ttr)) 2570 if (const Attribute* attribute = attributes.find(XMLNames::langA ttr))
2571 value = attribute->value(); 2571 value = attribute->value();
2572 else if (const Attribute* attribute = attributes.find(HTMLNames: :langAttr)) 2572 else if (const Attribute* attribute = attributes.find(HTMLNames: :langAttr))
2573 value = attribute->value(); 2573 value = attribute->value();
2574 } 2574 }
2575 } else if (n->isDocumentNode()) { 2575 } else if (n->isDocumentNode()) {
2576 // checking the MIME content-language 2576 // checking the MIME content-language
2577 value = toDocument(n)->contentLanguage(); 2577 value = toDocument(n)->contentLanguage();
2578 } 2578 }
2579 2579
2580 n = n->parentNode(); 2580 n = n->parentOrShadowHostNode();
2581 } while (n && value.isNull()); 2581 } while (n && value.isNull());
2582 2582
2583 return value; 2583 return value;
2584 } 2584 }
2585 2585
2586 Locale& Element::locale() const 2586 Locale& Element::locale() const
2587 { 2587 {
2588 return document().getCachedLocale(computeInheritedLanguage()); 2588 return document().getCachedLocale(computeInheritedLanguage());
2589 } 2589 }
2590 2590
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 return v8::Handle<v8::Object>(); 3420 return v8::Handle<v8::Object>();
3421 3421
3422 V8PerContextData* perContextData = V8PerContextData::from(context); 3422 V8PerContextData* perContextData = V8PerContextData::from(context);
3423 if (perContextData) 3423 if (perContextData)
3424 wrapper->SetPrototype(perContextData->customElementBinding(customElement Definition())->prototype()); 3424 wrapper->SetPrototype(perContextData->customElementBinding(customElement Definition())->prototype());
3425 3425
3426 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper); 3426 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper);
3427 } 3427 }
3428 3428
3429 } // namespace blink 3429 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698