WebKit-https.git
6 years agoTighten XMLHttpRequest setRequestHeader value check
commit-queue@webkit.org [Tue, 21 Oct 2014 01:50:41 +0000 (01:50 +0000)]
Tighten XMLHttpRequest setRequestHeader value check
https://bugs.webkit.org/show_bug.cgi?id=128593

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-10-20
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/xmlhttprequest/set-bad-headervalue.html

* platform/network/HTTPParsers.cpp:
(WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
(WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.

LayoutTests:

Added a test originating from w3c-test.org to test header values checking.
Testing headers with non ASCII characters and various control characters.

* http/tests/xmlhttprequest/set-bad-headervalue-expected.txt: Added.
* http/tests/xmlhttprequest/set-bad-headervalue.html: Added.

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

6 years ago[WinCairo] Crash in ATI display driver in accelerated compositing mode.
commit-queue@webkit.org [Tue, 21 Oct 2014 01:49:43 +0000 (01:49 +0000)]
[WinCairo] Crash in ATI display driver in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=137879

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-20
Reviewed by Darin Adler.

Speculative fix; don't enable antialiasing when drawing textures.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::initialize):

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

6 years agoMake post checkin suggested changes to r174847
msaboff@apple.com [Tue, 21 Oct 2014 01:21:03 +0000 (01:21 +0000)]
Make post checkin suggested changes to r174847
https://bugs.webkit.org/show_bug.cgi?id=137885

Reviewed by Mark Lam.

Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
Made the suggested post checkin change to put the declaration of "entry" into the if.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):

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

6 years agoUse is<>() / downcast<>() for SpinButtonElement
cdumez@apple.com [Tue, 21 Oct 2014 01:19:23 +0000 (01:19 +0000)]
Use is<>() / downcast<>() for SpinButtonElement
https://bugs.webkit.org/show_bug.cgi?id=137896

Reviewed by Gyuyoung Kim.

Use is<>() / downcast<>() for SpinButtonElement instead of
isSpinButtonElement() / static_cast for consistency with the rest of
the code and for safety.

No new tests, no behavior change.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* html/shadow/SpinButtonElement.h:
(isType):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):

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

6 years agoUnreviewed. Fix Changelog and add more explanation for r174915
roger_fong@apple.com [Tue, 21 Oct 2014 01:16:45 +0000 (01:16 +0000)]
Unreviewed. Fix Changelog and add more explanation for r174915

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

6 years agoUse glFinish instead of glFlush when drawing WebGL output to screen.
roger_fong@apple.com [Tue, 21 Oct 2014 01:07:38 +0000 (01:07 +0000)]
Use glFinish instead of glFlush when drawing WebGL output to screen.
https://bugs.webkit.org/show_bug.cgi?id=137897.
<rdar://problem/15846550>

Reviewed by Brent Fulgham.

Passes all conformance tests.
Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):

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

6 years agoGeneralize the compilation of :not() to support arbitrary selector lists
benjamin@webkit.org [Tue, 21 Oct 2014 00:43:29 +0000 (00:43 +0000)]
Generalize the compilation of :not() to support arbitrary selector lists
https://bugs.webkit.org/show_bug.cgi?id=137843

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

This builds :not() on top of the code created for :nth-child(An+B of selectorList)
to support any selector list.

The tests for the JIT were added previously:
-not-boundaries.html
-not-backtracking.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Any :not() of a selector is handled through a simple selector list. Cases like
:not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).

Old cases like :not(foo):not(bar) simply add those cases to the selector list,
generating not([fragmentFoo, bragmentBar]).

(WebCore::SelectorCompiler::minimumRegisterRequirements):
Register pressure is now tracked through computeBacktrackingMemoryRequirements.

(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
and  :nth-child(of).

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):

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

6 years agoAction menu items should have tags
bdakin@apple.com [Mon, 20 Oct 2014 23:25:51 +0000 (23:25 +0000)]
Action menu items should have tags
https://bugs.webkit.org/show_bug.cgi?id=137898

Reviewed by Anders Carlsson.

* Shared/API/c/WKActionMenuItemTypes.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _defaultMenuItemsForLink]):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoUnreviewed add back copyright line that was accidentally removed.
joepeck@webkit.org [Mon, 20 Oct 2014 23:22:40 +0000 (23:22 +0000)]
Unreviewed add back copyright line that was accidentally removed.

* inspector/scripts/codegen/generator_templates.py:
(GeneratorTemplates):

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

6 years agoUse std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
gyuyoung.kim@samsung.com [Mon, 20 Oct 2014 23:22:29 +0000 (23:22 +0000)]
Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
https://bugs.webkit.org/show_bug.cgi?id=137874

Reviewed by Andreas Kling.

No new tests, no behavior change.

* plugins/PluginView.cpp:
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
(WebCore::PluginView::load): Create PluginRequest using std::make_unique.
* plugins/PluginView.h:

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

6 years agoSpeculative build fix.
bdakin@apple.com [Mon, 20 Oct 2014 22:00:19 +0000 (22:00 +0000)]
Speculative build fix.

* platform/spi/mac/NSViewSPI.h:

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

6 years agoAdd support for action menus
bdakin@apple.com [Mon, 20 Oct 2014 21:00:15 +0000 (21:00 +0000)]
Add support for action menus
https://bugs.webkit.org/show_bug.cgi?id=137891
rdar://problem/18451638
rdar://problem/18694470

Reviewed by Anders Carlsson.

Source/WebCore:

New SPI that is needed for this.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac: Added.
* platform/spi/mac/NSViewSPI.h: Added.

Source/WebKit2:

Temporary artwork needed for menu item.
* Resources/OpenInNewWindowTemplate.pdf: Added.
* WebKit2.xcodeproj/project.pbxproj:

Add a preference that defaults to false for action menu support.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled):
(WKPreferencesGetActionMenuSupportEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

New SPI. WebKit clients can implement this method to customize the action menu.
* UIProcess/API/Cocoa/WKViewPrivate.h:

Create the action menu if it is supported.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

Methods to implement the default menu actions.
(-[WKView _openURLFromActionMenu:]):
(-[WKView _addToReadingListFromActionMenu:]):
(-[WKView _quickLookURLFromActionMenu:]):

Add action menus support for links. Populate the menu at the right time.
(-[WKView _defaultMenuItemsForLink]):
(-[WKView _defaultMenuItems]):
(-[WKView prepareForMenu:withEvent:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):

New member variable caches the HitTestResult on mouse move.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::activeActionMenuHitTestResult):

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

6 years ago[Win] Mark a few tests as no-longer failing.
bfulgham@apple.com [Mon, 20 Oct 2014 20:46:38 +0000 (20:46 +0000)]
[Win] Mark a few tests as no-longer failing.

It looks like Said's work on SVG has fixed a number of things!

* platform/win/TestExpectations: Remove 'crash' and 'failures' cases
for a few things that are now reliably passing.

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

6 years agoWeb Inspector: InspectorBackendCommands should include when to activate particular...
joepeck@webkit.org [Mon, 20 Oct 2014 20:45:02 +0000 (20:45 +0000)]
Web Inspector: InspectorBackendCommands should include when to activate particular domains
https://bugs.webkit.org/show_bug.cgi?id=137753

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Add an availability property to domains that only activate for
particular debuggable types. If missing, the domain is always
activated. Otherwise it must be a debuggable type string.
When a frontend is opened for that debuggable type, the domain
will be activated.

* inspector/scripts/codegen/models.py:
(Protocol.parse_domain):
(Domain.__init__):
(Domains):
Parse and validate the Domain's "availability" property.

* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.generate_domain):
Emit InspectorBackend.activateDomain with debuggable type filter.

* inspector/protocol/ApplicationCache.json:
* inspector/protocol/CSS.json:
* inspector/protocol/DOM.json:
* inspector/protocol/DOMDebugger.json:
* inspector/protocol/DOMStorage.json:
* inspector/protocol/Database.json:
* inspector/protocol/IndexedDB.json:
* inspector/protocol/LayerTree.json:
* inspector/protocol/Network.json:
* inspector/protocol/Page.json:
* inspector/protocol/Replay.json:
* inspector/protocol/Timeline.json:
* inspector/protocol/Worker.json:
These domains only activate for Web debuggables.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
Update existing tests that now have activate output.

* inspector/scripts/tests/expected/fail-on-domain-availability.json-error: Added.
* inspector/scripts/tests/fail-on-domain-availability.json: Added.
Add a test for "availability" validation.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
* UserInterface/Base/Test.js:
(WebInspector.loaded):
Activation now happens automatically so remove the hardcoded activations.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomain):
Given no filter, always activate a domain. Otherwise only activate
if the debuggable type matches the provided filter.

* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
Only web debuggables are supported in iOS 6 and 7. The JSON files do not
need to change, all agents will auto activate.

* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-8.0.json:
Specify which are web debuggables in iOS 8 since JS inspection is possible.

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

6 years ago[Mac] Support "inverted-colors" and "monochrome" media feature.
dino@apple.com [Mon, 20 Oct 2014 20:30:56 +0000 (20:30 +0000)]
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>

Rolling out the Windows part of this to fix the build.

* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Revert to a stub function.

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

6 years ago[Win] Build fix for generated inspector files.
bfulgham@apple.com [Mon, 20 Oct 2014 20:17:43 +0000 (20:17 +0000)]
[Win] Build fix for generated inspector files.

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-20
Rubberstamped by Brent Fulgham.

* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
* inspector/scripts/codegen/generator_templates.py:
(GeneratorTemplates):

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

6 years agoUnreviewed EFL / GTK build fix after r174898.
cdumez@apple.com [Mon, 20 Oct 2014 19:55:13 +0000 (19:55 +0000)]
Unreviewed EFL / GTK build fix after r174898.

Add missing header include.

* accessibility/AccessibilityARIAGrid.cpp:

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

6 years agoWeb Inspector: Delay and white area when Web Inspector crashes
timothy@apple.com [Mon, 20 Oct 2014 19:37:52 +0000 (19:37 +0000)]
Web Inspector: Delay and white area when Web Inspector crashes
https://bugs.webkit.org/show_bug.cgi?id=137230

