[Qt][Mac] Remove Carbon and QuickDraw support for plugins.
https://bugs.webkit.org/show_bug.cgi?id=116619

Reviewed by Tor Arne Vestbø.

They are only enabled for 32bit builds of QtWebKit and are rarely tested.
Other browsers support them through a 32bit host process.
PluginViewMac.mm is only used by Qt since the Wx port was removed.

- Only support the Cocoa event model
- Only support the CoreGraphics drawing model
- Remove all NP_NO_CARBON and NP_NO_QUICKDRAW blocks in PluginViewMac.mm

* plugins/PluginView.cpp:
(WebCore::PluginView::setValue):
(WebCore::PluginView::PluginView):
* plugins/PluginView.h:
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
(WebCore::PluginView::platformDestroy):
(WebCore::PluginView::platformGetValueStatic):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleWheelEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::handleKeyboardEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Mac] Allow drawing plugins with QWindow by always using an intermediate bitmap.
https://bugs.webkit.org/show_bug.cgi?id=116620

Reviewed by Tor Arne Vestbø.

The isolation of QWidget along with QPA in Qt5 is abstracting away the native CGContext
of a QWidget and we would need to create a non-public API to be able to achieve it.
Instead of adding complexity to this rarely touched code, always draw into an
intermediate bitmap that we then paint into our QPainter afterward.

- Use CGBitmapContextCreate to allocate a buffer directly instead of creating a QPixmap
  and extract an CGContextRef out of it.
- Get rid of the "if (platformPluginWidget())" code path since we don't paint directly
  into the QWidget's backing store anymore.
- Always use m_contextRef to draw the plugin instead of alternating between direct and
  indirect drawing.

* plugins/PluginView.cpp:
(WebCore::PluginView::PluginView):
* plugins/PluginView.h:
* plugins/mac/PluginViewMac.mm:
(WebCore::createBitmapContext):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::platformDestroy):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paint):
(WebCore::PluginView::invalidateRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove obsolete test case from TestExpectations

Unreviewed EFL gardening.

xmlviewer/extensions-api.html case has been removed since r151080.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Re-enable plugins on Mac.
https://bugs.webkit.org/show_bug.cgi?id=116622

Reviewed by Tor Arne Vestbø.

Source/WebCore:

* platform/FileSystem.h:
* platform/qt/FileSystemQt.cpp:
(WebCore::unloadModule):
  - Q_WS_* aren't defined since Qt5, use Q_OS_MACX instead.
* plugins/mac/PluginPackageMac.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
  - createCFString now does the adoption itself.
* plugins/mac/PluginViewMac.mm:
  - Add missing include.

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::windowResizerRect):
  - Add missing parenthese.

Tools:

Plugins on Mac were only enabled if !embedded but the later was set if
QPA is enabled, which is the default since Qt 5.0.

Remove references to 'embedded' and fix various build issues,
PluginViewMac.mm and PluginPackageMac.cpp haven't been compiled since a few
months.

* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* qmake/mkspecs/features/features.prf:
* qmake/mkspecs/features/unix/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r143070): Overflow:scroll content does not get clipped properly when the parent box has CSS3 filter on.
https://bugs.webkit.org/show_bug.cgi?id=116859

Patch by Zalan Bujtas <zalan@apple.com> on 2013-06-03
Reviewed by Simon Fraser.

Apply proper clipping for overflow:scroll, when parent dictates
full repaint to ensure correct CSS3 filter effect.

When a particular layer has 'pixel moving' CSS3 filter(drop shadow, blur), it sets clipToDirtyRect
to false to force no clipping on itself and on the child layers too.
No clipping makes overflow:scroll behave like overflow:display, because
overflow::scroll gets clipped at RenderLayer level (as opposed to overflow::hidden).
This patch makes sure that both full repaint and clipping are ensured.

Source/WebCore:

Tests: css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on-parent.html
       css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

LayoutTests:

* css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on-expected.html: Added.
* css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on-parent-expected.html: Added.
* css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on-parent.html: Added.
* css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r151109.
http://trac.webkit.org/changeset/151109
https://bugs.webkit.org/show_bug.cgi?id=117145

"Plugins in WK2 aren't implemented yet." (Requested by
jturcotte on #webkit).

Source/WebCore:

* platform/FileSystem.h:
* platform/qt/FileSystemQt.cpp:
(WebCore::unloadModule):
* plugins/mac/PluginPackageMac.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/mac/PluginViewMac.mm:

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::windowResizerRect):

Tools:

* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* qmake/mkspecs/features/features.prf:
* qmake/mkspecs/features/unix/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] accessibility/placeholder.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112031

Unreviewed EFL gardening.

