Faster implementation of text-decoration-skip: ink
https://bugs.webkit.org/show_bug.cgi?id=125718

Reviewed by Simon Fraser.

Source/WebCore:

This new implementation of text-decoration-skip: ink extracts
each glyph into a path, then decomposes each path into a series
of contours. It then intersects each contour with the top and
bottom of the underline (by approximating the contour with a line).
It then draws underlines in between these intersection regions.

Tests for text-decoration-skip: ink already exist in
fast/css3-text/css3-text-decoration/text-decoration-skip

* platform/graphics/Font.h: Signature of new function
* platform/graphics/mac/FontMac.mm:
(WebCore::GlyphIterationState::GlyphIterationState): Persistent
between calls to findPathIntersections
(WebCore::findIntersectionPoint): Calculates an intersection point
between two lines
(WebCore::findPathIntersections): Called by CGPathApply to find
intersections of each contour
(WebCore::Font::intersectionPoints): Function to get the places
where an underline would intersect a TextRun.
* rendering/InlineTextBox.cpp:
(WebCore::compareTuples): Used for sorting intersection ranges
(WebCore::translateIntersectionPointsToSkipInkBoundaries): Converts
a sequence of intersection points to the locations where
text-decoration-skip: ink should draw underlines
(WebCore::drawSkipInkUnderline): Draws a sequence of short underlines
(WebCore::InlineTextBox::paintDecoration):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::intersectionPoints): Calls Font::intersectionPoints
* rendering/TextPainter.h:

Source/WTF:

This creates a new preprocessor define, CSS3_TEXT_DECORATION_SKIP_INK,
which enables the use of the text-decoration-skip: ink CSS value.
Creating this new value simplifies the logic about when to enable the
codepath for this CSS value.

* wtf/Platform.h:

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

Add ENABLE(CUSTOM_PROTOCOLS) guard.

* UIProcess/WebContext.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r160941.
http://trac.webkit.org/changeset/160941
https://bugs.webkit.org/show_bug.cgi?id=126095

Doesn't handle subpixel layout being disabled (Requested by
smfr on #webkit).

* gdb/webkit.py:
(JSCJSStringPrinter.to_string):
(add_pretty_printers):
* lldb/lldb_webkit.py:
(WTFMediaTime_SummaryProvider):
(WTFStringProvider.to_string):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speed up case folding for 8-bit strings
https://bugs.webkit.org/show_bug.cgi?id=126098

Reviewed by Geoffrey Garen.

Add a case folding lookup table for 8-bit strings and use it instead of calling down to u_foldCase.
On a simple microbenchmark using a lookup table is about 15x faster.

* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::foldCase):
* wtf/text/StringImpl.cpp:
(WTF::equalIgnoringCase):
* wtf/text/StringImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove the references to Node in InjectedScript
https://bugs.webkit.org/show_bug.cgi?id=126091

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-20
Reviewed by Timothy Hatcher.

Remove the last DOM references from InjectedScript so that
InjectedScript can move down into JavaScriptCore. The only
remaining references were to Nodes, which are all just thin
wrappers around existing functions. Move Node / JSNode (JSValue)
conversion into InspectorDOMAgent, where it was used.

No new tests, no observable change in functionality.

* bindings/js/JSInjectedScriptHostCustom.cpp:
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::inspectObject):
(WebCore::InjectedScript::releaseObject):
* inspector/InjectedScript.h:
* inspector/InjectedScriptHost.h:
* inspector/InjectedScriptSource.js:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::focusNode):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::requestNode):
(WebCore::InspectorDOMAgent::nodeForObjectId):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::scriptValueAsNode):
(WebCore::InspectorDOMAgent::nodeAsScriptValue):
* inspector/InspectorDOMAgent.h:
* inspector/PageConsoleAgent.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assert that RootInlineBox::setLineBreakInfo should is never called on a RenderInline without line boxes
https://bugs.webkit.org/show_bug.cgi?id=126101

Reviewed by Simon Fraser.

Merge assertions added in https://chromium.googlesource.com/chromium/blink/+/716ac74fd475b581d69c0aa8ec2d806201c3a420

The code change was not merged since we never hit the added assertion on the attached test case in WebKit.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::setLineBreakInfo):


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