WebKit-https.git
6 years agoRemove App.PaneController.bugsChangeCount in the new perf dashboard
rniwa@webkit.org [Tue, 28 Oct 2014 18:01:32 +0000 (18:01 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUse constants from wtf/MathExtras.h
commit-queue@webkit.org [Tue, 28 Oct 2014 18:00:09 +0000 (18:00 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSelection gap painting is ugly for ruby bases.
hyatt@apple.com [Tue, 28 Oct 2014 17:58:24 +0000 (17:58 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175260 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSpeed up line parsing for simple line layout.
zalan@apple.com [Tue, 28 Oct 2014 17:57:14 +0000 (17:57 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r175249.
commit-queue@webkit.org [Tue, 28 Oct 2014 17:55:06 +0000 (17:55 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoimport-w3c-tests should use re.escape() wherever it's handling file paths
commit-queue@webkit.org [Tue, 28 Oct 2014 17:52:30 +0000 (17:52 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove an inaccurate comment in WKActionMenuController
timothy_horton@apple.com [Tue, 28 Oct 2014 17:37:12 +0000 (17:37 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175256 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUpdate CSS shapes suite import
commit-queue@webkit.org [Tue, 28 Oct 2014 17:17:17 +0000 (17:17 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@175255 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWindows build fix.
ap@apple.com [Tue, 28 Oct 2014 16:44:02 +0000 (16:44 +0000)]
Windows build fix.

* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
for getting current process ID instead of getpid().

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

6 years ago[EFL] Remove unnecessary defines from OptionsEfl.cmake
commit-queue@webkit.org [Tue, 28 Oct 2014 16:30:53 +0000 (16:30 +0000)]
[EFL] Remove unnecessary defines from OptionsEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=138132

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-10-28
Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake:

Source/WTF:

* wtf/Platform.h:

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

6 years agoClean up subtrees selection code
mihnea@adobe.com [Tue, 28 Oct 2014 16:05:32 +0000 (16:05 +0000)]
Clean up subtrees selection code
https://bugs.webkit.org/show_bug.cgi?id=137740

Reviewed by David Hyatt.

Clean up subtrees selection code. Add a new class SelectionSubtreeData
that keeps only the selection data. Have SelectionSubtreeRoot class embed
a SelectionSubtreeData member and keep the business logic methods.
No functionality changed therefore no new layout tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionStartEnd):
* rendering/RenderView.cpp:
(WebCore::RenderView::subtreeSelectionBounds):
(WebCore::RenderView::repaintSubtreeSelection):
(WebCore::RenderView::setSelection):
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
(WebCore::SelectionSubtreeRoot::selectionData):
(WebCore::SelectionSubtreeRoot::setSelectionData):
(WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
(WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.

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

6 years ago[Mac] The first software paint of a <video> element takes up to 2.5s.
jer.noble@apple.com [Tue, 28 Oct 2014 16:04:26 +0000 (16:04 +0000)]
[Mac] The first software paint of a <video> element takes up to 2.5s.
https://bugs.webkit.org/show_bug.cgi?id=137754

Reviewed by Brent Fulgham.

It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
the video output will not attempt to conform the resulting pixel buffers into a particular format.
This means that adding such a video output to a AVPlayerItem should have almost no performance
penalty, since the video output does not even copy the resulting buffers, but rather just retains
and returns the ones from the AVPlayerLayer.

Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
a video output to an already attached AVPlayerItem.

When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.

Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
whait when asked to paint with the video output.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

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

6 years agoMove text decoration CSS properties to the new StyleBuilder
cdumez@apple.com [Tue, 28 Oct 2014 15:35:36 +0000 (15:35 +0000)]
Move text decoration CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138121

Reviewed by Antti Koivisto.

Move text decoration CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are generated from CSSPropertyNames.in.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
(WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextDecoration):

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

6 years agoHoles are not copied properly when Arrays change shape to ArrayStorage type.
mark.lam@apple.com [Tue, 28 Oct 2014 15:29:51 +0000 (15:29 +0000)]
Holes are not copied properly when Arrays change shape to ArrayStorage type.
<https://webkit.org/b/138118>

Reviewed by Mark Hahnenberg.

When we convert non-ArrayStorage typed arrays into ArrayStorage typed arrays,
we skipped the holes.  As a result, the slots in the ArrayStorage vector that
corresponds to those holes are uninitialize.  This is now fixed.

* runtime/JSObject.cpp:
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):

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

6 years ago[EFL] Remove an unused include from Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
commit-queue@webkit.org [Tue, 28 Oct 2014 14:14:50 +0000 (14:14 +0000)]
[EFL] Remove an unused include from Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=138130

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-10-28
Reviewed by Csaba Osztrogonác.

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:

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

6 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.7.1 release.
carlosgc@webkit.org [Tue, 28 Oct 2014 13:52:44 +0000 (13:52 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.1 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.7.1.

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

6 years ago[GTK] Remove GDK dependency from SharedTimerGtk
carlosgc@webkit.org [Tue, 28 Oct 2014 12:49:38 +0000 (12:49 +0000)]
[GTK] Remove GDK dependency from SharedTimerGtk
https://bugs.webkit.org/show_bug.cgi?id=138092

Reviewed by Martin Robinson.

It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
use its value directly instead.

* PlatformGTK.cmake:
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval):

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

6 years ago[Mac] OS X Mavericks build broken with public SDK
mitz@apple.com [Tue, 28 Oct 2014 07:05:37 +0000 (07:05 +0000)]
[Mac] OS X Mavericks build broken with public SDK
https://bugs.webkit.org/show_bug.cgi?id=138108

Reviewed by Mark Rowe.

* Shared/API/Cocoa/WKFoundation.h: Only define the NSEventModifierFlags type when using a
version of the OS X SDK that doesn’t define it.

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

6 years agoCrash when attempting to perform array iteration on a non-array with numeric keys...
mark.lam@apple.com [Tue, 28 Oct 2014 05:46:52 +0000 (05:46 +0000)]
Crash when attempting to perform array iteration on a non-array with numeric keys not initialized.
<https://webkit.org/b/137814>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The arrayIteratorNextThunkGenerator() thunk was not checking for the case where
the butterfly may be NULL.  This was the source of the crash, and is now fixed.

In addition, it is also not checking for the case where a property named "length"
may have been set on the iterated object.  The thunk only checks the butterfly's
publicLength for its iteration operation.  Array objects will work fine with this
because it always updates its butterfly's publicLength when its length changes.
In the case of iterable non-Array objects, the "length" property will require a
look up outside of the scope of this thunk.  The fix is simply to limit the fast
case checks in this thunk to Array objects.

* jit/ThunkGenerators.cpp:
(JSC::arrayIteratorNextThunkGenerator):

LayoutTests:

* js/array-length-shortening-expected.txt: Added.
* js/array-length-shortening.html: Added.
* js/for-of-crash-expected.txt: Added.
* js/for-of-crash.html: Added.
* js/script-tests/array-length-shortening.js: Added.
(testLengthShortening):
(denseInt32Elements):
(denseDoubleElements):
(denseObjectElements):
(holeyInt32Elements):
(holeyDoubleElements):
(holeyObjectElements):
(arrayStorageInt32Elements):
(arrayStorageDoubleElements):
(arrayStorageObjectElements):
(sparseInt32Elements):
(sparseDoubleElements):
(sparseObjectElements):
* js/script-tests/for-of-crash.js: Added.
(foo):

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

6 years agoMove RenderBlock::beingDestroyed() to RenderObject.
akling@apple.com [Tue, 28 Oct 2014 05:39:40 +0000 (05:39 +0000)]
Move RenderBlock::beingDestroyed() to RenderObject.
<https://webkit.org/b/138116>

Reviewed by Antti Koivisto.

Make "is being destroyed" a RenderObject concept instead of restricting
it to RenderBlocks. I'm guessing that this was specific to blocks due to
lack of bitfield space in RenderObject, and that's no longer an issue.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::beingDestroyed): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::destroy):
* rendering/RenderObject.h:
(WebCore::RenderObject::beingDestroyed):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):

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

6 years agoAX: input type=hidden is being exposed when aria-hidden=false
cfleizach@apple.com [Tue, 28 Oct 2014 05:38:48 +0000 (05:38 +0000)]
AX: input type=hidden is being exposed when aria-hidden=false
https://bugs.webkit.org/show_bug.cgi?id=138106

Reviewed by Benjamin Poulain.

Source/WebCore:

If an input type=hidden was inside an aria-hidden=false, it would appear because
the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
We should explicity check for whether the type is hidden and then return an appropriate role.

Test: accessibility/input-type-hidden-in-aria-hidden-false.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):

LayoutTests:

* accessibility/input-type-hidden-in-aria-hidden-false-expected.txt: Added.
* accessibility/input-type-hidden-in-aria-hidden-false.html: Added.

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

6 years agoSimplified some JSObject methods for converting arrays to ArrayStorage shape.
mark.lam@apple.com [Tue, 28 Oct 2014 05:05:01 +0000 (05:05 +0000)]
Simplified some JSObject methods for converting arrays to ArrayStorage shape.
<https://webkit.org/b/138119>

Reviewed by Filip Pizlo.

Currently, for each Undecided, Int32, Double, and Contiguous array shapes,
there are 3 JSObject methods to convert them to ArrayStorage shape:
    ArrayStorage* convert<shape>ToArrayStorage(VM&, NonPropertyTransition, unsigned neededLength);
    ArrayStorage* convert<shape>ToArrayStorage(VM&, NonPropertyTransition);
    ArrayStorage* convert<shape>ToArrayStorage(VM&);

However, the neededLength that is passed is always m_butterfly->vectorLength().
Hence, the method that takes a neededLength is really not needed.  This patch
removes this unneeded verbosity.

* runtime/JSObject.cpp:
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
- Also reordered the placement of the DeferGC statement so this Int32 function
  will look more similar to the others.
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
* runtime/JSObject.h:

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

6 years agoNSSharingService protocol conformance should be internal to WKActionMenuController
commit-queue@webkit.org [Tue, 28 Oct 2014 03:05:17 +0000 (03:05 +0000)]
NSSharingService protocol conformance should be internal to WKActionMenuController
https://bugs.webkit.org/show_bug.cgi?id=138112

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-10-27
Reviewed by Tim Horton.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Move protocol conformance from the interface to a class extension.

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

6 years agohttps://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
ap@apple.com [Tue, 28 Oct 2014 02:49:39 +0000 (02:49 +0000)]
https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.

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

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

6 years agotext-combine needs to center text within the vertical space using glyph bounds
hyatt@apple.com [Tue, 28 Oct 2014 01:00:36 +0000 (01:00 +0000)]
text-combine needs to center text within the vertical space using glyph bounds
https://bugs.webkit.org/show_bug.cgi?id=138056
<rdar://problem/15403667>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/text/tatechuyoko.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::RenderCombineText):
(WebCore::RenderCombineText::adjustTextOrigin):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:

LayoutTests:

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

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

6 years agoWebContent crash in WebKit::WebPage::expandedRangeFromHandle.
enrica@apple.com [Tue, 28 Oct 2014 00:36:06 +0000 (00:36 +0000)]
WebContent crash in WebKit::WebPage::expandedRangeFromHandle.
https://bugs.webkit.org/show_bug.cgi?id=138023
rdar://problem/18787412

Reviewed by Ryosuke Niwa.

We must change that we have a valid currentRange before trying
to expand or contract.

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

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

6 years agoREGRESSION: commit logs are not shown sometimes on the new dashboard UI
rniwa@webkit.org [Mon, 27 Oct 2014 23:13:24 +0000 (23:13 +0000)]
REGRESSION: commit logs are not shown sometimes on the new dashboard UI
https://bugs.webkit.org/show_bug.cgi?id=138099

Reviewed by Benjamin Poulain.

The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
_showDetails inverting the order of the current and old measurements.

* public/v2/app.js:
(App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
(App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
current (latest) measurement and the first point is the oldest measurement.
(App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.

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

6 years agoCleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
benjamin@webkit.org [Mon, 27 Oct 2014 22:55:38 +0000 (22:55 +0000)]
Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Darin spotted this mistake.

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

6 years agohttp/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
ap@apple.com [Mon, 27 Oct 2014 21:59:52 +0000 (21:59 +0000)]
http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
https://bugs.webkit.org/show_bug.cgi?id=138098

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession):
Create a separate session for each WKTR/DRT process when testing.

Source/WebKit2:

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:
Update for the new name of testing session. Memory regions are now of the form
"WebKit Test-<pid>-0".

LayoutTests:

* platform/mac-wk1/TestExpectations: Removed the test from expectations. It's still
skipped on WK2, because we don't yet implement the necessary WKTR functionality.

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

6 years agoUse separate HashMaps for common and uncommon headers in HTTPHeaderMap
cdumez@apple.com [Mon, 27 Oct 2014 21:08:51 +0000 (21:08 +0000)]
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=138079

Reviewed by Anders Carlsson.

Source/WebCore:

Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
- a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
- a HashMap<String, String, CaseFoldingHash> for uncommon ones

This avoids having to construct Strings from HTTPHeaderMap values for
storing. This also means we have less isolated String copies to do when
creating cross-thread data. The common headers HashMap should also be
a bit more efficient due to faster hashing and faster key comparison in
case of collision.

Some calls sites can also benefit from having direct access to common
headers of the request in HTTPHeaderName type.

This patch adds a new HTTPHeaderMapConstIterator iterator type for
HTTPHeaderMap so that call sites that do not need / want to distinguish
common / uncommon headers still do not need to. They can keep using
modern C++ loops over HTTPHeaderMap objects and get <String, String>
key/value pairs.

No new tests, no behavior change.

* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.

(WebCore::isSimpleCrossOriginAccessRequest):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.

* loader/CrossOriginAccessControl.h:
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
Call httpHeaderFields().commonHeaders().find() instead of
httpHeaderFields().find() as we are looking for a common header.
HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
HashMap dedicated to common headers.

* loader/cache/CachedRawResource.cpp:
(WebCore::shouldIgnoreHeaderForCacheReuse):
Update argument type to be a HTTPHeaderName instead of a String as
only common HTTP headers can be ignored for cache reuse. The
implementation already dealt with HTTPHeaderName type and had to
call findHTTPHeaderName(). This is no longer needed now that the
call site now has direct access to common headers in HTTPHeaderName
type.

(WebCore::CachedRawResource::canReuse):
- Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
- Slightly optimize the second loop (the one over oldHeaderMap) to only
  check that the key is present in newHeaderMap, without actually
  comparing the String values. If the String values were different, the
  first loop would have seen it already and we would have returned
  early.

Source/WebKit2:

Update the WK2 IPC HTTPHeaderMap serialization / deserialization code
to leverage the fact that HTTPHeaderMap now stores common HTTP headers
and uncommon one in separate HashMaps. This speeds up deserialization
as we no longer need to call findHTTPHeaderName() for every decoded
header. We already know if the header is a common one or not, and if
it is then we already have a HTTPHeaderName type instead of a String.

I see that we spend ~40% less time in HTTPHeaderMap decoding when
loading http://flickr.com/explore, while the encoding takes about
the same amount of time as before.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode):
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):

Source/WTF:

Add HashTraits for C++11 strong enum types. Using integer HashTraits for
strong enums would be inconvenient as it would require casting between
integer and strong enum types.

* wtf/HashTraits.h:
(WTF::StrongEnumHashTraits::emptyValue):
(WTF::StrongEnumHashTraits::constructDeletedValue):
(WTF::StrongEnumHashTraits::isDeletedValue):

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

6 years agoDevirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
akling@apple.com [Mon, 27 Oct 2014 20:42:47 +0000 (20:42 +0000)]
Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
<https://webkit.org/b/138096>

Reviewed by Chris Dumez.

This function is only ever called on a renderer after we've checked
that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderObject.h:

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

6 years agoProvide a way for WebKit1 clients to override default action menu items
bdakin@apple.com [Mon, 27 Oct 2014 20:08:13 +0000 (20:08 +0000)]
Provide a way for WebKit1 clients to override default action menu items
https://bugs.webkit.org/show_bug.cgi?id=138066
-and corresponding-
rdar://problem/18451638

Reviewed by Anders Carlsson.

WebActionMenuController now has an ivar for the WebActionMenuType so that it can
send that along to clients customizing the menu.
* WebView/WebActionMenuController.h:
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController _defaultMenuItemsForHitTestResult:]):

New enum and new SPI to customize menus.
* WebView/WebUIDelegatePrivate.h:

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

6 years agoReintroduce null check removed in r175222
cdumez@apple.com [Mon, 27 Oct 2014 20:06:00 +0000 (20:06 +0000)]
Reintroduce null check removed in r175222
https://bugs.webkit.org/show_bug.cgi?id=138087

Reviewed by Andreas Kling.

Reintroduce null check removed in r175222 as several layout tests are
crashing on the bots without them. At least the Pair pointer can be
null according to the assertion hits on the bots.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):

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

6 years agoAdd [ Yosemite ] modifier to a couple of tests in section 7.
ap@apple.com [Mon, 27 Oct 2014 19:43:28 +0000 (19:43 +0000)]
Add [ Yosemite ] modifier to a couple of tests in section 7.

These two tests fail with PPT, so they are expected to pass on 10.8. Our current
approach is a have separate sections for Mavericks and Yosemite, even for PPT
specific failures that affect both.

* platform/mac-wk2/TestExpectations:

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

6 years agohttp/tests/cookies/third-party-cookie-relaxing.html is flaky on bots.
slewis@apple.com [Mon, 27 Oct 2014 18:31:06 +0000 (18:31 +0000)]
http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots.
https://bugs.webkit.org/show_bug.cgi?id=138098.

Updated Expectations.

* platform/mac-wk1/TestExpectations:

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

6 years agoMove radius CSS properties to the new StyleBuilder
cdumez@apple.com [Mon, 27 Oct 2014 18:26:08 +0000 (18:26 +0000)]
Move radius CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138087

Reviewed by Andreas Kling.

Move radius CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder so that they are now generated from CSSPropertyNames.in.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):

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

6 years agoShrink MathMLOperatorDictionary::dictionary table
zandobersek@gmail.com [Mon, 27 Oct 2014 18:06:31 +0000 (18:06 +0000)]
Shrink MathMLOperatorDictionary::dictionary table
https://bugs.webkit.org/show_bug.cgi?id=137914

Reviewed by Darin Adler.

Improve packing of the Entry structure that's used for elements
of the MathMLOperatorDictionary::dictionary table. This drops the
size of the struct from 16 bytes to just 4 bytes, and shrinks the
size of the dictionary table from rougly 16 kB down to 4 kB.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::MathMLOperatorDictionary::ExtractKey):
(WebCore::RenderMathMLOperator::setOperatorProperties):
* rendering/mathml/RenderMathMLOperator.h:

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

6 years agoSome test for multicol were redundant.
commit-queue@webkit.org [Mon, 27 Oct 2014 17:33:20 +0000 (17:33 +0000)]
Some test for multicol were redundant.
https://bugs.webkit.org/show_bug.cgi?id=133084

Patch by Piotr Grad <p.grad@samsung.com> on 2014-10-27
Reviewed by Andreas Kling.

* fast/multicol/newmulticol/compare-with-old-impl/anonymous-block-split-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/anonymous-block-split-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-before-after-content-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-before-after-content-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-block-children-inline-mismatch-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-block-children-inline-mismatch-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-flexbox-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/clone-flexbox.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/continuation-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/continuation-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/double-merge-anonymous-block-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/double-merge-anonymous-block-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/empty-anonymous-block-split-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/empty-anonymous-block-split-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/float-not-removed-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/float-not-removed-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-above-or-below-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-above-or-below.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-block-axis-flipped-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-block-axis-flipped.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-end-of-column-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-end-of-column.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-float-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-float.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-between-pages-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-between-pages-flipped-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-between-pages-flipped.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-between-pages.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-block-axis-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/hit-test-gap-block-axis.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/list-multi-column-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/list-multi-column-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input-expected.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/positioned-child-not-removed-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/positioned-child-not-removed-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/positioned-objects-not-removed-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/positioned-objects-not-removed-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/recursive-split-flow-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/recursive-split-flow-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/removal-of-multicol-span-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/removal-of-multicol-span-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/remove-child-split-flow-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/remove-child-split-flow-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/split-flow-anonymous-wrapper-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/split-flow-anonymous-wrapper-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/split-inline-wrong-post-block-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/split-inline-wrong-post-block-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/table-multi-column-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/table-multi-column-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/textbox-not-removed-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/textbox-not-removed-crash.html: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/update-after-content-before-child-crash-expected.txt: Removed.
* fast/multicol/newmulticol/compare-with-old-impl/update-after-content-before-child-crash.html: Removed.

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

6 years agoMove canContainFixedPositionObjects() to RenderElement.
akling@apple.com [Mon, 27 Oct 2014 17:20:44 +0000 (17:20 +0000)]
Move canContainFixedPositionObjects() to RenderElement.
<https://webkit.org/b/138088>

Reviewed by Mihnea Ovidenie.

Only RenderElement can contain other renderers, so it's not really
natural to answer this question on RenderObject anyway.

Moving it to RenderElement lets it access more efficient getters
that don't have to handle the RenderText case.

* rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects):
* rendering/RenderObject.h:
(WebCore::RenderObject::canContainFixedPositionObjects): Deleted.

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

6 years agomedia/track/audio-track.html is flaky on Yosemite
ap@apple.com [Mon, 27 Oct 2014 17:08:19 +0000 (17:08 +0000)]
media/track/audio-track.html is flaky on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=137882

* platform/mac/TestExpectations: Marking it as such.

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

6 years agoImages with usemap should not have a link state
benjamin@webkit.org [Mon, 27 Oct 2014 04:28:48 +0000 (04:28 +0000)]
Images with usemap should not have a link state
https://bugs.webkit.org/show_bug.cgi?id=138071

Reviewed by Andreas Kling.

Source/WebCore:

Image tags were incorrectly getting a link state if a usemap is defined.
The <area> of the usemap is supposed to get the link state, but never the image.

Unfortunately, the Accessibility code was relying on the wrong behavior
to set the ImageMapRole, most of the patch is updating that code to get
the correct role without the link state.

Test: fast/selectors/images-with-usemap-should-not-match-link.html

The accessibility code is covered by a few tests in accessibility/.
The test accessibility/aria-used-on-image-maps.html ensure the <area>
elements also get the correct role.

* dom/Node.h:
(WebCore::Node::setIsLink):
(WebCore::Node::clearIsLink): Deleted.
Unused code.

(WebCore::Node::isLink):
Move with its setter for clarity.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
This is the bug.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Here the branches for the role ImageMap where behind isLink() which would
never be valid after the fix.

My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
any usemap attribute qualifies the node for ImageMapRole.

(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::linkedUIElements):
(WebCore::AccessibilityRenderObject::url):

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAnchor): Deleted.
Something funny I discovered is the Accessibility code worked around the bug
by defining isAnchor() that exclude images from isLink().

Since isLink() will no longer be true for images, the hack can be removed.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement):
(WebCore::AccessibilityNodeObject::isAnchor): Deleted.
* accessibility/AccessibilityNodeObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):

LayoutTests:

* fast/selectors/images-with-usemap-should-not-match-link-expected.txt: Added.
* fast/selectors/images-with-usemap-should-not-match-link.html: Added.

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

6 years agoReplace Element::didAffectSelector() by setNeedsStyleRecalc()
benjamin@webkit.org [Mon, 27 Oct 2014 04:20:25 +0000 (04:20 +0000)]
Replace Element::didAffectSelector() by setNeedsStyleRecalc()
https://bugs.webkit.org/show_bug.cgi?id=138080

Reviewed by Andreas Kling.

Element::didAffectSelector() was probably an optimization at some point,
with the current code is does nothing more than setNeedsStyleRecalc().

* dom/Document.cpp:
(WebCore::Document::setCSSTarget):
* dom/Element.cpp:
(WebCore::Element::didAffectSelector): Deleted.
* dom/Element.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):

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

6 years agoMove some RenderObject member functions to RenderElement.
akling@apple.com [Sun, 26 Oct 2014 22:25:00 +0000 (22:25 +0000)]
Move some RenderObject member functions to RenderElement.
<https://webkit.org/b/138085>

Reviewed by Chris Dumez.

Move these two functions to RenderElement:

    - handleDynamicFloatPositionChange()
    - removeAnonymousWrappersForInlinesIfNecessary()

Also make childBecameNonInline() take a RenderElement& since
that's all we ever pass to it.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::childBecameNonInline):
* rendering/RenderBlock.h:
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::childBecameNonInline):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::handleDynamicFloatPositionChange):
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
* rendering/RenderElement.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::childBecameNonInline):
* rendering/RenderInline.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
(WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
* rendering/RenderObject.h:

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

6 years agoMove continuation teardown from subclasses to RenderBoxModelObject.
akling@apple.com [Sun, 26 Oct 2014 20:20:31 +0000 (20:20 +0000)]
Move continuation teardown from subclasses to RenderBoxModelObject.
<https://webkit.org/b/138081>

Reviewed by Antti Koivisto.

Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
instead of having every subclass do this themselves.

Also added a RenderElement bit tracking whether the renderer has a
continuation. This avoids a hash lookup every time we destroy a
RenderBoxModelObject that didn't have a continuation.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderBoxModelObject.cpp:
(WebCore::continuationMap):
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::continuation):
(WebCore::RenderBoxModelObject::setContinuation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::setHasContinuation):
(WebCore::RenderElement::hasContinuation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):

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

6 years agoRemove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorL...
benjamin@webkit.org [Sun, 26 Oct 2014 05:47:13 +0000 (05:47 +0000)]
Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
https://bugs.webkit.org/show_bug.cgi?id=138076

Reviewed by Alexey Proskuryakov.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.

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

6 years ago[GTK] Unreviewed GTK gardening after r174685.
yoon@igalia.com [Sun, 26 Oct 2014 04:44:01 +0000 (04:44 +0000)]
[GTK] Unreviewed GTK gardening after r174685.

* platform/gtk/TestExpectations: Report new failures and update expectations.

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

6 years agoFix link to Arch Linux Wiki
commit-queue@webkit.org [Sun, 26 Oct 2014 04:12:04 +0000 (04:12 +0000)]
Fix link to Arch Linux Wiki
https://bugs.webkit.org/show_bug.cgi?id=138010

Patch by Raniere Silva <raniere@ime.unicamp.br> on 2014-10-25
Reviewed by Benjamin Poulain.

* gtk/install-dependencies:

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

6 years agoWeb Inspector: timelines should not count time elapsed while paused in the debugger
burg@cs.washington.edu [Sun, 26 Oct 2014 03:52:17 +0000 (03:52 +0000)]
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351

Unreviewed, follow-up fix after r175203. The debugger agent should not assume
that the inspector environment's stopwatch has already been started.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didPause): Check if the stopwatch isActive() before stopping.

Source/WTF:

* wtf/Stopwatch.h:
(WTF::Stopwatch::isActive): Added. Allow peeking at the stopwatch state.

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

6 years agoLand Yosemite results for six editing/selection/vertical* tests.
ap@apple.com [Sun, 26 Oct 2014 03:25:55 +0000 (03:25 +0000)]
Land Yosemite results for six editing/selection/vertical* tests.

These failures used to be mostly hidden because of bug 138070, now they are visible.
The change is due to different fonts.

* platform/mac-mavericks/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.txt.
* platform/mac-mavericks/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.txt.
* platform/mac-mavericks/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.txt.
* platform/mac-mavericks/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.txt.
* platform/mac-mavericks/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.txt.
* platform/mac-mavericks/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.txt: Copied from LayoutTests/platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.txt.
* platform/mac/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.png: Added.
* platform/mac/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.txt:
* platform/mac/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.png: Added.
* platform/mac/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.txt:
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.png: Added.
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.txt:
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.png: Added.
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.txt:
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.png: Added.
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.txt:
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.png: Added.
* platform/mac/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.txt:

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

6 years agoTest regressions are not detected when image result is missing
ap@apple.com [Sat, 25 Oct 2014 23:29:51 +0000 (23:29 +0000)]
Test regressions are not detected when image result is missing
https://bugs.webkit.org/show_bug.cgi?id=138070

Reviewed by Simon Fraser.

* Scripts/webkitpy/layout_tests/models/test_run_results.py:
* Scripts/webkitpy/layout_tests/views/buildbot_results.py:
Count these as regressions, not as flaky tests.

* Scripts/webkitpy/port/test.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
Test it.

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

6 years agoWeb Inspector: timelines should not count time elapsed while paused in the debugger
burg@cs.washington.edu [Sat, 25 Oct 2014 22:05:57 +0000 (22:05 +0000)]
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Now that we have a stopwatch to provide pause-aware timing data, we can remove the
profiler's handling of debugger pause/continue callbacks. The debugger agent accounts
for suspended execution by pausing and resuming the stopwatch.

* API/JSProfilerPrivate.cpp:
(JSStartProfiling): Use a fresh stopwatch when profiling from the JSC API.
* inspector/InspectorEnvironment.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::executionStopwatch):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::handlePause):
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::breakpointActionProbe):
(Inspector::InspectorDebuggerAgent::didContinue):
* inspector/agents/InspectorDebuggerAgent.h:
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::profiler): Use nullptr.
(JSC::LegacyProfiler::startProfiling): Hand off a stopwatch to the profile generator.
(JSC::LegacyProfiler::stopProfiling): Use nullptr.
(JSC::LegacyProfiler::didPause): Deleted.
(JSC::LegacyProfiler::didContinue): Deleted.
* profiler/LegacyProfiler.h:
* profiler/Profile.cpp: The root node should always have a start time of 0.0.
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp: Remove debugger pause/continue callbacks and the
timestamp member that was used to track time elapsed by the debugger. Just use the
stopwatch's elapsed times to generate start/elapsed times for function calls.

