WebKit-https.git
7 years agoBlind Windows build fix.
akling@apple.com [Mon, 3 Mar 2014 05:33:05 +0000 (05:33 +0000)]
Blind Windows build fix.

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

    Tweak JSDOMWindowBase::commonVM() return type to be a reference.

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

7 years agoJSDOMWindow::commonVM() should return a reference.
akling@apple.com [Mon, 3 Mar 2014 05:10:15 +0000 (05:10 +0000)]
JSDOMWindow::commonVM() should return a reference.
<https://webkit.org/b/129293>

Source/JavaScriptCore:

Added a DropAllLocks constructor that takes VM& without null checks.

Reviewed by Geoff Garen.

Source/WebCore:

Since this function always returns a VM and never null, make it
return a reference instead. There are more VM getters that never
return null, but I tried to keep the patch from snowballing.

Reviewed by Geoff Garen.

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

7 years agoRemove ASSERT in ~IDBRequest since it is firing during legitimate uses in Web Inspector.
timothy@apple.com [Mon, 3 Mar 2014 04:49:38 +0000 (04:49 +0000)]
Remove ASSERT in ~IDBRequest since it is firing during legitimate uses in Web Inspector.

Adding the ASSERT back is tracked by https://webkit.org/b/129593.

https://bugs.webkit.org/show_bug.cgi?id=129328

Reviewed by Sam Weinig.

Source/WebCore:

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::~IDBRequest):

LayoutTests:

* TestExpectations: Remove skipped tests.
* inspector-protocol/model/probe-manager-add-remove-actions-expected.txt: Rebaselined.

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

7 years agoWeb Inspector model tests load wrong inspector page under WebKitTestRunner
bburg@apple.com [Mon, 3 Mar 2014 03:42:43 +0000 (03:42 +0000)]
Web Inspector model tests load wrong inspector page under WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=129460

Reviewed by Dan Bernstein.

Tools:

Don't unconditionally open the inspector before running an inspector test.
Instead, the test should request that the inspector open when it's ready.

This change was lost during a rebase, but is the same change made to
DumpRenderTree.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):

LayoutTests:

Stop skipping inspector/test-harness-trivially-works.html.

* platform/wk2/TestExpectations:

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

7 years agoUnreviewed, rolling out r164961.
commit-queue@webkit.org [Mon, 3 Mar 2014 03:24:58 +0000 (03:24 +0000)]
Unreviewed, rolling out r164961.
http://trac.webkit.org/changeset/164961
https://bugs.webkit.org/show_bug.cgi?id=129596

Caused many assertion failures (Requested by ap on #webkit).

* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):

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

7 years agoStreamline use of TextIterator, cutting down includes and use of soon-to-be-deleted...
darin@apple.com [Mon, 3 Mar 2014 02:30:37 +0000 (02:30 +0000)]
Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
https://bugs.webkit.org/show_bug.cgi?id=129592

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in: Re-sorted this file. Not sure how it got unsorted.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::stringForVisiblePositionRange): Call TextIterator::text
instead of TextIterator::length. Also removed unneeded special case for empty string
and exception code.
(WebCore::AccessibilityObject::lengthForVisiblePositionRange): Ditto.

* accessibility/AccessibilityObject.h: Include TextIteratorBehavior.h instead of
TextIterator.h.

* accessibility/AccessibilityRenderObject.cpp: Include TextIterator.h.

* accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Removed unneeded
TextIterator.h include.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Call
TextIterator::text instead of TextIterator::length.

* dom/Element.cpp: Include TextIterator.h.

* dom/Node.cpp: Include Range.h.

* dom/Position.cpp:
(WebCore::Position::isCandidate): Cast to RenderBlockFlow since that's what the
type check above does. Use a return statement instead of an else for better flow.
(WebCore::Position::leadingWhitespacePosition): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
(WebCore::Position::trailingWhitespacePosition): Ditto.

* dom/Range.cpp:
(WebCore::Range::firstNode): Added a FIXME about code that clearly does not
belong. This is something we really need to fix.

* editing/AlternativeTextController.cpp: Include TextIterator.h.
* editing/ApplyStyleCommand.cpp: Ditto.

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/Editor.h: Include TextIteratorBehavior.h instead of TextIterator.h.

* editing/HTMLInterchange.cpp:
(WebCore::convertHTMLTextToInterchangeFormat): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/SpellingCorrectionCommand.cpp: Include TextIterator.h.

* editing/TextIterator.h: Moved isCollapsibleWhitespace from here into
htmlediting.h and renamed it deprecatedIsCollapsibleWhitespace.

* editing/TextIterator.cpp: Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/TypingCommand.cpp: Include TextIterator.h.

* editing/VisibleUnits.cpp:
(WebCore::previousBoundary): Call TextIterator::text instead of
TextIterator::length.
(WebCore::nextBoundary): Ditto.

* editing/htmlediting.cpp: Include TextIterator.h.

* editing/htmlediting.h: Removed non-helpful section comments.
Added FIXME about isWhitespace. Added deprecatedIsCollapsibleWhitespace,
formerly not deprecated and in TextIterator.h.

* editing/markup.cpp: Include TextIterator.h.

* html/HTMLTextAreaElement.cpp: Include TextIterator.h.

* page/ContextMenuController.cpp:
(WebCore::selectionContainsPossibleWord): Call TextIterator::text
instead of TextIterator::length and TextIterator::characterAt.

* page/EventHandler.cpp: Sorted conditional includes alphabetically by condition.

* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]): Call TextIterator::text
instead of TextIterator::length.

Source/WebKit/win:

* WebCoreSupport/WebEditorClient.cpp: Added now-needed include.

Source/WebKit2:

* UIProcess/WebPageProxy.cpp: Added now-needed include.
* WebProcess/WebPage/WebPage.cpp: Ditto.

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

7 years ago[iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
enrica@apple.com [Mon, 3 Mar 2014 02:07:25 +0000 (02:07 +0000)]
[iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
https://bugs.webkit.org/show_bug.cgi?id=129594
<rdar://problem/16168978>

Reviewed by Sam Weinig.

As a temporary fix, we are using a synchronous
message to accept autocorrection until we implement
a solution that processes these requests on a thread that
is not the main thread.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applyAutocorrection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applyAutocorrection):
(WebKit::WebPage::syncApplyAutocorrection):

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

7 years ago[EFL] Remove m_initEfl from RunLoop.
ljaehun.lim@samsung.com [Mon, 3 Mar 2014 02:00:46 +0000 (02:00 +0000)]
[EFL] Remove m_initEfl from RunLoop.
https://bugs.webkit.org/show_bug.cgi?id=129568

Reviewed by Gyuyoung Kim.

We don't use m_initEfl except RunLoop constructor.

* wtf/RunLoop.h:
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::RunLoop):

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

7 years agoAdd a fallback path for compiling the remaining attribute checkers
benjamin@webkit.org [Mon, 3 Mar 2014 01:48:20 +0000 (01:48 +0000)]
Add a fallback path for compiling the remaining attribute checkers
https://bugs.webkit.org/show_bug.cgi?id=129580

Reviewed by Darin Adler.

The remaining attribute checkers appear to be less common than the simple value match.
This patch adds them to SelectorCompiler for completeness but no attempt is made at optimizing them,
they all default to function calls.

If the assumption that those selectors are not common turn out to be incorrect, we should see
the function calls in profiles and optimize them as needed.

* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
If we get anything but attribute match here, something has gone horribly wrong. Update the code
to fail if that were to happen.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
Add the missing match type to the selector fragment.

Begin, End, Contain cannot match an empty value per specification. We can test that at compile time
and fail immediately. See http://www.w3.org/TR/css3-selectors/#attribute-substrings

List has the extra requirement that a value containing a space does not match anything. It also cannot
match with an empty string. See http://www.w3.org/TR/css3-selectors/#attribute-representation

(WebCore::SelectorCompiler::attributeValueBeginsWith):
(WebCore::SelectorCompiler::attributeValueContains):
(WebCore::SelectorCompiler::attributeValueEndsWith):
(WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
The slow fallbacks.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
A generic code generator making function call to match an attribute value.

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

7 years agoFix build for case-sensitive file systems.
darin@apple.com [Mon, 3 Mar 2014 01:37:46 +0000 (01:37 +0000)]
Fix build for case-sensitive file systems.

* platform/UserActivity.h: Runloop -> RunLoop.

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

7 years agoHysteresisTimer should use WebCore::Timer
barraclough@apple.com [Mon, 3 Mar 2014 01:24:32 +0000 (01:24 +0000)]
HysteresisTimer should use WebCore::Timer
https://bugs.webkit.org/show_bug.cgi?id=129587

Reviewed by Sam Weinig.

* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::hysteresisTimerFired):
    - RunLoop::Timer -> WebCore::Timer.
* platform/UserActivity.h:

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

7 years agoTry to fix the 32-bit build.
mitz@apple.com [Mon, 3 Mar 2014 01:16:59 +0000 (01:16 +0000)]
Try to fix the 32-bit build.

* UIProcess/ios/forms/WKFormSelectPopover.mm:
(adjustedFontSize):

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

7 years agoSplit TextIteratorBehavior into a separate header
darin@apple.com [Mon, 3 Mar 2014 01:02:36 +0000 (01:02 +0000)]
Split TextIteratorBehavior into a separate header
https://bugs.webkit.org/show_bug.cgi?id=129578

Reviewed by Sam Weinig.

Source/WebCore:

This is in preparation to greatly cut down on includes of TextIterator.h.

* GNUmakefile.list.am: Added new header.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

 * editing/FindOptions.h: Changed typedef to unsigned char;
there is no reason to store these in a 32-bit integer.

 * editing/TextIterator.h: Added include of TextIteratorBehavior.h
and moved comments about the meanings of flag bits to their definition.

* editing/TextIteratorBehavior.h: Added.

* WebCore.exp.in: Updated for type changes.

Tools:

* Scripts/sort-export-file: Added special cases to the script so you can just paste link errors
from WebKit in and the script will add them in as unconditional exports. This makes the "add"
task easy, but the remove is still a bit of a pain.

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

