[GTK] Use drawErrorUnderline() instead of Pango API for highlighting misspelled words
https://bugs.webkit.org/show_bug.cgi?id=115406

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2013-06-03
Reviewed by Martin Robinson.

Source/WebCore:

Replace pango API for drawing underline error on misspelled words, in favor of
drawErrorUnderline() method, removing the platform #ifdef check. As this was the
only usage of Pango in GraphicsContextCairo, it no longer includes pango.h.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): Removes
pango_cairo_show_error_underline() in favor of drawErrorUnderline().
* platform/graphics/cairo/DrawErrorUnderline.h:
(drawErrorUnderline): Fills the cairo path at the end of the drawing.

LayoutTests:

Update PNG expectations for some spell checking tests to pass pixel hash comparison.
The images are not visually modified.

* platform/gtk/editing/spelling/inline-spelling-markers-hidpi-expected.png: Rebaseline
image to pass pixel hash
* platform/gtk/editing/spelling/inline_spelling_markers-expected.png: Rebasline
image to pass pixel hash
* platform/gtk/editing/spelling/spelling-expected.png: Rebasline
image to pass pixel hash

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove XMLMIMETypeRegExp
https://bugs.webkit.org/show_bug.cgi?id=116861

Reviewed by Alexey Proskuryakov.

Remove the XMLMIMETypeRegExp class. It contained a regular expression that was used
for checking for valid XML MIME types in DOMImplementation::isXMLMIMEType. The thread-global
instance was stored in ThreadGlobalData.

The class is removed, with DOMImplementation::isXMLMIMEType now testing that the given MIME type
is of proper form and contains only valid characters.

No new tests - no change in functionality.

* dom/DOMImplementation.cpp:
(WebCore::isValidXMLMIMETypeChar): A helper method that returns true only for characters that
are acceptable in a valid XML MIME type (apart from the forward slash).
(WebCore::DOMImplementation::isXMLMIMEType): Instead of using a regular expression, determine
whether the given string is a valid non-standard XML mime type by checking for the '+xml' ending,
proper forward slash position, and that no invalid characters are used in the string.
* dom/DOMImplementation.h:
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData): The OwnPtr<XMLMIMETypeRegExp> member variable is being removed.
(WebCore::ThreadGlobalData::destroy): Ditto.
* platform/ThreadGlobalData.h:
(WebCore): No need for the XMLMIMETypeRegExp forward declaration.
(ThreadGlobalData): Remove the OwnPtr<XMLMIMETypeRegExp> member variable.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Expose show debug borders setting through BlackBerry::WebKit::WebPage
https://bugs.webkit.org/show_bug.cgi?id=117167

Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

Add WebKit::WebPage API for setting whether to show accelerated compositing
debug borders.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::setShowDebugBorders):
(WebKit):
* Api/WebPage.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WebKit should join substrings on single space when concatenating the accessible name of an element
https://bugs.webkit.org/show_bug.cgi?id=117100

Reviewed by Darin Adler.

Source/WebCore:

When concatenating text from underneath an element append spaces between objects and trim whitespace.

Modified existing tests reflect the new behavior.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement):

LayoutTests:

* accessibility/text-role-with-aria-hidden-inside-expected.txt:
* accessibility/text-role-with-aria-hidden-inside.html:
* platform/mac/accessibility/internal-link-anchors2-expected.txt:
* platform/mac/accessibility/table-with-aria-role-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] REGRESSION(r150798): scrolling coordinator is not being enabled when WebPage is set to use fixed layout
https://bugs.webkit.org/show_bug.cgi?id=117163

Reviewed by Darin Adler.

Moved call to WebPage::settings()->setScrollingCoordinatorEnabled()
from CoordinatedLayerTreeHost constructor to WebPage::setUseFixedLayout().
The scrolling coordinator must be enabled or disabled following the
WebPage's use of fixed layout.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nuke VS2005 files from the tree.
<rdar://problem/14042021>.

Rubberstamped by Brent Fulgham.

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