(JSC::ProfileGenerator::create):
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::AddParentForConsoleStartFunctor::operator()): The parent node of |console.profile|
should have a start time of 0.0, since it represents the starting node of profiling.

(JSC::ProfileGenerator::beginCallEntry):
(JSC::ProfileGenerator::endCallEntry):
(JSC::ProfileGenerator::didPause): Deleted.
(JSC::ProfileGenerator::didContinue): Deleted.
* profiler/ProfileGenerator.h:

Source/WebCore:

To avoid counting time elapsed while the debugger is paused, timeline records should
keep track of time elapsed since the start of timeline capturing, rather than wall clock
timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
inspector environment. The stopwatch runs with timelines and is paused with the debugger,
so subsequent time measurements will not include time elapsed while the debugger is paused.

This refactoring is safe because start and end times are only used to graph records; the
timestamp's actual value is irrelevant and is not displayed in the user interface. Date
timestamps are still included with network-related records as part of their header data.

No new tests, because we cannot reliably test timing changes induced by debugger pauses.
It is possible for records to accrue time before the debugger pauses or after it resumes.

* inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/InspectorController.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::startProfiling):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::TimelineTimeConverter::reset): Deleted.
* inspector/InspectorTimelineAgent.h:
(WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
(WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
(WebCore::InspectorTimelineAgent::timeConverter): Deleted.
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/WorkerInspectorController.h:

Source/WebInspectorUI:

Don't update the timeline's current time when the debugger is paused.

Start and end times for timeline records are now in seconds elapsed since timeline
recording started, rather than milliseconds since the epoch. Also convert code that
tracks page/resource load timings to use elapsed times rather than timestamps.

Add a workaround to preserve compatibility with old backends. Convert legacy timestamps
in multiple agents to elapsed times.

* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
* UserInterface/Controllers/ProbeManager.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.computeElapsedTime): Forward to the active TimelineRecording.
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.pageDidLoad):
(WebInspector.TimelineManager.prototype._loadNewRecording):
* UserInterface/Models/Probe.js:
(WebInspector.ProbeSample):
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.updateForRedirectResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.increaseSize):
(WebInspector.Resource.prototype.markAsFinished):
(WebInspector.Resource.prototype.markAsFailed):
(WebInspector.Resource.prototype.revertMarkAsFinished):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.computeElapsedTime):
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._debuggerPaused):
(WebInspector.TimelineContentView.prototype._debuggerResumed):

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
(WTF::Stopwatch::create):
(WTF::Stopwatch::Stopwatch):
(WTF::Stopwatch::reset):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):
(WTF::Stopwatch::elapsedTime):

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