Reviewed by Anders Carlsson.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::processDidCrash): Added.
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Hook up loader client.

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

6 years ago[Mac] Support "inverted-colors" and "monochrome" media feature.
dino@apple.com [Mon, 20 Oct 2014 19:37:40 +0000 (19:37 +0000)]
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>

Reviewed by Brent Fulgham.

Source/WebCore:

Add a new media query from CSS Level 4, "inverted-colors", and
implement the Apple backends for the "monochrome" media query.

The platform code went into PlatformScreenMac, which already
had a screenIsMonochrome method. This now calls into Core
Graphics via SPI. I added a screenHasInvertedColors
method which tests for inversion. On iOS, there is public API
for both queries. On Windows, we try to use CoreGraphics.

At the moment neither of these media queries re-evaluate
automatically if the user changes their mode. The page will
need to be reloaded. It is possible to detect a change on iOS,
but not OS X.
https://bugs.webkit.org/show_bug.cgi?id=137868

I decided to not add an ENABLE flag for this, mostly because it
is such an isolated feature and seems very unlikely to be
controversial. I don't expect the syntax to change. (I'm sure
this comment will come back to haunt me.)

Testing this automatically is slightly tricky. We'd need
to expose SPI to invert the user's screen, but then we get
inverted images from our testing which could interfere with concurrent
operations. Instead I've included some tests that exercise
the "false" parts of the media query, with explanations as
to why they would fail if the display is inverted.

Tests: fast/media/mq-inverted-colors.html
       fast/media/mq-monochrome.html

* css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
* css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
* css/MediaQueryEvaluator.cpp:
(WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
* css/MediaQueryExp.cpp:
(WebCore::featureWithCSSValueID): The new query takes an id...
(WebCore::featureWithoutValue): ... or no value.
* platform/PlatformScreen.h: Add "screenHasInvertedColors".
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenHasInvertedColors): Stub implementation.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenHasInvertedColors): Ditto.
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenHasInvertedColors): Call into the platform accessibility API.
(WebCore::screenIsMonochrome): Ditto.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
(WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.

LayoutTests:

Add tests for the new "inverted-colors" media feature, and
another test for the "monochrome" feature. Note that these
tests don't actually exercise the positive values of the
query, since that requires the screen to be changed and would
interfere with concurrent tests.

* fast/media/mq-inverted-colors.html: Added.
* fast/media/mq-monochrome.html: Added.
* fast/media/mq-inverted-colors-expected.html: Added.
* fast/media/mq-monochrome-expected.html: Added.

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

6 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Mon, 20 Oct 2014 19:16:54 +0000 (19:16 +0000)]
[Win] Unreviewed build fix.

We need to (1) pass the 'windows' argument to our script for checking feature definitions,
and (2) we must use Cwd::realpath on our path input arguments to avoid Cygwin and Windows
getting confused about path separators versus escape characters.

* JavaScriptCore.vcxproj/build-generated-files.pl:

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

6 years ago[Follow up] Web Process crash when starting the web inspector after r174025.
mark.lam@apple.com [Mon, 20 Oct 2014 19:13:32 +0000 (19:13 +0000)]
[Follow up] Web Process crash when starting the web inspector after r174025.
<https://webkit.org/b/137340>

Reviewed by Geoffrey Garen.

Applied Geoff's feedback to clean up some code for better clarity after
r174856.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::insertCheck):
* dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::insertOutOfOrder):

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

6 years agoUse is<>() / downcast<>() for Accessibility objects
cdumez@apple.com [Mon, 20 Oct 2014 19:08:40 +0000 (19:08 +0000)]
Use is<>() / downcast<>() for Accessibility objects
https://bugs.webkit.org/show_bug.cgi?id=137286

Reviewed by Darin Adler.

Source/WebCore:

Use is<>() / downcast<>() for Accessibility objects and clean up the
surrounding code.

No new tests, no behavior change.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
(WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::scrollViewAncestor):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::addChildren):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::addChildren):
(WebCore::AccessibilitySpinButtonPart::press):
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addChildrenFromSection):
(WebCore::AccessibilityTable::headerContainer):
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTable.h:
Make isAccessibilityTable() public and mark as final so that callers
can benefit from tighter typing, as isAccessibilityTable() is
stricter than isTable(). isTable() indicates that the object is an
AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
isAccessibilityTable() is equivalent to "isTable() && renderer()".

* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/AccessibilityTableRow.h:
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionClearSelection):
(webkitAccessibleSelectionSelectAllSelection):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(core):
(cell):
(cellAtIndex):
(webkitAccessibleTableGetIndexAt):
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(webkitAccessibleTableCellGetColumnHeaderCells):
(webkitAccessibleTableCellGetRowHeaderCells):
(webkitAccessibleTableCellGetColumnSpan):
(webkitAccessibleTableCellGetRowSpan):
(webkitAccessibleTableCellGetPosition):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetElement):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* rendering/RenderMenuList.cpp:
(RenderMenuList::didUpdateActiveOption):

Source/WebKit/win:

Use is<>() / downcast<>() for Accessibility objects.

* AccessibleBase.cpp:
(AccessibleBase::accSelect):
* AccessibleImage.cpp:
(AccessibleImage::name):

Source/WTF:

Remove the legacy TYPE_CASTS_BASE() macro now that it is no longer
used.

* wtf/Assertions.h:

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

6 years agoFactor out JITCode::typeName() for debugging use.
mark.lam@apple.com [Mon, 20 Oct 2014 18:52:37 +0000 (18:52 +0000)]
Factor out JITCode::typeName() for debugging use.
<https://webkit.org/b/137888>

Reviewed by Geoffrey Garen.

JITCode's printInternal() currently decodes the JITType into a string and
prints it.  This change factors out the part that decodes the JITType into
JITCode::typeName() so that we can call it from lldb while debugging to
quickly decode a JITType value.

* jit/JITCode.cpp:
(JSC::JITCode::typeName):
(WTF::printInternal):
* jit/JITCode.h:

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

6 years agoUnreviewed Windows Build Fix #2 after r174892.
joepeck@webkit.org [Mon, 20 Oct 2014 18:41:42 +0000 (18:41 +0000)]
Unreviewed Windows Build Fix #2 after r174892.

* JavaScriptCore.vcxproj/build-generated-files.pl:
Define FEATURE_DEFINES for JavaScriptCore's DerivedSources.make.
This uses the same technique as WebCore.

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

6 years agoFix placement of a few items in vcxproj ItemGroups.
mark.lam@apple.com [Mon, 20 Oct 2014 18:29:55 +0000 (18:29 +0000)]
Fix placement of a few items in vcxproj ItemGroups.
<https://webkit.org/b/137886>

Reviewed by Geoffrey Garen.

https://webkit.org/b/137873 is likely a cut-and-paste error that manifested
because we had ClCompile and ClInclude entries mixed up in the wrong ItemGroups.
We should fix these so that ClCompile entries are in the ClCompile ItemGroup,
and ClInclude entries in the ClInclude ItemGroup.  This will help reduce the
chance of future cut-and-paste errors of this nature.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

6 years agoUnreviewed Windows Build Fix after r174892.
joepeck@webkit.org [Mon, 20 Oct 2014 18:06:48 +0000 (18:06 +0000)]
Unreviewed Windows Build Fix after r174892.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
Update file name to the new generated file name.

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

6 years agoWeb Inspector: Rename generated Inspector.json to CombinedDomains.json to prevent...
joepeck@webkit.org [Mon, 20 Oct 2014 17:59:28 +0000 (17:59 +0000)]
Web Inspector: Rename generated Inspector.json to CombinedDomains.json to prevent name collisions
https://bugs.webkit.org/show_bug.cgi?id=137825

Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/protocol/Inspector.json: Renamed from Source/JavaScriptCore/inspector/protocol/InspectorDomain.json.

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

6 years agoWeb Inspector: Generate all Inspector domains together in JavaScriptCore
joepeck@webkit.org [Mon, 20 Oct 2014 17:59:24 +0000 (17:59 +0000)]
Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748

Reviewed by Brian Burg.

* Source/PlatformEfl.cmake:

Source/JavaScriptCore:

* inspector/protocol/ApplicationCache.json: Renamed from Source/WebCore/inspector/protocol/ApplicationCache.json.
* inspector/protocol/CSS.json: Renamed from Source/WebCore/inspector/protocol/CSS.json.
* inspector/protocol/DOM.json: Renamed from Source/WebCore/inspector/protocol/DOM.json.
* inspector/protocol/DOMDebugger.json: Renamed from Source/WebCore/inspector/protocol/DOMDebugger.json.
* inspector/protocol/DOMStorage.json: Renamed from Source/WebCore/inspector/protocol/DOMStorage.json.
* inspector/protocol/Database.json: Renamed from Source/WebCore/inspector/protocol/Database.json.
* inspector/protocol/IndexedDB.json: Renamed from Source/WebCore/inspector/protocol/IndexedDB.json.
* inspector/protocol/LayerTree.json: Renamed from Source/WebCore/inspector/protocol/LayerTree.json.
* inspector/protocol/Network.json: Renamed from Source/WebCore/inspector/protocol/Network.json.
* inspector/protocol/Page.json: Renamed from Source/WebCore/inspector/protocol/Page.json.
* inspector/protocol/Replay.json: Renamed from Source/WebCore/inspector/protocol/Replay.json.
* inspector/protocol/Timeline.json: Renamed from Source/WebCore/inspector/protocol/Timeline.json.
* inspector/protocol/Worker.json: Renamed from Source/WebCore/inspector/protocol/Worker.json.
Move all protocol files into this directory.

* inspector/InspectorProtocolTypesBase.h: Renamed from Source/JavaScriptCore/inspector/InspectorProtocolTypes.h.
Renamed the base types file to not clash with the generated types file.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
Update build phases for new JSON files and new filenames.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
Updated names of things now that prefixes are no longer needed.