* TestWebKitAPI/win/main.cpp: Embed proper manifest information to
allow VS2010 builds to use VS2005 runtime libraries as needed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Respect PKG_CONFIG env variable when generating gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=117168

Patch by Erik van Pienbroek <epienbro@fedoraproject.org> on 2013-06-03
Reviewed by Martin Robinson.

The tool generate-gtkdoc internally calls pkg-config.
When cross-compiling it shouldn't use pkg-config, but
it should use the pkg-config which was detected by
the ./configure script (for example this can be
i686-w64-mingw32-pkg-config when cross-compiling)

* GNUmakefile.am:
* gtk/gtkdoc.py:
(PkgConfigGTKDoc.__init__):

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

* WebCore.vcxproj/migrate-scripts.sh:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reduce indentation in Widget::paint in WidgetMac.mm
https://bugs.webkit.org/show_bug.cgi?id=117171

Reviewed by Darin Adler.

Use an early return for the common case to reduce indentation in the complex case.

* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Undoing autocorrection doesn't prevent a future autocorrection
https://bugs.webkit.org/show_bug.cgi?id=117165

Reviewed by Darin Adler.

Source/WebCore: 

The bug was caused by SpellingCorrectionCommand returning true in callsAppliedEditingInDoApply, which prevented
the command from being registered to the undo manager. This behavior was introduced in r148306 because TypingCommand
registeres itself to the undo manager in appliedEditing.

Fixed the bug by reverting both r122176 and r148306 and implementing a better fix for the bug 90487.
Instead of using InsertTextCommand, simply don't specify ReplaceSelectionCommand::PreventNesting so that the command
doesn't try to break out of a blockquote.

Also fix a bug in ReplaceSelectionCommand::completeHTMLReplacement uncovered by this change. We were only merging
text nodes at the beginning of the replaced content but not at the end. Call mergeTextNodesAroundPosition for the
second time to fix whitespace at the end of the replaced content.

Test: platform/mac/editing/spelling/autocorrection-respets-undo.html

* editing/CompositeEditCommand.cpp: Explictily check isTypingCommand now that callsAppliedEditingInDoApply has been
removed from SpellingCorrectionCommand and TypingCommand and SpellingCorrectionCommand were only classes that
returned true in callsAppliedEditingInDoApply. See r148306 that introduced this function.
(WebCore::CompositeEditCommand::apply):
* editing/CompositeEditCommand.h: Removed callsAppliedEditingInDoApply.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
* editing/SpellingCorrectionCommand.cpp: Removed callsAppliedEditingInDoApply, which was the culprit of this bug,
so that CompositeEditCommand::apply correctly registers this command with the undo manager.
(WebCore::SpellingCorrectionCommand::doApply): Use ReplaceSelectionCommand instead of TypingCommand as noted above.
* editing/SpellingCorrectionCommand.h:
* editing/TypingCommand.cpp: Deleted callsAppliedEditingInDoApply.
* editing/TypingCommand.h:

LayoutTests: 

Add a regression test and rebaseline other tests as ReplaceSelectionCommand now merges text nodes at
the end of replaced text.

