[BlackBerry] LayerTexture: check if the graphics context is NULL
https://bugs.webkit.org/show_bug.cgi?id=114674

Patch by Anthony Scian <ascian@blackberry.com> on 2013-04-16
Reviewed by Rob Buis.

Internal PR: 256522

* platform/graphics/blackberry/LayerTexture.cpp:
(WebCore::LayerTexture::setContentsToColor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Remove the cache of validated programs
https://bugs.webkit.org/show_bug.cgi?id=112844

Reviewed by Dean Jackson.

Since we're caching CustomFilterProgram(s) now, we don't need another cache for
CustomFilterValidatedProgram(s). With this patch, CustomFilterProgram stores a reference
to a lazily created CustomFilterValidatedProgram, and CustomFilterGlobalContext no longer
has a validated program cache.

Also, this patch removes the CustomFilterValidatedProgram's stored reference to
CustomFilterGlobalContext. The removal of the validated program cache would cause
this reference to become weak. Validated programs only needed to keep the global context
reference in order to create a CustomFilterCompiledProgram. In this patch, we create
CustomFilterCompiledProgram(s) in FECustomFilter instead of in CustomFilterValidatedProgram,
so validated programs don't need to store the global context reference anymore.

No new tests. Just Refactoring.

* platform/graphics/filters/CustomFilterCompiledProgram.cpp:
(WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
* platform/graphics/filters/CustomFilterGlobalContext.cpp:
(WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
* platform/graphics/filters/CustomFilterGlobalContext.h:
(CustomFilterGlobalContext):
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::validatedProgram):
(WebCore::CustomFilterProgram::setValidatedProgram):
* platform/graphics/filters/CustomFilterProgram.h:
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
(WebCore::CustomFilterValidatedProgram::compiledProgram):
(WebCore::CustomFilterValidatedProgram::setCompiledProgram):
(WebCore::CustomFilterValidatedProgram::~CustomFilterValidatedProgram):
* platform/graphics/filters/CustomFilterValidatedProgram.h:
(CustomFilterValidatedProgram):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::prepareForDrawing):
* rendering/FilterEffectRenderer.cpp:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::computeFilterOperations):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Initialize logging channels for web processes
https://bugs.webkit.org/show_bug.cgi?id=114621

Reviewed by Sam Weinig.

Use InitializeWebKit2 for initializing the web and plugin processes.
It handles initializing the logging channels and it's better to have
shared core for this. For the plugin process now we always create
a RunLoop object which is not necessary with the -scanPlugin argument
but it shouldn't be a problem.

* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::PluginProcessMain):
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::PluginProcessMainUnix):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderView should bail out of paintBoxDecorations() when painting with a different renderer
https://bugs.webkit.org/show_bug.cgi?id=114665
<rdar://problem/13434884>

Reviewed by Simon Fraser.

* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations): Add a check to see if we should paint within the renderer.
This check exists in all other implementations of paintBoxDecorations(), and correctly avoids painting the
decorations if the root provided is not the RenderView.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: aria-valuetext is not exposed on OS X.
https://bugs.webkit.org/show_bug.cgi?id=114628

Reviewed by Tim Horton.

Source/WebCore: 

aria-valuetext is only being exposed on ARIA controls. That's because there were
checks in place so that ONLY ARIA defined controls would return anything related to valuetext.
We should allow this to work on native controls as well.

Test: platform/mac/accessibility/aria-valuetext-on-native-slider.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::valueDescription):
(WebCore):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
* accessibility/AccessibilityNodeObject.h:
(AccessibilityNodeObject):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isRangeControl):
     Rename isARIAControl to isRangeControl and make it apply to all elements.
* accessibility/AccessibilityObject.h:

LayoutTests: 

* platform/mac/accessibility/aria-valuetext-on-native-slider-expected.txt: Added.
* platform/mac/accessibility/aria-valuetext-on-native-slider.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Float at exact multiple of line-height affects too many lines
https://bugs.webkit.org/show_bug.cgi?id=112744

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/block/float/float-with-fractional-height-vertical-lr.html
       fast/block/float/float-with-fractional-height.html

When adding floats to the interval tree used for testing floats' overlap with lineboxes
truncate the dimensions of the float rather than rounding them. This matches the
treatment of linebox dimensions so ensures the test for overlap is comparing like
with like.

