WebKit-https.git
5 years agoENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
commit-queue@webkit.org [Mon, 24 Mar 2014 17:13:03 +0000 (17:13 +0000)]
ENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
https://bugs.webkit.org/show_bug.cgi?id=130669

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-24
Reviewed by Sergio Villar Senin.

No new tests. No new functionality.

* css/CSSGridLineNamesValue.cpp:
* css/CSSGridLineNamesValue.h:

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

5 years ago<hr> should expose AXRole/AXSubrole, etc
cfleizach@apple.com [Mon, 24 Mar 2014 17:08:00 +0000 (17:08 +0000)]
<hr> should expose AXRole/AXSubrole, etc
https://bugs.webkit.org/show_bug.cgi?id=109015

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Expose the <hr> element to Mac and iOS through the accessibility interface.

Test: platform/mac/accessibility/hr-element.html

* English.lproj/Localizable.strings:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isEnabled):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::computedRoleString):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXHorizontalRuleDescriptionText):
* platform/LocalizedStrings.h:

LayoutTests:

* accessibility/lists.html:
    - An errant <hr> element was in this test which changed results
* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-exposed.html:
* platform/gtk/accessibility/roles-exposed-expected.txt: Added.
* platform/mac/accessibility/hr-element-expected.txt: Added.
* platform/mac/accessibility/hr-element.html: Added.
* platform/mac/accessibility/lists-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

5 years agoInvalidate sibling text node style when needed instead of attaching synchronously
antti@apple.com [Mon, 24 Mar 2014 16:52:06 +0000 (16:52 +0000)]
Invalidate sibling text node style when needed instead of attaching synchronously
https://bugs.webkit.org/show_bug.cgi?id=130590

Reviewed by Andreas Kling.

Minor non-observable whitespace changes.

* fast/forms/select-listbox-focus-displaynone-expected.txt:
* fast/repaint/text-in-relative-positioned-inline-expected.txt:

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

5 years agoInvalidate sibling text node style when needed instead of attaching synchronously
antti@apple.com [Mon, 24 Mar 2014 16:49:39 +0000 (16:49 +0000)]
Invalidate sibling text node style when needed instead of attaching synchronously
https://bugs.webkit.org/show_bug.cgi?id=130590

Reviewed by Andreas Kling.

Make things simpler.

* style/StyleResolveTree.cpp:
(WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):

    Just invalidate instead of calling attach directly.
    Rename to match.

(WebCore::Style::textRendererIsNeeded):
(WebCore::Style::createTextRendererIfNeeded):

    Move all testing to textRendererIsNeeded.

(WebCore::Style::updateTextRendererAfterContentChange):

    Call resolveTextNode instead of re-implementing the same thing.

(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTextNode):

    Avoid unnecessary reattaching.
    Rename for consistency.

(WebCore::Style::resolveShadowTree):
(WebCore::Style::resolveTree):

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

5 years agoFix !ENABLE(VIDEO) build
commit-queue@webkit.org [Mon, 24 Mar 2014 16:35:40 +0000 (16:35 +0000)]
Fix !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=130671

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-03-24
Reviewed by Eric Carlson.

Add missing ENABLE(VIDEO) guards because many functions use
the newly guarded functions.

* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

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

5 years agoText autosizing does not determine line count correctly for simple line layout
antti@apple.com [Mon, 24 Mar 2014 16:30:52 +0000 (16:30 +0000)]
Text autosizing does not determine line count correctly for simple line layout
https://bugs.webkit.org/show_bug.cgi?id=130673

Reviewed by Daniel Bates.

We don't count lines correctly in simple line layout case.

* page/Frame.cpp:
(WebCore::Frame::textAutosizingWidth):
(WebCore::Frame::setTextAutosizingWidth):
* page/ios/FrameIOS.mm:
(WebCore::Frame::textAutosizingWidth): Deleted.
(WebCore::Frame::setTextAutosizingWidth): Deleted.

    Move to Frame.cpp to make enabling on non-iOS build easier.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::lineCount):

    Handle simple line layout case.

(WebCore::RenderBlockFlow::lineCountForTextAutosizing):

    Call lineCount() if children are inline.
    Rename for clarity.

(WebCore::RenderBlockFlow::adjustComputedFontSizes):
(WebCore::RenderBlockFlow::immediateLineCount): Deleted.
* rendering/RenderBlockFlow.h:

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

5 years ago[regression] background colors do not apply to <mo> elements.
fred.wang@free.fr [Mon, 24 Mar 2014 16:27:19 +0000 (16:27 +0000)]
[regression] background colors do not apply to <mo> elements.
https://bugs.webkit.org/show_bug.cgi?id=130470.

Source/WebCore:

Test: mathml/presentation/tokenElements-background-color.html

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paint): always call the parent painting to draw the background.
(WebCore::RenderMathMLOperator::paintChildren): move the special case for invisible operator here.

LayoutTests:

* mathml/presentation/tokenElements-background-color.html: Added.
* mathml/presentation/tokenElements-background-color-expected.html: Added.

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

5 years agoOperator stretching: expose a math data API
fred.wang@free.fr [Mon, 24 Mar 2014 16:20:11 +0000 (16:20 +0000)]
Operator stretching: expose a math data API
https://bugs.webkit.org/show_bug.cgi?id=130572

Reviewed by Chris Fleizach.

We expose a new SimpleFontData API to give access to the data from the
OpenType MATH table using a font cache. The class OpenTypeMathData will
be implemented in bug 130324. On Darwin platform, we also implement the
missing FontPlatformData::openTypeTable function which will be necessary
to load the OpenType MATH table. The changes are intended to be used
for MathML operator stretching (bug 130322) so tests are not added yet.

* CMakeLists.txt: add new OpenTypeMathData files.
* GNUmakefile.list.am: ditto.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
We make the math and vertical data share the same key for the cache.
(WebCore::fontMathDataCacheInstance):
(WebCore::FontCache::getMathData):
(WebCore::fontVerticalDataCacheInstance):
* platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
* platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
* platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
(WebCore::SimpleFontData::SimpleFontData):
* platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
* platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
(WebCore::OpenTypeMathData::OpenTypeMathData):
* platform/graphics/opentype/OpenTypeMathData.h: Added.
(WebCore::OpenTypeMathData::create):
(WebCore::OpenTypeMathData::hasMathData):

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

5 years agoBuild fixes.
jonlee@apple.com [Mon, 24 Mar 2014 16:09:50 +0000 (16:09 +0000)]
Build fixes.

Unreviewed.

Source/WebCore:

* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeSelectionToPasteboard): Convert to reference.

Source/WebKit/mac:

* WebInspector/WebNodeHighlightView.mm: Missing include to GeometryUtilities.

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

5 years agoENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
commit-queue@webkit.org [Mon, 24 Mar 2014 15:27:13 +0000 (15:27 +0000)]
ENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
https://bugs.webkit.org/show_bug.cgi?id=130666

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-24
Reviewed by Andreas Kling.

No new tests. No new functionality.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.

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

5 years ago[ARM64] GNU assembler doesn't work with LLInt arm64 backend.
rgabor@webkit.org [Mon, 24 Mar 2014 15:24:02 +0000 (15:24 +0000)]
[ARM64] GNU assembler doesn't work with LLInt arm64 backend.
https://bugs.webkit.org/show_bug.cgi?id=130453

Reviewed by Filip Pizlo.

Change fp and lr to x29 and x30. Add both operand kinds to emitARM64()
at sxtw and uxtw instructions.

* offlineasm/arm64.rb:

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

5 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Mon, 24 Mar 2014 12:03:07 +0000 (12:03 +0000)]
Unreviewed EFL gardening

Add test expectations for failing tests. Skip crashing http tests.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

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

5 years ago[EFL][WK2] Buildfix after r166159.
ossy@webkit.org [Mon, 24 Mar 2014 11:39:18 +0000 (11:39 +0000)]
[EFL][WK2] Buildfix after r166159.

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2014-03-24
Reviewed by Csaba Osztrogonác.

* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_file_access_from_file_urls_allowed_set):
(ewk_settings_file_access_from_file_urls_allowed_get):

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

5 years ago[EFL][WK2] Use C API inside ewk_settings
jinwoo7.song@samsung.com [Mon, 24 Mar 2014 10:09:04 +0000 (10:09 +0000)]
[EFL][WK2] Use C API inside ewk_settings
https://bugs.webkit.org/show_bug.cgi?id=107820

Reviewed by Gyuyoung Kim.

Use C API inside ewk_settings instead of accessing directly
internal C++ classes, to avoid violating API layering.

Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_fullscreen_enabled_set):
(ewk_settings_fullscreen_enabled_get):
(ewk_settings_javascript_enabled_set):
(ewk_settings_javascript_enabled_get):
(ewk_settings_loads_images_automatically_set):
(ewk_settings_loads_images_automatically_get):
(ewk_settings_developer_extras_enabled_set):
(ewk_settings_developer_extras_enabled_get):
(ewk_settings_file_access_from_file_urls_allowed_set):
(ewk_settings_file_access_from_file_urls_allowed_get):
(ewk_settings_frame_flattening_enabled_set):
(ewk_settings_frame_flattening_enabled_get):
(ewk_settings_dns_prefetching_enabled_set):
(ewk_settings_dns_prefetching_enabled_get):
(ewk_settings_encoding_detector_enabled_set):
(ewk_settings_encoding_detector_enabled_get):
(ewk_settings_preferred_minimum_contents_width_set):
(ewk_settings_preferred_minimum_contents_width_get):
(ewk_settings_offline_web_application_cache_enabled_set):
(ewk_settings_offline_web_application_cache_enabled_get):
(ewk_settings_scripts_can_open_windows_set):
(ewk_settings_scripts_can_open_windows_get):
(ewk_settings_local_storage_enabled_set):
(ewk_settings_local_storage_enabled_get):
(ewk_settings_plugins_enabled_set):
(ewk_settings_plugins_enabled_get):
(ewk_settings_default_font_size_set):
(ewk_settings_default_font_size_get):
(ewk_settings_private_browsing_enabled_set):
(ewk_settings_private_browsing_enabled_get):
(ewk_settings_text_autosizing_enabled_set):
(ewk_settings_text_autosizing_enabled_get):
(ewk_settings_spatial_navigation_enabled_set):
(ewk_settings_spatial_navigation_enabled_get):
(EwkSettings::setDefaultTextEncodingName):
* UIProcess/API/efl/ewk_settings_private.h:
(EwkSettings::EwkSettings):
(EwkSettings::preferences):

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

