WebKit-https.git
8 years ago[Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
commit-queue@webkit.org [Wed, 4 Sep 2013 16:39:53 +0000 (16:39 +0000)]
[Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=120664

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-09-04
Reviewed by Darin Adler.

CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
r148952.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

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

8 years agoUnreviewed, rolling out r154989.
commit-queue@webkit.org [Wed, 4 Sep 2013 15:43:34 +0000 (15:43 +0000)]
Unreviewed, rolling out r154989.
http://trac.webkit.org/changeset/154989
https://bugs.webkit.org/show_bug.cgi?id=120678

This patch might broke apps using webkitgtk not from the main
thread (Requested by msanchez on #webkit).

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunAsModal):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

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

8 years ago[CSS Shapes] Revise the ShapeInterval set operations' implementation
hmuller@adobe.com [Wed, 4 Sep 2013 15:43:30 +0000 (15:43 +0000)]
[CSS Shapes] Revise the ShapeInterval set operations' implementation
https://bugs.webkit.org/show_bug.cgi?id=120349

Reviewed by Alexandru Chiculita.

Revised the ShapeIntervals unite, intersect, and subtract operations to
improve efficiency and clarity.

No new tests are required, this is just an internal refactoring.

* rendering/shapes/PolygonShape.cpp:
(WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
(WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
(WebCore::ShapeInterval::uniteVectors): Ditto.
(WebCore::ShapeInterval::intersectVectors): Ditto.
(WebCore::ShapeInterval::subtractVectors): Ditto.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 15:37:00 +0000 (15:37 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk1/TestExpectations: Skipping after r154988.
* platform/qt/TestExpectations: Skipping after r154828.

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

8 years ago[ATK] Adds an accessibility support to access a value of the color control element
commit-queue@webkit.org [Wed, 4 Sep 2013 14:19:02 +0000 (14:19 +0000)]
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-04
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Implements a possibility of retrieving a value of the color control element.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

Tools:

Added accessibility role of the color control element.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(roleToString):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::roleToString):

LayoutTests:

Moving mac's color-well-expected.txt result to base accessibility folder.
Unskipping accessibility/color-well.html for EFL port.

* accessibility/color-well-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/color-well-expected.txt.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:

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

8 years agoUse Vector<Ref<T>> in three random WebCore loops.
akling@apple.com [Wed, 4 Sep 2013 13:59:19 +0000 (13:59 +0000)]
Use Vector<Ref<T>> in three random WebCore loops.
<https://webkit.org/b/120661>

Reviewed by Darin Adler.

Clean up three little loops to use Refs to avoid null checking known-valid objects.
Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::invalidate):

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

8 years ago[GTK] Color of input button's text broken with recent gnome-themes-standard
csaavedra@igalia.com [Wed, 4 Sep 2013 13:44:25 +0000 (13:44 +0000)]
[GTK] Color of input button's text broken with recent gnome-themes-standard
https://bugs.webkit.org/show_bug.cgi?id=120581

Reviewed by Carlos Garcia Campos.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): add the "text-button" class.
(WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
as this is the one actually used for button labels.

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

8 years agoREGRESSION (r132328): /WebKit2APITests/TestWebKitAccessibility unit test is failing
mario@webkit.org [Wed, 4 Sep 2013 13:31:12 +0000 (13:31 +0000)]
REGRESSION (r132328): /WebKit2APITests/TestWebKitAccessibility unit test is failing
https://bugs.webkit.org/show_bug.cgi?id=100408

Unreviewed gardening. Unskip TestWebKitAccessibility after
manually checking that it's running properly in the bot.

* Scripts/run-gtk-tests:
(TestRunner): Unskipped TestWebKitAccessibility.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 12:42:21 +0000 (12:42 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding failure expectation for accessibility/image-map1.html after r155022.
* platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt: Rebaselining after 155008.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 11:39:21 +0000 (11:39 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk2/compositing/images/direct-image-object-fit-expected.txt: Rebaselining after r154921.
* platform/qt-wk2/compositing/reflections/direct-image-object-fit-reflected-expected.txt: Ditto.
* platform/qt/TestExpectations: Skip after r155008.

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

8 years ago[Qt] Unreviewed gardening. Skip failing tests and added platform specifix expected...
kadam@inf.u-szeged.hu [Wed, 4 Sep 2013 10:53:21 +0000 (10:53 +0000)]
[Qt] Unreviewed gardening. Skip failing tests and added platform specifix expected result.

* platform/qt-wk1/inspector/console/command-line-api-expected.txt: Added after r154998.
* platform/qt/TestExpectations:

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

8 years ago[Qt] Use correct library paths for prefix builds on Mac.
michael.bruning@digia.com [Wed, 4 Sep 2013 10:50:09 +0000 (10:50 +0000)]
[Qt] Use correct library paths for prefix builds on Mac.
https://bugs.webkit.org/show_bug.cgi?id=120635

Reviewed by Tor Arne Vestbø.

Due to a change of scope of the qmake force_independent configuration
flag, the library paths in QtWebKit builds on the Mac are set to the
QtWebKit build directory even for production builds.

This patch sets the correct library paths for prefixed production builds
while keeping the scope of the force_independent flag for non-production
builds.

* Source/api.pri:
* Source/widgetsapi.pri:

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

8 years agoUnreviewed GTK gardening. Rebaselining 7 accessibility tests after r154976.
zandobersek@gmail.com [Wed, 4 Sep 2013 10:33:57 +0000 (10:33 +0000)]
Unreviewed GTK gardening. Rebaselining 7 accessibility tests after r154976.

* platform/gtk/accessibility/lists-expected.txt:
* platform/gtk/accessibility/plugin-expected.txt:
* platform/gtk/accessibility/table-detection-expected.txt:
* platform/gtk/accessibility/table-one-cell-expected.txt:
* platform/gtk/accessibility/table-with-aria-role-expected.txt:
* platform/gtk/accessibility/table-with-rules-expected.txt:
* platform/gtk/accessibility/transformed-element-expected.txt:

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

8 years ago[GTK] Add support for the Wayland build target
zandobersek@gmail.com [Wed, 4 Sep 2013 10:19:34 +0000 (10:19 +0000)]
[GTK] Add support for the Wayland build target
https://bugs.webkit.org/show_bug.cgi?id=120627

Reviewed by Gustavo Noronha Silva.

.:

Add support for building the GTK port with Wayland as the target. The Wayland target can be the sole target
that's enabled, or it can be enabled in parallel with the X11 target.

Each of those two targets, when enabled, checks for the corresponding GTK+ windowing dependency being present.
In the case of only the Wayland target being enabled, the accelerated compositing feature is disabled at
build-time as the feature is not yet supported under the Wayland display protocol. X11-based plugin support is
also disabled under that configuration, even if the WebKitPluginProcess is still built but is left non-operational.
GLX support is also disabled if not building the X11 target.

The Wayland target can be enabled through using the --with-target configuration option that now accepts two
additional values:
- 'wayland' - only enables the Wayland target,
- 'x11,wayland' - enables the X11 and Wayland targets that are to be built in parallel.

This makes it possible to build the GTK port of WebKit with the Wayland target, relying solely on the GTK+
dependency that only has the Wayland backend enabled, and removes linking against any X11-related library.
Note that at the moment there seem to be other dependencies that still link to X11-related libraries.
Complete functionality is not yet guaranteed, but is of course the goal.

* Source/autotools/FindDependencies.m4: Store the version of the basic GTK+ dependency that was found.
This is later used to check that the GTK+ X11 and GTK+ Wayland dependencies are of the same version. The
X11-specific dependencies are grouped into one section (apart from the XComposite and XDamage dependencies),
also checking for the GTK+ X11 dependency. If the X11 target is not enabled, the GLX dependency is disabled.
Additionally check for the GTK+ Wayland dependency if the Wayland target is enabled.
We only check for the presence and correct version of the GTK+ X11 and Wayland dependencies, if necessary.
Check for the XComposite and XDamage dependencies if the X11 target is enabled (in addition to the OpenGL
headers being present).
In case of the Wayland target being enabled while the X11 target is not, disable the accelerated compositing
feature as there's no support yet for it under the Wayland display protocol.
* Source/autotools/PrintBuildConfiguration.m4: The build configuration should now print out 'GDK targets'.
* Source/autotools/ReadCommandLineArguments.m4: The --with-target option can now take two additional values,
'wayland' and 'x11,wayland'. The first one enables only the Wayland target, while the second one enables both
X11 and Wayland targets. This makes it possible to build the GTK port with both X11 and Wayland display protocols
supported in the same build.
We must now check the outcoming with_target variable to see if the special case of building one or both of the
possible parallel targets was chosen. We define with_x11_target and with_wayland_target variables if the
with_target value applies to that case.
* Source/autotools/SetupAutoconfHeader.m4: Do not define the XP_UNIX macro on builds that enable the Wayland-only
target. It should still be defined if we're building both X11 and Wayland targets in parallel.
* Source/autotools/SetupAutomake.m4: Define TARGET_X11 and TARGET_WAYLAND Automake conditionals if the new
with_x11_target or with_wayland_target variables were set, respectively. Additionall, define the TARGET_X11_OR_WAYLAND
Automake conditional if we're building either of the two targets.

Source/WebCore:

* GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
as necessary by the actual build target.
* platform/gtk/GtkVersioning.c:
(gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::createBackingStore): Additionally guard the <gdk/gdkx.h> inclusion and the inclusion and use of
WidgetBackingStoreGtkX11 with PLATFORM(X11), ensuring this code is built when also building with X11 target
enabled. GDK_WINDOWING_X11 macro can be defined even if the X11 target is disabled.

Source/WebKit2:

* GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target,
fall back to the generic, empty classes otherwise.
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11),
it's at the moment specific to the X11 implementation of the Netscape plugins.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11),
just like it's guarded in the PluginProcessProxy class declaration.
* UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard <gdk/gdkx.h> and WidgetBackingStoreGtkX11 inclusion and use
with PLATFORM(X11), this code should only be built when building the X11 target.
(WebKit::createBackingStoreForGTK):
* UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their
helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration.
* config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target.

Tools:

* GNUmakefile.am: Define the additional macros also if building the Wayland target.

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

8 years ago[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
mario@webkit.org [Wed, 4 Sep 2013 10:11:00 +0000 (10:11 +0000)]
[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114873

Reviewed by Chris Fleizach.

Re-implement these functions without using GailTextUtil nor Pango.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
to keep it consistent with names for new functions.
(isSentenceBoundary): Helper function to know when we are either
at the beginning or the end of a sentence.
(isWhiteSpaceBetweenSentences): It returns true if we are in the
middle of a white space between sentences. Useful for implementing
the SENTENCE_END boundary type.
(sentenceAtPositionForAtkBoundary): New helper function to find the
sentence at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextSentenceForBoundary): New function,
implementing atk_text_get_text_*_offset for SENTENCE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().

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

8 years ago[CSS Regions] Fix failing tests on ML WK2 after r154973
abucur@adobe.com [Wed, 4 Sep 2013 10:09:42 +0000 (10:09 +0000)]
[CSS Regions] Fix failing tests on ML WK2 after r154973
https://bugs.webkit.org/show_bug.cgi?id=120672

Reviewed by Antti Koivisto.

The two tests are failing because the reference tests create backings for the fixed elements layers.
Regions are not yet accelerated, don't create backings and this difference of behaviour causes a
slight shift in the background color of the fixed elements.

* fast/regions/fixed-inside-named-flow-zIndex-expected.html:
* fast/regions/fixed-inside-named-flow-zIndex.html:
* fast/regions/fixed-pos-region-in-nested-flow-expected.html:
* fast/regions/fixed-pos-region-in-nested-flow.html:

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 09:41:24 +0000 (09:41 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding failure expectations for tests introduced in r154875, r154906 and r154954.
* platform/gtk/animations/cross-fade-background-image-expected.png: Rebaselining after r154906.
* platform/gtk/animations/cross-fade-background-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-border-image-source-expected.png: Ditto.
* platform/gtk/animations/cross-fade-border-image-source-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-list-style-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-list-style-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-image-expected.txt: Ditto.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 09:29:38 +0000 (09:29 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk2/fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Added.
* platform/qt/TestExpectations: Skip after r155014.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 08:56:41 +0000 (08:56 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Manage the current accessibility layout test failures
after r154697, r154781 and r154976.

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

8 years ago[CSS Regions] Extend the RenderRegionRange class to include overflow information...
abucur@adobe.com [Wed, 4 Sep 2013 08:26:41 +0000 (08:26 +0000)]
[CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
https://bugs.webkit.org/show_bug.cgi?id=116299

Reviewed by David Hyatt.

Source/WebCore:

Patch for computing overflow for boxes per region and applying it for layout overflow.
The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
functions that receive the target box as a parameter.
When computing the portion of a box inside a region it is necessary to split the border
rect of the box between regions. This means mapping the rectangle in the flow thread
coordinates, making the split and then remapping the fragment in the box coordinates.
For now, this is not optimized and walks the render tree to compute the block offsets.
The function getRegionRangeForBox is used to determine in what regions a box should
be rendered into. The range is computed at layout time and it depends on the height of
the box, if its unsplittable for fragmentation etc.
The patch also propagates the layout overflow to the regions. This enables to correctly
display scrollbars when chaining varying size regions (currently the horizontal overflow
is as wide as the widest region for all the regions). Unsplittable boxes will also generate
layout overflow in the start region so they can be scrolled and fully reachable. This
functionality depends on fixing the visual overflow and adapting the layout to take into
account the unsplittable box. Besides this, the relative positioning and transforms are applied
at a fragment level. This is in line with the CSS3 Break specification:
http://dev.w3.org/csswg/css-break/#transforms

Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
       fast/regions/overflow-scrollable-rotated-fragment.html
       fast/regions/overflow-scrollable-unsplittable-fragment.html
       fast/regions/overflow-scrollable-varying-width-1.html
       fast/regions/overflow-scrollable-varying-width-2.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::clearLayoutOverflow):
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clientBoxRectInRegion):
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::clearOverflow):
* rendering/RenderBox.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
(WebCore::RenderBoxRegionInfo::overflow):
(WebCore::RenderBoxRegionInfo::clearOverflow):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::setRenderBoxRegionInfo):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::computeOverflowFromCells):

LayoutTests:

Add tests for layout overflow propagation. Some tests disable the visual representation of the overflow.
This is because the visual overflow in regions is not yet fixed. The tests will be revisited when the
visual overflow is implemented.
Some repaint tests are rebased because a new repaint is issued on the regions when they compute the layout
overflow.

* fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Rebased.
* fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Rebased.
* fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Rebased.
* fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Rebased.
* fast/regions/overflow-scrollable-rel-pos-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-rel-pos-fragment.html: Added.
* fast/regions/overflow-scrollable-rotated-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-rotated-fragment.html: Added.
* fast/regions/overflow-scrollable-unsplittable-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-unsplittable-fragment.html: Added.
* fast/regions/overflow-scrollable-varying-width-1-expected.html: Added.
* fast/regions/overflow-scrollable-varying-width-1.html: Added.
* fast/regions/overflow-scrollable-varying-width-2-expected.html: Added.
* fast/regions/overflow-scrollable-varying-width-2.html: Added.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 08:25:07 +0000 (08:25 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Skipping the media/track/in-band test set that's failing on the GTK port.

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

8 years ago[GStreamer] cannot play live streams
commit-queue@webkit.org [Wed, 4 Sep 2013 08:21:17 +0000 (08:21 +0000)]
[GStreamer] cannot play live streams
https://bugs.webkit.org/show_bug.cgi?id=116831

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-04
Reviewed by Philippe Normand.

Source/WebCore:

Fix issues with rtsp streams embedded on <video> not loading.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
starting playback.

Tools:

Fix timeout issues with rtspsrc/udpsrc gstreamer elements.

* gtk/jhbuild.modules:
* gtk/patches/rtspsrc-timeout-on-udpsrc-is-in-nanoseconds.patch: Added.
* gtk/patches/udpsrc-improve-timeouts.patch: Added.
Changed gstreamer jhbuild modules to use tarball repos (required to add patches)
and added 2 patches to gst-plugins-good to fix timeout issues with rtsp streams.
Both patches are applied upstream and can be removed once a new gstreamer release
is out (up to 1.0.10 the patches are not included) and we bump the requirements.

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

8 years agoThe DFG should be able to tier-up and OSR enter into the FTL
fpizlo@apple.com [Wed, 4 Sep 2013 06:26:04 +0000 (06:26 +0000)]
The DFG should be able to tier-up and OSR enter into the FTL
https://bugs.webkit.org/show_bug.cgi?id=112838

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

This adds the ability for the DFG to tier-up into the FTL. This works in both
of the expected tier-up modes:

Replacement: frequently called functions eventually have their entrypoint
replaced with one that goes into FTL-compiled code. Note, this will be a
slow-down for now since we don't yet have LLVM calling convention integration.

OSR entry: code stuck in hot loops gets OSR'd into the FTL from the DFG.

This means that if the DFG detects that a function is an FTL candidate, it
inserts execution counting code similar to the kind that the baseline JIT
would use. If you trip on a loop count in a loop header that is an OSR
candidate (it's not an inlined loop), we do OSR; otherwise we do replacement.
OSR almost always also implies future replacement.

OSR entry into the FTL is really cool. It uses a specialized FTL compile of
the code, where early in the DFG pipeline we replace the original root block
with an OSR entrypoint block that jumps to the pre-header of the hot loop.
The OSR entrypoint loads all live state at the loop pre-header using loads
from a scratch buffer, which gets populated by the runtime's OSR entry
preparation code (FTL::prepareOSREntry()). This approach appears to work well
with all of our subsequent optimizations, including prediction propagation,
CFA, and LICM. LLVM seems happy with it, too. Best of all, it works naturally
with concurrent compilation: when we hit the tier-up trigger we spawn a
compilation plan at the bytecode index from which we triggered; once the
compilation finishes the next trigger will try to enter, at that bytecode
index. If it can't - for example because the code has moved on to another
loop - then we just try again. Loops that get hot enough for OSR entry (about
25,000 iterations) will probably still be running when a concurrent compile
finishes, so this doesn't appear to be a big problem.

This immediately gives us a 70% speed-up on imaging-gaussian-blur. We could
get a bigger speed-up by adding some more intelligence and tweaking LLVM to
compile code faster. Those things will happen eventually but this is a good
start. Probably this code will see more tuning as we get more coverage in the
FTL JIT, but I'll worry about that in future patches.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
* bytecode/CodeBlock.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::killBlockAndItsContents):
(JSC::DFG::Graph::killUnreachableBlocks):
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
(JSC::DFG::JITCode::checkIfOptimizationThresholdReached):
(JSC::DFG::JITCode::optimizeNextInvocation):
(JSC::DFG::JITCode::dontOptimizeAnytimeSoon):
(JSC::DFG::JITCode::optimizeAfterWarmUp):
(JSC::DFG::JITCode::optimizeSoon):
(JSC::DFG::JITCode::forceOptimizationSlowPathConcurrently):
(JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):
* dfg/DFGJITCode.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
(JSC::DFG::JITFinalizer::finalizeCommon):
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::createPreHeader):
(JSC::DFG::LoopPreHeaderCreationPhase::run):
* dfg/DFGLoopPreHeaderCreationPhase.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasUnlinkedLocal):
(JSC::DFG::Node::unlinkedLocal):
* dfg/DFGNodeType.h:
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntrypointCreationPhase.cpp: Added.
(JSC::DFG::OSREntrypointCreationPhase::OSREntrypointCreationPhase):
(JSC::DFG::OSREntrypointCreationPhase::run):
(JSC::DFG::performOSREntrypointCreation):
* dfg/DFGOSREntrypointCreationPhase.h: Added.
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPlan.h:
* dfg/DFGPredictionInjectionPhase.cpp:
(JSC::DFG::PredictionInjectionPhase::run):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTierUpCheckInjectionPhase.cpp: Added.
(JSC::DFG::TierUpCheckInjectionPhase::TierUpCheckInjectionPhase):
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::performTierUpCheckInjection):
* dfg/DFGTierUpCheckInjectionPhase.h: Added.
* dfg/DFGToFTLDeferredCompilationCallback.cpp: Added.
(JSC::DFG::ToFTLDeferredCompilationCallback::ToFTLDeferredCompilationCallback):
(JSC::DFG::ToFTLDeferredCompilationCallback::~ToFTLDeferredCompilationCallback):
(JSC::DFG::ToFTLDeferredCompilationCallback::create):
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGToFTLDeferredCompilationCallback.h: Added.
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp: Added.
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::~ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h: Added.
* dfg/DFGWorklist.cpp:
(JSC::DFG::globalWorklist):
* dfg/DFGWorklist.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCapabilities.h:
* ftl/FTLForOSREntryJITCode.cpp: Added.
(JSC::FTL::ForOSREntryJITCode::ForOSREntryJITCode):
(JSC::FTL::ForOSREntryJITCode::~ForOSREntryJITCode):
(JSC::FTL::ForOSREntryJITCode::ftlForOSREntry):
(JSC::FTL::ForOSREntryJITCode::initializeEntryBuffer):
* ftl/FTLForOSREntryJITCode.h: Added.
(JSC::FTL::ForOSREntryJITCode::entryBuffer):
(JSC::FTL::ForOSREntryJITCode::setBytecodeIndex):
(JSC::FTL::ForOSREntryJITCode::bytecodeIndex):
(JSC::FTL::ForOSREntryJITCode::countEntryFailure):
(JSC::FTL::ForOSREntryJITCode::entryFailureCount):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileBlock):
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileExtractOSREntryLocal):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal):
(JSC::FTL::LowerDFGToLLVM::addWeakReference):
* ftl/FTLOSREntry.cpp: Added.
(JSC::FTL::prepareOSREntry):
* ftl/FTLOSREntry.h: Added.
* ftl/FTLOutput.h:
(JSC::FTL::Output::crashNonTerminal):
(JSC::FTL::Output::crash):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* interpreter/Register.h:
(JSC::Register::unboxedDouble):
* jit/JIT.cpp:
(JSC::JIT::emitEnterOptimizationCheck):
* jit/JITCode.cpp:
(JSC::JITCode::ftlForOSREntry):
* jit/JITCode.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::ensureWorklist):
* runtime/VM.h:

LayoutTests:

Reviewed by Mark Hahnenberg.

Fix marsaglia to check the result instead of printing, and add a second
version that relies on OSR entry.

* fast/js/regress/marsaglia-osr-entry-expected.txt: Added.
* fast/js/regress/marsaglia-osr-entry.html: Added.
* fast/js/regress/script-tests/marsaglia-osr-entry.js: Added.
(marsaglia):
* fast/js/regress/script-tests/marsaglia.js:

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

8 years agoAX: REGRESSION: @title is exposed as AXDescription when label label from contents...
cfleizach@apple.com [Wed, 4 Sep 2013 06:13:39 +0000 (06:13 +0000)]
AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
https://bugs.webkit.org/show_bug.cgi?id=120550

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
show up in the title field and do not duplicate naming when a title tag is used.

Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
like all other elements.

Test: platform/mac/accessibility/link-with-title.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityTitle]):
(-[WebAccessibilityObjectWrapper accessibilityDescription]):

LayoutTests:

* accessibility/image-map1.html:
* platform/mac/accessibility/document-links-expected.txt:
* platform/mac/accessibility/image-map1-expected.txt:
* platform/mac/accessibility/link-with-title-expected.txt: Added.
* platform/mac/accessibility/link-with-title.html: Added.

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

8 years agoCodeBlock memory cost reporting should be rationalized
fpizlo@apple.com [Wed, 4 Sep 2013 05:48:06 +0000 (05:48 +0000)]
CodeBlock memory cost reporting should be rationalized
https://bugs.webkit.org/show_bug.cgi?id=120615

