aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorSendilKumar N <sendilkumarn@live.com>2017-03-02 22:42:00 +0800
committerSendilKumar N <sendilkumarn@live.com>2017-03-07 10:20:16 +0800
commitb6e6e84bcf76dc556b867395ce5659e3b5125ec4 (patch)
treef5f2e5ef1d3fd9a9641c63031dec8a27b3fc42fe /components/script/layout_wrapper.rs
parentc62973b77b6ac74c0daf11b1f4c18b9dd64ae400 (diff)
downloadservo-b6e6e84bcf76dc556b867395ce5659e3b5125ec4.tar.gz
servo-b6e6e84bcf76dc556b867395ce5659e3b5125ec4.zip
ext. filtering for lang matching
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 66a77e892e1..994f77aa1d5 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -34,6 +34,7 @@ use atomic_refcell::AtomicRefCell;
use dom::bindings::inheritance::{CharacterDataTypeId, ElementTypeId};
use dom::bindings::inheritance::{HTMLElementTypeId, NodeTypeId};
use dom::bindings::js::LayoutJS;
+use dom::bindings::str::extended_filtering;
use dom::characterdata::LayoutCharacterDataHelpers;
use dom::document::{Document, LayoutDocumentHelpers, PendingRestyle};
use dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers};
@@ -53,7 +54,6 @@ use selectors::matching::ElementSelectorFlags;
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_atoms::Atom;
use servo_url::ServoUrl;
-use std::ascii::AsciiExt;
use std::fmt;
use std::fmt::Debug;
use std::marker::PhantomData;
@@ -621,7 +621,7 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
// FIXME(#15746): This is wrong, we need to instead use extended filtering as per RFC4647
// https://tools.ietf.org/html/rfc4647#section-3.3.2
- NonTSPseudoClass::Lang(ref lang) => lang.eq_ignore_ascii_case(&self.element.get_lang_for_layout()),
+ NonTSPseudoClass::Lang(ref lang) => extended_filtering(&*self.element.get_lang_for_layout(), &*lang),
NonTSPseudoClass::ServoNonZeroBorder => unsafe {
match (*self.element.unsafe_get()).get_attr_for_layout(&ns!(), &local_name!("border")) {