* inspector/ConsoleMessage.h:
* inspector/ContentSearchUtilities.cpp:
* inspector/ContentSearchUtilities.h:
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.h:
* inspector/ScriptCallFrame.h:
* inspector/ScriptCallStack.h:
* inspector/agents/InspectorAgent.h:
* inspector/agents/InspectorConsoleAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::breakpointActionTypeForString):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorRuntimeAgent.h:
* runtime/TypeProfiler.cpp:
* runtime/TypeSet.cpp:
Update includes and update a few function names that are generated.

* inspector/scripts/codegen/generate_protocol_types_header.py:
(ProtocolTypesHeaderGenerator.output_filename):
(ProtocolTypesHeaderGenerator.generate_output):
Include an export macro for type string constants defined in the implementation file.

* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.output_filename):
* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator.output_filename):
(BackendDispatcherHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
(BackendDispatcherImplementationGenerator.output_filename):
(BackendDispatcherImplementationGenerator.generate_output):
(BackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
* inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
(FrontendDispatcherHeaderGenerator.output_filename):
(FrontendDispatcherHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
(FrontendDispatcherImplementationGenerator.output_filename):
(FrontendDispatcherImplementationGenerator.generate_output):
(FrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
(_generate_class_for_object_declaration):
(_generate_builder_setter_for_member):
(_generate_unchecked_setter_for_member):
* inspector/scripts/codegen/generate_protocol_types_implementation.py:
(ProtocolTypesImplementationGenerator.output_filename):
(ProtocolTypesImplementationGenerator.generate_output):
(ProtocolTypesImplementationGenerator._generate_enum_mapping):
* inspector/scripts/codegen/models.py:
(Framework.fromString):
(Frameworks):
* inspector/scripts/generate-inspector-protocol-bindings.py:
Simplify generator now that prefixes are no longer needed. This updates
filenames, includes, and the list of supported directories.

Source/WebCore:

After moving the json files into JavaScriptCore update the includes,
and names of functions that were previously prefixed.

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
* ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CommandLineAPIHost.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:

Source/WebInspectorUI:

Change the frontend to always load all agents, but only activate a subset
of the agents depending on the type of the backend.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomains):
(InspectorBackendClass.prototype.activateAllDomains):
(InspectorBackendClass.prototype._agentForDomain):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackend.Agent):
(InspectorBackend.Agent.prototype.get active):
(InspectorBackend.Agent.prototype.activate):
* UserInterface/Base/Test.js:
Only expose "window.FooAgent" or allow dispatches in the "Foo" domain
when that particular agent is activated. Currently we hardcode the list
of agents to activate for a debuggable type. This should be generated.

* UserInterface/Protocol/LoadInspectorBackendCommands.js:
Now there should always be a single "InspectorBackendCommands.js" file to load.
We may want to change the RWI path to return a single file instead of an array.

* Scripts/update-LegacyInspectorBackendCommands.rb:
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/8.0/InspectorJSBackendCommands.js: Removed.
* Versions/Inspector-iOS-8.0.json: Renamed from Source/WebInspectorUI/Versions/InspectorWeb-iOS-8.0.json.
* Versions/InspectorJS-iOS-8.0.json: Removed.
Update Legacy versions to output a single InspectorBackendCommands.js file.
Do a straightforward merge of the iOS 8 JS/Web inputs to a single json file.

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/WebInspectorUIFramework.xcconfig:
* Scripts/copy-user-interface-resources-dryrun.rb:
* Scripts/copy-user-interface-resources.pl:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
We no longer needed WebCore's Private Headers, so simplify build files
and update file names where appropriate.

Source/WebKit2:

* PlatformGTK.cmake:

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

6 years agoFix the GTK build.
aestes@apple.com [Mon, 20 Oct 2014 17:48:51 +0000 (17:48 +0000)]
Fix the GTK build.

* dom/RenderedDocumentMarker.h:

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

6 years agoRemove obsolete comments after r99798
ossy@webkit.org [Mon, 20 Oct 2014 17:30:16 +0000 (17:30 +0000)]
Remove obsolete comments after r99798
https://bugs.webkit.org/show_bug.cgi?id=137871

Reviewed by Darin Adler.

r99798 removed the comment in MacroAssemblerARMv7::supportsFloatingPointTruncate(),
so we should remove the stale references to this removed comment.

* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86_64.h:

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

6 years agoAvoid unnecessary NSURLResponse construction for QuickLook on iOS
antti@apple.com [Mon, 20 Oct 2014 17:17:32 +0000 (17:17 +0000)]
Avoid unnecessary NSURLResponse construction for QuickLook on iOS
https://bugs.webkit.org/show_bug.cgi?id=137876

Reviewed by Andy Estes.

Source/WebCore:

QuickLook specific code path creates NSURLResponse in the web process for every response.
It is rarely needed so this is unnecessary work.

* WebCore.exp.in:
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(WebCore::isMainResourceLoader):
(WebCore::QuickLookHandle::shouldCreateForMIMEType):

    Separate function for testing if QuickLookHandle is needed.

(WebCore::QuickLookHandle::create):

    Switch the interface to take ResourceResponse.

Source/WebKit2:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):

    Switch to the modified QuickLookHandle interface that does not need NSURLResponse.

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

6 years agoFix the iOS build.
aestes@apple.com [Mon, 20 Oct 2014 17:03:26 +0000 (17:03 +0000)]
Fix the iOS build.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* dom/RenderedDocumentMarker.h:
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):

Source/WebKit/ios:

* WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame previousUnperturbedDictationResultBoundaryFromPosition:]):
(-[WebFrame nextUnperturbedDictationResultBoundaryFromPosition:]):
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
(-[WebVisiblePosition enclosingRangeWithCorrectionIndicator]):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame getDictationResultRanges:andMetadatas:]):
(-[WebFrame dictationResultMetadataForRange:]):

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

6 years agoMacroAssemblerX86Common.cpp should be built on Windows too
ossy@webkit.org [Mon, 20 Oct 2014 17:03:21 +0000 (17:03 +0000)]
MacroAssemblerX86Common.cpp should be built on Windows too
https://bugs.webkit.org/show_bug.cgi?id=137873

Reviewed by Brent Fulgham.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

6 years agoEight transitions tests are very flaky, frequently failing all at once
ap@apple.com [Mon, 20 Oct 2014 16:40:42 +0000 (16:40 +0000)]
Eight transitions tests are very flaky, frequently failing all at once
https://bugs.webkit.org/show_bug.cgi?id=137883

Marking them as flaky. Enough is enough.

* TestExpectations:

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

6 years ago[iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
aestes@apple.com [Mon, 20 Oct 2014 16:26:51 +0000 (16:26 +0000)]
[iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
https://bugs.webkit.org/show_bug.cgi?id=137792

Reviewed by Tim Horton.

WKPDFView would like to use WKActionSheetAssistant to show an action sheet when long-pressing a link, but it
can't so long as WKActionSheetAssistant is tightly coupled to WKContentView. Resolve this by factoring
WKActionSheetAssistant's interaction with WKContentView into a new protocol called
WKActionSheetAssistantDelegate and having WKContentView conform to this protocol.

* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Changed instances of WKContentView * to id <WKActionSheetAssistantDelegate>.
(+[_WKElementAction elementActionWithType:customTitle:]): Ditto.
(-[_WKElementAction _runActionWithElementInfo:delegate:]): Ditto.
(copyElement): Deleted.
(saveImage): Deleted.
(-[_WKElementAction _runActionWithElementInfo:view:]): Deleted.
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet init]): Renamed from initWithView: since WKActionSheet no longer needs to know about a view.
(-[WKActionSheet _didRotateAndLayout]): Called -[WKActionSheetDelegate updatePositionInformation].
(-[WKActionSheet initWithView:]): Deleted.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant delegate]): Added a getter for the delegate property.
(-[WKActionSheetAssistant setDelegate:]): Added a setter for the delegate property.
(-[WKActionSheetAssistant initWithView:]): Changed argument type from WKContentView * to UIView *.
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]): Returned CGRectZero if there is no delegate.
Otherwise, retrieved positionInformation from the delegate.
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]): Ditto.
(-[WKActionSheetAssistant updatePositionInformation]): Called -[WKActionSheetAssistantDelegate updatePositionInformation].
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Returned early if there is no delegate.
Otherwise, retrieved positionInformation from the delegate.
(-[WKActionSheetAssistant showImageSheet]): Ditto.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
(-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]): Installed self as WKActionSheetAssistant's delegate.
(-[WKContentView updatePositionInformation]): Renamed from _updatePositionInformation.
(-[WKContentView performAction:]): Renamed from _performAction:.
(-[WKContentView openElementAtLocation:]): Called _attemptClickAtLocation:.
(-[WKContentView actionsForElement:defaultActions:]): Called API::UIClient::actionsForElement().
(-[WKContentView startInteractionWithElement:]): Called WebPageProxy::startInteractionWithElementAtPosition().
(-[WKContentView stopInteraction]): Called WebPageProxy::stopInteraction().
(-[WKContentView _updatePositionInformation]): Deleted.
(-[WKContentView _performAction:]): Deleted.

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

6 years agoREGRESSION(r174823): Two new failing HLS tests
jer.noble@apple.com [Mon, 20 Oct 2014 15:46:21 +0000 (15:46 +0000)]
REGRESSION(r174823): Two new failing HLS tests
https://bugs.webkit.org/show_bug.cgi?id=137882

Unreviewed gardening; add two expected failures.

* platform/mac/TestExpectations:

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

6 years ago[cmake] Remove duplicated source files
ossy@webkit.org [Mon, 20 Oct 2014 12:09:47 +0000 (12:09 +0000)]
[cmake] Remove duplicated source files
https://bugs.webkit.org/show_bug.cgi?id=137875

Reviewed by Gyuyoung Kim.

* CMakeLists.txt:

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

6 years ago[GTK] Improve zooming gesture positioning
commit-queue@webkit.org [Mon, 20 Oct 2014 10:39:58 +0000 (10:39 +0000)]
[GTK] Improve zooming gesture positioning
https://bugs.webkit.org/show_bug.cgi?id=137822

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-10-20
Reviewed by Carlos Garcia Campos.

