WebKit-https.git
7 years agoModernize the toRenderSVGResourceContainer() helper.
akling@apple.com [Mon, 3 Feb 2014 04:50:00 +0000 (04:50 +0000)]
Modernize the toRenderSVGResourceContainer() helper.
<https://webkit.org/b/128091>

Make toRenderSVGResourceContainer() a free function like all the
other casting helpers. Use references instead of pointers where
applicable.

Reviewed by Anders Carlsson.

* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):

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

7 years agoMinor SVGRootInlineBox cleanup.
akling@apple.com [Mon, 3 Feb 2014 04:44:10 +0000 (04:44 +0000)]
Minor SVGRootInlineBox cleanup.
<https://webkit.org/b/128094>

Remove two virtual functions and sprinkle some missing overrides.

Reviewed by Anders Carlsson.

* rendering/svg/SVGRootInlineBox.h:

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

7 years agoI forgot to save the changelog prior to submitting.
oliver@apple.com [Mon, 3 Feb 2014 02:35:22 +0000 (02:35 +0000)]
I forgot to save the changelog prior to submitting.

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

7 years agoPush DOM attributes into the prototype chain
oliver@apple.com [Mon, 3 Feb 2014 02:25:18 +0000 (02:25 +0000)]
Push DOM attributes into the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=127969

Reviewed by Mark Lam.

Source/WebCore:

Start redoing code generation for attributes.

* bindings/js/JSDOMBinding.h:
(WebCore::getStaticPropertySlotEntryWithoutCaching):
(WebCore::getStaticPropertySlotEntryWithoutCaching<JSDOMWrapper>):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(HasComplexGetOwnProperty):
(ConstructorShouldBeOnInstance):
(AttributeShouldBeOnInstance):
(InstanceAttributeCount):
(PrototypeAttributeCount):
(InstanceOverridesGetOwnPropertySlot):
(PrototypeOverridesGetOwnPropertySlot):
(GenerateAttributesHashTable):
(GenerateImplementation):

LayoutTests:

Update layout test results

* fast/dom/wrapper-classes-expected.txt:
* js/dom/constructor-attributes-expected.txt:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* js/dom/script-tests/constructor-attributes.js:

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

7 years agoRenderSVGResourceContainer clients are always RenderElement.
akling@apple.com [Mon, 3 Feb 2014 02:15:13 +0000 (02:15 +0000)]
RenderSVGResourceContainer clients are always RenderElement.
<https://webkit.org/b/128088>

All clients of RenderSVGResourceContainer are going to be RenderElement,
so make the interface take RenderElement& instead of RenderObject*.

Also modernized the code a bit with C++11 range for loops.

Reviewed by Sam Weinig.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::addClient):
(WebCore::RenderSVGResourceContainer::removeClient):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::addResourcesFromRenderer):
(WebCore::SVGResourcesCache::removeResourcesFromRenderer):

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

7 years agoSubpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
zalan@apple.com [Mon, 3 Feb 2014 01:40:12 +0000 (01:40 +0000)]
Subpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
https://bugs.webkit.org/show_bug.cgi?id=128075

Reviewed by Darin Adler.

No change in functionality.

* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):

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

7 years agoSVGDocumentExtensions::resourcesCache() should return a reference.
akling@apple.com [Mon, 3 Feb 2014 01:05:01 +0000 (01:05 +0000)]
SVGDocumentExtensions::resourcesCache() should return a reference.
<https://webkit.org/b/128087>

The SVGResourcesCache is always present when the Document is using
SVG extensions, so make this return a reference and propagate that
knowledge to the call site.

This gets rid of an assertion and some rickety looking ->'s.
Also converted a loop to use C++11 range for syntax.

Reviewed by Sam Weinig.

* rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
(WebCore::SVGResourcesCache::clientDestroyed):
(WebCore::SVGResourcesCache::resourceDestroyed):
* svg/SVGDocumentExtensions.h:
(WebCore::SVGDocumentExtensions::resourcesCache):

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

7 years agoRenderSVGInlineText::computeNewScaledFontForStyle() should take references.
akling@apple.com [Mon, 3 Feb 2014 01:03:48 +0000 (01:03 +0000)]
RenderSVGInlineText::computeNewScaledFontForStyle() should take references.
<https://webkit.org/b/128086>

Make computeNewScaledFontForStyle() take renderer and style by reference
instead of taking a pointer and asserting that it's non-null.

Reviewed by Darin Adler.

* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::updateScaledFont):
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
* rendering/svg/SVGRenderingContext.h:

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

7 years agoStill more characters -> deprecatedCharacters (EWS keeps finding more)
darin@apple.com [Mon, 3 Feb 2014 00:38:36 +0000 (00:38 +0000)]
Still more characters -> deprecatedCharacters (EWS keeps finding more)
https://bugs.webkit.org/show_bug.cgi?id=128076

Reviewed by Andreas Kling.

Source/WebCore:

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
Use deprecatedCharacters.

Source/WebKit/win:

* AccessibleTextImpl.cpp:
(AccessibleText::get_text):
(AccessibleText::get_textBeforeOffset):
(AccessibleText::get_textAfterOffset):
(AccessibleText::get_textAtOffset):
(AccessibleText::get_attributes):
* DOMCSSClasses.cpp:
(DOMCSSStyleDeclaration::getPropertyValue):
* DOMCoreClasses.cpp:
(DOMNode::nodeValue):
(DOMElement::getAttribute):
(DOMElement::font):
* DOMHTMLClasses.cpp:
(DOMHTMLElement::innerText):
(DOMHTMLFormElement::action):
(DOMHTMLFormElement::method):
(DOMHTMLInputElement::value):
(DOMHTMLTextAreaElement::value):
* MarshallingHelpers.cpp:
(MarshallingHelpers::PathStringToFileCFURLRef):
* WebDataSource.cpp:
(WebDataSource::unreachableURL):
* WebDownload.cpp:
(WebDownload::bundlePathForTargetPath):
* WebDownloadCFNet.cpp:
(WebDownload::didFinish):
* WebElementPropertyBag.cpp:
(convertStringToVariant):
* WebFrame.cpp:
(WebFrame::searchForLabelsBeforeElement):
(WebFrame::matchLabelsAgainstElement):
* WebHistory.cpp:
(WebHistory::addVisitedLinksToPageGroup):
* WebKitGraphics.cpp:
(CenterTruncateStringToWidth):
(RightTruncateStringToWidth):
* WebView.cpp:
(WebView::applicationNameForUserAgent):
(WebView::customUserAgent):
(WebView::groupName):
(WebView::selectedText):
(WebView::onIMERequestReconvertString):
Use deprecatedCharacters.

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

7 years agoRepatch code is passing the wrong args to lookupExceptionHandler.
mark.lam@apple.com [Mon, 3 Feb 2014 00:22:37 +0000 (00:22 +0000)]
Repatch code is passing the wrong args to lookupExceptionHandler.
<https://webkit.org/b/128085>

Reviewed by Oliver Hunt.

lookupExceptionHandler() is expecting 2 args: VM*, ExecState*.
The repatch code was only passing an ExecState*. A crash ensues.
This is now fixed.

* jit/JIT.cpp:
(JSC::JIT::privateCompileExceptionHandlers):
* jit/Repatch.cpp:
(JSC::generateProtoChainAccessStub):

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

7 years agoWK2: Selection is non editable content is not cleared when navigating to a different...
enrica@apple.com [Sun, 2 Feb 2014 23:46:01 +0000 (23:46 +0000)]
WK2: Selection is non editable content is not cleared when navigating to a different page.
https://bugs.webkit.org/show_bug.cgi?id=128084
<rdar://problem/15966166>

Reviewed by Dan Bernstein.

When resigning first responder, we need to cleanup the selection.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView resignFirstResponder]):

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

7 years agoSubpixel rendering: Enable subpixel positioning/sizing/hairline border painting.
zalan@apple.com [Sun, 2 Feb 2014 21:59:01 +0000 (21:59 +0000)]
Subpixel rendering: Enable subpixel positioning/sizing/hairline border painting.
https://bugs.webkit.org/show_bug.cgi?id=128009

Reviewed by Simon Fraser.

Snap and clip to device pixels when painting boxes. Enable hairline painting
for solid border.

No existing context to test this functionality yet.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getRoundedBorderFor):
(WebCore::RenderStyle::getRoundedInnerBorderFor):

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

7 years agoAdd some missing override keywords
weinig@apple.com [Sun, 2 Feb 2014 21:56:15 +0000 (21:56 +0000)]
Add some missing override keywords
https://bugs.webkit.org/show_bug.cgi?id=128082

Reviewed by Antti Koivisto.

* loader/DocumentThreadableLoader.h:
* loader/LinkLoader.h:
* loader/TextTrackLoader.h:
* xml/parser/XMLDocumentParser.h:

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

7 years agoUnreviewed Mac gardering after r163265.
zalan@apple.com [Sun, 2 Feb 2014 21:07:40 +0000 (21:07 +0000)]
Unreviewed Mac gardering after r163265.

* platform/mac/TestExpectations:

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

7 years agoWK2: Cannot focus a second field in a page after the first has been focused.
enrica@apple.com [Sun, 2 Feb 2014 20:37:17 +0000 (20:37 +0000)]
WK2: Cannot focus a second field in a page after the first has been focused.
https://bugs.webkit.org/show_bug.cgi?id=128055
<rdar://problem/15943652>

Reviewed by Simon Fraser.

When handling singleTap, we always need to send
a click to WebKit when we are already interacting with text.
Also, when we stop assisting the node, we should not call
resign responder, since that will trigger another unwanted blur.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView _singleTapRecognized:]):
(-[WKInteractionView _stopAssistingNode]):

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

7 years agoWebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP...
dbates@webkit.org [Sun, 2 Feb 2014 20:31:03 +0000 (20:31 +0000)]
WebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP credentials once per page load
https://bugs.webkit.org/show_bug.cgi?id=127849

I inadvertently used the equality operator instead of the identity operator when comparing the
value of the error HTTP status code with the numeric literal 401.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update):

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

7 years agoAttempt to fix production dashboard after <http://trac.webkit.org/changeset/163222>
dbates@webkit.org [Sun, 2 Feb 2014 20:29:50 +0000 (20:29 +0000)]
Attempt to fix production dashboard after <trac.webkit.org/changeset/163222>

Actually pass option dictionary to JSON.load(); JSON.load() takes four arguments with the
last-most argument being the option dictionary.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update):

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

7 years agoIDB: Support IDBFactory.deleteDatabase()
beidson@apple.com [Sun, 2 Feb 2014 19:55:25 +0000 (19:55 +0000)]
IDB: Support IDBFactory.deleteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=128060

Reviewed by Filip Pizlo and Maciej Stachowiak (filesystem parts also Tim Hatcher and Simon Fraser)

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::deleteDatabaseAsync):

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::deleteDatabase):

Change factory-level deleteDatabase to take opening and main frame origins:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

* WebCore.exp.in:

Source/WebKit2:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::deleteDatabase):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::calculateAbsoluteDatabaseFilename): Central place to
  calculate the database filename.
(WebKit::UniqueIDBDatabase::unregisterConnection):
(WebKit::UniqueIDBDatabase::shutdown): Pass shutdown type along.
(WebKit::UniqueIDBDatabase::shutdownBackingStore): If this is a delete shutdown, delete the DB.
(WebKit::UniqueIDBDatabase::didShutdownBackingStore):
(WebKit::UniqueIDBDatabase::deleteDatabase):
(WebKit::UniqueIDBDatabase::postMainThreadTask): All some tasks to bypass the no-more-request restriction.
(WebKit::UniqueIDBDatabase::postDatabaseTask): Ditto.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Use
  calculateAbsoluteDatabaseFilename from UniqueIDBDatabase.

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::open): Update logging channel.
(WebKit::WebIDBFactoryBackend::deleteDatabase): Implement.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

