WebKit-https.git
6 years agoNew perf dashboard should provide UI to create a new analysis task
rniwa@webkit.org [Thu, 20 Nov 2014 23:25:07 +0000 (23:25 +0000)]
New perf dashboard should provide UI to create a new analysis task
https://bugs.webkit.org/show_bug.cgi?id=138910

Reviewed by Benjamin Poulain.

This patch reverts some parts of r175006 and re-introduces bugs associated with analysis tasks.
I'll add UI to show and edit bug numbers associated with an analysis task in a follow up patch.

With this patch, we can create a new analysis task by selection a range of points and opening
"analysis pane" (renamed from "bugs pane"). Each analysis task created is represented by a yellow bar
in the chart hyperlinked to the analysis task.

* init-database.sql: Redefined the bugs to be associated with an analysis task instead of a test run.

* public/api/analysis-tasks.php: Added the support for querying analysis tasks for a specific metric
on a specific platform. Also retrieve and return all bugs associated with analysis tasks.
(main):
(fetch_and_push_bugs_to_tasks): Added. Fetches all bugs associated with an array of analysis tasks
and adds the associated bugs to each task in the array.
(format_task):

* public/api/runs.php: Reverted changes made in r175006.
(fetch_runs_for_config):
(format_run):

* public/api/test-groups.php:
(fetch_test_groups_for_task): Use the newly added Database::select_rows.

* public/include/db.php:
(Database::select_first_or_last_row):
(Database::select_rows): Extracted from select_first_or_last_row.

* public/v2/analysis.js:
(App.AnalysisTask): Added "bugs" property.
(App.Bug): Added now that bugs are regular data store objects.

* public/v2/app.js:
(App.Pane._fetch): Calls this.fetchAnalyticRanges to fetch analysis tasks as well as test runs.
(App.Pane.fetchAnalyticRanges): Added. Fetches analysis tasks for the current metric on the current
platform that are associated with a specific range of runs.
(App.PaneController.actions.toggleBugsPane): Updated per showingBugsPane to showingAnalysisPane rename.
(App.PaneController.actions.associateBug): Deleted.
(App.PaneController.actions.createAnalysisTask): Replaced the pre-condition checks with assertions as
this action should never be triggered when the pre-condition is not met. Also re-fetch analysis tasks
once we've created one.
(App.PaneController.toggleSearchPane): Updated per showingBugsPane to showingAnalysisPane rename.
(App.PaneController._detailsChanged): Ditto. Removed selectedSinglePoint since it's no longer used.
(App.PaneController._showDetails): Call _updateCanAnalyze to update the status of "Analyze" button.
(App.PaneController._updateBugs): Deleted.
(App.PaneController._updateMarkedPoints): Deleted.
(App.PaneController._updateCanAnalyze): Added. Disables the button to create an analysis task when
the name is missing or when at most one point is selected.

(App.InteractiveChartComponent._constructGraphIfPossible): Update the locations of range rects.
(App.InteractiveChartComponent._relayoutDataAndAxes): Ditto.
(App.InteractiveChartComponent._mousePointInGraph): Don't return a point unless the mouse cursor is
on our svg element to avoid locking the current item when a bar shown for an analysis task is clicked.
(App.InteractiveChartComponent._rangesChanged): Added. Creates an array of objects representing
clickable bars for analysis tasks.
(App.InteractiveChartComponent._updateRangeBarRects): Computes the inline style used by each clickable
bar for analysis tasks to place them at the right location.
(App.InteractiveChartComponent.actions.openRange): Added. Forwards the action to the parent controller.

* public/v2/chart-pane.css:
(.chart .extent): Use the same color as the vertical indicator in the highlight behind the selection.
(.chart .rangeBar): Added.

* public/v2/data.js:
(TimeSeries.prototype.nextPoint): Added. Used by _rangesChanged.

* public/v2/index.html: Renamed "bugs pane" to "analysis pane" and removed the UI to associate bugs.
This ability will be reinstated in a follow up patch. Also added a container div and spans for analysis
task bars in the interactive chart component.

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

6 years agoURTBF after r176420 to fix non Apple builds.
ossy@webkit.org [Thu, 20 Nov 2014 23:04:51 +0000 (23:04 +0000)]
URTBF after r176420 to fix non Apple builds.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):

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

6 years agoWebPlugInClient::m_webPage can never be null, use a reference
andersca@apple.com [Thu, 20 Nov 2014 22:56:22 +0000 (22:56 +0000)]
WebPlugInClient::m_webPage can never be null, use a reference
https://bugs.webkit.org/show_bug.cgi?id=138937

Reviewed by Andreas Kling.

* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::WebPlugInClient):
(WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
* WebProcess/WebProcess.h:

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

6 years ago[iOS] Update TestExpectation file for LayoutTests/canvas tests
dbates@webkit.org [Thu, 20 Nov 2014 22:33:07 +0000 (22:33 +0000)]
[iOS] Update TestExpectation file for LayoutTests/canvas tests

Also skip some LayoutTests/animation tests that are flaky or fail due to an assertion failure.

* platform/ios-simulator/TestExpectations:

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

6 years agoTextIndicator should have getters for TextIndicator::Data properties
timothy_horton@apple.com [Thu, 20 Nov 2014 22:26:10 +0000 (22:26 +0000)]
TextIndicator should have getters for TextIndicator::Data properties
https://bugs.webkit.org/show_bug.cgi?id=138920

Reviewed by Beth Dakin.

Instead of having clients reach into the data(), add getters.
Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
Remove declarations for draw/drawContentImage, which were already removed.

* Shared/TextIndicator.cpp:
(WebKit::TextIndicator::frameRect): Deleted.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
(WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
(WebKit::TextIndicator::contentImageScaleFactor):
(WebKit::TextIndicator::contentImageWithHighlight):
(WebKit::TextIndicator::contentImage):
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(WebKit::TextIndicatorWindow::setTextIndicator):

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

6 years agoRemove a piece of DataDetectors SPI that we aren't using anymore
timothy_horton@apple.com [Thu, 20 Nov 2014 22:23:30 +0000 (22:23 +0000)]
Remove a piece of DataDetectors SPI that we aren't using anymore
https://bugs.webkit.org/show_bug.cgi?id=138917

Reviewed by Beth Dakin.

* platform/spi/mac/DataDetectorsSPI.h:

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

6 years agoSkip flaky inspector-protocol/debugger tests.
ap@apple.com [Thu, 20 Nov 2014 22:17:22 +0000 (22:17 +0000)]
Skip flaky inspector-protocol/debugger tests.
webkit.org/b/100846, webkit.org/b/136715

* platform/mac/TestExpectations:

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

6 years agoCancel DataDetectors menu earlier if we know it can't be presented
timothy_horton@apple.com [Thu, 20 Nov 2014 22:16:55 +0000 (22:16 +0000)]
Cancel DataDetectors menu earlier if we know it can't be presented
https://bugs.webkit.org/show_bug.cgi?id=138922
<rdar://problem/18950441>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
If we end up with a menu with no items, don't change selection or anything.

(-[WKActionMenuController menuNeedsUpdate:]):
Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
and use a bigger hammer (removeAllItems).

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
and use a bigger hammer (removeAllItems).

(-[WebActionMenuController willOpenMenu:withEvent:]):
If we end up with a menu with no items, don't change selection or anything.

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

6 years agoDon't use a TextIndicator BounceAndCrossfade transition if the selection highlight...
timothy_horton@apple.com [Thu, 20 Nov 2014 22:10:58 +0000 (22:10 +0000)]
Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
https://bugs.webkit.org/show_bug.cgi?id=138919
<rdar://problem/19042207>

Reviewed by Beth Dakin.

* Shared/TextIndicator.h:
(WebKit::TextIndicator::presentationTransition):
(WebKit::TextIndicator::setPresentationTransition):
Add getter and setter pair.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
If the selection highlight will never be shown because there's only a single menu item,
use a normal bounce animation instead of bounce + crossfade.

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

6 years agohttp tests should not use shared temporary files, part 2
ap@apple.com [Thu, 20 Nov 2014 22:10:37 +0000 (22:10 +0000)]
http tests should not use shared temporary files, part 2
https://bugs.webkit.org/show_bug.cgi?id=138894

Rubber-stamped by Tim Horton.

Made more scripts that access local files use per-test files. Some tests could use
HTTP referrer, others needed explicit parameters.

* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-allow.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-block.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-empty.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-filter.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-invalid.html:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame.html:
* http/tests/security/contentSecurityPolicy/resources/echo-report.php:
* http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html: Removed.
* http/tests/security/contentSecurityPolicy/resources/generate-csp-report.php: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html.
* http/tests/security/contentSecurityPolicy/resources/go-to-echo-report.php: Added.
* http/tests/security/contentSecurityPolicy/resources/reflected-xss-and-xss-protection.js:
(testMixedHeader):
* http/tests/security/contentSecurityPolicy/resources/report-file-path.php: Added.
* http/tests/security/contentSecurityPolicy/resources/save-report.php:
* http/tests/security/contentSecurityPolicy/xmlhttprequest-protected-resource-does-not-crash.html:
* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-location.html:
* http/tests/security/xssAuditor/block-does-not-leak-referrer.html:
* http/tests/security/xssAuditor/cookie-injection-expected.txt:
* http/tests/security/xssAuditor/cookie-injection.html:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2.html:
* http/tests/security/xssAuditor/embed-tag-code-attribute-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute.html:
* http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-control-char.html:
* http/tests/security/xssAuditor/embed-tag-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url.html:
* http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-null-char.html:
* http/tests/security/xssAuditor/embed-tag.html:
* http/tests/security/xssAuditor/faux-script1.html:
* http/tests/security/xssAuditor/faux-script2.html:
* http/tests/security/xssAuditor/faux-script3.html:
* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/form-action.html:
* http/tests/security/xssAuditor/formaction-on-button-expected.txt:
* http/tests/security/xssAuditor/formaction-on-button.html:
* http/tests/security/xssAuditor/formaction-on-input-expected.txt:
* http/tests/security/xssAuditor/formaction-on-input.html:
* http/tests/security/xssAuditor/frameset-injection-expected.txt:
* http/tests/security/xssAuditor/frameset-injection.html:
* http/tests/security/xssAuditor/full-block-get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-get-from-iframe.html:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url.html:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick.html:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag.html:
* http/tests/security/xssAuditor/full-block-post-from-iframe.html:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html:
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source.html:
* http/tests/security/xssAuditor/full-block-script-tag.html:
* http/tests/security/xssAuditor/get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/get-from-iframe.html:
* http/tests/security/xssAuditor/iframe-injection-allowed-2.html:
* http/tests/security/xssAuditor/iframe-injection-allowed-3.html:
* http/tests/security/xssAuditor/iframe-injection-allowed.html:
* http/tests/security/xssAuditor/iframe-injection-expected.txt:
* http/tests/security/xssAuditor/iframe-injection.html:
* http/tests/security/xssAuditor/iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html:
* http/tests/security/xssAuditor/iframe-javascript-url.html:
* http/tests/security/xssAuditor/iframe-onload-GBK-char-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-GBK-char.html:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag.html:
* http/tests/security/xssAuditor/iframe-srcdoc-expected.txt:
* http/tests/security/xssAuditor/iframe-srcdoc.html:
* http/tests/security/xssAuditor/img-onerror-GBK-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-GBK-char.html:
* http/tests/security/xssAuditor/img-onerror-accented-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-accented-char.html:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html:
* http/tests/security/xssAuditor/img-onerror-tricky.html:
* http/tests/security/xssAuditor/img-tag-with-comma-expected.txt:
* http/tests/security/xssAuditor/img-tag-with-comma.html:
* http/tests/security/xssAuditor/inline-event-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/inline-event-HTML-entities.html:
* http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
* http/tests/security/xssAuditor/link-onclick-ampersand.html:
* http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-control-char.html:
* http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
* http/tests/security/xssAuditor/link-onclick-entities.html:
* http/tests/security/xssAuditor/link-onclick-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char.html:
* http/tests/security/xssAuditor/link-onclick.html:
* http/tests/security/xssAuditor/link-opens-new-window-expected.txt:
* http/tests/security/xssAuditor/link-opens-new-window.html:
* http/tests/security/xssAuditor/malformed-HTML-expected.txt:
* http/tests/security/xssAuditor/malformed-HTML.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9.html:
* http/tests/security/xssAuditor/no-protection-script-tag.html:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char.html:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char.html:
* http/tests/security/xssAuditor/object-embed-tag.html:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url.html:
* http/tests/security/xssAuditor/object-tag.html:
* http/tests/security/xssAuditor/open-event-handler-iframe-expected.txt:
* http/tests/security/xssAuditor/open-event-handler-iframe.html:
* http/tests/security/xssAuditor/open-iframe-src-03-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-03.html:
* http/tests/security/xssAuditor/post-from-iframe.html:
* http/tests/security/xssAuditor/report-script-tag-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block.html:
* http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-replace-state.html:
* http/tests/security/xssAuditor/report-script-tag.html:
* http/tests/security/xssAuditor/resources/echo-intertag.pl:
* http/tests/security/xssAuditor/script-tag-Big5-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html:
* http/tests/security/xssAuditor/script-tag-Big5-char.html:
* http/tests/security/xssAuditor/script-tag-Big5-char2-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char2.html:
* http/tests/security/xssAuditor/script-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-control-char.html:
* http/tests/security/xssAuditor/script-tag-convoluted-expected.txt:
* http/tests/security/xssAuditor/script-tag-convoluted.html:
* http/tests/security/xssAuditor/script-tag-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-entities.html:
* http/tests/security/xssAuditor/script-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-expression-follows-expected.txt:
* http/tests/security/xssAuditor/script-tag-expression-follows.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3.html:
* http/tests/security/xssAuditor/script-tag-near-start-expected.txt:
* http/tests/security/xssAuditor/script-tag-near-start.html:
* http/tests/security/xssAuditor/script-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-null-char.html:
* http/tests/security/xssAuditor/script-tag-open-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-open-redirect.html:
* http/tests/security/xssAuditor/script-tag-post-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-control-char.html:
* http/tests/security/xssAuditor/script-tag-post-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char.html:
* http/tests/security/xssAuditor/script-tag-post.html:
* http/tests/security/xssAuditor/script-tag-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-redirect.html:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html:
* http/tests/security/xssAuditor/script-tag-with-actual-comma-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-actual-comma.html:
* http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-callbacks.html:
* http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-01.html:
* http/tests/security/xssAuditor/script-tag-with-comma-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-02.html:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode.html:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag.html:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding.html:
* http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-control-char.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3.html:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote.html:
* http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-entities.html:
* http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote.html:
* http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-null-char.html:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html:
* http/tests/security/xssAuditor/script-tag-with-source-same-host.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03.html:
* http/tests/security/xssAuditor/script-tag-with-source.html:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5.html:
* http/tests/security/xssAuditor/script-tag.html:
* http/tests/security/xssAuditor/svg-animate-expected.txt:
* http/tests/security/xssAuditor/svg-animate.html:
* http/tests/security/xssAuditor/svg-script-tag-expected.txt:
* http/tests/security/xssAuditor/svg-script-tag.html:
* http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-big5.html:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis.html:
* http/tests/security/xssAuditor/xss-protection-parsing-01.html:
* http/tests/security/xssAuditor/xss-protection-parsing-02-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-02.html:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03.html:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04.html:

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

6 years agoInvalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
bdakin@apple.com [Thu, 20 Nov 2014 22:03:39 +0000 (22:03 +0000)]
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
https://bugs.webkit.org/show_bug.cgi?id=138568
-and corresponding-
rdar://problem/18904600

Reviewed by Tim Horton.

Source/WebCore:

Add an optional parameter indicating whether or not to include images.
* WebCore.exp.in:
* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange):

Source/WebKit/mac:

Skip images for lookup.
* WebView/WebActionMenuController.mm:
(performDictionaryLookupForRange):

Source/WebKit2:

Skip images for lookup.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):

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

6 years ago[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
dbates@webkit.org [Thu, 20 Nov 2014 21:50:06 +0000 (21:50 +0000)]
[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=138928

Reviewed by Simon Fraser.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

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

6 years agoFix the !ENABLE(SVG_FONTS) build after r176276
mmaxfield@apple.com [Thu, 20 Nov 2014 21:45:54 +0000 (21:45 +0000)]
Fix the !ENABLE(SVG_FONTS) build after r176276
https://bugs.webkit.org/show_bug.cgi?id=138924

Reviewed by Csaba Osztrogon√°c.

No new tests because there is no behavior change.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):

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

6 years ago[iOS] Update expected results for LayoutTests/animations
dbates@webkit.org [Thu, 20 Nov 2014 21:43:21 +0000 (21:43 +0000)]
[iOS] Update expected results for LayoutTests/animations

* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/animations/3d/replace-filling-transform-expected.txt: Added.
* platform/ios-simulator/animations/animation-offscreen-to-onscreen-expected.txt: Added.
* platform/ios-simulator/animations/missing-values-first-keyframe-expected.txt: Added.
* platform/ios-simulator/animations/missing-values-last-keyframe-expected.txt: Added.
* platform/ios-simulator/animations/opacity-transform-animation-expected.txt: Added.
* platform/ios-simulator/animations/suspend-transform-animation-expected.txt: Added.

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

6 years agoAdd -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
andersca@apple.com [Thu, 20 Nov 2014 20:01:40 +0000 (20:01 +0000)]
Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
https://bugs.webkit.org/show_bug.cgi?id=138929
<rdar://problem/18683802>

Reviewed by Dan Bernstein.

Also, re-implement -[WKWebView loadHTMLString:baseURL:] in terms of this newly added function
and assume a UTF-8 encoding. This matches what Legacy WebKit does.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView loadData:MIMEType:textEncodingName:baseURL:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadData):
* UIProcess/WebPageProxy.h:

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

6 years agoUpdate media/track/track-in-band-cues-added-once.html to make failures easier to...
eric.carlson@apple.com [Thu, 20 Nov 2014 19:12:32 +0000 (19:12 +0000)]
Update media/track/track-in-band-cues-added-once.html to make failures easier to diagnose
https://bugs.webkit.org/show_bug.cgi?id=138908

Reviewed by Alexey Proskuryakov.

* media/track/track-in-band-cues-added-once.html: Update test to remove one potential
    source of flakeyness and to do more logging in the event of a failure to make debugging
    failures simpler.
* media/track/track-in-band-cues-added-once-expected.txt:

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

6 years ago[iOS] Temporarily skip almost all DRT tests
dbates@webkit.org [Thu, 20 Nov 2014 19:06:43 +0000 (19:06 +0000)]
[iOS] Temporarily skip almost all DRT tests

Towards updating the expected results on iOS, temporarily skip running almost
all DRT tests on iOS. We'll subsequently un-skip tests as we land updated/new
expected results for them.

* platform/ios-simulator/TestExpectations:

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

6 years agoRename String.prototype.contains to String.prototype.includes
utatane.tea@gmail.com [Thu, 20 Nov 2014 18:50:46 +0000 (18:50 +0000)]
Rename String.prototype.contains to String.prototype.includes
https://bugs.webkit.org/show_bug.cgi?id=138923

Source/JavaScriptCore:

As per the latest TC39 meeting[1, 2], String.prototype.contains is
renamed to String.prototype.includes. This is because the name
`contains` breaks the web since it conflicts with existing `contains`
implementations in major libraries.

[1]: https://github.com/mathiasbynens/String.prototype.includes
[2]: https://github.com/tc39/test262/pull/119

Reviewed by Geoffrey Garen.

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncIncludes):
(JSC::stringProtoFuncContains): Deleted.

LayoutTests:

Reviewed by Geoffrey Garen.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/string-includes.js: Renamed from LayoutTests/js/script-tests/string-contains.js.
(stringToSearchIn.toString):
(startOffset.valueOf):
(matchString.toString):
(endOffset.valueOf):
* js/string-includes-expected.txt: Renamed from LayoutTests/js/string-contains-expected.txt.
* js/string-includes.html: Renamed from LayoutTests/js/string-contains.html.

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

6 years agoAdd a way to mute an AudioContext.
adachan@apple.com [Thu, 20 Nov 2014 18:50:12 +0000 (18:50 +0000)]
Add a way to mute an AudioContext.
https://bugs.webkit.org/show_bug.cgi?id=138104

Reviewed by Eric Carlson.

Keep a muted state in AudioDestinationNode. If m_muted is true,
zero out the audio buffers.

No new tests, since it's difficult to test whether the audio is indeed muted.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly.
(WebCore::AudioContext::pageMutedStateDidChange):
Set the destination audio node's muted state to match the page's muted state.

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_muted.
(WebCore::AudioDestinationNode::render):
If m_muted is true, call AudioBus::zero() to zero out the buffers.
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::setMuted):
Set m_muted.

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

6 years agoCrash when destroying a Document that has a throttled timer still running
cdumez@apple.com [Thu, 20 Nov 2014 18:44:12 +0000 (18:44 +0000)]
Crash when destroying a Document that has a throttled timer still running
https://bugs.webkit.org/show_bug.cgi?id=138914

Reviewed by Benjamin Poulain.

Source/WebCore:

Upon destruction, a throttled DOMTimer whose interval depends on
viewport changes will try to unregister itself from the view. It gets
the view pointer from its Document. However, scriptExecutionContext()
can return null if the Document is being destroyed (i.e. ~DOMTimer()
is called from ~ScriptExecutionContext(), as the ScriptExecutionContext
owns the DOMTimer).

This patch adds a null check for scriptExecutionContext() in the
DOMTimer destructor to avoid this issue.

Test: fast/dom/throttled-timer-running-on-document-destruction.html

* page/DOMTimer.cpp:
(WebCore::DOMTimer::~DOMTimer):

(WebCore::DOMTimer::unregisterForViewportChanges):
Add assertion to make sure scriptExecutionContext() does not return
null.

(WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted.
Killed this function as this was dead code.

LayoutTests:

Add a layout test to test the case where a Document gets destroyed while
throttled timer is still running.

* fast/dom/resources/frame-with-throttled-timer.html: Added.
* fast/dom/throttled-timer-running-on-document-destruction-expected.txt: Added.
* fast/dom/throttled-timer-running-on-document-destruction.html: Added.

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

6 years agoSimple line layout: Introduce text fragment continuation.
zalan@apple.com [Thu, 20 Nov 2014 18:11:07 +0000 (18:11 +0000)]
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274

Source/WebCore:

This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.

FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)

Reviewed by Antti Koivisto.

Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync rendering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

LayoutTests:

Rebaseline for simple line layout's multiple rendere support.

Reviewed by Antti Koivisto.

* fast/text/simple-lines-multiple-renderers-expected.html: Added.
* fast/text/simple-lines-multiple-renderers.html: Added.
* fast/tokenizer/script_extra_close-expected.txt: Multiple tab characters should collapse into a single whitespace. This
needs fixing in complex line layout.
* tables/mozilla/bugs/bug157890-expected.txt: no-op endofline run is added by complex inline layout
when multiple text content is injected through JS into a <pre>. This requires fixing complex line layout.

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

6 years agoRemove alignment code from cache coders
antti@apple.com [Thu, 20 Nov 2014 17:43:40 +0000 (17:43 +0000)]
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927

Failed to land this file.

* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCacheCoder<CString>::encode):
(WebKit::NetworkCacheCoder<CString>::decode):
(WebKit::NetworkCacheCoder<String>::encode):
(WebKit::decodeStringText):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::encode):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::decode):
* NetworkProcess/cache/NetworkCacheCoders.h:

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

6 years agoWTFCrashWithSecurityImplication under SpeculativeJIT::compile() when loading a page...
mark.lam@apple.com [Thu, 20 Nov 2014 17:42:58 +0000 (17:42 +0000)]
WTFCrashWithSecurityImplication under SpeculativeJIT::compile() when loading a page from theblaze.com.
<https://webkit.org/b/137642>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In the DFG, we have a ConstantFolding phase that occurs after all LocalCSE
phases have already transpired.  Hence, Identity nodes introduced in the
ConstantFolding phase will be left in the node graph.  Subsequently, the
DFG code generator asserts that CSE phases have consumed all Identity nodes.
This turns out to not be true.  Hence, the crash.  We fix this by teaching
the DFG code generator to emit code for Identity nodes.

Unlike the DFG, the FTL does not have this issue.  That is because the FTL
plan has GlobalCSE phases that come after ConstantFolding and any other
phases that can generate Identity nodes.  Hence, for the FTL, it is true that
CSE will consume all Identity nodes, and the code generator should not see any
Identity nodes.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

* js/dfg-inline-identity-expected.txt: Added.
* js/dfg-inline-identity.html: Added.
* js/script-tests/dfg-inline-identity.js: Added.
(o.toKey):
(foo):
(test):

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

6 years agoRemove alignment code from cache coders
antti@apple.com [Thu, 20 Nov 2014 17:32:04 +0000 (17:32 +0000)]
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927

Reviewed by Anders Carlsson.

Alignment code doesn't do anything useful, wastes space and produces wrong results
if the encoder and decoder buffers don't have the same 8-byte alignment.

* NetworkProcess/cache/NetworkCacheDecoder.cpp:
(WebKit::NetworkCacheDecoder::NetworkCacheDecoder):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
(WebKit::NetworkCacheDecoder::decodeFixedLengthData):
(WebKit::NetworkCacheDecoder::decodeNumber):
(WebKit::roundUpToAlignment): Deleted.
(WebKit::alignedBufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCacheDecoder::alignBufferPosition): Deleted.
* NetworkProcess/cache/NetworkCacheDecoder.h:
(WebKit::NetworkCacheDecoder::currentOffset):
(WebKit::NetworkCacheDecoder::isInvalid):
(WebKit::NetworkCacheDecoder::markInvalid):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
* NetworkProcess/cache/NetworkCacheEncoder.cpp:
(WebKit::NetworkCacheEncoder::grow):
(WebKit::NetworkCacheEncoder::encodeFixedLengthData):
(WebKit::NetworkCacheEncoder::encodeNumber):
(WebKit::roundUpToAlignment): Deleted.
* NetworkProcess/cache/NetworkCacheEncoder.h:

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

6 years agoUnreviewed, rolling out r176396.
commit-queue@webkit.org [Thu, 20 Nov 2014 16:33:41 +0000 (16:33 +0000)]
Unreviewed, rolling out r176396.
https://bugs.webkit.org/show_bug.cgi?id=138926

revealed some WebCore::BidiResolver issue. rollout this for
now. (Requested by zalan on #webkit).

Reverted changeset:

"Simple line layout: Introduce text fragment continuation."
https://bugs.webkit.org/show_bug.cgi?id=138274
http://trac.webkit.org/changeset/176396

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

6 years agoSimple line layout: Introduce text fragment continuation.
zalan@apple.com [Thu, 20 Nov 2014 15:22:02 +0000 (15:22 +0000)]
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274

Source/WebCore:

This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.

FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)

Reviewed by Antti Koivisto.

Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync renderering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

LayoutTests:

Rebaseline for simple line layout's multiple rendere support.

Reviewed by Antti Koivisto.

* fast/text/simple-lines-multiple-renderers-expected.html: Added.
* fast/text/simple-lines-multiple-renderers.html: Added.
* fast/tokenizer/script_extra_close-expected.txt: Multiple tab characters should collapse into a single whitespace. This
needs fixing in complex line layout.
* tables/mozilla/bugs/bug157890-expected.txt: no-op endofline run is added by complex inline layout
when multiple text content is injected through JS into a <pre>. This requires fixing complex line layout.

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

6 years ago[WinCairo] Compile error when GStreamer is enabled.
commit-queue@webkit.org [Thu, 20 Nov 2014 15:20:37 +0000 (15:20 +0000)]
[WinCairo] Compile error when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=138925

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-20
Reviewed by Philippe Normand.

A guard is missing for an overridden method.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

6 years ago[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
commit-queue@webkit.org [Thu, 20 Nov 2014 12:46:15 +0000 (12:46 +0000)]
[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
https://bugs.webkit.org/show_bug.cgi?id=138871

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-11-20
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Adds a convenience function in the WebKitGTK+ DOM bindings to post
messages to user message handlers in a way convenient way more
convenient than using the autogenerated bindings.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_webkit_message_handlers_post_message):
Added new convenience API function to post messages to user message
handlers.
* bindings/gobject/WebKitDOMCustom.h: Ditto.
* bindings/gobject/WebKitDOMCustom.symbols: Ditto.

Tools:

Add a test case for the convenience API for posting user messages
added to the DOM bindings.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
(testUserContentManagerMessageFromConvenienceDOMBindings):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback):

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

6 years ago[CSS Grid Layout] Replace the usage of size_t by unsigned
svillar@igalia.com [Thu, 20 Nov 2014 09:49:17 +0000 (09:49 +0000)]
[CSS Grid Layout] Replace the usage of size_t by unsigned
https://bugs.webkit.org/show_bug.cgi?id=136218

Reviewed by Benjamin Poulain.

In general, size_t should be used for sizes of objects in
memory. We're using it to represent indexes and spans in the
grid. Now that the maximum number of tracks is 1 million, it
should be safe to replace them by unsigned integers.

No new tests as there is no change in functionality.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction):
* css/StyleResolver.cpp:
(WebCore::createImplicitNamedGridLinesFromGridArea):
(WebCore::createGridTrackList):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::ensureGridSize):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::populateGridPositions):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount):
(WebCore::GridResolvedPosition::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
(WebCore::GridResolvedPosition::adjustGridPositionForSide):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::toInt):
* rendering/style/StyleGridData.h:

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

