[iOS] Fix the iOS build; add case statements for kCLAuthorizationStatusAuthorized
https://bugs.webkit.org/show_bug.cgi?id=137101
<rdar://problem/18449815>

Reviewed by Mark Lam.

* Misc/WebGeolocationCoreLocationProvider.mm:
(-[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]):
(-[WebGeolocationCoreLocationProvider locationManager:didChangeAuthorizationStatus:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Text with a zero offset, zero blur shadow vanishes
https://bugs.webkit.org/show_bug.cgi?id=136801

Reviewed by Darin Adler.

Source/WebCore:

This patch performs some cleanup regarding TextPainter's shadow logic and handles an
additional case of empty shadows. Previously, there was tight coupling between
applyShadowToGraphicalContext() and paintTextWithShadows(), as they both used a
collection of variables to determine how shadows are to be drawn. This complexity has
been moved into a helper class, ShadowApplier, which performs what
applyShadowToGraphicsContext() used to do, and cleans up correctly in its destructor.
This removes the tight coupling mentioned earlier.

Test: fast/text/empty-shadow.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::applyShadowToGraphicsContext): Moved to ShadowApplier.
* rendering/InlineTextBox.h: Deleted applyShadowToGraphicsContext signature.
* rendering/TextPainter.cpp:
(WebCore::ShadowApplier::ShadowApplier): Perform the contents of applyShadowToGraphicsContext()
(WebCore::ShadowApplier::~ShadowApplier): Undo the work done previously
(WebCore::paintTextWithShadows): Create a ShadowApplier to do the relevant shadow work. In addition,
refactor some boolean flags to more meaningful ones with relation to the computation at hand.
(WebCore::isEmptyShadow): Moved to TextPainter.h, named shadowIsCompletelyCoveredByText()
* rendering/TextPainter.h:
(WebCore::ShadowApplier::ShadowApplier): Moved from InlineTextBox::applyShadowToGraphicsContext().
(WebCore::ShadowApplier::extraOffset): Getter.
(WebCore::ShadowApplier::~ShadowApplier): Moved from TextPainter::paintTextWithShadows().
(WebCore::isLastShadowIteration): Helper function.
(WebCore::shadowIsCompletelyCoveredByText): Determines whether or not we should not draw the shadow.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintTextWithShadows): Update to use ShadowApplier.

LayoutTests:

This test should be a comprehensive test of empty shadows. It tests every
combination of one and two shadows being empty, as well as transparent and
opaque text.

After updating fast/text/empty-shadow.html, fast/text/empty-shadow-with-color.html
is no longer necessary.

* fast/text/empty-shadow-expected.html:
* fast/text/empty-shadow-with-color-expected.html: Removed.
* fast/text/empty-shadow-with-color.html: Removed.
* fast/text/empty-shadow.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r173941.

Rename shadow to m_shadow.

* rendering/TextPainter.h:
(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
https://bugs.webkit.org/show_bug.cgi?id=70029

Reviewed by Dan Bernstein.

Source/WebCore:

Test: fast/text/international/old-turkic-direction.html

* CMakeLists.txt: Added InlineIterator.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* rendering/RenderingAllInOne.cpp: Ditto.

* rendering/InlineIterator.cpp: Added.
(WebCore::InlineIterator::surrogateTextDirection): New function used to compute the direction
when a surrogate pair is involved.
* rendering/InlineIterator.h: Made the characterAt function private.
(WebCore::InlineIterator::previousInSameNode): Took out unneeded range check. A zero will underflow
and become a large number and the characterAt function will return 0 in that case.
(WebCore::InlineIterator::direction): Added code to check U16_IS_SINGLE before calling
u_charDirection, and call surrogateTextDirection instead.

LayoutTests:

* fast/text/international/old-turkic-direction.html: Added.
* fast/text/international/old-turkic-direction-expected.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add initial is<>() / downcast<>() support for any type of Nodes
https://bugs.webkit.org/show_bug.cgi?id=137056

Reviewed by Benjamin Poulain.

Source/WebCore:

Add initial is<>() / downcast<>() support for any type of Nodes, not
just Elements by:
- Moving the is<>() / downcast<>() declarations from Element.h to
  Node.h
- Introducing a SPECIALIZE_TYPE_TRAITS_*() macro that generates the
  needed template specializations for is<>() / downcast<>() to work.
  This macro will replace NODE_TYPE_CASTS() entirely once the code base
  is fully ported.

This patch makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
HTMLFormControlElement, that is an HTMLElement for which the template
specializations cannot be automatically generated because it requires
special handling.

This patch also makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
DocumentFragment to show that it can be used for non-Element Nodes.

No new tests, no behavior change.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::isRequired):
(WebCore::AccessibilityNodeObject::isControl):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isAutofilled):
(WebCore::isDisabled):
(WebCore::isEnabled):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::adjustRenderStyle):
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::setFocusedElement):
* dom/DocumentFragment.h:
(WebCore::isDocumentFragment):
* dom/Element.cpp:
(WebCore::Element::focus):
* dom/Element.h:
(WebCore::is): Deleted.
(WebCore::downcast): Deleted.
* dom/Node.h:
(WebCore::is):
(WebCore::downcast):
* dom/make_names.pl:
(printTypeHelpers):
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
* html/FormAssociatedElement.h:
* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::updateFromControlElementsAncestorDisabledStateUnder):
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::enclosingFormControlElement):
* html/HTMLFormControlElement.h:
(WebCore::isHTMLFormControlElement):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submitImplicitly):
(WebCore::submitElementFromEvent):
(WebCore::HTMLFormElement::validateInteractively):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::formElementIndex):
(WebCore::HTMLFormElement::defaultButton):
(WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
(WebCore::HTMLFormElement::documentDidResumeFromPageCache):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::isClickableControl):
* html/LabelableElement.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
(WebCore::RadioNodeList::elementMatches):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::findFosterSite):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::disallowTelephoneNumberParsing):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* mathml/MathMLElement.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::formControlElement):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isReadOnlyControl):
* svg/SVGElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/animation/SVGSMILElement.h:

Source/WebKit/mac:

Use is<HTMLFormControlElement>() / downcast<HTMLFormControlElement>()
instead of isFormControlElement() / toHTMLFormControlElement().

* WebView/WebHTMLRepresentation.mm:
(searchForLabelsBeforeElement):

Source/WebKit/win:

Use is<HTMLFormControlElement>() / downcast<HTMLFormControlElement>()
instead of isFormControlElement() / toHTMLFormControlElement().

* WebFrame.cpp:
(WebFrame::elementWithName):


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