[GTK] Avoid reset title for navigation within the page
https://bugs.webkit.org/show_bug.cgi?id=106908

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-01-23
Reviewed by Martin Robinson.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): Call
dispatchDidCommitLoad with true as param.
(WebKit::FrameLoaderClient::dispatchDidCommitLoad): The method has been
overloaded. The default implementation (without params) simply calls
dispatchDidCommitLoad with false. The new private method with
isNavigatingWithinPage as param will avoid to reset the title for
navigation within the page.
* WebCoreSupport/FrameLoaderClientGtk.h:
(FrameLoaderClient): Add new private method dispatchDidCommitLoad with a
boolean parameter to know if it is navigating withing the same page or
not.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Remove dependence on Microsoft Embedded OpenType Font Engine (T2EMBED.DLL)  from FontCustomPlatformData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=107153

Reviewed by Dan Bernstein.

* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing
https://bugs.webkit.org/show_bug.cgi?id=107664

Reviewed by Adam Barth.

The HTMLDocumentParser can be "supposed" to use a background parser
but not end up ever doing so for blank documents.  It's important
that we spin the forground parser at least once, so we end up
actually creating the about:blank document.

shouldUseThreading() means that threading is enabled and we should use it if we can.
m_haveBackgroundParser means that we actually are already using threading.
When we add full document.write support this will get a bit trickier still as
we'll need to be using both the foreground and background parsers.

This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::lineNumber):
(WebCore::HTMLDocumentParser::textPosition):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
transition-property accepts incorrect "all, none" as value
https://bugs.webkit.org/show_bug.cgi?id=105428

Reviewed by Dean Jackson.

Source/WebCore:

http://www.w3.org/TR/css3-transitions/#transition-property-property
disallows any value like none, all or all, none as it doesn't make
sense. This patch fixes the problem by rejecting the value if set by
the user.

Test: transitions/transitions-parsing.html

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

LayoutTests:

Extend the existing tests to cover the bug.

* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Use after free in plugins/geturlnotify-during-document-teardown.html
https://bugs.webkit.org/show_bug.cgi?id=107556

Reviewed by Tony Chang.

WebViewHost initiates a navigation to about:blank in its destructor.
However, since WebTestProxy inherits from WebViewHost, at this point
the WebViewClient and WebFrameClient interfaces are already partially
destructed resulting in the use after free.

This does not affect the chromium implementation since it doesn't
invoke WebKit API methods in its destructor.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):
(TestShell::closeWindow):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::WebViewHost):
(WebViewHost::~WebViewHost):
(WebViewHost::shutdown):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Optimize spellchecking by coalescing messages
https://bugs.webkit.org/show_bug.cgi?id=107707

Reviewed by Rob Buis.

PR233604
Instead of taking chunks one line at a time, coalesce them together
to fire off messages as close to our character limit as possible.
This should dramatically reduce the total number of messages in email
giving us a little performance bump.

Internally reviewed by Mike Fenton and Gen Mak.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
(DOMSupport):
* WebKitSupport/DOMSupport.h:
* WebKitSupport/InputHandler.cpp:
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
(BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
* WebKitSupport/SpellingHandler.h:


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

Speculative build fix for the GTK port after 140539.

* Source/autotools/symbols.filter:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Take a better guess as to what text the user wants learned
https://bugs.webkit.org/show_bug.cgi?id=107706

Reviewed by Rob Buis.

If we still have a valid caret position, use it to give priority to a region
of text.  We now take the text before the caret, instead of the text at the end
of the field.  If the caret is not present, we start from the beginning of the field.
This helps learning in email where the region of interest is generally at the start,
not end of the field.

Internally reviewed by Mike Fenton

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::learnText):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Update some #includes in DumpRenderTree for headers in the new Platform directory
https://bugs.webkit.org/show_bug.cgi?id=107145

Reviewed by Adam Barth.

Part of a larger refactoring series; see tracking bug 82948.

* DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
* DumpRenderTree/chromium/DRTDevToolsAgent.h:
* DumpRenderTree/chromium/DRTDevToolsClient.h:
* DumpRenderTree/chromium/DRTTestRunner.cpp:
* DumpRenderTree/chromium/DRTTestRunner.h:
* DumpRenderTree/chromium/MockWebPrerenderingSupport.h:
* DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
* DumpRenderTree/chromium/MockWebSpeechInputController.h:
* DumpRenderTree/chromium/NotificationPresenter.cpp:
* DumpRenderTree/chromium/TestNavigationController.h:
* DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
* DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
* DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
(WebTestRunner):
* DumpRenderTree/chromium/TestRunner/src/EventSender.h:
* DumpRenderTree/chromium/TestRunner/src/GamepadController.h:
* DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
* DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
* DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
* DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp:
* DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp:
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
* DumpRenderTree/chromium/TestShell.cpp:
* DumpRenderTree/chromium/WebThemeEngineDRTMac.h:
* DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
* DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp:
* DumpRenderTree/chromium/WebThemeEngineDRTWin.h:
* DumpRenderTree/chromium/WebViewHost.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Fix some #includes for WebSerializedScriptValue
https://bugs.webkit.org/show_bug.cgi?id=107697