6 years agoAdd Mavericks results for platform/mac/editing/spelling/delete-autocorrected-word...
ap@apple.com [Sat, 25 Oct 2014 19:58:14 +0000 (19:58 +0000)]
Add Mavericks results for platform/mac/editing/spelling/delete-autocorrected-word-2.html, too.

Yosemite, Mavericks and Mountain Lion all have different results.

* platform/mac-mavericks/platform/mac/editing/spelling/delete-autocorrected-word-2-expected.txt: Added.

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

6 years agoUpdate Yosemite results for platform/mac/editing/spelling/delete-autocorrected-word...
ap@apple.com [Sat, 25 Oct 2014 19:25:23 +0000 (19:25 +0000)]
Update Yosemite results for platform/mac/editing/spelling/delete-autocorrected-word-2.html.

Looks like this got confused during Yosemite tests landing.

This test is currently marked as failing on WK2, but it passed for me, so maybe we
can mark it as passing there too. Tracked as bug 105616.

* platform/mac/editing/spelling/delete-autocorrected-word-2-expected.png:
* platform/mac/editing/spelling/delete-autocorrected-word-2-expected.txt:

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

6 years agoFix builds using the public SDK.
mitz@apple.com [Sat, 25 Oct 2014 19:21:12 +0000 (19:21 +0000)]
Fix builds using the public SDK.