* UIProcess/WebPageProxy.h:
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::ZoomGesture::center):
(WebKit::GestureController::ZoomGesture::begin):
(WebKit::GestureController::ZoomGesture::handleZoom):
(WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
the proper view coordinates for the current offset/scale, based
on the initial gesture center point in document coordinates, and
the current center/scale.
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
call to retrieve the zoom gesture anchor point, in document coordinates.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added stub.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
translated coordinates used as the anchor point of the zoom gesture.

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

6 years ago[GTK] Remove the factory method from DragAndDropHandler
carlosgc@webkit.org [Mon, 20 Oct 2014 09:54:50 +0000 (09:54 +0000)]
[GTK] Remove the factory method from DragAndDropHandler
https://bugs.webkit.org/show_bug.cgi?id=137872

Reviewed by Sergio Villar Senin.

Make the constructor public and use std::make_unique instead.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragAndDropHandler):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::create): Deleted.
* UIProcess/gtk/DragAndDropHandler.h:

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

6 years ago[GTK] Add initial gestures support
carlosgc@webkit.org [Mon, 20 Oct 2014 08:44:19 +0000 (08:44 +0000)]
[GTK] Add initial gestures support
https://bugs.webkit.org/show_bug.cgi?id=137812

Reviewed by Sergio Villar Senin.

.:

Check if the GTK+ version supports gestures or not.

* Source/cmake/FindGTK3.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

Now that GTK+ has support for gestures, we can use it to handle
touch events and allow to scroll, zoom and tap with the fingers.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
hasn't been handled by the web process pass it to the
GestureController and only fallback to pointer emulation when the
GestureController doesn't handle the event.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchEvent): If the GestureController is
currently processing gestures is because the START touch event was
not handled by the web process, so pass any successive touch
events to the GestureController directly.
(webkitWebViewBaseGestureController): Create the GestureController
on demand and return a reference.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/GestureController.cpp: Added.
(WebKit::GestureController::create): Create a GestureController.
(WebKit::GestureController::GestureController): Initialize the
Gesture memebers.
(WebKit::GestureController::handleEvent): Pass the event to the gestures.
(WebKit::GestureController::isProcessingGestures): Whether
Gestures are active.
(WebKit::GestureController::Gesture::Gesture): Base class for gestures.
(WebKit::GestureController::Gesture::isActive): Whether the
gesture is active.
(WebKit::GestureController::Gesture::handleEvent): Pass the event
to the GtkGesture to process it.
(WebKit::GestureController::DragGesture::handleDrag): Send a wheel
event corresponding to the drag gesture to the web process.
(WebKit::GestureController::DragGesture::handleTap): Send move,
press and release events corresponding to a tap gesture to the web process.
(WebKit::GestureController::DragGesture::begin): Start a drag
gesture and schedule a timer to discard tap gesture in case of
long press.
(WebKit::GestureController::DragGesture::update): If the actual
drag hasn't started yet, check the drag threshold to decide
whether to start the drag or not. Otherwise call handleDrag() to
send the appropriate events to the web process.
(WebKit::GestureController::DragGesture::end): If the drag gesture
finishes and the drag didn't happen (it wasn't a long press and
drag threshold was not reached), call handleTap() to emulate a
click event.
(WebKit::GestureController::DragGesture::DragGesture): Initialize
the GtkGestureDrag.
(WebKit::GestureController::ZoomGesture::begin): Save the current
page scale factor and the center point of the gesture.
(WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
page scale change in an idle for the given scale value.
(WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
the GtkGestureZoom.
* UIProcess/gtk/GestureController.h: Added.

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

6 years ago[GTK][Minibrowser] Escape key does not hide the search box
commit-queue@webkit.org [Mon, 20 Oct 2014 08:23:26 +0000 (08:23 +0000)]
[GTK][Minibrowser] Escape key does not hide the search box
https://bugs.webkit.org/show_bug.cgi?id=137734

Patch by Tanay C <tanay.c@samsung.com> on 2014-10-20
Reviewed by Philippe Normand.

* MiniBrowser/gtk/BrowserWindow.c: Added the check to handle search box hide
(stopPageLoad): Modified.

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

6 years agoUpdate the <link>'s link status
benjamin@webkit.org [Mon, 20 Oct 2014 07:31:09 +0000 (07:31 +0000)]
Update the <link>'s link status
https://bugs.webkit.org/show_bug.cgi?id=137861

Reviewed by Chris Dumez.

Source/WebCore:

In the latest HTML spec, <link> has the link status
if it has a 'href' attribute, exactly like <a> and <area>:
    https://html.spec.whatwg.org/multipage/scripting.html#selector-link

This patch updates WebKit accordingly.

Tests: fast/css/link-basics.html
       fast/selectors/link-basics-xhtml.xhtml
       fast/selectors/link-basics.html
       fast/selectors/webkit-any-link-basics.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):

LayoutTests:

* fast/css/link-basics-expected.html: Added.
* fast/css/link-basics.html: Added.
* fast/selectors/link-basics-expected.txt: Added.
* fast/selectors/link-basics-xhtml-expected.txt: Added.
* fast/selectors/link-basics-xhtml.xhtml: Added.
* fast/selectors/link-basics.html: Added.
* fast/selectors/resources/html-link-type-tests.js: Added.
(testHTMLElement):
(testHTMLTagsForLink):
* fast/selectors/webkit-any-link-basics-expected.txt: Added.
* fast/selectors/webkit-any-link-basics.html: Added.

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

6 years ago[Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
cdumez@apple.com [Mon, 20 Oct 2014 07:09:44 +0000 (07:09 +0000)]
[Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
https://bugs.webkit.org/show_bug.cgi?id=137869

Reviewed by Darin Adler.

Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.

Previously, when accessing document.cookie, we ended up doing the following:
1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
2. Call filterCookies() to filter out cookies that are httpOnly or with an
   empty name, thus allocating a new NSMutableArray.
3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
   cookies
4. Construct a WTF::String from the NSString*

There were several inefficiencies here:
1. We needed to pre-filter the cookies and allocate a new NSMutableArray
   before calling requestHeaderFieldsWithCookies()
2. requestHeaderFieldsWithCookies() does more things that we actually need.
   It constructs a Dictionary of header fields, of which we query the
   "Cookie" field, even though we merely want a ';'-separated string
   representation of the cookies in "key=value" form.

With this patch, we now take care of the string serialization ourselves,
using a StringBuilder as it is trivial to do. This also allows us to filter
out the httpOnly/invalid cookies as we do the serialization instead of
having a first pass to do so.

When scrolling the http://www.apple.com/iphone/ entire page down, then up,
se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
(~96ms) on my machine. With the patch, we spend ~23% less time in
cookiesForDOM() (~74ms).

No new tests, no behavior change.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):

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

6 years agoKill toRenderedDocumentMarker() by using tighter typing
cdumez@apple.com [Mon, 20 Oct 2014 05:17:06 +0000 (05:17 +0000)]
Kill toRenderedDocumentMarker() by using tighter typing
https://bugs.webkit.org/show_bug.cgi?id=137858

Reviewed by Darin Adler.

Source/WebCore:

Kill toRenderedDocumentMarker() by using tighter typing. This method
was doing no type validation, just a static_cast<>().

No new tests, no behavior change.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::markersFor):
(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
* dom/DocumentMarkerController.h:
* dom/RenderedDocumentMarker.h:
(WebCore::toRenderedDocumentMarker): Deleted.
* editing/AlternativeTextController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::copyMarkers):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::selectionStartHasMarkerFor):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerAt):
(WebCore::Internals::markerRangeForNode):
(WebCore::Internals::markerDescriptionForNode):
* testing/Internals.h:

Source/WebKit:

Update symbol export for Windows due to argument type change.

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

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

6 years agoUse is<>() / downcast<>() for all remaining RenderObject subclasses
cdumez@apple.com [Mon, 20 Oct 2014 03:42:03 +0000 (03:42 +0000)]
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845

Reviewed by Darin Adler.

Source/WebCore:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

No new tests, no behavior change.

* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::layoutCount):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* dom/Document.cpp:
(WebCore::widgetForElement):
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* editing/FrameSelection.cpp:
(WebCore::isFrameElement):
* html/HTMLEmbedElement.cpp:
(WebCore::findWidgetRenderer):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::renderWidget):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::widgetForEventTarget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
* rendering/RenderCombineText.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::setNeedsPositionedMovementLayout):
(WebCore::RenderElement::renderNamedFlowThreadWrapper):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::isRestartedPlugin):
(WebCore::isCompositedPlugin):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::layout):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
(WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
(WebCore::RenderObject::setLayerNeedsFullRepaint):
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::selectionRoot):
(WebCore::RenderObject::shouldUseTransformFromContainer):
(WebCore::RenderObject::getTransformFromContainer):
(WebCore::RenderObject::isRooted):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::isComposited):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderRuby.cpp:
(WebCore::lastRubyRun):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::rubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/RenderSlider.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore::writeLayers):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::isComposited):
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):

Source/WebKit/mac:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView pluginHostDied]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView _windowClipRect]):
(-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):

Source/WebKit2:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):

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

6 years agoUse SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
cdumez@apple.com [Mon, 20 Oct 2014 03:24:57 +0000 (03:24 +0000)]
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
https://bugs.webkit.org/show_bug.cgi?id=137854

Reviewed by Darin Adler.

Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
custom toRenderScrollbar() function, for consistency.

No new tests, no behavior change.