7 years agoPage Cache is not enabled when using the modern WebKit2 API
weinig@apple.com [Mon, 3 Mar 2014 00:30:26 +0000 (00:30 +0000)]
Page Cache is not enabled when using the modern WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=129585

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool initWithConfiguration:]):
Default to CacheModelPrimaryWebBrowser until there is a way to configure it.

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

7 years ago[iOS WebKit2] Form controls handling
enrica@apple.com [Mon, 3 Mar 2014 00:19:41 +0000 (00:19 +0000)]
[iOS WebKit2] Form controls handling
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16053643>

Reviewed by Simon Fraser.

Source/WebCore:

Updates localizable strings and adds some exports.

* English.lproj/Localizable.strings:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Adding support for select elements on iOS.
There is full support on iPad, while on iPhone it is
still limited to single select with no groups.
The change also fixes the issue of the keyboard appearing
on screen for types of elements that are implemented with
a popover or a picker.

* Scripts/webkit2/messages.py:
* Shared/AssistedNodeInformation.cpp:
(WebKit::WKOptionItem::encode):
(WebKit::WKOptionItem::decode):
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::WKOptionItem::WKOptionItem):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputView]):
(-[WKContentView assistedNodeSelectOptions]):
(-[WKContentView _startAssistingNode:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm: Added.
(-[WKFormSelectControl initWithView:]):
(+[WKFormSelectControl createPeripheralWithView:]):
(-[WKFormSelectControl assistantView]):
(-[WKFormSelectControl beginEditing]):
(-[WKFormSelectControl endEditing]):
* UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
(-[WKSelectSinglePicker initWithView:]):
(-[WKSelectSinglePicker dealloc]):
(-[WKSelectSinglePicker controlView]):
(-[WKSelectSinglePicker controlBeginEditing]):
(-[WKSelectSinglePicker controlEndEditing]):
(-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
(stringByTrimmingWhitespaceAndNewlines):
(-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
(stringWithWritingDirection):
(adjustedFontSize):
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController viewWillAppear:]):
(-[WKSelectTableViewController numberOfSectionsInTableView:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController populateCell:withItem:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
(-[WKSelectTableViewController hasText]):
(-[WKSelectTableViewController insertText:]):
(-[WKSelectTableViewController deleteBackward]):
(-[WKSelectPopover initWithView:hasGroups:]):
(-[WKSelectPopover dealloc]):
(-[WKSelectPopover controlView]):
(-[WKSelectPopover controlBeginEditing]):
(-[WKSelectPopover controlEndEditing]):
(-[WKSelectPopover _userActionDismissedPopover:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::innerFrameQuad):
(WebKit::WebPage::getPositionInformation):
(WebKit::hasFocusableNode):
(WebKit::WebPage::getAssistedNodeInformation):
(WebKit::WebPage::elementDidFocus):

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

7 years agoCodeBlock::hasDebuggerRequests() should returning a bool instead of an int.
mark.lam@apple.com [Mon, 3 Mar 2014 00:03:06 +0000 (00:03 +0000)]
CodeBlock::hasDebuggerRequests() should returning a bool instead of an int.
<https://webkit.org/b/129584>

Reviewed by Darin Adler.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):

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

7 years agoClean up use of Options::enableConcurrentJIT().
mark.lam@apple.com [Sun, 2 Mar 2014 23:14:47 +0000 (23:14 +0000)]
Clean up use of Options::enableConcurrentJIT().
<https://webkit.org/b/129582>

Reviewed by Filip Pizlo.

DFG Driver was conditionally checking Options::enableConcurrentJIT()
only if ENABLE(CONCURRENT_JIT).  Otherwise, it bypasses it with a local
enableConcurrentJIT set to false.

Instead we should configure Options::enableConcurrentJIT() to be false
in Options.cpp if !ENABLE(CONCURRENT_JIT), and DFG Driver should always
check Options::enableConcurrentJIT().  This makes the code read a little
cleaner.

* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

7 years ago[iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
benjamin@webkit.org [Sun, 2 Mar 2014 23:13:46 +0000 (23:13 +0000)]
[iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
https://bugs.webkit.org/show_bug.cgi?id=129471

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

Source/WebCore:

A few issues with TileController were causing sublayers of the root layers
to tile incorrect surfaces on zoom.

First, the exposedRect API was not updating the sublayers. The layers go correctly
into tiling mode, but the tiles cover the full document instead of the visible area.

The other major issue was the margins being applied to the coverage size in document
coordinates. Since each margin is 512px, the total coverage size after zoom was
gigantic.

To solve this, this patch switch from the exposedRect API to the generic concept
of VisibleExtentContentRect introduced for iOS WebKit1.

* WebCore.exp.in:
* platform/ScrollView.h:
Define a VisibleExtentContentRect on the scrollview itself when there is no
platformWidget().
The case with inside frame is untested due to stability issues :(.
(see <rdar://problem/16199219>)

* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::computeTileCoverageRect):
Remove the margin from the tile coverage.

On iOS, m_tileCoverage is always zero at the moment. Previously, the tile coverage
was artificially extended by the margins. With the margins removed, I temporarily added
a factor of 1.5.
ViewUpdateDispatcher has all the information to compute a great tile coverage, I will need
a follow up patch to fix that.

* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::visibleExtentContentRect):
(WebCore::ScrollView::setVisibleExtentContentRect):

Source/WebKit2:

* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
A few interesting changes here:
-Now that we do not use setExposedRect, we can pass the exposed area directly
 to the drawing area since everything is now in content coordinates :)
-The scale is now converted to float before being compared to the Page's scaleFactor.
 The page's scalefactor being a float, the comparison was failing most of the time.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):

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

7 years agoSort Mac platform export files so they merge better
darin@apple.com [Sun, 2 Mar 2014 22:35:36 +0000 (22:35 +0000)]
Sort Mac platform export files so they merge better
https://bugs.webkit.org/show_bug.cgi?id=129581

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in: Ran the new sort-export-file on this.

Source/WebKit/mac:

* WebKit.exp: Ran the new sort-export-file on this.

Tools:

* Scripts/sort-export-file: Added. Quickly whipped together script that sorts
Mac export files in a "canonical" order for this project.

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

7 years agoAdd protected casting to FilterOperation classes.
dino@apple.com [Sun, 2 Mar 2014 22:26:05 +0000 (22:26 +0000)]
Add protected casting to FilterOperation classes.
https://bugs.webkit.org/show_bug.cgi?id=124062

Reviewed by Sam Weinig.

Source/WebCore:

Use the type cast macro generators to produce some toFilterOperation-style
functions, and then use them in our PlatformCA filter code.

Test: css3/filters/animation-from-initial-values-with-color-matrix.html

* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Use the toFilterOperation methods, in
some cases removing the unnecessary double cast.
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::operator==): Move this to the .cpp file so it can use the casting methods.
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::operator==): Ditto.
* platform/graphics/filters/FilterOperation.h: Add the casting macros.

LayoutTests:

* css3/filters/animation-from-initial-values-with-color-matrix-expected.html: Added.
* css3/filters/animation-from-initial-values-with-color-matrix.html: Added.

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

7 years agoFix srcset related bugs
commit-queue@webkit.org [Sun, 2 Mar 2014 22:22:10 +0000 (22:22 +0000)]
Fix srcset related bugs
https://bugs.webkit.org/show_bug.cgi?id=129539

Source/WebCore:

Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.

Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.

Patch by Yoav Weiss <yoav@yoav.ws> on 2014-03-02
Reviewed by Andreas Kling.

Tests: fast/hidpi/image-srcset-invalid-descriptor.html
       fast/hidpi/image-srcset-src-selection-1x-both.html

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):

LayoutTests:

These tests make sure that:
1. Invalid srcset descriptors are handled according to the spec. The invalid descriptors are ignored, but the resource is not.
2. When both src and srcset have only 1x descriptors and the DPR is higher than 1, the srcset's resource is picked.

I've also fixed the invalid inputs test, which was faulty.

Patch by Yoav Weiss <yoav@yoav.ws> on 2014-03-02
Reviewed by Andreas Kling.

* fast/hidpi/image-srcset-invalid-descriptor-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-descriptor.html: Added.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-src-selection-1x-both-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-1x-both.html: Added.
* fast/hidpi/resources/srcset-helper.js:
(runTest):

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

7 years agoSplit UserActivity, simplify PageThrottler
barraclough@apple.com [Sun, 2 Mar 2014 20:44:17 +0000 (20:44 +0000)]
Split UserActivity, simplify PageThrottler
https://bugs.webkit.org/show_bug.cgi?id=129551

Reviewed by Darin Adler.

The class UserActivity currently implements two things – a hysteresis mechanism, and
an abstraction of NSActivity controlled by that mechanism. PageThrottler implements
its own hysteresis mechanism, which directly controls DOM timer throttling and also
controls a couple of UserActivities, giving a total of 3 separate hysteresis mechanisms,
layered two deep.

Split UserActivity into three, with HysteresisActivity implementing an abstract hysteresis
mechanism, UserActivity::Impl controlling the NSActivity, and then UserActivity combining
these two back together. The interface to UserActivity is unchanged.

Remove PageThrottler's bespoke hysteresis, replacing it with a use of HysteresisActivity.
Replace the two UserActivities with a single UserActivity::Impl, so there are no longer
layered hysteresis mechanisms.

* WebCore.exp.in:
    - exports changed.
* WebCore.xcodeproj/project.pbxproj:
    - added HysteresisActivity.h.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
    - if the page starts visible, begin activity. If it starts hidden throttle DOM timers.
(WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
    - when the DOM timer throttling setting changes, make sure we update.
(WebCore::PageThrottler::incrementActivityCount):
(WebCore::PageThrottler::decrementActivityCount):
    - when m_activityCount changes update the hysteresis state.
(WebCore::PageThrottler::updateHysteresis):
(WebCore::PageThrottler::setViewState):
    - when IsVisuallyIdle changes update the hysteresis state.
(WebCore::PageThrottler::started):
(WebCore::PageThrottler::stopped):
    - callbacks from HysteresisActivity, these control m_activity and DOM timer throttling.
* page/PageThrottler.h:
(WebCore::PageThrottler::didReceiveUserInput):
(WebCore::PageThrottler::pluginDidEvaluate):
    - call impulse to temporarily enable the activity.
* platform/HysteresisActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
(WebCore::HysteresisActivity::HysteresisActivity):
    - constructor takes a delegate optionally a timeout.
(WebCore::HysteresisActivity::start):
    - start activity immediately. If stopped, call started method on delegate. If in timeout period, cancel the timer.
(WebCore::HysteresisActivity::stop):
    - stop activity after hysteresis. If started, initiate timeout period.
(WebCore::HysteresisActivity::impulse):
    - ensure activity for at least the timeout period.
(WebCore::HysteresisActivity::hysteresisTimerFired):
    - delayed stop - when the timer fires call stopped on the delegate.
* platform/UserActivity.cpp:
(WebCore::UserActivity::Impl::Impl):
(WebCore::UserActivity::Impl::beginActivity):
(WebCore::UserActivity::Impl::endActivity):
    - nop implementation.
(WebCore::UserActivity::UserActivity):
    - UserActivity maintains existing interface with hysteresis.
(WebCore::UserActivity::started):
(WebCore::UserActivity::stopped):
    - callbacks from HysteresisTimer; forward to Impl.
* platform/UserActivity.h:
* platform/mac/UserActivityMac.mm:
(WebCore::UserActivity::Impl::Impl):
    - UserActivity::Impl, abstraction for NSActivity without added hysteresis.
(WebCore::UserActivity::Impl::beginActivity):
    - allocate NSActivity.
(WebCore::UserActivity::Impl::endActivity):
    - release NSActivity.

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

7 years agoDocumentLoader should keep maps of ResourceLoaders instead of sets
bburg@apple.com [Sun, 2 Mar 2014 20:34:51 +0000 (20:34 +0000)]
DocumentLoader should keep maps of ResourceLoaders instead of sets
https://bugs.webkit.org/show_bug.cgi?id=129388

Reviewed by Darin Adler.

For web replay, we need to be able to pull a ResourceLoader instance by
identifier from the DocumentLoader. This is easy to do if we convert
ResourceLoaderSet to ResourceLoaderMap, keyed by the loader's identifier.

Added assertions whenever adding or removing from the map to ensure
that we don't try to add duplicates or resources with zero identifiers.

No new tests required. No functionality was added.

* loader/DocumentLoader.cpp:
(WebCore::cancelAll):
(WebCore::setAllDefersLoading):
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::addSubresourceLoader):
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::addPlugInStreamLoader):
(WebCore::DocumentLoader::removePlugInStreamLoader):
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
* loader/DocumentLoader.h:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::create): Only add the loader
to the document loader's map if it initialized successfully.
The old code was probably leaking resource loaders that failed to
initialize.

