Leak in WebSocketChannel with workers/worker-reload.html (part 2)
https://bugs.webkit.org/show_bug.cgi?id=83749

Reviewed by David Levin.

Source/WebCore:

Second attempt to remove leaks around WorkerThreadableWebSocketChannel.

No new tests, as this patch does not impose any functional change.

* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::failedWebSocketChannelCreation):
(WebCore::ThreadableWebSocketChannelClientWrapper::setFailedWebSocketChannelCreation):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
Add a boolean flag indicating whether Bridge::initialize() has exited without receiving
a pointer to the peer object.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::performTask):
Kick mainThreadDestroy() to delete the peer if the bridge has failed to receive
a pointer to the peer (waitForMethodCompletion() exited due to message queue's
termination).
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WorkerThreadableWebSocketChannel):
Make WorkerContextDidInitializeTask an inner class of WorkerThreadableWebSocketChannel
so it can refer WorkerThreadableWebSocketChannel's static member function (mainThreadDestroy()).

Source/WebKit/chromium:

* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::postTaskForModeToWorkerContext):
Correctly propagate the return value of postTaskForModeToWorkerContext().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cairo] Separate image encoding from dataURL construction
https://bugs.webkit.org/show_bug.cgi?id=83975

Reviewed by Martin Robinson.

Remove the implicit assumption that a dataURL is the only desired output format
of the image encoding phase.

No new tests. Covered by existing canvas toDataURL tests.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::writeFunction): Rename closure to output.
(WebCore::encodeImage): Output the encoded image to the provided Vector<char>.
PNG format is only supported per the Cairo encoding MIMETypeRegistry.
(WebCore):
(WebCore::ImageBuffer::toDataURL): Refactor to use encodeImage().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Capture CSS parser context
https://bugs.webkit.org/show_bug.cgi?id=83998

Source/WebCore: 

Reviewed by Andreas Kling.

Currently the CSS parser calls to the Document and StyleSheetInternal objects to get settings, base URL etc.
The required information should be passed in on parser construction instead. The parser should not need to
know about the document at all.
        
The patch adds CSSParserContext struct that captures the parsing context. StyleSheetInternal saves the
parsing context and reuses it for any further parsing.
        
If the same stylesheet source is parsed with an identical context then the resulting stylesheet structure will
be identical. This will allow sharing parsed stylesheets in the future.

* css/CSSGrammar.y:
* css/CSSImportRule.cpp:
(WebCore::StyleRuleImport::setCSSStyleSheet):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::insertRule):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::setSelectorText):
* css/CSSParser.cpp:
(WebCore):
(WebCore::strictCSSParserContext):
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseSelector):
(WebCore::CSSParser::completeURL):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseAttr):
(WebCore::CSSParser::parseFillImage):
(WebCore::CSSParser::parseFontFaceSrcURI):
(WebCore::CSSParser::parseFontFaceSrc):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::parseCustomFilter):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::cssRegionsEnabled):
(WebCore::CSSParser::parseFlowThread):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createKeyframe):
* css/CSSParser.h:
(CSSParser):
(WebCore::CSSParser::inStrictMode):
(WebCore::CSSParser::inQuirksMode):
(WebCore::CSSParser::validUnit):
* css/CSSParserMode.h:
(WebCore):
(CSSParserContext):
* css/CSSRule.h:
(WebCore::CSSRule::parserContext):
(CSSRule):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
* css/CSSStyleSheet.cpp:
(WebCore::StyleSheetInternal::StyleSheetInternal):
(WebCore::StyleSheetInternal::parseString):
(WebCore::StyleSheetInternal::parseStringAtLine):
(WebCore):
(WebCore::StyleSheetInternal::updateBaseURL):
(WebCore::StyleSheetInternal::completeURL):
(WebCore::CSSStyleSheet::insertRule):
* css/CSSStyleSheet.h:
(StyleSheetInternal):
(WebCore::StyleSheetInternal::parserContext):
(WebCore::StyleSheetInternal::charset):
(WebCore::StyleSheetInternal::setFinalURL):
(WebCore::StyleSheetInternal::baseURL):
* css/CSSValuePool.cpp:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::parseDeclaration):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::insertRule):
* dom/Document.cpp:
(WebCore::Document::webkitGetFlowByName):
(WebCore::Document::pageUserSheet):
(WebCore::Document::pageGroupUserSheets):
* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector):
* dom/Node.cpp:
(WebCore::Node::querySelector):
(WebCore::Node::querySelectorAll):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::parseStyleSheet):
* dom/StyleElement.cpp:
(WebCore::StyleElement::createSheet):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* html/shadow/ContentSelectorQuery.cpp:
(WebCore::ContentSelectorQuery::ContentSelectorQuery):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyleSheet::reparseStyleSheet):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):