* rendering/RenderScrollbar.h:
(isType):
(WebCore::toRenderScrollbar): Deleted.
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::minimumThumbLength):
(WebCore::RenderScrollbarTheme::backButtonRect):
(WebCore::RenderScrollbarTheme::forwardButtonRect):
(WebCore::RenderScrollbarTheme::trackRect):
(WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
(WebCore::RenderScrollbarTheme::paintScrollbarBackground):
(WebCore::RenderScrollbarTheme::paintTrackBackground):
(WebCore::RenderScrollbarTheme::paintTrackPiece):
(WebCore::RenderScrollbarTheme::paintButton):
(WebCore::RenderScrollbarTheme::paintThumb):

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

6 years ago[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
carlosgc@webkit.org [Sun, 19 Oct 2014 07:33:19 +0000 (07:33 +0000)]
[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137422

Reviewed by Martin Robinson.

Source/WebCore:

Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.

* PlatformGTK.cmake:
* platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
* platform/gtk/ClipboardUtilitiesGtk.h: Removed.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed.
* platform/gtk/GtkDragAndDropHelper.h: Removed.

Source/WebKit2:

WebKitWebViewBase is currently the only user of
GtkDragAndDropHelper, that was added to share the code with
WebKit1. Move all the drag and drop logic to a new class
DragAndDropHandler.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::startDrag):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewBaseDragDataGet):
(webkitWebViewBaseDragEnd):
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
(webkitWebViewBaseDragLeave):
(webkitWebViewBaseDragDrop):
(webkitWebViewBaseDragAndDropHandler):
(dragExitedCallback): Deleted.
(webkitWebViewBaseStartDrag): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/DragAndDropHandler.cpp: Added.
(WebKit::DragAndDropHandler::create):
(WebKit::DragAndDropHandler::DragAndDropHandler):
(WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
(WebKit::dragOperationToGdkDragActions):
(WebKit::dragOperationToSingleGdkDragAction):
(WebKit::gdkDragActionToDragOperation):
(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::finishDrag):
(WebKit::DragAndDropHandler::dataObjectForDropData):
(WebKit::DragAndDropHandler::dragEntered):
(WebKit::DragAndDropHandler::requestDragData):
(WebKit::DragAndDropHandler::dragMotion):
(WebKit::DragAndDropHandler::dragLeave):
(WebKit::DragAndDropHandler::drop):
* UIProcess/gtk/DragAndDropHandler.h: Added.

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

6 years agoUnreviewed. Style fix following r174855.
roger_fong@apple.com [Sun, 19 Oct 2014 07:01:55 +0000 (07:01 +0000)]
Unreviewed. Style fix following r174855.

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):

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

6 years agoREGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
antti@apple.com [Sat, 18 Oct 2014 22:54:14 +0000 (22:54 +0000)]
REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
https://bugs.webkit.org/show_bug.cgi?id=137855

Reviewed by Dan Bernstein.

Source/WebCore:

We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
backchannel data that the synthesized response doesn't have.

Test: http/tests/mime/mime-type-sniff.html

* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):

    When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.

Tools:

Test and warn if the dumped response mime type differs from the platform response mime type.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReceiveResponseForResource):
(WTR::InjectedBundlePage::platformResponseMimeType):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::platformResponseMimeType):

LayoutTests:

* http/tests/mime/mime-type-sniff-expected.txt: Added.
* http/tests/mime/mime-type-sniff.html: Added.
* http/tests/mime/resources/png-with-text-content-type.cgi: Added.

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

6 years ago[WinCairo] Repaint issues with accelerated compositing.
commit-queue@webkit.org [Sat, 18 Oct 2014 21:48:33 +0000 (21:48 +0000)]
[WinCairo] Repaint issues with accelerated compositing.
https://bugs.webkit.org/show_bug.cgi?id=137850

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-18
Reviewed by Brent Fulgham.

There is sometimes missing content in accelerated compositing mode.
This is caused by not invalidating the non composited layer,
and not rendering when a flush did not complete.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::flushAndRenderLayers): Also render when flush did not complete.
(AcceleratedCompositingContext::setNeedsDisplayInRect): Deleted.
* WebCoreSupport/AcceleratedCompositingContext.h: Ditto.
* WebView.cpp:
(WebView::addToDirtyRegion): Invalidate non composited layer.
(WebView::flushPendingGraphicsLayerChanges): Flush layers.

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

6 years agoWorkQueue dispatches functions but isn’t a FunctionDispatcher
mitz@apple.com [Sat, 18 Oct 2014 19:04:31 +0000 (19:04 +0000)]
WorkQueue dispatches functions but isn’t a FunctionDispatcher
https://bugs.webkit.org/show_bug.cgi?id=137853

Reviewed by Anders Carlsson.

Source/WebKit2:

* Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.

Source/WTF:

* wtf/FunctionDispatcher.h: Added header guards.

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

6 years agoWeb Replay: code generator shouldn't complain about enums without a storage type...
burg@cs.washington.edu [Sat, 18 Oct 2014 18:13:05 +0000 (18:13 +0000)]
Web Replay: code generator shouldn't complain about enums without a storage type if they are in an enclosing scope
https://bugs.webkit.org/show_bug.cgi?id=137084

Reviewed by Joseph Pecoraro.

In order to generate encode/decode method declarations without pulling in lots of headers,
the generator must forward declare enums (for enum classes or enums with explicit sizes).

Change the generator to not require an explicit size if an enum is declared inside a struct
or class definition. In that case, it must pull in headers since scoped enums can't be
forward declared.

This patch also fixes some chained if-statements that should be if-else statements.

Test: updated replay/scripts/tests/generate-enum-encoding-helpers.json to cover the new case.

* replay/scripts/CodeGeneratorReplayInputs.py:
(InputsModel.parse_type_with_framework_name.is):
(InputsModel.parse_type_with_framework_name.is.must):
(Generator.generate_enum_trait_implementation):
(InputsModel.parse_type_with_framework_name): Deleted.
* replay/scripts/CodeGeneratorReplayInputsTemplates.py:
* replay/scripts/tests/expected/fail-on-c-style-enum-no-storage.json-error:
* replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
(JSC::EncodingTraits<WebCore::PlatformEvent::Type>::encodeValue):
(JSC::EncodingTraits<WebCore::PlatformEvent::Type>::decodeValue):
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::FormData1::Type>::decodeValue):
(JSC::EncodingTraits<PlatformEvent1::Type>::decodeValue):
* replay/scripts/tests/generate-enum-encoding-helpers.json: Added a new input to cover this case.

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

6 years ago[Mac] Use Fast enumeration consistently in WebFontCache.mm
cdumez@apple.com [Sat, 18 Oct 2014 17:05:24 +0000 (17:05 +0000)]
[Mac] Use Fast enumeration consistently in WebFontCache.mm
https://bugs.webkit.org/show_bug.cgi?id=137791

Reviewed by Darin Adler.

Use fast enumeration consistently in WebFontCache.mm as this results in
more efficient, concise and safer code.

No new tests, no behavior change.

* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
Reserve Vector capacity before the loop as we know how many traits we
are going to append. Also use uncheckedAppend() for performance.

(+[WebFontCache internalFontWithFamily:traits:weight:size:]):

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

6 years ago[GTK] Improve documentation of webkit_web_view_get_tls_info()
commit-queue@webkit.org [Sat, 18 Oct 2014 15:54:59 +0000 (15:54 +0000)]
[GTK] Improve documentation of webkit_web_view_get_tls_info()
https://bugs.webkit.org/show_bug.cgi?id=137852

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-10-18
Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebView.cpp:

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

6 years agoAX: Tables with <colgroups> are not reporting table column headers
cfleizach@apple.com [Sat, 18 Oct 2014 15:20:38 +0000 (15:20 +0000)]
AX: Tables with <colgroups> are not reporting table column headers
https://bugs.webkit.org/show_bug.cgi?id=137846

Reviewed by Mario Sanchez Prada.

Source/WebCore:

The code to search for header objects was getting stuck on anonymous RenderTableSections.
We also need to check more rows for headers, in case the first row or more is not visible or is empty.

Test: accessibility/table-column-headers-with-captions.html

* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::headerObjectForSection):

LayoutTests:

* accessibility/table-column-headers-with-captions-expected.txt: Added.
* accessibility/table-column-headers-with-captions.html: Added.

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

6 years ago[EFL] build break occurs on webkit efl build.
commit-queue@webkit.org [Sat, 18 Oct 2014 10:16:33 +0000 (10:16 +0000)]
[EFL] build break occurs on webkit efl build.
https://bugs.webkit.org/show_bug.cgi?id=137844

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2014-10-18
Reviewed by Gyuyoung Kim.

As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.

No new tests because it's just to fix build break.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):

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

6 years agoApply std::unique_ptr to FooFont classes
gyuyoung.kim@samsung.com [Sat, 18 Oct 2014 03:37:20 +0000 (03:37 +0000)]
Apply std::unique_ptr to FooFont classes
https://bugs.webkit.org/show_bug.cgi?id=137769

Reviewed by Andreas Kling.

As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.

No new tests, no behavior changes.

* platform/graphics/Font.cpp:
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::Font::createLayout):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::create):
* platform/graphics/SimpleFontData.h:
Remove create() factory function because public ctor and std::make_unique<> can replace it.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::Font::createLayout):

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

6 years agoUse std::unique_ptr in WebCore/bindings
gyuyoung.kim@samsung.com [Sat, 18 Oct 2014 03:35:37 +0000 (03:35 +0000)]
Use std::unique_ptr in WebCore/bindings
https://bugs.webkit.org/show_bug.cgi?id=137808

Reviewed by Andreas Kling.

Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
and WTF::move.

No new tests, no behavior changes.

* bindings/generic/ActiveDOMCallback.h:
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/SerializedScriptValue.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::interruptAndRunTask):
* bindings/js/WorkerScriptDebugServer.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):

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

6 years agoWeb Process crash when starting the web inspector after r174025.
mark.lam@apple.com [Sat, 18 Oct 2014 01:12:46 +0000 (01:12 +0000)]
Web Process crash when starting the web inspector after r174025.
<https://webkit.org/b/137340>

Reviewed by Filip Pizlo.

