Changeset 179770 in webkit


Ignore:
Timestamp:
Feb 6, 2015 5:08:52 PM (9 years ago)
Author:
akling@apple.com
Message:

Ref-ify various getters that return HTMLCollection.
<https://webkit.org/b/141336>

Reviewed by Anders Carlsson.

Make all the getters that return HTMLCollection objects (and never return nullptr)
return Ref instead of RefPtr.

Removed a couple of useless null checks that were exposed by this change.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::getDocumentLinks):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::namedItemGetter):

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::nameGetter):

  • dom/Document.cpp:

(WebCore::Document::ensureCachedCollection):
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::plugins):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
(WebCore::Document::iconURLs):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::ensureCachedHTMLCollection):

  • dom/Element.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::suggestions):

  • html/HTMLDataListElement.cpp:

(WebCore::HTMLDataListElement::options):

  • html/HTMLDataListElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::children):

  • html/HTMLElement.h:
  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::elements):

  • html/HTMLFieldSetElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::elements):

  • html/HTMLFormElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setupDateTimeChooserParameters):

  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::areas):

  • html/HTMLMapElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::selectedOptions):
(WebCore::HTMLSelectElement::options):

  • html/HTMLSelectElement.h:
  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::rows):
(WebCore::HTMLTableElement::tBodies):

  • html/HTMLTableElement.h:
  • html/HTMLTableRowElement.cpp:

(WebCore::HTMLTableRowElement::insertCell):
(WebCore::HTMLTableRowElement::deleteCell):
(WebCore::HTMLTableRowElement::cells):

  • html/HTMLTableRowElement.h:
  • html/HTMLTableSectionElement.cpp:

(WebCore::HTMLTableSectionElement::insertRow):
(WebCore::HTMLTableSectionElement::deleteRow):
(WebCore::HTMLTableSectionElement::rows):

  • html/HTMLTableSectionElement.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::updateTickMarkValues):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paintSliderTicks):