5 years ago[GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specif...
zandobersek@gmail.com [Mon, 24 Mar 2014 10:03:32 +0000 (10:03 +0000)]
[GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
https://bugs.webkit.org/show_bug.cgi?id=130663

Reviewed by Carlos Garcia Campos.

The two used methods are specific to the X11 plugin architecture and are not declared when building for a
Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.

* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
(WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.

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

5 years ago[CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
commit-queue@webkit.org [Mon, 24 Mar 2014 09:42:21 +0000 (09:42 +0000)]
[CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
https://bugs.webkit.org/show_bug.cgi?id=129041

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-03-24
Reviewed by Sergio Villar Senin.

From Blink r162555 by <svillar@igalia.com>

Source/WebCore:

Names for grid lines are now specified as a list of whitespace separated
idents enclosed in parentheses instead of as a list of strings.

Updated tests to match the new <grid-line> syntax.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
* css/CSSGrammar.y.in: New syntax for named <grid-line>.
* css/CSSGridLineNamesValue.cpp: Added.
(WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
(WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
(WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
* css/CSSGridLineNamesValue.h: Added.
(WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
(WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
(WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
(WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
* css/CSSParserValues.h:
(WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
* css/CSSValue.cpp:
(WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
(WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
(WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
* css/CSSValue.h:
(WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
* css/StyleResolver.cpp:
(WebCore::createGridTrackList): Using the new named <grid-line> syntax.

LayoutTests:

Updated tests to match the new <grid-line> syntax.

* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-element-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-line-resolution.html:
* fast/css-grid-layout/grid-item-negative-position-resolution.html:
* fast/css-grid-layout/grid-item-position-changed-dynamic.html:
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt:
* fast/css-grid-layout/non-grid-element-repeat-get-set.html:
* fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/non-named-grid-line-get-set.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
(testInherit):
(testInitial):

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

5 years agoprepare-ChangeLog should list functions that have been removed too.
llango.u-szeged@partner.samsung.com [Mon, 24 Mar 2014 09:27:38 +0000 (09:27 +0000)]
prepare-ChangeLog should list functions that have been removed too.
https://bugs.webkit.org/show_bug.cgi?id=130508

Reviewed by Darin Adler.

The prepare-ChangeLog does not list the deleted functions in the Changelog.
We have to read the functions and the line ranges of them from the source
before the change, then search for overlaps between them and the changed
line ranges from diff.

* Scripts/prepare-ChangeLog:
(originalFile): Get original source command.
(generateFunctionLists): Collect deleted functions too.
(generateFunctionListsByRanges): Duplicated code is moved to a separate subroutine.
(extractLineRangeBeforeChange): Extract line ranges from the original source to get
deleted functions ranges too.
(extractLineRange): Renamed to extractLineRangeAfterChange.

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

5 years ago[EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
ryuan.choi@samsung.com [Mon, 24 Mar 2014 09:21:24 +0000 (09:21 +0000)]
[EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=130662

Reviewed by Gyuyoung Kim.

Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.

* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
* UIProcess/API/efl/ewk_database_manager.cpp:
(getDatabaseOriginsCallback):
* UIProcess/API/efl/ewk_error_private.h:
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::didFail):
* UIProcess/efl/InputMethodContextEfl.h:
(WebKit::InputMethodContextEfl::create):
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):

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

5 years ago[EFL] Add expectations for flaky perf layout test.
commit-queue@webkit.org [Mon, 24 Mar 2014 09:21:09 +0000 (09:21 +0000)]
[EFL] Add expectations for flaky perf layout test.
https://bugs.webkit.org/show_bug.cgi?id=130584

Unreviewed EFL gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-03-24

* platform/efl/TestExpectations:

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

5 years ago[EFL] Add expectations for flaky webgl layout test.
commit-queue@webkit.org [Mon, 24 Mar 2014 09:19:21 +0000 (09:19 +0000)]
[EFL] Add expectations for flaky webgl layout test.
https://bugs.webkit.org/show_bug.cgi?id=130587

Unreviewed EFL gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-03-24

* platform/efl/TestExpectations:

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

5 years ago[EFL] Inspector page is not loaded.
commit-queue@webkit.org [Mon, 24 Mar 2014 09:10:37 +0000 (09:10 +0000)]
[EFL] Inspector page is not loaded.
https://bugs.webkit.org/show_bug.cgi?id=130661

Patch by Sangyong Park <sy302.park@gmail.com> on 2014-03-24
Reviewed by Gyuyoung Kim.

Inspector page is not loaded, because some javascript files are not installed.
(InspectorJSBackendCommands.js, InspectorWebBackendCommands.js)

* Source/PlatformEfl.cmake:

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

5 years agoConvert WebHTMLConverter to C++
commit-queue@webkit.org [Mon, 24 Mar 2014 06:42:01 +0000 (06:42 +0000)]
Convert WebHTMLConverter to C++
https://bugs.webkit.org/show_bug.cgi?id=130655

Patch by Sam Weinig <sam@webkit.org> on 2014-03-23
Reviewed by Andreas Kling.

- Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
- Removes unused members
    - _standardFontFamily (never assigned to)
    - _textSizeMultiplier (always exactly 1)
    - _webViewTextSizeMultiplier (always exactly 0)
    - _defaultFontSize (always exactly 12, changed to be constant)
    - _minimumFontSize (always exactly 1, changed to be constant)
    - _colorsForNodes (never assigned to)
    - _indexingLimit (always exactly 0)
    - _thumbnailLimit (always exactly 0)
    - _flags.isIndexing (always false)
    - _flags.isTesting (always false)

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::convert):
(HTMLConverter::HTMLConverter):
(HTMLConverter::~HTMLConverter):
(defaultParagraphStyle):
(_childrenForNode):
(HTMLConverter::_stringForNode):
(HTMLConverter::_getFloat):
(_webKitBundle):
(HTMLConverter::_elementIsBlockLevel):
(HTMLConverter::_elementHasOwnBackgroundColor):
(HTMLConverter::_blockLevelElementForNode):
(HTMLConverter::_colorForNode):
(HTMLConverter::_computedAttributesForElement):
(HTMLConverter::_attributesForElement):
(HTMLConverter::_newParagraphForElement):
(HTMLConverter::_newLineForElement):
(HTMLConverter::_newTabForElement):
(_WebMessageDocumentClass):
(HTMLConverter::_addAttachmentForElement):
(HTMLConverter::_addQuoteForElement):
(HTMLConverter::_addValue):
(HTMLConverter::_fillInBlock):
(HTMLConverter::_processMetaElementWithName):
(HTMLConverter::_processHeadElement):
(HTMLConverter::_enterElement):
(HTMLConverter::_addTableForElement):
(HTMLConverter::_addTableCellForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_addMarkersToList):
(HTMLConverter::_exitElement):
(HTMLConverter::_processText):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(HTMLConverter::_adjustTrailingNewline):
(HTMLConverter::_loadFromDOMRange):
(fileWrapperForURL):
(fileWrapperForElement):
(WebCore::attributedStringFromRange):
(WebCore::editingAttributedStringFromRange):

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

5 years agoRemove Dead Stores from editing directory
jinwoo7.song@samsung.com [Mon, 24 Mar 2014 05:16:33 +0000 (05:16 +0000)]
Remove Dead Stores from editing directory
https://bugs.webkit.org/show_bug.cgi?id=130634

Reviewed by Darin Adler.

Remove Dead Stores from editing directory which assigning a value to a variable
and never reading that value.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
* editing/markup.cpp:
(WebCore::createMarkupInternal):

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

5 years agoMove all EFL typedefs into EflTypedefs.h.
ryuan.choi@samsung.com [Mon, 24 Mar 2014 04:51:01 +0000 (04:51 +0000)]
Move all EFL typedefs into EflTypedefs.h.
https://bugs.webkit.org/show_bug.cgi?id=130511

Source/JavaScriptCore:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim

* heap/HeapTimer.h: Remove EFL typedefs.

Source/WebCore:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

* platform/FileSystem.h: Remove EFL typedefs.
* platform/Widget.h: Ditto.
* platform/efl/EflScreenUtilities.h: Ditto.
* platform/graphics/Icon.h: Ditto.
* platform/graphics/Image.h: Ditto.
* platform/graphics/IntPoint.h: Ditto.
* platform/graphics/IntRect.h: Ditto.
* platform/network/NetworkStateNotifier.h: Ditto.

Source/WebKit/efl:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

* WebCoreSupport/BatteryClientEfl.h: Remove EFL typedefs.
* WebCoreSupport/DumpRenderTreeSupportEfl.h: Ditto.
* WebCoreSupport/EditorClientEfl.h: Ditto.
* WebCoreSupport/FrameNetworkingContextEfl.h: Ditto.
* WebCoreSupport/NavigatorContentUtilsClientEfl.h: Ditto.
* WebCoreSupport/ProgressTrackerClientEfl.h: Ditto.

Source/WebKit2:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

* Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
* UIProcess/API/efl/EwkView.h: Ditto.

Source/WTF:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

* wtf/Platform.h: include EflTypedefs.h.
* wtf/efl/EflTypedefs.h: Added.
* wtf/efl/RefPtrEfl.h: Remove EFL typedefs.

Tools:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

* TestWebKitAPI/PlatformWebView.h: Remove EFL typedefs.
* WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
* WebKitTestRunner/PlatformWebView.h: Ditto.

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

5 years ago[WK2] Refine WebKit2 BatteryStatus code
jinwoo7.song@samsung.com [Mon, 24 Mar 2014 04:37:55 +0000 (04:37 +0000)]
[WK2] Refine WebKit2 BatteryStatus code
https://bugs.webkit.org/show_bug.cgi?id=130573

Reviewed by Anders Carlsson.

Refinements
 - Return PassRef instead of PassRefPtr in create methods
 - Use auto instead of iterator

* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::create):
* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/efl/BatteryProvider.cpp:
(BatteryProvider::create):
* UIProcess/efl/BatteryProvider.h:
* WebProcess/Battery/WebBatteryManager.cpp:
(WebKit::WebBatteryManager::didChangeBatteryStatus):
(WebKit::WebBatteryManager::updateBatteryStatus):

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

5 years agoMove HTMLConverter from platform/mac to editing/cocoa.
weinig@apple.com [Sun, 23 Mar 2014 22:14:20 +0000 (22:14 +0000)]
Move HTMLConverter from platform/mac to editing/cocoa.

Rubber-stamped by Darin Adler.

* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa: Added.
* editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
* editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
* platform/mac/HTMLConverter.h: Removed.
* platform/mac/HTMLConverter.mm: Removed.

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

5 years agoRemove some unnecessary .get()s that Darin noticed.
weinig@apple.com [Sun, 23 Mar 2014 21:47:52 +0000 (21:47 +0000)]
Remove some unnecessary .get()s that Darin noticed.

* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView attributedString]):

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

5 years agoSimplify the HTMLConverter interface (Part 2)
weinig@apple.com [Sun, 23 Mar 2014 21:41:17 +0000 (21:41 +0000)]
Simplify the HTMLConverter interface (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=130654

Reviewed by Darin Adler.

../WebCore:

Switch HTMLConverter from using an Objective-C interface to C functions.

* WebCore.exp.in:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeSelectionToPasteboard):
* editing/mac/EditorMac.mm:
(WebCore::Editor::dataSelectionForPasteboard):
(WebCore::Editor::writeSelectionToPasteboard):
* platform/ios/PasteboardIOS.mm:
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(WebCore::attributedStringFromRange):
(WebCore::editingAttributedStringFromRange):
* platform/mac/PasteboardMac.mm:

../WebKit/mac:

* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView attributedSubstringFromRange:]):
(-[WebHTMLView attributedString]):
(-[WebHTMLView selectedAttributedString]):

../WebKit2:

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):

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

5 years agoRemove code in HTMLObjectElement attribute parsing that forces style resolution and...
darin@apple.com [Sun, 23 Mar 2014 21:37:56 +0000 (21:37 +0000)]
Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
https://bugs.webkit.org/show_bug.cgi?id=130653

Reviewed by Antti Koivisto.

Source/WebCore:

* dom/ContainerNode.cpp: Moved the post-attach callback code from here to
StyleResolveTree.h/cpp.
* dom/ContainerNode.h: Ditto.

* dom/Document.cpp:
(WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
PostAttachCallbackDisabler.

* dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
do the image loading logic.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
Style::queuePostResolutionCallback and use a lambda instead of a function.
(WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
of just using wishful thinking to keep the object alive.
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
unconditionally and not set m_classId.
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
instead of classId and descendantsOfType instead of getElementsByTagName.
(WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
(WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.

* html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
attribute in a data member. Rearranged header, making more private, and fixing some typos,
and doing a "using" instead of a function to disambiguate the inherited form functions.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
(WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
first child of the shadow root is guaranteed to be an element.
(WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
scheduleUpdateForAfterStyleResolution function.
(WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
class; cleaner even though it's just an assertion.
(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
Schedules a call to updateAfterStyleResolution when needed.
(WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
m_needsImageReload boolean in cases where no actual loading is done.
(WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
document once this element is removed, clears m_needsImageReload.
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
since m_needsDocumentActivationCallbacks can't be true if the old document was null.
(WebCore::is100Percent): Added helper to make function below more readable.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
bit. The part that attracted my attention was the local variable of type RenderBox, which
was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
is a renderer of type RenderEmbeddedObject, so depend on that.
(WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
When called with false, reverses the effects and stops delaying the load event.

* html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
Marked more function members final. Made a protected imageLoader function so that
m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
OwnPtr, and added m_needsImageReload.

* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
(WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
(WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
(WebCore::Style::postResolutionCallbackQueue): Added.
(WebCore::Style::queuePostResolutionCallback): Added.
(WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
of as a special case. It should not work for multiple documents across multiple pages instead of
only the outermost one.
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
(WebCore::Style::postResolutionCallbacksAreSuspended): Added.

* style/StyleResolveTree.h: Added queuePostResolutionCallback and
postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
eventually become a private implementation detail.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm: Call toHTMLPlugInImageElement instead of
doing a static_cast.

LayoutTests:

* plugins/plugin-remove-readystatechange-expected.txt: Added a blank line; not what this
test is testing, but the different timing of loads results in this blank line.
* plugins/plugin-remove-readystatechange.html: Updated test to use waitUntilDone/notifyDone
rather than racing. Added a computation of offsetLeft to trigger layout and adding a long
comment explaining why this is needed and potentially insufficient in the long run.

* svg/custom/object-no-size-attributes-expected.txt: Removed expectation of an empty text
renderer from the render tree.
* svg/custom/object-no-size-attributes.xhtml: Restructured the source so there is no text
to render. Without this, we were seeing two text renderers due to the loading timing change.

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

5 years agoSimplify the HTMLConverter interface (Part 1)
weinig@apple.com [Sun, 23 Mar 2014 20:17:36 +0000 (20:17 +0000)]
Simplify the HTMLConverter interface (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=130654

Reviewed by Dan Bernstein.

Convert WebHTMLConverter's interface to only use class methods as the first
step of simplifying the interface.

* editing/ios/EditorIOS.mm:
(WebCore::attributedStringForRange):
* editing/mac/EditorMac.mm:
(WebCore::attributedStringForRange):
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter attributedStringFromRange:]):

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

5 years agoGotta grow the locals vectors if we are about to do SetLocals beyond the bytecode...
fpizlo@apple.com [Sun, 23 Mar 2014 18:56:56 +0000 (18:56 +0000)]
Gotta grow the locals vectors if we are about to do SetLocals beyond the bytecode's numCalleeRegisters
https://bugs.webkit.org/show_bug.cgi?id=130650
<rdar://problem/16122966>

Reviewed by Michael Saboff.

Previously, it was only in the case of inlining that we would do SetLocal's beyond the
previously established numLocals limit. But then we added generalized op_call_varargs
handling, which results in us emitting SetLocals that didn't previously exist in the
bytecode.

This factors out the inliner's ensureLocals loop and calls it from op_call_varargs.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ensureLocals):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub): Make this do alignment correctly.
* runtime/Options.h:
* tests/stress/call-varargs-from-inlined-code.js: Added.
* tests/stress/call-varargs-from-inlined-code-with-odd-number-of-arguments.js: Added.

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

5 years agoWeb Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
commit-queue@webkit.org [Sun, 23 Mar 2014 17:32:13 +0000 (17:32 +0000)]
Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
https://bugs.webkit.org/show_bug.cgi?id=130635

Patch by James Craig <jcraig@apple.com> on 2014-03-23
Reviewed by Timothy Hatcher.

Support for @aria-owns, @aria-controls, and @aria-flowto.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

LayoutTests:

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:

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

5 years agoWebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
ddkilzer@apple.com [Sun, 23 Mar 2014 16:12:49 +0000 (16:12 +0000)]
WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
<http://webkit.org/b/130651>

Reviewed by Darin Adler.

Fixes the following build failure with trunk clang:

    WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
        double scaleDistance = abs(limit - currentScale);
                               ^
    WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
        double scaleDistance = abs(limit - currentScale);
                               ^~~
                               fabs

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::resistanceForDelta): Use fabs() instead of abs().

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

5 years agoClean up #includes by geometry classes
simon.fraser@apple.com [Sun, 23 Mar 2014 15:36:40 +0000 (15:36 +0000)]
Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645

Reviewed by Andreas Kling.

Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.

Also forward declare PrintStream.h and only bring in the header
in implementation files.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSToStyleMap.h:
* html/HTMLCanvasElement.cpp:
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/GeometryUtilities.cpp: Added.
(WebCore::findSlope):
(WebCore::findIntersection):
(WebCore::unionRect):
(WebCore::mapRect):
* platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.cpp:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/TextTrackRepresentation.h:
* platform/graphics/Tile.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
* platform/gtk/WidgetBackingStoreGtkX11.h:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderObject.cpp:

Source/WebKit2:

* Shared/UpdateInfo.h:
* UIProcess/BackingStore.h:
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/FindIndicator.cpp:
* UIProcess/mac/WKPrintingView.h:

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

5 years agoClean up #includes by geometry classes
simon.fraser@apple.com [Sun, 23 Mar 2014 08:36:14 +0000 (08:36 +0000)]
Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645

Reviewed by Andreas Kling.

Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.

Also forward declare PrintStream.h and only bring in the header
in implementation files.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSToStyleMap.h:
* html/HTMLCanvasElement.cpp:
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/GeometryUtilities.cpp: Added.
(WebCore::findSlope):
(WebCore::findIntersection):
(WebCore::unionRect):
(WebCore::mapRect):
* platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.cpp:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/TextTrackRepresentation.h:
* platform/graphics/Tile.h:
* platform/gtk/WidgetBackingStoreGtkX11.h:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderObject.cpp:

Source/WebKit2:

* UIProcess/BackingStore.h:
* UIProcess/FindIndicator.cpp:
* UIProcess/mac/WKPrintingView.h:

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

5 years agoUnreviewed, adjust sizes for ARM64.
fpizlo@apple.com [Sun, 23 Mar 2014 05:40:59 +0000 (05:40 +0000)]
Unreviewed, adjust sizes for ARM64.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCall):

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

5 years agoProtect the silent spiller/filler's desire to fill Int32Constants by making sure...
fpizlo@apple.com [Sun, 23 Mar 2014 04:36:25 +0000 (04:36 +0000)]
Protect the silent spiller/filler's desire to fill Int32Constants by making sure that we don't mark something as having a Int32 register format if it's a non-Int32 constant
https://bugs.webkit.org/show_bug.cgi?id=130649
<rdar://problem/16399949>

Reviewed by Andreas Kling.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
* tests/stress/fuzz-bug-16399949.js: Added.
(tryItOut.f):
(tryItOut):

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

5 years agoCall linking slow paths should be passed a CallLinkInfo* directly so that you can...
fpizlo@apple.com [Sun, 23 Mar 2014 04:34:38 +0000 (04:34 +0000)]
Call linking slow paths should be passed a CallLinkInfo* directly so that you can create a call IC without adding it to any CodeBlocks
https://bugs.webkit.org/show_bug.cgi?id=130644

Reviewed by Andreas Kling.

This is conceptually a really simple change but it involves the following:

- The inline part of the call IC stuffs a pointer to the CallLinkInfo into regT2.

- CodeBlock uses a Bag of CallLinkInfos instead of a Vector.

- Remove the significance of a CallLinkInfo's index. This means that DFG::JITCode no
  longer has a vector of slow path counts that shadows the CallLinkInfo vector.

- Make CallLinkInfo have its own slowPathCount, which counts actual slow path executions
  and not all relinking.

This makes planting JS->JS calls inside other inline caches or stubs a lot easier, since
the CallLinkInfo and the call IC slow paths no longer rely on the call being associated
with a op_call/op_construct instruction and a machine code return PC within such an
instruction.

* bytecode/CallLinkInfo.h:
(JSC::getCallLinkInfoCodeOrigin):
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeDFGStatuses):
* bytecode/CallLinkStatus.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::getCallLinkInfoMap):
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
(JSC::CodeBlock::addCallLinkInfo):
(JSC::CodeBlock::unlinkCalls):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::stubInfoBegin):
(JSC::CodeBlock::stubInfoEnd):
(JSC::CodeBlock::callLinkInfosBegin):
(JSC::CodeBlock::callLinkInfosEnd):
(JSC::CodeBlock::byValInfo):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addJSCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLCompile.cpp:
(JSC::FTL::fixFunctionBasedOnStackMaps):
* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCall):
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
(JSC::FTL::JSCall::emit):
(JSC::FTL::JSCall::link):
* ftl/FTLJSCall.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
(JSC::operationLinkFor):
(JSC::operationVirtualFor):
(JSC::operationLinkClosureCallFor):
* jit/Repatch.cpp:
(JSC::linkClosureCall):
* jit/ThunkGenerators.cpp:
(JSC::slowPathFor):
(JSC::virtualForThunkGenerator):
* tests/stress/eval-that-is-not-eval.js: Added.

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

5 years agoReplace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace...
commit-queue@webkit.org [Sun, 23 Mar 2014 02:43:52 +0000 (02:43 +0000)]
Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
https://bugs.webkit.org/show_bug.cgi?id=130612.

Patch by Chang Shu <cshu@webkit.org> on 2014-03-22
Reviewed by Darin Adler.

Source/WebCore:

Some layout tests are affected by this change but the new behavior should be correct.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):

LayoutTests:

* accessibility/table-scope-expected.txt:
* editing/deleting/delete-block-table-expected.txt:
* editing/pasteboard/paste-into-anchor-text-expected.txt:
* fast/dom/Element/offsetTop-table-cell-expected.txt:
* fast/html/object-border-expected.txt:
* fast/table/cell-in-row-before-misnested-text-crash-css-expected.txt:
* fast/table/cell-in-row-before-misnested-text-crash-expected.txt:
* fast/tokenizer/script_extra_close-expected.txt:
* fast/xsl/mozilla-tests-expected.txt:
* platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt:
* platform/mac/accessibility/table-multi-bodies-expected.txt:

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

5 years agoUnreviewed, fix mispelled test name.
fpizlo@apple.com [Sun, 23 Mar 2014 01:30:29 +0000 (01:30 +0000)]
Unreviewed, fix mispelled test name.

* tests/stress/constand-folding-osr-exit.js: Removed.
* tests/stress/constant-folding-osr-exit.js: Copied from Source/JavaScriptCore/tests/stress/constand-folding-osr-exit.js.

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

5 years agoSwitch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
weinig@apple.com [Sun, 23 Mar 2014 01:20:08 +0000 (01:20 +0000)]
Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
https://bugs.webkit.org/show_bug.cgi?id=130639

Reviewed by Darin Adler.

This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.

- Removes gratuitous lookup of CSS properties that are known at compile time.
- Removes attempted use of non-supported CSS properties (font-effect and horizontal-align)
  that will alway yield the same results.
- Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
  but instead used the non-existent font-effect.

* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):
(HTMLConverterCaches::propertyValueForNode):
(-[WebHTMLConverter _stringForNode:property:]):
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(HTMLConverterCaches::isBlockElement):
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):

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

5 years agoFix debug build.
akling@apple.com [Sun, 23 Mar 2014 01:03:25 +0000 (01:03 +0000)]
Fix debug build.

* bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):

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

5 years agoAdd *final* keyword to NavigatorContentUtils class
gyuyoung.kim@samsung.com [Sun, 23 Mar 2014 01:01:48 +0000 (01:01 +0000)]
Add *final* keyword to NavigatorContentUtils class
https://bugs.webkit.org/show_bug.cgi?id=130636

Reviewed by Darin Adler.

NavigatorContentUtils won't be used as a base class. So, added final keyword.

No new tests, no behavior changes.

* Modules/navigatorcontentutils/NavigatorContentUtils.h:

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

5 years agoRevert accidental changes to WebKit.xcworkspace
akling@apple.com [Sun, 23 Mar 2014 00:38:16 +0000 (00:38 +0000)]
Revert accidental changes to WebKit.xcworkspace

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

5 years agoCREATE_DOM_WRAPPER doesn't need the ExecState.
akling@apple.com [Sun, 23 Mar 2014 00:35:13 +0000 (00:35 +0000)]
CREATE_DOM_WRAPPER doesn't need the ExecState.
<https://webkit.org/b/130648>

Source/JavaScriptCore:

Add a fast path from JSGlobalObject to the VM so we don't have
to dance via the Heap.

Reviewed by Darin Adler.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::vm):

Source/WebCore:

Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
that we need from the global object instead.

toJS() and toJSNewlyCreated() still take an ExecState, that needs
to be dealt with separately since some of them have scary looking
currentWorld() checks.

Reviewed by Darin Adler.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
* bindings/js/JSBlobCustom.cpp:
(WebCore::toJS):
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/js/JSCDATASectionCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):
(WebCore::wrap):
(WebCore::createNewWrapper):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::toJS):
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
(WebCore::toJS):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJS):
* bindings/js/JSRTCIceCandidateCustom.cpp:
(WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
* bindings/js/JSRTCPeerConnectionCustom.cpp:
(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
* bindings/js/JSRTCSessionDescriptionCustom.cpp:
(WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTextCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTouchCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSTouchListCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/make_names.pl:
(printWrapperFunctions):
(printWrapperFactoryCppFile):
(printWrapperFactoryHeaderFile):

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

5 years agoUnreviewed, fix FTL build.
fpizlo@apple.com [Sat, 22 Mar 2014 23:18:04 +0000 (23:18 +0000)]
Unreviewed, fix FTL build.

* ftl/FTLJITFinalizer.cpp:

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

5 years agotoThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
msaboff@apple.com [Sat, 22 Mar 2014 23:06:37 +0000 (23:06 +0000)]
toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
https://bugs.webkit.org/show_bug.cgi?id=130554

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
Did some cleanup as well.  Moved the setting of the thisObject in a JSGlobalObject to
happen in finishCreation() so that it will also happen for other derived classes including
JSWorkerGlobalScopeBase.

* API/JSContextRef.cpp:
(JSGlobalContextCreateInGroup):
* jsc.cpp:
(GlobalObject::create):
* API/tests/testapi.c:
(globalObject_initialize): Eliminated ASSERT that the global object we are creating matches
the result from JSContextGetGlobalObject() as that will return the proxy.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Removed thisValue parameter and the call to setGlobalThis() since
we now call setGlobalThis in finishCreation().
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::finishCreation):
(JSC::JSGlobalObject::setGlobalThis): Made this a private method.

Source/WebCore:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
Added cast from JSProxy->target() if the jsCast<>() to the native object fails
in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
The original cast is needed for access to the local side of the worker, while the JSProxy
cast is used on the remote side of a worker.

Test: fast/workers/worker-strict.html

* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
the WorkerGlobalScope object as the this object to script evaluation.

* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
getting the object to use for global evaluation.

LayoutTests:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
New regressions tests.

* fast/workers/resources/worker-strict.js: Added.
* fast/workers/worker-strict-expected.txt: Added.
* fast/workers/worker-strict.html: Added.

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

5 years agoFix debug build.
akling@apple.com [Sat, 22 Mar 2014 20:57:04 +0000 (20:57 +0000)]
Fix debug build.

* bytecode/CodeBlock.cpp:
* runtime/Executable.cpp:

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

5 years agoSome #include hygiene in Node/Element etc
simon.fraser@apple.com [Sat, 22 Mar 2014 20:02:26 +0000 (20:02 +0000)]
Some #include hygiene in Node/Element etc
https://bugs.webkit.org/show_bug.cgi?id=130642

Reviewed by Geoffrey Garen.

Clean up various #includes.

* accessibility/AccessibilityObject.h:
* bindings/js/WebCoreTypedArrayController.h:
* dom/Element.h:
* dom/EventListenerMap.h:
* dom/EventTarget.h:
* dom/Node.h:
* rendering/RenderObject.h:
* rendering/svg/RenderSVGRoot.h:

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

5 years agoFloatRect.h on iOS should not suck in a system header
simon.fraser@apple.com [Sat, 22 Mar 2014 19:42:03 +0000 (19:42 +0000)]
FloatRect.h on iOS should not suck in a system header
https://bugs.webkit.org/show_bug.cgi?id=130641

Reviewed by Geoff Garen.

Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.

* platform/graphics/FloatRect.h:

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

5 years agoFixed the iOS build.
mitz@apple.com [Sat, 22 Mar 2014 19:19:52 +0000 (19:19 +0000)]
Fixed the iOS build.

Reviewed by Darin Adler.

* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):

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

5 years agoCut down on JSC profiler includes in WebCore & co.
akling@apple.com [Sat, 22 Mar 2014 18:56:56 +0000 (18:56 +0000)]
Cut down on JSC profiler includes in WebCore & co.
<https://webkit.org/b/130637>

Most of WebKit was pulling in JSC's profiler headers via VM.h.

Reviewed by Darin Adler.

* dfg/DFGDisassembler.cpp:
* dfg/DFGDisassembler.h:
* dfg/DFGJITFinalizer.cpp:
* jsc.cpp:
* runtime/VM.cpp:
* runtime/VM.h:

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

5 years agoRemove String::deprecatedCharacters
darin@apple.com [Sat, 22 Mar 2014 18:52:22 +0000 (18:52 +0000)]
Remove String::deprecatedCharacters
https://bugs.webkit.org/show_bug.cgi?id=126854

Reviewed by Sam Weinig.

Source/WebCore:

* bindings/scripts/StaticString.pm:
(GenerateStrings): Remove the code to generate the null m_copyData16 pointer.

* editing/TextIterator.cpp:
(WebCore::SearchBuffer::prependContext): Changed to use the new append function in
StringView.h and removed the one defined locally here.

* editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary): Use the new append function
in StringView.h instead of using deprecatedCharacters.
(WebCore::wordBreakIteratorForMaxOffsetBoundary): Ditto.
Removed an append function defined locally here and use the one in StringView.h.

* editing/htmlediting.cpp:
(WebCore::stringWithRebalancedWhitespace): Use StringView::getCharactersWithUpconvert.

* html/parser/HTMLToken.h:
(WebCore::HTMLToken::appendToAttributeValue): Changed to take a StringView instead
of a const String&.

* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest): Use StringView and StringView::upconvertedCharacters.

* page/EventSource.cpp:
(WebCore::EventSource::didReceiveData): Use the new append overload from StringView.h.
Also added a comment about incorrect use of the decode function.

* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot): Use the new StringView append function.
Also use simpler new-style for loops.

* platform/LinkHash.cpp:
(WebCore::visitedURLInline): Use the new append function and StringView::substring.
(WebCore::visitedLinkHash): Use upconvertedCharacters for the non-8-bit case.

* platform/URL.cpp:
(WebCore::findFirstOf): Chagned to take a StringView.
(WebCore::containsOnlyASCII): Added. Works on StringView. Could move to a WTF header in
the future if it's needed elsewhere.
(WebCore::protocolIs): Added. Works on StringView. Could put in URL.h if needed elsewhere,
or consider replacing the one that takes const String& with just this one.
(WebCore::appendEncodedHostname): Changed to take a StringView and use
StringView::upconvertedCharacters.
(WebCore::findHostnamesInMailToURL): Changed to take a StringView.
(WebCore::findHostnameInHierarchicalURL): Ditto.
(WebCore::encodeHostnames): Ditto.
(WebCore::encodeRelativeString): Ditto.

* platform/graphics/StringTruncator.cpp:
(WebCore::StringTruncator::width): Use StringView::upconvertedCharacters.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures): Use indexing directly on the string instead
of on a UChar*.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use StringView::upconvertedCharacters.

* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::encode): Use a Vector<UChar> rather than a String to copy and
replace the backslashes with yen signs. Also optimize case where there are no backslashes.

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint): Use TextRun::setText(StringView).

* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth): Pass a String to RenderBlock::constructTextRun instead of
calling StringBuilder::deprecatedCharacters.

* rendering/RenderText.h: Removed deprecatedCharacters function.

* rendering/line/BreakingContextInlineHeaders.h: Added now-needed header include.

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun): Use StringView version of TextRun constructor.

* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::SVGTextMetrics): Take references instead of pointers.
(WebCore::SVGTextMetrics::constructTextRun): Take references instead of pointers, and don't
take a character pointer any more. Instead, extract the text and use the StringView version of
the TextRun constructor.
(WebCore::SVGTextMetrics::measureCharacterRange): Take references instead of pointers and
update for above changes.
* rendering/svg/SVGTextMetrics.h: Updated for changes above. Also tweaked style a bit.

* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::advanceSimpleText): Updated for SVGTextMetrics changes.
(WebCore::SVGTextMetricsBuilder::advanceComplexText): Ditto.
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): Ditto.
(WebCore::SVGTextMetricsBuilder::measureTextRenderer): Change code to store a character
for lastCharacter rather than storing a pointer to a character. Stop using TextRun::data16.

* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::subStringLengthCallback): Updated for SVGTextMetrics changes.
(WebCore::SVGTextQuery::startPositionOfCharacterCallback): Ditto.
(WebCore::SVGTextQuery::endPositionOfCharacterCallback): Ditto.
(WebCore::calculateGlyphBoundaries): Ditto.

* xml/XPathFunctions.cpp:
(WebCore::XPath::atomicSubstring): Added.
(WebCore::XPath::FunId::evaluate): Tweaked a bit to use a new style for loop.
Use the atomicSubstring function to avoid making a temporary String just to make an AtomicString.
That function also uses characters8/16 rather than depreccatedCharacters.

* xml/XPathNodeSet.h: Added begin and end so this collection can be iterated with new style for loop.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::doWrite): Use StringView::upconvertedCharacters.
(WebCore::parseAttributes): Ditto.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Removed getData16SlowCase.

Source/WebKit/ios:

* Misc/WebNSStringDrawing.h: Added a FIXME about deleting this file; we can probably do it soon.
* Misc/WebNSStringDrawing.mm:
(+[NSString _web_setWordRoundingEnabled:]):
(+[NSString _web_wordRoundingEnabled]):
(+[NSString _web_setWordRoundingAllowed:]):
(+[NSString _web_wordRoundingAllowed]):
(+[NSString _web_setAscentRoundingEnabled:]):
(+[NSString _web_ascentRoundingEnabled]):
(-[NSString _web_drawAtPoint:withFont:]):
(-[NSString _web_sizeWithFont:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:letterSpacing:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:letterSpacing:resultRange:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:measureOnly:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:]):
(-[NSString _web_sizeInRect:withFont:ellipsis:lineSpacing:]):
(-[NSString _web_sizeInRect:withFont:ellipsis:]):
(-[NSString _web_stringForWidth:withFont:ellipsis:letterSpacing:includeEmoji:]):
(-[NSString _web_sizeForWidth:withAttributes:]):
(-[NSString _web_drawAtPoint:forWidth:withAttributes:]):
(-[NSString _web_sizeInRect:withAttributes:]):
(-[NSString _web_drawInRect:withAttributes:]):
Emptied out all these functions since callers aren't really using them any more.