After r174025, we can generate a bad graph in the DFG fixup phase like so:

    102:<!0:-> StoreBarrier(Check:KnownCell:@19, ..., bc#44)
    60:<!0:->  PutStructure(Check:KnownCell:@19, ..., bc#44)
    103:<!0:-> Check(Check:NotCell:@54, ..., bc#44)
            // ^-- PutByOffset's StoreBarrier has been elided and replaced
            //     with a speculation check which can OSR exit.
    61:<!0:->  PutByOffset(Check:KnownCell:@19, ..., bc#44)

As a result, the structure change will get executed even if we end up OSR
exiting before the PutByOffset.  In the baseline JIT code, the structure now
erroneously tells the put operation that there is a value in that property
slot when it is actually uninitialized (hence, the crash).

The fix is to insert the Check at the earliest point possible:

1. If the checked node is in the same bytecode as the PutByOffset, then
   the earliest point where we can insert the Check is right after the
   checked node.

2. If the checked node is from a preceding bytecode (before the PutByOffset),
   then the earliest point where we can insert the Check is at the start
   of the current bytecode.

Also reverted the workaround from r174749: https://webkit.org/b/137758.

Benchmark results appear to be a wash on aggregate.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::indexOfNode):
(JSC::DFG::FixupPhase::indexOfFirstNodeOfExitOrigin):
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::insertCheck):
* dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::insertOutOfOrder):
(JSC::DFG::InsertionSet::insertOutOfOrderNode):

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

6 years agoCalling glReadPixels with BGRA format on an NVIDIA machine with an opaque context...
roger_fong@apple.com [Sat, 18 Oct 2014 00:25:08 +0000 (00:25 +0000)]
Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
https://bugs.webkit.org/show_bug.cgi?id=137793.
<rdar://problem/15408133>

Reviewed by Dean Jackson.

This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.

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

6 years agoUse is<>() / downcast<>() for all SVG RenderObjects
cdumez@apple.com [Sat, 18 Oct 2014 00:21:40 +0000 (00:21 +0000)]
Use is<>() / downcast<>() for all SVG RenderObjects
https://bugs.webkit.org/show_bug.cgi?id=137840

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
surrounding code.

No new tests, no behaviro change.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsPath):
(WebCore::AccessibilityRenderObject::elementPath):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::collectLayoutAttributes):
(WebCore::RenderSVGText::subtreeChildWillBeRemoved):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
(WebCore::SVGRenderSupport::pushMappingToContainer):
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::renderSVGText):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
(WebCore::SVGSVGElement::currentViewBoxRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):

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

6 years agoAvoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
cdumez@apple.com [Fri, 17 Oct 2014 23:59:11 +0000 (23:59 +0000)]
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
https://bugs.webkit.org/show_bug.cgi?id=137836

Reviewed by Andreas Kling.

Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
This function is only called from WidthIterator::applyFontTransforms(),
which already makes sure to call applyTransforms() if isSVGFont()
returns false. This patch replaces the check with a simple assertion.

No new tests, no behavior change.

* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.h:

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

6 years agoWeb Inspector: Add ESLint open source library to the inspector
jonowells@apple.com [Fri, 17 Oct 2014 23:50:49 +0000 (23:50 +0000)]
Web Inspector: Add ESLint open source library to the inspector
https://bugs.webkit.org/show_bug.cgi?id=137714

Reviewed by Joseph Pecoraro.

This adds back the eslint.js external library with a correction to Scripts/copy-user-interface-resources.pl
to prevent a build failure.

* Scripts/copy-user-interface-resources.pl: Added copy commands for ESLint.js.
* UserInterface/External/ESLint/LICENSE: Added.
* UserInterface/External/ESLint/eslint.js: Added.

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

6 years agoUpdate data/params after Bugzilla 4.2.11 upgrade
ddkilzer@apple.com [Fri, 17 Oct 2014 23:26:12 +0000 (23:26 +0000)]
Update data/params after Bugzilla 4.2.11 upgrade

* data/params:
(default_search_limit): Bump up the default search limit from
500 to 1000 because Timothy Horton asked nicely.
(maxattachmentsize): Make it an even 20 MB.
(maxlocalattachment): Bump up total amount of local attachments
stored on disk from 10 MB to 1 GB.
(smtp_debug): Let Bugzilla have its way with the config file.
(smtpserver): Fixed to use the correct mail server.
(sslbase): Fix test value that I checked in when I was testing
the update.  This caused bug mail to be sent with a URL of
bugs-test.webkit.org instead of bugs.webkit.org until around
11:45 AM PDT on Thursday, October 16, 2014.
(urlbase): Ditto.

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

6 years agoPrevent access to the /lib/ directory
ddkilzer@apple.com [Fri, 17 Oct 2014 23:20:47 +0000 (23:20 +0000)]
Prevent access to the /lib/ directory

* .htaccess: Block access to the lib directory.  This may be
removed once updated Perl modules are installed on the system.

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

6 years agoAdd lib directory to mod_perl search path
ddkilzer@apple.com [Fri, 17 Oct 2014 23:19:32 +0000 (23:19 +0000)]
Add lib directory to mod_perl search path

mod_perl.pl:  Add lib directory to mod_perl search path.  I
accidentally installed updated Perl modules under the Bugzilla
root directory instead of in the system, so this path needed to
be added to make sure up-to-date modules were used.  It may be
removed once Perl modules are updated on the system.

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

6 years agoDisable database handle statement caching to fix Internal Server Errors
ddkilzer@apple.com [Fri, 17 Oct 2014 23:15:51 +0000 (23:15 +0000)]
Disable database handle statement caching to fix Internal Server Errors

* Bugzilla/User.pm:
(Bugzilla::User::visible_bugs): Disable database handle
statement caching.  Apparently these statements would go bad
without the DBD module noticing, causing errors on numerous
pages.

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

6 years agoDon't create cached functions that access lexicalGlobalObject()
msaboff@apple.com [Fri, 17 Oct 2014 22:58:33 +0000 (22:58 +0000)]
Don't create cached functions that access lexicalGlobalObject()
https://bugs.webkit.org/show_bug.cgi?id=137839

Reviewed by Geoffrey Garen.

Source/WebCore:

Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
are always created as needed for every prototype.  Made it so that JSHTMLDocument does
the same for open().  Updated test to account for these methods not being cached

Updated tests accordingly.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
special functions.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
it is first accessed.
* html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.

LayoutTests:

Updadted test that check for

* fast/dom/wrapper-scope-expected.txt:
* fast/dom/wrapper-scope.html:
Removed "close" and "postMessage" from functions to check for wrapper scope.

* http/tests/security/cross-frame-access-put-expected.txt:
* http/tests/security/resources/cross-frame-iframe-for-put-test.html:
Removed "blur", "close" and "focus" from the functions to test, since this tests that
a parent's and child window's instances are the same.  Now they are always different.

* js/dom/global-function-resolve-expected.txt:
* js/dom/script-tests/global-function-resolve.js:
Removed "close" from this lists of functions to check.

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

6 years ago[iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinate...
simon.fraser@apple.com [Fri, 17 Oct 2014 22:30:43 +0000 (22:30 +0000)]
[iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
https://bugs.webkit.org/show_bug.cgi?id=137837
rdar://problem/18545452

Reviewed by Tim Horton.

Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
and a null check.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):

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

6 years agoRemove run-inspector-perf-tests.py there is no PerformanceTests/inspector anymore
commit-queue@webkit.org [Fri, 17 Oct 2014 22:28:53 +0000 (22:28 +0000)]
Remove run-inspector-perf-tests.py there is no PerformanceTests/inspector anymore
https://bugs.webkit.org/show_bug.cgi?id=137835

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-17
Reviewed by Andreas Kling.

* Scripts/run-inspector-perf-tests.py: Removed.
This script is stale, as PerformanceTests/inspector no longer exists.

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

6 years agoFix typo: should be ios-simulator-wk2, not ios-simulator_wk2.
simon.fraser@apple.com [Fri, 17 Oct 2014 22:12:57 +0000 (22:12 +0000)]
Fix typo: should be ios-simulator-wk2, not ios-simulator_wk2.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_baseline_search_path):

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

6 years agoRe-arrange parentheses for compilation purposes.
akling@apple.com [Fri, 17 Oct 2014 22:10:48 +0000 (22:10 +0000)]
Re-arrange parentheses for compilation purposes.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):

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

6 years agoUnreviewed build fix after r174838.
akling@apple.com [Fri, 17 Oct 2014 22:05:38 +0000 (22:05 +0000)]
Unreviewed build fix after r174838.

Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):

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

6 years agoBuild fix for 32-bit Yosemite
timothy_horton@apple.com [Fri, 17 Oct 2014 21:52:39 +0000 (21:52 +0000)]
Build fix for 32-bit Yosemite

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::contextMenuForEvent):
Avoid using NSItemProvider in 32-bit, because it doesn't exist.

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

6 years agoUse is<>() / downcast<>() for RenderBox
cdumez@apple.com [Fri, 17 Oct 2014 21:25:10 +0000 (21:25 +0000)]
Use is<>() / downcast<>() for RenderBox
https://bugs.webkit.org/show_bug.cgi?id=137804

Reviewed by Andreas Kling.

Use is<>() / downcast<>() for RenderBox and clean up the surrounding
code.

Source/WebCore:

No new tests, no behavior change.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
(WebCore::AccessibilityRenderObject::scrollTo):
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement scrollYOffset]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode borderRadii]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::sizingBox):
(WebCore::computedTransform):
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Element.cpp:
(WebCore::Element::scrollByUnits):
* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):
* dom/Position.cpp:
(WebCore::endsOfNodeAreVisuallyDistinctPositions):
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
* editing/TextIterator.cpp:
(WebCore::fullyClipsContents):
(WebCore::shouldEmitExtraNewlineForNode):
* editing/htmlediting.cpp:
(WebCore::absoluteBoundsForLocalCaretRect):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isFocusable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateAutoscrollRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::startPanScrolling):
* page/FrameView.cpp:
(WebCore::FrameView::embeddedContentBox):
* page/GestureTapHighlighter.cpp:
* page/SpatialNavigation.cpp:
(WebCore::isScrollableNode):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::baselinePosition):
* plugins/PluginView.cpp:
(WebCore::PluginView::invalidateWindowlessPluginRect):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::adjustPosition):
* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::deleteLine):
(WebCore::InlineElementBox::extractLine):
(WebCore::InlineElementBox::attachLine):
(WebCore::InlineElementBox::paint):
(WebCore::InlineElementBox::nodeAtPoint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addReplacedChildOverflow):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::findAutoscrollable):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::previousSiblingBox):
(WebCore::RenderBox::nextSiblingBox):
(WebCore::RenderBox::parentBox):
(WebCore::RenderBox::firstChildBox):
(WebCore::RenderBox::lastChildBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::findLegend):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::currentActiveRenderBox):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layoutShadowControls):
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::addFocusRingRects):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::perspectiveTransform):
(WebCore::RenderLayer::perspectiveOrigin):
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::scrollsOverflow):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBoxForPainting):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
(WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
(WebCore::isValidColumnSpanner):
(WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::pushMappingToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::addAnnotatedRegions):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::baselinePosition):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::baselinePosition):
(WebCore::centerRectVerticallyInParentInputElement):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::baselinePosition):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::baselinePosition):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::externalRepresentation):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::setLineBreakInfo):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleReplaced):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::embeddedContentBox):

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::clientFloatRectForNode):
* WebView/WebFrame.mm:
(-[WebFrame renderedSizeOfNode:constrainedToWidth:]):