Reviewed by Adam Barth.

WebSerializedScriptValue has been moved to chromium/public/.

* public/WebDOMCustomEvent.h:
* public/WebDOMMessageEvent.h:
* public/WebIDBCursor.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WebKitLibraries property sheets for compiling WebKit in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=106949

Reviewed by Brent Fulgham.

* win/tools/vsprops/FeatureDefines.props: Added.
* win/tools/vsprops/common.props: Added.
* win/tools/vsprops/debug.props: Added.
* win/tools/vsprops/release.props: Added.
* win/tools/vsprops/releaseproduction.props: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the VS2010 WebKit solution folder and solution file.
The solution of course will not load until the dependent projects are all completed.
https://bugs.webkit.org/show_bug.cgi?id=106949.

Reviewed by Brent Fulgham.

* WebKit.vcxproj: Added.
* WebKit.vcxproj/WebKit.sln: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove DocType support from MarkupTokenBase now that NEW_XML is gone
https://bugs.webkit.org/show_bug.cgi?id=107709

Reviewed by Adam Barth.

Just moving code out of MarkupTokenBase and into HTMLToken.
The test for this change is if it compiles. :)  Which it does.

* html/parser/HTMLToken.h:
(DoctypeData):
(WebCore::DoctypeData::DoctypeData):
(WebCore):
(WebCore::HTMLToken::appendToName):
(WebCore::HTMLToken::name):
(HTMLToken):
(WebCore::HTMLToken::beginDOCTYPE):
(WebCore::HTMLToken::publicIdentifier):
(WebCore::HTMLToken::systemIdentifier):
(WebCore::HTMLToken::setPublicIdentifierToEmptyString):
(WebCore::HTMLToken::setSystemIdentifierToEmptyString):
(WebCore::HTMLToken::appendToPublicIdentifier):
(WebCore::HTMLToken::appendToSystemIdentifier):
(WebCore::HTMLToken::releaseDoctypeData):
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
(AtomicHTMLToken):
* html/parser/HTMLTokenTypes.h:
* xml/parser/MarkupTokenBase.h:
(WebCore):
(MarkupTokenBase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Abspos Inline block not positioned correctly in text-aligned container
https://bugs.webkit.org/show_bug.cgi?id=105695

Reviewed by Ojan Vafai.

Source/WebCore:

Inline positioned elements should still obey the text-alignment of their container
even when we don't do a line layout.

Test: fast/text/container-align-with-inlines.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustPositionedBlock):
(WebCore::RenderBlock::updateStaticInlinePositionForChild):
(WebCore):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setStaticPositions):

LayoutTests:

* fast/text/container-align-with-inlines-expected.txt: Added.
* fast/text/container-align-with-inlines.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=107628
Sometimes scroll position is jerky during rubber-band, affects nytimes.com
-and corresponding-
<rdar://problem/12679549>

Reviewed by Simon Fraser.

The basic problem here is that isRubberBandInProgress() was only implemented for 
main thread scrolling. So when we were actually scrolling on the scrolling thread, 
that function would always return false regardless.

New ScrollableArea virtual function isRubberBandInProgress() will allow us to ask 
the ScrollingCoordinator when the scrolling thread is scrolling, or the 
ScrollAnimator otherwise.
* page/FrameView.cpp:
(WebCore::FrameView::isRubberBandInProgress):
* page/FrameView.h:
(FrameView):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::isRubberBandInProgress):

New ScrollingCoordinator function isRubberBandInProgress() always returns false 
for non-Mac ports, and is overridden in ScrollingCoordinatorMac to consult the 
ScrollingTree.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::isRubberBandInProgress):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::isRubberBandInProgress):

New variable m_mainFrameIsRubberBanding keeps track of whether there is currently 
a rubber-band happening on the scrolling thread.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::isRubberBandInProgress):
(WebCore::ScrollingTree::setMainFrameIsRubberBanding):
* page/scrolling/ScrollingTree.h:
(ScrollingTree):
(WebCore::ScrollingTree::rootNode):

Call setMainFrameIsRubberBanding() whenever the stretchAmount is calculated and 
whenever we stop the rubber-band timer.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::stretchAmount):
(WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):

Consult FrameView for isRubberBandInProgress().
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Recursion handling cancelled authentication challenges in NetworkProcess
<rdar://problem/13024541> and https://bugs.webkit.org/show_bug.cgi?id=107702

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* WebCore.exp.in:

Source/WebKit2:

This turned in to both a bug fix with authentication and a minimal refactoring of NetworkResourceLoader.