* loader/mac/DocumentLoaderMac.cpp:
(WebCore::scheduleAll):
(WebCore::unscheduleAll):

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

7 years agoReactivate SVG mask-type tests for Mac
krit@webkit.org [Sun, 2 Mar 2014 19:52:16 +0000 (19:52 +0000)]
Reactivate SVG mask-type tests for Mac
https://bugs.webkit.org/show_bug.cgi?id=129577

Reviewed by Darin Adler.

Reduce mask-type tests to the minimum to test the feature.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* svg/masking/mask-type-alpha-expected.svg:
* svg/masking/mask-type-alpha.svg:
* svg/masking/mask-type-luminance-expected.svg:
* svg/masking/mask-type-luminance.svg:
* svg/masking/mask-type-not-set-expected.svg:
* svg/masking/mask-type-not-set.svg:

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

7 years agoChange public text iterator API implementations to not depend on 16-bit character...
darin@apple.com [Sun, 2 Mar 2014 19:36:12 +0000 (19:36 +0000)]
Change public text iterator API implementations to not depend on 16-bit character pointers
https://bugs.webkit.org/show_bug.cgi?id=129566

Reviewed by Anders Carlsson.

Source/WebKit/mac:

* WebView/WebTextIterator.mm:
(-[WebTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
(-[WebTextIterator advance]): Clear out the upconverted text since we are moving on to the
next text.
(-[WebTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
(-[WebTextIterator currentTextLength]): Call TextIterator::text().length() since we will
probably be removing TextIterator::length eventually.

Source/WebKit2:

* WebView/WebTextIterator.mm:
(-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
(-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
next text.
(-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
(-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
probably be removing TextIterator::length eventually.

* WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
* WebProcess/WebPage/WebPage.cpp: Ditto.

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

7 years agoRemove path to non-existent SVG clip-path test from TestExpectations
krit@webkit.org [Sun, 2 Mar 2014 18:25:32 +0000 (18:25 +0000)]
Remove path to non-existent SVG clip-path test from TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=129574

Reviewed by Simon Fraser.

The test was transformed to a ref test and moved to a different location.
It passes on all platforms now.

* platform/gtk/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

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

7 years agoSupport ENABLE_ENCRYPTED_MEDIA in cmake builds
commit-queue@webkit.org [Sun, 2 Mar 2014 17:55:29 +0000 (17:55 +0000)]
Support ENABLE_ENCRYPTED_MEDIA in cmake builds
https://bugs.webkit.org/show_bug.cgi?id=129575

Patch by Dirkjan Ochtman <d.ochtman@activevideo.com> on 2014-03-02
Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsEfl.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmake/OptionsGTK.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmake/WebKitFeatures.cmake:
Enabled ENABLE_ENCRYPTED_MEDIA{,_V2} usage.
* Source/cmakeconfig.h.cmake:
Added ENABLE_ENCRYPTED_MEDIA{,_V2} flags.

Source/WebCore:

No new tests, only fixes the build.

* CMakeLists.txt:
Add support for ENABLE_ENCRYPTED_MEDIA.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::close):
Assign nullptr instead of 0 to OwnPtr to appease gcc-4.7.

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

7 years agoCut down use of OwnPtr within WTF itself
darin@apple.com [Sun, 2 Mar 2014 17:19:59 +0000 (17:19 +0000)]
Cut down use of OwnPtr within WTF itself
https://bugs.webkit.org/show_bug.cgi?id=129567

Reviewed by Sam Weinig.

* wtf/RefCounted.h: Removed OwnPtr includes.

* wtf/StreamBuffer.h: Removed OwnPtr includes and switched to use
std::make_unique and std::unique_ptr instead.

* wtf/Threading.cpp: Removed OwnPtr includes.
* wtf/ThreadingPthreads.cpp: Ditto.
* wtf/Vector.h: Ditto.

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

7 years agoUpdating some WebRTC and MediaStream LayoutTests
thiago.lacerda@openbossa.org [Sun, 2 Mar 2014 15:36:53 +0000 (15:36 +0000)]
Updating some WebRTC and MediaStream LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=129442

Reviewed by Eric Carlson.

Due to changes in JavaScriptCore (in r163562), some LayoutTests in fast/mediastream needed to be updated:
    - MediaStreamTrack.html: checking hasOwnProperty in __proto__ as well, until CustomGetter properties are
    moved to the prototype chain.
    - RTCIceCandidate.html and RTCSessionDescription.html: JSON.stringify are not considering properties in
    __proto__, so remove this for now.

* fast/mediastream/MediaStreamTrack-expected.txt:
* fast/mediastream/MediaStreamTrack.html:
* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCIceCandidate.html:
* fast/mediastream/RTCPeerConnection-have-local-answer.html: Removed. Other tests already test what this one was
testing
* fast/mediastream/RTCSessionDescription-expected.txt:
* fast/mediastream/RTCSessionDescription.html:

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

7 years ago[GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-exten...
carlosgc@webkit.org [Sun, 2 Mar 2014 14:59:47 +0000 (14:59 +0000)]
[GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
https://bugs.webkit.org/show_bug.cgi?id=129549

Reviewed by Martin Robinson.

Add a compile error to prevent mixing the UI and web process APIs.

* UIProcess/API/gtk/webkit2.h:
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:

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

7 years ago[GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
carlosgc@webkit.org [Sun, 2 Mar 2014 14:56:54 +0000 (14:56 +0000)]
[GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
https://bugs.webkit.org/show_bug.cgi?id=129543

Reviewed by Martin Robinson.

We are not installing the C API headers anymore.

* webkit2gtk.pc.in:

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

7 years agoFix the Mac build.
timothy_horton@apple.com [Sun, 2 Mar 2014 05:35:16 +0000 (05:35 +0000)]
Fix the Mac build.

* UIProcess/mac/ViewGestureController.messages.in:

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

7 years agoWebKit2 View Gestures (Smart Magnification): Support for iOS
timothy_horton@apple.com [Sun, 2 Mar 2014 05:25:27 +0000 (05:25 +0000)]
WebKit2 View Gestures (Smart Magnification): Support for iOS
https://bugs.webkit.org/show_bug.cgi?id=129146
<rdar://problem/16032668>

Reviewed by Benjamin Poulain.

Add support for double-tap smart magnification on iOS.

* DerivedSources.make:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
WKContentView is no longer API, so it can know about WKWebView
and will always have one.

(-[WKWebView contentView:didCommitLayerTree:WebKit::]):
Don't replace the zoom scale if we're currently animating.

(-[WKWebView _takeViewSnapshot]):
Rename.

(-[WKWebView _zoomToPoint:WebCore::atScale:]):
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(constrainContentOffset):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _zoomOutWithOrigin:]):
(-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
These will use some heuristics to generally center the target rect in the view
in a way that should match WebKit1 fairly closely.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
Don't use the WKContentViewDelegate protocol for things that don't belong there.

* UIProcess/ios/SmartMagnificationController.h: Added.
* UIProcess/ios/SmartMagnificationController.messages.in: Added.
* UIProcess/ios/SmartMagnificationController.mm: Added.
(WebKit::SmartMagnificationController::SmartMagnificationController):
(WebKit::SmartMagnificationController::~SmartMagnificationController):
(WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
SmartMagnificationController sits off of WKContentView, and sends/receives
messages to the WebProcess to do the smart magnification hit-testing.

* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
As before, teach WKContentView about its owning WKWebView.

(-[WKContentView _takeViewSnapshot]):
Rename.

(-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKContentView _zoomOutWithOrigin:]):
Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _twoFingerDoubleTapRecognized:]):
Forward double tap to the SmartMagnificationController.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.messages.in:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Retrieve the minimum/maximum viewport scale from the WebProcess.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
Factor out code to send the geometry back to the UI process.

* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
We should have a ViewGestureGeometryCollector on iOS too.

* WebCore.exp.in:
Add an export.

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

7 years agoUnreviewed, rolling out r164929 and r164934.
commit-queue@webkit.org [Sun, 2 Mar 2014 03:58:59 +0000 (03:58 +0000)]
Unreviewed, rolling out r164929 and r164934.
http://trac.webkit.org/changeset/164929
http://trac.webkit.org/changeset/164934
https://bugs.webkit.org/show_bug.cgi?id=129570

Caused assertions on two srcset tests (Requested by ap on
#webkit).

Source/WebCore:

* html/parser/HTMLParserIdioms.cpp:
(WebCore::isHTMLSpaceOrComma):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):

LayoutTests:

* fast/hidpi/image-srcset-invalid-descriptor-expected.txt: Removed.
* fast/hidpi/image-srcset-invalid-descriptor.html: Removed.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-src-selection-1x-both-expected.txt: Removed.
* fast/hidpi/image-srcset-src-selection-1x-both.html: Removed.
* fast/hidpi/resources/srcset-helper.js:
(runTest):

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

7 years agoSource/JavaScriptCore: This shouldn't have been a layout test since it runs only...
fpizlo@apple.com [Sun, 2 Mar 2014 03:45:06 +0000 (03:45 +0000)]
Source/JavaScriptCore: This shouldn't have been a layout test since it runs only under jsc. Moving it to JSC
stress tests.

* tests/stress/generational-opaque-roots.js: Copied from LayoutTests/js/script-tests/generational-opaque-roots.js.

LayoutTests: This shouldn't be a layout test since it runs only under jsc. Moving it to JSC
stress tests.

* js/script-tests/generational-opaque-roots.js: Removed.

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

7 years agoBuild fix.
mitz@apple.com [Sun, 2 Mar 2014 00:35:13 +0000 (00:35 +0000)]
Build fix.

* html/parser/HTMLParserIdioms.cpp: Removed an unused function.

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

7 years agoEnsure keySplines is valid in SMIL animations
ddkilzer@apple.com [Sun, 2 Mar 2014 00:20:58 +0000 (00:20 +0000)]
Ensure keySplines is valid in SMIL animations
<http://webkit.org/b/129547>
<rdar://problem/15676128>

Reviewed by Darin Adler.

Merged from Blink (patch by Philip Rogers):
https://src.chromium.org/viewvc/blink?revision=156452&view=revision
http://crbug.com/276111

    This patch fixes a crash in SMIL animations when keySplines are not
    specified. The SMIL spec is clear on this:
    http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncCalcMode
    "If there are any errors in the keyTimes specification (bad values,
    too many or too few values), the animation will have no effect."

    This patch simply checks that keyTimes is not empty. Previously,
    splinesCount was set to be m_keySplines.size() + 1 in
    SVGAnimationElement.cpp; this patch changes splinesCount to be equal
    to m_keySplines.size() to make the logic easier to follow and to
    match other checks in SVGAnimationElement::startedActiveInterval.

Source/WebCore:

Test: svg/animations/animate-keysplines-crash.html

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::startedActiveInterval):

LayoutTests:

* svg/animations/animate-keysplines-crash-expected.txt: Added.
* svg/animations/animate-keysplines-crash.html: Added.

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

7 years agoTighten minimumRegisterRequirements()
benjamin@webkit.org [Sat, 1 Mar 2014 23:50:17 +0000 (23:50 +0000)]
Tighten minimumRegisterRequirements()
https://bugs.webkit.org/show_bug.cgi?id=129538

Reviewed by Andreas Kling.

Source/WebCore:

Fix small things that made minimumRegisterRequirements() a little optimistic
when dealing with attributes.

Test: fast/selectors/adjacent-descendant-tail-register-requirement.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
Attribute Set does not do value matching, the case sensitive value matching is irrelevant
The problem is that flag is also used by minimumRegisterRequirements()
to find if one more register is needed.

Set the flag to case sensitive to avoid reserving one extra register.

(WebCore::SelectorCompiler::minimumRegisterRequirements):
Use a new backtrackingFlag to know if there is a descendant tail, thus a backtracking register
reserved.
This is better than using the backtracking action because the backtracking chain could be
an adjacent chain inside a descendant chain.

The flags are designed for that, just set one for minimumRegisterRequirements().

The 2 extra registers for the attribute count and address become limited to all attributes
except the last one. We don't keep a copy for the last matching, those registers were not needed.

(WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):

LayoutTests:

* fast/selectors/adjacent-descendant-tail-register-requirement-expected.txt: Added.
* fast/selectors/adjacent-descendant-tail-register-requirement.html: Added.

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

7 years ago[iOS] selectionImageForcingBlackText should return autoreleased object
psolanki@apple.com [Sat, 1 Mar 2014 23:31:03 +0000 (23:31 +0000)]
[iOS] selectionImageForcingBlackText should return autoreleased object
https://bugs.webkit.org/show_bug.cgi?id=129437
<rdar://problem/15810384>

Reviewed by Darin Adler.

Source/WebCore:

* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):

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

7 years agoSome small modernizing tweaks to the coding style guide
darin@apple.com [Sat, 1 Mar 2014 23:30:51 +0000 (23:30 +0000)]
Some small modernizing tweaks to the coding style guide
https://bugs.webkit.org/show_bug.cgi?id=129427

Reviewed by Alexey Proskuryakov.

My intent here was originally to do the nullptr style guide update, but that was already done.
I did some other improvements. There's still quite a bit to do -- the guide is out of date in
a number of subtle ways.

* coding/coding-style.html: Change "left side operator" example to be a more modern example
without non-WebKit-style abbreviations and such. Use auto& instead of const auto& in for loop
example, since that's normally preferred. Changed section title to say "zero" instead of "0".
Use words instead of abbreviations in code examples. Show that a modern C++ for loop is preferred
over index iteration in vector iteration example and also showed use of unsigned rather than
size_t since that is almost always what we want. Eliminated the use of PassOwnPtr in the "return
a newly created object" example. Use references instead of pointers in one example.

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

7 years agoFix srcset related bugs
commit-queue@webkit.org [Sat, 1 Mar 2014 23:28:40 +0000 (23:28 +0000)]
Fix srcset related bugs
https://bugs.webkit.org/show_bug.cgi?id=129539

Source/WebCore:

Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.

Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.

Patch by Yoav Weiss <yoav@yoav.ws> on 2014-03-01
Reviewed by Andreas Kling.

Tests: fast/hidpi/image-srcset-invalid-descriptor.html
       fast/hidpi/image-srcset-src-selection-1x-both.html

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):

LayoutTests:

These tests make sure that:
1. Invalid srcset descriptors are handled according to the spec. The invalid descriptors are ignored, but the resource is not.
2. When both src and srcset have only 1x descriptors and the DPR is higher than 1, the srcset's resource is picked.

I've also fixed the invalid inputs test, which was faulty.

Patch by Yoav Weiss <yoav@yoav.ws> on 2014-03-01
Reviewed by Andreas Kling.

* fast/hidpi/image-srcset-invalid-descriptor-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-descriptor.html: Added.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-src-selection-1x-both-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-1x-both.html: Added.
* fast/hidpi/resources/srcset-helper.js:
(runTest):

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

7 years agoImprove "bad parent" and "bad child list" assertions in line boxes
darin@apple.com [Sat, 1 Mar 2014 23:22:56 +0000 (23:22 +0000)]
Improve "bad parent" and "bad child list" assertions in line boxes
https://bugs.webkit.org/show_bug.cgi?id=125656

Reviewed by Sam Weinig.

My previous fix for this problem was incomplete. This continuation of that fix addresses
the flaw in the original and adds additional lifetime checking so problems can be seen in
debug builds without a memory debugger.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::assertNotDeleted): Added. Poor man's memory debugging helper.
(WebCore::InlineBox::~InlineBox): Refactored body into a new function named
invalidateParentChildList. Added code to update the deletion sentinel to record
that this object is deleted.
(WebCore::InlineBox::setHasBadParent): Moved here from header since this debug-only
feature does not need to be inlined. Added a call to assertNotDeleted.
(WebCore::InlineBox::invalidateParentChildList): Added. Refactored from the destructor,
this is used by RenderTextLineBoxes.

* rendering/InlineBox.h: Added the deletion sentinel, and called it in the parent
function. Also changed the expansion/setExpansion functions to use the type name "int",
since we don't use the type name "signed" in the WebKit coding style.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::~InlineFlowBox): Call setHasBadChildList rather than doing the
setHasBadParent work on children directly, to avoid code duplication.
(WebCore::InlineFlowBox::setHasBadChildList): Moved here from header. Added code to set
"has bad parent" on all children, something we previously did only on destruction. Also
added assertNotDeleted.
(WebCore::InlineFlowBox::checkConsistency): Added call to assertNotDeleted. Also tweaked
code style and variable names a little bit.

* rendering/InlineFlowBox.h: Moved setHasBadChildList out of the header when it's on.
The empty version for ASSERT_WITH_SECURITY_IMPLICATION_DISABLED is still in the header.

* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::invalidateParentChildLists): Call the new
InlineBox::invalidateParentChildList function instead of calling setHasBadChildList directly.
The new function checks m_hasBadParent, something we couldn't do here.

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

7 years agoJSCell::fastGetOwnProperty() should get the Structure more efficiently.
akling@apple.com [Sat, 1 Mar 2014 23:05:02 +0000 (23:05 +0000)]
JSCell::fastGetOwnProperty() should get the Structure more efficiently.
<https://webkit.org/b/129560>

Now that structure() is nontrivial and we have a faster structure(VM&),
make use of that in fastGetOwnProperty() since we already have VM.

Reviewed by Sam Weinig.

* runtime/JSCellInlines.h:
(JSC::JSCell::fastGetOwnProperty):

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

7 years agoSet css3/filter/huge-region as skipped
cavalcantii@gmail.com [Sat, 1 Mar 2014 22:27:40 +0000 (22:27 +0000)]
Set css3/filter/huge-region as skipped
https://bugs.webkit.org/show_bug.cgi?id=129552

It tries to use an insanely huge kernel for a huge blur filtered
element while it is expected to *not* execute. Thanks to the changes
introduced in #123716, this test will try to be executed and may
timeout in some machines. The proper fix will follow up in #129553.

Reviewed by Dirk Schulze.

* TestExpectations:

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

7 years agoAvoid going through ExecState for VM when we already have it (in some places.)
akling@apple.com [Sat, 1 Mar 2014 22:21:42 +0000 (22:21 +0000)]
Avoid going through ExecState for VM when we already have it (in some places.)
<https://webkit.org/b/129554>

Tweak some places that jump through unnecessary hoops to get the VM.
There are many more like this.

Reviewed by Sam Weinig.

* runtime/JSObject.cpp:
(JSC::JSObject::putByIndexBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToString):

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

7 years agoOptimized querySelector(All) when selector contains #id
benjamin@webkit.org [Sat, 1 Mar 2014 22:09:48 +0000 (22:09 +0000)]
Optimized querySelector(All) when selector contains #id
https://bugs.webkit.org/show_bug.cgi?id=116502

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/selectors/querySelector-id-filtering.html

The idea of this patch is to perform querySelector on a subtree
rooted at the last element with #id matching. For example, if we have the selector
"#foobar div a", we start by looking for the element with ID foobar in the TreeScope
cache, and start matching the children from there.

The idea comes from Rune for
https://chromium.googlesource.com/chromium/blink/+/1cd83d3588973a02ab15d94b1b05a28620853624
but the code as diverged too much so it had to be reimplemented specifically for WebKit.

* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::operator=):
* css/CSSSelectorList.h:
(WebCore::CSSSelectorList::~CSSSelectorList):
* css/StyleRule.h:
(WebCore::StyleRule::wrapperAdoptSelectorList):
(WebCore::StyleRulePage::wrapperAdoptSelectorList):
* dom/SelectorQuery.cpp:
(WebCore::isSingleTagNameSelector):
(WebCore::isSingleClassNameSelector):
(WebCore::findIdMatchingType):
(WebCore::SelectorDataList::SelectorDataList):
(WebCore::filterRootById):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::execute):
(WebCore::SelectorQuery::SelectorQuery):
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
(WebCore::SelectorDataList::SelectorData::SelectorData):