LayoutTests: 

Reviewed by Andreas Kling.
        
Modify the tests so that they don't expect settings changes to apply to already existing stylesheets.

* css3/filters/script-tests/custom-filter-property-parsing.js:
* fast/regions/script-tests/css-regions-disabled.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] LayerRendererChromium shouldn't know anything about CCLayerImpl
https://bugs.webkit.org/show_bug.cgi?id=83415

Patch by James Robinson <jamesr@chromium.org> on 2012-04-15
Reviewed by Adrienne Walker.

Source/WebCore:

This removes all knowledge of CCLayerImpl from LayerRendererChromium. The most significant move code-wise is
moving the HUD up to live on CCLayerTreeHostImpl, since it's aware of the layer tree. This involves two changes.
First, CCHeadsUpDisplay is in charge of populating a ManagedTexture but the actual drawing code now lives in
LayerRendererChromium. Second, since we don't recreate CCLayerTreeHostImpl on a lost context, the font atlas
ownership is much simpler. Now a CCFontAtlas is created on the main thread if needed and passed asynchronously
to the CCHeadsUpDisplay which takes ownership of the atlas.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::initialize):
(WebCore::LayerRendererChromium::~LayerRendererChromium):
(WebCore::LayerRendererChromium::beginDrawingFrame):
(WebCore::LayerRendererChromium::drawHeadsUpDisplay):
(WebCore):
(WebCore::LayerRendererChromium::finishDrawingFrame):
(WebCore::LayerRendererChromium::swapBuffers):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromiumClient):
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay):
(WebCore::CCHeadsUpDisplay::setFontAtlas):
(WebCore):
(WebCore::CCHeadsUpDisplay::enabled):
(WebCore::CCHeadsUpDisplay::showPlatformLayerTree):
(WebCore::CCHeadsUpDisplay::draw):
(WebCore::CCHeadsUpDisplay::drawHudContents):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
(WebCore):
(WebCore::CCHeadsUpDisplay::create):
(CCHeadsUpDisplay):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::canDraw):
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::prepareToDraw):
(WebCore::CCLayerTreeHostImpl::drawLayers):
(WebCore::CCLayerTreeHostImpl::swapBuffers):
(WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
(WebCore::CCLayerTreeHostImpl::setFullRootLayerDamage):
(WebCore::CCLayerTreeHostImpl::layerTreeAsText):
(WebCore):
(WebCore::CCLayerTreeHostImpl::setFontAtlas):
(WebCore::CCLayerTreeHostImpl::dumpRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::rootLayer):
* platform/graphics/chromium/cc/CCProxy.h:
(WebCore):
(CCProxy):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::initializeLayerRenderer):
(WebCore::CCSingleThreadProxy::recreateContext):
(WebCore::CCSingleThreadProxy::setFontAtlas):
(WebCore):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
(WebCore::CCThreadProxy::setFontAtlas):
(WebCore):
(WebCore::CCThreadProxy::setFontAtlasOnImplThread):
(WebCore::CCThreadProxy::recreateContextOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):

Source/WebKit/chromium:

Add an explicit rootLayer getter to the test implementation of LayerRendererChromium since there isn't one on
the base class any more.

* tests/LayerRendererChromiumTest.cpp:
(FakeLayerRendererChromiumClient::rootLayer):
(FakeLayerRendererChromiumClient):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed rebaselines for various compositing tests.

