Get WTF compiling in VS2010 (32bit)
https://bugs.webkit.org/show_bug.cgi?id=106986

Reviewed by Tim Horton.

If you do not have Cygwin in the overall operating system
PATH, the project will not build.  In VS2005 we had logic
in the build system to guard against this.  We should
retain this in the VS2010 work.

Furthermore, VS2010 has a nasty bug where to Visual Studio
tools path is not defined when performing a 'clean' phase
on an NMAKE-based build.  This is corrected here as well.

* win/tools/vsprops/common.props: Revise environment setup
to ensure proper tools are in path during build.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stipulate build order between WTFGenerated and WTF
https://bugs.webkit.org/show_bug.cgi?id=107844

Reviewed by Tim Horton.

* WTF.vcxproj/WTF.vcxproj: Use VS2010 project dependency
declaration so WTF depends on a completed WTFGenerated build.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Abandoned Memory: SVGFontElement and Corresponding SVGDocument Never Deconstructed
https://bugs.webkit.org/show_bug.cgi?id=66438

Reviewed by Dirk Schulze.

The memory leak was caused by SVGFontFaceElement storing its own parent in a RefPtr.

Fixed the bug by storing a raw pointer instead, and clearing the pointer in removedFrom
when the node detached from the document. Also added several sanity check assertions.

* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
(WebCore::SVGFontFaceElement::associatedFontElement):
(WebCore::SVGFontFaceElement::rebuildFontFace):
(WebCore::SVGFontFaceElement::insertedInto):
(WebCore::SVGFontFaceElement::removedFrom):
* svg/SVGFontFaceElement.h:
(SVGFontFaceElement):


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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a typo after r139838.

* dom/NodeRareData.h:
(NodeRareData):


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

Rebaseline several tests on EFL port after r140693.

* platform/efl-wk1/svg/batik/text/xmlSpace-expected.png:
* platform/efl/TestExpectations:
* platform/efl/css2.1/t0505-c16-descendant-01-e-expected.png:
* platform/efl/css2.1/t0505-c16-descendant-01-e-expected.txt:
* platform/efl/editing/selection/extend-by-sentence-001-expected.png:
* platform/efl/editing/selection/extend-by-sentence-001-expected.txt:
* platform/efl/fast/inline/drawStyledEmptyInlines-expected.png:
* platform/efl/fast/inline/drawStyledEmptyInlines-expected.txt:
* platform/efl/fast/inline/drawStyledEmptyInlinesWithWS-expected.png:
* platform/efl/fast/inline/drawStyledEmptyInlinesWithWS-expected.txt:
* platform/efl/fast/text/capitalize-empty-generated-string-expected.png:
* platform/efl/fast/text/capitalize-empty-generated-string-expected.txt:
* platform/efl/fast/text/whitespace/006-expected.png:
* platform/efl/fast/text/whitespace/006-expected.txt:
* platform/efl/fast/text/whitespace/007-expected.png:
* platform/efl/fast/text/whitespace/007-expected.txt:
* platform/efl/svg/batik/text/xmlSpace-expected.png:
* platform/efl/svg/batik/text/xmlSpace-expected.txt:
* platform/efl/svg/carto.net/combobox-expected.png:
* platform/efl/svg/carto.net/combobox-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-3-expected.png:
* platform/efl/tables/mozilla/bugs/bug113235-3-expected.txt:
* platform/efl/tables/mozilla/bugs/bug1188-expected.png:
* platform/efl/tables/mozilla/bugs/bug1188-expected.txt:
* platform/efl/tables/mozilla/bugs/bug1318-expected.png:
* platform/efl/tables/mozilla/bugs/bug1318-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Filters] CSS opacity property clips filter outsets
https://bugs.webkit.org/show_bug.cgi?id=106549

Reviewed by Dirk Schulze.

Source/WebCore:

Expand the transparencyClipBox for filter outsets and pass the filter output rect instead of
the input rect to beginTransparencyLayers for clipping. Details below.

Test: css3/filters/css-opacity-with-drop-shadow.html

* rendering/RenderLayer.cpp:
(WebCore):
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
    Replace filter outset calcuation with a call to expandRectForFilterOutsets.
(WebCore::expandRectForFilterOutsets):
    New method to factor out repeated filter outset calculation code.
