[Mac] REGRESSION (r130411-r130414): fast/images/repaint-subrect-grid.html failing on Apple MountainLion Debug WK2 (Tests)
https://bugs.webkit.org/show_bug.cgi?id=98523

Unreviewed gardening after r130414.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Styles] Unable to edit properties in broken stylesheets
https://bugs.webkit.org/show_bug.cgi?id=98246

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Pop source data for invalid rules off the stack whenever we have consecutive CSSParser::markRuleHeaderStart() invocations.

Test: inspector/styles/parse-stylesheet-errors.html

* css/CSSParser.cpp:
(WebCore::CSSParser::popRuleData):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::markRuleBodyStart):
* css/CSSParser.h:
(CSSParser):

LayoutTests:

A small refactoring to share the CSS style data dumping code among tests.

* http/tests/inspector/elements-test.js:
(initialize_ElementTest):
* inspector/styles/parse-stylesheet-errors-expected.txt: Added.
* inspector/styles/parse-stylesheet-errors.html: Added.
* inspector/styles/styles-new-API.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unskip fullscreen unit tests for EwkView
https://bugs.webkit.org/show_bug.cgi?id=98509

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-05
Reviewed by Kenneth Rohde Christiansen.

Update 2 fullscreen unit tests for EwkView so that
they don't require a call to ecore_evas_fullscreen_set()
to succeed. ecore_evas_fullscreen_set() does not
seem to work in Xvfb and causes the tests to hang.
With this update, we can now run those tests again.

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Only inflate the height of rows in a popup menu when a touch device is detected.
https://bugs.webkit.org/show_bug.cgi?id=98515

Patch by Kevin Ellis <kevers@chromium.org> on 2012-10-05
Reviewed by Adam Barth.

Enforces a minimum row height for popup menus when a touch device is
detected.  In a previous patch (r127597), the sizing of popup was
consolidated for touch and non-touch.  Based on user feedback, reverting
to the old behavior for non-touch and only adding padding for touch
devices seems like a much safer strategy.  This patch is not a direct
revert of r127567 since the padding previously used for touch is a bit
excessive.

Covered by existing tests.

* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::getRowHeight):
* platform/chromium/PopupMenuChromium.cpp:
(WebCore):
* platform/chromium/PopupMenuChromium.h:
(WebCore::PopupMenuChromium::optionRowHeightForTouch):
(WebCore::PopupMenuChromium::setOptionRowHeightForTouch):
(PopupMenuChromium):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WKTR] Avoid duplication of UIClient callbacks for main page and other pages
https://bugs.webkit.org/show_bug.cgi?id=98503

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-05
Reviewed by Kenneth Rohde Christiansen.

Avoid the need for duplicating UIClient callbacks for main page
and other pages by passing the view as clientInfo
for those callbacks.

Previously, callbacks for the main page were passed the
TestController as clientInfo while the callbacks for other pages
were passed the PlatformWebView as clientInfo. This was error prone
and leads to useless code duplication.