Source/WebKit/win:

* WebKitStatistics.cpp:
(WebKitStatistics::comClassNameCounts): Update to not use Vector::append(String).

Source/WTF:

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::reifyString): Removed code to update 16-bit shadow.

* wtf/text/StringBuilder.h: Removed deprecatedCharacters.
(WTF::StringBuilder::StringBuilder): Removed m_valid16BitShadowLength.
(WTF::StringBuilder::clear): Removed code to clear m_valid16BitShadowLength.
(WTF::StringBuilder::swap): Removed code to swap m_valid16BitShadowLength.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl): Removed code to free m_copyData16.
(WTF::StringImpl::upper): Use StringView::upconvertedCharacters for slow case.
(WTF::StringImpl::lower): Ditto.
(WTF::StringImpl::find): Use characters8/16 rather than deprecatedCharacters.
Added an 8-bit code path to one of the overloads. Might want to revisit later
to decide whether to use templates instead of copy/paste, or even use StringView
to cut down on duplicate code paths.
(WTF::StringImpl::findIgnoringCase): Ditto.
(WTF::StringImpl::sizeInBytes): Remove code to handle has16BitShadow case.
(WTF::equalIgnoringNullity): Added. To be called by the Vector template in the header.

* wtf/text/StringImpl.h: Removed deprecatedCharacters, has16BitShadow,
upconvertCharacters, getData16SlowCase, s_hashFlagHas16BitShadow, and m_copyData16.
(WTF::equalIgnoringNullity): Changed the template function into an inline that calls
a non-inline helper function. The non-inline function handles both 8-bit and 16-bit
strings.