* rendering/RenderBlock.cpp:
(WebCore::::collectIfNeeded):
(WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
(WebCore::::string):

LayoutTests:

* fast/block/float/float-with-fractional-height-expected.html: Added.
* fast/block/float/float-with-fractional-height-vertical-lr-expected.html: Added.
* fast/block/float/float-with-fractional-height-vertical-lr.html: Added.
* fast/block/float/float-with-fractional-height.html: Added.
* platform/mac/fast/backgrounds/background-position-parsing-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create full rects for the inspector and inspected views when
adjusting to an inspected view frame change.

This ensures switching dock sides restores the inspected view
and inspector to fill the parent's bounds.

https://webkit.org/b/114666
rdar://problem/13660796

Reviewed by Joseph Pecoraro.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r146025): WebKit applications can't apply underline or strike through
https://bugs.webkit.org/show_bug.cgi?id=114662

Reviewed by Enrica Casucci.

Use -webkit- prefixes to apply underline. There should be no further compatibility issues
since -khtml- was used only internally to pass the information down to WebCore.

Unfortunately, we can't test this code like any other font panel bug.

In the long run, we need to add some abstraction layer around font panel to make this testable
or else we'll keep regressing this feature.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _styleFromFontAttributes:]):
(-[WebHTMLView _styleForAttributeChange:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Add API to retrieve a snapshot from a webview
https://bugs.webkit.org/show_bug.cgi?id=98270

Reviewed by Anders Carlsson.

This adds the GTK+ API necessary to retrieve a snapshot from a
webview asynchronously. The API uses the injected bundle
internally to get the snapshot from the WebProcess.

* UIProcess/API/gtk/WebKitError.cpp:
(webkit_snapshot_error_quark): Add snapshot API related error
quark.
* UIProcess/API/gtk/WebKitError.h: Add snapshot error handling.
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle): Handle the new
"DidGetSnapshot" message.
* UIProcess/API/gtk/WebKitPrivate.h: Add SnapshotRegion enum.
* UIProcess/API/gtk/WebKitWebView.cpp:
(_WebKitWebViewPrivate): Add a map for the snapshot results.
(GetSnapshotAsyncData):
(webKitWebViewDidReceiveSnapshot):
(webKitSnapshotRegionToSnapshotRegion): Helper method for casting
the region option enumeration.
(generateSnapshotCallbackID): Method to generate unique callback
ids.
(webkit_web_view_get_snapshot):
(webkit_web_view_get_snapshot_finish): New snapshotting API.
* UIProcess/API/gtk/WebKitWebView.h: Ditto.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Add the private method
to handle a received snapshot.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API
bits.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(cairoSurfacesEqual): Add helper to compare cairo_surface_t
structs.
(testWebViewSnapshot): New test.
(beforeAll): Add the new test.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::selectAll): Add method to help test snapshots
including selection.
* UIProcess/API/gtk/tests/WebViewTest.h: Ditto
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(didReceiveMessageToPage): Ditto.
(webkitWebExtensionCreate): Register method above.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageDidReceiveMessage): Add this method. It
handles the new message "GetSnapshot".
* WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
Add method above.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The list of contributors in committers.py should be a separate JSON
https://bugs.webkit.org/show_bug.cgi?id=114673

Reviewed by Anders Carlsson.

Tools: 

Added webkitpy/common/config/contributors.json, made CommitterList load it.

* EWSTools/start-queue-mac.sh:
* EWSTools/start-queue.sh:
* Scripts/webkitpy/common/checkout/commitinfo.py:
(CommitInfo.committer):
* Scripts/webkitpy/common/config/contributors.json: Added.
* Scripts/webkitpy/common/config/committers.py:
(Reviewer.__init__):
(CommitterList.__init__):
(CommitterList.load_json): Added.
(CommitterList.load_json.emails):
(CommitterList.load_json.nicks):
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
(MockCommitInfo.author):

Websites/bugs.webkit.org: 

Updated the Bugzilla autocompletion code to use contributors.json.
Basically, this removes a large chunk of this JavaScript file.

* committers-autocomplete.js:
(WebKitCommitters):

Websites/webkit.org: 

Updated the website to refer to contributors.json instead of committers.py.

* coding/commit-review-policy.html:


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

* committers-autocomplete.js:
(WebKitCommitters):


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

* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorCommon.props:
Add correct link library to avoid mixture of ICU 4.0 and 4.6
syumbol use.