* WebKitTestRunner/TestController.cpp:
(WTR::getWindowFrame):
(WTR::setWindowFrame):
(WTR::runBeforeUnloadConfirmPanel):
(WTR::TestController::createOtherPage):
(WTR::TestController::initialize):
(WTR::TestController::decidePolicyForNotificationPermissionRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace uses of prefixed properties with unprefixed versions in the UA stylesheets
https://bugs.webkit.org/show_bug.cgi?id=98453

Patch by Tab Atkins <jackalmage@gmail.com> on 2012-10-05
Reviewed by Ojan Vafai.

Switched 'border-radius' and 'box-shadow' to their unprefixed version in the UA stylesheets.

No new tests, because the unprefixed properties have the same behavior as the prefixed.

* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
* css/html.css:
(keygen, select):
(select[size][multiple]):
(select[size="1"]):
(::-webkit-validation-bubble-message):
* css/themeBlackBerry.css:
(input, textarea):
* css/themeChromiumAndroid.css:
(select[size][multiple]):
* css/themeQtNoListboxes.css:
(select[size][multiple]):
* css/themeWin.css:
(select[size="1"]):
* css/view-source.css:
(.webkit-html-message-bubble):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Fix mktemp() compilation warning in Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=98493

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-05
Reviewed by Kenneth Rohde Christiansen.

Fix wrong mktemp usage causing a compilation warning
in MiniBrowser.

* MiniBrowser/efl/main.c:
(on_download_request):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed inspector front-end closure compilaiton fixes.

* inspector/InjectedScriptCanvasModuleSource.js:
* inspector/InjectedScriptExterns.js:
(InjectedScriptHost.prototype.getInternalProperties):
* inspector/front-end/DockController.js:
* inspector/front-end/externs.js:
(InspectorFrontendHostAPI.prototype.requestSetDockSide):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Plugins are completely broken with a custom device pixel ratio
https://bugs.webkit.org/show_bug.cgi?id=98518

Reviewed by Kenneth Rohde Christiansen.

Implement painting with scale factor in ShareableBitmap.
The backing store of the plugin are still overscaled in MiniBrowser
with this patch but this is only the effect of the fake device scale
factor defined in qml (1.5). We should probably remove it on desktop.

* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::paint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC should have a way to gather and log Heap memory use and pause times
https://bugs.webkit.org/show_bug.cgi?id=98431

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

In order to improve our infrastructure for benchmark-driven development, we should
have a centralized method of gathering and logging various statistics about the state
of the JS heap. This would allow us to create and to use other tools to analyze the
output of the VM after running various workloads.

The first two statistics that might be interesting is memory use by JSC and GC pause
times. We can control whether this recording happens through the use of the Options
class, allowing us to either use environment variables or command line flags.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::collect): If we finish a collection and are still over our set GC heap size,
we end the program immediately and report an error. Also added recording of pause times.
* heap/Heap.h:
(Heap):
(JSC::Heap::shouldCollect): When we set a specific GC heap size through Options, we
ignore all other heuristics on when we should collect and instead only ask if we're
greater than the amount specified in the Option value. This allows us to view time/memory
tradeoffs more clearly.
* heap/HeapStatistics.cpp: Added.
(JSC):
(JSC::HeapStatistics::initialize):
(JSC::HeapStatistics::recordGCPauseTime):
(JSC::HeapStatistics::logStatistics):
(JSC::HeapStatistics::exitWithFailure):
(JSC::HeapStatistics::reportSuccess):
(JSC::HeapStatistics::parseMemoryAmount):
(StorageStatistics):
(JSC::StorageStatistics::StorageStatistics):
(JSC::StorageStatistics::operator()):
(JSC::StorageStatistics::objectWithOutOfLineStorageCount):
(JSC::StorageStatistics::objectCount):
(JSC::StorageStatistics::storageSize):
(JSC::StorageStatistics::storageCapacity):
(JSC::HeapStatistics::showObjectStatistics): Moved the old showHeapStatistics (renamed to showObjectStatistics)
to try to start collecting our various memory statistics gathering/reporting mechanisms scattered throughout the
codebase into one place.
* heap/HeapStatistics.h: Added.
(JSC):
(HeapStatistics):
* jsc.cpp:
(main):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce): We need to initialize our data structures for recording
statistics if necessary.
* runtime/Options.cpp: Add new Options for the various types of statistics we'll be gathering.
(JSC::parse):
(JSC):
(JSC::Options::initialize): Initialize the various new options using environment variables.
(JSC::Options::dumpOption):
* runtime/Options.h:
(JSC):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(main): Added a check as to whether we should dump our JSC Heap statistics on exit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove wrong expectations added in r130452.