* Shared/WebCrossThreadCopier.h:

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

7 years agoSubpixel rendering: Introduce device pixel snapping helper functions.
zalan@apple.com [Sun, 2 Feb 2014 18:38:45 +0000 (18:38 +0000)]
Subpixel rendering: Introduce device pixel snapping helper functions.
https://bugs.webkit.org/show_bug.cgi?id=128049

Reviewed by Simon Fraser.

These functions help device pixel snapping during painting. They follow the logic of
the corresponding pixelSnappedInt* functions.

No change in functionality.

* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
(WebCore::snapSizeToPixel):
(WebCore::snapSizeToDevicePixel):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::pixelSnappingFactor):
* platform/graphics/LayoutRect.h:
(WebCore::pixelSnappedForPainting):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):

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

7 years agoFloor thickness and length after switching from int to float.
zalan@apple.com [Sun, 2 Feb 2014 17:44:48 +0000 (17:44 +0000)]
Floor thickness and length after switching from int to float.
https://bugs.webkit.org/show_bug.cgi?id=128071

Reviewed by Antti Koivisto.

This is a temporary solution to fix the assertion on empty line drawing until after
device pixel snapping is added.

Covered by existing tests.

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

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

7 years agoRemove StyleScopeResolver
antti@apple.com [Sun, 2 Feb 2014 17:27:02 +0000 (17:27 +0000)]
Remove StyleScopeResolver
https://bugs.webkit.org/show_bug.cgi?id=128069

Reviewed by Anders Carlsson.

This is dead code.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
(WebCore::DocumentRuleSets::collectFeatures):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::pushParentElement):
(WebCore::StyleResolver::popParentElement):
(WebCore::StyleResolver::locateSharedStyle):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
(WebCore::StyleResolver::document):
* css/StyleScopeResolver.cpp: Removed.
* css/StyleScopeResolver.h: Removed.
* style/StyleResolveTree.cpp:
(WebCore::Style::attachShadowRoot):
(WebCore::Style::resolveShadowTree):

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

7 years agoSubpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
zalan@apple.com [Sun, 2 Feb 2014 16:15:20 +0000 (16:15 +0000)]
Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
https://bugs.webkit.org/show_bug.cgi?id=128036

Reviewed by Darin Adler.

Source/WebCore:

Covered by existing tests.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::operator++):
* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::usedWidth):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::calculateSideRectIncludingInner):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:
* rendering/style/BorderData.h:
(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):
* rendering/style/RenderStyle.cpp:
(WebCore::calcRadiiFor):
(WebCore::calcConstraintScaleFor):
(WebCore::RenderStyle::getRoundedInnerBorderFor):
* rendering/style/RenderStyle.h:

LayoutTests:

Bug 128061: Subpixel rendering: borders are reporting float values.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

7 years agoREGRESSION(r163234) Debug build is broken
commit-queue@webkit.org [Sun, 2 Feb 2014 08:02:27 +0000 (08:02 +0000)]
REGRESSION(r163234) Debug build is broken
https://bugs.webkit.org/show_bug.cgi?id=128059

Unreviewed. Debug build is broken with INDEXED_DATABASE.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2014-02-01

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString): Added the default: case.

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

7 years agoSubpixel rendering: LayoutUnit operator++ is broken.
zalan@apple.com [Sun, 2 Feb 2014 07:45:32 +0000 (07:45 +0000)]
Subpixel rendering: LayoutUnit operator++ is broken.
https://bugs.webkit.org/show_bug.cgi?id=128056

Reviewed by Darin Adler.

Add pre-increment operator++.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::operator++):

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

7 years agoJSC profiler's stub info profiling support should work again
fpizlo@apple.com [Sun, 2 Feb 2014 06:38:51 +0000 (06:38 +0000)]
JSC profiler's stub info profiling support should work again
https://bugs.webkit.org/show_bug.cgi?id=128057

Reviewed by Mark Lam.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdCacheStatus): We want to know if the cache was ever reset by GC, since the DFG uses this information.
(JSC::CodeBlock::printLocationAndOp): This shouldn't have been inline.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Ditto.
(JSC::CodeBlock::dumpBytecode): Dump the profiling field, and make sure that the caller can pass a StubInfoMap, which is necessary for dumping StructureStubInfo profiling.
* bytecode/CodeBlock.h: Out-of-line some methods and add the StubInfoMap parameter.
* profiler/ProfilerBytecodeSequence.cpp:
(JSC::Profiler::BytecodeSequence::BytecodeSequence): Create a StubInfoMap before dumping bytecodes.

Tools:

* Scripts/display-profiler-output: Just make sure that there's always a space between the origin stack dump and the top bytecode index.

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

7 years agoMore characters -> deprecatedCharacters (based on more EWS complaints)
darin@apple.com [Sun, 2 Feb 2014 06:38:18 +0000 (06:38 +0000)]
More characters -> deprecatedCharacters (based on more EWS complaints)
https://bugs.webkit.org/show_bug.cgi?id=128063

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/SmartReplace.cpp:
(WebCore::addAllCodePoints):
(WebCore::getSmartSet):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
Use deprecatedCharacters.

Source/WebKit2:

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::truncateToSingleLine): Use deprecatedCharacters.

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

7 years agoUse deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
darin@apple.com [Sun, 2 Feb 2014 04:59:36 +0000 (04:59 +0000)]
Use deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
https://bugs.webkit.org/show_bug.cgi?id=128042

Reviewed by Sam Weinig.

* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeString):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::createGDIFont):
(WebCore::FontCache::getTraitsInFamily):
* platform/network/DataURL.cpp:
(WebCore::handleDataURL):
* platform/win/BString.cpp:
(WebCore::BString::BString):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::createGlobalData):
* platform/win/FileSystemWin.cpp:
(WebCore::pathByAppendingComponent):
(WebCore::fileSystemRepresentation):
* platform/win/PasteboardWin.cpp:
(WebCore::filesystemPathFromUrlOrTitle):
(WebCore::Pasteboard::writeURLToDataObject):
(WebCore::createGlobalImageFileDescriptor):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
Call deprecatedCharacters instead of characters.

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

7 years agoSpeculative OSX build fix.
enrica@apple.com [Sun, 2 Feb 2014 02:45:52 +0000 (02:45 +0000)]
Speculative OSX build fix.

Excluding WKActionSheet.mm and WKActionSheetAssistant.mm.

* Configurations/WebKit2.xcconfig:

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

7 years agoAdd support for ActionSheets in WK2 for iOS.
enrica@apple.com [Sun, 2 Feb 2014 02:37:43 +0000 (02:37 +0000)]
Add support for ActionSheets in WK2 for iOS.
https://bugs.webkit.org/show_bug.cgi?id=127586
<rdar://problem/15283667>

Reviewed by Benjamin Poulain.

Source/WebCore:

Updates the localizable strings for action sheets.

* English.lproj/Localizable.strings:

Source/WebKit2:

This patch adds the default support for Action Sheets
in WK2 for iOS. WKActionSheet is the implementation of the
sheet itself that inherits from UIActionSheet and handles
the repositioning of the sheet after rotation for iPad.
WKActionSheetAssistant is the controller class that implements
the delegate methods, controls the lifetime of the action sheet
object and performs the actions.
We have 3 different types of sheets:
   - link sheet, displayed when the target element is a link
   - image sheet, when the target element is an image
   - data detector sheet when the target is an element
     recognized by the data detectors library.
Both link and image sheet have a set of default buttons, whereas
datadetector sheet in only populated by custom actions provided
by data detectors.
The link sheet provides the following default actions:
    - open, navigates to the URL
    - copy, copies the URL to the pasteboard
    - add to reading list
The image sheet provides the following actions depending on whether
the image is contained inside an anchor element or not.
If the image is NOT inside a link the following actions are provided:
   - copy, copies the image to the pasteboard
   - save image, saves the image in the photo library
Instead, if the image is inside an link:
   - open, navigates to the URL spcified by the link
   - copy, copies the link URL to the pasteboard
    - save image, saves the image in the photo library
    - add to reading list, adds the link URL to reading list.

* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
* Shared/ios/WKGestureTypes.h:
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::saveImageToLibrary):
* UIProcess/API/ios/WKActionSheet.h: Added.
* UIProcess/API/ios/WKActionSheet.mm: Added.
(-[WKActionSheet initWithView:]):
(-[WKActionSheet dealloc]):
(-[WKActionSheet presentSheet]):
(-[WKActionSheet presentSheetFromRect:]):
(-[WKActionSheet doneWithSheet]):
(-[WKActionSheet willRotate]):
(-[WKActionSheet updateSheetPosition]):
(-[WKActionSheet didRotate]):
(-[WKElementActionInfo initWithInfo:location:title:rect:]):
(-[WKElementActionInfo dealloc]):
(-[WKElementAction initWithTitle:actionHandler:type:]):
(-[WKElementAction dealloc]):
(+[WKElementAction customElementActionWithTitle:actionHandler:]):
(copyElement):
(saveImage):
(addToReadingList):
(+[WKElementAction standardElementActionWithType:customTitle:]):
(+[WKElementAction standardElementActionWithType:]):
(-[WKElementAction runActionWithElementInfo:view:]):
* UIProcess/API/ios/WKActionSheetAssistant.h: Added.
* UIProcess/API/ios/WKActionSheetAssistant.mm: Added.
(-[WKActionSheetAssistant initWithView:]):
(-[WKActionSheetAssistant dealloc]):
(-[WKActionSheetAssistant setPage:WebKit::]):
(-[WKActionSheetAssistant superviewForSheet]):
(-[WKActionSheetAssistant _presentationRectForSheetGivenPoint:inHostView:]):
(-[WKActionSheetAssistant hostViewForSheet]):
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentSheet]):
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
(-[WKActionSheetAssistant updateSheetPosition]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/API/ios/WKInteractionView.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView initWithFrame:]):
(-[WKInteractionView dealloc]):
(-[WKInteractionView setPage:WebKit::]):
(-[WKInteractionView _showImageSheet]):
(-[WKInteractionView _showLinkSheet]):
(-[WKInteractionView _showDataDetectorsSheet]):
(-[WKInteractionView _actionForLongPress]):
(-[WKInteractionView _updatePositionInformation]):
(-[WKInteractionView _longPressRecognized:]):
(-[WKInteractionView _positionInformationDidChange:]):
(-[WKInteractionView _performAction:]):
(-[WKInteractionView _updateAccessory]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startInteractionWithElementAtPosition):
(WebKit::WebPageProxy::stopInteraction):
(WebKit::WebPageProxy::performActionOnElement):
(WebKit::WebPageProxy::saveImageToLibrary):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement):
(WebKit::WebPage::getPositionInformation):
(WebKit::WebPage::startInteractionWithElementAtPosition):
(WebKit::WebPage::stopInteraction):
(WebKit::WebPage::performActionOnElement):

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

7 years agoJSC profiler should show reasons for jettison
fpizlo@apple.com [Sun, 2 Feb 2014 02:25:13 +0000 (02:25 +0000)]
JSC profiler should show reasons for jettison
https://bugs.webkit.org/show_bug.cgi?id=128047

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Henceforth if you want to jettison a CodeBlock, you gotta tell the Profiler why you did
it. This makes figuring out convergence issues - where some code seems to take a long
time to get into the top tier compiler - a lot easier.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::setSteppingMode):
* bytecode/CodeBlock.h:
* bytecode/CodeBlockJettisoningWatchpoint.cpp:
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
* dfg/DFGOperations.cpp:
* jit/JITOperations.cpp:
* profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::Compilation):
(JSC::Profiler::Compilation::toJS):
* profiler/ProfilerCompilation.h:
(JSC::Profiler::Compilation::setJettisonReason):
* profiler/ProfilerJettisonReason.cpp: Added.
(WTF::printInternal):
* profiler/ProfilerJettisonReason.h: Added.
* runtime/CommonIdentifiers.h:
* runtime/VM.cpp:
(JSC::SetEnabledProfilerFunctor::operator()):