* platform/spi/cocoa/NSExtensionSPI.h:

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

6 years agoUpdate results for compositing/rtl/rtl-fixed-overflow-scrolled.html.
ap@apple.com [Sat, 25 Oct 2014 19:10:28 +0000 (19:10 +0000)]
Update results for compositing/rtl/rtl-fixed-overflow-scrolled.html.

Prior to Yosemite results landing, this test was marked as failing on WK2, and its
results matched WK1. It got changed several times during the merge, so it ended
up being marked as failing on WK1, but with WK1 results landed.

Let's land WK2 results and keep testing on WK2. Also, Mavericks results were no different
from Yosemite.

* platform/mac-mavericks/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png: Removed.
* platform/mac-mavericks/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: Removed.
* platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png: Copied from LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png.
* platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:

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

6 years agoClamp wordSpacing percentage value.
zalan@apple.com [Sat, 25 Oct 2014 02:37:41 +0000 (02:37 +0000)]
Clamp wordSpacing percentage value.
https://bugs.webkit.org/show_bug.cgi?id=129350.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-24
Reviewed by Zalan Bujtas.

Source/WebCore:

When the CSS wordSpacing property is percentage, its value has to be within the
pre-defined min/max values for the CSS length type. This is done the same way
the wordSpacing of type <length> is handled.

