Update CSS shapes suite import
https://bugs.webkit.org/show_bug.cgi?id=138045

This patch is a full re-import of the CSS Shapes test suite from the W3C
test repo and an updated TestExpectations file to match the current
results.

Patch by Rebecca Hauck <rhauck@adobe.com> on 2014-10-28
Reviewed by Benjamin Poulain.

* TestExpectations:
* css3/shapes/shape-outside/shape-box/w3c-import.log:
* css3/shapes/shape-outside/shape-image/gradients/w3c-import.log:
* css3/shapes/shape-outside/shape-image/shape-image-000-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-001-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-002-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-002.html:
* css3/shapes/shape-outside/shape-image/shape-image-003-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-003.html:
* css3/shapes/shape-outside/shape-image/shape-image-004-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-005-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-005.html:
* css3/shapes/shape-outside/shape-image/shape-image-006-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-006.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-007-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-007.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-008-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-008.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-009-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-009.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-010-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-010.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-011-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-011.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-013-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-013.html:
* css3/shapes/shape-outside/shape-image/shape-image-014-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-014.html:
* css3/shapes/shape-outside/shape-image/shape-image-015-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-015.html:
* css3/shapes/shape-outside/shape-image/shape-image-016-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-016.html:
* css3/shapes/shape-outside/shape-image/shape-image-017-expected.html:
* css3/shapes/shape-outside/shape-image/shape-image-017.html:
* css3/shapes/shape-outside/shape-image/shape-image-024-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-024.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-025-expected.html: Added.
* css3/shapes/shape-outside/shape-image/shape-image-025.html: Added.
* css3/shapes/shape-outside/shape-image/support/animated.gif: Added.
* css3/shapes/shape-outside/shape-image/support/left-half-rectangle-20.png:
* css3/shapes/shape-outside/shape-image/support/right-half-rectangle-20.png:
* css3/shapes/shape-outside/shape-image/support/w3c-import.log:
* css3/shapes/shape-outside/shape-image/w3c-import.log:
* css3/shapes/shape-outside/supported-shapes/circle/w3c-import.log:
* css3/shapes/shape-outside/supported-shapes/ellipse/w3c-import.log:
* css3/shapes/shape-outside/supported-shapes/inset/w3c-import.log:
* css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html:
* css3/shapes/shape-outside/supported-shapes/polygon/w3c-import.log:
* css3/shapes/shape-outside/supported-shapes/support/w3c-import.log: Copied from LayoutTests/css3/shapes/shape-outside/values/support/w3c-import.log.
* css3/shapes/shape-outside/values/shape-image-threshold-001.html:
* css3/shapes/shape-outside/values/support/w3c-import.log:
* css3/shapes/shape-outside/values/w3c-import.log:
* css3/shapes/spec-examples/shape-outside-019-expected.html:
* css3/shapes/spec-examples/support/w3c-import.log:
* css3/shapes/spec-examples/w3c-import.log:
* css3/shapes/w3c-import.log:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove an inaccurate comment in WKActionMenuController
https://bugs.webkit.org/show_bug.cgi?id=138135

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
The comment is wrong; the separator is there for spacing, not just as a workaround.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
import-w3c-tests should use re.escape() wherever it's handling file paths
https://bugs.webkit.org/show_bug.cgi?id=137934

This patch adds re.escape() to a few places where we're doing string
conversions. This prevents errors when attribute values coincidentally
have character sequences that can be interpreted as regular expressions.

Patch by Rebecca Hauck <rhauck@adobe.com> on 2014-10-28
Reviewed by Bem Jones-Bey.