Source/JavaScriptCore:

Reviewed by Darin Adler.

Report the size of the instruction stream, and then remind the GC that we're
using memory when we trace.

This is a slight slow-down on some JSBench tests because it makes us GC a
bit more frequently. But I think it's well worth it; if we really want those
tests to GC less frequently then we can achieve that through other kinds of
tuning. It's better that the GC knows that CodeBlocks do in fact use memory;
what it does with that information is a somewhat orthogonal question.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitAggregate):

Source/WTF:

Reviewed by Darin Adler.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::refCount):

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

8 years agoFollow up to http://trac.webkit.org/changeset/155014
enrica@apple.com [Wed, 4 Sep 2013 05:06:08 +0000 (05:06 +0000)]
Follow up to trac.webkit.org/changeset/155014

Reviewed by Alexey Proskuryakov.

In the r155014 I renamed hasLineBreakingPropertyComplexContext
to requiresComplexContextForWordBreaking but forgot to
make the same change in UnicodeWchar.h.

* wtf/unicode/wchar/UnicodeWchar.cpp:
(WTF::Unicode::requiresComplexContextForWordBreaking):
* wtf/unicode/wchar/UnicodeWchar.h:

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

8 years agoChange type of Document::doctype back to a raw pointer
darin@apple.com [Wed, 4 Sep 2013 04:53:23 +0000 (04:53 +0000)]
Change type of Document::doctype back to a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=120617

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::doctype): Return a raw pointer.
(WebCore::Document::childrenChanged): Use the raw pointer.
Also added a FIXME about this code that is probably in the wrong place.
* dom/Document.h: More of the same.

* editing/markup.cpp:
(WebCore::documentTypeString): Get rid of local variable entirely,
since null is already handled right by createMarkup, and also remove
the call to get since doctype is just a raw pointer.

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

8 years agoASSERTION FAILED: frame().view() == this closing a page with SVG or video
akling@apple.com [Wed, 4 Sep 2013 04:49:23 +0000 (04:49 +0000)]
ASSERTION FAILED: frame().view() == this closing a page with SVG or video
<https://webkit.org/b/120645>

Reviewed by Antti Koivisto.

Have RenderSVGResourceContainer check if the document is being destroyed before
triggering any repaints. This replaces the previous check for a null RenderView
which meant basically the same thing.

We could add more and better assertions to catch unnecessary work during tree
teardown, but let's do that separately.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markClientForInvalidation):

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

8 years agoREGRESSION (r154967) window resize is very choppy
darin@apple.com [Wed, 4 Sep 2013 04:27:57 +0000 (04:27 +0000)]
REGRESSION (r154967) window resize is very choppy
https://bugs.webkit.org/show_bug.cgi?id=120653

Reviewed by Andreas Kling.

Andreas Kling spotted the bad change.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForMessage): Roll out this incorrect change.
The code here is not the same as a call to take.

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

8 years agoFix uninitialized build warning in make_names.pl
gyuyoung.kim@samsung.com [Wed, 4 Sep 2013 03:34:13 +0000 (03:34 +0000)]
Fix uninitialized build warning in make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=120658

Reviewed by Andreas Kling.

No new tests, no behavior change.

* dom/make_names.pl:
(printTypeChecks): Fixed a build warning since r154965.

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

8 years agoFix backwards branch in ~Node from r154967
darin@apple.com [Wed, 4 Sep 2013 02:46:10 +0000 (02:46 +0000)]
Fix backwards branch in ~Node from r154967
https://bugs.webkit.org/show_bug.cgi?id=120659

Reviewed by Andreas Kling.

* dom/Node.cpp:
(WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
when we did not remove the item from the table. I removed a ! from this expression
after review; bad idea.

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

8 years agoCan't select Katakana word by double-clicking.
enrica@apple.com [Wed, 4 Sep 2013 01:13:08 +0000 (01:13 +0000)]
Can't select Katakana word by double-clicking.
<rdar://problem/14654926>

Reviewed by Alexey Proskuryakov and Ryosuke Niwa.

Source/WebCore:

For some languages, like Japanese we need
to use more context for word breaking.

New test: editing/selection/doubleclick-japanese-text.html

* platform/text/TextBoundaries.h:
(WebCore::requiresContextForWordBoundary):

Source/WTF:

For some languages, like Japanese we need
to use more context for word breaking.
I've renamed the function to better reflect its use
and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.

* wtf/unicode/icu/UnicodeIcu.h:
(WTF::Unicode::requiresComplexContextForWordBreaking):

LayoutTests:

Added new test for this scenario.

* editing/selection/doubleclick-japanese-text-expected.txt: Added.
* editing/selection/doubleclick-japanese-text.html: Added.

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

8 years agoConverting StackIterator to a callback interface.
mark.lam@apple.com [Wed, 4 Sep 2013 00:26:57 +0000 (00:26 +0000)]
Converting StackIterator to a callback interface.
https://bugs.webkit.org/show_bug.cgi?id=120564.

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

* API/JSContextRef.cpp:
(BacktraceFunctor::BacktraceFunctor):
(BacktraceFunctor::operator()):
(JSContextCreateBacktrace):
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::DumpRegisterFunctor::DumpRegisterFunctor):
(JSC::DumpRegisterFunctor::operator()):
(JSC::Interpreter::dumpRegisters):
(JSC::unwindCallFrame):
(JSC::GetStackTraceFunctor::GetStackTraceFunctor):
(JSC::GetStackTraceFunctor::operator()):
(JSC::Interpreter::getStackTrace):
(JSC::Interpreter::stackTraceAsString):
(JSC::UnwindFunctor::UnwindFunctor):
(JSC::UnwindFunctor::operator()):
(JSC::Interpreter::unwind):
* interpreter/Interpreter.h:
* interpreter/StackIterator.cpp:
(JSC::StackIterator::numberOfFrames):
(JSC::StackIterator::gotoFrameAtIndex):
(JSC::StackIterator::gotoNextFrameWithFilter):
(JSC::StackIterator::resetIterator):
(JSC::StackIterator::Frame::print):
(debugPrintCallFrame):
(DebugPrintStackFunctor::operator()):
(debugPrintStack): Added for debugging convenience.
* interpreter/StackIterator.h:
(JSC::StackIterator::Frame::index):
(JSC::StackIterator::iterate):
* jsc.cpp:
(FunctionJSCStackFunctor::FunctionJSCStackFunctor):
(FunctionJSCStackFunctor::operator()):
(functionJSCStack):
* profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::AddParentForConsoleStartFunctor):
(JSC::AddParentForConsoleStartFunctor::foundParent):
(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
* runtime/JSFunction.cpp:
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor):
(JSC::RetrieveArgumentsFunctor::result):
(JSC::RetrieveArgumentsFunctor::operator()):
(JSC::retrieveArguments):
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::RetrieveCallerFunctionFunctor::result):
(JSC::RetrieveCallerFunctionFunctor::operator()):
(JSC::retrieveCallerFunction):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::result):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):
(JSC::GlobalFuncProtoSetterFunctor::GlobalFuncProtoSetterFunctor):
(JSC::GlobalFuncProtoSetterFunctor::allowsAccess):
(JSC::GlobalFuncProtoSetterFunctor::operator()):
(JSC::globalFuncProtoSetter):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::result):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):

Source/WebCore:

No new tests.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::hasViableFrame):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
(WebCore::CreateScriptCallStackFunctor::operator()):
(WebCore::createScriptCallStack):
(WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
(WebCore::CreateScriptCallStackForConsoleFunctor::operator()):

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

8 years agoTry unskipping compositing/images/positioned-image-content-rect.html
benjamin@webkit.org [Wed, 4 Sep 2013 00:16:44 +0000 (00:16 +0000)]
Try unskipping compositing/images/positioned-image-content-rect.html

Unreviewed.

* platform/mac/TestExpectations:
The test compositing/images/positioned-image-content-rect.html seems to pass reliably
on the bots and locally.
Try to unskip it.

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

8 years agoThe test inspector/geolocation-success.html is unreliable
benjamin@webkit.org [Tue, 3 Sep 2013 23:56:36 +0000 (23:56 +0000)]
The test inspector/geolocation-success.html is unreliable
https://bugs.webkit.org/show_bug.cgi?id=120655

Reviewed by Alexey Proskuryakov.

* inspector/geolocation-success.html:
The test was expecting everything would be done in the page context
when InspectorTest.evaluateInPage invoke the callback.

This is not the case, geolocation APIs are asynchronous.
The callbacks printLocation() and printError() may or may not be executed.

To fix this, the execution of each step is changed to depends on the completion
of the geolocation callback.

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

8 years agoSupport structured clone of Map and Set
oliver@apple.com [Tue, 3 Sep 2013 23:21:10 +0000 (23:21 +0000)]
Support structured clone of Map and Set
https://bugs.webkit.org/show_bug.cgi?id=120654

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Make xcode copy the required headers, and add appropriate export attributes

* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSMap.h:
* runtime/JSSet.h:
* runtime/MapData.h:

Source/WebCore:

Add support for cloning Map and Set.  Fairly self explanatory change.
Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.

* ForwardingHeaders/runtime/JSMap.h: Added.
* ForwardingHeaders/runtime/JSSet.h: Added.
* ForwardingHeaders/runtime/MapData.h: Added.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isMap):
(WebCore::CloneSerializer::isSet):
(WebCore::CloneSerializer::startSet):
(WebCore::CloneSerializer::startMap):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
(WebCore::CloneDeserializer::deserialize):

LayoutTests:

Tests!

* fast/dom/Window/script-tests/postmessage-clone.js:
(set new):
(set add.set add):

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