Tests: css3/infinite-word-spacing.html.

Move the definitions of minValueForCssLength and maxValueForCssLength from the
.cpp file to the .h file.
* css/CSSPrimitiveValue.cpp:
* css/CSSPrimitiveValue.h:

Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
its type is percentage.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyWordSpacing::applyValue):

LayoutTests:

Make sure that setting the CSS style wordSpacing property to very huge percentage
value and blending this value with other values for animating key frames does
not assert or crash. The expectation is to have this huge value to be clamped to
the pre-defined min/max values for the CSS length type. So when blending the clamped
value with other wordSpacing values, the result can't be NaN. This should be very
similar to the case when it is set to a huge <length> value.

* css3/infinite-word-spacing-expected.txt: Added.
* css3/infinite-word-spacing.html: Added.

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

6 years agoFix the iOS build
benjamin@webkit.org [Sat, 25 Oct 2014 02:15:31 +0000 (02:15 +0000)]
Fix the iOS build

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-24

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig:
* WebView/WebView.mm:

Source/WebKit2:

* Configurations/WebKit.xcconfig:

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

6 years agoUpdate Yosemite results for fast/block/float/overhanging-tall-block.html for
ap@apple.com [Sat, 25 Oct 2014 00:12:22 +0000 (00:12 +0000)]
Update Yosemite results for fast/block/float/overhanging-tall-block.html for
font size differences.

The test fails pixel results, filed bug 138065 to track that.

* platform/mac-mavericks/fast/block/float: Added.
* platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.png: Copied from LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.png.
* platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt: Copied from LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.txt.
* platform/mac/fast/block/float/overhanging-tall-block-expected.txt:

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

6 years ago_actionMenuItemsForHitTestResult should also take a type indicating what the menu
bdakin@apple.com [Fri, 24 Oct 2014 23:51:47 +0000 (23:51 +0000)]
_actionMenuItemsForHitTestResult should also take a type indicating what the menu
was built for
https://bugs.webkit.org/show_bug.cgi?id=138063

Reviewed by Dan Bernstein.

New type enum that can be used by clients.
* Shared/API/c/WKActionMenuTypes.h: Added.

Remove the old SPI and add the new.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]): Deleted.

Now keep an ivar for the type.
* UIProcess/mac/WKActionMenuController.h:

Create a category for the old SPI so that we can still call it if clients have
implemented it.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoUpdate media test results for Yosemite.
ap@apple.com [Fri, 24 Oct 2014 23:51:17 +0000 (23:51 +0000)]
Update media test results for Yosemite.

media/controls-styling.html appears to actually fail, filed bug 138064 about that.
media/video-zoom-controls.html results are not great; Dean reportedly has a fix for that.

* platform/mac-mavericks/media/controls-styling-expected.png: Copied from LayoutTests/platform/mac/media/controls-styling-expected.png.
* platform/mac-mavericks/media/controls-styling-expected.txt: Copied from LayoutTests/platform/mac/media/controls-styling-expected.txt.
* platform/mac-mavericks/media/video-zoom-controls-expected.png: Copied from LayoutTests/platform/mac/media/video-zoom-controls-expected.png.
* platform/mac-mavericks/media/video-zoom-controls-expected.txt: Copied from LayoutTests/platform/mac/media/video-zoom-controls-expected.txt.
* platform/mac/media/controls-styling-expected.png:
* platform/mac/media/controls-styling-expected.txt:
* platform/mac/media/video-zoom-controls-expected.png:
* platform/mac/media/video-zoom-controls-expected.txt:

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

6 years agoRemove MountainLion results that I incorrectly copied. These are the same as Mavericks.
ap@apple.com [Fri, 24 Oct 2014 23:13:57 +0000 (23:13 +0000)]
Remove MountainLion results that I incorrectly copied. These are the same as Mavericks.

* platform/mac-mountainlion/fast/writing-mode: Removed.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Removed.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Removed.
* platform/mac-mountainlion/mathml: Removed.
* platform/mac-mountainlion/mathml/opentype: Removed.
* platform/mac-mountainlion/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Removed.

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

6 years agoShare sheet doesn't attach to the window
timothy_horton@apple.com [Fri, 24 Oct 2014 23:10:30 +0000 (23:10 +0000)]
Share sheet doesn't attach to the window
https://bugs.webkit.org/show_bug.cgi?id=138062
<rdar://problem/18767397>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.h:
WKActionMenuController is now a NSSharingService{Picker}Delegate.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForImage]):
Set us up as the NSSharingServicePicker delegate.

(-[WKActionMenuController sharingServicePicker:delegateForSharingService:]):
Set us up as the NSSharingService delegate.