* platform/chromium-win-xp/editing/pasteboard/5006779-expected.png: Removed.
* platform/chromium-win-xp/editing/pasteboard/5006779-expected.txt: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WKTR] Implement UIClient focus callbacks in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=98256

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-05
Reviewed by Kenneth Rohde Christiansen.

Tools:

Implement UIClient's focus callbacks for the main page in
WebKitTestRunner.

* WebKitTestRunner/TestController.cpp:
(WTR::focus):
(WTR::TestController::initialize):

LayoutTests:

Unskip fast/dom/Window/mozilla-focus-blur.html now that
WebKitTestRunner implements UIClient's focus callbacks.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a setting to enable plugin snapshotting
https://bugs.webkit.org/show_bug.cgi?id=98319
<rdar://problem/12426480>

Reviewed by Brady Eidson.

Source/WebCore:

Add a new bit for this preference.

* page/Settings.cpp:
(WebCore::Settings::Settings): Preference is false by default.
* page/Settings.h: Added m_plugInSnapshottingEnabled bit.
(WebCore::Settings::setPlugInSnapshottingEnabled): Set the bit.
(WebCore::Settings::plugInSnapshottingEnabled): Return the bit.

Source/WebKit/mac:

Expose plugInSnapshottingEnabled preference to WebKit clients.

* WebView/WebPreferenceKeysPrivate.h: Add WebKitPlugInSnapshottingEnabled key.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Setting is turned off by default.
(-[WebPreferences plugInSnapshottingEnabled]):
(-[WebPreferences setPlugInSnapshottingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Update settings based on preference.

Source/WebKit2:

Expose plugInSnapshottingEnabled preference to WebKit clients.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPlugInSnapshottingEnabled):
(WKPreferencesGetPlugInSnapshottingEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update preference based on store.

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

Adding platform-specific baselines after r130443 and r130489.

* platform/gtk/fast/repaint/box-shadow-inset-repaint-expected.png: Added.
* platform/gtk/fast/repaint/box-shadow-inset-repaint-expected.txt: Added.
* platform/gtk/fast/text/vertical-rl-rtl-linebreak-expected.png: Added.
* platform/gtk/fast/text/vertical-rl-rtl-linebreak-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add support for creating EGL contexts
https://bugs.webkit.org/show_bug.cgi?id=77921

Patch by José Dapena Paz <jdapena@igalia.com> on 2012-10-05
Reviewed by Martin Robinson.

This patch adds support for EGL, using OpenGL and OpenGL ES 2. Both
options are set up on compile time, with the configure options
--enable-egl and --enable-gles2.

The implementation only adds support for EGL on top of X11, to
isolate the changes to the minimum. More changes should come
later to enable EGL for other targets (as Wayland).

.:

* GNUmakefile.am:
* configure.ac: new configure options --enable-egl and --enable-gles2.

Source/WebCore:

No new tests required, as existing WebGL and AC tests should cover
the cases.

* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):
* platform/graphics/OpenGLESShims.h:
* platform/graphics/cairo/GLContext.cpp:
(WebCore):
(WebCore::GLContext::sharedX11Display):
(WebCore::GLContext::cleanupSharedX11Display):
(WebCore::activeContextList):
(WebCore::GLContext::addActiveContext):
(WebCore::GLContext::removeActiveContext):
(WebCore::GLContext::cleanupActiveContextsAtExit):
(WebCore::GLContext::createContextForWindow):
(WebCore::GLContext::createOffscreenContext):
* platform/graphics/cairo/GLContext.h:
(GLContext):
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant):
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/clutter/GraphicsContext3DClutter.cpp:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
* platform/graphics/egl/GLContextEGL.cpp: Added.
(WebCore):
(WebCore::sharedEGLDisplay):
(WebCore::getEGLConfig):
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPbufferContext):
(WebCore::GLContextEGL::createPixmapContext):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::~GLContextEGL):
(WebCore::GLContextEGL::canRenderToDefaultFramebuffer):
(WebCore::GLContextEGL::defaultFrameBufferSize):
(WebCore::GLContextEGL::makeContextCurrent):
(WebCore::GLContextEGL::swapBuffers):
(WebCore::GLContextEGL::waitNative):
(WebCore::GLContextEGL::platformContext):
* platform/graphics/egl/GLContextEGL.h: Added.
(WebCore):
(GLContextEGL):
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::~GLContextGLX):
(WebCore::GLContextGLX::defaultFrameBufferSize):
(WebCore::GLContextGLX::makeContextCurrent):
(WebCore::GLContextGLX::swapBuffers):
(WebCore):
(WebCore::GLContextGLX::waitNative):
* platform/graphics/glx/GLContextGLX.h:
(GLContextGLX):
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::renderbufferStorage):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/gtk/RedirectedXCompositeWindow.cpp:
(WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebCore::RedirectedXCompositeWindow::resize):
* platform/gtk/RedirectedXCompositeWindow.h:

Source/WebKit2:

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove unnecessary html file.
https://bugs.webkit.org/show_bug.cgi?id=98531

Reviewed by Yong Li.

We now just use Source/WebCore/inspector/front-end/inspector.html
instead.

* WebCoreSupport/inspectorBB.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add expected result accidentally left out of http://trac.webkit.org/changeset/130337.
* perf/adding-radio-buttons-expected.txt:

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

r130447 forgot to update the Snow Leopard pixel baselines. The only differences are due to a different font used.

* platform/chromium-mac-snowleopard/fast/clip/overflow-border-radius-combinations-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/clip/overflow-border-radius-fixed-position-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/clip/overflow-border-radius-transformed-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Update some more #includes for Platform/ directory
https://bugs.webkit.org/show_bug.cgi?id=98534

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

* src/WebFormElement.cpp:
* src/WebFrameImpl.cpp:
* src/WebGeolocationClientMock.cpp:
* src/WebGeolocationError.cpp:
* src/WebGeolocationPermissionRequest.cpp:
* src/WebHistoryItem.cpp:
* src/WebHitTestResult.cpp:
* src/WebIDBTransactionImpl.h:
* src/WebIconLoadingCompletionImpl.h:
* src/WebImageDecoder.cpp:
* src/WebImageSkia.cpp:
* src/WebInputElement.cpp:
* src/WebKit.cpp:
* src/WebLabelElement.cpp:
* src/WebMediaStreamRegistry.cpp:
* src/WebNode.cpp:
* src/WebNotification.cpp:
* src/WebOptionElement.cpp:
* src/WebPageSerializer.cpp:
* src/WebPageSerializerImpl.cpp:
* src/WebPageSerializerImpl.h:
* src/WebPluginListBuilderImpl.cpp:
* src/WebPluginLoadObserver.h:
* src/WebPopupMenuImpl.cpp:
* src/WebPopupMenuImpl.h:
* src/WebRange.cpp:
* src/WebRegularExpression.cpp:
* src/WebScriptController.cpp:
* src/WebSecurityOrigin.cpp:
* src/WebSecurityPolicy.cpp:
* src/WebSelectElement.cpp:
* src/WebSerializedScriptValue.cpp:
* src/WebSessionDescriptionDescriptor.cpp:
* src/WebSettingsImpl.cpp:
* src/WebSocketImpl.cpp:
* src/WebSocketImpl.h:
* src/WebStorageEventDispatcherImpl.cpp:
* src/WebSurroundingText.cpp:
* src/WebURLLoadTiming.cpp:
* src/WorkerAsyncFileWriterChromium.cpp:
* src/WorkerFileSystemCallbacksBridge.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reversing a GlyphBuffer needlessly queries its size multiple times
https://bugs.webkit.org/show_bug.cgi?id=98530

Reviewed by Simon Fraser.

No new tests because there is no change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced the condition
(i < glyphBuffer.size() / 2) with the equivalent test (i < end).
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Ditto.



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