(WebCore::transparencyClipBox):
    After expanding the clip rect for descendants and reflection, expand it for filter
    outsets, so they don't get clipped when we begin a transparency layer.
(WebCore::RenderLayer::paintLayerContents):
    Pass paintingInfo.paintDirtyRect instead of localPaintingInfo.paintDirtyRect to
    beginTransparencyLayers for clipping. localPaintingInfo.paintDirtyRect (aka the filter
    input rect) does not contain filter outsets, so they would get clipped. Now, we pass
    paintingInfo.paintDirtyRect (the filter output rect), which includes the filter outsets.
(WebCore::RenderLayer::calculateLayerBounds):
    Replace filter outset calcuation with a call to expandRectForFilterOutsets.
* rendering/RenderLayer.h:
(RenderLayer):

LayoutTests:

Add a reftest to verify that an element's drop shadow filter is not clipped when a CSS
opacity property is not applied.

* css3/filters/css-opacity-with-drop-shadow-expected.html: Added.
* css3/filters/css-opacity-with-drop-shadow.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140561.
http://trac.webkit.org/changeset/140561
https://bugs.webkit.org/show_bug.cgi?id=107556

Suspected to break Android which prevens WebKit roll

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac: Video appears in wrong place during pinch operations
https://bugs.webkit.org/show_bug.cgi?id=107730

Reviewed by Eric Carlson.

Send the correct input and output rects, post translation and scaling,
to the CIContext for drawing.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert RenderFullScreen to use the non-deprecated flexbox
https://bugs.webkit.org/show_bug.cgi?id=107746

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-01-24
Reviewed by Ojan Vafai.

Tests: covered by existing tests in fullscreen/.

* rendering/RenderFullScreen.h:
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::RenderFullScreen):
(RenderFullScreen::willBeDestroyed):
Inherit from RenderFlexibleBox

(createFullScreenStyle):
Use the new-style CSS properties (justify-content, etc)

* css/fullscreen.css:
(video:-webkit-full-screen, audio:-webkit-full-screen):
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
(video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
(video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
* css/mediaControlsBlackBerryFullscreen.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-button-group-container):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-play-button):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-fullscreen-button):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-divider):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container):
(video:-webkit-full-screen::-webkit-media-controls-play-button-container):
(video:-webkit-full-screen::-webkit-media-controls-placeholder):
* css/mediaControlsQtFullscreen.css:
(video::-webkit-media-controls-panel):
(video::-webkit-media-controls-play-button):
Update fullscreen-related CSS to use the new flexbox

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac: Avoid using k32BGRAPixelFormat on certain platforms.
https://bugs.webkit.org/show_bug.cgi?id=107732

Reviewed by Eric Carlson.

Using a AVPlayerItemVideoOutput to generate ARGB pixel buffers is a potential performance
hit, as the AVPlayerItemVideoOutput will send YUV buffers through a VTPixeBufferTransferSession
to convert them to ARGB regardless of whether or not a given buffer will be used. Instead,
ask the AVPlayerItemVideoOutput for pixel buffers in the decoder's native pixel format and use
the VTPixelBufferTransferSession to convert to ARGB only those pixel buffers which were actually
requested.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Ask for the decoder's native
    pixel format.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Lazily create a VTPixelTransferSession
    and convert output pixel buffers to k32BGRAPixelFormat.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement :past pseudo class for the WebVTT ::cue pseudo element
https://bugs.webkit.org/show_bug.cgi?id=105482

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-24
Reviewed by Eric Carlson.

Source/WebCore:

It is good to have a designated pseudo class for this, though same could
be achieved by using a combination of ::cue and ::cue(:future).
Tests also check that nested timestamps work properly.

Test: media/track/track-css-matching-timestamps.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

LayoutTests:

* media/track/captions-webvtt/styling-timestamps.vtt: Added.
* media/track/track-css-matching-timestamps-expected.txt: Added.
* media/track/track-css-matching-timestamps.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Fix crash in SpellingHandler
https://bugs.webkit.org/show_bug.cgi?id=107842

Reviewed by Rob Buis.

If we have an empty range or one with all spaces, we can simply return 0 instead of
still creating a range. Putting in a null check after trimming to catch this case
which was causing the crash in some DRT tests.

Internally reviewed by Mike Fenton.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: 'console.debug' should generate messages at DebugMessageLevel.
https://bugs.webkit.org/show_bug.cgi?id=107816