(-[WKActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
Return the appropriate window to attach to.

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

6 years agoAdd Conrad Shultz to the contributors list.
timothy_horton@apple.com [Fri, 24 Oct 2014 23:03:34 +0000 (23:03 +0000)]
Add Conrad Shultz to the contributors list.

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

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

6 years agoAbstractify WebOriginDataManager to support arbitrary ChildProcess supplements.
jer.noble@apple.com [Fri, 24 Oct 2014 23:01:54 +0000 (23:01 +0000)]
Abstractify WebOriginDataManager to support arbitrary ChildProcess supplements.
https://bugs.webkit.org/show_bug.cgi?id=137993

Reviewed by Brady Eidson.

To allow different ChildProcess subclasses to handle listing and deletion of origin
data, make WebOriginDataManager more generic by having a supplement implement the
details, leaving WebOriginDataManager to deal with cross-process messaging.

De-virtualize AsyncTask, allowing a task to be created by passing in a
function<void()>, rather than an object, method, and arguments.

* Shared/AsyncTask.h:
(WebKit::AsyncTask::AsyncTask):
(WebKit::AsyncTask::performTask):
(WebKit::AsyncTask::~AsyncTask): Deleted.

Add a new virtual base class, to be implemented by various ChildProcesses, which
WebOriginDataManager will use to implement listing and deletion requests.

* WebProcess/OriginData/WebOriginDataManager.h:
* WebProcess/OriginData/WebOriginDataManagerSupplement.h: Added.
(WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement):
(WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement):
(WebKit::WebOriginDataManagerSupplement::getOrigins):
(WebKit::WebOriginDataManagerSupplement::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerSupplement::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManagerSupplement::deleteAllEntries):
* WebKit2.xcodeproj/project.pbxproj:

WebOriginDataManager doesn't need to be a ChildSupplement. Remove the DatabaseProcess-
specific implementations for its message handlers and replace with clean, generic calls
to its supplement. Because these supplements may want to respond to the request
asynchronously, pass a completion function in to be called by the supplement once its
work is complete.

* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::WebOriginDataManager):
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManager::deleteAllEntries):
(WebKit::WebOriginDataManager::supplementName): Deleted.

DatabaseProcess already uses WebOriginDataManager, so it will be the first process
to fall under the heel of the new regime. DatabaseProcess will subclass
WebOriginDataManagerSupplement, and pass itself in twice to the WebOriginDataManager
constructor. Create a lambda-based AsyncTask for each request, and call the completion
function when each request is complete.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess):
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
(WebKit::DatabaseProcess::getOrigins):
(WebKit::DatabaseProcess::deleteEntriesForOrigin):
(WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllEntries):
(WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins): Deleted.
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin): Deleted.
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
(WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries): Deleted.
* DatabaseProcess/DatabaseProcess.h:

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

6 years agoVery large images crash in action menu code
bdakin@apple.com [Fri, 24 Oct 2014 22:27:27 +0000 (22:27 +0000)]
Very large images crash in action menu code
https://bugs.webkit.org/show_bug.cgi?id=138059
-and corresponding-
rdar://problem/18767859

Reviewed by Tim Horton.

If the HitTestResult failed to create and image, then don’t go for the image
action menu.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

ShareableBitmap::createShareable() can fail. The result needs to be null-checked.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

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

6 years ago[Mac] Use modern loops in ResourceRequestCocoa.mm
cdumez@apple.com [Fri, 24 Oct 2014 22:24:30 +0000 (22:24 +0000)]
[Mac] Use modern loops in ResourceRequestCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=138052

Reviewed by Darin Adler.

Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
fast enumeration.

No new tests, no behavior change.

* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
- Use NSDictionary's block-based enumeration as we enumerate both keys
  and values and this is faster than using fast enumeration of the keys
  then calling [NSDictionary objectForKey:]
- Use Objective C's fast enumeration for
  contentDispositionEncodingFallbackArray as this is faster and shorter
  than index based access. Also use reserveCapacity() /
  uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
  as we know how many elements were are going to append in the common
  case.

(WebCore::ResourceRequest::doUpdatePlatformRequest):
- Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
  keys instead of calling [NSDictionary allKeys] and then doing
  index-based iteration, to avoid copying the keys to a new array.
  Also do a forward enumeration instead of a reverse one. I don't see
  why a backward enumeration would be necessary here. We are not
  modifying the NSDictionary we are iterating over as
  [nsRequest allHTTPHeaderFields] makes a copy.
- Use a modern C++ loop for
  m_responseContentDispositionEncodingFallbackArray.

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

6 years agoBuild fix.
bdakin@apple.com [Fri, 24 Oct 2014 22:01:00 +0000 (22:01 +0000)]
Build fix.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

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

6 years agoBlindly try to fix all the builds.
timothy_horton@apple.com [Fri, 24 Oct 2014 21:51:10 +0000 (21:51 +0000)]
Blindly try to fix all the builds.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

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

6 years agoBuild fix.
bdakin@apple.com [Fri, 24 Oct 2014 21:49:31 +0000 (21:49 +0000)]
Build fix.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _openURLFromActionMenu:]):
(-[WebActionMenuController _addToReadingListFromActionMenu:]):
(-[WebActionMenuController _quickLookURLFromActionMenu:]):

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

6 years agoWebKit1 should support action menus
bdakin@apple.com [Fri, 24 Oct 2014 21:45:54 +0000 (21:45 +0000)]
WebKit1 should support action menus
https://bugs.webkit.org/show_bug.cgi?id=138032

Reviewed by Tim Horton.

This patch adds basic support for action menus and adds actions for links.

Helper class takes care of all of the action menu work. WebView will forward the
prepareForMenu: message, and then the helper class takes it from there.
* WebView/WebActionMenuController.h: Added.
* WebView/WebActionMenuController.mm: Added.
(-[WebActionMenuController webViewClosed]):
(-[WebActionMenuController prepareForMenu:withEvent:]):

Selectors for link actions.
(-[WebActionMenuController _openURLFromActionMenu:]):
(-[WebActionMenuController _addToReadingListFromActionMenu:]):
(-[WebActionMenuController _elementBoundingBoxFromDOMElement:]):
(-[WebActionMenuController _quickLookURLFromActionMenu:]):
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
(webKitBundleImageNamed):
(-[WebActionMenuController _defaultMenuItemsForLink:]):
(-[WebActionMenuController _defaultMenuItemsForHitTestResult:]):

Tags for the action menu items.
* WebView/WebUIDelegatePrivate.h:
* WebView/WebView.mm:

Set the action menu if possible and create the controller.
(-[WebView _initWithFrame:frameName:groupName:]):
(-[WebView _close]):
(-[WebView prepareForMenu:withEvent:]):

WebViewData stores the WebActionMenuHelper
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate dealloc]):

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

6 years agoBlindly try to fix all the builds.
timothy_horton@apple.com [Fri, 24 Oct 2014 21:45:01 +0000 (21:45 +0000)]
Blindly try to fix all the builds.

* UIProcess/mac/WKActionMenuController.h:

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

6 years agoBlindly try to fix the 32-bit build.
timothy_horton@apple.com [Fri, 24 Oct 2014 21:39:20 +0000 (21:39 +0000)]
Blindly try to fix the 32-bit build.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

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

6 years ago[Mac][WebKit2] Move action menu code into its own file
timothy_horton@apple.com [Fri, 24 Oct 2014 21:13:14 +0000 (21:13 +0000)]
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _addImageToPhotos:]):
Review comments that were not previously addressed.

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

6 years ago[Mac][WebKit2] Move action menu code into its own file
timothy_horton@apple.com [Fri, 24 Oct 2014 21:08:20 +0000 (21:08 +0000)]
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Make a WKActionMenuController if needed.

(-[WKView prepareForMenu:withEvent:]):
(-[WKView willOpenMenu:withEvent:]):
(-[WKView didCloseMenu:withEvent:]):
(-[WKView _didPerformActionMenuHitTest:]):
Forward these to WKActionMenuController.

(-[WKView _openURLFromActionMenu:]): Deleted.
(-[WKView _addToReadingListFromActionMenu:]): Deleted.
(-[WKView _quickLookURLFromActionMenu:]): Deleted.
(-[WKView _createActionMenuItemForTag:]): Deleted.
(webKitBundleImageNamed): Deleted.
(-[WKView _copyImage:]): Deleted.
(-[WKView _saveImageToDownloads:]): Deleted.
(temporaryPhotosDirectoryPath): Deleted.
(pathToPhotoOnDisk): Deleted.
(-[WKView _addImageToPhotos:]): Deleted.
(-[WKView _defaultMenuItemsForImage]): Deleted.
(-[WKView _defaultMenuItems]): Deleted.
(-[WKView _updateActionMenu]): Deleted.
Moved to WKActionMenuController.