Source/WebKit/win:

* WebView.cpp:
(WebView::gestureNotify):

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
(WebKit::WebPage::plugInIsPrimarySize):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

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

6 years agoGet rid of wrapperContext() in DOM bindings.
akling@apple.com [Fri, 17 Oct 2014 21:24:11 +0000 (21:24 +0000)]
Get rid of wrapperContext() in DOM bindings.
<https://webkit.org/b/137834>

Reviewed by Chris Dumez.

The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
already, we don't need a separate mechanism to get at the context.

The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)

* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::wrapperContext): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):

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

6 years agoMake a better use of the available registers when compiling nested selector lists
benjamin@webkit.org [Fri, 17 Oct 2014 21:21:00 +0000 (21:21 +0000)]
Make a better use of the available registers when compiling nested selector lists
https://bugs.webkit.org/show_bug.cgi?id=137802

Reviewed by Andreas Kling.

Source/WebCore:

Previously, when compiling a nested selector list, the compiler would start by pushing all
the allocated registers to the stack to free them for the compiled selector list.
While neat to ensure register allocation is correct, this is very inefficient.

This patch brings the first step for reducing the overhead. Instead of pushing everything
to the stack, we just push as many registers as we need for compiling the selector list.

In most cases, we have so many registers that we don't even need to push anything to the stack.

Test: fast/selectors/nth-child-of-register-requirement.html

* cssjit/SelectorCompiler.cpp:
Add an explicit type for SelectorList to keep information aggregated from all
SelectorFragmentList inside it.

SelectorFragmentList is also extended to include its register and stack requirements.
This information is then used to create a SelectorList and to compile the SelectorFragmentList.

(WebCore::SelectorCompiler::hasAnyCombinators):
We only change the elementAddressRegister when moving over combinators. This is used to detect
if a selector list clobber the elementAddressRegister or leave it untouched.

(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
This is where the fun happen.
First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.

Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
to the stack and give them back to the register allocator.

With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
of SelectorCompiler and it is quite a bit more efficient in the common cases.

Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
because in the vast majority of cases it is 1 or 2 pop.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):

LayoutTests:

The register pressure cases are already well covered by fast/selectors/nth-child-of-boundaries-*.
The new test covers the maximum register pressure inside :nth-child(of) and having the selector with
max pressure inside a selector list instead of being alone/first.

* fast/selectors/nth-child-of-register-requirement-expected.txt: Added.
* fast/selectors/nth-child-of-register-requirement.html: Added.

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

6 years agoFix the build with the public SDK.
timothy_horton@apple.com [Fri, 17 Oct 2014 21:12:46 +0000 (21:12 +0000)]
Fix the build with the public SDK.

* WebCoreSupport/WebSelectionServiceController.mm:
We should transition all this SPI to real SPI headers as soon as possible.

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

6 years agoUse is<>() / downcast<>() for StyleImage
cdumez@apple.com [Fri, 17 Oct 2014 21:12:42 +0000 (21:12 +0000)]
Use is<>() / downcast<>() for StyleImage
https://bugs.webkit.org/show_bug.cgi?id=137824

Reviewed by Andreas Kling.

Use is<>() / downcast<>() for StyleImage and clean up the surrouding
code.

No new tests, no behavior change.

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::detachPendingImage):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedImageURL):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::detachPendingImage):
(WebCore::CSSImageSetValue::~CSSImageSetValue):
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::detachPendingImage):
(WebCore::CSSImageValue::cachedImage):
(WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage):
(WebCore::StyleResolver::loadPendingImages):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:

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

6 years ago[iOS] Simplify test fallback paths for iOS Simulator testing
simon.fraser@apple.com [Fri, 17 Oct 2014 21:06:21 +0000 (21:06 +0000)]
[iOS] Simplify test fallback paths for iOS Simulator testing
https://bugs.webkit.org/show_bug.cgi?id=137830

Reviewed by Zalan Bujtas.

Make the fallback paths be:
    ios-simulator -> generic
    ios-simulator-wk2->ios-simulator -> generic

so don't include mac in the fallback path. Also remove the
version handling for simplicity.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort):
(IOSSimulatorPort.default_baseline_search_path):

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

6 years agoFix typos in Dashboard config
dburkart@apple.com [Fri, 17 Oct 2014 21:03:40 +0000 (21:03 +0000)]
Fix typos in Dashboard config

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

6 years ago[Win] Unreviewed test gardening. Mark some tests as passing that have benefitted...
bfulgham@apple.com [Fri, 17 Oct 2014 20:51:51 +0000 (20:51 +0000)]
[Win] Unreviewed test gardening. Mark some tests as passing that have benefitted from recent bug fixes.

* platform/win/TestExpectations:

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

6 years ago[Media] Always update controls for <audio> since they are always visible
dino@apple.com [Fri, 17 Oct 2014 20:35:06 +0000 (20:35 +0000)]
[Media] Always update controls for <audio> since they are always visible
https://bugs.webkit.org/show_bug.cgi?id=137829
<rdar://problem/18693987>

Reviewed by Brent Fulgham.

Revision 174756 made a change to only update the display of the controls
while they are visible. However, <audio> elements didn't detect visibility
the same way, since their controls do not auto-hide.

Change controlsAreHidden to check if we're an audio element.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.

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

6 years ago[Win] Allow WinLauncher to specify Custom User Agent strings
bfulgham@apple.com [Fri, 17 Oct 2014 20:02:17 +0000 (20:02 +0000)]
[Win] Allow WinLauncher to specify Custom User Agent strings
https://bugs.webkit.org/show_bug.cgi?id=137828

Reviewed by Dean Jackson.

* WinLauncher/Common.cpp: Add support for custom user agent strings.
* WinLauncher/WinLauncher.cpp: Add some convenience methods to get
and set the user agent strings.
* WinLauncher/WinLauncher.h:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc: Add new menu
resources and dialog for setting custom User Agent strings.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h:

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

6 years ago[WinCairo] Accelerated compositing is not implemented.
commit-queue@webkit.org [Fri, 17 Oct 2014 19:50:09 +0000 (19:50 +0000)]
[WinCairo] Accelerated compositing is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=137345

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-17
Reviewed by Brent Fulgham.

This patch is based on GTK, and the texture mapper graphics layer type.

Source/WebCore:

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
(WebCore::GraphicsLayerTextureMapper::startedAnimation):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
Otherwise glLinkProgram() will fail, and nothing will be rendered.

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKit.vcxproj: Added new accelerated compositing source files.
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Ditto.

Source/WebKit/win:

* WebCoreSupport/AcceleratedCompositingContext.cpp: Added.
(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::getWebViewSize):
(WebKit::AcceleratedCompositingContext::initialize):
(WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::stopAnyPendingLayerFlush):
(WebKit::AcceleratedCompositingContext::enabled):
(WebKit::AcceleratedCompositingContext::prepareForRendering):
(WebKit::AcceleratedCompositingContext::startedAnimation):
(WebKit::AcceleratedCompositingContext::compositeLayersToContext):
(WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
(WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
(WebKit::AcceleratedCompositingContext::setNeedsDisplayInRect):
(WebKit::AcceleratedCompositingContext::resizeRootLayer):
(WebKit::AcceleratedCompositingContext::scrollNonCompositedContents):
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChangesSoon):
(WebKit::AcceleratedCompositingContext::flushAndRenderLayers):
(WebKit::AcceleratedCompositingContext::layerFlushTimerFired):
(WebKit::AcceleratedCompositingContext::notifyAnimationStarted):
(WebKit::AcceleratedCompositingContext::notifyFlushRequired):
(WebKit::AcceleratedCompositingContext::paintContents):
* WebCoreSupport/AcceleratedCompositingContext.h: Added.
(WebKit::AcceleratedCompositingContext::LayerFlushTimer::LayerFlushTimer):
(WebKit::AcceleratedCompositingContext::LayerFlushTimer::fired):
* WebView.cpp:
(WebView::WebView):
(WebView::addToDirtyRegion):
(WebView::scrollBackingStore):
(WebView::sizeChanged):
(WebView::paint):
(WebView::setRootChildLayer):
(WebView::flushPendingGraphicsLayerChangesSoon):
(WebView::setAcceleratedCompositing):
* WebView.h:

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

6 years agoAdd test for innerHTML mutations that yield identical DOM.
akling@apple.com [Fri, 17 Oct 2014 19:16:51 +0000 (19:16 +0000)]
Add test for innerHTML mutations that yield identical DOM.
<https://webkit.org/b/137823>

Reviewed by Chris Dumez.

I made this test while working on an optimization, and it seems useful
to have in the tree since it adds additional coverage. The optimization
may come later.

The test works by creating little DOM subtrees like so:

    <foo><bar>some text</bar></foo>

It then overwrites that subtree with an identical one by mutating the
containing element's innerHTML property. It then verifies that the DOM
structure is correct and that Node wrappers retain any custom properties
set on them.

* fast/innerHTML/identical-mutations-expected.txt: Added.
* fast/innerHTML/identical-mutations.html: Added.

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

6 years ago[iOS] Crash when load is canceled while waiting for the user to type HTTP authenticat...
ap@apple.com [Fri, 17 Oct 2014 18:49:02 +0000 (18:49 +0000)]
[iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
https://bugs.webkit.org/show_bug.cgi?id=137826
rdar://problem/17329599

Reviewed by Brady Eidson.

No new tests, as we don't have a way to simulate details of user interaction with
an auth dialog.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
(WebCore::ResourceHandle::receivedChallengeRejection):
Added null checks before passing m_connection for CFNetwork functions, making this
match what Mac code does when sending a message to a nil receiver.

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

6 years agoFix the iOS build.
simon.fraser@apple.com [Fri, 17 Oct 2014 17:41:27 +0000 (17:41 +0000)]
Fix the iOS build.

* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):

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

6 years ago[iOS] Turn off font autosizing for iOS WebKitTestRunner
simon.fraser@apple.com [Fri, 17 Oct 2014 17:30:54 +0000 (17:30 +0000)]
[iOS] Turn off font autosizing for iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=137806

Reviewed by Sam Weinig.
Source/WebKit2:

Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
to disable font autosizing.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMinimumZoomFontSize):
(WKPreferencesGetMinimumZoomFontSize):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Tools:

Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
to disable font autosizing.