LayoutTests:

* fast/selectors/querySelector-id-filtering-expected.txt: Added.
* fast/selectors/querySelector-id-filtering.html: Added.

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

7 years agoFTL should support PhantomArguments
fpizlo@apple.com [Sat, 1 Mar 2014 19:57:40 +0000 (19:57 +0000)]
FTL should support PhantomArguments
https://bugs.webkit.org/show_bug.cgi?id=113986

Reviewed by Oliver Hunt.

Adding PhantomArguments to the FTL mostly means wiring the recovery of the Arguments
object into the FTL's OSR exit compiler.

This isn't a speed-up yet, since there is still more to be done to fully support
all of the arguments craziness that our varargs benchmarks do.

* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit): move the recovery code to DFGOSRExitCompilerCommon.cpp
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit): move the recovery code to DFGOSRExitCompilerCommon.cpp
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::ArgumentsRecoveryGenerator::ArgumentsRecoveryGenerator):
(JSC::DFG::ArgumentsRecoveryGenerator::~ArgumentsRecoveryGenerator):
(JSC::DFG::ArgumentsRecoveryGenerator::generateFor): this is the common place for the recovery code
* dfg/DFGOSRExitCompilerCommon.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dumpInContext):
* ftl/FTLExitValue.h:
(JSC::FTL::ExitValue::argumentsObjectThatWasNotCreated):
(JSC::FTL::ExitValue::isArgumentsObjectThatWasNotCreated):
(JSC::FTL::ExitValue::valueFormat):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compilePhantomArguments):
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::LowerDFGToLLVM::tryToSetConstantExitArgument):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub): Call into the ArgumentsRecoveryGenerator
* tests/stress/slightly-more-difficult-to-fold-reflective-arguments-access.js: Added.
* tests/stress/trivially-foldable-reflective-arguments-access.js: Added.

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