* UIProcess/mac/WKActionMenuController.h: Added.
* UIProcess/mac/WKActionMenuController.mm: Added.
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:]):
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _quickLookURLFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(webKitBundleImageNamed):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
Moved from WKView.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoReplace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
zalan@apple.com [Fri, 24 Oct 2014 20:59:58 +0000 (20:59 +0000)]
Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
https://bugs.webkit.org/show_bug.cgi?id=138047

Reviewed by Andreas Kling.

No change in functionality.

* css/CSSPrimitiveValue.cpp:

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

6 years ago[Win] More unreviewed gardening/rebaselining of Windows tests.
roger_fong@apple.com [Fri, 24 Oct 2014 20:26:44 +0000 (20:26 +0000)]
[Win] More unreviewed gardening/rebaselining of Windows tests.
* platform/win/TestExpectations:
* platform/win/fast/repaint/select-option-background-color-expected.txt:
* platform/win/fast/repaint/slider-thumb-drag-release-expected.txt: Added.
* platform/win/fast/repaint/slider-thumb-float-expected.txt: Added.
* platform/win/fast/replaced/table-percent-height-expected.txt: Added.
* platform/win/fast/replaced/three-selects-break-expected.txt: Added.
* platform/win/fast/table/remove-td-display-none-expected.txt:
* platform/win/fast/transforms: Added.
* platform/win/fast/transforms/transformed-focused-text-input-expected.txt: Added.
* platform/win/platform/win/accessibility: Added.
* platform/win/platform/win/accessibility/option-element-position-and-size-expected.txt: Added.

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

6 years agoREGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
ap@apple.com [Fri, 24 Oct 2014 20:23:31 +0000 (20:23 +0000)]
REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
https://bugs.webkit.org/show_bug.cgi?id=138053

Reviewed by Chris Dumez.

Fixes existing tests.

* platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the
behavior of returning a null string when there are no cookies.

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

6 years ago[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
cdumez@apple.com [Fri, 24 Oct 2014 20:12:44 +0000 (20:12 +0000)]
[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
https://bugs.webkit.org/show_bug.cgi?id=138039

Reviewed by Darin Adler.

Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
for case-insensitive string comparison instead of converting to UTF-8 and then
using strcasecmp().

No new tests, no behavior change.

* platform/mac/QuickLookMac.mm:
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):

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

6 years agoUpdate some results that were incorrect for Yosemite.
ap@apple.com [Fri, 24 Oct 2014 19:28:59 +0000 (19:28 +0000)]
Update some results that were incorrect for Yosemite.

* platform/mac-mavericks/fast/text/international/hindi-spacing-expected.png: Copied from LayoutTests/platform/mac/fast/text/international/hindi-spacing-expected.png.
* platform/mac-mavericks/fast/text/international/hindi-spacing-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/hindi-spacing-expected.txt.
* platform/mac-mavericks/fast/writing-mode: Added.
* platform/mac-mavericks/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png.
* platform/mac-mavericks/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt.
* platform/mac-mountainlion/fast/writing-mode: Added.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt.
* platform/mac-mountainlion/mathml: Added.
* platform/mac-mountainlion/mathml/opentype: Added.
* platform/mac-mountainlion/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Copied from LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt.
* platform/mac-wk2/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Removed.
* platform/mac/fast/text/international/hindi-spacing-expected.png:
* platform/mac/fast/text/international/hindi-spacing-expected.txt:
* platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:

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

6 years agoSimplified IndexingType's hasAnyArrayStorage().
mark.lam@apple.com [Fri, 24 Oct 2014 19:16:29 +0000 (19:16 +0000)]
Simplified IndexingType's hasAnyArrayStorage().
<https://webkit.org/b/138051>

Reviewed by Michael Saboff.

IndexingType's hasAnyArrayStorage() currently does subtraction of ArrayStorageShape
with the purpose of making non-ArrayStorage types underflow (with that subtraction)
and have a result that exceeds SlowPutArrayStorageShape.  What it is doing is
basically checking for a shape value that is greater equal to ArrayStorageShape.
We can just simplify the code as such.

Also added a comment to describe the structure of the bits in IndexingType.

* runtime/IndexingType.h:
(JSC::hasAnyArrayStorage):

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

6 years agoAvoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest...
cdumez@apple.com [Fri, 24 Oct 2014 19:13:15 +0000 (19:13 +0000)]
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=138049

Reviewed by Alexey Proskuryakov.

Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
/ doUpdatePlatformHTTPBody(). It turns out that about half the time, the
m_nsRequest member is already mutable so it is unnecessary to call
[NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
avoid copying.

This patch also moves the code to a new ensureMutableNSURLRequest() method to
avoid duplicating the logic.

I see that we spend ~21% less time in these 2 functions when loading
http://flickr.com/explore/ (39.6ms -> 31.2ms).

No new tests, no behavior change.

* platform/network/cf/ResourceRequest.h:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::ensureMutableNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):

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

6 years agofast/multicol/fixed-stack.html failing since introduction.
ap@apple.com [Fri, 24 Oct 2014 19:11:17 +0000 (19:11 +0000)]
fast/multicol/fixed-stack.html failing since introduction.
https://bugs.webkit.org/show_bug.cgi?id=132421

* platform/mac-wk1/TestExpectations: As of Yosemite, it's failing on mac-wk1 too.

* platform/gtk/TestExpectations: [ Pass ] is no longer needed, because we don't have
an entry in global TestExpectations now.

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

6 years agoMove ComputeLength CSS properties to the new StyleBuilder
cdumez@apple.com [Fri, 24 Oct 2014 18:32:34 +0000 (18:32 +0000)]
Move ComputeLength CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138036

Reviewed by Andreas Kling.

Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are now generated. 3 Converters are
provided for these properties: ComputedLength / LineWidth / Spacing.

This is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=154012

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyComputeLength::setValue): Deleted.
(WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
(WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertComputedLength):
(WebCore::StyleBuilderConverter::convertLineWidth):
(WebCore::StyleBuilderConverter::convertSpacing):

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

6 years agoMake ScriptWrappable's destructor protected instead of public
cdumez@apple.com [Fri, 24 Oct 2014 18:13:30 +0000 (18:13 +0000)]
Make ScriptWrappable's destructor protected instead of public
https://bugs.webkit.org/show_bug.cgi?id=138037

Reviewed by Andreas Kling.

Make ScriptWrappable's destructor protected instead of public as it is
not virtual and this class is subclassed a lot.

No new tests, no behavior change.

* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::~ScriptWrappable):

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

6 years agoAll plug-in tests fail on Yosemite WK1
ap@apple.com [Fri, 24 Oct 2014 17:25:24 +0000 (17:25 +0000)]
All plug-in tests fail on Yosemite WK1
https://bugs.webkit.org/show_bug.cgi?id=138040

Reviewed by Dan Bernstein.

Fix a symlink for WebKitPluginHost.app. There is also a broken symlink for WebKitPluginAgent,
which I don't know what to do about, but that seems harmless.

* WebKit.xcodeproj/project.pbxproj:

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

6 years agobuild.webkit.org/dashboard immediately retries a request to buildbot when the respons...
mitz@apple.com [Fri, 24 Oct 2014 17:03:53 +0000 (17:03 +0000)]
build.webkit.org/dashboard immediately retries a request to buildbot when the response is 404
https://bugs.webkit.org/show_bug.cgi?id=138046

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype._load): Only consider retrying immediately if the error code was
401. Otherwise, we’ll retry normally in 45 seconds.

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

6 years ago[Windows] Skip tests after removing SafariTheme that fail because background renders...
roger_fong@apple.com [Fri, 24 Oct 2014 09:12:41 +0000 (09:12 +0000)]
[Windows] Skip tests after removing SafariTheme that fail because background renders too dark.
https://bugs.webkit.org/show_bug.cgi?id=138042.
* platform/win/TestExpectations:
24  Roger Fong  <roger_fong@apple.com>

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

6 years ago[Windows] Skip tests after removing SafariTheme that fail because borders now render...
roger_fong@apple.com [Fri, 24 Oct 2014 09:04:43 +0000 (09:04 +0000)]
[Windows] Skip tests after removing SafariTheme that fail because borders now render too dark.
https://bugs.webkit.org/show_bug.cgi?id=138041.
* platform/win/TestExpectations:

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

