Changeset 91893 in webkit
- Timestamp:
- Jul 27, 2011 8:00:54 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91891 r91893 1 2011-07-27 Rachel Blum <groby@chromium.org> 2 3 Implement sizes attribute for link tag from HTML5 4 https://bugs.webkit.org/show_bug.cgi?id=37674 5 6 Reviewed by Dimitri Glazkov. 7 8 * fast/dom/icon-size-property-expected.txt: Added. 9 * fast/dom/icon-size-property.html: Added. 10 1 11 2011-07-27 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r91885 r91893 1 2011-07-27 Rachel Blum <groby@chromium.org> 2 3 Implement sizes attribute for link tag from HTML5 4 https://bugs.webkit.org/show_bug.cgi?id=37674 5 6 Reviewed by Dimitri Glazkov. 7 8 Test: fast/dom/icon-size-property.html 9 10 * WebCore.gypi: 11 * WebCore.pro: 12 * bindings/js/JSHTMLLinkElementCustom.cpp: 13 (WebCore::JSHTMLLinkElement::sizes): 14 (WebCore::JSHTMLLinkElement::setSizes): 15 * bindings/v8/custom/V8HTMLLinkElementCustom.cpp: Added. 16 (WebCore::V8HTMLLinkElement::sizesAccessorGetter): 17 (WebCore::V8HTMLLinkElement::sizesAccessorSetter): 18 * html/HTMLAttributeNames.in: 19 * html/HTMLLinkElement.cpp: 20 (WebCore::HTMLLinkElement::HTMLLinkElement): 21 (WebCore::HTMLLinkElement::parseMappedAttribute): 22 (WebCore::HTMLLinkElement::sizes): 23 (WebCore::HTMLLinkElement::setSizes): 24 * html/HTMLLinkElement.h: 25 * html/HTMLLinkElement.idl: 26 1 27 2011-07-27 Pratik Solanki <psolanki@apple.com> 2 28 -
trunk/Source/WebCore/WebCore.gypi
r91839 r91893 2155 2155 'bindings/v8/custom/V8HTMLImageElementConstructor.h', 2156 2156 'bindings/v8/custom/V8HTMLInputElementCustom.cpp', 2157 'bindings/v8/custom/V8HTMLLinkElementCustom.cpp', 2157 2158 'bindings/v8/custom/V8HTMLOptionElementConstructor.cpp', 2158 2159 'bindings/v8/custom/V8HTMLOptionElementConstructor.h', -
trunk/Source/WebCore/WebCore.pro
r91843 r91893 185 185 bindings/v8/custom/V8HTMLImageElementConstructor.cpp \ 186 186 bindings/v8/custom/V8HTMLInputElementCustom.cpp \ 187 bindings/v8/custom/V8HTMLLinkElementCustom.cpp \ 187 188 bindings/v8/custom/V8HTMLOptionElementConstructor.cpp \ 188 189 bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp \ -
trunk/Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp
r84584 r91893 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 28 29 29 30 #include "HTMLLinkElement.h" 31 #include "JSDOMBinding.h" 32 #include "JSDOMSettableTokenList.h" 33 #include <wtf/GetPtr.h> 30 34 31 35 using namespace JSC; … … 33 37 namespace WebCore { 34 38 39 JSValue JSHTMLLinkElement::sizes(ExecState* exec) const 40 { 41 HTMLLinkElement* output = static_cast<HTMLLinkElement*>(impl()); 42 JSValue result = toJS(exec, globalObject(), WTF::getPtr(output->sizes())); 43 return result; 35 44 } 45 46 void JSHTMLLinkElement::setSizes(ExecState* exec, JSValue value) 47 { 48 HTMLLinkElement* output = static_cast<HTMLLinkElement*>(impl()); 49 output->setSizes(valueToStringWithNullCheck(exec, value)); 50 } 51 52 } // namespace WebCore -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r91797 r91893 273 273 shape 274 274 size 275 sizes 275 276 sortable 276 277 sortdirection -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r89146 r91893 5 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 6 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 54 55 : HTMLElement(tagName, document) 55 56 , m_linkLoader(this) 57 , m_sizes(DOMSettableTokenList::create()) 56 58 , m_loading(false) 57 59 , m_isEnabledViaScript(false) … … 133 135 } else if (attr->name() == typeAttr) { 134 136 m_type = attr->value(); 137 process(); 138 } else if (attr->name() == sizesAttr) { 139 setSizes(attr->value()); 135 140 process(); 136 141 } else if (attr->name() == mediaAttr) { … … 441 446 } 442 447 443 } 448 DOMSettableTokenList* HTMLLinkElement::sizes() const 449 { 450 return m_sizes.get(); 451 } 452 453 void HTMLLinkElement::setSizes(const String& value) 454 { 455 m_sizes->setValue(value); 456 } 457 458 } // namespace WebCore -
trunk/Source/WebCore/html/HTMLLinkElement.h
r89146 r91893 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 27 28 #include "CachedResourceClient.h" 28 29 #include "CachedResourceHandle.h" 30 #include "DOMSettableTokenList.h" 29 31 #include "HTMLElement.h" 30 32 #include "IconURL.h" … … 54 56 StyleSheet* sheet() const; 55 57 56 // FIXME: This should be re maned isStyleSheetLoading as this is only used for stylesheets.58 // FIXME: This should be renamed isStyleSheetLoading as this is only used for stylesheets. 57 59 bool isLoading() const; 58 60 bool isEnabledViaScript() const { return m_isEnabledViaScript; } 59 61 bool disabled() const; 60 62 void setDisabled(bool); 63 void setSizes(const String&); 64 DOMSettableTokenList* sizes() const; 61 65 62 66 private: … … 100 104 String m_type; 101 105 String m_media; 106 RefPtr<DOMSettableTokenList> m_sizes; 102 107 LinkRelAttribute m_relAttribute; 103 108 bool m_loading; -
trunk/Source/WebCore/html/HTMLLinkElement.idl
r89269 r91893 2 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 29 30 attribute [Reflect] DOMString rel; 30 31 attribute [Reflect] DOMString rev; 32 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 33 attribute [Custom] DOMSettableTokenList sizes; 34 #endif 31 35 attribute [Reflect] DOMString target; 32 36 attribute [Reflect] DOMString type;
Note: See TracChangeset
for help on using the changeset viewer.