6 years agoRemove "document has no sibling rules" optimization.
akling@apple.com [Thu, 20 Nov 2014 08:43:25 +0000 (08:43 +0000)]
Remove "document has no sibling rules" optimization.
<https://webkit.org/b/138902>

Reviewed by Antti Koivisto.

We were keeping a document-level flag to track whether there are any
sibling rules in any active style sheets.

This information was used to do.. nothing.

* css/StyleResolver.h:
(WebCore::StyleResolver::usesSiblingRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto): Deleted.
* mathml/MathMLMathElement.h:

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

6 years agoCaret renderer is always a RenderBlock.
akling@apple.com [Thu, 20 Nov 2014 08:36:11 +0000 (08:36 +0000)]
Caret renderer is always a RenderBlock.
<https://webkit.org/b/138912>

Reviewed by Chris Dumez.

Tighten typing in the code that finds and deals with the renderer
used to paint the caret (it's always a RenderBlock.)

* editing/FrameSelection.cpp:
(WebCore::CaretBase::updateCaretRect):
(WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
(WebCore::DragCaretController::caretRenderer):
(WebCore::repaintCaretForLocalRect):
(WebCore::CaretBase::paintCaret):
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* editing/htmlediting.cpp:
(WebCore::rendererForCaretPainting):
(WebCore::localCaretRectInRendererForCaretPainting):
(WebCore::absoluteBoundsForLocalCaretRect):
* editing/htmlediting.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

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

6 years ago[GTK] URTBF after r176363.
ossy@webkit.org [Thu, 20 Nov 2014 08:29:51 +0000 (08:29 +0000)]
[GTK] URTBF after r176363.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setTextIndicator):
* UIProcess/API/gtk/PageClientImpl.h:

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

6 years agoREGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animat...
antti@apple.com [Thu, 20 Nov 2014 08:23:19 +0000 (08:23 +0000)]
REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
https://bugs.webkit.org/show_bug.cgi?id=138807
<rdar://problem/18829540>

Reviewed by Simon Fraser.

Animation gets paused because WebKit thinks the GIF is outside of the view.

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

We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
This matters with some WK1 API clients.

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

6 years agoMove 'clip' CSS property to the new StyleBuilder
cdumez@apple.com [Thu, 20 Nov 2014 07:42:19 +0000 (07:42 +0000)]
Move 'clip' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138909

Reviewed by Andreas Kling.

Move 'clip' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClip::convertToLength): Deleted.
(WebCore::ApplyPropertyClip::applyInheritValue): Deleted.
(WebCore::ApplyPropertyClip::applyInitialValue): Deleted.
(WebCore::ApplyPropertyClip::applyValue): Deleted.
(WebCore::ApplyPropertyClip::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInitialClip):
(WebCore::StyleBuilderFunctions::applyInheritClip):
(WebCore::StyleBuilderFunctions::applyValueClip):

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

6 years agoDon't track sub-resources that are started after main frame progress has completed.
commit-queue@webkit.org [Thu, 20 Nov 2014 05:45:52 +0000 (05:45 +0000)]
Don't track sub-resources that are started after main frame progress has completed.
https://bugs.webkit.org/show_bug.cgi?id=138582

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-11-19
Reviewed by Sam Weinig.

After main frame progress has finished, starting loading a sub-resource shouldn't affect
UI process's view of page loading status (i.e., the page has already completed loading
and the progress shouldn't change). To achive that, don't track the subresources that
are started after the main frame has finished, except for those triggered by user interaction.

* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:  Notify WebPage that the main frame progress
    has started or finished.
(WebKit::WebProgressTrackerClient::progressStarted):
(WebKit::WebProgressTrackerClient::progressFinished):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
    the main frame is loaded and it is not triggered by user interaction.
(WebKit::WebPage::removeResourceRequest):
* WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
(WebKit::WebPage::setMainFrameProgressCompleted):

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

6 years agoRemove dead code from TiledBackingStore
ryuan.choi@navercorp.com [Thu, 20 Nov 2014 05:35:49 +0000 (05:35 +0000)]
Remove dead code from TiledBackingStore
https://bugs.webkit.org/show_bug.cgi?id=138864

Reviewed by Andreas Kling.

Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used.

No new tests, no behavior change.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::setTileSize):
(WebCore::TiledBackingStore::invalidate):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::paint): Deleted.
(WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted.
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted.
(WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted.
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted.
* platform/graphics/TiledBackingStore.h:
(WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted.

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

6 years agoFix typos in r176203.
rniwa@webkit.org [Thu, 20 Nov 2014 04:28:37 +0000 (04:28 +0000)]
Fix typos in r176203.

* public/v2/app.js:
(App.ChartsController.actions.addPaneByMetricAndPlatform):
(App.AnalysisTaskRoute):

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

6 years agoWeb Inspector: LayoutTests/inspector should not have localStorage side effects
commit-queue@webkit.org [Thu, 20 Nov 2014 02:19:12 +0000 (02:19 +0000)]
Web Inspector: LayoutTests/inspector should not have localStorage side effects
https://bugs.webkit.org/show_bug.cgi?id=138895

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Brian Burg.

When running inspector tests, do not restore/save WebInspector.Settings
to localStorage, as that will cause side effects. Instead each Setting
will be initialized with its default value and can be modified during
the run of the test.

* UserInterface/Base/Test.js:
(WebInspector.loaded):
Name the setting to match the normal setting name now that persistence
is not an issue.

* UserInterface/Models/Setting.js:
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
Do not restore/save when in tests.

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

6 years ago[EFL] Fix build failure since r176363.
gyuyoung.kim@samsung.com [Thu, 20 Nov 2014 02:03:47 +0000 (02:03 +0000)]
[EFL] Fix build failure since r176363.
https://bugs.webkit.org/show_bug.cgi?id=138903

Patch by Sun-woo Nam <sunny.nam@samsung.com> on 2014-11-19
Reviewed by Gyuyoung Kim.

The parameter for animation on setTextIndicator() was removed on 'PageClient' class.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setTextIndicator):
* UIProcess/CoordinatedGraphics/WebView.h:

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

6 years agoTry to fix the iOS build
timothy_horton@apple.com [Thu, 20 Nov 2014 01:55:54 +0000 (01:55 +0000)]
Try to fix the iOS build

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):

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

6 years agoRemove "document has no ::before and/or ::after rules" optimization.
akling@apple.com [Thu, 20 Nov 2014 01:36:27 +0000 (01:36 +0000)]
Remove "document has no ::before and/or ::after rules" optimization.
<https://webkit.org/b/138897>

Reviewed by Antti Koivisto.

This optimization has been dead for a long time, since the default UA
style contains both ::before and ::after rules.

* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesBeforeAfterRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted.
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto): Deleted.
* html/HTMLQuoteElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement):

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

6 years ago[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
mmaxfield@apple.com [Thu, 20 Nov 2014 01:35:09 +0000 (01:35 +0000)]
[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
https://bugs.webkit.org/show_bug.cgi?id=138891

Reviewed by Dan Bernstein.

Source/WebCore:

We were assuming that we can use the string index (in UTF-16) as the glyph
index. This falls down when a single codepoint (and glyph) contians
multiple code units.

Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html

* platform/graphics/GlyphPage.h:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):

LayoutTests:

Make sure a single upright vertical multi-code-unit codepoint is rendered the same as
the same codepoint rendered horizontally.

* platform/mac/fast/text/multiple-codeunit-vertical-upright-expected.html: Added.
* platform/mac/fast/text/multiple-codeunit-vertical-upright.html: Added.
* platform/mac/fast/text/resources/multiple-codeunit-vertical-upright.otf: Added.

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

6 years agoAttempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org...
dbates@webkit.org [Thu, 20 Nov 2014 01:23:38 +0000 (01:23 +0000)]
Attempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)

Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without
the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier.

* platform/spi/cf/CFNetworkSPI.h:

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

6 years agoFix the 32-bit build
timothy_horton@apple.com [Thu, 20 Nov 2014 01:16:11 +0000 (01:16 +0000)]
Fix the 32-bit build

* UIProcess/mac/TextIndicatorWindow.mm:
(WebKit::TextIndicatorWindow::setTextIndicator):

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

6 years agoMove the 'quotes' CSS property to the new StyleBuilder
weinig@apple.com [Thu, 20 Nov 2014 01:02:12 +0000 (01:02 +0000)]
Move the 'quotes' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138788

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/css/content/content-quotes-07.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Fix the parser to only accept none as a valid primitive identifier. Tested in
the newly added content-quotes-07.html.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Move "quotes" to the new style builder.

* rendering/style/RenderStyle.h:
Add an initialQuotes() function for use in the auto-generated style builder.

LayoutTests:

Add a test for the behavior of non-valid primitive identifiers being
used with the quotes property.

* fast/css/content/content-quotes-07-expected.txt: Added.
* fast/css/content/content-quotes-07.html: Added.

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

6 years agoHandle unprefixed @keyframes rule
dino@apple.com [Thu, 20 Nov 2014 00:59:09 +0000 (00:59 +0000)]
Handle unprefixed @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=138899
<rdar://problem/18943117>

Reviewed by Simon Fraser.

Source/WebCore:

Support the parsing of unprefixed @keyframes. In
CSSParser, assign the same token identifier to
the prefixed and unprefixed forms. This will
keep compatibility with older content. If a page
has both forms, then whatever comes last will
win (as it does if you had duplicate names of the same
form).

Tests: animations/unprefixed-keyframes-rule.html
       animations/unprefixed-keyframes.html

* css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken): Look for the @keyframes style
strings and assign the new token values.

LayoutTests:

Tests for @keyframes, both the OM side and the parsing.

* animations/unprefixed-keyframes-expected.txt: Added.
* animations/unprefixed-keyframes-rule-expected.txt: Added.
* animations/unprefixed-keyframes-rule.html: Added.
* animations/unprefixed-keyframes.html: Added.

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