* wtf/text/StringView.h:
(WTF::StringView::StringView): Added an overload so we can make one of these directly
from a StringImpl without first wrapping it in a string. Added an adapter so we can
use StringView as part of string concatenation. Added an append function so we can
append to a Vector<UChar>.

* wtf/text/WTFString.cpp:
(WTF::String::append): Use StringView::getCharactersWithUpconvert. Also changed
single-character append so it won't always turn an 8-bit string into a 16-bit one.
(WTF::String::insert): Removed one insert overload and changed the other to use
StringView::getCharactersWithUpconvert.
(WTF::String::truncate): Changed to use StringImpl::substring.
(WTF::String::percentage): Added characters8/16 paths instead of using
deprecatedCharacters.

* wtf/text/WTFString.h: Removed deprecatedCharacters, getCharactersWithUpconvert,
insert(UChar*, unsigned, unsigned), and the append overload for Vector<UChar>.

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

5 years agoUnreviewed, rolling out r166118.
commit-queue@webkit.org [Sat, 22 Mar 2014 18:31:06 +0000 (18:31 +0000)]
Unreviewed, rolling out r166118.
https://bugs.webkit.org/show_bug.cgi?id=130640

Crashing things (Requested by weinig on #webkit).

Reverted changeset:

"Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
properties"
https://bugs.webkit.org/show_bug.cgi?id=130639
http://trac.webkit.org/changeset/166118

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

5 years agoSwitch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
weinig@apple.com [Sat, 22 Mar 2014 18:01:20 +0000 (18:01 +0000)]
Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
https://bugs.webkit.org/show_bug.cgi?id=130639

Reviewed by Simon Fraser.

This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.

- Removes gratuitous lookup of CSS properties that are known at compile time.
- Removes attempted use of non-supported CSS properties (font-effect and horizontal-align)
  that will alway yield the same results.
- Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
  but instead used the non-existent font-effect.

* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):
(HTMLConverterCaches::propertyValueForNode):
(-[WebHTMLConverter _stringForNode:property:]):
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(HTMLConverterCaches::isBlockElement):
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):

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

5 years agoSource/WebCore: Don't flush compositing layers within FrameView::willPaintContents()
simon.fraser@apple.com [Sat, 22 Mar 2014 17:52:14 +0000 (17:52 +0000)]
Source/WebCore: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Remove the call to flushCompositingStateForThisFrame() here. We should
have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
Flushing during painting is actually harmful, since we could be inside
a CA commit already, and creating or destroying layers via flushing is bad.

* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):

Source/WebKit/mac: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627

Reviewed by Sam Weinig.

Make _flushCompositingChanges private so DRT can call it;
moved it into the Private category.

* WebView/WebView.mm:
(-[WebView _flushCompositingChanges]):
* WebView/WebViewPrivate.h:

Tools: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Fix DRT to correctly render tests with layers now that FrameView::paintContents
does not flush.

Move the -[WebView displayIfNeeded] from -[FrameLoadDelegate webView:didFinishLoadForFrame:]
into an explicit function called before dumping.

Then explicitly call _flushCompositingChanges to ensure that GraphicsLayer changes
are flushed to CA. They will be pushed to the window by snapshotting.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Fix weird path to IOKit.framework.
* DumpRenderTree/mac/DumpRenderTree.mm:
(updateDisplay):
(dump):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): Fix parameter name.
(-[FrameLoadDelegate webView:didFinishLoadForFrame:]): Remove display call.

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

5 years agoRemove duplicate line added during merging
simon.fraser@apple.com [Sat, 22 Mar 2014 17:51:00 +0000 (17:51 +0000)]
Remove duplicate line added during merging
https://bugs.webkit.org/show_bug.cgi?id=130623

Reviewed by Beth Dakin.

Remove a duplicate call to -_viewWillDrawInternal which
was added during merges.

* WebView/WebView.mm:
(LayerFlushController::flushLayers):

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

5 years agoAssertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
ap@apple.com [Sat, 22 Mar 2014 16:50:57 +0000 (16:50 +0000)]
Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
https://bugs.webkit.org/show_bug.cgi?id=130633
<rdar://problem/16397583>

Reviewed by Darin Adler.

* UIProcess/API/mac/WKView.mm:
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
There is no need for a round trip to WebProcess in this case.

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

5 years agoASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
darin@apple.com [Sat, 22 Mar 2014 15:16:42 +0000 (15:16 +0000)]
ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
https://bugs.webkit.org/show_bug.cgi?id=127361

Source/WebCore:

Huge numbers represented by the 'INF' value can not be used
in CSS rules, so they make the assert fail. We have to make
sure that the parsed property value is finite, otherwise
the property will be dropped.

Test: fast/css/infinite-floating-value.html

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createValue):

LayoutTests:

Added test shows that CSS rules containing huge numbers
(which are transformed into 'INF' values after parsing)
are dropped.

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22
Reviewed by Darin Adler.

* fast/css/infinite-floating-value-expected.txt: Added.
* fast/css/infinite-floating-value.html: Added.

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

5 years agoUse pthread_stackseg_np() to find the stack bounds on OpenBSD.
commit-queue@webkit.org [Sat, 22 Mar 2014 14:31:08 +0000 (14:31 +0000)]
Use pthread_stackseg_np() to find the stack bounds on OpenBSD.
https://bugs.webkit.org/show_bug.cgi?id=129965

Reviewed By Anders Carlsson.

Patch by Landry Breuil <landry@openbsd.org> on 2014-03-22

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

