Changeset 202295 in webkit


Ignore:
Timestamp:
Jun 21, 2016 3:19:37 PM (8 years ago)
Author:
Simon Fraser
Message:

[iOS] Typing text into a text field or text area causes screen to scroll down (hiding text entry)
https://bugs.webkit.org/show_bug.cgi?id=158970

Reviewed by Ryosuke Niwa.

Source/WebCore:

insertTextWithoutSendingTextEvent() should only reveal the selection up to the main frame on iOS,
since the UI process can zoom and scroll the view to the text input.

Test: fast/forms/ios/typing-in-input-in-iframe.html

  • editing/Editor.cpp:

(WebCore::Editor::insertTextWithoutSendingTextEvent):

LayoutTests:

Test that focuses an input in a frame and then types a character, then checks for scrolling.

  • fast/forms/ios/typing-in-input-in-iframe-expected.txt: Added.
  • fast/forms/ios/typing-in-input-in-iframe.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202292 r202295  
     12016-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS] Typing text into a text field or text area causes screen to scroll down (hiding text entry)
     4        https://bugs.webkit.org/show_bug.cgi?id=158970
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Test that focuses an input in a frame and then types a character, then checks for scrolling.
     9
     10        * fast/forms/ios/typing-in-input-in-iframe-expected.txt: Added.
     11        * fast/forms/ios/typing-in-input-in-iframe.html: Added.
     12
    1132016-06-20  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r202293 r202295  
     12016-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS] Typing text into a text field or text area causes screen to scroll down (hiding text entry)
     4        https://bugs.webkit.org/show_bug.cgi?id=158970
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        insertTextWithoutSendingTextEvent() should only reveal the selection up to the main frame on iOS,
     9        since the UI process can zoom and scroll the view to the text input.
     10
     11        Test: fast/forms/ios/typing-in-input-in-iframe.html
     12
     13        * editing/Editor.cpp:
     14        (WebCore::Editor::insertTextWithoutSendingTextEvent):
     15
    1162016-06-21  Adam Bergkvist  <adam.bergkvist@ericsson.com>
    217
  • trunk/Source/WebCore/editing/Editor.cpp

    r202292 r202295  
    12041204            // Reveal the current selection
    12051205            if (Frame* editedFrame = document->frame())
    1206                 if (Page* page = editedFrame->page())
    1207                     page->focusController().focusedOrMainFrame().selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterIfNeeded);
     1206                if (Page* page = editedFrame->page()) {
     1207#if PLATFORM(IOS)
     1208                    SelectionRevealMode revealMode = SelectionRevealMode::RevealUpToMainFrame;
     1209#else
     1210                    SelectionRevealMode revealMode = SelectionRevealMode::Reveal;
     1211#endif
     1212                    page->focusController().focusedOrMainFrame().selection().revealSelection(revealMode, ScrollAlignment::alignCenterIfNeeded);
     1213                }
    12081214        }
    12091215    }
Note: See TracChangeset for help on using the changeset viewer.