* platform/chromium-linux-x86/compositing/reflections/animation-inside-reflection-expected.png: Removed.
* platform/chromium-linux-x86/compositing/reflections/nested-reflection-animated-expected.png: Removed.
* platform/chromium-linux/compositing/geometry/fixed-position-composited-page-scale-down-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-position-composited-page-scale-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png:
* platform/chromium-linux/compositing/reflections/animation-inside-reflection-expected.png:
* platform/chromium-linux/compositing/reflections/nested-reflection-animated-expected.png:
* platform/chromium-linux/platform/chromium/compositing/filters/background-filter-blur-outsets-expected.png: Added.
* platform/chromium-linux/platform/chromium/compositing/filters/background-filter-blur-outsets-expected.txt: Added.
* platform/chromium-mac-leopard/compositing/reflections/animation-inside-reflection-expected.png:
* platform/chromium-mac-leopard/compositing/reflections/nested-reflection-animated-expected.png:
* platform/chromium-mac-snowleopard/compositing/geometry/fixed-position-composited-page-scale-down-expected.png:
* platform/chromium-mac-snowleopard/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.png:
* platform/chromium-mac-snowleopard/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png:
* platform/chromium-mac-snowleopard/compositing/reflections/animation-inside-reflection-expected.png:
* platform/chromium-mac-snowleopard/compositing/reflections/animation-inside-reflection-expected.txt: Added.
* platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-animated-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-composited-page-scale-down-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-composited-page-scale-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png:
* platform/chromium-mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png:
* platform/chromium-mac/compositing/reflections/animation-inside-reflection-expected.png:
* platform/chromium-mac/compositing/reflections/nested-reflection-animated-expected.png:
* platform/chromium-mac/compositing/repaint/newly-composited-repaint-rect-expected.png: Copied from LayoutTests/platform/chromium-mac-snowleopard/compositing/geometry/fixed-position-composited-page-scale-down-expected.png.
* platform/chromium-win-vista/compositing/reflections/animation-inside-reflection-expected.png: Removed.
* platform/chromium-win-vista/compositing/reflections/nested-reflection-animated-expected.png: Removed.
* platform/chromium-win-xp/compositing/reflections/animation-inside-reflection-expected.txt: Removed.
* platform/chromium-win-xp/compositing/reflections/nested-reflection-animated-expected.png: Removed.
* platform/chromium-win-xp/compositing/reflections/nested-reflection-animated-expected.txt: Added.
* platform/chromium-win/compositing/geometry/fixed-position-composited-page-scale-down-expected.png:
* platform/chromium-win/compositing/geometry/fixed-position-composited-page-scale-expected.png:
* platform/chromium-win/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.png:
* platform/chromium-win/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.png:
* platform/chromium-win/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png:
* platform/chromium-win/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png:
* platform/chromium-win/compositing/reflections/animation-inside-reflection-expected.png:
* platform/chromium-win/compositing/reflections/nested-reflection-animated-expected.png:
* platform/chromium-win/compositing/repaint/newly-composited-repaint-rect-expected.png: Copied from LayoutTests/platform/chromium-win/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introducing DictationCommand.
https://bugs.webkit.org/show_bug.cgi?id=83549

Reviewed by Hajime Morita.

No new tests. This patch doesn't introduce any change of new functionality. It prepares for
additional changes which will inlude tests.

On OS X, alternative dictation results need to be stored as document markers. This patch introduces
following changes to achieve this:
1. Added DictationMarkDetails to store non-string type maker detail.
2. Introduce DictationCommand, which is similor to TypingCommand, but allows inserting text with
  attached markers.
3. Added Editor::insertDictatedText as interaface to WebKit and WebKit2.
4. Added struct DictationAlternative to pass dictation related info from WebKit to WebCore.

Several fragments of code in TypingCommand can be also used by DictationCommand. So this patch
introduced a new class, TextInsertionBaseCommand. It's a subclass of CompositeEditCommmand, and
base class of both TypingCommand and DictationCommand.

This patch also extends InsertTextCommand class. Its constructor will take an TextInsertionMarkerSupplier
object. After text is inserted to a node, InsertTextCommand would give marker supplier a chance to
add document markers to the inserted text.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::eventTargetNodeForDocument): Moved this function from EventHandler so that it can be used
  by AlternativeTextController.