7 years agoUnreviewed, uncomment some code. It wasn't meant to be commented in the first place.
fpizlo@apple.com [Sat, 1 Mar 2014 19:42:14 +0000 (19:42 +0000)]
Unreviewed, uncomment some code. It wasn't meant to be commented in the first place.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):

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

7 years agoMake Start Timeline Recording in the Develop menu show the Timeline view again.
timothy@apple.com [Sat, 1 Mar 2014 18:48:35 +0000 (18:48 +0000)]
Make Start Timeline Recording in the Develop menu show the Timeline view again.

This also fixes a noticeable delay between showing the sidebar and the default Timeline
view when initially opening the Web Inspector to the Timeline.

https://bugs.webkit.org/show_bug.cgi?id=129545

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Call TimelineSidebarPanel.initialize to prime the content view.
This is needed so the view is ready in this run loop cycle, where it was delayed before.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Call TimelineSidebarPanel.showTimelineOverview.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.initialize): Added.

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

7 years agoNode::compareDocumentPosition leaks memory structure
ap@apple.com [Sat, 1 Mar 2014 18:48:16 +0000 (18:48 +0000)]
Node::compareDocumentPosition leaks memory structure
https://bugs.webkit.org/show_bug.cgi?id=120244

Reviewed by Ryosuke Niwa.

Source/WebCore:

* dom/Node.cpp: (WebCore::Node::compareDocumentPosition): Don't do it.

LayoutTests:

* TestExpectations:
* dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt:
* fast/dom/compare-document-position-disconnected-nodes-expected.txt:
* fast/dom/compare-document-position-disconnected-nodes.html:
* fast/dom/shadow/compare-document-position-expected.txt:
* fast/dom/shadow/compare-document-position.html:

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

7 years agoSelect the Resource navigation sidebar by default when there is no cookie.
timothy@apple.com [Sat, 1 Mar 2014 18:46:35 +0000 (18:46 +0000)]
Select the Resource navigation sidebar by default when there is no cookie.

https://bugs.webkit.org/show_bug.cgi?id=129544

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector._restoreInspectorViewStateFromCookie):

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

7 years agoLabel JavaScript forced layouts as such in the Timeline.
timothy@apple.com [Sat, 1 Mar 2014 17:51:27 +0000 (17:51 +0000)]
Label JavaScript forced layouts as such in the Timeline.

https://bugs.webkit.org/show_bug.cgi?id=129546

Reviewed by David Kilzer.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/Models/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord.EventType.displayName):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):

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

7 years agoFix lifetime handling of SVGPropertyTearOffs
ddkilzer@apple.com [Sat, 1 Mar 2014 16:26:15 +0000 (16:26 +0000)]
Fix lifetime handling of SVGPropertyTearOffs
<http://webkit.org/b/129211>
<rdar://problem/15696025>

Reviewed by Maciej Stachowiak.

Merged from Blink (patch by Ojan Vafai):
https://src.chromium.org/viewvc/blink?revision=157801&view=revision
http://crbug.com/288771

    -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
    since it's only used in that one place. This means we can get rid
    of the templatizing and the method pointer.
    -Change SVGPropertyTearOff to keep track of it's child tearoffs
    and call detachWrapper on its child tearoffs when it's destroyed
    or when it's wrapper is detached.
    -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
    to avoid having a cycle.

Source/WebCore:

Test: svg/transforms/svg-matrix-tearoff-crash.html

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue):
* svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
(WebCore::SVGMatrixTearOff::create):
(WebCore::SVGMatrixTearOff::commitChange):
(WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::addChild):
(WebCore::SVGPropertyTearOff::detachChildren):

LayoutTests:

* svg/transforms/svg-matrix-tearoff-crash-expected.txt: Added.
* svg/transforms/svg-matrix-tearoff-crash.html: Added.

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

7 years agoUnreviewed build fix after r164913.
zandobersek@gmail.com [Sat, 1 Mar 2014 09:35:33 +0000 (09:35 +0000)]
Unreviewed build fix after r164913.

* platform/CountedUserActivity.h: Some ports don't (yet) support forwarding headers for WebCore,
so UserActivity.h should be included as non-forwarding.

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

7 years agoUnreviewed follow-up to r164905 and r164912.
zandobersek@gmail.com [Sat, 1 Mar 2014 09:08:04 +0000 (09:08 +0000)]
Unreviewed follow-up to r164905 and r164912.

* Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.

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

7 years agoChange PageActivityAssertionToken to use a WeakPtr
barraclough@apple.com [Sat, 1 Mar 2014 09:01:58 +0000 (09:01 +0000)]
Change PageActivityAssertionToken to use a WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=129526

Reviewed by Sam Weinig.

PageThrottler effectively implements a bespoke weak pointer mechanism; remove this & just use WeakPtr.