* editing/deleting/merge-paragraph-from-address-expected.txt:
* editing/deleting/merge-paragraph-from-h6-expected.txt:
* editing/deleting/merge-paragraph-from-listing-expected.txt:
* editing/deleting/paste-with-transparent-background-color-expected.txt:
* editing/inserting/insert-3907422-fix-expected.txt:
* editing/pasteboard/copy-image-with-alt-text-expected.txt:
* editing/pasteboard/merge-end-4-expected.txt:
* editing/pasteboard/nested-blocks-with-text-area-expected.txt:
* editing/pasteboard/nested-blocks-with-text-field-expected.txt:
* editing/pasteboard/paste-text-001-expected.txt:
* editing/pasteboard/paste-unrendered-select-expected.txt:
* editing/pasteboard/smart-paste-003-trailing-whitespace-expected.txt:
* platform/mac/editing/deleting/delete-block-merge-contents-001-expected.txt:
* platform/mac/editing/deleting/delete-block-merge-contents-019-expected.txt:
* platform/mac/editing/deleting/delete-block-merge-contents-020-expected.txt:
* platform/mac/editing/pasteboard/4944770-2-expected.txt:
* platform/mac/editing/pasteboard/8145-2-expected.txt:
* platform/mac/editing/pasteboard/paste-line-endings-006-expected.txt:
* platform/mac/editing/pasteboard/paste-text-008-expected.txt:
* platform/mac/editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
* platform/mac/editing/pasteboard/paste-xml-expected.txt:
* platform/mac/editing/spelling/autocorrection-blockquote-crash-expected.txt:
* platform/mac/editing/spelling/autocorrection-blockquote-crash.html: Added more asssertions to ensure that
the autocorrected text is in the blockquote. r122176 modified the test description saying that this test
already checks this condition but it never did so explicitly; it assumed that the autocorrected text was
inside a blockquote as long as it started at a certain offset in the text node.
* platform/mac/editing/spelling/autocorrection-respets-undo-expected.txt: Added.
* platform/mac/editing/spelling/autocorrection-respets-undo.html: Added.
* platform/mac/editing/spelling/autocorrection-with-multi-line-text-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[harfbuzz] WebKit fails to build with MinGW compiler because of invalid cast in HarfBuzzShaper.cpp
https://bugs.webkit.org/show_bug.cgi?id=108373

Patch by Paweł Forysiuk <tuxator@o2.pl> on 2013-06-03
Reviewed by Darin Adler.

Fix building on platforms where UChar is defined as wchar_t.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add ATK version 2.8.0 to efl jhbuild moduleset
https://bugs.webkit.org/show_bug.cgi?id=116726

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2013-06-03
Reviewed by Gyuyoung Kim.

.:

Bump required version of ATK to 2.8.0 in EFL CMake's build.

* Source/cmake/FindATK.cmake: Adds macro to check required version
* Source/cmake/OptionsEfl.cmake: Specifies required version of ATK to be 2.8.0

Tools:

Current version of ATK in efl-ews environment is 2.4.0 and is taken from
the platform (it is not listed in jhbuild moduleset). That version is
old-ish and contain deprecated symbols and missing API, that are blocking
patches in other ports (gtk). This patch adds ATK version 2.8.0 to efl
moduleset, which is the same version the gtk port uses.

See bug https://bugs.webkit.org/show_bug.cgi?id=115647 for more details on
why this is needed.

* efl/jhbuild.modules: Adds ATK module as dependency

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
clearLayoutOverflow should never be called before calling layer()->updateScrollInfoAfterLayout().
https://bugs.webkit.org/show_bug.cgi?id=116689.

Reviewed by Ojan Vafai.

Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic together.

Test: fast/flexbox/clear-overflow-before-scroll-update.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layout): Remove call to clearLayoutOverflow.
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Add call to clearLayoutOverflow.
(WebCore::RenderBlock::updateScrollInfoAfterLayout): Ditto.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
(WebCore::RenderBox::layoutOverflowRect): Remove from layoutOverflowRect.
(RenderBox): 
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock): This should call updateScrollInfoAfterLayout() intead of directly calling layer()->updateScrollInfoAfterLayout().
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Some AppleWin VS2010 house cleaning.

* WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd:
* WebKit.vcxproj/WebKit/WebKitPreBuild.cmd:
* win/tools32/scripts/auto-version.sh: Replaced with win/tools32/scripts/auto-version2010.sh.
* win/tools32/scripts/auto-version2010.sh: Removed.
* win/tools32/scripts/feature-defines.sh: Replaced with win/tools32/scripts/feature-defines2010.sh.
* win/tools32/scripts/feature-defines2010.sh: Removed.
* WebCore.vcxproj/build-generated-files.sh:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Implement GCActivityCallback
https://bugs.webkit.org/show_bug.cgi?id=95923

Patch by Hojong Han <hojong.han@samsung.com> on 2013-06-03
Reviewed by Geoffrey Garen.

