Use #include instead of #import
https://bugs.webkit.org/show_bug.cgi?id=131604

Reviewed by Darin Adler.

Fix "warning: #import is a deprecated GCC extension [-Wdeprecated]".

* TestWebKitAPI/Tests/WTF/StringView.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
https://bugs.webkit.org/show_bug.cgi?id=126322

Reviewed by Ryosuke Niwa.

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::canContainRangeEndPoint): Now returns false when the role of the element
is "img". This is the same rule that's hard-coded in isRenderReplacedElement for the same
reason. Need more test coverage to make sure this role feature works consistently.

* dom/Element.h: Made canContainRangeEndPoint no longer inline since it's not just a
return statement any more.

* dom/Position.cpp:
(WebCore::Position::isCandidate): Took out code that calls isRendererReplacedElement
that was added in r158617; not needed now that we updated canContainRangeEndPoint.

* dom/Range.cpp:
(WebCore::Range::firstNode): Removed code here that called isRendererReplacedElement.
This was the wrong level to be adding editing logic, and there's a FIXME here to that
effect, which we are now deleting. This was the change that broke Find.

* editing/TextIterator.cpp: Added a comment about the redundancy between the
isRendererReplacedElement and editingIgnoresContent functions.

* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::canContainRangeEndPoint): Call through to base class instead
of just returning true when we have child nodes. Lets Element::canContainRangeEndPoint
do its thing.
* html/HTMLHRElement.h: Ditto.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to base class instead
of just returning true when we have fallback content. Lets Element::canContainRangeEndPoint
do its thing.
* html/HTMLObjectElement.h: Ditto.

* testing/Internals.cpp:
(WebCore::Internals::countMatchesForText): Set the limit to 1000 instead of infinite.

LayoutTests:

* editing/text-iterator/count-matches-in-form-expected.txt: Added.
* editing/text-iterator/count-matches-in-form.html: Added.

* fast/text/window-find.html: Tweaked the test a bit, making it a little easier to
see if the test hasn't even run.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
userVisibleString should not try to "encode" host names
https://bugs.webkit.org/show_bug.cgi?id=131587
rdar://problem/14686849

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* WebCore.exp.in: Updated for WebCoreNSURLExtras argument type changes.

* platform/mac/WebCoreNSURLExtras.h: Removed unneeded code to make this
Objective-C++ header compile in plain C++ files, which we never need to do.
Added missing argument name, baseURL, and changed mysterious CFIndex arguments
to the correct type, CFURLComponentType.

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isLookalikeCharacter): Removed the inline keyword from this, and added
more lookalike characters from the Mozilla list referenced here.
(WebCore::URLByTruncatingOneCharacterBeforeComponent): Updated argument type.
(WebCore::dataForURLComponentType): Ditto.
(WebCore::userVisibleString): Only call mapHostNames if host name decoding is
needed; no encoding here.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added URLExtras.mm.

* TestWebKitAPI/Tests/mac/URLExtras.mm: Added. A few tests for WebCoreNSURLExtras.
Coverage is tiny at this point; we could add a lot more cases!

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167211 268f45cc-cd09-0410-ab3c-d52691b4dbfc