5 years agoRemove redundant friending from class Image.
zalan@apple.com [Sat, 22 Mar 2014 03:41:05 +0000 (03:41 +0000)]
Remove redundant friending from class Image.
https://bugs.webkit.org/show_bug.cgi?id=130628

Reviewed by Simon Fraser.

Those friend classes are subclasses. No need to make them friend of their parent class.

No change in functionality.

* platform/graphics/Image.h:

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

5 years ago[iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
benjamin@webkit.org [Sat, 22 Mar 2014 02:40:31 +0000 (02:40 +0000)]
[iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
https://bugs.webkit.org/show_bug.cgi?id=130555

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-21
Reviewed by Simon Fraser.

Source/WebCore:

* WebCore.exp.in:
* platform/ScrollView.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::computeTileCoverageRect):
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::setScrollVelocityInformation):
(WebCore::ScrollView::computeCoverageRect):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

Source/WebKit2:

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::operator==):
* UIProcess/ios/WKContentView.mm:
(WebKit::HistoricalKinematicData::HistoricalKinematicData):
(WebKit::HistoricalKinematicData::velocityForNewData):
(WebKit::HistoricalKinematicData::clear):
(WebKit::HistoricalKinematicData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

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

5 years agoCrash when BytecodeGenerator::emitJump calls Label::bind on null pointer.
mark.lam@apple.com [Fri, 21 Mar 2014 23:48:39 +0000 (23:48 +0000)]
Crash when BytecodeGenerator::emitJump calls Label::bind on null pointer.
<https://webkit.org/b/124508>

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

The issue is that BreakNode::emitBytecode() is holding onto a LabelScope
pointer from the BytecodeGenerator's m_localScopes vector, and then it
calls emitPopScopes().  emitPopScopes() may do finally clause handling
which will require the m_localScopes to be cloned so that it can change
the local scopes for the finally block, and then restore it after
handling the finally clause.  These modifications of the m_localScopes
vector will result in the LabelScope pointer in BreakNode::emitBytecode()
becoming stale, thereby causing the crash.

The same issue applies to the ContinueNode as well.

The fix is to use the existing LabelScopePtr abstraction instead of raw
LabelScope pointers.  The LabelScopePtr is resilient to the underlying
vector re-allocating its backing store.

I also changed the LabelScopePtr constructor that takes a LabelScopeStore
to expect a reference to the owner store instead of a pointer because the
owner store should never be a null pointer.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::newLabelScope):
(JSC::BytecodeGenerator::breakTarget):
(JSC::BytecodeGenerator::continueTarget):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/LabelScope.h:
(JSC::LabelScopePtr::LabelScopePtr):
(JSC::LabelScopePtr::operator bool):
(JSC::LabelScopePtr::null):
* bytecompiler/NodesCodegen.cpp:
(JSC::ContinueNode::trivialTarget):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::trivialTarget):
(JSC::BreakNode::emitBytecode):

LayoutTests:

* js/regress-124508-expected.txt: Added.
* js/regress-124508.html: Added.
* js/script-tests/regress-124508.js: Added.
(function_0):

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

5 years ago[iOS] clean up fullscreen player controller when exiting fullscreen
eric.carlson@apple.com [Fri, 21 Mar 2014 23:18:54 +0000 (23:18 +0000)]
[iOS] clean up fullscreen player controller when exiting fullscreen
https://bugs.webkit.org/show_bug.cgi?id=130621

Reviewed by Jer Noble.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setBounds:]): Do nothing if _avPlayerController is nil.
(-[WebAVVideoLayer setVideoLayerGravity:]): Ditto.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Set m_playerViewController delegate
    and player controller to nil.

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

5 years agoREGRESSION (r165356): Predictive Chinese input is broken
ap@apple.com [Fri, 21 Mar 2014 22:58:31 +0000 (22:58 +0000)]
REGRESSION (r165356): Predictive Chinese input is broken
https://bugs.webkit.org/show_bug.cgi?id=130619

Reviewed by Enrica Casucci.

* UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
state with closed composition.

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

5 years ago[WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
weinig@apple.com [Fri, 21 Mar 2014 22:43:25 +0000 (22:43 +0000)]
[WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130528

Reviewed by Tim Horton.

* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::getAuditToken):
Expose the audit data if available.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
Pass the audit data corresponding to the UIProcess.

* Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
* Configurations/NetworkProcess.xcconfig:
* Configurations/NetworkService.Development.xcconfig:
* Configurations/NetworkService.xcconfig:
* Configurations/WebContent-iOS.entitlements:
Add entitlement allowing the audit data to be used.

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

5 years ago[iOS] remote command callbacks must happen on the WebThread
eric.carlson@apple.com [Fri, 21 Mar 2014 22:21:29 +0000 (22:21 +0000)]
[iOS] remote command callbacks must happen on the WebThread
https://bugs.webkit.org/show_bug.cgi?id=130618

Reviewed by Jer Noble.

* platform/ios/RemoteCommandListenerIOS.h:
(WebCore::RemoteCommandListenerIOS::createWeakPtr):
* platform/ios/RemoteCommandListenerIOS.mm:
(WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Dispatch commands to the
    main thread before making listener callbacks.

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

5 years agoSubpixel rendering: Make <img> positioning subpixel aware.
zalan@apple.com [Fri, 21 Mar 2014 22:09:05 +0000 (22:09 +0000)]
Subpixel rendering: Make <img> positioning subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=130596

Reviewed by Simon Fraser.

Change <img> positioning from integral to device pixel. It enables us
to paint hairline borders around <img> properly.
This patch changes the behavior of broken image representation from constant 1 CSS px border
to a dynamic 1 device px.

Source/WebCore:

Test: fast/images/hidpi-image-position-on-device-pixels.html

* WebCore.exp.in:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawRect):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawRect):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawRect):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderImage.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):

LayoutTests:

* fast/images/hidpi-image-position-on-device-pixels-expected.html: Added.
* fast/images/hidpi-image-position-on-device-pixels.html: Added.

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

5 years ago6% SunSpider commandline regression due to r165940
mhahnenberg@apple.com [Fri, 21 Mar 2014 21:53:25 +0000 (21:53 +0000)]
6% SunSpider commandline regression due to r165940
https://bugs.webkit.org/show_bug.cgi?id=130617

Reviewed by Michael Saboff.

In GCActivityCallback::didAllocate, lastGCLength() returns 0 if we've never collected
before. Some of the benchmarks are never running a single EdenCollection, which causes
them to repeatedly call scheduleTimer with a newDelay of 0. This defeats our timer
slop heuristic, causing us to invoke CFRunLoopTimerSetNextFireDate a couple orders of
magnitude more than we normally would.

The fix is to seed the last GC lengths in Heap with a non-zero length so that our heuristic works.

* heap/Heap.cpp:
(JSC::Heap::Heap):

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

5 years agoAlways retrieve the screen scale factor from WKSI
timothy_horton@apple.com [Fri, 21 Mar 2014 21:49:18 +0000 (21:49 +0000)]
Always retrieve the screen scale factor from WKSI
<rdar://problem/16329679>

Reviewed by Sam Weinig.

* Misc/WebUIKitSupport.mm:
(WebKitSetIsClassic): Empty this out; it's no longer needed, but will still be called.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
(-[WKContentView _updateForScreen:]):
Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.

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

5 years agoMerge VTTScanner Code from Blink
bfulgham@apple.com [Fri, 21 Mar 2014 21:26:41 +0000 (21:26 +0000)]
Merge VTTScanner Code from Blink
https://bugs.webkit.org/show_bug.cgi?id=130616

Reviewed by Eric Carlson.

Merged from Blink (patch by fs@opera.com):
https://chromium.googlesource.com/chromium/blink/+/f1ceb058d574a1174b524c57f67350510a942071
http://crbug.com/75273002
https://chromium.googlesource.com/chromium/blink/+/3e2c67969486e86347b328c72c67cacabfe6f4a1
http://crbug.com/134173002
https://chromium.googlesource.com/chromium/blink/+/5962b7bbb001838f3fc7f24817637528b86bfd9b
http://crbug.com/134153002
https://chromium.googlesource.com/chromium/blink/+/6c81f51438013edca920a19fc6a31026fc562af2
http://crbug.com/137033002
https://chromium.googlesource.com/chromium/blink/+/fa286dca17a291da3ae8be80111e2264de6d5cfd
http://crbug.com/140503004
https://chromium.googlesource.com/chromium/blink/+/8f33b63aabcce7dd21dd15288d45c4eb37c02001
http://crbug.com/139343006
https://chromium.googlesource.com/chromium/blink/+/1872b54b908fac525f1ad9d6f15174b11e27c8af
http://crbug.com/143983002
https://chromium.googlesource.com/chromium/blink/+/e6494b3359e2077bd8772d86ab1fb709acf4c398
http://crbug.com/144893002

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/track/ParsingUtilities.h: Added.
(skipExactly):
(skipUntil):
(skipWhile):
* html/track/VTTCue.cpp:
(WebCore::VTTCue::markFutureAndPastNodes):
(WebCore::VTTCue::settingName):
(WebCore::scanPercentage):
(WebCore::VTTCue::setCueSettings):
* html/track/VTTCue.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::setRegionSettings):
(WebCore::VTTRegion::scanSettingName):
(WebCore::parsedEntireRun):
(WebCore::VTTRegion::parseSettingValue):
* html/track/VTTRegion.h:
* html/track/VTTScanner.cpp: Added.
(WebCore::VTTScanner::VTTScanner):
(WebCore::VTTScanner::scan):
(WebCore::VTTScanner::scanRun):
(WebCore::VTTScanner::skipRun):
(WebCore::VTTScanner::extractString):
(WebCore::VTTScanner::restOfInputAsString):
(WebCore::VTTScanner::scanDigits):
(WebCore::VTTScanner::scanFloat):
* html/track/VTTScanner.h: Added.
(WebCore::VTTScanner::Run::Run):
(WebCore::VTTScanner::Run::start):
(WebCore::VTTScanner::Run::end):
(WebCore::VTTScanner::Run::isEmpty):
(WebCore::VTTScanner::isAt):
(WebCore::VTTScanner::isAtEnd):
(WebCore::VTTScanner::match):
(WebCore::VTTScanner::position):
(WebCore::VTTScanner::end):
(WebCore::VTTScanner::LCharPredicateAdapter):
(WebCore::VTTScanner::Run::length):
(WebCore::VTTScanner::scan):
(WebCore::VTTScanner::skipWhile):
(WebCore::VTTScanner::skipUntil):
(WebCore::VTTScanner::collectWhile):
(WebCore::VTTScanner::collectUntil):
(WebCore::VTTScanner::seekTo):
(WebCore::VTTScanner::currentChar):
(WebCore::VTTScanner::advance):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseFloatPercentageValue):
(WebCore::WebVTTParser::parseFloatPercentageValuePair):
(WebCore::WebVTTParser::collectTimingsAndSettings):
(WebCore::WebVTTParser::collectTimeStamp):
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* html/track/WebVTTParser.h:

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