8 years ago[CSS Shapes] Shape's content gets extra left offset when left-border is positive...
betravis@adobe.com [Tue, 3 Sep 2013 22:14:51 +0000 (22:14 +0000)]
[CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
https://bugs.webkit.org/show_bug.cgi?id=117573

Reviewed by David Hyatt.

Source/WebCore:

Nested blocks need to take into account their offset from the shape-inside container.
The new code calculates the offset from the shape-inside container, then applies the
offset to the computed segments. The line must be moved down by the offset's height,
and each segment must be moved left by the offset's width.

Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
new logical left would cause it to rest at a new position within a shape container.
(WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
offset form a shape inside ancestor container.
(WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
new position offset.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
than just vertical offset.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
there is an inline offset.

LayoutTests:

Test that nested children with padding correctly apply an ancestor's shape-inside
across different writing modes.

* fast/shapes/shape-inside/shape-inside-offset-block-children-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-offset-block-children.html: Added.

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

8 years ago [Mac] WebKitTestRunner still beeps sometimes
ap@apple.com [Tue, 3 Sep 2013 21:47:45 +0000 (21:47 +0000)]
    [Mac] WebKitTestRunner still beeps sometimes
        https://bugs.webkit.org/show_bug.cgi?id=120652

        Reviewed by Tim Horton.

        In bug 107251, we disabled beeping in WebProcess, but some of the beeps happen in
        UI process (notably, AppKit beeps when handling a key equivalent returns NO).

        * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize):
        Use the same SPI that we use in DRT and in WebProcess to disable beeping.

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

8 years agoFix the recommended testing platform on the website
benjamin@webkit.org [Tue, 3 Sep 2013 21:36:32 +0000 (21:36 +0000)]
Fix the recommended testing platform on the website

Rubberstamped by Enrica Casucci.

* quality/testing.html:

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

8 years agoWeb Inspector: exceptions triggered from console evaluation do not pause the debugger
graouts@apple.com [Tue, 3 Sep 2013 20:16:29 +0000 (20:16 +0000)]
Web Inspector: exceptions triggered from console evaluation do not pause the debugger
https://bugs.webkit.org/show_bug.cgi?id=120460

Source/WebCore:

Reviewed by Timothy Hatcher.

* inspector/InjectedScriptSource.js:
Explicitly set a sourceURL such that the frontend may identify injected script when
processing call frames in order to hide such code from the debugger.

Source/WebInspectorUI:

We used to preclude any debugging from errors stemming from code evaluated in the console
as we would always set the doNotPauseOnExceptionsAndMuteConsole parameter to "false" when
calling JavaScriptLogViewController._evaluateInInspectedWindow(). However, it is desirable
to allow debugging code ran from the console.

We now allow debugging in such a scenario and we filter out call frames coming from the
Web Inspector injected script as well as the call frame for the console prompt such that
we only pause in the debugger in case the exception is in code under the console prompt
and not the console code prompt itself.

Additionally, to prevent stepping out to call frames we may have filtered out, we disable
the "step out" button in cases where there are no further frames in the frontend to go out to.

Reviewed by Timothy Hatcher.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Filter out call frames that have a URL coming from Web Inspector injected script by looking
for a URL starting with the "__WebInspector" prefix. If we determine that there are no call
frames left after filtering, we resume code evaluation such that we only pause in the debugger
when the exception is in code evluated under the console prompt.

* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
Monitor any change to the active call frame such that we may tie the state of the
"step out" button to the availability of a call frame to step out to in the filtered
list set on the DebuggerManager.

* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Set the doNotPauseOnExceptionsAndMuteConsole to "false" when calling _evaluateInInspectedWindow()
in order to allow pausing on exceptions coming from code evalued in the console. Also, explicitly
set a sourceURL for the script to evaluate such that we may identify its origin when filtering
call frames stemming from inspector code.

* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Filter out any script resource starting with the Web Inspector-specific "__WebInspector" prefix
so that injected script does not show up.

LayoutTests:

Reviewed by Timothy Hatcher.

* platform/mac/inspector/console/command-line-api-expected.txt:
Take into account the addition of a sourceURL to inspector/InjectedScriptSource.js.

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

8 years agoSupport Vector<Ref<T>>.
akling@apple.com [Tue, 3 Sep 2013 19:30:20 +0000 (19:30 +0000)]
Support Vector<Ref<T>>.
<https://webkit.org/b/120637>

Reviewed by Antti Koivisto.

Source/WebCore:

Use Vector<Ref<T>> internally in Page.

* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::refreshPlugins):

    Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
    since we know they are not going to be null.

(WebCore::Page::pluginViews):

    Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
    writable vector as an argument. Clean up loops with 'auto'.

(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):

    Tweaked for pluginViews() returning a Vector now.

(WebCore::Page::setVisibilityState):

    Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.

Source/WTF:

Add a Ref(const T&) constructor to enable Vector<Ref<T>>. This looks a bit awkward
but is necessary for Vector::append(const T&) to find a constructor.

An alternative would be to add something like std::vector::emplace_back, but I can't
think of a good name for that, and it'd be nice if append() would "just work."

Also add operator->(). I initially excluded this because I felt it made for
unsafe-looking code. Things quickly got out of hand with .get() everywhere though.

IMO -> looks OK as long as it's only used on the first link in a dereference chain,
as that variable and its type will be "in context."

* wtf/Ref.h:
(WTF::Ref::Ref):
(WTF::Ref::~Ref):
(WTF::Ref::operator->):
(WTF::Ref::get):
* wtf/VectorTraits.h:

    Add simple traits for Ref<T> so it can be moved around freely by Vector.

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

8 years ago[CSS Grid Layout] Add parsing for named grid lines
svillar@igalia.com [Tue, 3 Sep 2013 19:14:41 +0000 (19:14 +0000)]
[CSS Grid Layout] Add parsing for named grid lines
https://bugs.webkit.org/show_bug.cgi?id=119540

Reviewed by Andreas Kling.

From Blink r150381,r150587 by <jchaffraix@chromium.org>

Source/WebCore:

Adds parsing support for named grid lines at <grid-line> level,
i.e., inside grid-{row|column}-{start|end}. This change covers
only the parsing, layout changes coming in a follow up patch.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
(WebCore::CSSParser::parseGridPosition):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::createGridPosition):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::setExplicitPosition):
(WebCore::GridPosition::setSpanPosition):
(WebCore::GridPosition::integerPosition):
(WebCore::GridPosition::namedGridLine):

LayoutTests:

Added several new test cases which include different types of
named grid lines, this means including the names at different
positions, multiple names per line or mixing names with keywords
like 'span'.

* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:

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

8 years ago [Mac] Hyphenation respects regional format settings language instead of prima...
ap@apple.com [Tue, 3 Sep 2013 19:00:52 +0000 (19:00 +0000)]
    [Mac] Hyphenation respects regional format settings language instead of primary language
        https://bugs.webkit.org/show_bug.cgi?id=120641

        Reviewed by Dan Bernstein.

        Fixes hyphenation tests on my machine with non-English regional format settings.

        * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
        Use primary UI language for hyphenation, not regional settings language.

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

8 years ago[GTK][EFL] include missing localized strings for subtitle auto track
commit-queue@webkit.org [Tue, 3 Sep 2013 19:00:11 +0000 (19:00 +0000)]
[GTK][EFL] include missing localized strings for subtitle auto track
https://bugs.webkit.org/show_bug.cgi?id=120629

those methods are necessary to show the "Auto" track on webkitgtk

Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2013-09-03
Reviewed by Gustavo Noronha Silva.

* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::textTrackAutomaticMenuItemText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackAutomaticMenuItemText):

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

8 years agoRequire layout when -webkit-overflow-scrolling changes
dbates@webkit.org [Tue, 3 Sep 2013 18:51:45 +0000 (18:51 +0000)]
Require layout when -webkit-overflow-scrolling changes
https://bugs.webkit.org/show_bug.cgi?id=120535

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/repaint/overflow-scroll-touch-repaint.html

We want to require a layout when the value of -webkit-overflow-scrolling changes
since -webkit-overflow-scrolling creates a stacking context.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):

LayoutTests:

Add a test to ensure we perform a layout and repaint when the
value of -webkit-overflow-scrolling changes on an element.

At the time of writing, the iOS port enables ACCELERATED_OVERFLOW_SCROLLING.

* fast/repaint/overflow-scroll-touch-repaint-expected.txt: Added.
* fast/repaint/overflow-scroll-touch-repaint.html: Added.
* platform/efl/TestExpectations: Skip test fast/repaint/overflow-scroll-touch-repaint.html
since this platform doesn't enable ACCELERATED_OVERFLOW_SCROLLING.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.
* platform/wincairo/TestExpectations: Ditto.

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

8 years agoSupport the "json" responseType and JSON response entity in XHR
rniwa@webkit.org [Tue, 3 Sep 2013 18:45:51 +0000 (18:45 +0000)]
Support the "json" responseType and JSON response entity in XHR
https://bugs.webkit.org/show_bug.cgi?id=73648

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Based on the patch written by Jarred Nicholls.

Add JSC::JSONParse. This function will be used in XMLHttpRequest.response of type 'json'.

* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSONObject.cpp:
(JSC::JSONParse):
* runtime/JSONObject.h:

Source/WebCore:

Based on the patch written by Jarred Nicholls.

Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
unlike other response types like 'document' and 'blob' for which the parsed response object is cached
in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.

Also refactored the various code to share the code.

Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
       fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
       fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html

* ForwardingHeaders/runtime/JSONObject.h: Added.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
(WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
Call didCacheResponseJSON to set the cache status and clear the original response buffer.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
a json response.
(WebCore::XMLHttpRequest::responseText):
(WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
response buffer to save memory.
(WebCore::XMLHttpRequest::responseXML):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::responseType):
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didReceiveData):

* xml/XMLHttpRequest.h:
(WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
(WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
(WebCore::XMLHttpRequest::responseCacheIsValid): Added.
(WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
Also modified to decode when the response type is ResponseTypeJSON.

* xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
used when the response type is 'json'.

LayoutTests:

Add regression tests for XMLHttpRequest.response of type 'json'.

Two of these tests (valid & invalid) come from Jarred Nicholls's original patch.

* fast/xmlhttprequest/resources/xmlhttprequest-responsetype-json-utf-16.json: Added.
* fast/xmlhttprequest/resources/xmlhttprequest-responsetype-json.json: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html: Added.

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

8 years agoUnreviewed, rolling out r154881.
commit-queue@webkit.org [Tue, 3 Sep 2013 18:30:08 +0000 (18:30 +0000)]
Unreviewed, rolling out r154881.
http://trac.webkit.org/changeset/154881
https://bugs.webkit.org/show_bug.cgi?id=120643

Crashes on macworld.com (Requested by kling on #webkit).

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):

LayoutTests:

* fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt: Removed.
* fast/dom/Element/setAttributeNode-for-existing-attribute.html: Removed.

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

8 years agoCheck WTF::VectorFiller template argument type size in compile time
mikhail.pozdnyakov@intel.com [Tue, 3 Sep 2013 17:33:22 +0000 (17:33 +0000)]
Check WTF::VectorFiller template argument type size in compile time
https://bugs.webkit.org/show_bug.cgi?id=120631

Reviewed by Darin Adler.

The template argument's type size in WTF::VectorFiller 'memset' specialization
should be checked during compilation rather than in runtime.

* wtf/Vector.h:

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

8 years ago[GTK] gdk threads deprecated functions calls should be refactored
commit-queue@webkit.org [Tue, 3 Sep 2013 17:08:13 +0000 (17:08 +0000)]
[GTK] gdk threads deprecated functions calls should be refactored
https://bugs.webkit.org/show_bug.cgi?id=120070

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-09-03
Reviewed by Mario Sanchez Prada.

Removed deprecated functions gdk_threads_leave()/gdk_threads_enter() functions since
there is no more checks for threads lock in GTK 3.6.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunAsModal):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

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

8 years ago[GStreamer] Don't set state to NULL until element is destroyed
commit-queue@webkit.org [Tue, 3 Sep 2013 16:51:19 +0000 (16:51 +0000)]
[GStreamer] Don't set state to NULL until element is destroyed
https://bugs.webkit.org/show_bug.cgi?id=117354

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-03
Reviewed by Philippe Normand.

Don't set playbin to NULL until it is going to be destroyed or if we stay
for too long on the READY state. Instead only set the state to READY as this
allows much faster state changes to PAUSED/PLAYING again. playbin internally
caches some state that is destroyed when setting it to NULL.
This state is independent of the URI and it is even possible to change the
URI in READY state.

To avoid having resources (e.g. audio devices) open indefinitely,
when setting the state to READY we create a timeout and if the timeout
is reached we reset the pipeline state to NULL to free resources.

Also now all state changes use the changePipelineState method instead of setting
the playbin state directly with gst_element_set_state, so we have a better control
of when we are requesting state changes.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

8 years ago[GTK] [WK2] TestContextMenu default-menu fails
commit-queue@webkit.org [Tue, 3 Sep 2013 16:51:03 +0000 (16:51 +0000)]
[GTK] [WK2] TestContextMenu default-menu fails
https://bugs.webkit.org/show_bug.cgi?id=120459

Patch by Brian Holt <brian.holt@samsung.com> on 2013-09-03
Reviewed by Gustavo Noronha Silva.

Add context menu items for downloading media elements.

* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetActionTag):
(webkitContextMenuActionGetForContextMenuItem):
(webkitContextMenuActionGetLabel):
* UIProcess/API/gtk/WebKitContextMenuActions.h:
* UIProcess/API/gtk/tests/TestContextMenu.cpp:

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

8 years agoCodeBlock::jettison() should be implicit
fpizlo@apple.com [Tue, 3 Sep 2013 16:39:29 +0000 (16:39 +0000)]
CodeBlock::jettison() should be implicit
https://bugs.webkit.org/show_bug.cgi?id=120567

Reviewed by Oliver Hunt.

This is a risky change from a performance standpoint, but I believe it's
necessary. This makes all CodeBlocks get swept by GC. Nobody but the GC
can delete CodeBlocks because the GC always holds a reference to them.
Once a CodeBlock reaches just one reference (i.e. the one from the GC)
then the GC will free it only if it's not on the stack.

This allows me to get rid of the jettisoning logic. We need this for FTL
tier-up. Well; we don't need it, but it will help prevent a lot of bugs.
Previously, if you wanted to to replace one code block with another, you
had to remember to tell the GC that the previous code block is
"jettisoned". We would need to do this when tiering up from DFG to FTL
and when dealing with DFG-to-FTL OSR entry code blocks. There are a lot
of permutations here - tiering up to the FTL, OSR entering into the FTL,
deciding that an OSR entry code block is not relevant anymore - just to
name a few. In each of these cases we'd have to jettison the previous
code block. It smells like a huge source of future bugs.

So I made jettisoning implicit by making the GC always watch out for a
CodeBlock being owned solely by the GC.

This change is performance neutral.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::visitAggregate):
(JSC::CodeBlock::jettison):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
(JSC::CodeBlockSet::mark):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::CommonData):
* heap/CodeBlockSet.cpp: Added.
(JSC::CodeBlockSet::CodeBlockSet):
(JSC::CodeBlockSet::~CodeBlockSet):
(JSC::CodeBlockSet::add):
(JSC::CodeBlockSet::clearMarks):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
(JSC::CodeBlockSet::traceMarked):
* heap/CodeBlockSet.h: Added.
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::add):
* heap/ConservativeRoots.h:
* heap/DFGCodeBlocks.cpp: Removed.
* heap/DFGCodeBlocks.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::deleteAllCompiledCode):
(JSC::Heap::deleteUnmarkedCompiledCode):
* heap/Heap.h:
* interpreter/JSStack.cpp:
(JSC::JSStack::gatherConservativeRoots):
* interpreter/JSStack.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):
* runtime/Executable.h:
* runtime/VM.h:

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

