Changeset 224296 in webkit


Ignore:
Timestamp:
Nov 1, 2017 2:26:33 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

innerText->renderBox() can be null in HTMLTextFormControlElement::setSelectionRange
https://bugs.webkit.org/show_bug.cgi?id=179103

Reviewed by Antti Koivisto.

Added a missing null check.

Unfortunately, no new tests since we don't have a working reproduction for trunk code.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange): Added a null check.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r224295 r224296  
     12017-11-01  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        innerText->renderBox() can be null in HTMLTextFormControlElement::setSelectionRange
     4        https://bugs.webkit.org/show_bug.cgi?id=179103
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Added a missing null check.
     9
     10        Unfortunately, no new tests since we don't have a working reproduction for trunk code.
     11
     12        * html/HTMLTextFormControlElement.cpp:
     13        (WebCore::HTMLTextFormControlElement::setSelectionRange): Added a null check.
     14
    1152017-11-01  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp

    r223802 r224296  
    294294    bool hasFocus = document().focusedElement() == this;
    295295    if (!hasFocus && innerText) {
    296         // FIXME: Removing this synchronous layout requires fixing <https://webkit.org/b/128797>
     296        // FIXME: Removing this synchronous layout requires fixing setSelectionWithoutUpdatingAppearance not needing up-to-date style.
    297297        document().updateLayoutIgnorePendingStylesheets();
    298298
     
    302302
    303303        if (innerText && rendererTextControl) {
    304             if (rendererTextControl->style().visibility() == HIDDEN || !innerText->renderBox()->height()) {
     304            if (rendererTextControl->style().visibility() == HIDDEN || !innerText->renderBox() || !innerText->renderBox()->height()) {
    305305                cacheSelection(start, end, direction);
    306306                return;
Note: See TracChangeset for help on using the changeset viewer.