Tools:

Reviewed by Geoffrey Garen.

Gave the tool a "log" command, that tells you all of the interesting things
that happened to a piece of bytecode, from the standpoint of optimization.
It's a great summary view for seeing how our tier-up machinery works.

This uses a lot of information that was already available, plus the newly
added jettisonReason field.

* Scripts/display-profiler-output:

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

7 years agoFactor URL decomposition methods (from URLUtils interface) into a base template
mjs@apple.com [Sun, 2 Feb 2014 02:18:09 +0000 (02:18 +0000)]
Factor URL decomposition methods (from URLUtils interface) into a base template
https://bugs.webkit.org/show_bug.cgi?id=128052

Reviewed by Sam Weinig.

Refactoring only; no new tests.

* html/DOMURL.cpp:
* html/DOMURL.h:
(WebCore::DOMURL::href): Moved to header and made inline.
* html/URLUtils.h: Added.
(WebCore::URLUtils::href): Downcast and call the derived class.
(WebCore::URLUtils::setHref): Downcast and call the derived class.
Functions below factored out from DOMURL.cpp.
(WebCore::URLUtils<T>::toString):
(WebCore::URLUtils<T>::origin):
(WebCore::URLUtils<T>::protocol):
(WebCore::URLUtils<T>::setProtocol):
(WebCore::URLUtils<T>::username):
(WebCore::URLUtils<T>::setUsername):
(WebCore::URLUtils<T>::password):
(WebCore::URLUtils<T>::setPassword):
(WebCore::URLUtils<T>::host):
(WebCore::parsePortFromStringPosition):
(WebCore::URLUtils<T>::setHost):
(WebCore::URLUtils<T>::hostname):
(WebCore::URLUtils<T>::setHostname):
(WebCore::URLUtils<T>::port):
(WebCore::URLUtils<T>::setPort):
(WebCore::URLUtils<T>::pathname):
(WebCore::URLUtils<T>::setPathname):
(WebCore::URLUtils<T>::search):
(WebCore::URLUtils<T>::setSearch):
(WebCore::URLUtils<T>::hash):
(WebCore::URLUtils<T>::setHash):

Add mention of new header.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

7 years agoIDB: Implement IDBCursor.delete()
beidson@apple.com [Sun, 2 Feb 2014 01:58:16 +0000 (01:58 +0000)]
IDB: Implement IDBCursor.delete()
<rdar://problem/15944203> and https://bugs.webkit.org/show_bug.cgi?id=127882

Reviewed by Sam Weinig.

IDBCursor.delete() actually relies on deleteRange(), which was implemented earlier.
So the only thing keeping it from working was a "Cursors iterate past their end" bug,
causing the delete transaction to be aborted.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advanceOnce): When the cursor does the final iteration,
  clear the previous values to indicate completion.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::clearCursors): Noticed this opportunistic cleanup to
  iterate over unique_ptr<>s with an auto& instead of an auto.

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

7 years agoImprove the JavaScript bindings of DatasetDOMStringMap
benjamin@webkit.org [Sun, 2 Feb 2014 00:16:15 +0000 (00:16 +0000)]
Improve the JavaScript bindings of DatasetDOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=127971

Unriewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-01

* dom/DatasetDOMStringMap.cpp:
* dom/DatasetDOMStringMap.h:
Follow up for r163239. Darin pointed out the #includes are wrong.

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

7 years agoText interaction assistant is not deleted when dismissing the keyboard on iPad.
enrica@apple.com [Sun, 2 Feb 2014 00:10:03 +0000 (00:10 +0000)]
Text interaction assistant is not deleted when dismissing the keyboard on iPad.
https://bugs.webkit.org/show_bug.cgi?id=128034
<rdar://problem/15915695>

Reviewed by Dan Bernstein.

In iPhone mode, tapping on 'Done' in the accessory view
calls the delegate accessoryDone where we correctly blur
the assisted node and tear down the text interaction assistant.
The code path for the keyboard in iPad mode is different,
all we get is resignFirstResponder.
The fix is just to move the blurring in resignFirstResponder
and it works for both iPhone and iPad.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView resignFirstResponder]):
(-[WKInteractionView accessoryDone]):

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

7 years agoIDB: Implement IDBObjectStore.delete()
beidson@apple.com [Sat, 1 Feb 2014 21:00:30 +0000 (21:00 +0000)]
IDB: Implement IDBObjectStore.delete()
https://bugs.webkit.org/show_bug.cgi?id=127880

Reviewed by Sam Weinig.

Source/WebCore:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::compare): Make this const.
* Modules/indexeddb/IDBKeyData.h:

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::isExactlyOneKey): Returns whether or not
  the key range is known to represent precisely one key.
* Modules/indexeddb/IDBKeyRangeData.h:

* WebCore.exp.in:

Source/WebKit2:

Implementing IDBObjectStore.delete() involves filling in the already-stubbed deleteRange() method.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Call through to the backing store.

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange): Call deleteRecord on each key represented
  by the passed-in keyRange. This involves collecting each key using a cursor.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord): Delete an individual record from the
  object store and all associated indexes.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Teach the SQLiteIDBCursor to remember if it ended in an error condition:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
(WebKit::SQLiteIDBCursor::advanceOnce):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
(WebKit::SQLiteIDBCursor::didError):

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

7 years agoSVGTextLayoutAttributesBuilder shouldn't use RenderText::deprecatedCharacters()
andersca@apple.com [Sat, 1 Feb 2014 20:37:15 +0000 (20:37 +0000)]
SVGTextLayoutAttributesBuilder shouldn't use RenderText::deprecatedCharacters()
https://bugs.webkit.org/show_bug.cgi?id=128048

Reviewed by Sam Weinig.

Change UChar*& lastCharacter to bool& lastCharacterWasSpace since that's what the parameter was used for.

* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
Initialize lastCharacterWasSpace to true to match the previous behavior.

(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
Ditto.

(WebCore::processRenderSVGInlineText):
Take a reference instead of a pointer, get the character using RenderText::operator[] and compute lastCharacterWasSpace.

(WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
This now takes a bool reference instead.

* rendering/svg/SVGTextLayoutAttributesBuilder.h:

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

7 years agoSaying "jitType() == JITCode::DFGJIT" is almost never correct.
mark.lam@apple.com [Sat, 1 Feb 2014 20:29:23 +0000 (20:29 +0000)]
Saying "jitType() == JITCode::DFGJIT" is almost never correct.
<http://webkit.org/b/128045>

Reviewed by Filip Pizlo.

JITCode::isOptimizingJIT(jitType()) is the right way to say it.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::setSteppingMode):
* runtime/VM.cpp:
(JSC::SetEnabledProfilerFunctor::operator()):

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

7 years agoIDB: Index reading
beidson@apple.com [Sat, 1 Feb 2014 19:11:38 +0000 (19:11 +0000)]
IDB: Index reading
<rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868

Reviewed by Jer Noble.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord): Using an index cursor, read a value.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years agoIDB: Index cursor complete advance() and iterate() support
beidson@apple.com [Sat, 1 Feb 2014 19:04:02 +0000 (19:04 +0000)]
IDB: Index cursor complete advance() and iterate() support
<rdar://problem/15941916> and https://bugs.webkit.org/show_bug.cgi?id=127870

Reviewed by Dan Bernstein.

Source/WebCore:

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Always use the value buffer for the script object.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advanceOnce): Look up the found record value from the
  object store records based on the key we found from the index.

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

7 years agoUpdate WebCrypto JWK mapping to use key_ops
ap@apple.com [Sat, 1 Feb 2014 18:14:17 +0000 (18:14 +0000)]
Update WebCrypto JWK mapping to use key_ops
https://bugs.webkit.org/show_bug.cgi?id=127609

Reviewed by Sam Weinig.

Source/WebCore:

Updated JWK support ot match current editor draft.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getJSArrayFromJSON): Fixed this previously untested function to actually work.
(WebCore::tryJWKKeyOpsValue):
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
(WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Removed an old comment,
these things are now specced.
(WebCore::addToJSON): Made static functions file static, there is no reason for
them to be class members.
(WebCore::buildJSONForOctetSequence):
(WebCore::buildJSONForRSAComponents):
(WebCore::addBoolToJSON):
(WebCore::addJWKAlgorithmToJSON):
(WebCore::addUsagesToJSON):
(WebCore::JSCryptoKeySerializationJWK::serialize):
* bindings/js/JSCryptoKeySerializationJWK.h:

* crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
Check for length, so that we don't fail silently.

LayoutTests:

* crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
* crypto/subtle/aes-kw-wrap-unwrap-aes.html:
Removed a subtest for wrapping JWK. That doesn't really work per the spec, because
JWK is arbitatry length, and AES-KW requires 8*n bytes.

* crypto/subtle/aes-export-key-expected.txt:
* crypto/subtle/aes-export-key.html:
* crypto/subtle/hmac-export-key-expected.txt:
* crypto/subtle/hmac-export-key.html:
* crypto/subtle/jwk-export-use-values-expected.txt:
* crypto/subtle/jwk-export-use-values.html:
* crypto/subtle/jwk-import-use-values-expected.txt:
* crypto/subtle/jwk-import-use-values.html:
* crypto/subtle/rsa-export-key-expected.txt:
* crypto/subtle/rsa-export-key.html:
* crypto/subtle/rsa-export-private-key-expected.txt:
* crypto/subtle/rsa-export-private-key.html:
* crypto/subtle/rsa-oaep-key-manipulation-expected.txt:
* crypto/subtle/rsa-oaep-key-manipulation.html:
* crypto/subtle/rsa-postMessage-expected.txt:
* crypto/subtle/rsa-postMessage.html:
Updated for the fix.

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

7 years agoAdd webView:didFailNavigation:withError: delegate method
andersca@apple.com [Sat, 1 Feb 2014 17:31:48 +0000 (17:31 +0000)]
Add webView:didFailNavigation:withError: delegate method
https://bugs.webkit.org/show_bug.cgi?id=128022

Reviewed by Darin Adler.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):

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

7 years agoAdd security-checked casts for all WebCore::CachedResource subclasses
ddkilzer@apple.com [Sat, 1 Feb 2014 16:32:11 +0000 (16:32 +0000)]
Add security-checked casts for all WebCore::CachedResource subclasses
<http://webkit.org/b/127988>

Reviewed by Darin Adler.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
- Switch from static_cast<>() to security-checked cast.

* loader/cache/CachedCSSStyleSheet.h:
(WebCore::toCachedCSSStyleSheet): Add.
* loader/cache/CachedFont.h:
(WebCore::toCachedFont): Add.

* loader/cache/CachedImage.h: Make CachedImageManual final.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource): Add assert that
only MainResource or RawResource types are used to construct a
CachedRawResource.  This may be a security issue depending on
what code exists that uses the type() value to cast to a
CachedResource subclass.
(WebCore::CachedRawResource::switchClientsToRevalidatedResource):
Switch from static_cast<>() to toCachedRawResource().

* loader/cache/CachedRawResource.h:
(WebCore::toCachedRawResource): Add.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isMainOrRawResource): Add.  A
CachedRawResource could be either a MainResource or a
RawResource.  Currently only used in assertions.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestMainResource):
- Switch from static_cast<>() to security-checked cast.

* loader/cache/CachedSVGDocument.h:
(WebCore::toCachedSVGDocument): Add.
* loader/cache/CachedScript.h:
(WebCore::toCachedScript): Add.
* loader/cache/CachedTextTrack.h:
(WebCore::toCachedTextTrack): Add.
* loader/cache/CachedXSLStyleSheet.h:
(WebCore::toCachedXSLStyleSheet): Add.

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

