Changeset 94784 in webkit
- Timestamp:
- Sep 8, 2011 12:56:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94782 r94784 1 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> 2 3 <style scoped>: Add 'scoped' attribute 4 https://bugs.webkit.org/show_bug.cgi?id=67718 5 6 Test setting/resetting of the 'scoped' attribute in various circumstances. 7 8 Reviewed by Dimitri Glazkov. 9 10 * fast/css/style-scoped/basic-attribute-expected.txt: Added. 11 * fast/css/style-scoped/basic-attribute.html: Added. 12 1 13 2011-09-08 Ben Wells <benwells@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r94781 r94784 1 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> 2 3 <style scoped>: Add 'scoped' attribute 4 https://bugs.webkit.org/show_bug.cgi?id=67718 5 6 Add 'scoped' attribute to IDL and attribute list, 7 implement and test setting/resetting of the attribute. 8 9 Reviewed by Dimitri Glazkov. 10 11 Test: fast/css/style-scoped/basic-attribute.html 12 13 * html/HTMLAttributeNames.in: 14 * html/HTMLStyleElement.cpp: 15 (WebCore::HTMLStyleElement::scoped): 16 (WebCore::HTMLStyleElement::setScoped): 17 (WebCore::HTMLStyleElement::scopingElement): 18 * html/HTMLStyleElement.h: 19 * html/HTMLStyleElement.idl: 20 1 21 2011-09-08 Erik Arvidsson <arv@chromium.org> 2 22 -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r94433 r94784 267 267 scheme 268 268 scope 269 scoped 269 270 scrollamount 270 271 scrolldelay -
trunk/Source/WebCore/html/HTMLStyleElement.cpp
r94433 r94784 95 95 } 96 96 97 bool HTMLStyleElement::scoped() const 98 { 99 return fastHasAttribute(scopedAttr); 100 } 101 102 void HTMLStyleElement::setScoped(bool scopedValue) 103 { 104 setBooleanAttribute(scopedAttr, scopedValue); 105 } 106 107 Element* HTMLStyleElement::scopingElement() const 108 { 109 if (!scoped()) 110 return 0; 111 112 // FIXME: This probably needs to be refined for scoped stylesheets within shadow DOM. 113 // As written, such a stylesheet could style the host element, as well as children of the host. 114 // OTOH, this paves the way for a :bound-element implementation. 115 ContainerNode* parentOrHost = parentOrHostNode(); 116 if (!parentOrHost || !parentOrHost->isElementNode()) 117 return 0; 118 119 return toElement(parentOrHost); 120 } 121 97 122 void HTMLStyleElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const 98 123 { -
trunk/Source/WebCore/html/HTMLStyleElement.h
r87867 r94784 38 38 void setType(const AtomicString&); 39 39 40 bool scoped() const; 41 void setScoped(bool); 42 Element* scopingElement() const; 43 40 44 using StyleElement::sheet; 41 45 -
trunk/Source/WebCore/html/HTMLStyleElement.idl
r89269 r94784 23 23 interface HTMLStyleElement : HTMLElement { 24 24 attribute boolean disabled; 25 attribute boolean scoped; 25 26 attribute [Reflect] DOMString media; 26 27 attribute [Reflect] DOMString type;
Note: See TracChangeset
for help on using the changeset viewer.