../WebKit/win: [Windows] Unreviewed build correction.

* WebKit.vcproj/WebKitExportGeneratorCommon.vsprops: Add correct
ICU link library to avoid mixture of ICU 4.0 and 4.6 symbols
during link.



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

* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props:
Specify proper link library to avoid mixture of ICU 4.0 and 4.6
symbols during link.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused AlternativeTextClient::dismissDictationAlternativeUI
https://bugs.webkit.org/show_bug.cgi?id=114598

Reviewed by Ryosuke Niwa.

Source/WebCore:

Removing dead code.

* WebCore.exp.in:
* editing/mac/AlternativeTextUIController.h: Made dismissAlternatives() private.
* page/AlternativeTextClient.h:

Source/WebKit/mac:

* WebCoreSupport/WebAlternativeTextClient.h:
* WebCoreSupport/WebAlternativeTextClient.mm:
* WebView/WebView.mm:
* WebView/WebViewInternal.h:

Source/WebKit2:

* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dictationAlternatives):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
* WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flaky Test: http/tests/security/cookies/third-party-cookie-blocking-user-action.html
https://bugs.webkit.org/show_bug.cgi?id=114511

Clear the test cookie at the beginning of the test to avoid failing if
the cookie is still around from a previous test.

Reviewed by Alexey Proskuryakov.

* http/tests/security/cookies/third-party-cookie-blocking-user-action.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove even yet still more traces of v8
https://bugs.webkit.org/show_bug.cgi?id=114693

Reviewed by Anders Carlsson.

../WebCore: 

No behavior change.

* bindings/generic/ActiveDOMCallback.h:
(WebCore::ActiveDOMCallback::isScriptControllerTerminating): Remove a V8-specific
method and the comment referencing it.
* bindings/generic/ActiveDOMCallback.cpp:
(WebCore::ActiveDOMCallback::isScriptControllerTerminating): ditto
* fileapi/File.cpp:
(WebCore::File::File): Remove a comment referencing v8
* inspector/InjectedScriptExterns.js: ditto

../WebKit2: 

* Scripts/generate-forwarding-headers.pl: Remove v8 from list of platforms.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Disable WinEWS tests, simply not enough bots.

All bots are running consistently now but the queue still keeps growing.
Until we get more bots or make the tests faster, it doesn't seem wise to keep running tests.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unneeded headers from ScriptExecutionContext.h
https://bugs.webkit.org/show_bug.cgi?id=114631

Reviewed by Alexey Proskuryakov.

Source/WebCore:

This shaves another minute off WebCore build time on my MacBook Pro.

* dom/ScriptExecutionContext.cpp:
* dom/ScriptExecutionContext.h:
* fileapi/Blob.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderFlowThread.cpp:
* rendering/RenderFrameSet.cpp:
* rendering/RenderIFrame.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderListBox.cpp:
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMedia.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderRegion.cpp:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplica.cpp:
* rendering/RenderRubyRun.cpp:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderSlider.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderTextTrackCue.cpp:
* rendering/RenderVideo.cpp:
* rendering/RenderView.cpp:
* rendering/RenderWidget.cpp:
* rendering/svg/RenderSVGContainer.cpp:
* rendering/svg/RenderSVGForeignObject.cpp:
* rendering/svg/RenderSVGGradientStop.cpp:
* rendering/svg/RenderSVGHiddenContainer.cpp:
* rendering/svg/RenderSVGImage.cpp:
* rendering/svg/RenderSVGResourceContainer.cpp:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/RenderSVGShape.cpp:
* rendering/svg/RenderSVGText.cpp:

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/WebPage/PageOverlay.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Begin chipping away at ScriptState
https://bugs.webkit.org/show_bug.cgi?id=114695

Reviewed by Geoffrey Garen.

Remove ScriptStateProtectedPtr as well as evalEnabled and setEvalEnabled.

* bindings/js/ScriptState.cpp:
* bindings/js/ScriptState.h:
* inspector/InjectedScriptBase.cpp:
(WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
* inspector/ScriptArguments.cpp:
(WebCore::ScriptArguments::ScriptArguments):
(WebCore::ScriptArguments::globalState):
* inspector/ScriptArguments.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make resizing the docked Web Inspector stay in sync with the inspected view.

https://webkit.org/b/114682

Reviewed by Joseph Pecoraro.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
Disable screen updates to make sure the layers for both views resize in sync.


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