[WINCE] Add wtf_bsearch()
https://bugs.webkit.org/show_bug.cgi?id=116528

Reviewed by Darin Adler.

r149833 introduced usage of ::bsearch(), which does not exist on Windwos CE.
Add our own implementation of this function as wtf_bsearch and define
bsearch as wtf_bsearch to fix compilation on Windwos CE.

* wtf/StdLibExtras.h:
(wtf_bsearch):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Encapsulate FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116803

Reviewed by Andreas Kling.

FontGlyphs is unfriending Font. Give it a real class interface and some actual code.

* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter):
(WebCore::Font::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::isInRange):
(WebCore::shouldIgnoreRotation):
(WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
        
    Helpers from FontFastPath.cpp.

(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
        
    This is the primary interface. The code moves here from FontFastPath.cpp.

* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::createForPlatformData):
        
    Remove setPlatformData in favor of constructor.

(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/FontFastPath.cpp:
* platform/graphics/GraphicsContext.h:

    Remove a stray function definition also called setPlatformFont().

* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Plugins with no src but valid type should not snapshot
https://bugs.webkit.org/show_bug.cgi?id=116799
<rdar://problem/13695911>

Reviewed by Simon Fraser.

There are a few plug-ins around that don't take any source content
via the src attribute, but rather just load the binary based on the
mime-type. In those cases we shouldn't snapshot until we have a
mechanism to do so.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
    Add MIMEType logging, and detect the case of no src but valid type.
* html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
    this special case.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The public WK header file should not include WKAPICast.h
https://bugs.webkit.org/show_bug.cgi?id=115230

Patch by Changhun Kang <temoochin@company100.net> on 2013-05-26
Reviewed by Darin Adler.

Otherwise, WebKit internal headers are exposed.
No new tests. No change in behavior.
* UIProcess/API/C/soup/WKSoupRequestManager.h:
* UIProcess/soup/WebSoupRequestManagerClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn TreeScope::focusedNode() into focusedElement().
<http://webkit.org/b/116802>

Reviewed by Darin Adler.

For the hundredth time, only Elements can be focused!

This change mostly reverts r121079 since that made things unnecessarily complicated
just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
Finding a TreeScope's focused element now does a simple walk up the parent chain instead
of running the full Shadow DOM re-targeting algorithm.

(WebCore::TreeScope::focusedElement):

    Simplify and return Element* instead of Node*.

* dom/TreeScope.h:
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):

    Make this return Element* as the name already suggested.

* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree):
* dom/Element.cpp:
(WebCore::Element::blur):
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::activeElement):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement):

    Simplified call sites that were paranoid about getting a non-Element focused node.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSParser::parseImageResolution doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=116755

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2013-05-26
Reviewed by Darin Adler.

parseImageResolution() can get CSSPraserValueList from m_valueList directly.

No new tests, no behavior change.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseImageResolution):
* css/CSSParser.h:

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