6 years ago[Windows] More unreviewed gardening after getting rid of SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:59:30 +0000 (08:59 +0000)]
[Windows] More unreviewed gardening after getting rid of SafariTheme.
* platform/win/TestExpectations: Skip a handful of tests that were failing
on the Windows bots after removing SafariTheme for miscellaneous reasons.

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

6 years ago[Windows] More unreviewed gardening after getting rid of SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:51:07 +0000 (08:51 +0000)]
[Windows] More unreviewed gardening after getting rid of SafariTheme.
https://bugs.webkit.org/show_bug.cgi?id=138025
* platform/win/TestExpectations: These tests fail seemingly due to text size difference,
which consequently cause the text containers to be too larger as well.

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

6 years ago[Windows] More rebaselining of Windows tests after removing SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:43:12 +0000 (08:43 +0000)]
[Windows] More rebaselining of Windows tests after removing SafariTheme.
* platform/win/editing/selection/select-across-readonly-input-1-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-2-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-3-expected.txt:
* platform/win/fast/block/positioning/inline-block-relposition-expected.txt:
* platform/win/fast/canvas/fallback-content-expected.txt: Added.
* platform/win/fast/css/button-height-expected.txt:
* platform/win/fast/dom/HTMLInputElement: Added.
* platform/win/fast/dom/HTMLInputElement/input-slider-update-expected.txt: Added.
* platform/win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Added.
* platform/win/fast/dom/tabindex-clamp-expected.txt: Added.
* platform/win/fast/dynamic/positioned-movement-with-positioned-children-expected.txt:
* platform/win/fast/html/details-no-summary4-expected.txt: Added.
* platform/win/fast/html/details-open-javascript-expected.txt: Added.
* platform/win/fast/html/details-open2-expected.txt: Added.
* platform/win/fast/html/details-open4-expected.txt: Added.
* platform/win/fast/html/details-replace-summary-child-expected.txt:
* platform/win/fast/html/details-replace-text-expected.txt:

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

6 years ago[GTK] Implement is_selected method on WebKitHitTestResult
commit-queue@webkit.org [Fri, 24 Oct 2014 07:09:57 +0000 (07:09 +0000)]
[GTK] Implement is_selected method on WebKitHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=137110

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2014-10-24
Reviewed by Tim Horton.

Source/WebKit2:

Expose CONTEXT_SELECTION for WebKitHitTestResult.

* Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isSelected):
* UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
(webkitHitTestResultCreate):
(webkitHitTestResultCompare):
(webkit_hit_test_result_context_is_selection):
* UIProcess/API/gtk/WebKitHitTestResult.h:
* UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.

Tools:

Add tests for new context SELECTION on WebKitHitTestResult.

* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuDefaultMenu):
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewMouseTarget):

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

6 years ago[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
carlosgc@webkit.org [Fri, 24 Oct 2014 06:58:13 +0000 (06:58 +0000)]
[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
https://bugs.webkit.org/show_bug.cgi?id=138004

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Rename all WidgetBackingStore* classes as
BackingStoreBackendCairo* since all of them are actually
BackingStore backends based on cairo, and move them from
platform/cairo and platform/gtk to platform/graphics/cairo.
BackingStoreBackendCairo is the base class that contains common
members like the surface and size. BackingStoreBackendCairoImpl is
the implementation using only cairo, and BackingStoreBackendCairoX11
using xlib. BackingStoreBackendCairoX11 receives all the X11
information it needs as constructor parameters, instead of using a
GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
the surface already created as constructor parameter, so that it
doesn't have any platform specific code now.

* PlatformEfl.cmake: Update compilation files.
* PlatformGTK.cmake: Ditto.
* platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
* platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
(WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
(WebCore::BackingStoreBackendCairo::surface):
(WebCore::BackingStoreBackendCairo::size):
(WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::cairoSurfaceGetDeviceScale):
* platform/graphics/cairo/CairoUtilities.h:

Source/WebKit2:

* UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
since it's a bit confusing that a BackingStore class has a
m_backingStore member and WidgetBackingStore has been renamed as
BackingStoreBackendCairo.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Helper function to create
the BackingStore backend depending on the platform.
(WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
(WebKit::BackingStore::incorporateUpdate): Ditto.
(WebKit::BackingStore::scroll): Ditto.
(WebKit::createBackingStoreForGTK): Deleted.

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

6 years agoWebContent crash at WebCore::RenderTextControl::textFormControlElement const.
zalan@apple.com [Fri, 24 Oct 2014 03:35:27 +0000 (03:35 +0000)]
WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
https://bugs.webkit.org/show_bug.cgi?id=138035

Reviewed by Antti Koivisto.

NULL-check element().renderer() before using it.

* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):

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

6 years agoFix a bad find-and-replace in r175153
benjamin@webkit.org [Fri, 24 Oct 2014 03:00:35 +0000 (03:00 +0000)]
Fix a bad find-and-replace in r175153

Looks like I messed up the commit on landing.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-23

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):

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

6 years agoRemove HarfBuzzRun::create() factory function
gyuyoung.kim@samsung.com [Fri, 24 Oct 2014 02:12:23 +0000 (02:12 +0000)]
Remove HarfBuzzRun::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137945

Reviewed by Ryosuke Niwa.

As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
Thus HarfBuzzRun::create() is needed no longer.

No new tests, no behavior changes.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
* platform/graphics/harfbuzz/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.

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

6 years agoUnreviewed iOS build fix
mmaxfield@apple.com [Fri, 24 Oct 2014 01:32:48 +0000 (01:32 +0000)]
Unreviewed iOS build fix

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-10-23

* editing/FrameSelection.cpp:

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

6 years ago[Mac] Optimize URL::createCFURL() for the common case
cdumez@apple.com [Fri, 24 Oct 2014 01:29:46 +0000 (01:29 +0000)]
[Mac] Optimize URL::createCFURL() for the common case
https://bugs.webkit.org/show_bug.cgi?id=138030

Reviewed by Alexey Proskuryakov.

Optimize URL::createCFURL() for the common case by adding a fast path
for when the URL String is already 8-bit (common case).
When the string is 8-bit, we don't need to copy the bytes into a
temporary buffer and we can construct the CFURLRef directly from it.

This makes URL::createCFURL() ~34% faster on my machine.

No new tests, no behavior change.

* platform/mac/URLMac.mm:
(WebCore::URL::createCFURL):

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

6 years ago[iOS WK2] If a page has the exact same VisibleContentRect as the page before, its...
benjamin@webkit.org [Fri, 24 Oct 2014 00:44:09 +0000 (00:44 +0000)]
[iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
https://bugs.webkit.org/show_bug.cgi?id=138031
rdar://problem/18739335

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

Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
if none of the important parameters have changed (scale and geometry).

One unintended side effect is that the update of a page can be blocked if the parameters
of the previous page were identical.

What happen is this:
1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
   in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
   layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
   to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
   discards the update. The WebProcess has its initialization viewport and is not udpated until
   a major parameter changes (scale or position).

In rdar://problem/18739335, the problem is the similar but with a different failure point:
1) Everything above happened already.
2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
3) Since the scrolling position is invalid, the request is ignored and we send the last
   VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
   is for the previous page, which the web process correctly ignores.

This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
any valid VisibleContentRectUpdate for a new page.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):

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

6 years agoCarets in GMail and iCloud compositions are the foreground text color
mmaxfield@apple.com [Thu, 23 Oct 2014 23:49:05 +0000 (23:49 +0000)]
Carets in GMail and iCloud compositions are the foreground text color
https://bugs.webkit.org/show_bug.cgi?id=138029

Reviewed by Simon Fraser.

Source/WebCore:

Previously, we were only checking whether the background colors of the foreground and background
elements were the same, rather than taking validity and opacity into consideration.

Test: editing/caret/color-span-inside-editable-background.html

* editing/FrameSelection.cpp:
(WebCore::disappearsIntoBackground):
(WebCore::CaretBase::paintCaret):

LayoutTests:

Test the case where the content editable root has a background color specified.

* editing/caret/color-span-inside-editable-background-expected.html: Added.
* editing/caret/color-span-inside-editable-background.html: Added.

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