* page/PageActivityAssertionToken.cpp:
(WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
(WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
    - addActivityToken->incrementActivityCount, removeActivityToken->decrementActivityCount
* page/PageActivityAssertionToken.h:
    - removed invalidate, made m_throttler a WeakPtr
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
    - initialize m_weakPtrFactory, m_activityCount.
(WebCore::PageThrottler::~PageThrottler):
    - removed called to invalidate.
(WebCore::PageThrottler::startThrottleHysteresisTimer):
    - m_activityTokens.size()->m_activityCount
(WebCore::PageThrottler::throttleHysteresisTimerFired):
    - m_activityTokens.size()->m_activityCount
(WebCore::PageThrottler::incrementActivityCount):
    - m_activityTokens.add->++
(WebCore::PageThrottler::decrementActivityCount):
    - m_activityTokens.remove->--
* page/PageThrottler.h:
(WebCore::PageThrottler::weakPtr):
    - replaced HashSet with WeakPtrFactory & count.

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

7 years agoSplit UserActivity/CountedUserActivity
barraclough@apple.com [Sat, 1 Mar 2014 08:49:34 +0000 (08:49 +0000)]
Split UserActivity/CountedUserActivity
https://bugs.webkit.org/show_bug.cgi?id=129520

Reviewed by Sam Weinig.

UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.

Source/WebCore:

* WebCore.exp.in:
    - beginActivity->start, endActivity->stop.
* WebCore.xcodeproj/project.pbxproj:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
(WebCore::PageThrottler::~PageThrottler):
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
(WebCore::PageThrottler::setIsVisuallyIdle):
    - beginActivity->increment, endActivity->decrement.
* page/PageThrottler.h:
    - UserActivity->CountedUserActivity for m_pageActivity
* platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
(WebCore::CountedUserActivity::CountedUserActivity):
(WebCore::CountedUserActivity::increment):
(WebCore::CountedUserActivity::decrement):
    - Added, provides counted interface to UserActivity.
* platform/UserActivity.cpp:
(WebCore::UserActivity::UserActivity):
    - m_count removed
(WebCore::UserActivity::start):
(WebCore::UserActivity::stop):
    - beginActivity->start, endActivity->stop, implentation now empty.
* platform/UserActivity.h:
    - beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
* platform/mac/UserActivityMac.mm:
(WebCore::UserActivity::UserActivity):
    - m_count->m_started
(WebCore::UserActivity::isValid):
    - m_count->m_started
(WebCore::UserActivity::start):
(WebCore::UserActivity::stop):
    - beginActivity->start, endActivity->stop, no longer nest

Source/WebKit2:

* PluginProcess/PluginProcess.h:
(WebKit::PluginProcess::connectionActivity):
    - UserActivity->CountedUserActivity
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
    - beginActivity->start
* Shared/ActivityAssertion.cpp:
(WebKit::ActivityAssertion::ActivityAssertion):
(WebKit::ActivityAssertion::~ActivityAssertion):
    - beginActivity->increment, endActivity->decrement.
* Shared/ActivityAssertion.h:
    - UserActivity->CountedUserActivity
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::setProcessSuppressionEnabled):
    - beginActivity->start, endActivity->stop.
* Shared/ChildProcess.h:
    - removed processSuppressionEnabled()
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
    - beginActivity->start, endActivity->stop.

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

7 years agoUnreviewed trivial Linux buildfix after r164905.
ossy@webkit.org [Sat, 1 Mar 2014 08:35:23 +0000 (08:35 +0000)]
Unreviewed trivial Linux buildfix after r164905.

setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
which means PLATFORM(MAC), because nobody else uses this source file.

But ChildProcessProxy.cpp is used by Linux ports too, so we have to
use the most specific #if guard here, which is PLATFORM(MAC).

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):

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

7 years agoCaller saved registers can be accidentally discarded when clearing the local stack
benjamin@webkit.org [Sat, 1 Mar 2014 06:13:09 +0000 (06:13 +0000)]
Caller saved registers can be accidentally discarded when clearing the local stack
https://bugs.webkit.org/show_bug.cgi?id=129532

Reviewed by Andreas Kling.

Source/WebCore:

Tests: fast/selectors/tree-modifying-case-insensitive-selectors.html
       fast/selectors/tree-modifying-selectors.html

StackAllocator::discard() no longer make sense now that we can use caller saved regsiter.
We should instead discard everything up to the beginning of the local stack.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::popAndDiscardUpTo):

LayoutTests:

* fast/selectors/tree-modifying-case-insensitive-selectors.html: Added.
* fast/selectors/tree-modifying-selectors.html: Added.

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

7 years ago[iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
simon.fraser@apple.com [Sat, 1 Mar 2014 05:36:01 +0000 (05:36 +0000)]
[iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
https://bugs.webkit.org/show_bug.cgi?id=129537

Reviewed by Benjamin Poulain.

When building RemoteLayerTreeTransactions, the ordering of setting created
layers and doing the recursive tree walk was wrong, such that we failed
to noticed layers created during the recursiveBuildTransaction().

Also harden the UI-side code against Obj-C exceptions thrown when layers
are missing.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when
children are not found, and protect against Obj-C exceptions.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
Initialize the members.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
before setting created and destroyed layers, since the walk can create
layers (especially when swapping into tiled layers).

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

7 years agoFix WebKit2 build after r164890
jinwoo7.song@samsung.com [Sat, 1 Mar 2014 05:34:19 +0000 (05:34 +0000)]
Fix WebKit2 build after r164890
https://bugs.webkit.org/show_bug.cgi?id=129533

Reviewed by Simon Fraser.

LayerRepresentation.h is included to WebPageProxy.h in r164890
but it is not used in non Mac or iOS port.

* UIProcess/WebPageProxy.h:

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

7 years ago[Mac] Remove MailQuirksUserScript.js
mitz@apple.com [Sat, 1 Mar 2014 05:31:34 +0000 (05:31 +0000)]
[Mac] Remove MailQuirksUserScript.js
https://bugs.webkit.org/show_bug.cgi?id=129536

Reviewed by Andy Estes.

../WebKit:

* WebKit.xcodeproj/project.pbxproj: Removed reference to the file.

../WebKit/mac:

* Configurations/WebKit.xcconfig: Removed from EXCLUDED_SOURCE_FILE_NAMES_iphoneos.
* Misc/MailQuirksUserScript.js: Removed. This file has been unused since r147447.

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

7 years ago[iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesiz...
aestes@apple.com [Sat, 1 Mar 2014 05:14:42 +0000 (05:14 +0000)]
[iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesizedDocument()
https://bugs.webkit.org/show_bug.cgi?id=129534

Reviewed by Simon Fraser.

No new tests because TestWebKitAPI does not yet support iOS. See <http://webkit.org/b/129535>.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::initForSynthesizedDocument): Create a FrameProgressTracker.

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

7 years ago[Mac] Extract _data->_thumbnailView checks into a helper function
ap@apple.com [Sat, 1 Mar 2014 05:05:16 +0000 (05:05 +0000)]
[Mac] Extract _data->_thumbnailView checks into a helper function
https://bugs.webkit.org/show_bug.cgi?id=129517

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKView.mm:
(-[WKView shouldIgnoreMouseEvents]):
(-[WKView scrollWheel:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):

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

7 years ago[iOS][WebKit2] Don't use any of the mach exception handling code on iOS
psolanki@apple.com [Sat, 1 Mar 2014 04:10:24 +0000 (04:10 +0000)]
[iOS][WebKit2] Don't use any of the mach exception handling code on iOS
https://bugs.webkit.org/show_bug.cgi?id=129516

Reviewed by Sam Weinig.

This code is not used on iOS after my fix in r164883. We can just move it all under
!PLATFORM(IOS).

* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):

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

7 years agoJSObject::findPropertyHashEntry() should take VM instead of ExecState.
akling@apple.com [Sat, 1 Mar 2014 04:01:06 +0000 (04:01 +0000)]
JSObject::findPropertyHashEntry() should take VM instead of ExecState.
<https://webkit.org/b/129529>

Callers already have VM in a local, and findPropertyHashEntry() only
uses the VM, no need to go all the way through ExecState.

Reviewed by Geoffrey Garen.

* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::findPropertyHashEntry):
* runtime/JSObject.h:

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

7 years agoASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and...
weinig@apple.com [Sat, 1 Mar 2014 03:11:49 +0000 (03:11 +0000)]
ASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and WebKit2 in the same process
https://bugs.webkit.org/show_bug.cgi?id=129528

Reviewed by Andreas Kling.

* platform/mac/Language.mm:
(WebCore::preferredLanguagesMutex):
(WebCore::preferredLanguages):
(+[WebLanguageChangeObserver languagePreferencesDidChange:]):
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
Add a mutex and do an isolated copy of the strings to allow this function to be called from multiple threads.

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

7 years agoDeadlock remotely inspecting iOS Simulator
commit-queue@webkit.org [Sat, 1 Mar 2014 02:51:39 +0000 (02:51 +0000)]
Deadlock remotely inspecting iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=129511

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

Avoid synchronous setup. Do it asynchronously, and let
the RemoteInspector singleton know later if it failed.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::setupFailed):
* inspector/remote/RemoteInspectorDebuggableConnection.h:
* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorDebuggableConnection::setup):

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

7 years agoCrash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsC...
dino@apple.com [Sat, 1 Mar 2014 02:05:14 +0000 (02:05 +0000)]
Crash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsContext3D::getExtensions + 10
https://bugs.webkit.org/show_bug.cgi?id=129523

Reviewed by Simon Fraser.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getSupportedExtensions): Early return if the
context is pending policy resolution.

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

7 years agoMicro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
akling@apple.com [Sat, 1 Mar 2014 01:11:23 +0000 (01:11 +0000)]
Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
<https://webkit.org/b/129518>

Only do image and audio element specific checks for element nodes.
Time spent in here goes from 0.8% to 0.5% on DYEB.

Reviewed by Benjamin Poulain.

* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):

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

7 years agoJSC Assertion failure every time I start Safari (r164846)
ggaren@apple.com [Sat, 1 Mar 2014 00:45:21 +0000 (00:45 +0000)]
JSC Assertion failure every time I start Safari (r164846)
https://bugs.webkit.org/show_bug.cgi?id=129510

Reviewed by Mark Hahnenberg.

Take the lock before allocating objects because afterward is too late.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):

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

7 years agoWeb Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
commit-queue@webkit.org [Sat, 1 Mar 2014 00:42:29 +0000 (00:42 +0000)]
Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
https://bugs.webkit.org/show_bug.cgi?id=129512

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-02-28
Reviewed by Simon Fraser.

* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):

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

7 years agoVisitedLinkStore should be able to invalidate link styles for associated pages
andersca@apple.com [Sat, 1 Mar 2014 00:40:22 +0000 (00:40 +0000)]
VisitedLinkStore should be able to invalidate link styles for associated pages
https://bugs.webkit.org/show_bug.cgi?id=129515

Reviewed by Dan Bernstein.

* page/Page.cpp:
(WebCore::Page::Page):
Add the VisitedLinkStore if we have one.

(WebCore::Page::~Page):
Remove the VisitedLinkStore if we have one.

* page/VisitedLinkStore.cpp:
(WebCore::VisitedLinkStore::~VisitedLinkStore):
Assert that we don't have any pages.

(WebCore::VisitedLinkStore::addPage):
Add the page to the set.

(WebCore::VisitedLinkStore::removePage):
Remove the page from the set.

(WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
Traverse all the pages and invalidate the style for all links.

(WebCore::VisitedLinkStore::invalidateStylesForLink):
Traverse all the pages and invalidate the style for a given link.

* page/VisitedLinkStore.h:
Add new members.

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

7 years agoSource/WebCore: [iOS][WK2] highlight rects should never big bigger than the view
benjamin@webkit.org [Fri, 28 Feb 2014 23:55:24 +0000 (23:55 +0000)]
Source/WebCore: [iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-28
Reviewed by Enrica Casucci.

* WebCore.exp.in:

Source/WebKit2: [iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472
<rdar://problem/15673655>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-28
Reviewed by Enrica Casucci.

The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
Use that to constrain our highlight rects.

* UIProcess/ios/WKContentViewInteraction.mm:
(highlightedQuadsFitInRect):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):

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

7 years agoTurn off margin tiles on iOS
bdakin@apple.com [Fri, 28 Feb 2014 23:38:08 +0000 (23:38 +0000)]
Turn off margin tiles on iOS
https://bugs.webkit.org/show_bug.cgi?id=129509
-and corresponding-
<rdar://problem/16200383>

Reviewed by Simon Fraser.

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

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

7 years agoMake UIViews for compositing layers in the UI process on iOS
simon.fraser@apple.com [Fri, 28 Feb 2014 23:36:02 +0000 (23:36 +0000)]
Make UIViews for compositing layers in the UI process on iOS
https://bugs.webkit.org/show_bug.cgi?id=129508

Reviewed by Sam Weinig.

In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
we need to use UIViews in the compositing layer hierarchy on iOS.

Make much of the code that currently uses CALayers layer-or-view
agnostic by using a typedef LayerOrView.

Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
or CALayers; on iOS, we need both paths because we have to set properties
on CALayer for remotely hosted content.

Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
to be come a .mm file.

* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(-[UIView setSubviews:]):
(WebKit::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
* UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
(+[WKTransformView layerClass]):
(-[WKRemoteView initWithFrame:contextID:]):
(+[WKRemoteView layerClass]):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
(WebKit::layerRepresentationFromLayerOrView):
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setAcceleratedCompositingRootView:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
(WebKit::WebVideoFullscreenManagerProxy::create):
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.h:
(WebKit::RemoteLayerTreeHost::rootLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::getLayer):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
(WebKit::WebPageProxy::acceleratedCompositingRootLayer):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::recursiveBuildTransaction):

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

7 years agoWebKit2.TerminateTwice test is failing.
andersca@apple.com [Fri, 28 Feb 2014 23:11:22 +0000 (23:11 +0000)]
WebKit2.TerminateTwice test is failing.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Turns out this can be called even when we're in the launching state so don't try to
remove the process from the visited link provider when in that state.

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

7 years agoSubpixel rendering: Add subpixel support to border type of double, groove, ridge...
zalan@apple.com [Fri, 28 Feb 2014 23:05:58 +0000 (23:05 +0000)]
Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
https://bugs.webkit.org/show_bug.cgi?id=129226

Reviewed by Simon Fraser.

This is the conversion of double, inset, outset, groove and ridge border type
painting to support device pixel precision width/height.

Regression is covered by existing tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:

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

7 years agoAX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
cfleizach@apple.com [Fri, 28 Feb 2014 23:04:05 +0000 (23:04 +0000)]
AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
https://bugs.webkit.org/show_bug.cgi?id=127387

Reviewed by Alexey Proskuryakov.

Speculative fix for crasher. We should check if the connection is still valid before proceeding.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):

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

7 years agoFilters should test for area instead of single dimension
cavalcantii@gmail.com [Fri, 28 Feb 2014 22:54:47 +0000 (22:54 +0000)]
Filters should test for area instead of single dimension
https://bugs.webkit.org/show_bug.cgi?id=123716

Reviewed by Dirk Schulze.

A filtered SVG element with a sigle dimension bigger than 5000
(counting the margin/border) will fail to render. So an element
with 4000x4000 will render fine, while another with 5000x10
won't. This patch instead tests against the total element area,
which fixes such cases.

Source/WebCore:

It also fixes some layer violations where FilterEffectRenderer and
RenderSVGResourceFilter were directly accessing the maximum filter
size in FilterEffect. Since before a somewhat bigger filter would
be aborted, it required to change the maximum kernel size
for blur filter (some filters are slower to run than others for
bigger SVGs).

Tests: svg/filters/big-height-filter-expected.svg
       svg/filters/big-height-filter.svg
       svg/filters/big-width-filter-expected.svg
       svg/filters/big-width-filter.svg

* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::maxFilterArea): New function, returns the
maximum allowed element area (currently is 4096 x 4096).
(WebCore::FilterEffect::isFilterSizeValid): Now it tests for
element area instead of a single dimension. This code is reused by
FilterEffectRenderer.
* platform/graphics/filters/FilterEffect.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::updateBackingStoreRect): Uses the
new function in FilterEffect to test for valid sizes.
(WebCore::FilterEffectRendererHelper::beginFilterEffect): Same case.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Test
for maximum area and properly changes the scale of transformed
element to fit.

LayoutTests:

The current patch fixes the rendering issue and at same time,
fixes some layer violations where FilterEffectRenderer and
RenderSVGResourceFilter were directly accessing the kMax value
in FilterEffect. Since before a somewhat bigger filter would
be aborted, it required to change the maximum kernel size
for blur filter (some filters are slower to run than others for
bigger SVGs).

* svg/filters/big-height-filter-expected.svg: Added.
* svg/filters/big-height-filter.svg: Added.
* svg/filters/big-width-filter-expected.svg: Added.
* svg/filters/big-width-filter.svg: Added.

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

7 years agoEnable breakpoints when adding a new breakpoint or enabling an existing breakpoint.
timothy@apple.com [Fri, 28 Feb 2014 22:54:18 +0000 (22:54 +0000)]
Enable breakpoints when adding a new breakpoint or enabling an existing breakpoint.

This eliminates a multi-step process for the user that can be confusing.

https://bugs.webkit.org/show_bug.cgi?id=129426

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsEnabledDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsToggleButtonClicked):

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

7 years agoProperly handle when Test.html is not present in Production builds.
timothy@apple.com [Fri, 28 Feb 2014 22:51:45 +0000 (22:51 +0000)]
Properly handle when Test.html is not present in Production builds.

https://bugs.webkit.org/show_bug.cgi?id=129506

Reviewed by Joseph Pecoraro.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController inspectorTestPagePath]):
(-[WebInspectorWindowController webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorTestPageURL):

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

7 years ago[iOS][WebKit2] Don't grab mach exception port on iOS
psolanki@apple.com [Fri, 28 Feb 2014 22:10:56 +0000 (22:10 +0000)]
[iOS][WebKit2] Don't grab mach exception port on iOS
https://bugs.webkit.org/show_bug.cgi?id=129505
<rdar://problem/15972749>

Reviewed by Anders Carlsson.

Don't grab the mach exception port on iOS so we get crash logs for web process and network
process.

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):

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

7 years agoAdd hiDPI support to DumpRenderTree/WebKitTestRunner without the need of reloading...
zalan@apple.com [Fri, 28 Feb 2014 21:43:18 +0000 (21:43 +0000)]
Add hiDPI support to DumpRenderTree/WebKitTestRunner without the need of reloading the test case.
https://bugs.webkit.org/show_bug.cgi?id=129438

Reviewed by Simon Fraser.

'hidpi-' prefixed test cases now trigger 2x scale factor on the testing
offscreen window. It makes testing subpixel rendering and positioning possible.

Both the offscreen window's and WebKit's scaling are set accordingly.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow): cleanup
(destroyWebViewAndOffscreenWindow): cleanup
(dumpRenderTree):
(changeWindowScaleIfNeeded):
(runTest):
* DumpRenderTree/mac/DumpRenderTreeWindow.h:
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
(-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]): cleanup
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::changeWindowScaleIfNeeded):
(WTR::TestInvocation::invoke):
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::changeWindowScaleIfNeeded):
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::changeWindowScaleIfNeeded):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded):

LayoutTests:

* fast/borders/hidpi-simple-hairline-border-painting-expected.html: Added.
* fast/borders/hidpi-simple-hairline-border-painting.html: Added.

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

7 years ago[Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
bfulgham@apple.com [Fri, 28 Feb 2014 21:12:54 +0000 (21:12 +0000)]
[Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
https://bugs.webkit.org/show_bug.cgi?id=129501
<rdar://problem/16198587>

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Correct order of arguments
to PlatformTextTrack.

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

7 years agoREGRESSION(r164835): It broke 10 JSC stress test on 32 bit platforms
oliver@apple.com [Fri, 28 Feb 2014 21:03:41 +0000 (21:03 +0000)]
REGRESSION(r164835): It broke 10 JSC stress test on 32 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=129488

Reviewed by Mark Lam.

Whoops, modify the right register.

* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):

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

7 years agoUnreviewed build fix after r164832.
bfulgham@apple.com [Fri, 28 Feb 2014 21:00:12 +0000 (21:00 +0000)]
Unreviewed build fix after r164832.

* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState): Switch from removed
'isValid' to 'state() != State::Running'

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

7 years agoFTL should be able to call sin/cos directly on platforms where the intrinsic is busted
fpizlo@apple.com [Fri, 28 Feb 2014 20:40:55 +0000 (20:40 +0000)]
FTL should be able to call sin/cos directly on platforms where the intrinsic is busted
https://bugs.webkit.org/show_bug.cgi?id=129503

Reviewed by Mark Lam.

* ftl/FTLIntrinsicRepository.h:
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleSin):
(JSC::FTL::Output::doubleCos):
(JSC::FTL::Output::intrinsicOrOperation):

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

7 years agoSource/WebKit2: VisitedLinkProvider should keep track of processes, not pages
andersca@apple.com [Fri, 28 Feb 2014 19:32:11 +0000 (19:32 +0000)]
Source/WebKit2: VisitedLinkProvider should keep track of processes, not pages
https://bugs.webkit.org/show_bug.cgi?id=129497

Reviewed by Dan Bernstein.

Use a counted set of WebProcessProxy pointers instead of a set of pages.

* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
Assert that m_processes is null.

(WebKit::VisitedLinkProvider::addProcess):
Add the process to the set.

(WebKit::VisitedLinkProvider::removeProcess):
Remove the process from the set.