- Rename ::stop to ::resourceHandleStopped
- Move all cleanup code to ::resourceHandleStopped
- Schedule a resourceHandleStopped call when an authentication cancellation occurs
- Tell the WebResourceLoader to cancel when an authentication cancellation occurs

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::performStops):
(WebKit::NetworkResourceLoader::resourceHandleStopped):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::receivedAuthenticationCancellation):
* NetworkProcess/NetworkResourceLoader.h:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::cancelResourceLoader):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLCompactToken needs to include the forceQuirks bool from HTMLToken
https://bugs.webkit.org/show_bug.cgi?id=107713

Reviewed by Tony Gentilcore.

Before we were only getting "quirks mode" when the system/public identifiers
were known quirks identifiers.  Now we'll correctly get quirks mode for any
parse error during DOCTYPE parsing.
This passes a bunch more tests.

* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):
* html/parser/CompactHTMLToken.h:
(WebCore::CompactHTMLToken::doctypeForcesQuirks):
(CompactHTMLToken):
* html/parser/HTMLToken.h:
(WebCore::AtomicHTMLToken::AtomicHTMLToken):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore property sheets, modified build scripts, and project files for compiling in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=106988

Reviewed by Brent Fulgham.

* WebCore.vcproj/WebCore.sln:
* WebCore.vcxproj: Added.
* WebCore.vcxproj/MigrateScripts: Added.
* WebCore.vcxproj/QTMovieWin: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.user: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: Added.
* WebCore.vcxproj/WebCore.vcxproj: Added.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added.
* WebCore.vcxproj/WebCore.vcxproj.user: Added.
* WebCore.vcxproj/WebCoreCFNetwork.props: Added.
* WebCore.vcxproj/WebCoreCG.props: Added.
* WebCore.vcxproj/WebCoreCommon.props: Added.
* WebCore.vcxproj/WebCoreDebug.props: Added.
* WebCore.vcxproj/WebCoreGenerated.make: Added.
* WebCore.vcxproj/WebCoreGenerated.vcxproj: Added.
* WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Added.
* WebCore.vcxproj/WebCoreGenerated.vcxproj.user: Added.
* WebCore.vcxproj/WebCoreGeneratedCommon.props: Added.
* WebCore.vcxproj/WebCoreGeneratedDebug.props: Added.
* WebCore.vcxproj/WebCoreGeneratedRelease.props: Added.
* WebCore.vcxproj/WebCoreMediaQT.props: Added.
* WebCore.vcxproj/WebCorePostBuild.cmd: Added.
* WebCore.vcxproj/WebCorePreBuild.cmd: Added.
* WebCore.vcxproj/WebCorePreLink.cmd: Added.
* WebCore.vcxproj/WebCorePthreads.props: Added.
* WebCore.vcxproj/WebCoreQuartzCore.props: Added.
* WebCore.vcxproj/WebCoreRelease.props: Added.
* WebCore.vcxproj/build-generated-files.sh: Added.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Added.
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Added.
* WebCore.vcxproj/migrate-scripts.sh: Added.
* WebCore.vcxproj/xcopy.excludes: Added.
* WebCorePrefix.h:
* config.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] harden ScriptWrappable::m_wrapper against tampering
https://bugs.webkit.org/show_bug.cgi?id=107318

Reviewed by Adam Barth.

Patch is correct if existing tests past without crashing.

* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::ScriptWrappable):
(WebCore::ScriptWrappable::wrapper):
(WebCore::ScriptWrappable::setWrapper):
(WebCore::ScriptWrappable::clearWrapper):
(WebCore::ScriptWrappable::disposeWrapper):
(WebCore::ScriptWrappable::reportMemoryUsage):
(ScriptWrappable):
(WebCore::ScriptWrappable::maskOrUnmaskPointer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Incorrect scrollable height during simplified layout
https://bugs.webkit.org/show_bug.cgi?id=107193

Reviewed by David Hyatt.

Source/WebCore:

When computing overflow we need the height of the block before
it was clamped (i.e., before updateLogicalHeight() has been called).

During simplified layout, we don't have this information and we were
using the clamped height by mistake. To fix this, we now store the
pre-clamped height on RenderOverflow so we can properly compute
overflow.

Test: fast/overflow/height-during-simplified-layout.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow): Save the height if we have overflow.
(WebCore::RenderBlock::simplifiedLayout): If we have overflow, use the height that we saved
in computeOverflow.
* rendering/RenderOverflow.h:
(WebCore::RenderOverflow::layoutClientAfterEdge):
(WebCore::RenderOverflow::setLayoutClientAfterEdge):
(RenderOverflow): Add a member variable to save the height.

LayoutTests:

* fast/overflow/height-during-simplified-layout-expected.txt: Added.
* fast/overflow/height-during-simplified-layout.html: Added.


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