7 years agoREGRESSION (r163027?): CrashTracer: [USER] com.apple.WebKit.WebContent.Development...
msaboff@apple.com [Sat, 1 Feb 2014 15:30:41 +0000 (15:30 +0000)]
REGRESSION (r163027?): CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.JavaScriptCore: JSC::ArrayProfile::computeUpdatedPrediction + 4
https://bugs.webkit.org/show_bug.cgi?id=128037

Reviewed by Mark Lam.

op_call_varargs ops now needs an ArrayProfile since DFG inlines these since
change set r162739.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCallVarargs):

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

7 years agoUnreviewed. Fixed GTK+ CMake build after r162922.
calvaris@igalia.com [Sat, 1 Feb 2014 15:15:56 +0000 (15:15 +0000)]
Unreviewed. Fixed GTK+ CMake build after r162922.

* PlatformGTK.cmake: Removed SoupURIUtils.cpp from the
compilation.

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

7 years agoImprove the JavaScript bindings of DatasetDOMStringMap
benjamin@webkit.org [Sat, 1 Feb 2014 08:10:27 +0000 (08:10 +0000)]
Improve the JavaScript bindings of DatasetDOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=127971

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-01
Reviewed by Sam Weinig.

Source/WebCore:

Instead of querying contains() followed by item(), just get the item
at once in the custom binding.

Test: fast/dom/dataset-name-getter-properties.html

* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
* dom/DOMStringMap.idl:
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::item):
* dom/DatasetDOMStringMap.h:

LayoutTests:

* fast/dom/dataset-name-getter-properties-expected.txt: Added.
* fast/dom/dataset-name-getter-properties.html: Added.

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

7 years agoRemove LEGACY_VIEWPORT_ADAPTION
benjamin@webkit.org [Sat, 1 Feb 2014 08:05:21 +0000 (08:05 +0000)]
Remove LEGACY_VIEWPORT_ADAPTION
https://bugs.webkit.org/show_bug.cgi?id=128028

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-31
Reviewed by Anders Carlsson.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

The code is incorrect and was only supported by Nix.

* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/ViewportArguments.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):

Source/WTF:

* wtf/FeatureDefines.h:

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

7 years agoIDB: Handle "nextunique" and "prevunique" cursors, and handle "advance()" correctly
beidson@apple.com [Sat, 1 Feb 2014 07:04:18 +0000 (07:04 +0000)]
IDB: Handle "nextunique" and "prevunique" cursors, and handle "advance()" correctly
https://bugs.webkit.org/show_bug.cgi?id=128040

Reviewed by Jer Noble.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advance): Entry point for advancing by a number of steps,
  calls either advanceUnique or advanceOnce the appropriate number of times.
(WebKit::SQLiteIDBCursor::advanceUnique): Call advanceOnce until the key has changed.
(WebKit::SQLiteIDBCursor::advanceOnce):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:

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

7 years agoUnreviewed. Fixing the GTK build after r163232.
zandobersek@gmail.com [Sat, 1 Feb 2014 06:40:21 +0000 (06:40 +0000)]
Unreviewed. Fixing the GTK build after r163232.

* WebCoreSupport/EditorClientGtk.cpp:
(WebKit::collapseSelection): Add an additional FrameSelection::selection() call.

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

7 years agoRelease build fix after r163234. Don't always export the symbol that doesn't exist...
rniwa@webkit.org [Sat, 1 Feb 2014 05:16:45 +0000 (05:16 +0000)]
Release build fix after r163234. Don't always export the symbol that doesn't exist under NDEBUG.

* WebCore.exp.in:

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

7 years agoIDB: Index cursors use wrong deserialization for the retrieved value
beidson@apple.com [Sat, 1 Feb 2014 05:01:15 +0000 (05:01 +0000)]
IDB: Index cursors use wrong deserialization for the retrieved value
https://bugs.webkit.org/show_bug.cgi?id=128035

Reviewed by Dan Bernstein.

Source/WebCore:

For the cursor operations, add an IDBKey value result in the callbacks.
If an already deserialized IDBKey value exists it will be preferred over the serialized buffer.

Change some of the onSuccess() callback formats:
* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Selectively choose between the IDBKey or the SharedBuffer value
  when choosed what to convert to the ScriptValue.
* Modules/indexeddb/IDBRequest.h:

Let the IDBCursorBackend hold both a value buffer and a value key:
* Modules/indexeddb/IDBCursorBackend.cpp:
(WebCore::IDBCursorBackend::updateCursorData):
(WebCore::IDBCursorBackend::clear):
* Modules/indexeddb/IDBCursorBackend.h:
(WebCore::IDBCursorBackend::valueBuffer):
(WebCore::IDBCursorBackend::valueKey):

* Modules/indexeddb/IDBCursorBackendOperations.cpp:
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform):

* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::cursorAdvance):
(WebCore::IDBServerConnectionLevelDB::cursorIterate):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

Add IDBKey/IDBKeyData debug logging utilities:
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::loggingString):
* Modules/indexeddb/IDBKey.h:
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString):
* Modules/indexeddb/IDBKeyData.h:

* WebCore.exp.in:

Source/WebKit2:

Most of this is updating everything related to the cursor operation callbacks
to support returning an IDBKey value in addition to a SharedBuffer value.

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openCursor):
(WebKit::DatabaseProcessIDBConnection::cursorAdvance):
(WebKit::DatabaseProcessIDBConnection::cursorIterate):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
(WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advance):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
(WebKit::SQLiteIDBCursor::currentValueBuffer):
(WebKit::SQLiteIDBCursor::currentValueKey):

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::openCursor):
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

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

7 years agoDebug build fix after r163232. Call hasEditableStyle() instead of isContentEditable...
rniwa@webkit.org [Sat, 1 Feb 2014 04:58:12 +0000 (04:58 +0000)]
Debug build fix after r163232. Call hasEditableStyle() instead of isContentEditable() which
can trigger a layout synchronously inside paintCaret. This matches the code before r163232.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

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

7 years agoRemove inline member functions of FrameSelection that access m_selection
rniwa@webkit.org [Sat, 1 Feb 2014 04:10:43 +0000 (04:10 +0000)]
Remove inline member functions of FrameSelection that access m_selection
https://bugs.webkit.org/show_bug.cgi?id=127986

Reviewed by Enrica Casucci.

Source/WebCore:

Removed numerous inline member functions of FrameSelection that depend on m_selection.

This is needed to ensure all accesses to m_selection happen through FrameSelection::selection(),
which in turn, allows us to update its call sites to use either validated selection that editing
and rendering code uses or invalidated selection that's exposed to JavaScript.

* WebCore.exp.in:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMRange move:inDirection:]):
(-[DOMRange extend:inDirection:]):
* dom/Element.cpp:
(WebCore::Element::updateFocusAppearance):
* editing/Editor.cpp:
(WebCore::Editor::canEdit):
(WebCore::Editor::canEditRichly):
(WebCore::Editor::canDHTMLCut):
(WebCore::Editor::canDHTMLCopy):
(WebCore::Editor::canCopy):
(WebCore::Editor::canDelete):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::tryDHTMLCopy):
(WebCore::Editor::tryDHTMLCut):
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::paste):
(WebCore::Editor::setComposition):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::getCompositionSelection):
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/EditorCommand.cpp:
(WebCore::expandSelectionToGranularity):
(WebCore::enabledInRichlyEditableText):
(WebCore::enabledRangeInEditableText):
(WebCore::enabledRangeInRichlyEditableText):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::updateCaretRect):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::updateAppearance):
(WebCore::FrameSelection::updateSelectionCachesIfSelectionIsInsideTextFormControl):
(WebCore::FrameSelection::setFocusedElementIfNeeded):
(WebCore::FrameSelection::currentForm):
(WebCore::FrameSelection::revealSelection):
(WebCore::FrameSelection::setSelectionFromNone):
* editing/FrameSelection.h:
(WebCore::FrameSelection::isCaretOrRange):
* editing/RemoveFormatCommand.cpp:
(WebCore::RemoveFormatCommand::doApply):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::isInPasswordField):
* editing/VisibleSelection.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::canCopyExcludingStandaloneImages):
(WebCore::Editor::readSelectionFromPasteboard):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::HTMLAnchorElement::setActive):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::computeSelectionStart):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
* page/DragController.cpp:
(WebCore::DragController::dragIsMove):
(WebCore::setSelectionToDragCaret):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::nodeIsNotBeingEdited):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::handleDrag):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::clearSelectionIfNeeded):
* page/ios/FrameIOS.mm:
(WebCore::Frame::caretRect):
(WebCore::Frame::rectForScrollToVisible):
(WebCore::Frame::styleAtSelectionStart):
(WebCore::Frame::setRangedSelectionBaseToCurrentSelectionStart):
(WebCore::Frame::setRangedSelectionBaseToCurrentSelectionEnd):
(WebCore::Frame::setRangedSelectionInitialExtentToCurrentSelectionStart):
(WebCore::Frame::setRangedSelectionInitialExtentToCurrentSelectionEnd):
(WebCore::Frame::interpretationsForCurrentRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::selectedRange):
* ewk/ewk_frame.cpp:
(ewk_frame_text_selection_type_get):

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::selectedRange):
* WebCoreSupport/EditorClientGtk.cpp:
(WebKit::collapseSelection):

Source/WebKit/ios:

* WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame extendSelection:]):
(-[WebFrame ensureRangedSelectionContainsInitialStartPoint:initialEndPoint:]):
(-[WebFrame aggressivelyExpandSelectionToWordContainingCaretSelection]):
(-[WebFrame expandSelectionToSentence]):
(-[WebFrame setBaseWritingDirection:]):
(-[WebFrame smartExtendRangedSelection:]):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame hasEditableSelection]):
(-[WebFrame selectionAffinity]):
(-[WebFrame getDictationResultRanges:andMetadatas:]):
(-[WebFrame hasRichlyEditableSelection]):
(-[WebFrame focusedNodeHasContent]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView readSelectionFromPasteboard:]):
(-[WebHTMLView _hasSelection]):
(-[WebHTMLView _hasSelectionOrInsertionPoint]):
(-[WebHTMLView _hasInsertionPoint]):
(-[WebHTMLView _isEditable]):
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
(-[WebHTMLView maintainsInactiveSelection]):
(isTextInput):
(isInPasswordField):
* WebView/WebView.mm:
(-[WebView selectionAffinity]):

Source/WebKit2:

* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::collapseSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::updateSelectionWithTouches):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::getAttributedSubstringFromRange):

Tools:

* TestWebKitAPI/Configurations/Base.xcconfig:

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

7 years agoPass the viewport rect and scroll origin independently into the scrolling tree, and...
simon.fraser@apple.com [Sat, 1 Feb 2014 03:57:48 +0000 (03:57 +0000)]
Pass the viewport rect and scroll origin independently into the scrolling tree, and make things floats
https://bugs.webkit.org/show_bug.cgi?id=128032

Reviewed by Tim Horton.

Pass the viewport rect and scroll offset independently into the ScrollingTree
via the ScrollingStateScrollingNode, since on iOS the scroll offset doesn't
always correspond to the viewport rect.

Make the viewport rect and the scroll origin be float-based, since on
Retina screens and with zooming these can both be non-integral.

Source/WebCore:

No behavior change.

* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
* page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setViewportConstrainedObjectRect):
(WebCore::ScrollingStateScrollingNode::setScrollPosition):
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::commitNewTreeState):
(WebCore::ScrollingTree::mainFrameScrollPosition):
(WebCore::ScrollingTree::setMainFrameScrollPosition):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollPosition):
(WebCore::ScrollingTreeScrollingNode::viewportConstrainedObjectRect):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
(WebCore::ScrollingTreeScrollingNodeIOS::scrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::maximumScrollPosition):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
(WebCore::ScrollingTreeScrollingNodeMac::absoluteScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::shrunkTo):

Source/WebKit2:

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:

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