(WebCore):
* dom/Document.h:
(WebCore):
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarker::DocumentMarker): New constructor that takes a pointer to DocumentMarkerDetails object.
(WebCore):
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::AllMarkers::AllMarkers):
(DocumentMarker):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
(WebCore):
* dom/DocumentMarkerController.h:
(DocumentMarkerController):
* dom/TextEvent.cpp:
(WebCore::TextEvent::createForDictation):
(WebCore):
(WebCore::TextEvent::TextEvent):
* dom/TextEvent.h: Added member variable for dictation alternatives.
(TextEvent):
(WebCore::TextEvent::isDictation):
(WebCore::TextEvent::dictationAlternatives):
* dom/TextEventInputType.h:
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::insertDictatedText): Used by Editor::insertDictatedText().
(WebCore):
* editing/AlternativeTextController.h:
(WebCore):
(DictationMarkerDetails):
(WebCore::DictationMarkerDetails::create):
(WebCore::DictationMarkerDetails::originalText):
(WebCore::DictationMarkerDetails::dictationContext):
(WebCore::DictationMarkerDetails::DictationMarkerDetails):
(AlternativeTextController):
* editing/CompositeEditCommand.h:
(WebCore::CompositeEditCommand::isDictationCommand):
* editing/DictationAlternative.cpp: Added.
(WebCore):
(WebCore::DictationAlternative::DictationAlternative):
* editing/DictationAlternative.h: Added. Data structure for passing dictation related data from WebKit to WebCore.
(DictationAlternative):
(WebCore):
* editing/DictationCommand.cpp: Added.
(WebCore):
(DictationCommandLineOperation):
(WebCore::DictationCommandLineOperation::DictationCommandLineOperation):
(WebCore::DictationCommandLineOperation::operator()):
(DictationMarkerSupplier):
(WebCore::DictationMarkerSupplier::create):
(WebCore::DictationMarkerSupplier::addMarkersToTextNode):
(WebCore::DictationMarkerSupplier::DictationMarkerSupplier):
(WebCore::DictationCommand::DictationCommand):
(WebCore::DictationCommand::insertText):
(WebCore::DictationCommand::doApply):
(WebCore::DictationCommand::insertTextRunWithoutNewlines):
(WebCore::DictationCommand::insertParagraphSeparator):
(WebCore::DictationCommand::collectDictationAlternativesInRange):
* editing/DictationCommand.h: Added.
(WebCore):
(DictationCommand):
(WebCore::DictationCommand::isDictationCommand):
(WebCore::DictationCommand::create):
* editing/EditingAllInOne.cpp:
* editing/Editor.cpp:
(WebCore::Editor::insertDictatedText): Main interface that allows WebKit passes in text with attached dictation information.
(WebCore):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
* editing/Editor.h:
(Editor):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::InsertTextCommand):
(WebCore):
(WebCore::InsertTextCommand::doApply):
* editing/InsertTextCommand.h:
(WebCore):
(TextInsertionMarkerSupplier): Interface to allow caller of InsertTextCommand to add document markers to inserted text.
(WebCore::TextInsertionMarkerSupplier::~TextInsertionMarkerSupplier):
(WebCore::TextInsertionMarkerSupplier::TextInsertionMarkerSupplier):
(WebCore::InsertTextCommand::createWithMarkerSupplier):
(InsertTextCommand):
* editing/TextInsertionBaseCommand.cpp: Added. This class contains functions shared by TypingCommand and DictationCommand.
(WebCore):
(WebCore::TextInsertionBaseCommand::TextInsertionBaseCommand):
(WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
(WebCore::dispatchBeforeTextInsertedEvent):
(WebCore::canAppendNewLineFeedToSelection):
* editing/TextInsertionBaseCommand.h: Added.
(WebCore):
(TextInsertionBaseCommand):
(WebCore::TextInsertionBaseCommand::~TextInsertionBaseCommand):
(WebCore::forEachLineInString):
* editing/TypingCommand.cpp:
(TypingCommandLineOperation):
(WebCore::TypingCommandLineOperation::TypingCommandLineOperation):
(WebCore::TypingCommandLineOperation::operator()):
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparator):
* editing/TypingCommand.h:
* page/EventHandler.cpp:
* rendering/InlineTextBox.cpp:
(WebCore::lineStyleForMarkerType):
(WebCore::InlineTextBox::paintDocumentMarker): Renamed existing function to reflect new funcationality.
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
(InlineTextBox):
* testing/Internals.cpp:
(WebCore::markerTypesFrom):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Align JSC/V8 bindings canvas.toDataURL() code flows
https://bugs.webkit.org/show_bug.cgi?id=84003

Reviewed by Eric Seidel.

Align JSC/V8 bindings canvas.toDataURL() code flow so that the binding
code implementations read alike.

No new tests. Covered by existing cnavas toDataURL tests.

* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::toDataURL):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed attempt to chromium-win build fix.

* editing/DictationAlternative.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce MenuItemID to autofill popup
https://bugs.webkit.org/show_bug.cgi?id=83777

Introducing MenuItemIDs because we want to add multiple separators and
need to identify non-autofill menu items without resorting to the separator position.

Reviewed by Kent Tamura.