* Scripts/webkitpy/w3c/test_converter.py:
(_W3CTestConverter.convert_attributes_if_needed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r175249.
https://bugs.webkit.org/show_bug.cgi?id=138138

Appears to be failing some JS tests (Requested by mlam_ on
#webkit).

Reverted changeset:

"Holes are not copied properly when Arrays change shape to
ArrayStorage type."
https://bugs.webkit.org/show_bug.cgi?id=138118
http://trac.webkit.org/changeset/175249

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speed up line parsing for simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=137275

Reviewed by Antti Koivisto.
Source/WebCore:

This patch speeds up the line parsing for simple line layout by
reducing the number of text measurement calls.
The parsing logic hasn't changed. We simply walk over
the whitespace/non-whitespace fragments and measure them to
figure out whether they fit.
The performance gain mainly comes from the more efficient line wrapping
so that we don't re-measure the fragment when it is pushed to
the next line.

No change in behaviour. (except the empty line-break run removal.)

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::skipWhitespace):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::LineState::LineState):
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it.
(WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text.
(WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
(WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
(WebCore::SimpleLineLayout::initializeLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
(WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
(WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
(WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
(WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
(WebCore::SimpleLineLayout::isWhitespace): Deleted.
(WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
(WebCore::SimpleLineLayout::measureWord): Deleted.
(WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):

LayoutTests:

This patch removes empty line-break runs. Rebaseline.

* platform/mac-mountainlion/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* platform/mac/css1/basic/containment-expected.txt:
* platform/mac/css1/basic/contextual_selectors-expected.txt:
* platform/mac/css1/basic/grouping-expected.txt:
* platform/mac/css1/basic/id_as_selector-expected.txt:
* platform/mac/css1/basic/inheritance-expected.txt:
* platform/mac/css1/box_properties/border-expected.txt:
* platform/mac/css1/box_properties/border_bottom-expected.txt:
* platform/mac/css1/box_properties/border_bottom_inline-expected.txt:
* platform/mac/css1/box_properties/border_bottom_width-expected.txt:
* platform/mac/css1/box_properties/border_bottom_width_inline-expected.txt:
* platform/mac/css1/box_properties/border_color-expected.txt:
* platform/mac/css1/box_properties/border_color_inline-expected.txt:
* platform/mac/css1/box_properties/border_inline-expected.txt:
* platform/mac/css1/box_properties/border_left-expected.txt:
* platform/mac/css1/box_properties/border_left_inline-expected.txt:
* platform/mac/css1/box_properties/border_left_width-expected.txt:
* platform/mac/css1/box_properties/border_left_width_inline-expected.txt:
* platform/mac/css1/box_properties/border_right-expected.txt:
* platform/mac/css1/box_properties/border_right_inline-expected.txt:
* platform/mac/css1/box_properties/border_right_width-expected.txt:
* platform/mac/css1/box_properties/border_right_width_inline-expected.txt:
* platform/mac/css1/box_properties/border_style-expected.txt:
* platform/mac/css1/box_properties/border_style_inline-expected.txt:
* platform/mac/css1/box_properties/border_top-expected.txt:
* platform/mac/css1/box_properties/border_top_inline-expected.txt:
* platform/mac/css1/box_properties/border_top_width-expected.txt:
* platform/mac/css1/box_properties/border_top_width_inline-expected.txt:
* platform/mac/css1/box_properties/border_width-expected.txt:
* platform/mac/css1/box_properties/border_width_inline-expected.txt:
* platform/mac/css1/box_properties/clear-expected.txt:
* platform/mac/css1/box_properties/clear_float-expected.txt:
* platform/mac/css1/box_properties/float-expected.txt:
* platform/mac/css1/box_properties/float_elements_in_series-expected.txt:
* platform/mac/css1/box_properties/float_margin-expected.txt:
* platform/mac/css1/box_properties/height-expected.txt:
* platform/mac/css1/box_properties/margin-expected.txt:
* platform/mac/css1/box_properties/margin_bottom-expected.txt:
* platform/mac/css1/box_properties/margin_bottom_inline-expected.txt:
* platform/mac/css1/box_properties/margin_inline-expected.txt:
* platform/mac/css1/box_properties/margin_left-expected.txt:
* platform/mac/css1/box_properties/margin_left_inline-expected.txt:
* platform/mac/css1/box_properties/margin_right-expected.txt:
* platform/mac/css1/box_properties/margin_right_inline-expected.txt:
* platform/mac/css1/box_properties/margin_top-expected.txt:
* platform/mac/css1/box_properties/margin_top_inline-expected.txt:
* platform/mac/css1/box_properties/padding-expected.txt:
* platform/mac/css1/box_properties/padding_bottom-expected.txt:
* platform/mac/css1/box_properties/padding_bottom_inline-expected.txt:
* platform/mac/css1/box_properties/padding_inline-expected.txt:
* platform/mac/css1/box_properties/padding_left-expected.txt:
* platform/mac/css1/box_properties/padding_left_inline-expected.txt:
* platform/mac/css1/box_properties/padding_right-expected.txt:
* platform/mac/css1/box_properties/padding_right_inline-expected.txt:
* platform/mac/css1/box_properties/padding_top-expected.txt:
* platform/mac/css1/box_properties/padding_top_inline-expected.txt:
* platform/mac/css1/box_properties/width-expected.txt:
* platform/mac/css1/cascade/cascade_order-expected.txt:
* platform/mac/css1/cascade/important-expected.txt:
* platform/mac/css1/classification/display-expected.txt:
* platform/mac/css1/classification/list_style-expected.txt:
* platform/mac/css1/classification/list_style_image-expected.txt:
* platform/mac/css1/classification/list_style_position-expected.txt:
* platform/mac/css1/classification/list_style_type-expected.txt:
* platform/mac/css1/classification/white_space-expected.txt:
* platform/mac/css1/color_and_background/background-expected.txt:
* platform/mac/css1/color_and_background/background_attachment-expected.txt:
* platform/mac/css1/color_and_background/background_color-expected.txt:
* platform/mac/css1/color_and_background/background_image-expected.txt:
* platform/mac/css1/color_and_background/background_position-expected.txt:
* platform/mac/css1/color_and_background/background_repeat-expected.txt:
* platform/mac/css1/color_and_background/color-expected.txt:
* platform/mac/css1/conformance/forward_compatible_parsing-expected.txt:
* platform/mac/css1/font_properties/font-expected.txt:
* platform/mac/css1/font_properties/font_family-expected.txt:
* platform/mac/css1/font_properties/font_size-expected.txt:
* platform/mac/css1/font_properties/font_style-expected.txt:
* platform/mac/css1/font_properties/font_variant-expected.txt:
* platform/mac/css1/font_properties/font_weight-expected.txt:
* platform/mac/css1/formatting_model/canvas-expected.txt:
* platform/mac/css1/formatting_model/floating_elements-expected.txt:
* platform/mac/css1/formatting_model/height_of_lines-expected.txt:
* platform/mac/css1/formatting_model/inline_elements-expected.txt:
* platform/mac/css1/formatting_model/replaced_elements-expected.txt:
* platform/mac/css1/formatting_model/vertical_formatting-expected.txt:
* platform/mac/css1/pseudo/anchor-expected.txt:
* platform/mac/css1/pseudo/firstletter-expected.txt:
* platform/mac/css1/pseudo/firstline-expected.txt:
* platform/mac/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/mac/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* platform/mac/css1/text_properties/letter_spacing-expected.txt:
* platform/mac/css1/text_properties/line_height-expected.txt:
* platform/mac/css1/text_properties/text_align-expected.txt:
* platform/mac/css1/text_properties/text_decoration-expected.txt:
* platform/mac/css1/text_properties/text_indent-expected.txt:
* platform/mac/css1/text_properties/text_transform-expected.txt:
* platform/mac/css1/text_properties/vertical_align-expected.txt:
* platform/mac/css1/text_properties/word_spacing-expected.txt:
* platform/mac/css1/units/color_units-expected.txt:
* platform/mac/css1/units/length_units-expected.txt:
* platform/mac/css1/units/percentage_units-expected.txt:
* platform/mac/css1/units/urls-expected.txt:
* platform/mac/css2.1/t100801-c548-ln-ht-00-c-a-expected.txt:
* platform/mac/css2.1/t1606-c562-white-sp-00-b-ag-expected.txt:
* platform/mac/editing/selection/designmode-no-caret-expected.txt:
* platform/mac/fast/css/empty-pseudo-class-expected.txt:
* platform/mac/fast/css/first-child-pseudo-class-expected.txt:
* platform/mac/fast/css/last-child-pseudo-class-expected.txt:
* platform/mac/fast/css/only-child-pseudo-class-expected.txt:
* platform/mac/fast/forms/targeted-frame-submission-expected.txt:
* platform/mac/fast/frames/onlyCommentInIFrame-expected.txt:
* platform/mac/fast/html/listing-expected.txt:
* platform/mac/fast/invalid/junk-data-expected.txt:
* platform/mac/fast/invalid/missing-end-tag-expected.txt:
* platform/mac/fast/loader/text-document-wrapping-expected.txt:
* platform/mac/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/mac/fast/parser/xhtml-alternate-entities-expected.txt:
* platform/mac/fast/table/border-collapsing/004-expected.txt:
* platform/mac/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/mac/fast/text/whitespace/001-expected.txt: Added.
* platform/mac/fast/text/whitespace/013-expected.txt: Added.
* platform/mac/fast/text/whitespace/014-expected.txt: Added.
* platform/mac/fast/text/whitespace/022-expected.txt: Added.
* platform/mac/fast/text/whitespace/024-expected.txt:
* platform/mac/fast/text/whitespace/030-expected.txt:
* platform/mac/fast/xsl/xslt-extra-content-at-end-expected.txt:
* platform/mac/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt:
* platform/mac/http/tests/misc/acid3-expected.txt:
* platform/mac/svg/custom/bug45331-expected.txt:
* platform/mac/svg/custom/junk-data-expected.txt:
* platform/mac/svg/custom/missing-xlink-expected.txt:
* platform/mac/svg/custom/path-bad-data-expected.txt:
* platform/mac/svg/custom/use-font-face-crash-expected.txt:
* platform/mac/svg/hixie/error/012-expected.txt:
* platform/mac/tables/mozilla/bugs/45621-expected.txt:
* platform/mac/tables/mozilla/bugs/bug139524-2-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug1055-2-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug21518-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug22122-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* platform/mac/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Selection gap painting is ugly for ruby bases.
https://bugs.webkit.org/show_bug.cgi?id=138136

Reviewed by Dean Jackson.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
For ruby bases don't fill to the end of the block (in the block direction),
since ideographic baselines push that end below the text baseline.

(WebCore::RenderBlock::blockSelectionGaps):
* rendering/RenderBlockFlow.cpp:
Skip ruby bases for block selection gap filling.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use constants from wtf/MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=137967

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-28
Reviewed by Darin Adler.

Source/WebCore:

* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::rotateCairoMatrixForVerticalOrientation):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):

Source/WTF:

* wtf/MathExtras.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove App.PaneController.bugsChangeCount in the new perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=138111

Reviewed by Darin Adler.

* public/v2/app.js:
(App.PaneController.bugsChangeCount): Removed.
(App.PaneController.actions.associateBug): Call _updateMarkedPoints instead of incrementing bugsChangeCount.
(App.PaneController._updateMarkedPoints): Extracted from App.InteractiveChartComponent._updateDotsWithBugs.
Finds the list of current run's points that are associated with bugs.
(App.InteractiveChartComponent._updateMarkedDots): Renamed from _updateDotsWithBugs.
* public/v2/chart-pane.css:
(.chart .marked): Renamed from .hasBugs.
* public/v2/index.html: Specify chartPointRadius and markedPoints.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Abandoned select option is reselected when shift selecting new options
https://bugs.webkit.org/show_bug.cgi?id=137553

Patch by Pascal Jacquemart <p.jacquemart@samsung.com> on 2014-10-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
typeAhead. Fixed by clearing previously selected options before starting a new active selection.

Test: fast/forms/listbox-selection-after-typeahead.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectOption): Code re-ordering

LayoutTests:

Test checking a combination of mouse and keyboard selection events
on select-multiple element

* fast/forms/listbox-selection-after-typeahead-expected.txt: Added.
* fast/forms/listbox-selection-after-typeahead.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
text-combine needs to center glyphs within the vertical area.
https://bugs.webkit.org/show_bug.cgi?id=138056

Adding pre-Yosemite test results.

* platform/mac-mavericks/fast/text/tatechuyoko-expected.png: Added.
* platform/mac-mavericks/fast/text/tatechuyoko-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebCore] Remove uses of WTF::bind() in the Media Stream module
https://bugs.webkit.org/show_bug.cgi?id=138016

Reviewed by Eric Carlson.

Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
Internal helper methods are removed in favor of inlining the code directly
into the lambdas. Range-based for-loops are deployed where appropriate.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::scheduleEventDispatch):
(WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
(WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
(WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated):
(WebCore::UserMediaRequest::userMediaAccessGranted):
(WebCore::UserMediaRequest::didCreateStream):
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
(WebCore::UserMediaRequest::requestPermission): Deleted.
(WebCore::UserMediaRequest::createMediaStream): Deleted.
(WebCore::UserMediaRequest::callSuccessHandler): Deleted.
(WebCore::UserMediaRequest::callErrorHandler): Deleted.
* Modules/mediastream/UserMediaRequest.h:


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