accessibility/placeholder.html passes after r151103.

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-06-03

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] [WK2] Unreviewed gardening. Unskipping passing tests and generate new test expectations where needed.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-06-03

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0-wk2/compositing/geometry/video-opacity-overlay-expected.png: Added.
* platform/qt-5.0-wk2/compositing/geometry/video-opacity-overlay-expected.txt: Added.
* platform/qt-5.0-wk2/editing/spelling/grammar-markers-expected.png: Added.
* platform/qt-5.0-wk2/editing/spelling/grammar-markers-expected.txt: Added.
* platform/qt-5.0-wk2/editing/spelling/grammar-markers-hidpi-expected.png: Added.
* platform/qt-5.0-wk2/editing/spelling/grammar-markers-hidpi-expected.txt: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-rt-expected.png: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-rt-expected.txt: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-text1-expected.png: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-text1-expected.txt: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-text3-expected.png: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-insert-text3-expected.txt: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-remove-rt1-expected.png: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-remove-rt1-expected.txt: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-remove-text1-expected.png: Added.
* platform/qt-5.0-wk2/fast/ruby/rubyDOM-remove-text1-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Slider UX updates.
https://bugs.webkit.org/show_bug.cgi?id=117148

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-06-03
Reviewed by Rob Buis.

BlackBerry PR 342328
Internally Reviewed by Jeff Rogers.

Change image and reduce handle size when it is disabled.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSliderTrack):
(WebCore::RenderThemeBlackBerry::paintSliderThumb):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] ROI details are not always cleared when using back navigation.
https://bugs.webkit.org/show_bug.cgi?id=117159

Reviewed by Carlos Garcia Campos.

PR 328557.

Secondary change to ensure when restoreViewState is triggered
ROI is reset.

Internally Reviewed by Nima Ghanavatian.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] inset-rectangle support for shape-outside
https://bugs.webkit.org/show_bug.cgi?id=116641

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-06-03
Reviewed by Alexandru Chiculita.

Source/WebCore:

Implement support for using inset-rectangles in a shape-outside.

Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-simple-inset-rectangle.html
       fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rounded-inset-rectangle.html

* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape): An inset-rectangle is
    simply a rectangle with the dimensions calculated differently. So
    just use ExclusionRectangle after converting the dimensions.
* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Enable inset
    rectangles for shape-outside.

LayoutTests:

Add tests for inset-rectangles.

* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-inset-rectangle.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-percentage-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-percentage.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rounded-inset-rectangle-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rounded-inset-rectangle.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: node->parentNode(), Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
https://bugs.webkit.org/show_bug.cgi?id=117155

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-06-03
Reviewed by David Hyatt.

Source/WebCore:

Ported from a Blink patch by kenrb@chromium.org:

Clear floats on RenderBlocks that haven't had layout

WebKit revision 150084 creates a condition where a RenderBlock
can have a populated floating object list even when it has not
previously had layout. Since clearing of floats is optimized
to not search through parts of the tree that have not had layout,
references to floating objects were not being cleared in some cases.

This patch causes markAllDescendantsWithFloatsForLayout() to proceed
in the above case, in order to clear floats for a RenderBlock that has
not had layout.

Test: fast/block/float/float-list-changed-before-layout-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):

LayoutTests:

Test for crash. Note that this will only crash when run under a memory
checking tool like ASAN.

* fast/block/float/float-list-changed-before-layout-crash-expected.txt: Added.
* fast/block/float/float-list-changed-before-layout-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Selection handles are not cleared when displaying error pages.
https://bugs.webkit.org/show_bug.cgi?id=117158

Reviewed by Carlos Garcia Campos.

PR 342159.

Add explicit cancel of selection state when loading an error page
as it is not always cleared.

Internally Reviewed by Nima Ghanavatian.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Send mouse events to the banner for as long as the mouse button is down
https://bugs.webkit.org/show_bug.cgi?id=117161

Reviewed by Beth Dakin.

Keep track of whether the mouse was pressed in a banner and keep sending mouse events to it,
even if they are outside the banner's bounds for as long as the mouse is down.

* WebProcess/WebPage/PageBanner.h:
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::PageBanner):
(WebKit::PageBanner::mouseEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add radar number to ChangeLog.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK1][CSS Regions]  New test fast/regions/hover-on-child-parent-different-regions.html fails
https://bugs.webkit.org/show_bug.cgi?id=117035

Forced relayout to ensure the hover event has propagated before checking the results.

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-03
Reviewed by Alexandru Chiculita.

* fast/regions/hover-on-child-parent-different-regions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Layout Tests] Update testharness scripts, add WebIDLParser.js and idlharness.js
https://bugs.webkit.org/show_bug.cgi?id=116983

Reviewed by Sam Weinig.