* public/WebAutofillClient.h:
(WebKit::WebAutofillClient::didAcceptAutofillSuggestion): Changed uniqueID to itemID because they aren't unique.
(WebKit::WebAutofillClient::didSelectAutofillSuggestion):
* public/WebView.h:
(WebView):
* src/AutofillPopupMenuClient.cpp:
(WebKit::AutofillPopupMenuClient::AutofillPopupMenuClient):
(WebKit::AutofillPopupMenuClient::getSuggestionsCount):
(WebKit::AutofillPopupMenuClient::getSuggestion):
(WebKit::AutofillPopupMenuClient::getLabel):
(WebKit::AutofillPopupMenuClient::getIcon):
(WebKit::AutofillPopupMenuClient::removeSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::canRemoveSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::valueChanged):
(WebKit::AutofillPopupMenuClient::selectionChanged):
(WebKit::AutofillPopupMenuClient::itemIsSeparator):
(WebKit::AutofillPopupMenuClient::itemIsWarning):
(WebKit::AutofillPopupMenuClient::initialize):
(WebKit::AutofillPopupMenuClient::setSuggestions):
* src/AutofillPopupMenuClient.h:  Removed m_separatorIndex because now we use itemID to identify separators.
Added m_useLegacyBehavior which is true when it is initialized with a valid separator index. This is to keep
the autofill working even when the chromium side hasn't been updated yet.
(AutofillPopupMenuClient):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::applyAutofillSuggestions):
* src/WebViewImpl.h:
(WebViewImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore::weekDayShortLabels() for ICU always returns the fallback labels
https://bugs.webkit.org/show_bug.cgi?id=83991

Reviewed by Hajime Morita.

We need to specfiy 1-based index to udat_getSymbols() with
UDAT_SHORT_WEEKDAYS. Also, udat_countSymbols() with UDAT_SHORT_WEEKDAYS
returns 8.

No new tests because this behavior depends on locale setting.

* platform/text/LocalizedCalendarICU.cpp:
(WebCore::createLabelVector): Add startIndex argument.
(WebCore::createMonthLabels):
Pass UDAT_JANUARRY(0) as startIndex to createLabelVector().
(WebCore::createWeekDayShortLabels):
Pass UDAT_SUNDAY(1) as startIndex to createLabelVector().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed morning gardening.

* platform/qt-4.8/fast/dom/Window/window-properties-expected.txt: Updated after r114150.
* platform/qt-5.0-wk2/fast/dom/Window/window-properties-expected.txt: Updated after r114150.
* platform/qt-5.0-wk2/fast/dom/prototype-inheritance-2-expected.txt: Updated after r114200.
* platform/qt-5.0/fast/dom/Window/window-properties-expected.txt: Updated after r114150.
* platform/qt-5.0/fast/dom/prototype-inheritance-2-expected.txt: Updated after r114200.
* platform/qt/Skipped: Skip a test after r114150, because of missing layoutTestController.setBackingScaleFactor().
* platform/qt/fast/dom/prototype-inheritance-2-expected.txt: Updated after r114150.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Use GRefPtr to delete the default web context in WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=83752

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make NullPtr.h compile with clang -std=c++11 and libstdc++4.2
https://bugs.webkit.org/show_bug.cgi?id=83999

Reviewed by Sam Weinig.

Before this patch, NullPtr.h assumed that a working |nullptr| implied
a working |std::nullptr_t| as well. With clang and libstdc++4.2, this
is not true.

I tested (-stdlib=libc++, -stdlib=libstdc++) x (-std=c++11, -std=c++03)
with clang.

* wtf/NullPtr.h:
(std):


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

* Scripts/run-gtk-tests:
(TestRunner): Skip /webkit/atk/textChangedNotifications.

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

* platform/gtk/test_expectations.txt: Skip svg failures, unskip
ietestcenter for rebaseline and unflag a flaky media/track test.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix signed/unsigned mismatch warning for BlackBerry debug builds.
https://bugs.webkit.org/show_bug.cgi?id=80790

Reviewed by Rob Buis.

* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::removeCookieAtIndex):


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

* WebCore.exp.in:
* editing/DictationAlternative.cpp:
(WebCore::DictationAlternative::DictationAlternative):
* editing/DictationAlternative.h:
(DictationAlternative):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK baselines for tests added in r114162.

* platform/gtk/ietestcenter/css3/grid/display-grid-001-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/display-grid-002-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-column-001-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-column-002-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-column-003-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-columns-001-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-items-001-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-items-002-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-items-003-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-items-004-expected.txt: Added.
* platform/gtk/ietestcenter/css3/grid/grid-items-005-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt]REGRESSION(r114217): It broke fast/repaint/line-flow-with-floats-in-regions.html
https://bugs.webkit.org/show_bug.cgi?id=84013

Unreviewed gardening, skip a failing test to paint the bot green. (Less tests, less problem.)

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline for date-appearance.html.

* platform/chromium-linux/fast/forms/date/date-appearance-expected.png:
* platform/chromium-linux/fast/forms/date/date-appearance-expected.txt:
* platform/chromium-mac-snowleopard/fast/forms/date/date-appearance-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/forms/date/date-appearance-expected.txt: Removed.
* platform/chromium-mac/fast/forms/date/date-appearance-expected.png:
* platform/chromium-mac/fast/forms/date/date-appearance-expected.txt:
* platform/chromium-win/fast/forms/date/date-appearance-expected.png:
* platform/chromium-win/fast/forms/date/date-appearance-expected.txt:

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