Refactor cut and copy functions as suggested in FIXME line
https://bugs.webkit.org/show_bug.cgi?id=129867

Patch by Lukasz Bialek <l.bialek@samsung.com> on 2014-03-28
Reviewed by Darin Adler.

Cut and Copy functions in Editor.cpp use lots of common code.
Those functions are merged into one to share code, several
additional conditions are added to preserve Cut and Copy
functionality.

* editing/Editor.cpp:
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::performCutOrCopy):
* editing/Editor.h:

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

* platform/audio/AudioHardwareListener.cpp:
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListener::audioHardwareListenerIsSupported): Deleted.
* platform/audio/AudioHardwareListener.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the code related to SelectorPseudoTypeMap to reflect its new purpose
https://bugs.webkit.org/show_bug.cgi?id=130620

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-28
Reviewed by Andreas Kling.

Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.

This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
to split PseudoClass and PseudoElement.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
(WebCore::CSSParserSelector::setPseudoClassValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
* css/SelectorPseudoTypeMap.h:
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
(enumerablePseudoType):
(expand_ifdef_condition):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889
<rdar://problem/16408694>

Reviewed by Alexey Proskuryakov.

* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer): Simplified expression that computes truncatedLength.
Removed incorrect "+ 1" from computation of where to write characters.

Source/WebKit/mac: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889

Reviewed by Alexey Proskuryakov.

* Misc/WebStringTruncator.mm:
(defaultMenuFont): Changed to use NeverDestroyed since I had to touch this file anyway.
(fontFromNSFont): Ditto. Also improved variable names a bit.
(+[WebStringTruncator initialize]): Added threading initialization, needed for main
thread assertions in string truncator code.

Tools: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added StringTruncator.mm.
* TestWebKitAPI/Tests/mac/StringTruncator.mm: Added. One test for each of the
WebStringTruncator methods; should be good for a start. These are dependent on the
metrics of Helvetica 12, but I am hoping that will be consistent across OS X machines.

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