8 years ago[Qt] Images scaled poorly on composited canvas
allan.jensen@digia.com [Tue, 3 Sep 2013 15:32:07 +0000 (15:32 +0000)]
[Qt] Images scaled poorly on composited canvas
https://bugs.webkit.org/show_bug.cgi?id=120632

Reviewed by Jocelyn Turcotte.

Explicitly set a imageInterpolationQuality on the TextureMapper, because
InterpolationDefault may be interpreted differently by nested GraphicsContexts.

* WebCoreSupport/TextureMapperLayerClientQt.cpp:
(TextureMapperLayerClientQt::renderCompositedLayers):

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

8 years ago[WinCairo] Unneeded code in method GlyphPage::fill().
commit-queue@webkit.org [Tue, 3 Sep 2013 14:50:53 +0000 (14:50 +0000)]
[WinCairo] Unneeded code in method GlyphPage::fill().
https://bugs.webkit.org/show_bug.cgi?id=120634

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-09-03
Reviewed by Andreas Kling.

* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.

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

8 years ago[Qt] Tiled-backing store not clipped to frame or visible rect
allan.jensen@digia.com [Tue, 3 Sep 2013 14:47:01 +0000 (14:47 +0000)]
[Qt] Tiled-backing store not clipped to frame or visible rect
https://bugs.webkit.org/show_bug.cgi?id=120606

Reviewed by Jocelyn Turcotte.

Clip painting from the tiled-backing store to the frame rect.

* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::renderFromTiledBackingStore):

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

8 years ago[CSSRegions] Pseudo-elements as regions should not be exposed to JS
mihnea@adobe.com [Tue, 3 Sep 2013 14:43:20 +0000 (14:43 +0000)]
[CSSRegions] Pseudo-elements as regions should not be exposed to JS
https://bugs.webkit.org/show_bug.cgi?id=120633

Reviewed by Andreas Kling.

Source/WebCore:

Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
for pseudo-elements, we should not return these as regions in JS.

Tests: fast/regions/get-regions-by-content-pseudo.html
       fast/regions/webkit-named-flow-get-regions-pseudo.html

* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
otherwise we may get an index that cannot be used with getRegions().
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):

LayoutTests:

Add tests with pseudo-elements as regions checking the following API:
WebKitNamedFlow::getRegions(), WebKitNamedFlow::getRegionsByContent()
Because we do not return the pseudo-elements as regions in the region list,
i modified WebKitNamedFlow::firstEmptyRegionIndex to skip these regions too.

* fast/regions/get-regions-by-content-pseudo-expected.txt: Added.
* fast/regions/get-regions-by-content-pseudo.html: Added.
* fast/regions/webkit-named-flow-get-regions-pseudo-expected.txt: Added.
* fast/regions/webkit-named-flow-get-regions-pseudo.html: Added.

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

8 years agoREGRESSION(r154967): http appcache tests crashing on WK1
zandobersek@gmail.com [Tue, 3 Sep 2013 14:20:59 +0000 (14:20 +0000)]
REGRESSION(r154967): http appcache tests crashing on WK1
https://bugs.webkit.org/show_bug.cgi?id=120620

Reviewed by Andreas Kling.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
before the method moves on to destroying its ApplicationCacheGroup instance.

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

8 years ago[Qt] Unreviewed gardening. Skip some failing tests.
kadam@inf.u-szeged.hu [Tue, 3 Sep 2013 13:36:17 +0000 (13:36 +0000)]
[Qt] Unreviewed gardening. Skip some failing tests.

* platform/qt-wk1/TestExpectations:
* platform/qt/TestExpectations:

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

8 years ago[EFL] accessibility/aria-describedby-on-input.html is failing
commit-queue@webkit.org [Tue, 3 Sep 2013 13:25:23 +0000 (13:25 +0000)]
[EFL] accessibility/aria-describedby-on-input.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112027

Unreviewed EFL gardening.

accessibility/aria-describedby-on-input.html passes after r154976.

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

* platform/efl-wk2/TestExpectations:

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

8 years ago[CMake] Fix detection of x86_64 platform with MSVC
paroga@webkit.org [Tue, 3 Sep 2013 13:25:14 +0000 (13:25 +0000)]
[CMake] Fix detection of x86_64 platform with MSVC
https://bugs.webkit.org/show_bug.cgi?id=116662

Reviewed by Gyuyoung Kim.

Use ${MSVC_CXX_ARCHITECTURE_ID} instead of ${CMAKE_SYSTEM_PROCESSOR}, since
the later one just resolves to the host processor on Windows.

* CMakeLists.txt:

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

8 years ago[gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source...
commit-queue@webkit.org [Tue, 3 Sep 2013 13:16:54 +0000 (13:16 +0000)]
[gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-03
Reviewed by Philippe Normand.

Source/WebCore:

Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::toSoupMessage):
Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
Accept-Encoding header is also respected.

LayoutTests:

Add test to check that video requests will send no "Accept-Encoding" header.

* http/tests/media/video-accept-encoding-expected.txt: Added.
* http/tests/media/video-accept-encoding.cgi: Added.
* http/tests/media/video-accept-encoding.html: Added.

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

8 years agoSource/WebCore: [AX][ATK] Added support for sort and help attributes.
commit-queue@webkit.org [Tue, 3 Sep 2013 11:29:33 +0000 (11:29 +0000)]
Source/WebCore: [AX][ATK] Added support for sort and help attributes.
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Added support for aria-sort and aria-help attributes.

Test: accessibility/aria-sort.html

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):

Tools: [AX][ATK] Added support for sort and help attributes
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Added missing implementation to AccessibilityUIElement::helpText and support for
aria-sort attribute.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute):
(WTR::AccessibilityUIElement::helpText):

LayoutTests: [AX][ATK] Added support for sort and help attributes
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Sharing aria-sort.html specific mac test with efl and gtk.
Changing specific expectations of some accessibility tests.

* accessibility/aria-sort-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-sort-expected.txt.
* accessibility/aria-sort.html: Renamed from LayoutTests/platform/mac/accessibility/aria-sort.html.
* platform/efl-wk2/TestExpectations:
* platform/efl-wk2/accessibility/image-link-expected.txt:
* platform/efl-wk2/accessibility/image-map2-expected.txt:
* platform/efl-wk2/accessibility/table-cell-spans-expected.txt:
* platform/efl-wk2/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/image-link-expected.txt:
* platform/gtk/accessibility/image-map2-expected.txt:
* platform/gtk/accessibility/table-cell-spans-expected.txt:
* platform/gtk/accessibility/table-cells-expected.txt:

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

8 years ago[Qt] Remove dead code for QtXmlPatterns
allan.jensen@digia.com [Tue, 3 Sep 2013 10:10:37 +0000 (10:10 +0000)]
[Qt] Remove dead code for QtXmlPatterns
https://bugs.webkit.org/show_bug.cgi?id=120624

Reviewed by Simon Hausmann.

Remove code supporting XSLT using QtXmlPatterns which has been
dead for some time.

* Target.pri:
* WebCore.pri:
* dom/TransformSourceQt.cpp: Removed.
* xml/XSLStyleSheetQt.cpp: Removed.
* xml/XSLTProcessorQt.cpp: Removed.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::doEnd):
(WebCore::XMLDocumentParser::parseProcessingInstruction):

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

8 years ago[Qt][WK1] PageVisibility tests are flaky
allan.jensen@digia.com [Tue, 3 Sep 2013 08:54:26 +0000 (08:54 +0000)]
[Qt][WK1] PageVisibility tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=120418

Reviewed by Jocelyn Turcotte.

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::resetPageVisibility):
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Tools:

Implement resetPageVisibility so we can reset visibility without
emiting visibility state change events.

* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::resetPageVisibility):

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

8 years ago[CSS Regions] position: fixed is computed relative to the first region, not the viewport
mihnea@adobe.com [Tue, 3 Sep 2013 08:21:16 +0000 (08:21 +0000)]
[CSS Regions] position: fixed is computed relative to the first region, not the viewport
https://bugs.webkit.org/show_bug.cgi?id=111176

Reviewed by David Hyatt.

Source/WebCore:

Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
are collected by the flow thread.

Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
       fast/regions/element-in-named-flow-fixed-from-absolute.html
       fast/regions/element-inflow-fixed-from-outflow-static.html
       fast/regions/element-outflow-static-from-inflow-fixed.html
       fast/regions/fixed-element-transformed-parent.html
       fast/regions/fixed-in-named-flow-scroll.html
       fast/regions/fixed-inside-fixed-in-named-flow.html
       fast/regions/fixed-inside-named-flow-zIndex.html
       fast/regions/fixed-pos-elem-in-namedflow-noregions.html
       fast/regions/fixed-pos-region-in-nested-flow.html

* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::collectFixedPositionedLayers):
Return the list of layers for the fixed positioned elements with named flows as containing blocks.
Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
* rendering/FlowThreadController.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
For fixed positioned elements, width and height are given by the view instead of the first region.
* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
Modified for the fixed positioned elements inside named flows with the named flows as containing block
to take into account the view scroll.
(WebCore::compareZIndex):
Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
(WebCore::RenderLayer::paintFixedLayersInNamedFlows):
Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
instead of the region -> named flow layer.
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
We do not support yet the accelerated compositing for elements in named flows,
so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
(WebCore::hasFixedPosInNamedFlowContainingBlock):
(WebCore::RenderObject::containerForRepaint):
Changed to take into account that RenderView should be the repaintContainer for the
fixed positioned elements with named flow as the containing block.
* rendering/RenderObject.h:

LayoutTests:

Added new tests and changed the existing ones that were relying on incorrect positioning
for fixed elements.

* fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Added.
* fast/regions/element-in-named-flow-absolute-from-fixed.html: Added.
* fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Added.
* fast/regions/element-in-named-flow-fixed-from-absolute.html: Added.
* fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Added.
* fast/regions/element-inflow-fixed-from-outflow-static.html: Added.
* fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Added.
* fast/regions/element-outflow-static-from-inflow-fixed.html: Added.
* fast/regions/fixed-element-transformed-parent-expected.txt: Added.
* fast/regions/fixed-element-transformed-parent.html: Added.
* fast/regions/fixed-in-named-flow-scroll-expected.txt: Added.
* fast/regions/fixed-in-named-flow-scroll.html: Added.
* fast/regions/fixed-inside-fixed-in-named-flow-expected.html: Added.
* fast/regions/fixed-inside-fixed-in-named-flow.html: Added.
* fast/regions/fixed-inside-named-flow-zIndex-expected.html: Added.
* fast/regions/fixed-inside-named-flow-zIndex.html: Added.
* fast/regions/fixed-pos-elem-in-namedflow-noregions-expected.html: Added.
* fast/regions/fixed-pos-elem-in-namedflow-noregions.html: Added.
* fast/regions/fixed-pos-elem-in-region-expected.html:
* fast/regions/fixed-pos-elem-in-region.html:
* fast/regions/fixed-pos-region-in-nested-flow-expected.html: Added.
* fast/regions/fixed-pos-region-in-nested-flow.html: Added.

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

8 years ago[GTK] libsoup upversion to fix a gstreamer issue, bug115354
changseok.oh@collabora.com [Tue, 3 Sep 2013 08:15:01 +0000 (08:15 +0000)]
[GTK] libsoup upversion to fix a gstreamer issue, bug115354
https://bugs.webkit.org/show_bug.cgi?id=120613

Reviewed by Philippe Normand.

Up version of libsoup to 2.43.90. But the exact version which we'll use is not 2.43.90.
To fix bug115354, we need the Andre's patch for libsoup, but the lastest release
does not contain it. https://bugzilla.gnome.org/show_bug.cgi?id=706338
For the reason, we'll use libsoup git repo directly for a while until the next
libsoup release.

* gtk/jhbuild.modules:

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

8 years ago[BlackBerry] Remove LayerData::LayerProgram
anilsson@rim.com [Tue, 3 Sep 2013 07:29:18 +0000 (07:29 +0000)]
[BlackBerry] Remove LayerData::LayerProgram
https://bugs.webkit.org/show_bug.cgi?id=120601

Reviewed by Anders Carlsson.

JIRA 490672
All layer contents are RGBA now, so there's no need to support BGRA any
more and the LayerData::LayerProgram enum can be removed. Related dead
code was removed.

No new tests, no change in behavior.

* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
(WebCore::LayerRenderer::createProgram):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerWebKitThread.h:
* platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
(WebCore::PluginLayerWebKitThread::setPluginView):

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

8 years ago[GStreamer] Video player sets system volume to 100%
calvaris@igalia.com [Tue, 3 Sep 2013 07:16:02 +0000 (07:16 +0000)]
[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=118974

Reviewed by Philippe Normand.

In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
(WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
Declared and added default implementation for the interface method.
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
Set the volume only if not platform volume is required and added log.

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

8 years ago* inspector/InspectorProfilerAgent.cpp:
darin@apple.com [Tue, 3 Sep 2013 06:02:11 +0000 (06:02 +0000)]
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
comment I forgot to address in my last check-in.

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

8 years agoCut down on double hashing and code needlessly using hash table iterators
darin@apple.com [Tue, 3 Sep 2013 06:00:45 +0000 (06:00 +0000)]
Cut down on double hashing and code needlessly using hash table iterators
https://bugs.webkit.org/show_bug.cgi?id=120611

Reviewed by Andreas Kling.

Source/WebCore:

Some of these changes are primarily code cleanup, but others could provide
a small code size and speed improvement by avoiding extra hashing.

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Watchers::find): Use get instead of find.
(WebCore::Geolocation::Watchers::remove): Use take instead of find.
(WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
value from remove to avoid hashing twice.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::addAutomaticPullNode): Use the return value from
add to avoid hashing twice.
(WebCore::AudioContext::removeAutomaticPullNode): Use the return value
from remove to avoid hashing twice.

* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::connect): Use the return value from add to avoid
hashing twice.
(WebCore::AudioNodeInput::disconnect): Use the return value from remove
to avoid hashing twice.

* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::connect): Use the return value from add to avoid
hashing twice.
(WebCore::AudioParam::disconnect): Use the return value from remove to
avoid hashing twice.

* bridge/NP_jsobject.cpp:
(ObjectMap::remove): Use remove instead of find/remove.

* dom/Node.cpp:
(WebCore::Node::~Node): Use the return value from remove instead of
find/remove.

* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::removeProfile): Remove needless
calls to contains.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::removeSubresourceLoader): Use the return
value from remove instead of find/remove.

* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
return value from remove to avoid hashing twice.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
remove instead of find/remove.
(WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
call to contains to avoid hashing twice. It's fine to do the check
for an empty hash table unconditionally.

* page/DOMWindow.cpp:
(WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
(WebCore::removeUnloadEventListener): Ditto. Also use remove instead
of find/remove.
(WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
of find/removeAll.
(WebCore::addBeforeUnloadEventListener): Ditto.
(WebCore::removeBeforeUnloadEventListener): Ditto.
(WebCore::removeAllBeforeUnloadEventListeners): Ditto.

* page/FrameView.cpp:
(WebCore::FrameView::removeViewportConstrainedObject): Use the return
value from remove to avoid hashing twice.
(WebCore::FrameView::removeScrollableArea): Use the return value from
remove instead of find/remove.
(WebCore::FrameView::containsScrollableArea): Use && instead of an if
statement in a way that is idiomatic for this kind of function.

* page/Page.cpp:
(WebCore::Page::addRelevantRepaintedObject): Use the return value from
remove instead of find/remove.

* page/PageGroup.cpp:
(WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
of find/remove.
(WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
value from remove instead of find/remove.

* page/PerformanceUserTiming.cpp:
(WebCore::clearPeformanceEntries): Removed a needless call to contains.

* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::removeClient): Use the return value
from remove instead of find/remove.
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
instead of find/remove.

* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::removeLayer): Use the return value from remove
instead of find/remove.

* platform/win/WindowMessageBroadcaster.cpp:
(WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
of find/remove. It's fine to do the check for an empty hash table unconditionally.

* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
from remove instead of find/remove.

* rendering/style/StyleCustomFilterProgramCache.cpp:
(WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
(WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
in an assertion.
(WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
find/remove.

* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::removeClient): Use the return value from remove
instead of find/remove.

* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
to contains.
(WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
remove instead of find/remove. It's fine to do the check for an empty hash
table unconditionally.
(WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
remove instead of find/remove. Also removed unhelpful assertions. One is
already done by HashMap, and the other is just checking a basic invariant
of every HashMap that doesn't need to be checked.

* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
to contains.

* svg/properties/SVGAnimatedProperty.cpp:
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
remove that takes an iterator rather than the one that takes a key, so
we don't need to redo the hashing.

Source/WebKit2:

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForMessage): Use take instead of find/remove.

* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::removePageGroup): Use the return value from remove
instead of find/remove.

* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
(WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
(WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
Use take instead of find/remove.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::frameDidFinishLoading): Use take instead of find/remove.
(WebKit::NetscapePlugin::frameDidFail): Use take instead of find/remove.

* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem): Use take instead of find/remove.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didFinishCheckingText): Use take instead of get/remove so we
hash only once.
(WebKit::WebPage::didCancelCheckingText): Ditto.
(WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): Use the return
value from remove instead of contains/remove so we hash only once.

Source/WTF:

Double hashing is common in code that needs to combine a remove with some
action to only be done if the code is removed. The only way to avoid it is
to write code using find and a hash table iterator. To help with this, add
a boolean return value to remove functions to indicate if anything was removed.

Double hashing also happens in code that does a get followed by a remove.
The take function is helpful in this case. To help with this, add a takeFirst
funciton to ListHashSet.

* wtf/HashCountedSet.h:
(WTF::HashCountedSet::removeAll): Added a boolean return value, analogous to the one
that the HashCountedSet::remove function already has.

* wtf/HashMap.h:
(WTF::HashMap::remove): Added a boolean return value, true if something was removed.
* wtf/HashSet.h:
(WTF::HashSet::remove): Ditto.
* wtf/RefPtrHashMap.h:
(WTF::RefPtrHashMap::remove): Ditto.

* wtf/ListHashSet.h:
(WTF::ListHashSet::takeFirst): Added.
(WTF::ListHashSet::takeLast): Added.
(WTF::ListHashSet::remove): Added a boolean return value, true if something was removed.

* wtf/WTFThreadData.h:
(JSC::IdentifierTable::remove): Use the new remove return value to get rid of most of
the code in this function.

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

8 years agoRemove duplicate entries found by Xcode in WTF project
ddkilzer@apple.com [Mon, 2 Sep 2013 20:30:49 +0000 (20:30 +0000)]
Remove duplicate entries found by Xcode in WTF project

Platform.h was duplicated in r111778 after being added in
r111504.

A dangling reference to Ref.h was added in r154962.

* WTF.xcodeproj/project.pbxproj: Remove duplicate entries for
Platform.h and Ref.h.

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

8 years agoGenerate isFooElement() functions from tagname data.
akling@apple.com [Mon, 2 Sep 2013 20:10:11 +0000 (20:10 +0000)]
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>

Reviewed by Antti Koivisto.

Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.

Removed all the hand-written isFooElement() functions that only checked tag name.

* html/HTMLTagNames.in:
* svg/svgtags.in:

    Added "generateTypeChecks" attribute as appropriate.

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:

    Added to build systems based on how HTMLNames.h was done.
    We're just outputting an additional header file in the generated code directory
    so I suspect most ports will just pick this up automagically.

* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):

    Generate a separate file for each namespace with isFooElement() helpers for
    elements with "generateTypeChecks" attribute set.

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

8 years agoActually add Ref.h
akling@apple.com [Mon, 2 Sep 2013 19:41:20 +0000 (19:41 +0000)]
Actually add Ref.h

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

8 years ago[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
darin@apple.com [Mon, 2 Sep 2013 18:55:05 +0000 (18:55 +0000)]
[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
https://bugs.webkit.org/show_bug.cgi?id=120569

Reviewed by Andy Estes.

Source/JavaScriptCore:

* API/JSValue.mm:
(valueToString): Use CFBridgingRelease.

Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(textMarkerForVisiblePosition):
Use CFBridgingRelease.

* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
(WebCore::KURL::createCFURL): Get rid of needless local variable.

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange):
(WebCore::URLWithData):
(WebCore::userVisibleString):
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *):
Use CFBridgingRelease.

Source/WebKit/mac:

* Misc/WebNSFileManagerExtras.mm:
(-[NSFileManager _webkit_startupVolumeName]): Removed some unneeded locals.
Got rid of the pointless ref/leakRef/HardAutorelease dance, and replaced it
with a [[x copy] autorelease].

* Misc/WebNSURLExtras.mm:
(-[NSURL _web_URLWithLowercasedScheme]): Use CFBridgingRelease, and got rid
of unneeded type casts.

* Plugins/WebBasePluginPackage.mm:
(+[WebBasePluginPackage preferredLocalizationName]): Use CFBridgingRelease.
* WebView/WebPDFRepresentation.mm:
(-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Ditto.

* WebView/WebView.mm:
(+[WebView _setCacheModel:]): Use CFBridgingRelease and got rid of unneeded
type cast.

Source/WebKit2:

* Platform/mac/StringUtilities.mm:
(WebKit::nsStringFromWebCoreString): Use CFBridgingRelease. Also
changed condition to be a little cleaner and use a constant string for empty
strings as well as null strings.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased): Switched from autorelease to CFBridgingRelease for strings,
which eliminates a type cast and makes this work under GC, although I don't
think we should compile WebKit2 for GC.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Use CFBridgingRelease.

Source/WTF:

* wtf/ObjcRuntimeExtras.h: Added a FIXME about miscapitalization of ObjC.
Deleted HardAutorelease.
(wtfObjcMsgSend): Dropped the use of abbreviations in local class and argument names.
(wtfCallIMP): Ditto.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(dump): Use CFBridgingRelease.

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

8 years agoRef: A smart pointer for the reference age.
akling@apple.com [Mon, 2 Sep 2013 18:50:01 +0000 (18:50 +0000)]
Ref: A smart pointer for the reference age.
<https://webkit.org/b/120570>

Reviewed by Antti Koivisto.

Source/WebCore:

Use Ref<T> for various stack guards where null checking isn't needed.

Source/WTF:

Add a very simple simple Ref<T> smart pointer class that is never null.
It's initialized by passing a T& to the constructor and cannot be assigned to.

operator-> is not overloaded, to prevent unsafe-looking code.
The value is extracted by "T& get()", since C++ does not let you override operator.()

* wtf/Ref.h:

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

8 years agoSimplify DocumentType handling.
akling@apple.com [Mon, 2 Sep 2013 17:05:18 +0000 (17:05 +0000)]
Simplify DocumentType handling.
<https://webkit.org/b/120529>

Reviewed by Antti Koivisto.

Removed the insertedInto()/removedFrom() handlers from DocumentType.

Document no longer keeps a pointer to its doctype node, it was only used for the
document.doctype DOM API, which now just looks through the list of (<=2) children.

The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
into Document::childrenChanged().

We no longer clear the style resolver on doctype insertion/removal since it
doesn't actually affect style anyway.

Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.

* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::doctype):
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/DocumentType.cpp:
* dom/DocumentType.h:
* editing/markup.cpp:
(WebCore::documentTypeString):

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

8 years ago<https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
commit-queue@webkit.org [Mon, 2 Sep 2013 15:44:30 +0000 (15:44 +0000)]
<https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-09-02
Reviewed by Mario Sanchez Prada.

Source/WebCore:

The patch exposes aria-invalid attribute to ATK.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Added emitting state-change signal for aria-invalid event.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
Added aria-invalid attribute.

Tools:

Added few mappings in DumpRenderTree and WebKitTestRunner for aria-invalid in order to get the tests run properly.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener):
Added mapping for invalid-entry event parameter.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute):
Added mapping to aria-invalid.
(AccessibilityUIElement::stringAttributeValue):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute):
Added mapping to aria-invalid.