5 years ago[Webkit2] Add APIDownloadClient for download support.
aestes@apple.com [Fri, 21 Mar 2014 21:14:46 +0000 (21:14 +0000)]
[Webkit2] Add APIDownloadClient for download support.
https://bugs.webkit.org/show_bug.cgi?id=130484

Add API::DownloadClient to WebContext and get rid of WebDownloadClient.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-03-21
Reviewed by Anders Carlsson.

* UIProcess/API/APIDownloadClient.h: Added.
(API::DownloadClient::~DownloadClient):
(API::DownloadClient::didStart):
(API::DownloadClient::didReceiveAuthenticationChallenge):
(API::DownloadClient::didReceiveResponse):
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
(API::DownloadClient::didFinish):
(API::DownloadClient::didFail):
(API::DownloadClient::didCancel):
(API::DownloadClient::processDidCrash):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
    DownloadClient and set up the downloadClient for WebContext.
* UIProcess/Downloads/DownloadProxy.cpp:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setDownloadClient):
* UIProcess/WebContext.h:
(WebKit::WebContext::downloadClient):
* UIProcess/WebDownloadClient.cpp: Removed.
* UIProcess/WebDownloadClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoConstants folded by DFG::ByteCodeParser should not be dead.
fpizlo@apple.com [Fri, 21 Mar 2014 20:23:55 +0000 (20:23 +0000)]
Constants folded by DFG::ByteCodeParser should not be dead.
https://bugs.webkit.org/show_bug.cgi?id=130576

Reviewed by Mark Hahnenberg.

This fixes bugs in the ByteCodeParser's constant folder by removing that constant folder. This
reduces the number of folders in JSC from fourish to just threeish (parser, DFG AI, and one
or more folders in LLVM). Doing so has no performance impact since the other constant folders
already subsume this one.

Also added a test case for the specific bug that instigated this.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getJSConstantForValue):
(JSC::DFG::ByteCodeParser::getJSConstant):
(JSC::DFG::ByteCodeParser::inferredConstant):
(JSC::DFG::ByteCodeParser::handleIntrinsic):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGNode.h:
* dfg/DFGNodeFlags.h:
* tests/stress/constand-folding-osr-exit.js: Added.
(foo):
(test):
(.var):

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

5 years agoPseudo type cleanup part 2: split pseudo elements parsing
benjamin@webkit.org [Fri, 21 Mar 2014 19:56:27 +0000 (19:56 +0000)]
Pseudo type cleanup part 2: split pseudo elements parsing
https://bugs.webkit.org/show_bug.cgi?id=130370

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-21
Reviewed by Andreas Kling.

With this patch, pseudo elements are handled separately. The only thing left in
the old path is compatibility pseudo elements and pseudo classes.

The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.

The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().

All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
is updated accordingly. The next step will be to clean that part.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector):
(WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
(WebCore::CSSParserSelector::setPseudoTypeValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoElementType):
* css/CSSSelector.h:
* css/SelectorPseudoElementTypeMap.in: Added.
* css/SelectorPseudoTypeMap.h:
* css/SelectorPseudoTypeMap.in:
* css/html.css:
(q::before):
(q::after):
* css/makeSelectorPseudoElementsMap.py: Added.
(enumerablePseudoType):
(expand_ifdef_condition):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):

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

5 years agoUnreviewed test fix after r166080.
bfulgham@apple.com [Fri, 21 Mar 2014 19:40:17 +0000 (19:40 +0000)]
Unreviewed test fix after r166080.

* media/track/track-webvtt-tc029-timings-whitespace-expected.txt: Forgot to update this!

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

5 years agoUnreviewed test fix after r166080.
bfulgham@apple.com [Fri, 21 Mar 2014 19:24:07 +0000 (19:24 +0000)]
Unreviewed test fix after r166080.

The cue-timing separator will trigger the creation of a new cue. So this test needs to remove
use of the separator in the cue, so we can read the cue text.

* media/track/captions-webvtt/tc029-timings-whitespace.vtt:
* media/track/track-webvtt-tc029-timings-whitespace.html:

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

5 years agoLess inclusion of JSCInlines.h.
akling@apple.com [Fri, 21 Mar 2014 19:17:49 +0000 (19:17 +0000)]
Less inclusion of JSCInlines.h.
<https://webkit.org/b/130545>

Stop including JSCInlines.h from JSDOMGlobalObject.h!

Reviewed by Simon Fraser.

* ForwardingHeaders/runtime/IdentifierInlines.h: Added.
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSCommandLineAPIHostCustom.cpp:
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMStringMapCustom.cpp:
* bindings/js/JSHTMLAllCollectionCustom.cpp:
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
* bindings/js/JSLazyEventListener.cpp:
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSStorageCustom.cpp:
* bindings/js/ScriptGlobalObject.cpp:
* dom/NodeIterator.cpp:
* dom/TreeWalker.cpp:
* testing/Internals.cpp:
* testing/js/WebCoreTestSupport.cpp:

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

5 years agoSource/WebCore: Fix a crash when assigning an object to document.location
oliver@apple.com [Fri, 21 Mar 2014 19:12:40 +0000 (19:12 +0000)]
Source/WebCore: Fix a crash when assigning an object to document.location
https://bugs.webkit.org/show_bug.cgi?id=130213

Reviewed by Geoffrey Garen.

Convert location to string before we make use the document.
This prevents us from attempting to navigate a frame that
has already been removed.

Test: fast/dom/navigation-with-sideeffects-crash.html

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::JSDocument::setLocation):

LayoutTests: Fix semantics of JS execution when assigning an object to document.location
https://bugs.webkit.org/show_bug.cgi?id=130213

Reviewed by Geoffrey Garen.

* fast/dom/navigation-with-sideeffects-expected.txt: Added.
* fast/dom/navigation-with-sideeffects.html: Added.

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

5 years agoRefactor css3/filters/huge-region test
cavalcantii@gmail.com [Fri, 21 Mar 2014 19:10:00 +0000 (19:10 +0000)]
Refactor css3/filters/huge-region test
https://bugs.webkit.org/show_bug.cgi?id=129553

Reviewed by Dirk Schulze.

This patch refactors the huge-region to become a big enough
element to *not* be rendered. Plus, adds another test using a huge
blur filter kernel size that will trigger clamping the value to
maximum accepted value (500px).

* TestExpectations:
* css3/filters/huge-blur-value-expected.txt: Added.
* css3/filters/huge-blur-value.html: Copied from LayoutTests/css3/filters/huge-region.html.
* css3/filters/huge-region.html:

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

5 years agoWeb Replay: replay controller is improperly setting user input bridge state
bburg@apple.com [Fri, 21 Mar 2014 19:08:38 +0000 (19:08 +0000)]
Web Replay: replay controller is improperly setting user input bridge state
https://bugs.webkit.org/show_bug.cgi?id=130606

Reviewed by Timothy Hatcher.

The user input bridge was being set based on the old session state,
rather than the new session state.

* replay/ReplayController.cpp:
(WebCore::ReplayController::setSessionState):

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

5 years agoWeb Inspector: AXI: Expose Accessibility Tree children of the selected node
commit-queue@webkit.org [Fri, 21 Mar 2014 19:08:13 +0000 (19:08 +0000)]
Web Inspector: AXI: Expose Accessibility Tree children of the selected node
https://bugs.webkit.org/show_bug.cgi?id=130264

Patch by James Craig <jcraig@apple.com> on 2014-03-21
Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

Expose the accessibility tree children (different from DOM children) of the
current node in the accessibility node inspector.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

Expose the accessibility tree children (different from DOM children) of the
current node in the accessibility node inspector.

* Localizations/en.lproj/localizedStrings.js: New "Children" string.
* UserInterface/Base/DOMUtilities.js: Added linkifyAccessibilityNodeReference.
* UserInterface/Models/DOMNode.js: Support for accessibility children.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js: Support for accessibility children.
* UserInterface/Views/Main.css: New styles for .node-link-list.

LayoutTests:

Updating for support of accessibility tree children.

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:

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

5 years agoUnreviewed WebKitGtk+ rebaseline.
svillar@igalia.com [Fri, 21 Mar 2014 19:05:48 +0000 (19:05 +0000)]
Unreviewed WebKitGtk+ rebaseline.

* platform/gtk-wk1/js/dom/global-constructors-attributes-expected.txt: Renamed from LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt.
* platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt:

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

5 years ago[Win] Compile fixes with video not enabled.
commit-queue@webkit.org [Fri, 21 Mar 2014 19:04:20 +0000 (19:04 +0000)]
[Win] Compile fixes with video not enabled.
https://bugs.webkit.org/show_bug.cgi?id=130597

Patch by Alex Christensen <achristensen@webkit.org> on 2014-03-21
Reviewed by Darin Adler.

Source/WebCore:

* DerivedSources.make:
Only generate UserAgentScripts.h if needed.
* platform/audio/MediaSession.cpp:
* platform/audio/MediaSessionManager.cpp:
Only compile if video is enabled.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Only include MediaSessionManager symbols if video is enabled.

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

5 years agoOptimize FEGaussian blur
cavalcantii@gmail.com [Fri, 21 Mar 2014 19:02:35 +0000 (19:02 +0000)]
Optimize FEGaussian blur
https://bugs.webkit.org/show_bug.cgi?id=50881

Reviewed by Dirk Schulze.

Currently boxBlur() will calculate the filter for each channel in
a loop and also uses Uint8ClampedArray::set() to write the
resulting pixels into destination array.

Using Uint8ClampedArray::set() requires lots of unnecessary type
conversions, not to mention other function calls. This patch
updates the original written by Simon Fraser to apply cleanly to current
trunk.

It also implements code to handle EdgeModes and finally avoids use
of ::set() in the newly added boxBlurAlphaOnly()
function. Assignment of calculated pixel values rely on pointers.

No new tests, no change on behavior.

* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::boxBlurAlphaOnly): Specialized version for alpha only cases.
(WebCore::boxBlur):

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

5 years agoASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
ap@apple.com [Fri, 21 Mar 2014 19:00:57 +0000 (19:00 +0000)]
ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
https://bugs.webkit.org/show_bug.cgi?id=130526
<rdar://problem/16371612>

This was fixed yesterday for sync code path, landing the same this for async one.

* UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):

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

5 years agounobscuredContentRect() should have the same signature on iOS and other platforms,
simon.fraser@apple.com [Fri, 21 Mar 2014 18:56:04 +0000 (18:56 +0000)]
unobscuredContentRect() should have the same signature on iOS and other platforms,
and should not recurse on iOS.
https://bugs.webkit.org/show_bug.cgi?id=130604
<rdar://problem/16392587>

Reviewed by Tim Horton and Beth Dakin.

