Timeline



Mar 2, 2014:

11:10 PM Changeset in webkit [164972] by benjamin@webkit.org
  • 3 edits in trunk/Source/WebCore

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.

10:01 PM Changeset in webkit [164971] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

PolymorphicPutByIdList should have a simpler construction API with basically a single entrypoint
https://bugs.webkit.org/show_bug.cgi?id=129591

Reviewed by Michael Saboff.

  • bytecode/PolymorphicPutByIdList.cpp:

(JSC::PutByIdAccess::fromStructureStubInfo): This function can figure out the slow path target for itself.
(JSC::PolymorphicPutByIdList::PolymorphicPutByIdList): This constuctor should be private, only from() should call it.
(JSC::PolymorphicPutByIdList::from):

  • bytecode/PolymorphicPutByIdList.h:

(JSC::PutByIdAccess::stubRoutine):

  • jit/Repatch.cpp:

(JSC::tryBuildPutByIdList): Don't pass the slow path target since it can be derived from the stubInfo.

9:42 PM Changeset in webkit [164970] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Debugging improvements from my gbemu investigation session
https://bugs.webkit.org/show_bug.cgi?id=129599

Reviewed by Mark Lam.

Various improvements from when I was investigating bug 129411.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::optimizationThresholdScalingFactor): Make the dataLog() statement print the actual multiplier.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionDescribe): Make describe() return a string rather than printing the string.
(functionDescribeArray): Like describe(), but prints details about arrays.

9:33 PM Changeset in webkit [164969] by akling@apple.com
  • 2 edits in trunk/Source/WebKit

Blind Windows build fix.

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

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

9:10 PM Changeset in webkit [164968] by akling@apple.com
  • 45 edits in trunk/Source

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.

8:49 PM Changeset in webkit [164967] by timothy@apple.com
  • 5 edits in trunk

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.
7:42 PM Changeset in webkit [164966] by BJ Burg
  • 4 edits in trunk

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:
7:24 PM Changeset in webkit [164965] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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):

6:30 PM Changeset in webkit [164964] by Darin Adler
  • 33 edits in trunk/Source

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.
6:27 PM Debugging With Xcode edited by BJ Burg
WKTR debugging tips (diff)
6:22 PM Debugging With Xcode edited by BJ Burg
(diff)
6:20 PM Debugging With LLDB or GDB edited by BJ Burg
(diff)
6:15 PM Debugging With Xcode created by BJ Burg
6:11 PM Debugging With LLDB or GDB created by BJ Burg
6:07 PM Changeset in webkit [164963] by enrica@apple.com
  • 7 edits in trunk/Source/WebKit2

[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):

6:05 PM WikiStart edited by BJ Burg
(diff)
6:03 PM WikiStart edited by BJ Burg
Simplify the different platform debugging page links (diff)
6:00 PM Changeset in webkit [164962] by ljaehun.lim@samsung.com
  • 3 edits in trunk/Source/WTF

[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):

5:56 PM Debugging With Visual Studio edited by BJ Burg
merge WK2 instructions (diff)
5:52 PM WikiStart edited by BJ Burg
(diff)
5:52 PM Debugging With Visual Studio edited by BJ Burg
Fold in details from separate page about DumpRenderTree + VS (diff)
5:48 PM Changeset in webkit [164961] by benjamin@webkit.org
  • 3 edits in trunk/Source/WebCore

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.

5:44 PM Debugging With Visual Studio edited by BJ Burg
restructure sections into wk1/wk2/test runners/misc. (diff)
5:37 PM Changeset in webkit [164960] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Fix build for case-sensitive file systems.

  • platform/UserActivity.h: Runloop -> RunLoop.
5:24 PM Changeset in webkit [164959] by barraclough@apple.com
  • 3 edits in trunk/Source/WebCore

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:
5:16 PM Changeset in webkit [164958] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Try to fix the 32-bit build.

  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(adjustedFontSize):

5:02 PM Changeset in webkit [164957] by Darin Adler
  • 10 edits
    1 add in trunk

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.

4:30 PM Changeset in webkit [164956] by weinig@apple.com
  • 2 edits in trunk/Source/WebKit2

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.

4:19 PM Changeset in webkit [164955] by enrica@apple.com
  • 17 edits
    3 adds in trunk/Source

[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):

4:03 PM Changeset in webkit [164954] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

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):

3:14 PM Changeset in webkit [164953] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

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):

3:13 PM Changeset in webkit [164952] by benjamin@webkit.org
  • 10 edits in trunk/Source

[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):