6 years agoMove pseudo-style code from RenderObject to RenderElement.
akling@apple.com [Thu, 20 Nov 2014 00:17:41 +0000 (00:17 +0000)]
Move pseudo-style code from RenderObject to RenderElement.
<https://webkit.org/b/138880>

Reviewed by Antti Koivisto.

Migrate get*PseudoStyle() to RenderElement, and the selection color
functions along with them. This gets rid of a DOM ancestor walk in
pseudo style lookup.

Narrow down some argument types to keep things building.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getCachedPseudoStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::selectionColor):
(WebCore::RenderElement::selectionPseudoStyle):
(WebCore::RenderElement::selectionForegroundColor):
(WebCore::RenderElement::selectionEmphasisMarkColor):
(WebCore::RenderElement::selectionBackgroundColor):
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor): Deleted.
(WebCore::RenderObject::selectionColor): Deleted.
(WebCore::RenderObject::selectionPseudoStyle): Deleted.
(WebCore::RenderObject::selectionForegroundColor): Deleted.
(WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
(WebCore::RenderObject::getCachedPseudoStyle): Deleted.
(WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.h:
(WebCore::RenderText::getCachedPseudoStyle):
(WebCore::RenderText::selectionBackgroundColor):
(WebCore::RenderText::selectionForegroundColor):
(WebCore::RenderText::selectionEmphasisMarkColor):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):

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

6 years agoAdd an optional entry transition (from selection highlight) to TextIndicator
timothy_horton@apple.com [Thu, 20 Nov 2014 00:10:57 +0000 (00:10 +0000)]
Add an optional entry transition (from selection highlight) to TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=138856
<rdar://problem/18840128>

Reviewed by Anders Carlsson.

* Shared/TextIndicator.cpp:
(WebKit::outsetIndicatorRectIncludingShadow):
(WebKit::TextIndicator::createWithRange):
(WebKit::snapshotSelectionWithHighlight):
(WebKit::TextIndicator::createWithSelectionInFrame):
(WebKit::TextIndicator::frameRect):
(WebKit::TextIndicator::Data::encode):
(WebKit::TextIndicator::Data::decode):
Remove TextIndicator::draw and related functions; drawing is handled entirely
by the TextIndicatorWindow now, and TextIndicator just stores the required data.

Unify outsetIndicatorRectIncludingShadow.

Add an argument to createWithRange/createWithSelectionInFrame to indicate
if the TextIndicator should transition from the selection highlight to
the yellow bubble.

If we're doing the transition, paint the selection into a second bitmap,
without forcing the text to black and without hiding the blue highlight.

Encode/decode the second bitmap.

* Shared/TextIndicator.h:
* UIProcess/mac/TextIndicatorWindow.h:
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:transitionFromSelectionColor:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(-[WKTextIndicatorView hideWithCompletionHandler:]):
(-[WKTextIndicatorView isFlipped]):
(WebKit::TextIndicatorWindow::TextIndicatorWindow):
(WebKit::TextIndicatorWindow::setTextIndicator):
(WebKit::TextIndicatorWindow::closeWindow):
(WebKit::TextIndicatorWindow::startFadeOutTimerFired):
Re-implement the bounce animation using CoreAnimation instead of
the WKSI-based WKWindowBounceAnimation*.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::performActionMenuHitTestAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
Use the aforementioned transition animation for performDictionaryLookupOfCurrentSelection,
the context menu lookup item, and for Data Detectors.

* WebCore.exp.in:
Add an export.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

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

6 years agoAdd a version of API::Data::createWithoutCopying that takes an NSData
andersca@apple.com [Thu, 20 Nov 2014 00:02:22 +0000 (00:02 +0000)]
Add a version of API::Data::createWithoutCopying that takes an NSData
https://bugs.webkit.org/show_bug.cgi?id=138893

Reviewed by Dan Bernstein.

* Shared/APIData.h:
* Shared/Cocoa/APIDataCocoa.mm: Added.
(API::Data::createWithoutCopying):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
(releaseNSData): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):

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

6 years agoWork around the fact that different masters may have different names for their codebases.
dburkart@apple.com [Wed, 19 Nov 2014 23:58:03 +0000 (23:58 +0000)]
Work around the fact that different masters may have different names for their codebases.
https://bugs.webkit.org/show_bug.cgi?id=138878

Reviewed by Mark Rowe.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(parseRevisionProperty): Changed.
Take a "fallback key" in addition to the primary key, so we can deal with inconsistencies in
opensource / internal codebase naming convention.

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

6 years agoMove 'outline-style' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 19 Nov 2014 23:53:11 +0000 (23:53 +0000)]
Move 'outline-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138882

Reviewed by Sam Weinig.

Move 'outline-style' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDefault::setValue): Deleted.
(WebCore::ApplyPropertyDefault::applyValue): Deleted.
(WebCore::ApplyPropertyDefault::createHandler): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritOutlineStyle):
(WebCore::StyleBuilderFunctions::applyInitialOutlineStyle):
(WebCore::StyleBuilderFunctions::applyValueOutlineStyle):

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

6 years agoWeb Inspector: JSContext inspection Resource search does not work
joepeck@webkit.org [Wed, 19 Nov 2014 23:49:40 +0000 (23:49 +0000)]
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::searchInContent):
* inspector/protocol/Debugger.json:
Do some cleanup of the description and implementation of content searching.

Source/WebCore:

Test: inspector/debugger/search-scripts.html

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
A little cleanup.

Source/WebInspectorUI:

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
Cleanup by reordering things a bit.

(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.ResourceSidebarPanel.prototype.performSearch):
Search non-resource scripts individually.

(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForScript):
Lazily create a ScriptTreeElement for the search tree outline as needed.

(WebInspector.ResourceSidebarPanel.prototype._scriptsToSearch):
When searching scripts, just perform a shallow walk of the tree outline to find
Script resources that are not also Resources. Scripts are always guarenteed to
be in a folder when inspecting a web resource. For JSContext inspection, scripts
are promoted to the top level.

* UserInterface/Main.html:
* UserInterface/Models/SourceCodeSearchMatchObject.js: Renamed from Source/WebInspectorUI/UserInterface/Models/ResourceSearchMatchObject.js.
(WebInspector.SourceCodeSearchMatchObject):
* UserInterface/Views/SearchIcons.css:
(.source-code-match-icon .icon):
(.resource-match-icon .icon): Deleted.
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement):
Rename ResourceSearchMatchObject to SourceCodeSearchMatchObject.

LayoutTests:

* inspector/debugger/search-scripts-expected.txt: Added.
* inspector/debugger/search-scripts.html: Added.
Tests for Debugger.searchInContent.

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

6 years agoWeb Inspector: Provide $exception in the console for the thrown exception value
joepeck@webkit.org [Wed, 19 Nov 2014 23:49:36 +0000 (23:49 +0000)]
Web Inspector: Provide $exception in the console for the thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=138726

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::caughtValue):
* debugger/DebuggerScope.h:
Access the caught value if this scope is a catch scope.

* runtime/JSNameScope.h:
(JSC::JSNameScope::isFunctionNameScope):
(JSC::JSNameScope::isCatchScope):
(JSC::JSNameScope::value):
Provide an accessor for the single value in the JSNameScope (with / catch block).

* inspector/InjectedScriptSource.js:
Save the exception value and expose it via $exception. Since the command line api
is recreated on each evaluation, $exception is essentially readonly.

* inspector/ScriptDebugServer.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchDidPause):
(Inspector::ScriptDebugServer::exceptionOrCaughtValue):
When pausing, get the exception or caught value. The exception will be provided
if we are breaking on an explicit exception. When inside of a catch block, we
can get the caught value by walking up the scope chain.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::resume):
(Inspector::InspectorDebuggerAgent::stepOver):
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::stepOut):
Clearing state can be done in didContinue.

(Inspector::InspectorDebuggerAgent::didPause):
Set the exception value explicitly in the injected script when we have it.

(Inspector::InspectorDebuggerAgent::didContinue):
Clear state saved when we had paused, including clearly an exception value if needed.

(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
(Inspector::InspectorDebuggerAgent::clearExceptionValue):
Call into the injected script only when needed.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::setExceptionValue):
(Inspector::InjectedScript::clearExceptionValue):
* inspector/InjectedScript.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::clearExceptionValue):
* inspector/InjectedScriptManager.h:
Clear on all injected scripts.

Source/WebCore:

Tests: inspector/debugger/command-line-api-exception-nested-catch.html
       inspector/debugger/command-line-api-exception.html

* inspector/CommandLineAPIModuleSource.js:
Expose $exception in the more complete command line API.

Source/WebInspectorUI:

* UserInterface/Base/Test.js:
(WebInspector.loaded):
In order to use RuntimeManager to execute in the global context or on the
active debugger call frame, we need to expose the quickConsole controller.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
Expose $exception to completion when we paused because of an exception.

LayoutTests:

Provide some tests to ensure $exception is the value we expect at different times,
such as on the exception line, when there is no exception, or when stepping through
catch blocks (it should always be the most recent caught exception).

* inspector/debugger/command-line-api-exception-expected.txt: Added.
* inspector/debugger/command-line-api-exception-nested-catch-expected.txt: Added.
* inspector/debugger/command-line-api-exception-nested-catch.html: Added.
* inspector/debugger/command-line-api-exception.html: Added.
* inspector/debugger/resources/exceptions.js: Added.
(triggerUncaughtTypeException):
(triggerUncaughtReferenceException):
(triggerUncaughtSyntaxException):
(triggerUncaughtDOMException):
(throwString):
(throwNumber):
(throwNull):
(throwObject):
(throwNode):
(catcher):
(nestedCatchBlocks):

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

6 years agoInvoking an action menu on a selection should result in the text menu
bdakin@apple.com [Wed, 19 Nov 2014 23:48:53 +0000 (23:48 +0000)]
Invoking an action menu on a selection should result in the text menu
https://bugs.webkit.org/show_bug.cgi?id=138892
-and corresponding-
rdar://problem/18996776

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItems]):