7 years agoWebKit2 View Gestures: Crash when pinch-zooming on a page that is just a frameset
timothy_horton@apple.com [Sat, 1 Feb 2014 02:59:55 +0000 (02:59 +0000)]
WebKit2 View Gestures: Crash when pinch-zooming on a page that is just a frameset
https://bugs.webkit.org/show_bug.cgi?id=127591
<rdar://problem/15898349>

Reviewed by Simon Fraser.

When we have no shadow layer, we crash in TiledCoreAnimationDrawingArea::adjustTransientZoom.
Fix this null deref; also, we always want a shadow layer, even if the page cannot be scrolled,
because it can be revealed by pinching out.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):

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

7 years agoAnother attempt at fixing the build.
andersca@apple.com [Sat, 1 Feb 2014 02:47:03 +0000 (02:47 +0000)]
Another attempt at fixing the build.

* TestWebKitAPI/Configurations/Base.xcconfig:

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

7 years agoGardening: fix build breakage.
mark.lam@apple.com [Sat, 1 Feb 2014 02:42:30 +0000 (02:42 +0000)]
Gardening: fix build breakage.

Not reviewed.

* interpreter/CallFrame.h:

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

7 years agoGardening: Fix a merge problem to unbreak bots.
mark.lam@apple.com [Sat, 1 Feb 2014 01:59:05 +0000 (01:59 +0000)]
Gardening: Fix a merge problem to unbreak bots.

Not reviewed.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):

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

7 years ago[Cocoa] Add NEFilterSource support to ContentFilterMac
aestes@apple.com [Sat, 1 Feb 2014 01:40:44 +0000 (01:40 +0000)]
[Cocoa] Add NEFilterSource support to ContentFilterMac
https://bugs.webkit.org/show_bug.cgi?id=127979

Reviewed by Sam Weinig.

Update ContentFilterMac to work with both WebFilterEvaluator and
NEFilterSource, if enabled.

* platform/ContentFilter.h: Set HAVE_NE_FILTER_SOURCE based on platform
conditionals, and forward-declare NEFilterSource.
* platform/mac/ContentFilterMac.mm: Included NEFilterSource.h if the SDK
has it; declared the class directly if not. Also soft-linked
NetworkExtension.framework.
(WebCore::ContentFilter::ContentFilter): Initialized
m_neFilterSourceStatus to NEFilterSourceStatusNeedsMoreData and created
m_platformContentFilter and m_neFilterSource objects if their
respective filters were enabled.
(WebCore::ContentFilter::isEnabled): Returned true if either filter is
enabled.
(WebCore::ContentFilter::addData): Added incoming data to each filter
that is enabled.
(WebCore::ContentFilter::finishedAddingData): Notified each enabled
filter that we are finished adding data.
(WebCore::ContentFilter::needsMoreData): Returned true if either filter
needs more data.
(WebCore::ContentFilter::didBlockData): Returned true if either filter
blocked data.
(WebCore::ContentFilter::getReplacementData): Returned
m_replacementData. Commented that this will currently return a null
string if NEFilterSource blocked the load.

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

7 years ago2014-01-31 Oliver Hunt <oliver@apple.com>
oliver@apple.com [Sat, 1 Feb 2014 01:37:59 +0000 (01:37 +0000)]
2014-01-31  Oliver Hunt  <oliver@apple.com>

        Rollout r163195 and related patches

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

7 years agoDFG->FTL tier-up shouldn't assume that LoopHints stay at the tops of loops
fpizlo@apple.com [Sat, 1 Feb 2014 01:28:26 +0000 (01:28 +0000)]
DFG->FTL tier-up shouldn't assume that LoopHints stay at the tops of loops
https://bugs.webkit.org/show_bug.cgi?id=128030

Reviewed by Oliver Hunt.

Remove a bogus assertion. The only thing that matters is that the LoopHint had at one
point in time been at the top of a loop header, and that it is now at the top of a
basic block. But the basic block that it's at the top of now doesn't have to be the
same as the loop header that it once was the top of.

* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* tests/stress/tier-up-in-loop-with-cfg-simplification.js: Added.
(foo):

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

7 years agoAvoid eagerly creating the JSActivation when the debugger is attached.
mark.lam@apple.com [Sat, 1 Feb 2014 01:24:39 +0000 (01:24 +0000)]
Avoid eagerly creating the JSActivation when the debugger is attached.
<https://webkit.org/b/127910>

Reviewed by Oliver Hunt.

Octane scores for this patch:
    baseline w/o WebInspector: 11621
    patched  w/o WebInspector: 11801
    baseline w/ WebInspector:  3295
    patched  w/ WebInspector:  7070   2.1x improvement

1. Because debugger can potentially create a closure from any call frame,
   we need every function to allocate an activation register and check for
   the need to tear off the activation (if needed) on return.

   However, we do not need to eagerly create the activation object.
   This patch implements the optimization to defer creation of the
   activation object until we actually need it i.e. when:

   1. We encounter a "eval", "with", or "catch" statement.
   2. We've paused in the debugger, and called DebuggerCallFrame::scope().

2. The UnlinkedCodeBlock provides a needsFullScopeChain flag that is used
   to indicate whether the linked CodeBlock will need an activation
   object or not. Under normal circumstances, needsFullScopeChain and
   needsActivation are synonymous. However, with a debugger attached, we
   want the CodeBlock to always allocate an activationRegister even if
   it does not need a "full scope chain".

   Hence, we apply the following definitions to the "flags":

   1. UnlinkedCodeBlock::needsFullScopeChain() - this flag indicates that
      the parser discovered JS artifacts (e.g. use of "eval", "with", etc.)
      that requires an activation.

      BytecodeGenerator's destinationForAssignResult() and leftHandSideNeedsCopy()
      checks needsFullScopeChain().

   2. UnlinkedCodeBlock::hasActivationRegister() - this flag indicates that
      an activation register was created for the UnlinkedCodeBlock either
      because it needsFullScopeChain() or because the debugger is attached.

   3. CodeBlock::needsActivation() reflects UnlinkedCodeBlock's
      hasActivationRegister().

3. Introduced BytecodeGenerator::emitPushFunctionNameScope() and
   BytecodeGenerator::emitPushCatchScope() because the JSNameScope
   pushed for a function name cannot be popped unlike the JSNameScope
   pushed for a "catch". Hence, we have 2 functions to handle the 2 cases
   differently.

4. Removed DebuggerCallFrame::evaluateWithCallFrame() and require that all
   debugger evaluations go through the DebuggerCallFrame::evaluate(). This
   ensures that debugger evaluations require a DebuggerCallFrame.

   DebuggerCallFrame::evaluateWithCallFrame() was used previously because
   we didn't want to instantiate a DebuggerCallFrame on every debug hook
   callback. However, we now only call the debug hooks when needed, and
   this no longer poses a performance problem.

   In addition, when the debug hook does an eval to test a breakpoint
   condition, it is incorrect to evaluate it without a DebuggerCallFrame
   anyway.

5. Added some utility functions to the CallFrame to make it easier to work
   with the activation register in the frame (if present). These utility
   functions should only be called if the CodeBlock::needsActivation() is
   true (which indicates the presence of the activation register). The
   utlity functions are:

   1. CallFrame::hasActivation()
      - checks if the frame's activation object has been created.

   2. CallFrame::activation()
      - returns the frame's activation object.

   3. CallFrame::uncheckedActivation()
      - returns the JSValue in the frame's activation register. May be null.

   4. CallFrame::setActivation()
      - sets the frame's activation object.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
- added symbollic dumping of ResolveMode and ResolveType values for some
  bytecodes.
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::activationRegister):
(JSC::CodeBlock::uncheckedActivationRegister):
(JSC::CodeBlock::needsActivation):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::needsFullScopeChain):
(JSC::UnlinkedCodeBlock::hasActivationRegister):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::createActivationIfNecessary):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::TryNode::emitBytecode):
* debugger/Debugger.cpp:
(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::pauseIfNeeded):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::evaluate):
* debugger/DebuggerCallFrame.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGGraph.h:
- Removed an unused function DFGGraph::needsActivation().
* interpreter/CallFrame.cpp:
(JSC::CallFrame::activation):
(JSC::CallFrame::setActivation):
* interpreter/CallFrame.h:
(JSC::ExecState::hasActivation):
(JSC::ExecState::registers):
* interpreter/CallFrameInlines.h:
(JSC::CallFrame::uncheckedActivation):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
(JSC::Interpreter::unwind):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

* runtime/JSScope.cpp:
* runtime/JSScope.h:
(JSC::resolveModeName):
(JSC::resolveTypeName):
- utility functions for decoding names of the ResolveMode and ResolveType.
  These are used in CodeBlock::dumpBytecode().

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

7 years agoAttempt to fix Production Dashboard after <http://trac.webkit.org/changeset/163213>
dbates@webkit.org [Sat, 1 Feb 2014 01:14:47 +0000 (01:14 +0000)]
Attempt to fix Production Dashboard after <trac.webkit.org/changeset/163213>
(https://bugs.webkit.org/show_bug.cgi?id=127849)

Reviewed by David Farler.

Pass credentials when querying build bot iteration.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update):
(BuildbotIteration.prototype.loadLayoutTestResults):

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

7 years agoFix iOS build.
andersca@apple.com [Sat, 1 Feb 2014 00:57:33 +0000 (00:57 +0000)]
Fix iOS build.

* TestWebKitAPI/Configurations/Base.xcconfig:

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

7 years agoUpdate test results for a new DOM URL test (we now pass more).
ap@apple.com [Sat, 1 Feb 2014 00:44:11 +0000 (00:44 +0000)]
Update test results for a new DOM URL test (we now pass more).

* fast/dom/DOMURL/invalid-url-getters-expected.txt:

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

7 years ago[wk2] PlatformCALayerRemoteCustom doesn't work on iOS
timothy_horton@apple.com [Sat, 1 Feb 2014 00:34:12 +0000 (00:34 +0000)]
[wk2] PlatformCALayerRemoteCustom doesn't work on iOS
https://bugs.webkit.org/show_bug.cgi?id=128025
<rdar://problem/15950271>

Reviewed by Simon Fraser.

* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort):
(WebKit::LayerHostingContext::createForExternalHostingProcess):
Use the new macro name (in a lot of places).
Rename LayerHostingContext::createForWindowServer() to createForExternalHostingProcess().
Don't use WKCAContextMakeRemoteForWindowServer on iOS, just use the CAContext
SPI directly. We don't want our CAContext to be hit tested because it's purely
presentational.

* UIProcess/API/ios/PageClientImplIOS.h:
iOS always hosts layers in an external process.

* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext):
* Shared/LayerTreeContext.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewLayerHostingMode):
* UIProcess/PageClient.h:
(WebKit::PageClient::viewLayerHostingMode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
Use enum class for LayerHostingMode and rename the members to InProcess and OutOfProcess.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView windowHostsLayersInWindowServer]):
Use the new macro name.

* wtf/Platform.h:
Rename HAVE_LAYER_HOSTING_IN_WINDOW_SERVER to HAVE_OUT_OF_PROCESS_LAYER_HOSTING
and make it true on iOS.

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

7 years agoAdd session support to WebPlatformStrategies
commit-queue@webkit.org [Sat, 1 Feb 2014 00:24:30 +0000 (00:24 +0000)]
Add session support to WebPlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=127926

Patch by Martin Hock <mhock@apple.com> on 2014-01-31
Reviewed by Alexey Proskuryakov.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::storageSessionToID):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID): Ensure the storage session exists.
* WebProcess/WebPage/WebPage.h:

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

7 years agoEven when in fixed layout mode, some platforms need to do layout after a viewport...
simon.fraser@apple.com [Fri, 31 Jan 2014 23:57:29 +0000 (23:57 +0000)]
Even when in fixed layout mode, some platforms need to do layout after a viewport change
https://bugs.webkit.org/show_bug.cgi?id=128003

Reviewed by Andreas Kling.

Re-land 163182 with a less aggresive check in visibleContentsResized() for
needing to layout.

iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
elements relative to a variable viewport. This code assumed that fixed layout
implies a fixed viewport.

Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.

Also removed RenderView::hasCustomFixedPosition() which is no longer used.

* page/FrameView.cpp:
(WebCore::FrameView::shouldLayoutAfterViewportChange):
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:

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

7 years agoWebKitTestRunner project doesn't show Mac as a valid destination architecture.
simon.fraser@apple.com [Fri, 31 Jan 2014 23:57:27 +0000 (23:57 +0000)]
WebKitTestRunner project doesn't show Mac as a valid destination architecture.

Make sure that SUPPORTED_PLATFORMS is defined in Base.xcconfig.

Also add BaseTarget.xcconfig to the project.

* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

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

7 years agoREGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
msaboff@apple.com [Fri, 31 Jan 2014 23:53:52 +0000 (23:53 +0000)]
REGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
https://bugs.webkit.org/show_bug.cgi?id=128017

Reviewed by Filip Pizlo.

Moved the setting and saving of VM::stackPointerAtVMEntry and the corresponding stack limit
to JSLock and JSLock::DropAllLocks.  The saved data is now stored in per-thread in
WTFThreadData.

Source/JavaScriptCore:

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSLock.cpp:
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMEntryScope.h:

Source/WTF:

* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::savedStackPointerAtVMEntry):
(WTF::WTFThreadData::setSavedStackPointerAtVMEntry):
(WTF::WTFThreadData::savedLastStackTop):
(WTF::WTFThreadData::setSavedLastStackTop):
(WTF::WTFThreadData::savedReservedZoneSize):
(WTF::WTFThreadData::setSavedReservedZoneSize):

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

7 years agoWebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP...
dbates@webkit.org [Fri, 31 Jan 2014 23:31:00 +0000 (23:31 +0000)]
WebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP credentials once per page load
https://bugs.webkit.org/show_bug.cgi?id=127849

Reviewed by Alexey Proskuryakov.

Currently whenever the dashboard updates the status of a queue whose Buildbot requires authentication
it will cause a browser to prompt for credentials once per update until valid credentials are provided.
Instead we should keep track of Buildbots that respond with an HTTP 401 Unauthorized status code to avoid
subsequently querying them and hence cause a browser to prompt for credentials. Together with an optional
hint provided when instantiating a Buildbot object as to whether it requires authentication, we can make
the dashboard prompt for HTTP credentials exactly once per page load for each queue whose associated
Buildbot requires authentication.

Queues whose Buildbot wasn't authenticated will show in the dashboard as "unauthorized". Clicking on
this status message will cause the browser to prompt for credentials.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot): Initialize instance variable authenticationStatus to Buildbot.AuthenticationStatus.Unauthenticated.
(Buildbot.prototype.get needsAuthentication): Added.
(Buildbot.prototype.get authenticationStatus): Added.
(Buildbot.prototype.get isAuthenticated): Added.
(Buildbot.prototype.set isAuthenticated): Added.
(Buildbot.prototype.updateQueues): Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Modified to call
BuildbotQueueView.prototype._appendUnauthorizedLineView() to update the view and show status of the queue as
"unauthorized" if the Buildbot associated with the queue is either unauthenticated or was given invalid credentials.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update): Return immediately if the associated Buildbot requires authentication.
Additionally, if the JSON load fails with an HTTP 401 Unauthorized access error (say, credentials were
invalidated) then update the authentication status of the Buildbot to avoid subsequently prompting a
person for credentials the next time the queue update timer fires.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Register as a listener for event BuildbotQueue.Event.UnauthorizedAccess on each queue
so that the view can be updated to show status "unauthorized".
(BuildbotQueueView.prototype._appendUnauthorizedLineView): Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js: Added new status, StatusLineView.Status.Unauthorized.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.unauthorized .bubble): Added.
(.status-line.unauthorized .bubble.pictogram): Added.
(.status-line.unauthorized .message): Added.

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

7 years agoExpose creation and modification times for LocalStorage
ap@apple.com [Fri, 31 Jan 2014 23:28:44 +0000 (23:28 +0000)]
Expose creation and modification times for LocalStorage
https://bugs.webkit.org/show_bug.cgi?id=128018

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Export FileSystem functions to get file times.

Source/WebKit2:

* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetOriginKey):
(WKKeyValueStorageManagerGetCreationTimeKey):
(WKKeyValueStorageManagerGetModificationTimeKey):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
* UIProcess/API/C/WKKeyValueStorageManager.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::origins):
(WebKit::LocalStorageDatabaseTracker::details):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getStorageDetailsByOrigin):
(WebKit::StorageManager::getStorageDetailsByOriginInternal):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::originKey):
(WebKit::WebKeyValueStorageManager::creationTimeKey):
(WebKit::WebKeyValueStorageManager::modificationTimeKey):
(WebKit::didGetKeyValueStorageOrigins):
(WebKit::didGetStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebKeyValueStorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoDon't need a JSNameScope for the callee name just for the debugger.
mark.lam@apple.com [Fri, 31 Jan 2014 23:18:15 +0000 (23:18 +0000)]
Don't need a JSNameScope for the callee name just for the debugger.
<https://webkit.org/b/128024>

Reviewed by Geoffrey Garen.

Currently, in the bytecode for a function, we push a JSNamedScope for
the name of the function when a debugger is attached. The name scope for
the function name is only needed for evals which can redefine the name
to resolve to something else, and can later delete the redefined name
which should revert the resolution of the name to the original function.
The debugger does not need this feature because it declares all new vars
in a temporary nested scope. Hence, we can remove the presence of the
debugger as a criteria for pushing the JSNameScope.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::addCallee):

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

7 years agoImplement (most of) URL API
mjs@apple.com [Fri, 31 Jan 2014 23:06:25 +0000 (23:06 +0000)]
Implement (most of) URL API
https://bugs.webkit.org/show_bug.cgi?id=127795

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Tests: fast/dom/DOMURL/get-href-attribute-port.html
       fast/dom/DOMURL/invalid-url-getters.html
       fast/dom/DOMURL/set-href-attribute-hash.html
       fast/dom/DOMURL/set-href-attribute-host.html
       fast/dom/DOMURL/set-href-attribute-hostname.html
       fast/dom/DOMURL/set-href-attribute-pathname.html
       fast/dom/DOMURL/set-href-attribute-port.html
       fast/dom/DOMURL/set-href-attribute-protocol.html
       fast/dom/DOMURL/set-href-attribute-search.html
       fast/dom/DOMURL/set-href-attribute-whitespace.html
       fast/dom/DOMURL/url-constructor.html
       fast/dom/DOMURL/url-origin.html
       fast/dom/DOMURL/url-password.html
       fast/dom/DOMURL/url-username.html

* CMakeLists.txt: Update for new IDL file.
* DerivedSources.make: ditto
* GNUmakefile.list.am: ditto
* html/DOMURL.cpp: Implement URL() constructor and instance methods; cribbed from
HTMLAnchorElement mostly
(WebCore::DOMURL::DOMURL):
(WebCore::DOMURL::href):
(WebCore::DOMURL::setHref):
(WebCore::DOMURL::toString):
(WebCore::DOMURL::origin):
(WebCore::DOMURL::protocol):
(WebCore::DOMURL::setProtocol):
(WebCore::DOMURL::username):
(WebCore::DOMURL::setUsername):
(WebCore::DOMURL::password):
(WebCore::DOMURL::setPassword):
(WebCore::DOMURL::host):
(WebCore::parsePortFromStringPosition):
(WebCore::DOMURL::setHost):
(WebCore::DOMURL::hostname):
(WebCore::DOMURL::setHostname):
(WebCore::DOMURL::port):
(WebCore::DOMURL::setPort):
(WebCore::DOMURL::pathname):
(WebCore::DOMURL::setPathname):
(WebCore::DOMURL::search):
(WebCore::DOMURL::setSearch):
(WebCore::DOMURL::hash):
(WebCore::DOMURL::setHash):
* html/DOMURL.h:
(WebCore::DOMURL::create):
* html/DOMURL.idl: Update for new methods.
* html/URLUtils.idl: Added. New IDL file that contains most of the interface.

LayoutTests:

Add a bunch of new tests for URL(), copied from HTMLAnchorElement API tests:

* fast/dom/DOMURL/get-href-attribute-port-expected.txt: Added.
* fast/dom/DOMURL/get-href-attribute-port.html: Added.
* fast/dom/DOMURL/resources: Added.
* fast/dom/DOMURL/resources/iframe-with-anchor.html: Added.
* fast/dom/DOMURL/set-href-attribute-hash-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-hash.html: Added.
* fast/dom/DOMURL/set-href-attribute-host-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-host.html: Added.
* fast/dom/DOMURL/set-href-attribute-hostname-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-hostname.html: Added.
* fast/dom/DOMURL/set-href-attribute-pathname-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-pathname.html: Added.
* fast/dom/DOMURL/set-href-attribute-port-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-port.html: Added.
* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-protocol.html: Added.
* fast/dom/DOMURL/set-href-attribute-search-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-search.html: Added.
* fast/dom/DOMURL/set-href-attribute-whitespace-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-whitespace.html: Added.
* fast/dom/DOMURL/url-origin-expected.txt: Added.
* fast/dom/DOMURL/url-origin.html: Added.

Brand new tests for username and password properties, accessors on invalid URLS,
and different constructor modes:
* fast/dom/DOMURL/invalid-url-getters-expected.txt: Added.
* fast/dom/DOMURL/invalid-url-getters.html: Added.
* fast/dom/DOMURL/url-constructor-expected.txt: Added.
* fast/dom/DOMURL/url-constructor.html: Added.
* fast/dom/DOMURL/url-password-expected.txt: Added.
* fast/dom/DOMURL/url-password.html: Added.
* fast/dom/DOMURL/url-username-expected.txt: Added.
* fast/dom/DOMURL/url-username.html: Added.

Update tests and results for the fact that URL constructor takes arguments.
* fast/dom/DOMURL/check-instanceof-domurl-functions.html:
* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/script-tests/constructed-objects-prototypes.js:
* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk-wk2/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:

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

7 years agoUnreviewed, build fix.
fpizlo@apple.com [Fri, 31 Jan 2014 22:59:49 +0000 (22:59 +0000)]
Unreviewed, build fix.

* ftl/FTLOSREntry.cpp:

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

7 years agoUnreviewed, really make --copy-libraries a no-able option.
fpizlo@apple.com [Fri, 31 Jan 2014 22:57:44 +0000 (22:57 +0000)]
Unreviewed, really make --copy-libraries a no-able option.

* Scripts/build-jsc:

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

7 years agoCreate clipping path from <box> value
bjonesbe@adobe.com [Fri, 31 Jan 2014 22:44:26 +0000 (22:44 +0000)]
Create clipping path from <box> value
https://bugs.webkit.org/show_bug.cgi?id=126205

Reviewed by Dirk Schulze.

Source/WebCore:

This implements <box> values for border, content, and padding boxes.
Since margin box is not implemented as a reference box, this does not
implement margin box value.

Tests: css3/masking/clip-path-border-box.html
       css3/masking/clip-path-content-box.html
       css3/masking/clip-path-padding-box.html

* rendering/ClipPathOperation.h:
(WebCore::BoxClipPathOperation::pathForReferenceRect): Implement.
* rendering/RenderLayer.cpp:
(WebCore::computeReferenceBox): Pull out reference box calculation.
(WebCore::RenderLayer::setupClipPath): Add support for <box> values.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape): Add FIXME comment.

LayoutTests:

Tests for border, padding and content box values. Margin is
unimplemented as of yet.

* css3/masking/clip-path-border-box-expected.html: Added.
* css3/masking/clip-path-border-box.html: Added.
* css3/masking/clip-path-content-box-expected.html: Added.
* css3/masking/clip-path-content-box.html: Added.
* css3/masking/clip-path-padding-box-expected.html: Added.
* css3/masking/clip-path-padding-box.html: Added.

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