2:35 PM Changeset in webkit [164951] by Darin Adler
  • 5 edits
    1 add in trunk

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.

2:26 PM Changeset in webkit [164950] by dino@apple.com
  • 5 edits
    2 adds in trunk

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.
2:22 PM Changeset in webkit [164949] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk

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):

12:44 PM Changeset in webkit [164948] by barraclough@apple.com
  • 11 edits
    1 copy in trunk/Source/WebCore

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.
12:34 PM Changeset in webkit [164947] by BJ Burg
  • 5 edits in trunk/Source/WebCore

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):

11:52 AM Changeset in webkit [164946] by krit@webkit.org
  • 9 edits in trunk/LayoutTests

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:
11:36 AM Changeset in webkit [164945] by Darin Adler
  • 6 edits in trunk/Source

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.
10:25 AM Changeset in webkit [164944] by krit@webkit.org
  • 5 edits in trunk/LayoutTests

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:
9:55 AM Changeset in webkit [164943] by commit-queue@webkit.org
  • 8 edits in trunk

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.

9:19 AM Changeset in webkit [164942] by Darin Adler
  • 6 edits in trunk/Source/WTF

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.
7:36 AM Changeset in webkit [164941] by thiago.lacerda@openbossa.org
  • 7 edits
    1 delete in trunk/LayoutTests

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:
6:59 AM Changeset in webkit [164940] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[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:
6:56 AM Changeset in webkit [164939] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[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:

Mar 1, 2014:

9:35 PM Changeset in webkit [164938] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix the Mac build.

  • UIProcess/mac/ViewGestureController.messages.in:
9:25 PM Changeset in webkit [164937] by timothy_horton@apple.com
  • 20 edits
    3 adds in trunk/Source

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.

7:58 PM Changeset in webkit [164936] by commit-queue@webkit.org
  • 5 edits
    4 deletes in trunk

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):

7:45 PM Changeset in webkit [164935] by fpizlo@apple.com
  • 2 edits
    1 move in trunk

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.
4:35 PM Changeset in webkit [164934] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix.

  • html/parser/HTMLParserIdioms.cpp: Removed an unused function.
4:20 PM Changeset in webkit [164933] by ddkilzer@apple.com
  • 3 edits
    2 adds in trunk

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.
3:50 PM Changeset in webkit [164932] by benjamin@webkit.org
  • 3 edits
    2 adds in trunk

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.
3:31 PM Changeset in webkit [164931] by psolanki@apple.com
  • 4 edits in trunk/Source

[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:]):

3:30 PM Changeset in webkit [164930] by Darin Adler
  • 2 edits in trunk/Websites/webkit.org

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.

3:28 PM Changeset in webkit [164929] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk

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):

3:22 PM Changeset in webkit [164928] by Darin Adler
  • 6 edits in trunk/Source/WebCore

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.

3:05 PM Changeset in webkit [164927] by akling@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

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):

2:27 PM Changeset in webkit [164926] by cavalcantii@gmail.com
  • 2 edits in trunk/LayoutTests

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.

2:21 PM Changeset in webkit [164925] by akling@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

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):

2:09 PM Changeset in webkit [164924] by benjamin@webkit.org
  • 7 edits
    2 adds in trunk

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.
11:57 AM Changeset in webkit [164923] by fpizlo@apple.com
  • 10 edits
    2 adds in trunk/Source/JavaScriptCore

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.
11:42 AM Changeset in webkit [164922] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, uncomment some code. It wasn't meant to be commented in the first place.

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):

10:48 AM Changeset in webkit [164921] by timothy@apple.com
  • 4 edits in trunk/Source/WebInspectorUI

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.

10:48 AM Changeset in webkit [164920] by ap@apple.com
  • 9 edits in trunk

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:
10:46 AM Changeset in webkit [164919] by timothy@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

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):

9:51 AM Changeset in webkit [164918] by timothy@apple.com
  • 5 edits in trunk/Source/WebInspectorUI

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):

8:26 AM Changeset in webkit [164917] by ddkilzer@apple.com
  • 8 edits
    1 move
    2 adds in trunk

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.
1:35 AM Changeset in webkit [164916] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

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.

1:08 AM Changeset in webkit [164915] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

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.

1:01 AM Changeset in webkit [164914] by barraclough@apple.com
  • 5 edits in trunk/Source/WebCore

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.
12:49 AM Changeset in webkit [164913] by barraclough@apple.com
  • 16 edits
    1 copy in trunk/Source

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.
12:35 AM Changeset in webkit [164912] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

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):

Note: See TracTimeline for information about the timeline view.