Source/WebKit2:

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

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

6 years agoFix iOS build.
andersca@apple.com [Wed, 19 Nov 2014 23:43:09 +0000 (23:43 +0000)]
Fix iOS build.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

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

6 years agoImages/replaced elements that are as tall as a page should be on their own page
hyatt@apple.com [Wed, 19 Nov 2014 23:40:23 +0000 (23:40 +0000)]
Images/replaced elements that are as tall as a page should be on their own page
https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/tall-image-behavior.html (and RL/LR variants)

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
* rendering/InlineFlowBox.h:
Add a new method that computes the line top and line bottom ignoring all margins,
overflow and line-height. This allows us to see if a line that is taller than a page
can be made to fit if we ignored margins and unused descent.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
to a new page if we see that we can fit on a page by ourselves without blank space
included.

LayoutTests:

* fast/multicol/tall-image-behavior-lr.html: Added.
* fast/multicol/tall-image-behavior-rl.html: Added.
* fast/multicol/tall-image-behavior.html: Added.
* platform/mac/fast/multicol/tall-image-behavior-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-expected.txt: Added.
* platform/mac/fast/multicol/tall-image-behavior-lr-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt: Added.
* platform/mac/fast/multicol/tall-image-behavior-rl-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt: Added.

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

6 years agoRename two Cocoa-only .cpp files to .mm.
andersca@apple.com [Wed, 19 Nov 2014 23:03:03 +0000 (23:03 +0000)]
Rename two Cocoa-only .cpp files to .mm.

Rubber-stamped by Sam Weinig.

* Shared/APIWebArchive.mm: Renamed from Source/WebKit2/Shared/APIWebArchive.cpp.
* Shared/APIWebArchiveResource.mm: Renamed from Source/WebKit2/Shared/APIWebArchiveResource.cpp.
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoData detected results with no menu items should not fall through to regular text
bdakin@apple.com [Wed, 19 Nov 2014 23:00:48 +0000 (23:00 +0000)]
Data detected results with no menu items should not fall through to regular text
action menus
https://bugs.webkit.org/show_bug.cgi?id=138887
-and corresponding-
rdar://problem/18971616

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItems]):

Source/WebKit2:

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

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

6 years agoTake Web Audio into account for the Page::isPlayingAudio() API.
adachan@apple.com [Wed, 19 Nov 2014 22:58:43 +0000 (22:58 +0000)]
Take Web Audio into account for the Page::isPlayingAudio() API.
https://bugs.webkit.org/show_bug.cgi?id=137464

Reviewed by Jer Noble.

Source/WebCore:

Make AudioContext a subclass of AudioProducer. It figures out whether there's
audio playing by checking whether its AudioDestinationNode is playing (and not
silent). It calls Document::updateIsPlayingAudio() whenever its audio playing
state has changed.

Test: webaudio/web-audio-is-playing.html

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::lazyInitialize):
Add itself to the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::uninitialize):
Remove itself from the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::stop):
Tell the document to update its audio playing state.
(WebCore::AudioContext::isPlayingAudio):
Return true if the audio context hasn't been stopped and its destination node is
playing audio.
(WebCore::AudioContext::pageMutedStateDidChange):
Add a FIXME for now.
(WebCore::AudioContext::isPlayingAudioDidChange):
Call Document::updateIsPlayingAudio().
* Modules/webaudio/AudioContext.h:

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_isSilent and m_isEffectivelyPlayingAudio.
(WebCore::AudioDestinationNode::render):
Call setIsSilent() with the appropriate value after rendering.
(WebCore::AudioDestinationNode::isPlayingDidChange):
Call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::setIsSilent):
If m_isSilent has changed, call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange().
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::isPlaying):
(WebCore::AudioDestinationNode::isPlayingAudio):

* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::isPlaying):
Return whether the AudioDestination is playing.
* Modules/webaudio/DefaultAudioDestinationNode.h:

* platform/audio/AudioIOCallback.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationIOS::stop):
Ditto.
(WebCore::AudioDestinationIOS::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/ios/AudioDestinationIOS.h:

* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationMac::stop):
Ditto.
(WebCore::AudioDestinationMac::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/mac/AudioDestinationMac.h:

* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.isPagePlayingAudio() for testing.

LayoutTests:

This test checks that Page::isPlayingAudio() returns false before an audio context is created
and before the oscillator node makes a sound. It then starts the oscillator node and checks
that Page::isPlayingAudio() later returns true.

* webaudio/web-audio-is-playing-expected.txt: Added.
* webaudio/web-audio-is-playing.html: Added.

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

6 years agoAttempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit...
dbates@webkit.org [Wed, 19 Nov 2014 22:51:40 +0000 (22:51 +0000)]
Attempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)

Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite.

* platform/spi/cf/CFNetworkSPI.h:

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

6 years agoFix TilesAdded bitmask
antti@apple.com [Wed, 19 Nov 2014 22:40:00 +0000 (22:40 +0000)]
Fix TilesAdded bitmask
https://bugs.webkit.org/show_bug.cgi?id=138883

Reviewed by Simon Fraser.

Simon spotted this.

* platform/graphics/ca/GraphicsLayerCA.h:

    Use 1LLU << 29 instead of 1LLU < 29
    This worked before by pure luck as bit 0 is unused.

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

6 years ago[iOS] Make WebKit build with public iOS SDK
dbates@webkit.org [Wed, 19 Nov 2014 22:32:04 +0000 (22:32 +0000)]
[iOS] Make WebKit build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136863

Reviewed by David Kilzer.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and
NS{CalendarDate, String, URLDownload}SPI.h.
* loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of
CFNetwork data types and functions from here to file CFNetworkSPI.h and
include header CFNetworkSPI.h.
* platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for
CFURLRequestSPI.h as the content of the latter was incorporated into the former.
* platform/spi/cf/CFNetworkSPI.h: Added.
* platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality
into CFNetworkSPI.h
* platform/spi/cocoa/NSCalendarDateSPI.h: Added.
* platform/spi/cocoa/NSStringSPI.h: Added.
* platform/spi/cocoa/NSURLDownloadSPI.h: Added.

Source/WebKit/ios:

* Misc/WebGeolocationCoreLocationProvider.mm:  Remove unnecessary include of header <CoreLocation/CoreLocationPriv.h>.
* Misc/WebNSStringExtrasIOS.m: Substitute header <WebCore/NSStringSPI.h> for <Foundation/NSString_NSURLExtras.h>.
* Misc/WebUIKitSupport.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.

Source/WebKit/mac:

* History/WebHistory.mm: Include header NSCalendarDateSPI.h.
* History/WebHistoryItemPrivate.h: Remove include of private header Foundation/NSCalendarDate.h.
* Misc/WebDownload.h: Forward declare NSURLDownload when building without header Foundation/NSURLDownload.h.
We use __has_include() instead of WTF_USE_APPLE_INTERNAL_SDK since this header
may be used by Apple internal clients that do not include wtf/Platform.h.
* Misc/WebDownload.mm: Include header NSURLDownloadSPI.h instead of including
private Foundation headers directly.
* Misc/WebNSURLExtras.mm: Remove unnecessary include of private Foundation header.
* WebCoreSupport/WebFrameNetworkingContext.mm: Include header CFNetworkSPI.h
instead of including private CFNetwork headers directly. Also fixed up style and
ordering of header include directives.
* WebView/WebView.mm: Include header CFNetworkSPI.h instead of including private
CFNetwork headers directly. Also sort the #import directives.
* WebView/WebViewPrivate.h: Define ENABLE_TOUCH_EVENTS if not otherwise defined
and added ENABLE_TOUCH_EVENTS-guard around -_touchEventRegions.

Source/WebKit2:

* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Moved CFNetwork forward declarations
from this file to file CFNetworkSPI.h and included header CFNetworkSPI.h.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Ditto.
* UIProcess/API/Cocoa/WKProcessPool.mm: Ditto.
* UIProcess/mac/WebContextMac.mm: Ditto.
* WebProcess/cocoa/WebProcessCocoa.mm: Ditto.

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

6 years agoAX: Screen braille input doesn't work on forms.
cfleizach@apple.com [Wed, 19 Nov 2014 22:12:19 +0000 (22:12 +0000)]
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804

Unreviewed build fix.

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::setValue):

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

6 years agoAdd APIs for customizing the user agent
andersca@apple.com [Wed, 19 Nov 2014 22:07:22 +0000 (22:07 +0000)]
Add APIs for customizing the user agent
https://bugs.webkit.org/show_bug.cgi?id=138881
rdar://problem/17233981

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView customUserAgent]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::set):
(-[WKWebViewConfiguration copyWithZone:]):
(defaultApplicationNameForUserAgent):
(-[WKWebViewConfiguration applicationNameForUserAgent]):
(-[WKWebViewConfiguration setApplicationNameForUserAgent:]):

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

6 years ago[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which...
simon.fraser@apple.com [Wed, 19 Nov 2014 22:05:03 +0000 (22:05 +0000)]
[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
https://bugs.webkit.org/show_bug.cgi?id=138877

Reviewed by Tim Horton.

These data members are unused on Mac, but still encoded, so initialize them with
reasonable values.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):

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

6 years agoRefactor iOS selection gestures.
enrica@apple.com [Wed, 19 Nov 2014 21:57:10 +0000 (21:57 +0000)]
Refactor iOS selection gestures.
https://bugs.webkit.org/show_bug.cgi?id=138720
rdar://problem/18964359

Reviewed by Benjamin Poulain.

This is a first step towards refactoring the selection gestures code.
It introduces more general selection movement functions that can be used to build
the gestures.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(toWKTextGranularity):
(toWKSelectionDirection):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView beginSelectionInDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::beginSelectionInDirection):
(WebKit::WebPage::updateSelectionWithExtentPoint):

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

6 years agoUnreviewed build fixes after r176329.
joepeck@webkit.org [Wed, 19 Nov 2014 21:39:33 +0000 (21:39 +0000)]
Unreviewed build fixes after r176329.

  - export all of the codegen python files as they are included by the main generator
  - update the imports of the main generator to match __init__.py
  - remove bundling the python scripts as framework resources, just have them PrivateHeaders

* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

6 years ago[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled...
simon.fraser@apple.com [Wed, 19 Nov 2014 21:31:11 +0000 (21:31 +0000)]
[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
https://bugs.webkit.org/show_bug.cgi?id=138876

Reviewed by Beth Dakin.

Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
content offset into account.

On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
Mac does UI-side scrolling.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollPosition):
(WebKit::RemoteLayerTreeTransaction::setScrollPosition):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):

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

6 years agoAdd layout test for throttling of DOM timer changing the style of visible and invisib...
cdumez@apple.com [Wed, 19 Nov 2014 21:15:00 +0000 (21:15 +0000)]
Add layout test for throttling of DOM timer changing the style of visible and invisible elements
https://bugs.webkit.org/show_bug.cgi?id=138875

Reviewed by Simon Fraser.

Add a layout test to test that a repeating DOM timer changing the style
of both visible and invisible elements does not get throttled.

Also rename existing tests to use "display-none" instead of "invisible"
for clarity.

* fast/dom/nested-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling-expected.txt.
* fast/dom/nested-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling-expected.txt.
* fast/dom/repeating-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling-expected.txt: Added.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling.html: Added.

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

6 years agoGet rid of AccessibilityObject::setRoleValue()
benjamin@webkit.org [Wed, 19 Nov 2014 20:50:54 +0000 (20:50 +0000)]
Get rid of AccessibilityObject::setRoleValue()
https://bugs.webkit.org/show_bug.cgi?id=138861

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-19
Reviewed by Chris Fleizach.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setRoleValue): Deleted.

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

6 years agoAdd layout test for DOM timer throttling and element moving into view after layout
cdumez@apple.com [Wed, 19 Nov 2014 20:46:36 +0000 (20:46 +0000)]
Add layout test for DOM timer throttling and element moving into view after layout
https://bugs.webkit.org/show_bug.cgi?id=138874

Reviewed by Simon Fraser.

Add a layout test to make sure we unthrottle a DOM timer changing the
style of an element outside viewport if the element ends up inside
the viewport after layout.

* fast/dom/timer-unthrottle-on-layout-expected.txt: Added.
* fast/dom/timer-unthrottle-on-layout.html: Added.

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

6 years agoWeb Inspector: standardize language-specific protocol generator file, class, and...
burg@cs.washington.edu [Wed, 19 Nov 2014 19:16:23 +0000 (19:16 +0000)]
Web Inspector: standardize language-specific protocol generator file, class, and method prefixes
https://bugs.webkit.org/show_bug.cgi?id=138237

Reviewed by Joseph Pecoraro.

Settle on cpp/objc/js file prefixes and Cpp/ObjC/JS class prefixes for generators.
Move C++-specific static methods into CppGenerator and add cpp_ prefixes where relevant.
Split the templates file into language-specific template files.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/codegen/__init__.py:
* inspector/scripts/codegen/cpp_generator.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator.py.
* inspector/scripts/codegen/cpp_generator_templates.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator_templates.py.
(CppGeneratorTemplates):
* inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_header.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_implementation.py.
* inspector/scripts/codegen/generate_js_backend_commands.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_configuration_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_header.py.
* inspector/scripts/codegen/generate_objc_configuration_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_implementation.py.
* inspector/scripts/codegen/generate_objc_conversion_helpers.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_conversion_helpers.py.
* inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_header.py.
* inspector/scripts/codegen/generate_objc_internal_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_internal_header.py.
* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_types_implementation.py.
* inspector/scripts/codegen/generator.py:
* inspector/scripts/codegen/generator_templates.py:
* inspector/scripts/codegen/objc_generator.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c.py.
* inspector/scripts/codegen/objc_generator_templates.py: Added.
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 19 Nov 2014 18:59:00 +0000 (18:59 +0000)]
Versioning.

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

6 years agoUpdate WebKit to build with LLVM TOT
commit-queue@webkit.org [Wed, 19 Nov 2014 18:46:17 +0000 (18:46 +0000)]
Update WebKit to build with LLVM TOT
https://bugs.webkit.org/show_bug.cgi?id=138519

Patch by Juergen Ributzka <juergen@apple.com> on 2014-11-19
Reviewed by Alexey Proskuryakov.

* Configurations/LLVMForJSC.xcconfig:
* llvm/LLVMAPIFunctions.h:
* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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

6 years agoWeb Inspector: Debugger should not mutate variable when hovering mouse over ++n expre...
commit-queue@webkit.org [Wed, 19 Nov 2014 18:34:19 +0000 (18:34 +0000)]
Web Inspector: Debugger should not mutate variable when hovering mouse over ++n expression
https://bugs.webkit.org/show_bug.cgi?id=138839

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):

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

6 years agoWeb Inspector: Improve basic JavaScript completion in inline <script>s
commit-queue@webkit.org [Wed, 19 Nov 2014 18:32:30 +0000 (18:32 +0000)]
Web Inspector: Improve basic JavaScript completion in inline <script>s
https://bugs.webkit.org/show_bug.cgi?id=138845

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Fix up CodeMirror mode handling for JavaScript completion when inside of mixed mode
input (html). Also add completion for CodeMirror's localVars list.

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

6 years agoAdd layout test for DOM timers throttling and 0 height element with visible overflowi...
cdumez@apple.com [Wed, 19 Nov 2014 18:27:33 +0000 (18:27 +0000)]
Add layout test for DOM timers throttling and 0 height element with visible overflowing content
https://bugs.webkit.org/show_bug.cgi?id=138873

Reviewed by Simon Fraser.

Add a layout test for verify that a DOM timer changing the style of a 0
height element with visible overflowing content does not get throttled.
If the implementation did not properly use the overflow rect to
determine if the element is visible, this test would fail.

This covers the case of the top scrolling banner on huffingtonpost.com.

* fast/dom/repeating-timer-element-overflow-throttling-expected.txt: Added.
* fast/dom/repeating-timer-element-overflow-throttling.html: Added.

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

6 years agoMissing NULL-check in VideoTrack::setLanguage
philn@webkit.org [Wed, 19 Nov 2014 17:52:58 +0000 (17:52 +0000)]
Missing NULL-check in VideoTrack::setLanguage
https://bugs.webkit.org/show_bug.cgi?id=138867

Reviewed by Jer Noble.

* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setLanguage): Prevent change event creation
on an empty video track list.

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

6 years agoAX: Safari fails to load a web page with VoiceOver
cfleizach@apple.com [Wed, 19 Nov 2014 17:36:29 +0000 (17:36 +0000)]
AX: Safari fails to load a web page with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138849

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.

Test: accessibility/inline-block-assertion.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):

LayoutTests:

* accessibility/inline-block-assertion-expected.txt: Added.
* accessibility/inline-block-assertion.html: Added.

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

6 years agoSimple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simpl...
zalan@apple.com [Wed, 19 Nov 2014 17:26:31 +0000 (17:26 +0000)]
Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text.
https://bugs.webkit.org/show_bug.cgi?id=138847

Reviewed by Antti Koivisto.

This is in preparation to support multiple renderers for simple line layout.
Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow.

Not testable.

* rendering/RenderTreeAsText.cpp:
(WebCore::write):

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

6 years ago[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
commit-queue@webkit.org [Wed, 19 Nov 2014 17:23:14 +0000 (17:23 +0000)]
[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=138870

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-19
Reviewed by Alex Christensen.

* css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificityInternal):

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

6 years agoAX: Screen braille input doesn't work on forms.
cfleizach@apple.com [Wed, 19 Nov 2014 15:47:16 +0000 (15:47 +0000)]
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Allow iOS to set values of text fields through the API.

Test: platform/ios-sim/accessibility/set-value.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):

Tools:

Add a method to setValue through the AX API in DRT.

* DumpRenderTree/AccessibilityUIElement.cpp:
(setValueCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setValue):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setValue):

LayoutTests:

* platform/ios-sim: Copied from LayoutTests/platform/ios-sim.
* platform/ios-sim/accessibility/set-value-expected.txt: Added.
* platform/ios-sim/accessibility/set-value.html: Added.

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

6 years agoSimple line layout: Add renderer based rect collecting to RunResolver.
zalan@apple.com [Wed, 19 Nov 2014 15:40:35 +0000 (15:40 +0000)]
Simple line layout: Add renderer based rect collecting to RunResolver.
https://bugs.webkit.org/show_bug.cgi?id=138818

Reviewed by Antti Koivisto.

This is in preparation to multiple renderers support.
RunResolver should be able to collect rects for a particular renderer
that might overlap multiple runs. (or might just be a subset of a Run)

Covered by existing tests.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently.
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::baselinePosition):
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::computeRect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:

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

6 years ago[GTK] Error in documentation of webkit_print_operation_get_page_setup()
commit-queue@webkit.org [Wed, 19 Nov 2014 14:24:10 +0000 (14:24 +0000)]
[GTK] Error in documentation of webkit_print_operation_get_page_setup()
https://bugs.webkit.org/show_bug.cgi?id=138868

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-11-19
Reviewed by Carlos Garcia Campos.

Fix copypaste error in documentation of
webkit_print_operation_get_page_setup().

* UIProcess/API/gtk/WebKitPrintOperation.cpp:

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

6 years agoRemove an unused file.
mrowe@apple.com [Wed, 19 Nov 2014 09:55:12 +0000 (09:55 +0000)]
Remove an unused file.

* version.plist: Removed.

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

6 years agoFix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
commit-queue@webkit.org [Wed, 19 Nov 2014 09:06:30 +0000 (09:06 +0000)]
Fix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
https://bugs.webkit.org/show_bug.cgi?id=138840

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-19
Reviewed by Csaba Osztrogon√°c.

* Source/cmake/OptionsCommon.cmake:

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