LayoutTests:

Unskipped accessibility/aria-invalid.html which is passing now.

* platform/gtk/TestExpectations: Removed passing test.
* platform/gtk-wk2/TestExpectations: Added test timing out in WK2 only.

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

8 years agoREGRESSION(r154909): caused many crashes on Qt WK2, EFL WK2
ossy@webkit.org [Mon, 2 Sep 2013 15:43:25 +0000 (15:43 +0000)]
REGRESSION(r154909): caused many crashes on Qt WK2, EFL WK2
https://bugs.webkit.org/show_bug.cgi?id=120600

Reviewed by Andreas Kling.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::decode): keyTime should be double here too.

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

8 years agoUnreviewed, rolling out r154955.
akling@apple.com [Mon, 2 Sep 2013 15:22:23 +0000 (15:22 +0000)]
Unreviewed, rolling out r154955.
http://trac.webkit.org/changeset/154955
https://bugs.webkit.org/show_bug.cgi?id=120605

broke xcode4 build :| (Requested by kling on #webkit).

Patch by Commit Queue <commit-queue@webkit.org> on 2013-09-02

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::HTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::HTMLAreaElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
* html/HTMLBaseElement.h:
(WebCore::isHTMLBaseElement):
(WebCore::HTMLBaseElement):
* html/HTMLCanvasElement.h:
(WebCore::isHTMLCanvasElement):
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
(WebCore::isHTMLFieldSetElement):
(WebCore::HTMLFieldSetElement):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
* html/HTMLFrameSetElement.h:
(WebCore::isHTMLFrameSetElement):
(WebCore::HTMLFrameSetElement):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::HTMLLabelElement):
* html/HTMLLegendElement.h:
(WebCore::isHTMLLegendElement):
(WebCore::HTMLLegendElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
* html/HTMLMeterElement.h:
(WebCore::isHTMLMeterElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLParamElement.h:
(WebCore::isHTMLParamElement):
(WebCore::HTMLParamElement):
* html/HTMLProgressElement.h:
(WebCore::isHTMLProgressElement):
* html/HTMLScriptElement.h:
(WebCore::isHTMLScriptElement):
* html/HTMLSourceElement.h:
(WebCore::isHTMLSourceElement):
(WebCore::HTMLSourceElement):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::HTMLStyleElement):
* html/HTMLTableElement.h:
(WebCore::isHTMLTableElement):
* html/HTMLTableRowElement.h:
(WebCore::isHTMLTableRowElement):
(WebCore::HTMLTableRowElement):
* html/HTMLTagNames.in:
* html/HTMLTextAreaElement.h:
(WebCore::isHTMLTextAreaElement):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::HTMLTitleElement):
* html/HTMLTrackElement.h:
(WebCore::isHTMLTrackElement):
(WebCore::HTMLTrackElement):
* svg/SVGElement.h:
* svg/SVGFontElement.h:
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.h:
(WebCore::isSVGFontFaceElement):
(WebCore::SVGFontFaceElement):
* svg/SVGForeignObjectElement.h:
(WebCore::isSVGForeignObjectElement):
(WebCore::SVGForeignObjectElement):
* svg/SVGImageElement.h:
(WebCore::isSVGImageElement):
* svg/SVGScriptElement.h:
(WebCore::isSVGScriptElement):
* svg/svgtags.in:

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

8 years agoClean up ContainerNode::childrenChanged
antti@apple.com [Mon, 2 Sep 2013 15:17:50 +0000 (15:17 +0000)]
Clean up ContainerNode::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=120599

Reviewed by Andreas Kling.

- Make childrenChanged take a single struct argument instead of a long list of arguments.
- Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
- Remove use of Node*, give the change range as Elements.
- Related cleanups.

* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/Attr.h:
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::notifyChildRemoved):

    Add private helpers for setting up the struct.

(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAppendChild):
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):

    Clean up and simplify. Since we now get element range automatically we don't need to compute it.

(WebCore::Element::childrenChanged):
(WebCore::Element::finishParsingChildren):
* dom/Element.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childrenChanged):
* dom/ShadowRoot.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::childrenChanged):
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

    Try to keep the existing behavior. This code needs  more cleanup to be sane. It shouldn't operate on Nodes
    as it only really cares about Elements.

* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::childrenChanged):
* html/HTMLFieldSetElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::childrenChanged):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::childrenChanged):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::childrenChanged):
* html/HTMLOutputElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::childrenChanged):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged):
* html/HTMLSelectElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::childrenChanged):
* html/HTMLStyleElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::childrenChanged):
* html/HTMLTitleElement.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
* html/shadow/InsertionPoint.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::childrenChanged):
* svg/SVGElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::childrenChanged):
* svg/SVGFELightElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::childrenChanged):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::childrenChanged):
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::childrenChanged):
* svg/SVGStyleElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::childrenChanged):
* svg/SVGTitleElement.h:

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

8 years ago[Qt] Unreviewed gardening. Skip some failing tests.
kadam@inf.u-szeged.hu [Mon, 2 Sep 2013 15:15:55 +0000 (15:15 +0000)]
[Qt] Unreviewed gardening. Skip some failing tests.

* platform/qt/TestExpectations:

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

8 years agoGenerate isFooElement() functions from tagname data.
akling@apple.com [Mon, 2 Sep 2013 15:12:17 +0000 (15:12 +0000)]
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>

Reviewed by Antti Koivisto.

Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.

Removed all the hand-written isFooElement() functions that only checked tag name.

* html/HTMLTagNames.in:
* svg/svgtags.in:

    Added "generateTypeChecks" attribute as appropriate.

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:

    Added to build systems based on how HTMLNames.h was done.
    We're just outputting an additional header file in the generated code directory
    so I suspect most ports will just pick this up automagically.

* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):

    Generate a separate file for each namespace with isFooElement() helpers for
    elements with "generateTypeChecks" attribute set.

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

8 years agoUse edgeMode=duplicate for blurring on filter() function
krit@webkit.org [Mon, 2 Sep 2013 15:03:57 +0000 (15:03 +0000)]
Use edgeMode=duplicate for blurring on filter() function
https://bugs.webkit.org/show_bug.cgi?id=120590

Reviewed by Antti Koivisto.

Source/WebCore:

Filters on the CSS Image function filter() are not allowed to extend the
dimension of the input image. This causes weird results on blurring an image,
where the fading on the edges is clipped at the half of the fading.
We shouldn't fade edges at all and use the edgeMode=duplicate instead.
This will duplicate the pixel value on the nearest edge of the input image
instead of taking transparent black and results in nice blurred images with
sharp edges.

Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent

Test: fast/filter-image/filter-image-blur.html

* css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
(WebCore::CSSFilterImageValue::image):
* rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
    'duplicate' or 'none' depending on the consumer.
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h: Add enumeration to differ between the
    different consumers of the renderer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):  Pass consumer
    information to the renderer.

LayoutTests:

Added test to check that filter(<image>, blur(<value>)) takes
the edgeMode 'duplicate' instead of none.

* fast/filter-image/filter-image-blur-expected.html: Added.
* fast/filter-image/filter-image-blur.html: Added.
* fast/filter-image/resources/svg-blur.svg: Added.
* fast/filter-image/resources/svg-noblur.svg: Added.

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

8 years ago[ATK] Leak: Leaks in testatk.c
commit-queue@webkit.org [Mon, 2 Sep 2013 14:40:54 +0000 (14:40 +0000)]
[ATK] Leak: Leaks in testatk.c
https://bugs.webkit.org/show_bug.cgi?id=118675

Patch by Brian Holt <brian.holt@samsung.com> on 2013-09-02
Reviewed by Mario Sanchez Prada.

Fixed memory leaks by matching ref calls with unrefs.

* tests/testatk.c:
(testWebkitAtkCaretOffsets):
(testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces):
(testWebkitAtkGetTextAtOffset):
(testWebkitAtkGetTextAtOffsetNewlines):
(testWebkitAtkGetTextAtOffsetTextarea):
(testWebkitAtkGetTextAtOffsetTextInput):
(testWebkitAtkGetTextInParagraphAndBodySimple):
(testWebkitAtkGetTextInParagraphAndBodyModerate):
(testWebkitAtkTextAttributes):
(testWebkitAtkTextSelections):
(testWebkitAtkListsOfItems):

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

8 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Mon, 2 Sep 2013 14:37:38 +0000 (14:37 +0000)]
[Qt] Unreviewed gardening.
https://bugs.webkit.org/show_bug.cgi?id=120595

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

* platform/qt/TestExpectations: Skipping failing xss-DENIED tests.

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

8 years agoSave md5 correctly when jhbuildPath doesn't exist yet
commit-queue@webkit.org [Mon, 2 Sep 2013 12:48:52 +0000 (12:48 +0000)]
Save md5 correctly when jhbuildPath doesn't exist yet
https://bugs.webkit.org/show_bug.cgi?id=120548

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-09-02
Reviewed by Gustavo Noronha Silva.

After r152605, Md5 for jhbuild files are saved before the update
process, this prevents the script to restart update from scratch
when initial checkouts fail. However it causes an issue when builddir
(or builddir/Dependencies) doesn't exist yet. In that case the
saveJhbuildMd5 function fails to create md5 files.
This patch adds a checking for the jhbuildPath and creates it if
necessary before trying to open the md5 files.

* Scripts/update-webkit-libs-jhbuild:
(saveJhbuildMd5):

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

8 years agoUnreviewed. Move myself to the reviewers list.
mario@webkit.org [Mon, 2 Sep 2013 12:41:13 +0000 (12:41 +0000)]
Unreviewed. Move myself to the reviewers list.