* UIProcess/VisitedLinkProvider.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
If our process is currently running, add it to the visited link provider.
Otherwise it will be added in connectionWillOpen.

(WebKit::WebPageProxy::close):
If our process is running, remove it from the visited link provider.
Otherwise it's either crashed or not yet launched and will not have been added.

(WebKit::WebPageProxy::connectionWillOpen):
Add the process to the visited link provider.

(WebKit::WebPageProxy::resetStateAfterProcessExited):
Remove the process from the visited link provider.

Tools: Remove logging.

Reviewed by Dan Bernstein.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController browsingContextController:decidePolicyForNavigationAction:decisionHandler:]):

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

7 years agoProperly clear m_logicallyLastRun to remove use-after-free possibility
bjonesbe@adobe.com [Fri, 28 Feb 2014 19:19:03 +0000 (19:19 +0000)]
Properly clear m_logicallyLastRun to remove use-after-free possibility
https://bugs.webkit.org/show_bug.cgi?id=129489

Reviewed by David Hyatt.

A use-after-free issue was caught in Blink because m_logicallyLastRun
is not cleared when the item it points to is deleted. Clearing it
turns the use-after-free into a segfault, and prevents any future
use-after-frees from happening.

* platform/text/BidiRunList.h:
(WebCore::BidiRunList<Run>::deleteRuns):

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

7 years ago[Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
jer.noble@apple.com [Fri, 28 Feb 2014 18:59:00 +0000 (18:59 +0000)]
[Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
https://bugs.webkit.org/show_bug.cgi?id=129491

Reviewed by Alexey Proskuryakov.

-[NSWindow contentView] returns a bare id, leading to ambiguity when calling
certain methods, including -layer and -setLayer:. Resolve the ambiguity by
explicitly casting the -contentView call to a NSView*.

* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):

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

7 years agoparagraphs with different directionality in textarea with unicode-bidi: plaintext...
ap@apple.com [Fri, 28 Feb 2014 18:58:07 +0000 (18:58 +0000)]
paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
https://bugs.webkit.org/show_bug.cgi?id=71194

* platform/mac/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:
Updated Mac results for Mavericks (the original patch only updated Mountain Lion results).

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

7 years agoMouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
akling@apple.com [Fri, 28 Feb 2014 18:44:10 +0000 (18:44 +0000)]
MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
<https://webkit.org/b/129477>

Source/WebCore:

There's no need to compute the exact target-relative coordinates for
simulated mouse events, e.g those fired by HTMLElement.click().

The offsetX/Y properties are not supported by Firefox.

Test: fast/events/relative-offset-of-simulated-click.html

Reviewed by Alexey Proskuryakov.

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::offsetX):
(WebCore::MouseRelatedEvent::offsetY):

LayoutTests:

Add a test documenting the behavior of offsetX/Y on the simulated
mouse events that get sent by HTMLElement.click().

Reviewed by Alexey Proskuryakov.

* fast/events/relative-offset-of-simulated-click-expected.txt: Added.
* fast/events/relative-offset-of-simulated-click.html: Added.

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

7 years ago[CSS Grid Layout] Fix positioning grid items using named grid lines/areas
svillar@igalia.com [Fri, 28 Feb 2014 18:34:48 +0000 (18:34 +0000)]
[CSS Grid Layout] Fix positioning grid items using named grid lines/areas
https://bugs.webkit.org/show_bug.cgi?id=129372

Reviewed by Darin Adler.

Source/WebCore:

Our code was assuming that a <custom-ident> in
-webkit-grid-{column|row}-{start|end} and
-webkit-grid-{column|row} was always a grid area name. That's
wrong because the <custom-ident> could be also a explicitly named
grid line or the an implicitly named grid line created by a grid
area definition.

The style resolution code was not correct either. This patch fixes
it so it now matches the spec, which means that:
- first we try to match any existing grid area.
- then if there is a named grid line with the name
<custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
defined before the grid area then we use it instead of the grid
area.
- otherwise if there is a named grid line we resolve to the first such line.
- otherwise we treat it as 'auto'.

Fixing this uncovered a bug in GridPosition, we were not using the
name of the stored grid area to check if two GridPositions were
the same.

Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
       fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html

* css/StyleResolver.cpp:
(WebCore::gridLineDefinedBeforeGridArea): New function to check if
a given named grid line was defined before an implicit named grid
line created by a grid area definition.
(WebCore::StyleResolver::adjustNamedGridItemPosition): New
function that adjusts the position of a GridPosition parsed as a
grid area.
(WebCore::StyleResolver::adjustGridItemPosition): Use the new
function adjustNamedGridItemPosition to adjust the positions of
named grid lines.
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
(WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
* rendering/RenderGrid.h:
* rendering/style/GridPosition.h:
(WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
(WebCore::GridPosition::adjustGridPositionForSide): Ditto.
(WebCore::GridPosition::operator==): Use the named grid line to check equality.

LayoutTests:

Added a new test that checks that we correctly position grid items
using named grid lines, grid areas and also with the implicit
named grid lines created by grid areas.

I'm also importing a test from Blink that checks that we can
dynamically change the position of a grid item by changing the
name of the grid lines used to position it.

* fast/css-grid-layout/grid-item-position-changed-dynamic-expected.txt:
Merged from Blink r153913 by <jchaffraix@chromium.org>.
* fast/css-grid-layout/grid-item-position-changed-dynamic.html: Ditto.
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution-expected.txt: Added.
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html: Added.

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

7 years ago[CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
zoltan@webkit.org [Fri, 28 Feb 2014 18:14:41 +0000 (18:14 +0000)]
[CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
https://bugs.webkit.org/show_bug.cgi?id=129461

Reviewed by David Hyatt.

Shape-inside can make a line only narrower than the original line width, thus we don't need
to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
This patch adds a helper function, which updates the line segments, furthermore it updates the
line segments only when the content would fit without the shape.

No new tests, no behavior change.

* rendering/line/BreakingContextInlineHeaders.h: Use new helper.
(WebCore::updateSegmentsForShapes):
* rendering/line/LineWidth.cpp: Use new helper.
(WebCore::LineWidth::updateLineSegment): Add new helper.
(WebCore::LineWidth::fitBelowFloats):

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

7 years agoparagraphs with different directionality in textarea with unicode-bidi: plaintext...
mario.prada@samsung.com [Fri, 28 Feb 2014 18:12:52 +0000 (18:12 +0000)]
paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
https://bugs.webkit.org/show_bug.cgi?id=71194

Reviewed by David Hyatt.

Merged from Blink r157263 by <igor.o@sisa.samsung.com>
<https://src.chromium.org/viewvc/blink?revision=157263&view=revision>

Source/WebCore:

In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):

The start and end edges of a line box are determined by the inline
base direction of the line box. In most cases, this is given by
its containing block's computed ‘direction’. However if its
containing block has ‘unicode-bidi: plaintext’, the inline base
direction the line box must be determined by the base direction of
the bidi paragraph to which it belongs: that is, the bidi
paragraph for which the line box holds content.

This patch just implements the behavior described above modifying
updateLogicalWidthForAlignment and setting the bidi level of the
RootInlineBox.

* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):

LayoutTests:

Modified expectations for two layout tests to make them conforming to the spec.

* fast/text/international/unicode-bidi-plaintext-expected.html:
* platform/gtk/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:
* platform/mac-mountainlion/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:

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

7 years agoUpdate meta-referrer behavior for invalid policies
jochen@chromium.org [Fri, 28 Feb 2014 18:09:24 +0000 (18:09 +0000)]
Update meta-referrer behavior for invalid policies
https://bugs.webkit.org/show_bug.cgi?id=129475

Source/WebCore:

This patch aligns the behavior with the CSP 1.1 referrer directive,
where the fallback for an invalid value is the "never" policy.

Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627

Reviewed by Alexey Proskuryakov.

Test: http/tests/security/referrer-policy-invalid.html

* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):

LayoutTests:

Reviewed by Alexey Proskuryakov.

* http/tests/security/referrer-policy-invalid-expected.txt: Added.
* http/tests/security/referrer-policy-invalid.html: Added.

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

7 years ago[iOS] DumpRenderTree Perl Support may build against wrong SDK and toolchain
dbates@webkit.org [Fri, 28 Feb 2014 17:53:30 +0000 (17:53 +0000)]
[iOS] DumpRenderTree Perl Support may build against wrong SDK and toolchain
https://bugs.webkit.org/show_bug.cgi?id=129163

Reviewed by David Kilzer.

Fixes an issue where DumpRenderTree Perl Support may build with the specified
iOS Simulator SDK and toolchain instead of using the OS X SDK and toolchain.
This issue manifests itself in a build failure when building the IPhoneSimulatorNotification
bundle.

Currently we build DumpRenderTree Perl Support with respect to the variable SDKROOT,
which is specified either explicitly when building with MAKE(1) or implicitly by
build-{dumprendertree, webkit}. Instead we should always build Perl Support using
the OS X SDK and toolchain since the built products are only applicable to OS X.

* DumpRenderTree/ios/PerlSupport/Makefile:

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

7 years agoFix !ENABLE(GGC) builds
mhahnenberg@apple.com [Fri, 28 Feb 2014 17:46:12 +0000 (17:46 +0000)]
Fix !ENABLE(GGC) builds

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::gatherJSStackRoots): Also fix one of the names of the GC phases.

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

7 years agoSubresourceLoader::didFinishLoading() should not assert when a decode error occurs
dbates@webkit.org [Fri, 28 Feb 2014 17:30:36 +0000 (17:30 +0000)]
SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
https://bugs.webkit.org/show_bug.cgi?id=127029

Reviewed by Darin Adler.

Source/WebCore:

SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
the maximum decoded size (Settings::maximumDecodedImageSize()).

Test: fast/images/decoded-size-exceeds-max-decoded-size.html

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):

LayoutTests:

Added a test to ensure that we don't cause an assertion failure when an image fails
to load because of a decode error. In particular, the estimated decoded image size
exceeds the maximum decoded image size.

* fast/images/decoded-size-exceeds-max-decoded-size-expected.txt: Added.
* fast/images/decoded-size-exceeds-max-decoded-size.html: Added.

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