Location:
trunk/Source
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179768 r179770  
     12015-02-06  Andreas Kling  <akling@apple.com>
     2
     3        Ref-ify various getters that return HTMLCollection.
     4        <https://webkit.org/b/141336>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Make all the getters that return HTMLCollection objects (and never return nullptr)
     9        return Ref instead of RefPtr.
     10
     11        Removed a couple of useless null checks that were exposed by this change.
     12
     13        * accessibility/AccessibilityRenderObject.cpp:
     14        (WebCore::AccessibilityRenderObject::getDocumentLinks):
     15        * bindings/js/JSDOMWindowCustom.cpp:
     16        (WebCore::namedItemGetter):
     17        * bindings/js/JSHTMLDocumentCustom.cpp:
     18        (WebCore::JSHTMLDocument::nameGetter):
     19        * dom/Document.cpp:
     20        (WebCore::Document::ensureCachedCollection):
     21        (WebCore::Document::images):
     22        (WebCore::Document::applets):
     23        (WebCore::Document::embeds):
     24        (WebCore::Document::plugins):
     25        (WebCore::Document::scripts):
     26        (WebCore::Document::links):
     27        (WebCore::Document::forms):
     28        (WebCore::Document::anchors):
     29        (WebCore::Document::all):
     30        (WebCore::Document::windowNamedItems):
     31        (WebCore::Document::documentNamedItems):
     32        (WebCore::Document::iconURLs):
     33        * dom/Document.h:
     34        * dom/Element.cpp:
     35        (WebCore::Element::ensureCachedHTMLCollection):
     36        * dom/Element.h:
     37        * html/ColorInputType.cpp:
     38        (WebCore::ColorInputType::suggestions):
     39        * html/HTMLDataListElement.cpp:
     40        (WebCore::HTMLDataListElement::options):
     41        * html/HTMLDataListElement.h:
     42        * html/HTMLElement.cpp:
     43        (WebCore::HTMLElement::children):
     44        * html/HTMLElement.h:
     45        * html/HTMLFieldSetElement.cpp:
     46        (WebCore::HTMLFieldSetElement::elements):
     47        * html/HTMLFieldSetElement.h:
     48        * html/HTMLFormElement.cpp:
     49        (WebCore::HTMLFormElement::elements):
     50        * html/HTMLFormElement.h:
     51        * html/HTMLInputElement.cpp:
     52        (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
     53        * html/HTMLMapElement.cpp:
     54        (WebCore::HTMLMapElement::areas):
     55        * html/HTMLMapElement.h:
     56        * html/HTMLSelectElement.cpp:
     57        (WebCore::HTMLSelectElement::selectedOptions):
     58        (WebCore::HTMLSelectElement::options):
     59        * html/HTMLSelectElement.h:
     60        * html/HTMLTableElement.cpp:
     61        (WebCore::HTMLTableElement::rows):
     62        (WebCore::HTMLTableElement::tBodies):
     63        * html/HTMLTableElement.h:
     64        * html/HTMLTableRowElement.cpp:
     65        (WebCore::HTMLTableRowElement::insertCell):
     66        (WebCore::HTMLTableRowElement::deleteCell):
     67        (WebCore::HTMLTableRowElement::cells):
     68        * html/HTMLTableRowElement.h:
     69        * html/HTMLTableSectionElement.cpp:
     70        (WebCore::HTMLTableSectionElement::insertRow):
     71        (WebCore::HTMLTableSectionElement::deleteRow):
     72        (WebCore::HTMLTableSectionElement::rows):
     73        * html/HTMLTableSectionElement.h:
     74        * html/RangeInputType.cpp:
     75        (WebCore::RangeInputType::updateTickMarkValues):
     76        * rendering/RenderTheme.cpp:
     77        (WebCore::RenderTheme::paintSliderTicks):
     78
    1792015-02-06  Brent Fulgham  <bfulgham@apple.com>
    280
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r179626 r179770  
    17421742{
    17431743    Document& document = m_renderer->document();
    1744     RefPtr<HTMLCollection> links = document.links();
     1744    Ref<HTMLCollection> links = document.links();
    17451745    for (unsigned i = 0; Node* curr = links->item(i); i++) {
    17461746        RenderObject* obj = curr->renderer();
  • trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r178928 r179770  
    8282
    8383    if (UNLIKELY(downcast<HTMLDocument>(*document).windowNamedItemContainsMultipleElements(*atomicPropertyName))) {
    84         RefPtr<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName);
     84        Ref<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName);
    8585        ASSERT(collection->length() > 1);
    8686        return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));
  • trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp

    r178966 r179770  
    9595
    9696    if (UNLIKELY(document.documentNamedItemContainsMultipleElements(*atomicPropertyName))) {
    97         RefPtr<HTMLCollection> collection = document.documentNamedItems(atomicPropertyName);
     97        Ref<HTMLCollection> collection = document.documentNamedItems(atomicPropertyName);
    9898        ASSERT(collection->length() > 1);
    9999        return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));
  • trunk/Source/WebCore/dom/Document.cpp

    r179242 r179770  
    45384538}
    45394539
    4540 RefPtr<HTMLCollection> Document::ensureCachedCollection(CollectionType type)
     4540Ref<HTMLCollection> Document::ensureCachedCollection(CollectionType type)
    45414541{
    45424542    return ensureRareData().ensureNodeLists().addCachedCollection<HTMLCollection>(*this, type);
    45434543}
    45444544
    4545 RefPtr<HTMLCollection> Document::images()
     4545Ref<HTMLCollection> Document::images()
    45464546{
    45474547    return ensureCachedCollection(DocImages);
    45484548}
    45494549
    4550 RefPtr<HTMLCollection> Document::applets()
     4550Ref<HTMLCollection> Document::applets()
    45514551{
    45524552    return ensureCachedCollection(DocApplets);
    45534553}
    45544554
    4555 RefPtr<HTMLCollection> Document::embeds()
     4555Ref<HTMLCollection> Document::embeds()
    45564556{
    45574557    return ensureCachedCollection(DocEmbeds);
    45584558}
    45594559
    4560 RefPtr<HTMLCollection> Document::plugins()
     4560Ref<HTMLCollection> Document::plugins()
    45614561{
    45624562    // This is an alias for embeds() required for the JS DOM bindings.
     
    45644564}
    45654565
    4566 RefPtr<HTMLCollection> Document::scripts()
     4566Ref<HTMLCollection> Document::scripts()
    45674567{
    45684568    return ensureCachedCollection(DocScripts);
    45694569}
    45704570
    4571 RefPtr<HTMLCollection> Document::links()
     4571Ref<HTMLCollection> Document::links()
    45724572{
    45734573    return ensureCachedCollection(DocLinks);
    45744574}
    45754575
    4576 RefPtr<HTMLCollection> Document::forms()
     4576Ref<HTMLCollection> Document::forms()
    45774577{
    45784578    return ensureCachedCollection(DocForms);
    45794579}
    45804580
    4581 RefPtr<HTMLCollection> Document::anchors()
     4581Ref<HTMLCollection> Document::anchors()
    45824582{
    45834583    return ensureCachedCollection(DocAnchors);
    45844584}
    45854585
    4586 RefPtr<HTMLCollection> Document::all()
     4586Ref<HTMLCollection> Document::all()
    45874587{
    45884588    return ensureRareData().ensureNodeLists().addCachedCollection<HTMLAllCollection>(*this, DocAll);
    45894589}
    45904590
    4591 RefPtr<HTMLCollection> Document::windowNamedItems(const AtomicString& name)
     4591Ref<HTMLCollection> Document::windowNamedItems(const AtomicString& name)
    45924592{
    45934593    return ensureRareData().ensureNodeLists().addCachedCollection<WindowNameCollection>(*this, WindowNamedItems, name);
    45944594}
    45954595
    4596 RefPtr<HTMLCollection> Document::documentNamedItems(const AtomicString& name)
     4596Ref<HTMLCollection> Document::documentNamedItems(const AtomicString& name)
    45974597{
    45984598    return ensureRareData().ensureNodeLists().addCachedCollection<DocumentNameCollection>(*this, DocumentNamedItems, name);
     
    47054705    m_iconURLs.clear();
    47064706
    4707     if (!head() || !(head()->children()))
     4707    if (!head())
    47084708        return m_iconURLs;
    47094709
    4710     RefPtr<HTMLCollection> children = head()->children();
     4710    Ref<HTMLCollection> children = head()->children();
    47114711    unsigned int length = children->length();
    47124712    for (unsigned int i = 0; i < length; ++i) {
  • trunk/Source/WebCore/dom/Document.h

    r179242 r179770  
    507507    RefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionCode&);
    508508
    509     RefPtr<HTMLCollection> images();
    510     RefPtr<HTMLCollection> embeds();
    511     RefPtr<HTMLCollection> plugins(); // an alias for embeds() required for the JS DOM bindings.
    512     RefPtr<HTMLCollection> applets();
    513     RefPtr<HTMLCollection> links();
    514     RefPtr<HTMLCollection> forms();
    515     RefPtr<HTMLCollection> anchors();
    516     RefPtr<HTMLCollection> scripts();
    517     RefPtr<HTMLCollection> all();
    518 
    519     RefPtr<HTMLCollection> windowNamedItems(const AtomicString& name);
    520     RefPtr<HTMLCollection> documentNamedItems(const AtomicString& name);
     509    Ref<HTMLCollection> images();
     510    Ref<HTMLCollection> embeds();
     511    Ref<HTMLCollection> plugins(); // an alias for embeds() required for the JS DOM bindings.
     512    Ref<HTMLCollection> applets();
     513    Ref<HTMLCollection> links();
     514    Ref<HTMLCollection> forms();
     515    Ref<HTMLCollection> anchors();
     516    Ref<HTMLCollection> scripts();
     517    Ref<HTMLCollection> all();
     518
     519    Ref<HTMLCollection> windowNamedItems(const AtomicString& name);
     520    Ref<HTMLCollection> documentNamedItems(const AtomicString& name);
    521521
    522522    // Other methods (not part of DOM)
     
    13521352    Node* nodeFromPoint(const LayoutPoint& clientPoint, LayoutPoint* localPoint = nullptr);
    13531353
    1354     RefPtr<HTMLCollection> ensureCachedCollection(CollectionType);
     1354    Ref<HTMLCollection> ensureCachedCollection(CollectionType);
    13551355
    13561356#if ENABLE(FULLSCREEN_API)
  • trunk/Source/WebCore/dom/Element.cpp

    r179497 r179770  
    29022902}
    29032903
    2904 RefPtr<HTMLCollection> Element::ensureCachedHTMLCollection(CollectionType type)
     2904Ref<HTMLCollection> Element::ensureCachedHTMLCollection(CollectionType type)
    29052905{
    29062906    if (HTMLCollection* collection = cachedHTMLCollection(type))
    2907         return collection;
     2907        return *collection;
    29082908
    29092909    if (type == TableRows) {
  • trunk/Source/WebCore/dom/Element.h

    r179497 r179770  
    571571    void setTabIndexExplicitly(short);
    572572
    573     RefPtr<HTMLCollection> ensureCachedHTMLCollection(CollectionType);
     573    Ref<HTMLCollection> ensureCachedHTMLCollection(CollectionType);
    574574    HTMLCollection* cachedHTMLCollection(CollectionType);
    575575
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r177306 r179770  
    230230    HTMLDataListElement* dataList = element().dataList();
    231231    if (dataList) {
    232         RefPtr<HTMLCollection> options = dataList->options();
     232        Ref<HTMLCollection> options = dataList->options();
    233233        for (unsigned i = 0; HTMLOptionElement* option = downcast<HTMLOptionElement>(options->item(i)); ++i) {
    234234            if (!element().isValidValue(option->value()))
  • trunk/Source/WebCore/html/HTMLDataListElement.cpp

    r177996 r179770  
    4949}
    5050
    51 RefPtr<HTMLCollection> HTMLDataListElement::options()
     51Ref<HTMLCollection> HTMLDataListElement::options()
    5252{
    5353    return ensureCachedHTMLCollection(DataListOptions);
  • trunk/Source/WebCore/html/HTMLDataListElement.h

    r177996 r179770  
    4343    static Ref<HTMLDataListElement> create(const QualifiedName&, Document&);
    4444
    45     RefPtr<HTMLCollection> options();
     45    Ref<HTMLCollection> options();
    4646
    4747    void optionElementChildrenChanged();
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r179181 r179770  
    807807}
    808808
    809 RefPtr<HTMLCollection> HTMLElement::children()
     809Ref<HTMLCollection> HTMLElement::children()
    810810{
    811811    return ensureCachedHTMLCollection(NodeChildren);
  • trunk/Source/WebCore/html/HTMLElement.h

    r179181 r179770  
    4343    static Ref<HTMLElement> create(const QualifiedName& tagName, Document&);
    4444
    45     RefPtr<HTMLCollection> children();
     45    Ref<HTMLCollection> children();
    4646
    4747    WEBCORE_EXPORT virtual String title() const override final;
  • trunk/Source/WebCore/html/HTMLFieldSetElement.cpp

    r179143 r179770  
    160160}
    161161
    162 RefPtr<HTMLCollection> HTMLFieldSetElement::elements()
     162Ref<HTMLCollection> HTMLFieldSetElement::elements()
    163163{
    164164    return ensureCachedHTMLCollection(FormControls);
  • trunk/Source/WebCore/html/HTMLFieldSetElement.h

    r177996 r179770  
    3838
    3939    HTMLLegendElement* legend() const;
    40     RefPtr<HTMLCollection> elements();
     40    Ref<HTMLCollection> elements();
    4141
    4242    const Vector<FormAssociatedElement*>& associatedElements() const;
  • trunk/Source/WebCore/html/HTMLFormElement.cpp

    r179599 r179770  
    645645}
    646646
    647 RefPtr<HTMLCollection> HTMLFormElement::elements()
     647Ref<HTMLCollection> HTMLFormElement::elements()
    648648{
    649649    return ensureCachedHTMLCollection(FormControls);
  • trunk/Source/WebCore/html/HTMLFormElement.h

    r177996 r179770  
    5151    virtual ~HTMLFormElement();
    5252
    53     RefPtr<HTMLCollection> elements();
     53    Ref<HTMLCollection> elements();
    5454    bool hasNamedElement(const AtomicString&);
    5555    Vector<Ref<Element>> namedElements(const AtomicString&);
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r177996 r179770  
    18881888#if ENABLE(DATALIST_ELEMENT)
    18891889    if (HTMLDataListElement* dataList = this->dataList()) {
    1890         RefPtr<HTMLCollection> options = dataList->options();
     1890        Ref<HTMLCollection> options = dataList->options();
    18911891        for (unsigned i = 0; HTMLOptionElement* option = downcast<HTMLOptionElement>(options->item(i)); ++i) {
    18921892            if (!isValidValue(option->value()))
  • trunk/Source/WebCore/html/HTMLMapElement.cpp

    r177996 r179770  
    111111}
    112112
    113 RefPtr<HTMLCollection> HTMLMapElement::areas()
     113Ref<HTMLCollection> HTMLMapElement::areas()
    114114{
    115115    return ensureCachedHTMLCollection(MapAreas);
  • trunk/Source/WebCore/html/HTMLMapElement.h

    r177996 r179770  
    4242   
    4343    HTMLImageElement* imageElement();
    44     RefPtr<HTMLCollection> areas();
     44    Ref<HTMLCollection> areas();
    4545
    4646private:
  • trunk/Source/WebCore/html/HTMLSelectElement.cpp

    r179143 r179770  
    374374}
    375375
    376 RefPtr<HTMLCollection> HTMLSelectElement::selectedOptions()
     376Ref<HTMLCollection> HTMLSelectElement::selectedOptions()
    377377{
    378378    return ensureCachedHTMLCollection(SelectedOptions);
    379379}
    380380
    381 RefPtr<HTMLOptionsCollection> HTMLSelectElement::options()
     381Ref<HTMLOptionsCollection> HTMLSelectElement::options()
    382382{
    383383    return downcast<HTMLOptionsCollection>(ensureCachedHTMLCollection(SelectOptions).get());
  • trunk/Source/WebCore/html/HTMLSelectElement.h

    r178097 r179770  
    6868    void setValue(const String&);
    6969
    70     RefPtr<HTMLOptionsCollection> options();
    71     RefPtr<HTMLCollection> selectedOptions();
     70    Ref<HTMLOptionsCollection> options();
     71    Ref<HTMLCollection> selectedOptions();
    7272
    7373    void optionElementChildrenChanged();
  • trunk/Source/WebCore/html/HTMLTableElement.cpp

    r179143 r179770  
    551551}
    552552
    553 RefPtr<HTMLCollection> HTMLTableElement::rows()
     553Ref<HTMLCollection> HTMLTableElement::rows()
    554554{
    555555    return ensureCachedHTMLCollection(TableRows);
    556556}
    557557
    558 RefPtr<HTMLCollection> HTMLTableElement::tBodies()
     558Ref<HTMLCollection> HTMLTableElement::tBodies()
    559559{
    560560    return ensureCachedHTMLCollection(TableTBodies);
  • trunk/Source/WebCore/html/HTMLTableElement.h

    r177996 r179770  
    6161    void deleteRow(int index, ExceptionCode&);
    6262
    63     RefPtr<HTMLCollection> rows();
    64     RefPtr<HTMLCollection> tBodies();
     63    Ref<HTMLCollection> rows();
     64    Ref<HTMLCollection> tBodies();
    6565
    6666    const AtomicString& rules() const;
  • trunk/Source/WebCore/html/HTMLTableRowElement.cpp

    r177996 r179770  
    121121RefPtr<HTMLElement> HTMLTableRowElement::insertCell(int index, ExceptionCode& ec)
    122122{
    123     RefPtr<HTMLCollection> children = cells();
    124     int numCells = children ? children->length() : 0;
     123    Ref<HTMLCollection> children = cells();
     124    int numCells = children->length();
    125125    if (index < -1 || index > numCells) {
    126126        ec = INDEX_SIZE_ERR;
     
    144144void HTMLTableRowElement::deleteCell(int index, ExceptionCode& ec)
    145145{
    146     RefPtr<HTMLCollection> children = cells();
    147     int numCells = children ? children->length() : 0;
     146    Ref<HTMLCollection> children = cells();
     147    int numCells = children->length();
    148148    if (index == -1)
    149149        index = numCells-1;
     
    155155}
    156156
    157 RefPtr<HTMLCollection> HTMLTableRowElement::cells()
     157Ref<HTMLCollection> HTMLTableRowElement::cells()
    158158{
    159159    return ensureCachedHTMLCollection(TRCells);
  • trunk/Source/WebCore/html/HTMLTableRowElement.h

    r177996 r179770  
    4646    void deleteCell(int index, ExceptionCode&);
    4747
    48     RefPtr<HTMLCollection> cells();
     48    Ref<HTMLCollection> cells();
    4949    void setCells(HTMLCollection *, ExceptionCode&);
    5050
  • trunk/Source/WebCore/html/HTMLTableSectionElement.cpp

    r177996 r179770  
    6060{
    6161    RefPtr<HTMLTableRowElement> row;
    62     RefPtr<HTMLCollection> children = rows();
    63     int numRows = children ? (int)children->length() : 0;
     62    Ref<HTMLCollection> children = rows();
     63    int numRows = children->length();
    6464    if (index < -1 || index > numRows)
    6565        ec = INDEX_SIZE_ERR; // per the DOM
     
    8282void HTMLTableSectionElement::deleteRow(int index, ExceptionCode& ec)
    8383{
    84     RefPtr<HTMLCollection> children = rows();
    85     int numRows = children ? (int)children->length() : 0;
     84    Ref<HTMLCollection> children = rows();
     85    int numRows = children->length();
    8686    if (index == -1)
    8787        index = numRows - 1;
     
    146146}
    147147
    148 RefPtr<HTMLCollection> HTMLTableSectionElement::rows()
     148Ref<HTMLCollection> HTMLTableSectionElement::rows()
    149149{
    150150    return ensureCachedHTMLCollection(TSectionRows);
  • trunk/Source/WebCore/html/HTMLTableSectionElement.h

    r177996 r179770  
    5454    void setVAlign(const AtomicString&);
    5555
    56     RefPtr<HTMLCollection> rows();
     56    Ref<HTMLCollection> rows();
    5757
    5858private:
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r177259 r179770  
    369369    if (!dataList)
    370370        return;
    371     RefPtr<HTMLCollection> options = dataList->options();
     371    Ref<HTMLCollection> options = dataList->options();
    372372    m_tickMarkValues.reserveCapacity(options->length());
    373373    for (unsigned i = 0; i < options->length(); ++i) {
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r179050 r179770  
    10311031        tickRegionWidth = trackBounds.height() - thumbSize.width();
    10321032    }
    1033     RefPtr<HTMLCollection> options = dataList->options();
     1033    Ref<HTMLCollection> options = dataList->options();
    10341034    GraphicsContextStateSaver stateSaver(*paintInfo.context);
    10351035    paintInfo.context->setFillColor(o.style().visitedDependentColor(CSSPropertyColor), ColorSpaceDeviceRGB);
  • trunk/Source/WebKit/win/DOMHTMLClasses.cpp

    r179157 r179770  
    704704    HTMLSelectElement& selectElement = downcast<HTMLSelectElement>(*m_element);
    705705
    706     if (!selectElement.options())
    707         return E_FAIL;
    708 
    709706    *result = nullptr;
    710707    RefPtr<HTMLOptionsCollection> options = selectElement.options();
Note: See TracChangeset for help on using the changeset viewer.