* Scripts/webkitpy/common/config/contributors.json:

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

8 years ago [WK2][Mac] Drag and drop tests interfere with user's UI
ap@apple.com [Mon, 2 Sep 2013 06:36:21 +0000 (06:36 +0000)]
    [WK2][Mac] Drag and drop tests interfere with user's UI
        https://bugs.webkit.org/show_bug.cgi?id=120538

        Reviewed by Dan Bernstein.

        This makes running WebKit2 regression tests locally more viable. The patch doesn't
        fix drag and drop tests to work as expected, I posted some thought about that in
        <https://bugs.webkit.org/show_bug.cgi?id=68552>.

        * WebKitTestRunner/EventSenderProxy.h:
        (WTR::EventSenderProxy::position):
        * WebKitTestRunner/TestController.h:
        (WTR::TestController::eventSenderProxy):
        Expose a way to get current mouse position from anywhere in WKTR code.

        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added new files.

        * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseUp):
        Copied a FIXME comment from DumpRenderTree.

        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
        (-[TestRunnerWKView dragImage:at:offset:event:pasteboard:source:slideBack:]):
        Override drag initiation, using a custom NSDraggingInfo implementation.

        * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize):
        Replace NSEvent with a custom class.

        * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerEvent.h: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Added.
        Largely a copy of DumpRenderTree classes, modified to not use global variables.
        We should consider making these variables static in EventSenderProxy though, as
        it's strange that mouse state in WKTR is reset between tests without WebKit ever
        being told about that.

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

8 years agoSource/WebCore: Add 'edgeMode' attribute to SVGFEGaussianBlur
krit@webkit.org [Mon, 2 Sep 2013 04:53:46 +0000 (04:53 +0000)]
Source/WebCore: Add 'edgeMode' attribute to SVGFEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=120582

Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
allows users to define the behavior on edges with the values 'none' where
pixel values outside the input image are treated as transparent black. (The
current blurring behavior.) 'duplicate' which repeats the values on the
nearest edge and 'warp', which takes the pixel of the opposite site of
the input image.
Beside the attribute, this patch implements the behavior of 'duplicate'.

http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute

Reviewed by Rob Buis.

Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
       svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
       svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
       svg/filters/svg-gaussianblur-edgeMode-duplicate.svg

* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::FEGaussianBlur):
(WebCore::FEGaussianBlur::create):
(WebCore::FEGaussianBlur::edgeMode):
(WebCore::FEGaussianBlur::setEdgeMode):
(WebCore::boxBlur):
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::determineAbsolutePaintRect):
* platform/graphics/filters/FEGaussianBlur.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
(WebCore::SVGFEGaussianBlurElement::parseAttribute):
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
(WebCore::SVGFEGaussianBlurElement::build):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEGaussianBlurElement.idl:

LayoutTests: Add edgeMode attribtue.

Add 'edgeMode' attribute to SVGFEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=120582

Added DOM and SVGDOM tests for the attribute 'edgeMode'.
Also added a reftest to test edgeMode='duplicate'.

Reviewed by Rob Buis.

* platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop-expected.png: Added.
* svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr-expected.txt: Added.
* svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html: Added.
* svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop-expected.txt: Added.
* svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html: Added.
* svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-edgeMode-attr.js: Added.
(repaintTest):
* svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.js: Added.
(repaintTest):
* svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg: Added.
* svg/filters/svg-gaussianblur-edgeMode-duplicate.svg: Added.

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

8 years agoEventHandler::m_frame should be a Frame&.
akling@apple.com [Sun, 1 Sep 2013 20:04:02 +0000 (20:04 +0000)]
EventHandler::m_frame should be a Frame&.
<https://webkit.org/b/120580>

Reviewed by Darin Adler.

EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
A handful of null checks and assertions removed.

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

8 years agoFix a mistake in my recent pasteboard/editor refactoring that was causing tests to...
darin@apple.com [Sun, 1 Sep 2013 19:23:31 +0000 (19:23 +0000)]
Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.

* editing/mac/EditorMac.mm:
(WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.

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

8 years agoHitTestResult should have innerNonSharedElement
darin@apple.com [Sun, 1 Sep 2013 19:12:31 +0000 (19:12 +0000)]
HitTestResult should have innerNonSharedElement
https://bugs.webkit.org/show_bug.cgi?id=120579

Reviewed by Andreas Kling.

* editing/Editor.cpp:
(WebCore::Editor::copyImage): Call HitTestResult member function version of
innerNonSharedElement instead of a local function that does it.

* page/Chrome.cpp:
(WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
the node and checking if it's an input element. Also added some missing braces.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
local variables instead of innerNode to match the HitTestResult function name.
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
(WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
(WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
(WebCore::EventHandler::handleMousePressEvent): Ditto.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
(WebCore::HitTestResult::innerNonSharedElement): Ditto.

* rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
we'd like to avoid using Node unless there is some real need.

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

8 years agoVolume slider value should be 0 when audio is muted
calvaris@igalia.com [Sun, 1 Sep 2013 17:12:16 +0000 (17:12 +0000)]
Volume slider value should be 0 when audio is muted
https://bugs.webkit.org/show_bug.cgi?id=120553

Reviewed by Eric Carlson.

Source/WebCore:

Fixed the problem of showing a non empty slider when audio is
muted.

Test: media/volume-bar-empty-when-muted.html.

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset): Use setSliderVolume.
(WebCore::MediaControls::changedVolume): Use setSliderVolume.
(WebCore::MediaControls::setSliderVolume): Added to set the volume
to 0 when muted and to its value otherwise.
* html/shadow/MediaControls.h: Added setSliderVolume.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset): Used setSliderVolume and
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::changedVolume): Used
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
set the volume to 0 when muted and to its value otherwise.
* html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.

LayoutTests:

Added test to check if the volume slider value is 0 when the
element is muted even if volume is set to something else.

* media/volume-bar-empty-when-muted-expected.txt: Added.
* media/volume-bar-empty-when-muted.html: Added.

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

8 years agoGive EditCommand a protected Frame& getter.
akling@apple.com [Sun, 1 Sep 2013 14:57:23 +0000 (14:57 +0000)]
Give EditCommand a protected Frame& getter.
<https://webkit.org/b/120574>

Reviewed by Darin Adler.

EditCommand is only created for documents that are attached to a Frame,
we already ASSERTed as much in the EditCommand constructor.

This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
and its subclasses don't have to fumble around with pointers.

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

8 years agoWeb Inspector: A little more test cleanup
commit-queue@webkit.org [Sun, 1 Sep 2013 13:53:30 +0000 (13:53 +0000)]
Web Inspector: A little more test cleanup
https://bugs.webkit.org/show_bug.cgi?id=120575

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-09-01
Reviewed by Timothy Hatcher.

Give tests names and remove unnecessary script type attributes.

* inspector-protocol/debugger/removeBreakpoint-expected.txt:
* inspector-protocol/debugger/removeBreakpoint.html:
* inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt:
* inspector-protocol/debugger/setBreakpoint-autoContinue.html:
* inspector-protocol/debugger/setBreakpoint-column-expected.txt:
* inspector-protocol/debugger/setBreakpoint-column.html:
* inspector-protocol/debugger/setBreakpoint-condition-expected.txt:
* inspector-protocol/debugger/setBreakpoint-condition.html:
* inspector-protocol/debugger/setBreakpoint-expected.txt:
* inspector-protocol/debugger/setBreakpoint.html:

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

8 years agoFixed typo in media/video-volume-slider.html
calvaris@igalia.com [Sun, 1 Sep 2013 11:23:35 +0000 (11:23 +0000)]
Fixed typo in media/video-volume-slider.html
https://bugs.webkit.org/show_bug.cgi?id=120578

Unreviewed.

* media/video-volume-slider.html: Fixed typo.
* platform/gtk/media/video-volume-slider-expected.png:
* platform/gtk/media/video-volume-slider-expected.txt:
* platform/mac/media/video-volume-slider-expected.png:
* platform/mac/media/video-volume-slider-expected.txt: New
baselines.

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

8 years agoAdd element ancestor iterator
antti@apple.com [Sun, 1 Sep 2013 10:33:08 +0000 (10:33 +0000)]
Add element ancestor iterator
https://bugs.webkit.org/show_bug.cgi?id=120563

Reviewed by Andreas Kling.

This patch adds ancestor iterators. They iterate over elements parent chain up to the root.

To iterate over Element ancestors:

auto ancestors = elementAncestors(this);
for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
    Element& element = *it;
    ...

To iterate over Element ancestors including the current element:

auto lineage = elementLineage(this);
for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
    Element& element = *it;
    ...

To iterate over ancestors of a specific Element subclass:

auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
    HTMLElement& htmlElement = *it;
    ...

To iterate over ancestors of a specific Element subclass including the current element:

auto htmlLineage = lineageOfType<HTMLElement>(this);
for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
    HTMLElement& htmlElement = *it;
    ...

The patch also uses the new types in a few places.

* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::mouseButtonListener):
(WebCore::AccessibilityNodeObject::labelForElement):
* dom/ElementAncestorIterator.h: Added.
(WebCore::::ElementAncestorIterator):
(WebCore::::operator):
(WebCore::::ElementAncestorConstIterator):
(WebCore::::ElementAncestorIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::::ElementAncestorConstIteratorAdapter):
(WebCore::elementLineage):
(WebCore::elementAncestors):
(WebCore::ancestorsOfType):
* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType):
(WebCore::::traverseAncestor):
(WebCore::=):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
* html/HTMLFieldSetElement.h:
(WebCore::isHTMLFieldSetElement):
(WebCore::HTMLFieldSetElement):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::findContaining):
* html/HTMLFrameSetElement.h:
(WebCore::HTMLFrameSetElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
(WebCore::toHTMLInputElement):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::associatedControl):

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

8 years agoRefactor URL and image writing so layer-violating parts are in Editor, not Pasteboard...
darin@apple.com [Sun, 1 Sep 2013 06:26:12 +0000 (06:26 +0000)]
Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
https://bugs.webkit.org/show_bug.cgi?id=120573

Reviewed by Andreas Kling.

* editing/Editor.cpp:
(WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
(WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
(WebCore::innerNonSharedElement): Added. Used in copyImage.
(WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.

* editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
both Mac-only for now.

* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
was left behind in this function.
(WebCore::getImage): Added. Helper used by writeImageToPasteboard.
(WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
Pasteboard::write with it.
(WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
Pasteboard::write with it.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
Pasteboard::writeURL on Mac.

* platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
Guard writeURL and writeImage with !PLATFORM(MAC).

* platform/mac/PasteboardMac.mm:
(WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
(WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
to take PasteboardURL and PasteboardImage arguments.
(WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
for an image is now clear from its argument, a PasteboardImage.
(WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.

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

8 years agoEditCommand constructors should take Document&.
akling@apple.com [Sun, 1 Sep 2013 05:30:31 +0000 (05:30 +0000)]
EditCommand constructors should take Document&.
<https://webkit.org/b/120566>

Reviewed by Darin Adler.

Let EditCommand's and all subclass constructors take Document& instead of Document*.
EditCommand::document() now returns a Document&.

Added Editor::document() which returns Editor::frame().document() after asserting
that it's non-null, to make passing a Document& from Editor functions easier.

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

8 years agoMake more use of toRenderFoo(RenderObject&) cast helpers.
akling@apple.com [Sun, 1 Sep 2013 05:29:00 +0000 (05:29 +0000)]
Make more use of toRenderFoo(RenderObject&) cast helpers.
<https://webkit.org/b/120565>

Reviewed by Darin Adler.

To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
here's a patch that switches a bunch of code over to using reference-based casts.

I removed pointer-based casts altogether for these renderers:

    - RenderBR
    - RenderCombineText
    - RenderListMarker
    - RenderVideo
    - RenderView

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