Add platformResetPreferencesToConsistentValues() and implement it in the iOS
test controller to set platform-specific prefs.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::platformResetPreferencesToConsistentValues):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):

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

6 years ago[Mac] Represent AVMediaSelectionOptions as AudioTracks
jer.noble@apple.com [Fri, 17 Oct 2014 16:40:14 +0000 (16:40 +0000)]
[Mac] Represent AVMediaSelectionOptions as AudioTracks
https://bugs.webkit.org/show_bug.cgi?id=137474

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/media/hls/hls-audio-tracks.html

Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
as entries in the video's AudioTrackList.

AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
inconsistent. Because setting the selected option multiple times in the same run-loop can
cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
the actual selection in the next run-loop.

* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
(WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
(WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
(WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
(WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
(WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
(WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
(WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
(WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
(WebCore::MediaSelectionGroupAVFObjC::create):
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
(WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.

Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
MediaSelectionOptionAVFObjC objects.

* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
(WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
(WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
(WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.

Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
a MediaSelectionOptionAVFObjC.

* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
(WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
(WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
(WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:

Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
use the index of the track or option instead of it's self-declared ID for ordering for the
trackIndex.

* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):

Rather than making allowing the AVPlayerItem to automatically select the "best"
AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
and thereafter allow the users manual selections "stick".

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):

Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
    AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.

Add new files to project.
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

* http/tests/media/hls/hls-audio-tracks-expected.txt: Added.
* http/tests/media/hls/hls-audio-tracks.html: Added.
* http/tests/media/resources/hls/audio-tracks.m3u8: Added.
* http/tests/media/resources/hls/bipbop/iframe_index.m3u8: Added.
* http/tests/media/resources/hls/bipbop/main0.ts: Added.
* http/tests/media/resources/hls/bipbop/main1.ts: Added.
* http/tests/media/resources/hls/bipbop/prog_index.m3u8: Added.
* http/tests/media/resources/hls/french/main.aac: Added.
* http/tests/media/resources/hls/french/prog_index.m3u8: Added.
* http/tests/media/resources/hls/spanish/main.aac: Added.
* http/tests/media/resources/hls/spanish/prog_index.m3u8: Added.

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

6 years ago[Win] Test gardening after r174796.
bfulgham@apple.com [Fri, 17 Oct 2014 16:13:55 +0000 (16:13 +0000)]
[Win] Test gardening after r174796.

Now that Windows DRT matches Mac's output, we can get rid of some custom test expecations.

* platform/win/fast/dom/window-load-crash-expected.txt: Removed.
* platform/win/fast/images/crossfade-client-not-removed-crash-expected.txt: Removed.
* platform/win/fast/ruby/before-block-doesnt-crash-expected.txt: Removed.
* platform/win/fast/ruby/before-table-doesnt-crash-expected.txt: Removed.
* platform/win/fast/ruby/generated-before-counter-doesnt-crash-expected.txt: Removed.
* platform/win/loader/image-loader-adoptNode-assert-expected.txt: Removed.

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

6 years agoVarious arguments optimisations in codegen fail to account for arguments being in...
oliver@apple.com [Fri, 17 Oct 2014 16:07:08 +0000 (16:07 +0000)]
Various arguments optimisations in codegen fail to account for arguments being in lexical record
https://bugs.webkit.org/show_bug.cgi?id=137617

Reviewed by Michael Saboff.

Rework the way we track |arguments| references so that we don't try
to use the |arguments| reference on the stack if it's not safe.

To do this without nuking performance it was necessary to update
the parser to track modification of the |arguments| reference
itself.

* bytecode/CodeBlock.cpp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::willResolveToArguments):
(JSC::BytecodeGenerator::uncheckedLocalArgumentsRegister):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::uncheckedRegisterForArguments): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::hasSafeLocalArgumentsRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::getArgumentByVal):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::ArrayPatternNode::emitDirectBinding):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::existingArguments):
* parser/Nodes.h:
(JSC::ScopeNode::modifiesArguments):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
* parser/Parser.h:
(JSC::Scope::getCapturedVariables):
* parser/ParserModes.h:

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

6 years ago[EFL] REGRESSION(r173929): It broke the Web Inspector
gyuyoung.kim@samsung.com [Fri, 17 Oct 2014 10:51:08 +0000 (10:51 +0000)]
[EFL] REGRESSION(r173929): It broke the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=137522

Reviewed by Csaba Osztrogonác.

r173929 let web inspector use a separate web process. Besides it changed that the inspector is shown
as docking mode by default. However EFL port doesn't support to show web inspector as docking window yet.
This patch is to show web inspector on EFL new window as before. Docking mode should be implemented by
upcoming patch.

* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformAttach):

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

6 years ago[EFL] window.screen.width returns wrong value if more displays are available
g.czajkowski@samsung.com [Fri, 17 Oct 2014 10:43:54 +0000 (10:43 +0000)]
[EFL] window.screen.width returns wrong value if more displays are available
https://bugs.webkit.org/show_bug.cgi?id=137778

Reviewed by Gyuyoung Kim.

ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
having two displays of 1680x1050, it will return 3360x1050.

Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.

No new tests. Hardware specific bug including multiple displays.

* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenRect):
Use ecore's xrandr to determine the screen on which browser window is displayed.

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

6 years ago[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
carlosgc@webkit.org [Fri, 17 Oct 2014 10:10:47 +0000 (10:10 +0000)]
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782

Reviewed by Sergio Villar Senin.

Source/WebCore:

* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval): Use microseconds instead of
milliseconds.

Source/WebKit2:

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds
instead of milliseconds.

Source/WTF:

In some cases when we have a double with the time in seconds, the
conversion to milliseconds ends up truncating the value to 0, and
the source scheduled immediately.

* wtf/gobject/GMainLoopSource.cpp:
(WTF::createMicrosecondsTimeoutSource): Use a custom timeout
source that handles the interval in microseconds instead of milliseconds.
(WTF::GMainLoopSource::scheduleAfterDelay): Use MicrosecondsTimeoutSource.
(WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Ditto.
* wtf/gobject/GMainLoopSource.h:

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

6 years ago[GTK] Move touch events handling from Platform to WebKit2
carlosgc@webkit.org [Fri, 17 Oct 2014 10:04:37 +0000 (10:04 +0000)]
[GTK] Move touch events handling from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137735

Reviewed by Sergio Villar Senin.

Source/WebCore:

Remove GtkTouchContextHelper.

* PlatformGTK.cmake:
* platform/gtk/GtkTouchContextHelper.cpp: Removed.
* platform/gtk/GtkTouchContextHelper.h: Removed.

Source/WebKit2:

GtkTouchContextHelper was only used by WebKitWebViewBase, since
it's the only one that can create touch events. The code has been
simplified by processing the events in the view, and the native
touch events are now created with the native event and touch points.

* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::touchContext): Deleted.
* Shared/gtk/NativeWebTouchEventGtk.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Pass touch
points instead of touch context to WebEventFactory::createWebTouchEvent().
* Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent): Create the
WebTouchEvent for the given native event and points.
(WebKit::touchPhaseFromEvents): Deleted.
(WebKit::appendTouchEvent): Deleted.
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(appendTouchEvent): Helper function to create a
WebPlatformTouchPoint for the given native event and add it to the
list of touch points.
(webkitWebViewBaseGetTouchPointForEvent): Build the touch point
list for the event.
(webkitWebViewBaseTouchEvent): Process the touch event.
(webkitWebViewBaseDragDataReceived): Deleted.

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

6 years agoRemove unused function in WorkerThreadableLoader.h
gyuyoung.kim@samsung.com [Fri, 17 Oct 2014 10:00:09 +0000 (10:00 +0000)]
Remove unused function in WorkerThreadableLoader.h
https://bugs.webkit.org/show_bug.cgi?id=137811

Reviewed by Csaba Osztrogonác.

mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.

* loader/WorkerThreadableLoader.h:

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

6 years agoUse WTF::move() instead of std::move() to help ensure move semantics in JavaScriptCore
gyuyoung.kim@samsung.com [Fri, 17 Oct 2014 09:54:14 +0000 (09:54 +0000)]
Use WTF::move() instead of std::move() to help ensure move semantics in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137809

Reviewed by Csaba Osztrogonác.

Substitution of WTF::move() for std::move(). Clean up std::move() in JavaScriptCore.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeForStubInfo):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):
* bytecode/PutByIdVariant.cpp:
(JSC::PutByIdVariant::setter):

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

6 years agoReverted incorrect build fix attempt.
mitz@apple.com [Fri, 17 Oct 2014 08:27:56 +0000 (08:27 +0000)]
Reverted incorrect build fix attempt.

* wtf/Threading.cpp:

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

6 years agoTried to fix the Yosemite build.
mitz@apple.com [Fri, 17 Oct 2014 08:23:24 +0000 (08:23 +0000)]
Tried to fix the Yosemite build.

* wtf/Threading.cpp:

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