Implements the activity triggered garbage collector.
Additional GCs can be triggered by platfrom timer.
It has sort of compaction effect not to make JSC heap grow fast
so that memory usage becomes lower than usual.

* PlatformEfl.cmake: Added.
* heap/HeapTimer.cpp:
(JSC):
(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::add):
(JSC::HeapTimer::stop):
(JSC::HeapTimer::timerEvent):
* heap/HeapTimer.h:
(HeapTimer):
* jsc.cpp:
(main):
* runtime/GCActivityCallback.cpp:
(JSC):
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::scheduleTimer):
(JSC::DefaultGCActivityCallback::cancelTimer):
(JSC::DefaultGCActivityCallback::didAllocate):
* runtime/GCActivityCallback.h:
(GCActivityCallback):
(JSC::GCActivityCallback::GCActivityCallback):
(DefaultGCActivityCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] NRWT is not putting crash logs in proper place
https://bugs.webkit.org/show_bug.cgi?id=117098

Reviewed by Ryosuke Niwa.

Provide windows-specific overloads for various Port features needed to create and capture
crash logs.  This change makes it possible to view crash logs (when created) as part of the
summary report at the end of the NRWT run.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs.find_newest_log): Add support for win32 crash logs
(CrashLogs._find_newest_log_win): Added
* Scripts/webkitpy/common/system/crashlogs_unittest.py:
(make_mock_crash_report_win): Added
(CrashLogsTest.test_find_log_win): Added.
* Scripts/webkitpy/common/system/executive.py:
(Executive.running_pids): Add support for Cygwin win32 crash logs
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.__init__):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(RealFileSystemTest.test_read_and_write_file): Add tests for
malformed ascii/utf8 handling (i.e., Windows log files)
* Scripts/webkitpy/port/base.py:
(Port.find_system_pid): Added
* Scripts/webkitpy/port/server_process.py:
(ServerProcess._start): Gather windows PIDs to match up with Cygwin PIDs
* Scripts/webkitpy/port/win.py:
(WinPort.setup_crash_log_saving): Don't open windows shell (which might get stuck waiting
for user to hit enter.
(WinPort._get_crash_log): Added
(WinPort.look_for_new_crash_logs): Added
(WinPort.find_system_pid): Added
* Scripts/webkitpy/port/win_unittest.py:
(WinPortTest.test_get_crash_log): Added test


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
add a script to dump the tests run most recently by a given worker
https://bugs.webkit.org/show_bug.cgi?id=116571

Reviewed by Brent Fulgham.

The tests_run*.txt results files in layout-test-results/ were removed
in r137356, in favor of collecting more data about how the tests were
run and compressing it and storing it in stats.json. However, it was
nice to just be able to look at a flat text file.

This script will extract the tests run by a given worker from a
given stats.json file, and should help to address that.

* Scripts/dump-webkit-tests-run: Added.
(main):
(convert_trie_to_flat_paths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
validate-committer-lists script is now outdated and does not work
https://bugs.webkit.org/show_bug.cgi?id=115860

Patch by Simon Pena <simon.pena@samsung.com> on 2013-06-03
Reviewed by Brent Fulgham.

The script validate-committer-lists was outdated, still using the deprecated log
system and having the old addresses for the mailing lists, as well as still referring
to committers.py, after this was renamed to contributors.json. This patch fixes that
so it can be used again.

* Scripts/validate-committer-lists: Replace calls to log and error with the
new logging mechanism, fix the URLs for the mailing lists, and fix the mentions
to committers.py, which should be contributors.json.
(CommitterListFromMailingList):
(CommitterListFromMailingList.check_for_emails_missing_from_list):
(CommitterListFromGit._fetch_authors_and_last_commit_time_from_git_log):
(CommitterListFromGit._fill_in_emails_for_old_logins):
(CommitterListFromGit.print_committers_missing_from_committer_list):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused arithmetic operation in RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=117175

Reviewed by Brent Fulgham.

Variable 'markerLogicalLeft' is reassigned a value before the old one has been used.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):


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