Having different signatures on different platforms is a recipe for
build breakage. Give the iOS unobscuredContentRect() an unused
VisibleContentRectIncludesScrollbars parameter.

Also avoid recursion via unobscuredContentRect() calling visibleContentRectInternal().

* WebCore.exp.in:
* platform/ScrollView.cpp:
(WebCore::ScrollView::unobscuredContentRect):
(WebCore::ScrollView::unobscuredContentRectInternal):
(WebCore::ScrollView::visibleContentRectInternal):
* platform/ScrollView.h:
(WebCore::ScrollView::unobscuredContentRectIncludingScrollbars):
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unobscuredContentRect):

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

5 years agofix-blink-patch: tool to fix up renamed directory paths in Blink
ddkilzer@apple.com [Fri, 21 Mar 2014 18:55:10 +0000 (18:55 +0000)]
fix-blink-patch: tool to fix up renamed directory paths in Blink
<http://webkit.org/b/130609>

Reviewed by Ryosuke Niwa.

Usage: cat blink.patch | fix-blink-patch | svn-apply

* Scripts/fix-blink-patch: Added.

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

5 years agoHandle recovery on "timestamp-looking" lines in the WebVTT parser
bfulgham@apple.com [Fri, 21 Mar 2014 18:41:08 +0000 (18:41 +0000)]
Handle recovery on "timestamp-looking" lines in the WebVTT parser
https://bugs.webkit.org/show_bug.cgi?id=130610

Reviewed by Eric Carlson.

Merged from Blink (patch by fs@opera.com):
https://chromium.googlesource.com/chromium/blink/+/b669a380efbffe25f3b154b026b57b9822ce08e2
http://crbug.com/75273002

Source/WebCore:

Tests: media/track/track-webvtt-tc031-cue-recovery.html
       media/track/track-webvtt-tc032-degenerate-cues.html

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parse):
(WebCore::WebVTTParser::collectCueText):
(WebCore::WebVTTParser::recoverCue):
(WebCore::WebVTTParser::ignoreBadCue):
* html/track/WebVTTParser.h:

LayoutTests:

* media/track/captions-webvtt/tc006-cue-id-error.vtt:
* media/track/captions-webvtt/tc007-cue-no-id-error.vtt:
* media/track/captions-webvtt/tc011-cues-no-separation.vtt:
* media/track/captions-webvtt/tc031-cue-recovery-cuetext.vtt: Added.
* media/track/captions-webvtt/tc031-cue-recovery-header.vtt: Added.
* media/track/captions-webvtt/tc031-cue-recovery-note.vtt: Added.
* media/track/captions-webvtt/tc032-degenerate-cues.vtt: Added.
* media/track/track-webvtt-tc006-cue-identifiers-expected.txt:
* media/track/track-webvtt-tc006-cue-identifiers.html:
* media/track/track-webvtt-tc007-cue-no-id-expected.txt:
* media/track/track-webvtt-tc007-cue-no-id.html:
* media/track/track-webvtt-tc011-blank-lines-expected.txt:
* media/track/track-webvtt-tc011-blank-lines.html:
* media/track/track-webvtt-tc031-cue-recovery-expected.txt: Added.
* media/track/track-webvtt-tc031-cue-recovery.html: Added.
* media/track/track-webvtt-tc032-degenerate-cues-expected.txt: Added.
* media/track/track-webvtt-tc032-degenerate-cues.html: Added.

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

5 years agoRemove unused RenderView::repaintRectangleInViewAndCompositedLayers().
akling@apple.com [Fri, 21 Mar 2014 18:28:06 +0000 (18:28 +0000)]
Remove unused RenderView::repaintRectangleInViewAndCompositedLayers().
<https://webkit.org/b/130605>

Reviewed by Antti Koivisto.

* rendering/RenderView.cpp:
* rendering/RenderView.h:

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

5 years agoCrash in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
hyatt@apple.com [Fri, 21 Mar 2014 18:13:24 +0000 (18:13 +0000)]
Crash in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
https://bugs.webkit.org/show_bug.cgi?id=129948
<rdar://problem/16074072>

Reviewed by Simon Fraser.

Source/WebCore:

When the marker was placed for multi-column list items, it was being inserted
into the list item itself. Even though the add code in RenderBlock did the right
thing and put the marker inside the multi-column flow thread, the list item code
passed in a beforeChild that was computed using the incorrect parent. This resulted
in the flow thread being used both as the parent of the marker and the sibling of
the marker.

The fix is to add some code to RenderListItem to make sure it uses the multi-column
flow thread if it exists both as the parent of the marker and as the basis for the
computation of the sibling that the marker should be placed in front of.

Added fast/multicol/multicol-li-crash.html

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):

LayoutTests:

* fast/multicol/multicol-li-crash-expected.txt: Added.
* fast/multicol/multicol-li-crash.html: Added.

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

5 years agoUnreviewed. Rebaseline expectations after r165651.
svillar@igalia.com [Fri, 21 Mar 2014 18:02:35 +0000 (18:02 +0000)]
Unreviewed. Rebaseline expectations after r165651.

* platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt: Replaced Path by Path2D.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt: Ditto.

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

5 years agoRemove use of deprecatedCharacters in WebKit API tests
darin@apple.com [Fri, 21 Mar 2014 17:59:11 +0000 (17:59 +0000)]
Remove use of deprecatedCharacters in WebKit API tests
https://bugs.webkit.org/show_bug.cgi?id=130602

Reviewed by Antti Koivisto.

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::expectBuilderContent): Use characters8/16 instead of deprecatedCharacters.
(TestWebKitAPI::expectEmpty): Use characters8.
(TestWebKitAPI::TEST): Use characters8 instead of deprecatedCharacters in most cases.

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
Removed the test that is entirely about 16-bit conversion since that's basically a test of
the deprecatedCharacters function itself, which we are about to delete.

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

5 years agoAdd callbacks in WebKit2 Cocoa API for page load testing
psolanki@apple.com [Fri, 21 Mar 2014 17:55:59 +0000 (17:55 +0000)]
Add callbacks in WebKit2 Cocoa API for page load testing
https://bugs.webkit.org/show_bug.cgi?id=130569

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didFirstVisuallyNonEmptyLayoutForFrame):
(didHandleOnloadEventsForFrame):
(setUpPageLoaderClient):
(willSendRequestForFrame):
(didInitiateLoadForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(setUpResourceLoadClient):

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

5 years agoGenerated hidpi- images (actual) on ML WK2 Debug are blurry/color shifted.
zalan@apple.com [Fri, 21 Mar 2014 17:52:39 +0000 (17:52 +0000)]
Generated hidpi- images (actual) on ML WK2 Debug are blurry/color shifted.

Unreviewed TestExpectations update on ML WK2 debug.

* platform/mac-wk2/TestExpectations:

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

5 years agoStop pulling in JSCInlines.h all over the place.
akling@apple.com [Fri, 21 Mar 2014 17:42:35 +0000 (17:42 +0000)]
Stop pulling in JSCInlines.h all over the place.
<https://webkit.org/b/130105>

JSDOMBinding.h is included by everyone and their uncle, so try to
cut down on the amount of JSC *Inlines.h it includes.

Reviewed by Geoff Garen.

* ForwardingHeaders/heap/SlotVisitorInlines.h: Added.
* ForwardingHeaders/runtime/JSCJSValueInlines.h: Added.
* ForwardingHeaders/runtime/JSCellInlines.h: Added.
* ForwardingHeaders/runtime/StructureInlines.h: Added.
* bindings/js/JSDOMBinding.h:

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

5 years agoWindowFeatures.{x|y|width|height} are not initialized
ddkilzer@apple.com [Fri, 21 Mar 2014 17:36:57 +0000 (17:36 +0000)]
WindowFeatures.{x|y|width|height} are not initialized
<http://webkit.org/b/130547>
<rdar://problem/16383151>

Reviewed by Darin Adler.

Based on a Blink patch in CRBug 342591 by zhaoqin.

* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::WindowFeatures):
- Initialize x, y, width, height in String constructor.
- Move 'resizeable' variable to short-hand initialization since
  it is true in both cases.
- Use String::isEmpty() instead of checking its length.
* page/WindowFeatures.h:
(WebCore::WindowFeatures::WindowFeatures): Initialize x, y,
width, height in no-argument constructor.

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

5 years agoReplace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/
svillar@igalia.com [Fri, 21 Mar 2014 17:32:09 +0000 (17:32 +0000)]
Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/
https://bugs.webkit.org/show_bug.cgi?id=130601

Reviewed by Darin Adler.

* bridge/IdentifierRep.cpp:
(WebCore::identifierSet):
(WebCore::intIdentifierMap):
(WebCore::stringIdentifierMap):
* bridge/NP_jsobject.cpp:
(objectMap):
* bridge/runtime_root.cpp:
(JSC::Bindings::rootObjectSet): Return a reference instead of
a pointer.
(JSC::Bindings::findProtectingRootObject):
(JSC::Bindings::findRootObject):
(JSC::Bindings::RootObject::RootObject):
(JSC::Bindings::RootObject::invalidate):

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

5 years agoChange CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose
msaboff@apple.com [Fri, 21 Mar 2014 17:29:03 +0000 (17:29 +0000)]
Change CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose
https://bugs.webkit.org/show_bug.cgi?id=130553

Reviewed by Geoffrey Garen.

Eliminated 'if ($interfaceName eq "DOMWindow") {' sections in CodeGeneratorJS where
it was used to do DOMWindow specific casting to a JSObject, either a JSDOMWindow* or
a JSDOMWindowShell*.  Instead the code generator will use the existing
JSDOMWindow* toJSDOMWindow(JSValue value) function based on a newly added attribute
"CustomProxyToJSObject".  That attribute will emit a call to the function
${className}* to${className}(JSValue).

This is being done to clean up the code generator and for a subsequent patch that
will use a similar custom to{className} function for workers,
JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSValue).

Changes covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:

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

5 years agoAX: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed
k.czech@samsung.com [Fri, 21 Mar 2014 17:08:10 +0000 (17:08 +0000)]
AX: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=130594

Reviewed by Chris Fleizach.

Use static NeverDestroyed<T> in new code.

* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::controlTypeName):
(WebCore::AccessibilityMediaControl::title):
(WebCore::AccessibilityMediaControlsContainer::elementTypeName):
(WebCore::AccessibilityMediaTimeline::helpText):
(WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
(WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
(WebCore::AccessibilityRenderObject::actionVerb):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):

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

5 years agoUnreviewed test fix after my last checkin. Add missing test expectation.
bfulgham@apple.com [Fri, 21 Mar 2014 17:05:29 +0000 (17:05 +0000)]
Unreviewed test fix after my last checkin. Add missing test expectation.

* http/tests/media/track/track-webvtt-slow-loading-expected.txt: Added.

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