6 years agoAdd selector checker for :lang pseudo class in Selectors level 4
commit-queue@webkit.org [Wed, 19 Nov 2014 08:57:13 +0000 (08:57 +0000)]
Add selector checker for :lang pseudo class in Selectors level 4
https://bugs.webkit.org/show_bug.cgi?id=138281

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-11-19
Reviewed by Benjamin Poulain.

Source/WebCore:

Add selector checker for :lang pseudo class in Selectors level 4.

The language tags matching is specified in [1,2].

[1] http://www.ietf.org/rfc/rfc4647.txt
[2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo

Tests: fast/selectors/lang-extended-filtering.html
       fast/selectors/lang-multiple.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
(WebCore::matchesLangPseudoClassDeprecated):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

Add layout tests for :lang selector checker with multiple arguments and
related behaviors on extended filtering.

* fast/selectors/lang-extended-filtering-expected.txt: Added.
* fast/selectors/lang-extended-filtering.html: Added.
* fast/selectors/lang-multiple-expected.txt: Added.
* fast/selectors/lang-multiple.html: Added.

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

6 years agoRoll over WebInspectorUI's ChangeLog.
mrowe@apple.com [Wed, 19 Nov 2014 08:53:28 +0000 (08:53 +0000)]
Roll over WebInspectorUI's ChangeLog.

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

6 years agostart/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
philn@webkit.org [Wed, 19 Nov 2014 07:49:29 +0000 (07:49 +0000)]
start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
https://bugs.webkit.org/show_bug.cgi?id=138739

Reviewed by Darin Adler.

Source/WebCore:

The patch is inspired by the following Blink revision by
<rtoy@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=160845>

Test: webaudio/dom-exceptions.html

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::noteGrainOn):
(WebCore::AudioBufferSourceNode::startGrain): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:

LayoutTests:

* webaudio/dom-exceptions-expected.txt: Added.
* webaudio/dom-exceptions.html: Added.

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

6 years agoAad failing test expectations to some tests imported in r176144.
rniwa@webkit.org [Wed, 19 Nov 2014 06:45:29 +0000 (06:45 +0000)]
Aad failing test expectations to some tests imported in r176144.

* platform/win/TestExpectations:

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

6 years agoUse of uninitialized value in string eq in many http tests
ap@apple.com [Wed, 19 Nov 2014 05:41:15 +0000 (05:41 +0000)]
Use of uninitialized value in string eq in many http tests
https://bugs.webkit.org/show_bug.cgi?id=138852

Reviewed by Daniel Bates.

* http/tests/security/xssAuditor/resources/echo-intertag.pl: Don't use it uninitialized.

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

6 years ago[WK2] Remove the minimalUI code from the UIProcess
benjamin@webkit.org [Wed, 19 Nov 2014 05:13:54 +0000 (05:13 +0000)]
[WK2] Remove the minimalUI code from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=138819

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-18
Reviewed by Sam Weinig.

It looks like the only interface we have to keep alive is
[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].

Clean up everything else, it is a pile of useless code.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _setUsesMinimalUI:]): Deleted.
(-[WKWebView _usesMinimalUI]): Deleted.
(activeMinimumLayoutSizeForMinimalUI): Deleted.
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
(WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.

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

6 years agoAdd the initial implementation of dynamic specificity for :matches()
benjamin@webkit.org [Wed, 19 Nov 2014 05:12:53 +0000 (05:12 +0000)]
Add the initial implementation of dynamic specificity for :matches()
https://bugs.webkit.org/show_bug.cgi?id=138822

Reviewed by Andreas Kling.

Source/WebCore:

Previously we completely ignored the selector list of :matches() when computing
the specificity of the selector.

The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
"The specificity of a :matches() pseudo-class, however, is the specificity
 of the most specific complex selector that matched the given element."

This patch does just that.

In the CSS JIT, we only consider specificities that can be computed statically
for now, this should be extended later.
When the specificity is dynamic, we fall back to SelectorChecker. In that case,
we execute every selector of the selector list and we keep the maximum value
as the specificity for the whole :matches().

Tests: fast/css/matches-specificity-1.html
       fast/css/matches-specificity-2.html
       fast/css/matches-specificity-3.html
       fast/css/matches-specificity-4.html
       fast/css/matches-specificity-5.html
       fast/css/matches-specificity-6.html
       fast/css/matches-specificity-7.html
       fast/css/matches-specificity-8.html
       fast/css/matches-specificity-9.html
       fast/css/matches-specificity-10.html

* css/CSSSelector.cpp:
(WebCore::selectorSpecificity):
(WebCore::maxSpecificity):
(WebCore::CSSSelector::specificity):
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::CSSSelector::simpleSelectorSpecificity):
:matches() itself should not have any specificity. The specificity of its components
is computed in SelectorChecker.

Since :matches() is no longer accounted as a class B specificity, I had to finish
the specificity of :not() or some test breaks.

* css/CSSSelector.h:
* css/PageRuleCollector.cpp:
(WebCore::comparePageRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
We can no longer shortcut the execution when context.pseudoElementEffective is false.
There is no guarantee that a following selector wouldn't match with a higher specificity.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

LayoutTests:

* fast/css/matches-specificity-1-expected.html: Added.
* fast/css/matches-specificity-1.html: Added.
* fast/css/matches-specificity-2-expected.html: Added.
* fast/css/matches-specificity-2.html: Added.
* fast/css/matches-specificity-3-expected.html: Added.
* fast/css/matches-specificity-3.html: Added.
* fast/css/matches-specificity-4-expected.html: Added.
* fast/css/matches-specificity-4.html: Added.
* fast/css/matches-specificity-5-expected.html: Added.
* fast/css/matches-specificity-5.html: Added.
* fast/css/matches-specificity-6-expected.html: Added.
* fast/css/matches-specificity-6.html: Added.
* fast/css/matches-specificity-7-expected.html: Added.
* fast/css/matches-specificity-7.html: Added.
* fast/css/matches-specificity-8-expected.html: Added.
* fast/css/matches-specificity-8.html: Added.
* fast/css/matches-specificity-9-expected.html: Added.
* fast/css/matches-specificity-9.html: Added.
* fast/css/matches-specificity-10-expected.html: Added.
* fast/css/matches-specificity-10.html: Added.

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

6 years agoUnreviewed. Revision to the build fix in r176304.
conrad_shultz@apple.com [Wed, 19 Nov 2014 05:08:41 +0000 (05:08 +0000)]
Unreviewed. Revision to the build fix in r176304.

The guarded method should simply be in the !TARGET_OS_IPHONE block.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

6 years agoiOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on...
benjamin@webkit.org [Wed, 19 Nov 2014 05:06:58 +0000 (05:06 +0000)]
iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
https://bugs.webkit.org/show_bug.cgi?id=137069
rdar://problem/18481464

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

On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
run concurrently. This causes a race with an incorrect behavior:
1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
3) When the finger leaves the screen, both gestures end.
-> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
   the _UIWebHighlightLongPressGestureRecognizer.

The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
if the page wants the event.

To solve the order problem, I use the fact that event recognition goes in two phases for
non cancelled events:
1) Update the gesture recognizers.
2) Trigger the actions.

I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
   the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
   about a race here.
2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
   if the page wants the event.
3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
   has already been processed by the page and the flag has been cleared if needed.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView _highlightLongPressRecognized:]):

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

6 years agoiOS build fix after r176299. This method is not defined in WKViewIOS.mm.
rniwa@webkit.org [Wed, 19 Nov 2014 04:31:51 +0000 (04:31 +0000)]
iOS build fix after r176299. This method is not defined in WKViewIOS.mm.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

6 years agoFeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
ddkilzer@apple.com [Wed, 19 Nov 2014 02:42:49 +0000 (02:42 +0000)]
FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
<http://webkit.org/b/138813>

Reviewed by Mark Rowe.

* Configurations/FeatureDefines.xcconfig: Switch to using SDK
selectors.

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

6 years agoCrash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
cdumez@apple.com [Wed, 19 Nov 2014 02:05:34 +0000 (02:05 +0000)]
Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138783

Reviewed by Andreas Kling.

Source/WebCore:

Update operators converting CSSPrimitiveValue to integer / floating
point types to properly handle calculated values (e.g. 'calc(2 * 3)').
Previously, this was not working in release builds and we would hit an
ASSERT_NOT_REACHED() in debug builds.

Tests: fast/css/flex-shrink-calculated-value.html
       fast/css/z-index-calculated-value.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator unsigned short):
(WebCore::CSSPrimitiveValue::operator int):
(WebCore::CSSPrimitiveValue::operator unsigned):
(WebCore::CSSPrimitiveValue::operator float):

LayoutTests:

Add layout tests to check that settings 'z-index' / 'flex-shrink' CSS
properties to a calculated value does not crash and behaves as
expected.

* fast/css/flex-shrink-calculated-value-expected.txt: Added.
* fast/css/flex-shrink-calculated-value.html: Added.
* fast/css/z-index-calculated-value-expected.txt: Added.
* fast/css/z-index-calculated-value.html: Added.

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

6 years agoGive clients a way to cancel preview popovers
conrad_shultz@apple.com [Wed, 19 Nov 2014 01:43:14 +0000 (01:43 +0000)]
Give clients a way to cancel preview popovers
https://bugs.webkit.org/show_bug.cgi?id=138855

Reviewed by Tim Horton.

Promote -[WKView _dismissActionMenuPopovers] from internal to private.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuPopovers]):
* UIProcess/API/mac/WKViewInternal.h:

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

6 years agoUnreviewed, rolling out r176263 and r176273.
mmaxfield@apple.com [Wed, 19 Nov 2014 01:19:43 +0000 (01:19 +0000)]
Unreviewed, rolling out r176263 and r176273.
https://bugs.webkit.org/show_bug.cgi?id=138854

Underlines are hideous. (Requested by litherum on #webkit).

Reverted changesets:

"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263

"iOS build fix."
http://trac.webkit.org/changeset/176273

Patch by Commit Queue <commit-queue@webkit.org> on 2014-11-18# Please enter the commit message for your changes. Lines starting

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