7 years agoFix windows
oliver@apple.com [Fri, 31 Jan 2014 22:35:14 +0000 (22:35 +0000)]
Fix windows

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

7 years agoUnreviewed, really add the --copy-libraries option.
fpizlo@apple.com [Fri, 31 Jan 2014 22:26:38 +0000 (22:26 +0000)]
Unreviewed, really add the --copy-libraries option.

* Scripts/build-jsc:

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

7 years agoUnreviewed, fix the script for older Rubies.
fpizlo@apple.com [Fri, 31 Jan 2014 22:23:09 +0000 (22:23 +0000)]
Unreviewed, fix the script for older Rubies.

* Scripts/export-llvm-build:

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

7 years agoAdd webView:didReceiveServerRedirectForProvisionalNavigation:
andersca@apple.com [Fri, 31 Jan 2014 22:21:27 +0000 (22:21 +0000)]
Add webView:didReceiveServerRedirectForProvisionalNavigation:
https://bugs.webkit.org/show_bug.cgi?id=128016

Reviewed by Dan Bernstein.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

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

7 years agoIDB: Index cursor preliminary support
beidson@apple.com [Fri, 31 Jan 2014 22:18:08 +0000 (22:18 +0000)]
IDB: Index cursor preliminary support
https://bugs.webkit.org/show_bug.cgi?id=127869

Reviewed by Sam Weinig.

This gets index cursors running and - for some situations - returning results.

Bug 127870 will make them fully functional.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::getIndexStatement): Using the key and sorting parameters, find the appropriate SQL
  statement to run an index cursor.
(WebKit::getObjectStoreStatement): Same, but for object store cursors.
(WebKit::SQLiteIDBCursor::establishStatement): Depending on the type of cursor, choose the
  correct SQL query and id to use.
(WebKit::SQLiteIDBCursor::createSQLiteStatement): With the passed in SQL and id, handle both
  index and object store cursors.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:

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

7 years agoFix 32bit.
oliver@apple.com [Fri, 31 Jan 2014 22:10:33 +0000 (22:10 +0000)]
Fix 32bit.

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

7 years agoHaving a custom LLVM checkout should always override all other ways of getting LLVM
fpizlo@apple.com [Fri, 31 Jan 2014 21:59:39 +0000 (21:59 +0000)]
Having a custom LLVM checkout should always override all other ways of getting LLVM
https://bugs.webkit.org/show_bug.cgi?id=128015

Reviewed by Oliver Hunt.

* Scripts/copy-webkitlibraries-to-product-directory:

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

7 years agoAdd options to force debugger / profiler bytecode generation.
mark.lam@apple.com [Fri, 31 Jan 2014 21:59:02 +0000 (21:59 +0000)]
Add options to force debugger / profiler bytecode generation.
<https://webkit.org/b/128014>

Reviewed by Oliver Hunt.

Add Options::forceDebuggerBytecodeGeneration() and
Options::forceProfilerBytecodeGeneration(). These options make it more
convenient to do correctness testing when debugger / profiler bytecodes
are generated.

These options are disabled by default.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* runtime/Options.h:

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

7 years agoWebKit Bot Watcher's Dashboard: Teach JSON.load() to take optional failure callback...
dbates@webkit.org [Fri, 31 Jan 2014 21:56:30 +0000 (21:56 +0000)]
WebKit Bot Watcher's Dashboard: Teach JSON.load() to take optional failure callback function
https://bugs.webkit.org/show_bug.cgi?id=127924

Reviewed by Alexey Proskuryakov.

Towards providing better error handling when a JSON load fails with a non-200 HTTP status
code, we should teach JSON.load() to take an optional failure callback function and invoke
it when either a load error or a JSON parsing error occurs.

As a side benefit of having a failure callback function a caller can separate the error handling
logic for a JSON load or parse error from the logic of handling a successful parsing of JSON content.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.loadLayoutTestResults): Move JSON parser error logic into failure
callback function.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(JSON.load): Modified to take optional failure callback function called failureCallback.

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

7 years agoMake it possible to implement JS builtins in JS
oliver@apple.com [Fri, 31 Jan 2014 21:34:38 +0000 (21:34 +0000)]
Make it possible to implement JS builtins in JS
https://bugs.webkit.org/show_bug.cgi?id=127887

Reviewed by Michael Saboff.

.:

CMake updates

* Source/cmake/gtest/CMakeLists.txt:

Source/JavaScriptCore:

This patch makes it possible to write builtin functions in JS.
The bindings, generators, and definitions are all created automatically
based on js files in the builtins/ directory.  This patch includes one
such case: Array.prototype.js with an implementation of every().

There's a lot of refactoring to make it possible for CommonIdentifiers
to include the output of the generated files (DerivedSources/JSCBuiltins.{h,cpp})
without breaking the offset extractor. The result of this refactoring
is that CommonIdentifiers, and a few other miscellaneous headers now
need to be included directly as they were formerly captured through other
paths.

In addition this adds a flag to the Lookup table's hashentry to indicate
that a static function is actually backed by JS. There is then a lot of
logic to thread the special nature of the functon to where it matters.
This allows toString(), .caller, etc to mimic the behaviour of a host
function.

Notes on writing builtins:
 - Each function is compiled independently of the others, and those
   implementations cannot currently capture all global properties (as
   that could be potentially unsafe). If a function does capture a
   global we will deliberately crash.
 - For those "global" properties that we do want access to, we use
   the @ prefix, e.g. Object(this) becomes @Object(this). The @ identifiers
   are private names, and behave just like regular properties, only
   without the risk of adulteration. Again, in the @Object case, we
   explicitly duplicate the ObjectConstructor reference on the GlobalObject
   so that we have guaranteed access to the original version of the
   constructor.
 - call, apply, eval, and Function are all rejected identifiers, again
   to prevent anything from accidentally using an adulterated object.
   Instead @call and @apply are available, and happily they completely
   drop the neq_ptr instruction as they're defined as always being the
   original call/apply functions.

These restrictions are just intended to make it harder to accidentally
make changes that are incorrect (for instance calling whatever has been
assigned to global.Object, instead of the original constructor function).
However, making a mistake like this should result in a purely semantic
error as fundamentally these functions are treated as though they were
regular JS code in the host global, and have no more privileges than
any other JS.

The initial proof of concept is Array.prototype.every, this shows a 65%
performance improvement, and that improvement is significantly hurt by
our poor optimisation of op_in.

As this is such a limited function, we have not yet exported all symbols
that we could possibly need, but as we implement more, the likelihood
of encountering missing features will reduce.

This did require breaking out a JSStringInlines header, and required
fixing a few objects that were trying to using PropertyName::publicName
rather than PropertyName::uid.

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):
(JSC::JSCallbackObject<Parent>::put):
(JSC::JSCallbackObject<Parent>::deleteProperty):
(JSC::JSCallbackObject<Parent>::getStaticValue):
(JSC::JSCallbackObject<Parent>::staticFunctionGetter):
(JSC::JSCallbackObject<Parent>::callbackGetter):
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Array.prototype.js:
(every):
* builtins/BuiltinExecutables.cpp: Added.
(JSC::BuiltinExecutables::BuiltinExecutables):
(JSC::BuiltinExecutables::createBuiltinExecutable):
* builtins/BuiltinExecutables.h:
(JSC::BuiltinExecutables::create):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::toStrictness):
(JSC::UnlinkedFunctionExecutable::isBuiltinFunction):
(JSC::UnlinkedCodeBlock::isBuiltinFunction):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isBuiltinFunction):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* create_hash_table:
* dfg/DFGOperations.cpp:
* generate-js-builtins: Added.
(getCopyright):
(getFunctions):
(generateCode):
(mangleName):
(FunctionExecutable):
(Identifier):
(JSGlobalObject):
(SourceCode):
(UnlinkedFunctionExecutable):
(VM):
* interpreter/Interpreter.cpp:
* interpreter/ProtoCallFrame.cpp:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:
* jsc.cpp:
* llint/LLIntSlowPaths.cpp:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
(JSC::isSafeIdentifier):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<T>::lex):
* parser/Lexer.h:
(JSC::isSafeIdentifier):
(JSC::Lexer<T>::lexExpectIdentifier):
* parser/Nodes.cpp:
(JSC::ProgramNode::setClosedVariables):
* parser/Nodes.h:
(JSC::ScopeNode::capturedVariables):
(JSC::ScopeNode::setClosedVariables):
(JSC::ProgramNode::closedVariables):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::didFinishParsing):
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/Parser.h:
(JSC::Scope::getUsedVariables):
(JSC::Parser::closedVariables):
(JSC::parse):
* parser/ParserModes.h:
* parser/ParserTokens.h:
* runtime/ArgList.cpp:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/ArgumentsIteratorConstructor.cpp:
* runtime/ArgumentsIteratorPrototype.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
(JSC::CommonIdentifiers::getPrivateName):
(JSC::CommonIdentifiers::getPublicName):
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
* runtime/CommonSlowPathsExceptions.cpp:
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/Executable.h:
(JSC::EvalExecutable::executableInfo):
(JSC::ProgramExecutable::executableInfo):
(JSC::FunctionExecutable::isBuiltinFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
* runtime/JSActivation.cpp:
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::symbolTablePut):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSArgumentsIterator.cpp:
* runtime/JSArray.cpp:
* runtime/JSArrayIterator.cpp:
* runtime/JSCJSValue.cpp:
* runtime/JSCellInlines.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::createBuiltinFunction):
(JSC::JSFunction::calculatedDisplayName):
(JSC::JSFunction::sourceCode):
(JSC::JSFunction::isHostOrBuiltinFunction):
(JSC::JSFunction::isBuiltinFunction):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSFunction.h:
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
* runtime/JSGenericTypedArrayViewInlines.h:
* runtime/JSGenericTypedArrayViewPrototypeInlines.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::objectConstructor):
(JSC::JSGlobalObject::symbolTableHasProperty):
* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
(JSC::JSObject::reifyStaticFunctionsForDelete):
(JSC::JSObject::putDirectBuiltinFunction):
* runtime/JSObject.h:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSPropertyNameIterator.h:
* runtime/JSString.h:
* runtime/JSStringInlines.h: Added.
(JSC::JSString::getStringPropertySlot):
(JSC::inlineJSValueNotStringtoString):
(JSC::JSValue::toWTFStringInline):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
   Don't report private names.
* runtime/JSSymbolTableObject.h:
(JSC::symbolTableGet):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::HashEntry::builtinGenerator):
(JSC::HashEntry::propertyGetter):
(JSC::HashEntry::propertyPutter):
(JSC::HashTable::entry):
(JSC::getStaticPropertySlot):
(JSC::getStaticValueSlot):
(JSC::putEntry):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NativeErrorConstructor.h:
* runtime/PropertySlot.h:
* runtime/RegExpPrototype.cpp:
* runtime/SetConstructor.cpp:
* runtime/StringObject.cpp:
* runtime/Structure.cpp:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::builtinExecutables):

Source/WebCore:

Updating for the newly required headers.

Test: js/regress/array-prototype-every.html

* ForwardingHeaders/runtime/JSStringInlines.h: Added.
* Modules/plugins/QuickTimePluginReplacement.cpp:
* bindings/js/JSIDBAnyCustom.cpp:
* bindings/js/JSIDBDatabaseCustom.cpp:
* bindings/js/JSIDBObjectStoreCustom.cpp:

Source/WebKit:

CMake updates

* CMakeLists.txt:

Source/WebKit2:

CMake updates

* CMakeLists.txt:

Tools:

CMake updates

* DumpRenderTree/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WinCELauncher/CMakeLists.txt:

LayoutTests:

Updated the test results for new error messages (now that they're
actually helpful), and added a js-regress test to track performance.