Update the testharness scripts that are used by the W3C tests that are located under LayoutTests/http/tests/w3c. Also add the
WebIDLParser.js and idlharness.js scripts that will be used by tests imported in the future. The files are being updated or impoted
off the 06cab30bcee2 changeset in the http://w3c-test.org/resources repository.

No test is affected by this update, though some tests will require rebaselining due to the baselines containing stack traces of which
line numbers will change due to the updated scripts.

* http/tests/w3c/README: List the currently-imported directories, noting from where they originate, at which changeset were
they imported and what files can or should be modified. Also note what script should be used to import/update the files, if available.
* http/tests/w3c/resources/WebIDLParser.js: Added. Will be used by future tests imported from the W3C test suites.
* http/tests/w3c/resources/idlharness.js: Ditto.
* http/tests/w3c/resources/testharness.css: Updated.
* http/tests/w3c/resources/testharness.js: Updated.
* http/tests/w3c/resources/testharnessreport.js: Updated. Removed the default completion callback and readded
the completion callback that was in use until now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: MathML multiscripts not exposed in Accessibility
https://bugs.webkit.org/show_bug.cgi?id=115069

Reviewed by Tim Horton.

Source/WebCore: 

Math multiscript tags allow for an arbitrary number of prescripts and postscripts
around a base object. 

This MathML tag currently is not supported in the render tree, but that doesn't need to 
stop it from being exposed through accessibility, as a base object with an array of postscripts
and an array of prescripts.

Test: platform/mac/accessibility/mathml-multiscript.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMathMultiscript):
(AccessibilityObject):
(WebCore::AccessibilityObject::mathPrescripts):
(WebCore::AccessibilityObject::mathPostscripts):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathMultiscript):
(WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
(WebCore::AccessibilityRenderObject::mathBaseObject):
(WebCore::AccessibilityRenderObject::mathPrescripts):
(WebCore::AccessibilityRenderObject::mathPostscripts):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityPlatformMathSubscriptKey]):
(-[WebAccessibilityObjectWrapper accessibilityPlatformMathSuperscriptKey]):
(-[WebAccessibilityObjectWrapper accessibilityMathPostscripts]):
(-[WebAccessibilityObjectWrapper accessibilityMathPrescripts]):
(-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathType]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(convertMathPairsToNSArray):
(-[WebAccessibilityObjectWrapperBase accessibilityPlatformMathSubscriptKey]):
(-[WebAccessibilityObjectWrapperBase accessibilityPlatformMathSuperscriptKey]):
(-[WebAccessibilityObjectWrapperBase accessibilityMathPostscriptPairs]):
(-[WebAccessibilityObjectWrapperBase accessibilityMathPrescriptPairs]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityPlatformMathSubscriptKey]):
(-[WebAccessibilityObjectWrapper accessibilityPlatformMathSuperscriptKey]):
* mathml/mathtags.in:

LayoutTests: 

* platform/mac/accessibility/mathml-multiscript-expected.txt: Added.
* platform/mac/accessibility/mathml-multiscript.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: MathML multiscripts not exposed in Accessibility
https://bugs.webkit.org/show_bug.cgi?id=115069

Reviewed by Tim Horton.

Add methods to help output components of math multiscripts for accessibility.

* DumpRenderTree/AccessibilityUIElement.cpp:
(mathPostscriptsDescriptionCallback):
(mathPrescriptsDescriptionCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(convertMathMultiscriptPairsToString):
(AccessibilityUIElement::mathPostscriptsDescription):
(AccessibilityUIElement::mathPrescriptsDescription):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::_convertMathMultiscriptPairsToString):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Use drawErrorUnderline() instead of Pango API for highlighting misspelled words
https://bugs.webkit.org/show_bug.cgi?id=115406

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2013-06-03
Reviewed by Martin Robinson.

Source/WebCore:

Replace pango API for drawing underline error on misspelled words, in favor of
drawErrorUnderline() method, removing the platform #ifdef check. As this was the
only usage of Pango in GraphicsContextCairo, it no longer includes pango.h.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): Removes
pango_cairo_show_error_underline() in favor of drawErrorUnderline().
* platform/graphics/cairo/DrawErrorUnderline.h:
(drawErrorUnderline): Fills the cairo path at the end of the drawing.

LayoutTests:

Update PNG expectations for some spell checking tests to pass pixel hash comparison.
The images are not visually modified.

* platform/gtk/editing/spelling/inline-spelling-markers-hidpi-expected.png: Rebaseline
image to pass pixel hash
* platform/gtk/editing/spelling/inline_spelling_markers-expected.png: Rebasline
image to pass pixel hash
* platform/gtk/editing/spelling/spelling-expected.png: Rebasline
image to pass pixel hash

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