Reviewed by Pavel Feldman.

Source/WebCore:

'console.debug' is currently aliased to 'console.log'. Since we now
render debug-level messages differently to log messages, we should use
the proper message level for 'console.debug'.

* page/Console.cpp:
(WebCore::Console::debug):
    Replace the alias to 'console.log' with message creation at
    DebugMessageLevel.

LayoutTests:

* inspector/console/console-tests-expected.txt:
* inspector/extensions/extensions-console-expected.txt:
    Rebaseline this test with the updated message level.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove document as a parameter from a few internals methods
https://bugs.webkit.org/show_bug.cgi?id=107757

Reviewed by Hajime Morita.

Remove document as a parameter since there's already one associated with internals.

Source/WebCore:

No new tests, this refactors some testing code and is covered by
exisiting tests.

* testing/Internals.cpp:
(WebCore::Internals::isPreloaded):
(WebCore::Internals::createContentElement):
(WebCore::Internals::absoluteCaretBounds):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

* editing/input/editable-container-with-word-wrap-normal.html:
* editing/selection/caret-alignment-for-vertical-text.html:
* editing/selection/caret-at-end-of-text-line-followed-by-block-in-vertical-mode.html:
* editing/selection/caret-in-div-containing-br-in-vertical-mode.html:
* editing/selection/caret-in-empty-inline-1.html:
* editing/selection/caret-in-empty-inline-2.html:
* editing/selection/internal-caret-rect.html:
* fast/dom/resources/shadow-test-driver.js:
(createContentWithSelect):
(createContentWithText):
(appendShadow):
(appendShadowDeep):
* fast/dom/shadow/content-element-includer.html:
* fast/dom/shadow/content-element-renderers.html:
* fast/dom/shadow/content-selector-query.html:
* fast/dom/shadow/create-content-element.html:
* fast/dom/shadow/shadow-contents-fallback-dynamic.html:
* fast/dom/shadow/shadow-contents-fallback.html:
* fast/dom/shadow/shadow-contents-select.html:
* fast/preloader/scan-body-from-head-import.html:
* http/tests/loading/preload-append-scan.php:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WebKeyValueStorageManager to WebProcess/Storage.

Rubber-stamped by Sam Weinig.

Try this again, with DerivedSources.make correctly updated this time.

* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp.
* WebProcess/Storage/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h.
* WebProcess/Storage/WebKeyValueStorageManager.messages.in: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add stubbed out StorageNamespaceProxy class
https://bugs.webkit.org/show_bug.cgi?id=107846

Reviewed by Sam Weinig.

Source/WebCore:

Make StorageNamespace.h and StorageArea.h private headers.

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Add new class.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Storage/StorageNamespaceProxy.cpp: Added.
* WebProcess/Storage/StorageNamespaceProxy.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow some plugin snapshot UI content to come from Injected Bundle
https://bugs.webkit.org/show_bug.cgi?id=107852

Reviewed by Anders Carlsson.

Source/WebKit2:

Hook up three new methods: plugInStartLabelTitle, plugInStartLabelSubtitle and
plugInExtraStyleSheet to allow some custom styling and content to come
from the InjectedBundle.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Callbacks added to
WKBundlePageUIClient structure.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Stub implementations
of the three new methods.
(WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
(WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
(WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
(InjectedBundlePageUIClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Call into the injected bundle
for each of these methods.
(WebKit::WebChromeClient::plugInStartLabelTitle):
(WebKit::WebChromeClient::plugInStartLabelSubtitle):
(WebKit::WebChromeClient::plugInExtraStyleSheet):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient): Declare the virtual methods in the Chrome
Client so that they can accessed from WebCore eventually.

Tools:

Null implementations of plugInStartLabelTitle, plugInStartLabelSubtitle and
plugInExtraStyleSheet.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):

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

Protect Lion from the absence of VideoToolbox.h by wrapping in #if
guards.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test fast/dom/HTMLTemplateElement/ownerDocument-adoptNode.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=106612

Reviewed by Eric Seidel.

* fast/dom/HTMLTemplateElement/ownerDocument-adoptNode.html: Wait for
the iframe's onload event before running the test.
* platform/chromium/TestExpectations: Remove flaky expectation.
* platform/efl/TestExpectations: ditto
* platform/gtk/TestExpectations: ditto


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