* js/array-every-expected.txt:
* js/dom/array-prototype-properties-expected.txt:
* js/regress/array-prototype-every-expected.txt: Added.
* js/regress/array-prototype-every.html: Added.
* js/regress/script-tests/array-prototype-every.js: Added.
(test1):
(test2):
(test3):

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

7 years agoBuild fix.
bdakin@apple.com [Fri, 31 Jan 2014 21:27:40 +0000 (21:27 +0000)]
Build fix.

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

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

7 years agoAllow more flexibility for copy-webkitlibraries-to-product-directory
fpizlo@apple.com [Fri, 31 Jan 2014 21:26:26 +0000 (21:26 +0000)]
Allow more flexibility for copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=128010

Reviewed by Oliver Hunt.

It's now the case that copy-webkitlibraries-to-product-directory does nothing by
default, but you can tell it to either copy WebKitSystemInterface (--wksi) or LLVM
(--llvm). You can also tell it where to get LLVM from.

* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

7 years agoWebKit2 View Gestures (Swipe): Crashes swiping around a Google Docs spreadsheet
timothy_horton@apple.com [Fri, 31 Jan 2014 21:17:47 +0000 (21:17 +0000)]
WebKit2 View Gestures (Swipe): Crashes swiping around a Google Docs spreadsheet
https://bugs.webkit.org/show_bug.cgi?id=128013
<rdar://problem/15959481>

Reviewed by Anders Carlsson.

* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
We should never (currently) start a swipe from a non-begin-phase wheel event.
We already check this in handleScrollWheelEvent, but can still get
non-begin-phase events in wheelEventWasNotHandled.

We only start "pending" swipes with Begin events, so we should never make them
non-pending with anything but a Begin event (we'll get it when it bubbles back up,
unhandled, from WebCore). In addition, AppKit throws an exception when we try
to start a swipe from end-phase events.

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

7 years agoProperly handle cases where a profile couldn't be recorded and null is returned.
timothy@apple.com [Fri, 31 Jan 2014 21:11:35 +0000 (21:11 +0000)]
Properly handle cases where a profile couldn't be recorded and null is returned.

<rdar://problem/15957993> Crash with Inspector open at WebCore::ScriptProfile::buildInspectorObject

Reviewed by Joseph Pecoraro.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCallFunction): Null check profile.
(WebCore::InspectorTimelineAgent::didEvaluateScript): Ditto.

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

7 years agoExtended background should only create margin tiles for pages with background
bdakin@apple.com [Fri, 31 Jan 2014 21:06:38 +0000 (21:06 +0000)]
Extended background should only create margin tiles for pages with background
images
https://bugs.webkit.org/show_bug.cgi?id=127876
-and corresponding-
<rdar://problem/15827632>

Reviewed by Simon Fraser.

Source/WebCore:

Settings::backgroundShouldExtendBeyondPage() doesn't need to create margin tiles
for pages with simple background colors. Instead, those pages should achieve the
same effect by setting a background color on RenderLayerCompositor's
m_layerForOverhangAreas. For now, we should only create tiles when there is a
background image. We may want to extend this to other types of complicated
backgrounds in the future.

This patch makes callers that only care about the value of the setting always call
Settings::backgroundShouldExtendBeyondPage() rather than asking about margin
tiles. And callers that want to know about margin tiles can either keep querying
that directly or they can call FrameView::hasExtendedBackgroundRectForPainting().
An extended background does not necessarily require an extended background rect
for painting, and this new FrameView function can make that distinction.

When setBackgroundExtendsBeyondPage() is called, call RenderLayerCompositor::
setRootExtendedBackgroundColor() with either the document background color, or an
invalid color, depending on whether you have or do not have an extended
background. Also call needsExtendedBackgroundRectForPainting() to determine if we
also need to extend the background rect, and then call
setHasExtendedBackgroundRectForPainting() with its value.
* page/FrameView.cpp:
(WebCore::FrameView::setBackgroundExtendsBeyondPage):
(WebCore::FrameView::hasExtendedBackgroundRectForPainting):

 Right now we only need to extend the background rect for documents with
background images on the root. This may be extended in the future.
(WebCore::FrameView::needsExtendedBackgroundRectForPainting):
(WebCore::FrameView::setHasExtendedBackgroundRectForPainting):
(WebCore::FrameView::extendedBackgroundRectForPainting):
* page/FrameView.h:

Expose defaultTileWidth and defaultTileHeight from TiledBacking.h so that we can
access the values from RenderLayerBacking.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.mm:

hasExtendedBackgroundForPainting() is now called
hasExtendedBackgroundRectForPainting() to distinguish
the case where an extended RECT is needed.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

Call setHasExtendedBackgroundRectForPainting() if relevant.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):

Don't call setTiledBackingHasMargins() right in the constructor because we only
want margins if we have a background image, and we won't have that information
yet.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):

Clean up the variable name here. We are only setting margins when we need to
extend the background rect for painting. Also make us of newly-exposed
defaultTileWidth and Height.
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):

Remove RenderLayerBacking::tiledBackingHasMargin() since there aren't any more
callers.
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTiledBacking):

setMasksToBounds(false) based on the Setting, and not based on whether there are
tile margins.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):

Return false from RenderLayerCompositor::requiresContentShadowLayer() if there is
an extended background.
(WebCore::RenderLayerCompositor::requiresContentShadowLayer):

Setting the background color on m_layerForOverhangAreas is all we need to do to
create the extended background effect on pages that only have background colors.
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

Remove mainFrameBackingIsTiledWithMargin() since there aren't any more callers,
and add setRootExtendedBackgroundColor() so that we can update the color from
RenderView.
* rendering/RenderLayerCompositor.h:

Revert the code that was added to paint background color here, since this should
all be covered by calling RenderLayerCompositor::setExtendedBackgroundColor().
More complicated backgrounds will run through the full background painting code.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
(WebCore::RenderView::backgroundRect):

LayoutTests:

We can only test margin tiles if we also give the document a background image.
* platform/mac-wk2/tiled-drawing/resources/greenbox.png: Added.
* platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles.html:

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

7 years agoRemove FrameLoader's reloadWithOverrideURL and reloadWithRequest
jochen@chromium.org [Fri, 31 Jan 2014 21:03:52 +0000 (21:03 +0000)]
Remove FrameLoader's reloadWithOverrideURL and reloadWithRequest
https://bugs.webkit.org/show_bug.cgi?id=128005

Reviewed by Darin Adler.

The former was used by chromium-android to implement the "request
desktop version" feature, but is no longer used. After removing it,
the latter is only invoked by reload(), so we can merge the method
with it.

No new tests, just removing dead code.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reload):
* loader/FrameLoader.h:

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

7 years agoUnreviewed, rolling out r163182.
commit-queue@webkit.org [Fri, 31 Jan 2014 20:56:06 +0000 (20:56 +0000)]
Unreviewed, rolling out r163182.
http://trac.webkit.org/changeset/163182
https://bugs.webkit.org/show_bug.cgi?id=128012

Broke lots of tests (Requested by smfr on #webkit).

* page/FrameView.cpp:
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
(WebCore::isFixedPositionInViewport):
(WebCore::RenderView::hasCustomFixedPosition):
* rendering/RenderView.h:

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

7 years agoIDB: openCursor() needs to prime the cursor with first position values
beidson@apple.com [Fri, 31 Jan 2014 20:50:57 +0000 (20:50 +0000)]
IDB: openCursor() needs to prime the cursor with first position values
https://bugs.webkit.org/show_bug.cgi?id=128008

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform): If the server connection returns initial keys/values
  for the cursor, store them.

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

Source/WebKit2:

Change openCursor() messaging to pass back the initial keys/values
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::openCursor):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openCursor):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance): Const and reference updates.
(WebKit::UniqueIDBDatabase::cursorIterate): Ditto.
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::maybeCreate): After creating the cursor, advance(1) it.

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

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

7 years ago[CSS Shapes] Image valued shape can fail
hmuller@adobe.com [Fri, 31 Jan 2014 20:01:54 +0000 (20:01 +0000)]
[CSS Shapes] Image valued shape can fail
https://bugs.webkit.org/show_bug.cgi?id=127588

Reviewed by Dean Jackson.

Source/WebCore:

Correct the handling of image valued shapes that extend into or beyond the
margin box. This can happen when object-fit causes one dimension of the shape
to be greater than the corresponding margin box dimension.

Made some simplifications in RasterShapeIntervals::computeShapeMarginIntervals()
by making the shapeMargin parameter an int, removing some unnecessary variables.

Revised the RasterShapeIntervals class. It's now a just a list of size() interval-lists,
with valid indices: -offset() <= y < size() - offset(), or minY() to maxY(). If margin-top
and shape-margin are specified, then offset() is the larger of shape-margin and margin-top.
Similarly size() is the vertical size of the margin-box or the content-box expanded by
shape-margin, whichever is larger. See computeShapeMarginIntervals().

Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-005.html
       fast/shapes/shape-outside-floats/shape-outside-image-fit-006.html

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
(WebCore::RasterShape::marginIntervals):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals):
(WebCore::RasterShapeIntervals::offset):
(WebCore::RasterShapeIntervals::minY):
(WebCore::RasterShapeIntervals::maxY):
(WebCore::RasterShapeIntervals::intervalsAt):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:

(WebCore::getShapeImageReplacedRect):
The rect that the image will be drawn into. This rect can imply image
scaling and translation.

(WebCore::getShapeImageMarginRect):
The margin rect relative too the (0,0 origin) shape content rect.

(WebCore::ShapeInfo<RenderType>::computedShape):

LayoutTests:

Check shape-outside layout for image valued shapes where object-fit causes
the image to extend into or beyond the image element's margin box.

* fast/shapes/shape-outside-floats/shape-outside-image-fit-005-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-005.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-006-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-006.html: Added.

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

7 years agoDumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in Accessibili...
dfarler@apple.com [Fri, 31 Jan 2014 19:57:17 +0000 (19:57 +0000)]
DumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=128004

Reviewed by Chris Fleizach.

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::columnHeaders): Stub added.
(AccessibilityUIElement::rowHeaders): Stub added.

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

7 years agoDeduplicate Document::encoding().
akling@apple.com [Fri, 31 Jan 2014 19:49:30 +0000 (19:49 +0000)]
Deduplicate Document::encoding().
<https://webkit.org/b/128000>

Make Document::encoding() return an AtomicString so we don't duplicate
the string every time it's called.

215 KB progression on Membuster3.

Reviewed by Simon Fraser.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::encoding):

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

7 years agoUnreviewed. Update my contributors.json entry.
zoltan@webkit.org [Fri, 31 Jan 2014 19:48:35 +0000 (19:48 +0000)]
Unreviewed. Update my contributors.json entry.

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

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

7 years agoEven when in fixed layout mode, some platforms need to do layout after a viewport...
simon.fraser@apple.com [Fri, 31 Jan 2014 19:36:57 +0000 (19:36 +0000)]
Even when in fixed layout mode, some platforms need to do layout after a viewport change
https://bugs.webkit.org/show_bug.cgi?id=128003

Reviewed by Andreas Kling.

iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
elements relative to a variable viewport. This code assumed that fixed layout
implies a fixed viewport.

Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.

Also removed RenderView::hasCustomFixedPosition() which is no longer used.

* page/FrameView.cpp:
(WebCore::FrameView::shouldLayoutAfterViewportChange):
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:

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

7 years agoGuard GLContextEGL::platformContext() with USE(3D_GRAPHICS)
zandobersek@gmail.com [Fri, 31 Jan 2014 19:34:11 +0000 (19:34 +0000)]
Guard GLContextEGL::platformContext() with USE(3D_GRAPHICS)
https://bugs.webkit.org/show_bug.cgi?id=120214

Reviewed by Philippe Normand.

Guard the GLContextEGL::platformContext() declaration and definiton with USE(3D_GRAPHICS)
since this guard is used in the GLContext class, from which the GLContextEGL class overrides
this method.

* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGL.h:

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