WebKit-https.git
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

7 years agoSource/WebCore: Sideways 'wobble' when scrolling with trackpad on Mavericks
bdakin@apple.com [Fri, 31 Jan 2014 19:04:21 +0000 (19:04 +0000)]
Source/WebCore: Sideways 'wobble' when scrolling with trackpad on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=127521
-and corresponding-
<rdar://problem/14137306>

Reviewed by Simon Fraser.

This patch takes http://trac.webkit.org/changeset/154535 which introduced
filtering wheel events for overflow areas to try to make them less sensitive to X
deltas when scrolling in a primarily Y direction, and it factors that code out
into its own class, now called WheelEventDeltaTracker. So now this new class can
use the same code to filter events for WebKit2’s EventDispatcher.

Files for WheelEventDeltaTracker.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

WK2 needs these new WheelEventDeltaTracker functions.
* WebCore.exp.in:

Move a bunch of code over to WheelEventDeltaTracker and use
m_recentWheelEventTracker to serve the same purpose.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/EventHandler.h:

Allow horizontal rubber banding now that we have some event filtering in place.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):

New files. Most of this code was from EventHandler.
* page/WheelEventDeltaTracker.cpp: Added.
(WebCore::WheelEventDeltaTracker::WheelEventDeltaTracker):
(WebCore::WheelEventDeltaTracker::~WheelEventDeltaTracker):
(WebCore::WheelEventDeltaTracker::beginTrackingDeltas):
(WebCore::WheelEventDeltaTracker::endTrackingDeltas):
(WebCore::WheelEventDeltaTracker::recordWheelEventDelta):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
* page/WheelEventDeltaTracker.h: Added.
(WebCore::WheelEventDeltaTracker::isTrackingDeltas):

New function to clone events while zero-ing out certain deltas.
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta):
(WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta):

Source/WebKit2: Sideways 'wobble' when scrolling with trackpad on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=127521
-and corresponding-
<rdar://problem/14137306>

Reviewed by Simon Fraser.

Start using WebCore::WheelEventDeltaTracker to filter events.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:

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

7 years agoFix the ARM Thumb2 build after jsCStack branch merge
rgabor@webkit.org [Fri, 31 Jan 2014 18:59:59 +0000 (18:59 +0000)]
Fix the ARM Thumb2 build after jsCStack branch merge
https://bugs.webkit.org/show_bug.cgi?id=127903

Reviewed by Michael Saboff.

SP register cannot be used as a destination register of SUB or ADD on Thumb mode.

* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:

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

7 years agoFix the forward declaration of RawPluginMetaData in NetscapePluginModule.h
zandobersek@gmail.com [Fri, 31 Jan 2014 18:49:27 +0000 (18:49 +0000)]
Fix the forward declaration of RawPluginMetaData in NetscapePluginModule.h
https://bugs.webkit.org/show_bug.cgi?id=127992

Reviewed by Martin Robinson.

* Shared/Plugins/Netscape/NetscapePluginModule.h: RawPluginMetaData is a struct, so it should
be declared as such. The current forward declaration is throwing a warning when using Clang.

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

7 years agoDon't do logging from Range::collectSelectionRects() on iOS
simon.fraser@apple.com [Fri, 31 Jan 2014 18:49:13 +0000 (18:49 +0000)]
Don't do logging from Range::collectSelectionRects() on iOS
https://bugs.webkit.org/show_bug.cgi?id=127999

Reviewed by Enrica Casucci.

Remove some logging code that printed Range stuff in debug builds.

* dom/Range.cpp:
(WebCore::Range::collectSelectionRects):

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

7 years agoMake iOS fixed layer registration more like OS X
simon.fraser@apple.com [Fri, 31 Jan 2014 18:25:34 +0000 (18:25 +0000)]
Make iOS fixed layer registration more like OS X
https://bugs.webkit.org/show_bug.cgi?id=127983

Reviewed by Antti Koivisto.

Remove some #if PLATFORM(IOS) in the code related to registering
viewport-constrained layers. The code behaves correctly now in WK1
and WK2 based on the presence of a ScrollingCoordinator.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::nearestScrollingCoordinatorAncestor):
(WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
(WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):

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

7 years agoUnreviewed, rolling out r163165.
commit-queue@webkit.org [Fri, 31 Jan 2014 17:43:04 +0000 (17:43 +0000)]
Unreviewed, rolling out r163165.
http://trac.webkit.org/changeset/163165
https://bugs.webkit.org/show_bug.cgi?id=127997

broke 2 fast/table tests (Requested by kling on #webkit).

Source/WebCore:

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):

LayoutTests:

* fast/table/css-table-max-width-expected.txt:
* fast/table/css-table-max-width.html:
* fast/table/html-table-width-max-width-constrained-expected.txt: Removed.
* fast/table/html-table-width-max-width-constrained.html: Removed.

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

7 years agoDon't allocate a new XMLHttpRequestStaticData every time staticData() is called
andersca@apple.com [Fri, 31 Jan 2014 17:36:37 +0000 (17:36 +0000)]
Don't allocate a new XMLHttpRequestStaticData every time staticData() is called
https://bugs.webkit.org/show_bug.cgi?id=127996

Reviewed by Andreas Kling.

std::once_flag should be static.

* xml/XMLHttpRequest.cpp:
(WebCore::staticData):

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

7 years agoREGRESSION: WebKit2.PageLoadBasic API test is failing
andersca@apple.com [Fri, 31 Jan 2014 17:26:46 +0000 (17:26 +0000)]
REGRESSION: WebKit2.PageLoadBasic API test is failing
https://bugs.webkit.org/show_bug.cgi?id=127892

Reviewed by Dan Bernstein.

Source/WebKit2:

On Mountain Lion, URLs returned by -[NSBundle URLForResource:withExtension:subdirectory] include
localhost as the hostname, but WebCore::URL normalizes those URLs and removes the host name.

Because of this, URLs created by WKURLCreateWithCFURL won't be equal to urls passed through
the WebCore::URL constructor. Change WKURLIsEqual to compare the normalized URLs.

* Shared/API/c/WKURL.cpp:
(WKURLIsEqual):
* Shared/APIURL.h:
(API::URL::equals):
(API::URL::url):

Tools:

Re-enable test.

* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:

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

7 years agoIDB: When deleting object stores/indexes, also delete associated records
beidson@apple.com [Fri, 31 Jan 2014 17:03:17 +0000 (17:03 +0000)]
IDB: When deleting object stores/indexes, also delete associated records
https://bugs.webkit.org/show_bug.cgi?id=127872

Reviewed by Anders Carlsson.

This was mostly done via other patches, but clearObjectStore was the last remaining case:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore): Also delete Index records.

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

7 years agoSubpixel rendering: Change RenderBoxModelObject's border functions' signature to...
zalan@apple.com [Fri, 31 Jan 2014 16:48:55 +0000 (16:48 +0000)]
Subpixel rendering: Change RenderBoxModelObject's border functions' signature to support subpixel border painting.
https://bugs.webkit.org/show_bug.cgi?id=127975

Reviewed by Simon Fraser.

From int to LayoutUnit.

Covered by existing tests. No change in functionality.

* platform/text/TextStream.cpp:
(WebCore::TextStream::operator<<):
* platform/text/TextStream.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::borderTop):
(WebCore::RenderBoxModelObject::borderBottom):
(WebCore::RenderBoxModelObject::borderLeft):
(WebCore::RenderBoxModelObject::borderRight):
(WebCore::RenderBoxModelObject::borderBefore):
(WebCore::RenderBoxModelObject::borderAfter):
(WebCore::RenderBoxModelObject::borderStart):
(WebCore::RenderBoxModelObject::borderEnd):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::borderBefore):
(WebCore::RenderTable::borderAfter):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::borderLeft):
(WebCore::RenderTableCell::borderRight):
(WebCore::RenderTableCell::borderTop):
(WebCore::RenderTableCell::borderBottom):
(WebCore::RenderTableCell::borderStart):
(WebCore::RenderTableCell::borderEnd):
(WebCore::RenderTableCell::borderBefore):
(WebCore::RenderTableCell::borderAfter):
* rendering/RenderTableCell.h:

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

7 years agoIDB: Index writing
beidson@apple.com [Fri, 31 Jan 2014 15:55:28 +0000 (15:55 +0000)]
IDB: Index writing
<rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868

Reviewed by Anders Carlsson.

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::openConnectionInternal): Remove outdated comment and ASSERT.

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex): Conditionalize a block of code that is LevelDB-only.

Remove getColumnBlob().  Nobody used it, and it was dangerous because it reset the statement:
* platform/sql/SQLiteStatement.cpp:
* platform/sql/SQLiteStatement.h:
* WebCore.exp.in:

Source/WebKit2:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore): Handle writing index records, as well.

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Create a table
  for index records
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata): Extract IDBIndexMetadata
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord): Store in the IndexRecords table.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years ago[arm] Add missing pushPair/popPair implementations in MacroAssemblerARM.h
commit-queue@webkit.org [Fri, 31 Jan 2014 15:11:05 +0000 (15:11 +0000)]
[arm] Add missing pushPair/popPair implementations in MacroAssemblerARM.h
https://bugs.webkit.org/show_bug.cgi?id=127904

Patch by Julien Brianceau <jbriance@cisco.com> on 2014-01-31
Reviewed by Zoltan Herczeg.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::popPair):
(JSC::MacroAssemblerARM::pushPair):

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

7 years ago[CSSRegions] Add test(s) for list item as region
mihnea@adobe.com [Fri, 31 Jan 2014 14:29:10 +0000 (14:29 +0000)]
[CSSRegions] Add test(s) for list item as region
https://bugs.webkit.org/show_bug.cgi?id=122961

Reviewed by Dirk Schulze.

* fast/regions/list-item-as-region-expected.html: Added.
* fast/regions/list-item-as-region.html: Added.

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

7 years ago[jhbuild] Disable escape sequences in EWS output
ossy@webkit.org [Fri, 31 Jan 2014 10:51:24 +0000 (10:51 +0000)]
[jhbuild] Disable escape sequences in EWS output
https://bugs.webkit.org/show_bug.cgi?id=127922

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/system/environment.py:
(Environment.disable_gcc_smartquotes):
(Environment):
(Environment.disable_jhbuild_VT100_output):
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/steps/build.py:
(Build.build):

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

7 years ago[CSS Grid Layout] Do log(n) search in the named line vectors when positioning named...
commit-queue@webkit.org [Fri, 31 Jan 2014 08:10:11 +0000 (08:10 +0000)]
[CSS Grid Layout] Do log(n) search in the named line vectors when positioning named line spans.
https://bugs.webkit.org/show_bug.cgi?id=125396

Patch by László Langó <lango@inf.u-szeged.hu> on 2014-01-30
Reviewed by Andreas Kling.

Implement the suggested FIXMEs and do a log search in the named line
vectors. This maintains the previous (somewhat tricky) behavior by
using std::lower_bound and std::upper_bound. No difference in existing
performance tests, but should scale much better for big grids.

Backported from Blink:
https://chromium.googlesource.com/chromium/blink/+/9fc477af0be708c490a6b90e65e412b0c22b161f

No new tests, no behavior change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):

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

7 years agoFix table sizing when 'max-width' is used.
commit-queue@webkit.org [Fri, 31 Jan 2014 08:09:07 +0000 (08:09 +0000)]
Fix table sizing when 'max-width' is used.
https://bugs.webkit.org/show_bug.cgi?id=115156

Patch by László Langó <lango@inf.u-szeged.hu> on 2014-01-31
Reviewed by Andreas Kling.

Source/WebCore:

r143534 make <table> abide by 'max-width' all the time which is wrong.
Per the CSS specification, a table should be wide enough to fit its
content, regardless of 'max-width'.

r140479 fixed part of the regression from that change but made the
same fatal mistake by constraining min-content to fit 'max-width'.

The fix is to avoid constraining min-content and ensure that the table
logical width is at least its min-content size.

Backported from Blink:
https://chromium.googlesource.com/chromium/blink/+/0bca0dec4895aeeb2054ba36316e984e4ebed06f

Test: fast/table/html-table-width-max-width-constrained.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):

LayoutTests:

* fast/table/css-table-max-width-expected.txt:
* fast/table/css-table-max-width.html:
* fast/table/html-table-width-max-width-constrained-expected.txt: Added.
* fast/table/html-table-width-max-width-constrained.html: Added.

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

7 years ago[EFL][WK2] Unreviewed EFL WebKit2 build fix after r163116.
jinwoo7.song@samsung.com [Fri, 31 Jan 2014 07:51:17 +0000 (07:51 +0000)]
[EFL][WK2] Unreviewed EFL WebKit2 build fix after r163116.
https://bugs.webkit.org/show_bug.cgi?id=127985

Unreviewed EFL WebKit2 build fix.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::processDidExit):
* UIProcess/CoordinatedGraphics/WebView.h:

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

7 years agoVersioning.
lforschler@apple.com [Fri, 31 Jan 2014 06:38:05 +0000 (06:38 +0000)]
Versioning.

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

7 years agoFix iOS WK2 build after r163156.
simon.fraser@apple.com [Fri, 31 Jan 2014 06:10:12 +0000 (06:10 +0000)]
Fix iOS WK2 build after r163156.

Need to convert to IntSizes.

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

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

7 years agoFix iOS build after r163156.
simon.fraser@apple.com [Fri, 31 Jan 2014 06:00:45 +0000 (06:00 +0000)]
Fix iOS build after r163156.

Need to convert LayoutSizes to FloatSizes.

* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode borderRadii]):

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

7 years agoSubpixel rendering: Change drawRect()/drawLine() signature to support subpixel rendering.
zalan@apple.com [Fri, 31 Jan 2014 05:47:20 +0000 (05:47 +0000)]
Subpixel rendering: Change drawRect()/drawLine() signature to support subpixel rendering.
https://bugs.webkit.org/show_bug.cgi?id=127961

Reviewed by Simon Fraser.

IntRect/IntPoint -> FloatRect/FloatPoint.

Covered by existing tests. No change in functionality.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine): Keep 'distance' int for DottedStroke and DashedStroke for now.
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):

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

7 years agoRemove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is...
simon.fraser@apple.com [Fri, 31 Jan 2014 05:42:27 +0000 (05:42 +0000)]
Remove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is no longer used
https://bugs.webkit.org/show_bug.cgi?id=127981

Reviewed by Andreas Kling.

setLayerIsContainerForFixedPositionLayers() was only used by Chromium and Blackberry,
so remove it.

This allows the removal of RenderLayerBacking::registerScrollingLayers(),
moving the single useful line of code to the caller.

* page/scrolling/ScrollingCoordinator.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):

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

7 years agoSome fixed position elements disappear in WK2 on iOS
simon.fraser@apple.com [Fri, 31 Jan 2014 05:42:25 +0000 (05:42 +0000)]
Some fixed position elements disappear in WK2 on iOS
https://bugs.webkit.org/show_bug.cgi?id=127977

Reviewed by Tim Horton.

Use the appropriate rectangle to ensure that on iOS we don't
consider a fixed element outside the viewport when zoomed in,
and therefore never make a compositing layer for it.

Also remove the iOS-specific code in RenderLayerCompositor::requiresCompositingForPosition(),
since it's OK to use the common code. Doing so requires that we
set the "acceleratedCompositingForFixedPositionEnabled" setting to true
for iOS, so do so.

* page/Settings.cpp:
* page/Settings.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

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

7 years agoSubpixel rendering: Make RoundedRect layout unit aware.
zalan@apple.com [Fri, 31 Jan 2014 05:41:46 +0000 (05:41 +0000)]
Subpixel rendering: Make RoundedRect layout unit aware.
https://bugs.webkit.org/show_bug.cgi?id=127779

Reviewed by Simon Fraser.

In order to draw hairline borders, RoundedRect needs to be
LayoutUnit based.

No change in behavior.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
* platform/graphics/GraphicsContext.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::Radii::scale):
(WebCore::RoundedRect::Radii::expand):
(WebCore::RoundedRect::inflateWithRadii):
(WebCore::RoundedRect::RoundedRect):
(WebCore::RoundedRect::intersectsQuad):
* platform/graphics/RoundedRect.h:
(WebCore::RoundedRect::Radii::Radii):
(WebCore::RoundedRect::Radii::setTopLeft):
(WebCore::RoundedRect::Radii::setTopRight):
(WebCore::RoundedRect::Radii::setBottomLeft):
(WebCore::RoundedRect::Radii::setBottomRight):
(WebCore::RoundedRect::Radii::topLeft):
(WebCore::RoundedRect::Radii::topRight):
(WebCore::RoundedRect::Radii::bottomLeft):
(WebCore::RoundedRect::Radii::bottomRight):
(WebCore::RoundedRect::Radii::expand):
(WebCore::RoundedRect::Radii::shrink):
(WebCore::RoundedRect::rect):
(WebCore::RoundedRect::setRect):
(WebCore::RoundedRect::move):
(WebCore::RoundedRect::inflate):
(WebCore::RoundedRect::expandRadii):
(WebCore::RoundedRect::shrinkRadii):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::setCachedShadowValues):
(WebCore::ScratchBuffer::setCachedInsetShadowValues):
(WebCore::computeSliceSizesFromRadii):
(WebCore::ShadowBlur::templateSize):
(WebCore::ShadowBlur::drawRectShadow):
(WebCore::ShadowBlur::drawInsetShadow):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
(WebCore::ShadowBlur::drawLayerPieces):
(WebCore::ShadowBlur::beginShadowLayer):
* platform/graphics/ShadowBlur.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::fillRoundedRect):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateSideRect):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
(WebCore::calculateSideRectIncludingInner):
(WebCore::calculateAdjustedInnerBorder):
(WebCore::areaCastingShadowInHole):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderBoxModelObject.h:
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):

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

7 years ago[GTK] [CMake] Add support for building against GTK+ 2
mrobinson@webkit.org [Fri, 31 Jan 2014 05:37:15 +0000 (05:37 +0000)]
[GTK] [CMake] Add support for building against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=127959

Reviewed by Anders Carlsson.

.:

* Source/cmake/OptionsGTK.cmake: Add a new option to use GTK 2 and make a variable holding the
library API version. When using GTK 2 do not build WebKit 2.

Source/JavaScriptCore:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebCore:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebKit:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebKit2:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Tools:

* DumpRenderTree/PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.
* GtkLauncher/CMakeLists.txt: Ditto.
* ImageDiff/PlatformGTK.cmake: Ditto.
* TestWebKitAPI/Tests/WebKitGtk/CMakeLists.txt: Ditto.

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

7 years agoSpeculative build fix.
jberlin@webkit.org [Fri, 31 Jan 2014 04:51:21 +0000 (04:51 +0000)]
Speculative build fix.

* page/animation/CSSPropertyAnimation.cpp:

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

7 years agoFix profiler layout test crashes.
timothy@apple.com [Fri, 31 Jan 2014 04:04:04 +0000 (04:04 +0000)]
Fix profiler layout test crashes.

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

7 years agoSubpixel rendering: Change BorderData's width from unsigned to float to enable subpix...
zalan@apple.com [Fri, 31 Jan 2014 03:52:14 +0000 (03:52 +0000)]
Subpixel rendering: Change BorderData's width from unsigned to float to enable subpixel border painting.
https://bugs.webkit.org/show_bug.cgi?id=127949

Reviewed by Andreas Kling.

Covered by existing tests. No change in functionality.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::calcBorderStart):
(WebCore::RenderTable::calcBorderEnd):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::BorderValue):
(WebCore::BorderValue::width):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::borderBeforeWidth):
(WebCore::RenderStyle::borderAfterWidth):
(WebCore::RenderStyle::borderStartWidth):
(WebCore::RenderStyle::borderEndWidth):
* rendering/style/RenderStyle.h:

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

7 years agoCodeBlock's cloned SymbolTables only need the captured names.
akling@apple.com [Fri, 31 Jan 2014 03:38:06 +0000 (03:38 +0000)]
CodeBlock's cloned SymbolTables only need the captured names.
<https://webkit.org/b/127978>

Renamed SymbolTable::clone() to SymbolTable::cloneCapturedNames()
and make it skip over any symbols that aren't captured, since those
won't be needed after codegen.

This is a first step towards getting rid of redundant symbol tables.

Reviewed by Geoffrey Garen.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::cloneCapturedNames):
* runtime/SymbolTable.h:

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

7 years agoUnreviewed, rolling out r163125.
commit-queue@webkit.org [Fri, 31 Jan 2014 03:16:21 +0000 (03:16 +0000)]
Unreviewed, rolling out r163125.
http://trac.webkit.org/changeset/163125
https://bugs.webkit.org/show_bug.cgi?id=127980

caused 9 layout tests to assert and crash (Requested by estes
on #webkit).

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::legacySessionID):
(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:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setSessionID):

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

7 years agoAdd webView:didFinishLoadingNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 02:24:35 +0000 (02:24 +0000)]
Add webView:didFinishLoadingNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127976

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFinishLoadForFrame):
* 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::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didCommitNavigation:]):
(-[NavigationDelegate webView:didFinishLoadingNavigation:]):

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

7 years agoAdd security-checked cast for WebCore::CachedImage
ddkilzer@apple.com [Fri, 31 Jan 2014 02:02:05 +0000 (02:02 +0000)]
Add security-checked cast for WebCore::CachedImage
<http://webkit.org/b/127967>

Reviewed by Darin Adler.

Source/WebCore:

* loader/cache/CachedImage.h:
(WebCore::toCachedImage): Add.
(WebCore::toCachedImageManual): Add.
* loader/cache/CachedResource.h:
(CACHED_RESOURCE_TYPE_CASTS): Add macro.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::switchClientsToRevalidatedResource):
(WebCore::CachedImage::resumeAnimatingImagesForLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeImageFromCache):
- Use toCachedImage() and toCachedImageManual().

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):
- Use WebCore::toCachedImage().

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

7 years agoCrashes after 163116 in [WKView takeViewSnapshot]
timothy_horton@apple.com [Fri, 31 Jan 2014 01:53:19 +0000 (01:53 +0000)]
Crashes after 163116 in [WKView takeViewSnapshot]
https://bugs.webkit.org/show_bug.cgi?id=127973

Reviewed by Alexey Proskuryakov.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Make the ViewGestureController before using it, if we need one.

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

7 years agoFixed position objects are clipped in iOS WK2
simon.fraser@apple.com [Fri, 31 Jan 2014 01:47:45 +0000 (01:47 +0000)]
Fixed position objects are clipped in iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=127974

Reviewed by Darin Adler.

We clip compositing layers for fixed position objects to the viewport
to avoid huge layers. However, because iOS changes the fixed position
rect when zooming, we need a different rect for iOS.

In WK1 (when we have a platformWidget), we can use
visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect)
which is effectively the whole document. However in WK2 this is
the real visibleContentRect(), so there we use unscaledDocumentRect().

* page/FrameView.cpp:
(WebCore::FrameView::viewportConstrainedExtentRect):
* page/FrameView.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):

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

7 years agoDebug build fix.
timothy@apple.com [Fri, 31 Jan 2014 01:46:00 +0000 (01:46 +0000)]
Debug build fix.

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

7 years agoAdd a webView:didCommitNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 01:45:16 +0000 (01:45 +0000)]
Add a webView:didCommitNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127972

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didCommitLoadForFrame):
* 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::didCommitLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didStartProvisionalNavigation:]):
(-[NavigationDelegate webView:didCommitNavigation:]):

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

7 years agoUpdate WebCore localized strings.
timothy@apple.com [Fri, 31 Jan 2014 01:35:16 +0000 (01:35 +0000)]
Update WebCore localized strings.

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

7 years agoShow profile data in the discrete Scripts timeline view.
timothy@apple.com [Fri, 31 Jan 2014 01:35:12 +0000 (01:35 +0000)]
Show profile data in the discrete Scripts timeline view.

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

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.refreshIfNeeded):
(WebInspector.DataGridNode.prototype.needsRefresh):
(WebInspector.DataGridNode.prototype.set data):
(WebInspector.DataGridNode.prototype.set revealed):
(WebInspector.DataGridNode.prototype.refresh):
* UserInterface/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Main.html:
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded):
* UserInterface/ProfileNodeDataGridNode.js: Added.
(WebInspector.ProfileNodeDataGridNode):
(WebInspector.ProfileNodeDataGridNode.prototype.get profileNode):
(WebInspector.ProfileNodeDataGridNode.prototype.get records):
(WebInspector.ProfileNodeDataGridNode.prototype.get baseStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get rangeStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get rangeEndTime):
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeEndTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
(WebInspector.ProfileNodeDataGridNode.prototype.refresh):
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
* UserInterface/ProfileNodeTreeElement.js: Added.
(WebInspector.ProfileNodeTreeElement):
(WebInspector.ProfileNodeTreeElement.prototype.get profileNode):
(WebInspector.ProfileNodeTreeElement.prototype.get filterableData):
(WebInspector.ProfileNodeTreeElement.prototype.onattach):
(WebInspector.ProfileNodeTreeElement.prototype.onpopulate):
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineDataGrid.js:
(WebInspector.ScriptTimelineDataGrid):
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.get baseStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get rangeStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get rangeEndTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeEndTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get profile):
* UserInterface/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.updateLayout):
(WebInspector.ScriptTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptTimelineView.prototype.dataGridNodeForTreeElement):
(WebInspector.ScriptTimelineView.prototype.populateProfileNodeTreeElement):
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
(WebInspector.TimelineDataGrid.prototype._sort):
* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode):
(WebInspector.TimelineDataGridNode.prototype.collapse):
(WebInspector.TimelineDataGridNode.prototype.expand):
* UserInterface/TimelineRecord.js:
* UserInterface/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.get delegate):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.dataGridNodeForTreeElement):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):

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

7 years agoAdd the model objects for the new Web Inspector profile data.
timothy@apple.com [Fri, 31 Jan 2014 01:35:01 +0000 (01:35 +0000)]
Add the model objects for the new Web Inspector profile data.

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

Reviewed by Joseph Pecoraro.

* UserInterface/Main.html:
* UserInterface/Profile.js: Added.
(WebInspector.Profile):
(WebInspector.Profile.prototype.get idleTime):
(WebInspector.Profile.prototype.get topDownRootNodes):
(WebInspector.Profile.prototype.get bottomUpRootNodes):
* UserInterface/ProfileNode.js: Added.
(WebInspector.ProfileNode):
(WebInspector.ProfileNode.prototype.get id):
(WebInspector.ProfileNode.prototype.get type):
(WebInspector.ProfileNode.prototype.get functionName):
(WebInspector.ProfileNode.prototype.get sourceCodeLocation):
(WebInspector.ProfileNode.prototype.get startTime):
(WebInspector.ProfileNode.prototype.get endTime):
(WebInspector.ProfileNode.prototype.get selfTime):
(WebInspector.ProfileNode.prototype.get totalTime):
(WebInspector.ProfileNode.prototype.get calls):
(WebInspector.ProfileNode.prototype.get previousSibling):
(WebInspector.ProfileNode.prototype.get nextSibling):
(WebInspector.ProfileNode.prototype.get parentNode):
(WebInspector.ProfileNode.prototype.get childNodes):
(WebInspector.ProfileNode.prototype.totalTimeInRange):
(WebInspector.ProfileNode.prototype.computeCallInfoForTimeRange):
(WebInspector.ProfileNode.prototype.traverseNextProfileNode):
(WebInspector.ProfileNode.prototype.saveIdentityToCookie):
(WebInspector.ProfileNode.prototype.establishRelationships):
* UserInterface/ProfileNodeCall.js: Added.
(WebInspector.ProfileNodeCall):
(WebInspector.ProfileNodeCall.prototype.get startTime):
(WebInspector.ProfileNodeCall.prototype.get totalTime):
(WebInspector.ProfileNodeCall.prototype.get endTime):
(WebInspector.ProfileNodeCall.prototype.establishRelationships):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeFromPayload):
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeCallFromPayload):
(WebInspector.TimelineManager.prototype._profileFromPayload):

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

7 years agoAdd column number and call timing support to LegacyProfiler.
timothy@apple.com [Fri, 31 Jan 2014 01:34:54 +0000 (01:34 +0000)]
Add column number and call timing support to LegacyProfiler.

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

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::CallIdentifier):
(JSC::CallIdentifier::functionName):
(JSC::CallIdentifier::url):
(JSC::CallIdentifier::lineNumber):
(JSC::CallIdentifier::columnNumber):
(JSC::CallIdentifier::operator==):
(JSC::CallIdentifier::operator!=):
(JSC::CallIdentifier::Hash::hash):
(WTF::HashTraits<JSC::CallIdentifier>::constructDeletedValue):
(WTF::HashTraits<JSC::CallIdentifier>::isDeletedValue):
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::willExecute):
(JSC::LegacyProfiler::didExecute):
(JSC::LegacyProfiler::exceptionUnwind):
(JSC::LegacyProfiler::createCallIdentifier):
(JSC::createCallIdentifierFromFunctionImp):
* profiler/LegacyProfiler.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/Profile.h:
(JSC::Profile::uid):
(JSC::Profile::idleTime):
(JSC::Profile::setIdleTime):
* profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
(JSC::ProfileGenerator::removeProfileStart):
(JSC::ProfileGenerator::removeProfileEnd):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::stopProfiling):
(JSC::ProfileNode::endAndRecordCall):
(JSC::ProfileNode::startTimer):
(JSC::ProfileNode::debugPrintData):
* profiler/ProfileNode.h:
(JSC::ProfileNode::Call::Call):
(JSC::ProfileNode::Call::startTime):
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::totalTime):
(JSC::ProfileNode::Call::setTotalTime):
(JSC::ProfileNode::id):
(JSC::ProfileNode::functionName):
(JSC::ProfileNode::url):
(JSC::ProfileNode::lineNumber):
(JSC::ProfileNode::columnNumber):
(JSC::ProfileNode::calls):
(JSC::ProfileNode::lastCall):
(JSC::ProfileNode::numberOfCalls):

Source/WebCore:

* bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::idleTime):
(WebCore::buildInspectorObjectFor):
(WebCore::ScriptProfile::buildInspectorObject):
* bindings/js/ScriptProfile.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::createSnapshotHeader):
(WebCore::InspectorProfilerAgent::getCPUProfile):
* inspector/ScriptProfileNode.idl:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/protocol/Profiler.json:

LayoutTests:

Update test and results to include column numbers.

* fast/profiler/anonymous-event-handler-expected.txt:
* fast/profiler/anonymous-function-called-from-different-contexts-expected.txt:
* fast/profiler/anonymous-function-calls-built-in-functions-expected.txt:
* fast/profiler/anonymous-function-calls-eval-expected.txt:
* fast/profiler/anonymous-functions-with-display-names-expected.txt:
* fast/profiler/apply-expected.txt:
* fast/profiler/built-in-function-calls-anonymous-expected.txt:
* fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
* fast/profiler/call-expected.txt:
* fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt:
* fast/profiler/compare-multiple-profiles-expected.txt:
* fast/profiler/constructor-expected.txt:
* fast/profiler/dead-time-expected.txt:
* fast/profiler/document-dot-write-expected.txt:
* fast/profiler/event-handler-expected.txt:
* fast/profiler/execution-context-and-eval-on-same-line-expected.txt:
* fast/profiler/inline-event-handler-expected.txt:
* fast/profiler/many-calls-in-the-same-scope-expected.txt:
* fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt:
* fast/profiler/multiple-and-different-scoped-function-calls-expected.txt:
* fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt:
* fast/profiler/multiple-frames-expected.txt:
* fast/profiler/named-functions-with-display-names-expected.txt:
* fast/profiler/nested-anonymous-functon-expected.txt:
* fast/profiler/nested-start-and-stop-profiler-expected.txt:
* fast/profiler/one-execution-context-expected.txt:
* fast/profiler/profile-calls-in-included-file-expected.txt:
* fast/profiler/profile-with-no-title-expected.txt:
* fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt:
* fast/profiler/profiling-from-a-nested-location-expected.txt:
* fast/profiler/resources/profiler-test-JS-resources.js:
(printProfileNodeWithoutTime):
* fast/profiler/simple-event-call-expected.txt:
* fast/profiler/simple-no-level-change-expected.txt:
* fast/profiler/start-and-stop-profiler-multiple-times-expected.txt:
* fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt:
* fast/profiler/stop-profiling-after-setTimeout-expected.txt:
* fast/profiler/stop-then-function-call-expected.txt:
* fast/profiler/two-execution-contexts-expected.txt:
* fast/profiler/user-defined-function-calls-built-in-functions-expected.txt:
* fast/profiler/window-dot-eval-expected.txt:

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

7 years agoInclude profile with FunctionCall and EvaluateScript Timeline records.
timothy@apple.com [Fri, 31 Jan 2014 01:34:31 +0000 (01:34 +0000)]
Include profile with FunctionCall and EvaluateScript Timeline records.

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

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled):
* inspector/InspectorEnvironment.h:
* inspector/JSGlobalObjectInspectorController.h:

Source/WebCore:

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didCallInjectedScriptFunction):
* inspector/InspectorController.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCallFunctionImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCallFunction):
(WebCore::InspectorInstrumentation::didEvaluateScript):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/TimelineRecordFactory.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::didCallInjectedScriptFunction):
* inspector/WorkerInspectorController.h:

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

7 years agoPrefix existing Web Inspector profiler classes with "Legacy".
timothy@apple.com [Fri, 31 Jan 2014 01:34:19 +0000 (01:34 +0000)]
Prefix existing Web Inspector profiler classes with "Legacy".

Remove a dependency on ProfileView for showTimeAsPercent and selection as a drive-by.
Also remove the unfinished Canvas profiler classes, they will need redone for the Timeline view.

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

Reviewed by Joseph Pecoraro.

* UserInterface/CanvasDataGridNode.js: Removed.
* UserInterface/CanvasObserver.js: Removed.
* UserInterface/CanvasProfileObject.js: Removed.
* UserInterface/CanvasProfileType.js: Removed.
* UserInterface/CanvasProfileView.js: Removed.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.isProfilingJavaScript):
(InspectorFrontendAPI.startProfilingJavaScript):
(InspectorFrontendAPI.stopProfilingJavaScript):
* UserInterface/LegacyBottomUpProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/BottomUpProfileDataGridTree.js.
* UserInterface/LegacyJavaScriptProfileObject.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileObject.js.
* UserInterface/LegacyJavaScriptProfileType.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileType.js.
* UserInterface/LegacyJavaScriptProfileView.css: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileView.css.
* UserInterface/LegacyJavaScriptProfileView.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileView.js.
* UserInterface/LegacyProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileDataGridTree.js.
* UserInterface/LegacyProfileManager.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileManager.js.
* UserInterface/LegacyProfileObject.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileObject.js.
* UserInterface/LegacyProfileType.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileType.js.
* UserInterface/LegacyProfileView.css: Renamed from Source/WebInspectorUI/UserInterface/ProfileView.css.
* UserInterface/LegacyProfileView.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileView.js.
* UserInterface/LegacyProfilerObserver.js: Renamed from Source/WebInspectorUI/UserInterface/ProfilerObserver.js.
* UserInterface/LegacyTopDownProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/TopDownProfileDataGridTree.js.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector.openURL):

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

7 years agoAdd a webView:didFailProvisionalNavigation:withError: delegate method
andersca@apple.com [Fri, 31 Jan 2014 01:08:54 +0000 (01:08 +0000)]
Add a webView:didFailProvisionalNavigation:withError: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127968

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
* 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::didFailProvisionalLoadWithErrorForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[DidFailProvisionalNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[DidFailProvisionalNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):

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

7 years agoThe test server build fixes.
rniwa@webkit.org [Fri, 31 Jan 2014 01:07:16 +0000 (01:07 +0000)]
The test server build fixes.

* TestResultServer/model/jsonresults.py:
(JsonResults.merge):
* TestResultServer/static-dashboards/flakiness_dashboard.js:

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

7 years agoRemove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
commit-queue@webkit.org [Fri, 31 Jan 2014 01:04:07 +0000 (01:04 +0000)]
Remove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
https://bugs.webkit.org/show_bug.cgi?id=127964

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

Remove empty function. It was only needed by v8 at one point.

* bindings/js/ScriptController.h:
* bindings/js/ScriptController.cpp:
Remove empty function.

* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
Remove callers and related tracking state.

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

7 years agoNRWT shouldn't say "Finished writing JSON files" if it failed to to so
rniwa@webkit.org [Fri, 31 Jan 2014 01:03:37 +0000 (01:03 +0000)]
NRWT shouldn't say "Finished writing JSON files" if it failed to to so
https://bugs.webkit.org/show_bug.cgi?id=127966

Reviewed by Alexey Proskuryakov.

Don't say "Finished writing JSON files" if we had failed to generate the JSON file.
Also explicitly say this is for test results server as we're generating two JSON files.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator.__init__): Don't generate JSON file implicitly inside the constructor.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.generate_json_output): Return a boolean indicating whether the generation
had succeeded or not.

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

7 years agocopy-webkitlibraries-to-product-directory should accept command-line arguments for...
fpizlo@apple.com [Fri, 31 Jan 2014 00:41:51 +0000 (00:41 +0000)]
copy-webkitlibraries-to-product-directory should accept command-line arguments for extra work required for optional features rather than relying on environment variables
https://bugs.webkit.org/show_bug.cgi?id=120221

Reviewed by Mark Hahnenberg.

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

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

7 years agoAdd a webView:didStartProvisionalNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 00:23:23 +0000 (00:23 +0000)]
Add a webView:didStartProvisionalNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127965

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoaderClient):
(WebKit::NavigationState::createPolicyClient):
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::LoaderClient):
(WebKit::NavigationState::LoaderClient::~LoaderClient):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didStartProvisionalNavigation:]):
(TEST):

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

7 years agoIDB: Implement IDBObjectStore.count()
beidson@apple.com [Thu, 30 Jan 2014 23:58:30 +0000 (23:58 +0000)]
IDB: Implement IDBObjectStore.count()
https://bugs.webkit.org/show_bug.cgi?id=127888

Reviewed by Tim Horton.

Now count() actually works.

Forward the count() request to the backing store”
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::countInBackingStore):

Using a cursor, get a count:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Give a direct accessor to allow the backing store to close a cursor it opened
for its own use:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::closeCursor):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didCount): Update the logging to show the count.

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

7 years agoWeb Inspector: [REGRESSION(r163086)] Missing localized string 'Hide console (%s)'
commit-queue@webkit.org [Thu, 30 Jan 2014 23:36:34 +0000 (23:36 +0000)]
Web Inspector: [REGRESSION(r163086)] Missing localized string 'Hide console (%s)'
https://bugs.webkit.org/show_bug.cgi?id=127951

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-30
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Add 'Hide console (%s)'.

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

7 years agoImplement NavigationState::PolicyClient::decidePolicyForNewWindowAction
andersca@apple.com [Thu, 30 Jan 2014 23:24:12 +0000 (23:24 +0000)]
Implement NavigationState::PolicyClient::decidePolicyForNewWindowAction
https://bugs.webkit.org/show_bug.cgi?id=127962

Reviewed by Andreas Kling.

Have decidePolicyForNewWindowAction call decidePolicyForNavigationAction with a null destination frame.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):

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

7 years agohttp/tests/security/cross-origin-plugin-private-browsing-toggled.html is flaky on WK2
ap@apple.com [Thu, 30 Jan 2014 23:18:26 +0000 (23:18 +0000)]
http/tests/security/cross-origin-plugin-private-browsing-toggled.html is flaky on WK2
https://bugs.webkit.org/show_bug.cgi?id=127960

* platform/mac-wk2/TestExpectations: Marked it as such.

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

7 years agoWebGL load policy should be queried for the top level document.
roger_fong@apple.com [Thu, 30 Jan 2014 23:16:50 +0000 (23:16 +0000)]
WebGL load policy should be queried for the top level document.
https://bugs.webkit.org/show_bug.cgi?id=127937.
<rdar://problem/15950122>
Reviewed by Timothy Horton.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):

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

7 years agoAdd session support to WebPlatformStrategies
commit-queue@webkit.org [Thu, 30 Jan 2014 23:11:09 +0000 (23:11 +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-30
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@163125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoIDB: ObjectStore cursor iterate() support
beidson@apple.com [Thu, 30 Jan 2014 23:06:53 +0000 (23:06 +0000)]
IDB: ObjectStore cursor iterate() support
<rdar://problem/15941914> and https://bugs.webkit.org/show_bug.cgi?id=127867

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::iterate): Implement iterate() using advance()

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

7 years agodecidePolicyForNewWindowAction should take a NavigationActionData object
andersca@apple.com [Thu, 30 Jan 2014 23:04:21 +0000 (23:04 +0000)]
decidePolicyForNewWindowAction should take a NavigationActionData object
https://bugs.webkit.org/show_bug.cgi?id=127952

Reviewed by Dan Bernstein.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNewWindowAction):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):

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

7 years agoAdd a method for schemes to be registered as supporting cache partitioning
jpfau@apple.com [Thu, 30 Jan 2014 23:02:39 +0000 (23:02 +0000)]
Add a method for schemes to be registered as supporting cache partitioning
https://bugs.webkit.org/show_bug.cgi?id=127739

Reviewed by Darin Adler.

Source/WebCore:

Currently, this assumes that schemes supporting cache partitioning
also support (scheme, host) doubles for the scheme. Furthermore,
the scheme is currently discarded when partitioning and is only
checked to ensure that partitioning is supported for that scheme: it
is assumed that all origins with the same host double should be binned
together, regardless of scheme.

* WebCore.exp.in:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::cachePartition):
* platform/SchemeRegistry.cpp:
(WebCore::CachePartitioningSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
* platform/SchemeRegistry.h:

Source/WebKit2:

Pipe information about cache partitioned scheme through WebKit2.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextRegisterURLSchemeAsCachePartitioned):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::registerURLSchemeAsCachePartitioned):
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

7 years agoFTL should support GetById(Untyped:)
fpizlo@apple.com [Thu, 30 Jan 2014 23:00:16 +0000 (23:00 +0000)]
FTL should support GetById(Untyped:)
https://bugs.webkit.org/show_bug.cgi?id=127750

Reviewed by Oliver Hunt.

This was supposed to be easy. Indeed, the actual GetById UntypedUse case was easy. But
then it expanded coverage by a lot and I got to deal with three bugs. So, this has
some additional changes:

Also make it safe for LLVM to duplicate calls to patchpoints and stackmaps. Previously
we incorrectly assumed that if we emitted a patchpoint, then there would only be one
copy of that patchpoint (with that ID) in the resulting machine code and in the
stackmaps section. That's obviously a bad assumption - LLVM is allowed to do anything
it wants so long as the outcome of executing the code has a semantically equivalent
meaning to the IR we gave it, and duplicating code is trivially OK under this rule. We
should be OK with it, too. The solution is to add Vectors in a bunch of places that
previously just thought they only had one value. For example, an InlineCacheDescriptor
now has a Vector of generators - one generator for each copy that LLVM stamped out.
Normally there will only be one copy, of course - since duplication is usually
unprofitable. But, if LLVM decides that copying would be groovy then we will no longer
barf.

Also fix SSA conversion. It turns out that we mishandled the case where a block had
multiple Phi functions for the same local. If any of those CPS Phis fail to trivialize
in the Aycock-Horspool fixpoint, we need to insert an SSA Phi. Previously, it was
assuming that so long as the head CPS Phi was trivial, we could forego SSA Phi
insertion. That's wrong if the head CPS Phi trivialized but ended up pointing to a
non-trivial CPS Phi in the same block. This madness with trees of Phis occurs because
we try to save on compile times: no Phi ever has more than three children even if the
block has more than three predecessors; we just build out a tree of Phis to satisfy
all predecessors. So weird.

And finally, fix DFG->FTL OSR entry's reconstruction of 'this' in a constructor. That
reconstruction code, JITCode::reconstruct(), had a work-around for the case where we
were entering into a constructor at the prologue. In that case, 'this' is definitely
unavailable. But the OSR code does reconstructions at LoopHints, which aren't at the
prologue, and so 'this' should totally be available.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
* dfg/DFGNode.h:
(JSC::DFG::Node::tryGetVariableAccessData):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCompile.cpp:
(JSC::FTL::generateICFastPath):
(JSC::FTL::fixFunctionBasedOnStackMaps):
* ftl/FTLInlineCacheDescriptor.h:
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::codeSize):
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
* ftl/FTLJSCall.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetById):
(JSC::FTL::LowerDFGToLLVM::getById):
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry):
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::getRecordMap):
* ftl/FTLStackMaps.h:
* tests/stress/get-by-id-untyped.js: Added.
(foo):

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

7 years ago[iOS] Convert blocks to lambdas in iOS Fullscreen code.
jer.noble@apple.com [Thu, 30 Jan 2014 22:58:49 +0000 (22:58 +0000)]
[iOS] Convert blocks to lambdas in iOS Fullscreen code.
https://bugs.webkit.org/show_bug.cgi?id=127946

Reviewed by Anders Carlsson.

Pushing a block into a std::function will eventually cause a crash, since std::function
does not know about Block_copy and Block_release.

Lamdas can be intrinsicly converted to blocks, but not vice versa. Switch over all the
blocks in the new iOS Fullscreen code to use lamdas, and use the ref-counted this object
directly rather than implicitly.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController exitFullscreen]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setVideoLayer):
(WebVideoFullscreenInterfaceAVKit::enterFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):

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

7 years agoWebKitTestRunner fails to link - missing rowHeaders and columnHeaders
cfleizach@apple.com [Thu, 30 Jan 2014 22:52:47 +0000 (22:52 +0000)]
WebKitTestRunner fails to link - missing rowHeaders and columnHeaders
https://bugs.webkit.org/show_bug.cgi?id=127917

Reviewed by Andy Estes.

* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::rowHeaders):
(WTR::AccessibilityUIElement::columnHeaders):

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

7 years agoLots of API test assertion failures after r163093
timothy_horton@apple.com [Thu, 30 Jan 2014 22:49:32 +0000 (22:49 +0000)]
Lots of API test assertion failures after r163093
https://bugs.webkit.org/show_bug.cgi?id=127948

Reviewed by Alexey Proskuryakov.

* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::processDidExit):
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _processDidExit]):
* UIProcess/API/ios/WKContentViewInternal.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::processDidExit):
* UIProcess/API/mac/WKView.mm:
(-[WKView _processDidExit]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/API/mac/WKViewInternal.h:
Rename _processDidCrash to _processDidExit, since it containes cleanup we
should do in both cases. Also, call it whenever a process terminates instead
of just upon a crash. Also clear the ViewGestureController, because its
state doesn't make sense between WebProcesses.

(-[WKView _setCustomSwipeViews:]):
Don't make a ViewGestureController if we don't have one and would be
only creating one to set an empty list of custom swipe views.

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

7 years agoPart 2: REGRESSION: JavascriptCore crash during OS Installation (due to
ggaren@apple.com [Thu, 30 Jan 2014 22:37:13 +0000 (22:37 +0000)]
Part 2: REGRESSION: JavascriptCore crash during OS Installation (due to
Heap::m_operationInProgress ASSERT vs DelayedReleaseScope)
https://bugs.webkit.org/show_bug.cgi?id=127950

Reviewed by Mark Hahnenberg.

Scope the APICallbackShim to make sure that we re-acquire the lock
before putting the heap back into the "unsafe to allocate" state.
Otherwise, the heap will seem to be in the "unsafe to allocate" state
during any GC that happens before we re-acquire the lock.

No regression test because threads.

* heap/DelayedReleaseScope.h:
(JSC::DelayedReleaseScope::~DelayedReleaseScope):

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

7 years ago[GTK] [CMake] Add a "make dist" target
mrobinson@webkit.org [Thu, 30 Jan 2014 22:34:15 +0000 (22:34 +0000)]
[GTK] [CMake] Add a "make dist" target
https://bugs.webkit.org/show_bug.cgi?id=116378

Reviewed by Gustavo Noronha Silva.

.:

* Source/PlatformGTK.cmake: A CMake support for executing the make-dist
script and then turning the tarfile into a LZMA compressed file.

Source/WebCore:

* CMakeLists.txt: Don't build WebKitVersion.h for WebKitGTK+. We don't use it
and we don't want to distribute the dependency.

Tools:

Added a script that reads a manifest file an produces a tarball. Also add
the manifest.

* gtk/make-dist.py: Added.
* gtk/manifest.txt: Added.

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

7 years agoIDB: ObjectStore cursor advance() support
beidson@apple.com [Thu, 30 Jan 2014 22:23:24 +0000 (22:23 +0000)]
IDB: ObjectStore cursor advance() support
<rdar://problem/15779645> and https://bugs.webkit.org/show_bug.cgi?id=127866

Reviewed by Sam Weinig.

Source/WebCore:

Add IDBKeyData sorting for database collation:
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::compare):
* Modules/indexeddb/IDBKeyData.h:

* WebCore.exp.in:

* platform/sql/SQLiteTransaction.h:
(WebCore::SQLiteTransaction::database):

Source/WebKit2:

Plumb calls through to the backing store:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Update schema
  for Records table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor): Create a SQLiteIDBCursor object.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor): Call through to that object.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor): Ditto.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::idbKeyCollate): Renamed for clarity.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::unregisterCursor): Cleanup open cursors.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp: Added.
(WebKit::SQLiteIDBCursor::maybeCreate):
(WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
(WebKit::SQLiteIDBCursor::establishStatement):
(WebKit::SQLiteIDBCursor::createIndexCursorStatement): Stubbed for now.
(WebKit::SQLiteIDBCursor::createObjectStoreCursorStatement): Create the appropriate query for
  the passed in IDBKeyRange.
(WebKit::SQLiteIDBCursor::advance): Step through that query.
(WebKit::SQLiteIDBCursor::iterate): Stubbed for now.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h: Added.
(WebKit::SQLiteIDBCursor::identifier):
(WebKit::SQLiteIDBCursor::transaction):
(WebKit::SQLiteIDBCursor::currentKey):
(WebKit::SQLiteIDBCursor::currentPrimaryKey):
(WebKit::SQLiteIDBCursor::currentValue):

Add infrastructure for a SQLiteIDBTransaction to keep track of (and clean up) its open cursors:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::SQLiteIDBTransaction):
(WebKit::SQLiteIDBTransaction::~SQLiteIDBTransaction):
(WebKit::SQLiteIDBTransaction::reset):
(WebKit::SQLiteIDBTransaction::openCursor):
(WebKit::SQLiteIDBTransaction::clearCursors):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
(WebKit::SQLiteIDBTransaction::create):
(WebKit::SQLiteIDBTransaction::sqliteTransaction):

Add accessors for the two fields:
* DatabaseProcess/IndexedDB/IDBIdentifier.h:
(WebKit::IDBIdentifier::connection):
(WebKit::IDBIdentifier::id):

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoImplement policy response delegate handling
andersca@apple.com [Thu, 30 Jan 2014 22:06:42 +0000 (22:06 +0000)]
Implement policy response delegate handling
https://bugs.webkit.org/show_bug.cgi?id=127945

Reviewed by Dan Bernstein.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForResponse):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForResponse):

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

7 years agoDe-virtual-ize CachedResource::isImage()
ddkilzer@apple.com [Thu, 30 Jan 2014 21:49:33 +0000 (21:49 +0000)]
De-virtual-ize CachedResource::isImage()
<http://webkit.org/b/127936>

Reviewed by Andreas Kling.

Also replace explicit type() checks with isImage().

Source/WebCore:

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest): Use isImage().
* loader/cache/CachedImage.h:
(WebCore::CachedResource::isImage): Remove virtual override.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isImage): Check type() instead of
defining a virtual method that returns false by default.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::reloadImagesIfNotDeferred): Use isImage().

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache imageForURL:]): Use !isImage().

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

7 years agoMove OTHER_LDFLAGS erasure to DumpRenderTreeLibrary.xcconfig.
dfarler@apple.com [Thu, 30 Jan 2014 21:35:21 +0000 (21:35 +0000)]
Move OTHER_LDFLAGS erasure to DumpRenderTreeLibrary.xcconfig.
https://bugs.webkit.org/show_bug.cgi?id=127935

Reviewed by Andy Estes.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
Move OTHER_LDFLAGS erasure to the static library's xcconfig.

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

7 years agoAllow the OpenGL Profiler to get through the sandbox
dino@apple.com [Thu, 30 Jan 2014 21:30:29 +0000 (21:30 +0000)]
Allow the OpenGL Profiler to get through the sandbox
https://bugs.webkit.org/show_bug.cgi?id=127877
<rdar://problem/14817250>
<rdar://problem/14271180>

Reviewed by Alexey Proskuryakov.

Open up the sandbox for WebProcess and PluginProcess so
that OpenGL.framework can create a mach port for communication
with the OpenGL Profiler.

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

7 years agoBegin fleshing out the navigation delegate
andersca@apple.com [Thu, 30 Jan 2014 21:28:13 +0000 (21:28 +0000)]
Begin fleshing out the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=127939

Reviewed by Dan Bernstein.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
Pass the listener as a RefPtr.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
Update for API::PolicyClient changes.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
Add new delegate.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set a policy client on the page.

* UIProcess/Cocoa/NavigationState.h:
Add a new PolicyClient class.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationState):
Initialize m_navigationDelegateMethods.

(WebKit::NavigationState::navigationDelegate):
m_delegate was renamed to m_navigationDelegate.

(WebKit::NavigationState::setNavigationDelegate):
Update m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler.

(WebKit::NavigationState::createPolicyClient):
New helper function for creating a new policy client.

(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Call the navigation delegate method.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Use std::move to hand off the listener to the client.

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

7 years agoDumpRenderTree fails to build with ASAN: -fsanitize=address passed to static DRT...
dfarler@apple.com [Thu, 30 Jan 2014 21:26:21 +0000 (21:26 +0000)]
DumpRenderTree fails to build with ASAN: -fsanitize=address passed to static DRT target
https://bugs.webkit.org/show_bug.cgi?id=127935

Reviewed by Andy Estes.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Clear OTHER_LDFLAGS at the project level for the static library target.
No other linker flags were inherited from DebugRelease.

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

7 years agopackage-root shouldn't prefix simulator roots with the SDK path
dfarler@apple.com [Thu, 30 Jan 2014 21:11:56 +0000 (21:11 +0000)]
package-root shouldn't prefix simulator roots with the SDK path
http://bugs.webkit.org/show_bug.cgi?id=127923

Reviewed by Dan Bernstein.

* Scripts/package-root: Don't add an install path prefix.

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

7 years agoUpdate FTL StackMaps parser to stackSize change
fpizlo@apple.com [Thu, 30 Jan 2014 21:08:54 +0000 (21:08 +0000)]
Update FTL StackMaps parser to stackSize change
https://bugs.webkit.org/show_bug.cgi?id=127933

Reviewed by Oliver Hunt.

* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::parse):

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

7 years ago[iOS] don't update media layers on main thread when using AVFoundation
eric.carlson@apple.com [Thu, 30 Jan 2014 21:04:47 +0000 (21:04 +0000)]
[iOS] don't update media layers on main thread when using AVFoundation
https://bugs.webkit.org/show_bug.cgi?id=127931

Reviewed by Simon Fraser.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Add mediaLayerMustBeUpdatedOnMainThread.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Ask the client if graphics layers
    should be updated on the main thread.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): New, check settings to see
    if video plug-in proxy is enabled.
* rendering/RenderLayerBacking.h:

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

7 years agoCrash in RemoteLayerBackingStore::encode when m_frontBuffer is nullptr.
commit-queue@webkit.org [Thu, 30 Jan 2014 20:57:32 +0000 (20:57 +0000)]
Crash in RemoteLayerBackingStore::encode when m_frontBuffer is nullptr.
https://bugs.webkit.org/show_bug.cgi?id=127756

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-01-30
Reviewed by Jer Noble.

Don't encode RemoteLayerBackingStore when it has no front buffer.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::hasFrontBuffer):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):

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

7 years ago[MediaControls][iOS] Fix a couple of UI bugs in the iOS Media Controls
jer.noble@apple.com [Thu, 30 Jan 2014 20:44:42 +0000 (20:44 +0000)]
[MediaControls][iOS] Fix a couple of UI bugs in the iOS Media Controls
https://bugs.webkit.org/show_bug.cgi?id=127929

Reviewed by Eric Carlson.

Two UI bugs in the iOS Media Controls: the text in the controls should use the apple
system font rather than the webkit small control font, and the buttons in the controls
are clipped due to an "off by one" error when calculating the SVG image dimensions.

* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-time-remaining-display):

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

7 years agoAdd ARM EFL Linux builder bots to Apple buildmaster
rgabor@webkit.org [Thu, 30 Jan 2014 20:43:04 +0000 (20:43 +0000)]
Add ARM EFL Linux builder bots to Apple buildmaster
https://bugs.webkit.org/show_bug.cgi?id=127472

Reviewed by Csaba Osztrogonác.

There is no ARM buildslaves after removing the Qt builders.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

7 years agoREGRESSION (r163037): WebKit2.PageLoadBasic API test failing on Mountain Lion
aestes@apple.com [Thu, 30 Jan 2014 20:32:50 +0000 (20:32 +0000)]
REGRESSION (r163037): WebKit2.PageLoadBasic API test failing on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=127934

Disable the failing test on Mountain Lion.

* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
(TestWebKitAPI::TEST):

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

7 years agoHost plug-ins in XPC services
mrowe@apple.com [Thu, 30 Jan 2014 20:29:12 +0000 (20:29 +0000)]
Host plug-ins in XPC services
<https://webkit.org/b/127897> / <rdar://problem/13675955>

We disabled use of XPC services for plug-ins back in r143829 as the per-architecture services
were not being built for the appropriate architectures. Fixing that allows us to reenable them.

Reviewed by Anders Carlsson.

* Configurations/PluginService.32.xcconfig: Use VALID_ARCHS to restrict the service
to building for i386-only in production builds. Non-production builds allow building
for all standard architectures to ensure that Xcode will be able to build this target.
The exact architecture used isn't a concern for non-production builds since we'll use
the development version of the service anyway.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::shouldUseXPC): Remove the workaround that disables use of the XPC services.

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

7 years agoAdd WKNavigationDelegate class
andersca@apple.com [Thu, 30 Jan 2014 20:00:12 +0000 (20:00 +0000)]
Add WKNavigationDelegate class
https://bugs.webkit.org/show_bug.cgi?id=127927

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/Cocoa/WKNavigationDelegate.h: Copied from Source/WebKit2/UIProcess/Cocoa/NavigationState.h.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView navigationDelegate]):
(-[WKWebView setNavigationDelegate:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::navigationDelegate):
(WebKit::NavigationState::setNavigationDelegate):
* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(TEST):

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

7 years agoRefactor WebVideoFullscreenController separating AVKit from MediaElement.
commit-queue@webkit.org [Thu, 30 Jan 2014 19:50:03 +0000 (19:50 +0000)]
Refactor WebVideoFullscreenController separating AVKit from MediaElement.
https://bugs.webkit.org/show_bug.cgi?id=127762

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-01-30
Reviewed by Jer Noble.

Refactor WebVideoFullscreenControllerAVKit implementation into two abstract interfaces with concrete implementations:
WebVideoFullscreenModel, WebVideoFullscreenInterface, WebVideoFullscreenModelMediaElement, WebVideoFullscreenInterfaceAVKit.

* WebCore.xcodeproj/project.pbxproj:
* platform/ios/WebVideoFullscreenControllerAVKit.h:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController init]):
(-[WebVideoFullscreenController dealloc]):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
* platform/ios/WebVideoFullscreenInterface.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
(WebCore::WebVideoFullscreenInterface::~WebVideoFullscreenInterface):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Added.
(WebCore::WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit):
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Added.
(NS_ENUM):
(-[WebAVPlayerController init]):
(-[WebAVPlayerController dealloc]):
(-[WebAVPlayerController forwardingTargetForSelector:]):
(-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
(-[WebAVPlayerController play:]):
(-[WebAVPlayerController pause:]):
(-[WebAVPlayerController togglePlayback:]):
(-[WebAVPlayerController isPlaying]):
(-[WebAVPlayerController setPlaying:]):
(+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
(-[WebAVPlayerController seekToTime:]):
(:m_videoFullscreenModel):
(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
(WebVideoFullscreenInterfaceAVKit::setDuration):
(WebVideoFullscreenInterfaceAVKit::setCurrentTime):
(WebVideoFullscreenInterfaceAVKit::setRate):
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
(WebVideoFullscreenInterfaceAVKit::setVideoLayer):
(WebVideoFullscreenInterfaceAVKit::enterFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
* platform/ios/WebVideoFullscreenModel.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
(WebCore::WebVideoFullscreenModel::~WebVideoFullscreenModel):
* platform/ios/WebVideoFullscreenModelMediaElement.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
(WebCore::WebVideoFullscreenModelMediaElement::~WebVideoFullscreenModelMediaElement):
(WebCore::WebVideoFullscreenModelMediaElement::setWebVideoFullscreenInterface):
* platform/ios/WebVideoFullscreenModelMediaElement.mm: Added.
(WebVideoFullscreenModelMediaElement::setMediaElement):
(WebVideoFullscreenModelMediaElement::handleEvent):
(WebVideoFullscreenModelMediaElement::requestExitFullScreen):
(WebVideoFullscreenModelMediaElement::play):
(WebVideoFullscreenModelMediaElement::pause):
(WebVideoFullscreenModelMediaElement::togglePlayState):
(WebVideoFullscreenModelMediaElement::seekToTime):
(WebVideoFullscreenModelMediaElement::didExitFullscreen):

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

7 years agoEnable iOS Tools builds by default
dfarler@apple.com [Thu, 30 Jan 2014 19:37:32 +0000 (19:37 +0000)]
Enable iOS Tools builds by default
https://bugs.webkit.org/show_bug.cgi?id=127919

Reviewed by Andy Estes.

* Makefile:
Build all the tools except MiniBrowser on iOS
* Scripts/build-webkit:
Ditto.
Build WebKitTestRunnerApp target on iOS.

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

7 years agoMake TestWebKitAPI build and run for iOS
dfarler@apple.com [Thu, 30 Jan 2014 19:34:23 +0000 (19:34 +0000)]
Make TestWebKitAPI build and run for iOS
https://bugs.webkit.org/show_bug.cgi?id=127925

Reviewed by Andy Estes.

* TestWebKitAPI/Configurations/Base.xcconfig:
- Don't warn on 64-32 bit conversion on x86_64 and arm64
- Don't build mac/*
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
- Link WebKit2 on all platforms

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

7 years ago[MediaControls][iOS] Add a "start load" button.
jer.noble@apple.com [Thu, 30 Jan 2014 19:30:37 +0000 (19:30 +0000)]
[MediaControls][iOS] Add a "start load" button.
https://bugs.webkit.org/show_bug.cgi?id=127861

Reviewed by Eric Carlson.

Add a "start load" button which replaces the controls on platforms
where inline playback is not allowed, or when playback without a
user gesture is not allowed.

Add an accessor to MediaControlsHost to query whether inline playback is allowed.:
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::mediaPlaybackAllowsInline):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::mediaSession):

Update the base controller to allow more functions to be overridden:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.shouldHaveAnyUI):
(Controller.prototype.updateBase):
(Controller.prototype.setControlsType):
(Controller.prototype.updateControls):
(Controller.prototype.handleFullscreenChange):

Add the new button, and allow for switching between "start", "inline", and "fullscreen" controls:
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.addVideoListeners):
(ControllerIOS.prototype.removeVideoListeners):
(ControllerIOS.prototype.createBase):
(ControllerIOS.prototype.shouldHaveStartPlaybackButton):
(ControllerIOS.prototype.shouldHaveControls):
(ControllerIOS.prototype.shouldHaveAnyUI):
(ControllerIOS.prototype.createControls):
(ControllerIOS.prototype.setControlsType):
(ControllerIOS.prototype.addStartPlaybackControls):
(ControllerIOS.prototype.removeStartPlaybackControls):
(ControllerIOS.prototype.updateControls):
(ControllerIOS.prototype.handleStartPlaybackButtonTouchStart):
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd):
(ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel):
(ControllerIOS.prototype.handleReadyStateChange):

Add the new art:
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-start-playback-button):
(audio::-webkit-media-controls-start-playback-button.failed):

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

7 years agoWebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
timothy_horton@apple.com [Thu, 30 Jan 2014 19:29:48 +0000 (19:29 +0000)]
WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
https://bugs.webkit.org/show_bug.cgi?id=127891
<rdar://problem/15931413>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKViewPrivate.h: Add the SPI.

* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::clearCustomSwipeViews):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::clearCustomSwipeViews):
* UIProcess/PageClient.h:
Plumb clearCustomSwipeViews() so that WebPageProxy can clear
ViewGestureController's list of custom views when the current
back-forward item changes.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
If we have custom swipe views, use the union of their bounds as the snapshot region.

(-[WKView _setCustomSwipeViews:]):
Forward along to ViewGestureController.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
When the current back forward list item changes, clear the custom swipe views.

* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::setCustomSwipeViews):
(WebKit::ViewGestureController::customSwipeViews):
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::windowRelativeBoundsForCustomSwipeViews):
Compute the union of the custom swipe view bounds in the window's coordinate space.

(WebKit::ViewGestureController::beginSwipeGesture):
Store the layers we'll be swiping as the "live" layers in m_currentSwipeLiveLayers.
Don't set a shadow (yet) if we have custom swipe views, because it's not clear where to put it.

(WebKit::ViewGestureController::handleSwipeGesture):
Compute the swipe distance ('width') based on the union of the custom views bounds if needed.
Update the transform of all of the live layers. We use transform instead of position now
so that clients can set the position (having an identity transform is one of the SPI caveats).

(WebKit::ViewGestureController::removeSwipeSnapshot):
Reset the transform on all of the live layers.
Clear the list of live layers.

* WebCore.exp.in:
A surprising export.

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

7 years agohttps://bugs.webkit.org/show_bug.cgi?id=127371
bdakin@apple.com [Thu, 30 Jan 2014 19:25:25 +0000 (19:25 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=127371
Explore new API that could be used to help build infinitely scrolling websites
-and corresponding-
<rdar://problem/15244768>

Reviewed by Sam Weinig.

Source/WebCore:

This patch adds 4 new events called webkitwillrevealbottom, webkitwillrevealtop,
webkitwillrevealleft, and webkitwillrevealright. These events will fire when the
user has scrolled close to corresponding edge of the document. Right now that is
defined to be one viewport away from the corresponding edge.

FrameView::scrollPositionChanged() and
FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters
representing the old scroll position and the new position.
* WebCore.exp.in:

New events.
* dom/Document.h:
* dom/Document.idl:
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap):
* page/DOMWindow.h:
* page/DOMWindow.idl:

Send oldPosition and newPosition to scrollPositionChanged().
* page/FrameView.cpp:
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget):

After sending scroll events, also call sendWillRevealEdgeEventsIfNeeded() to send
the see if we should send the new will-reveal events.
(WebCore::FrameView::scrollPositionChanged):

Use the old position and the new position to determine if the events should be
sent.
(WebCore::FrameView::sendWillRevealEdgeEventsIfNeeded):

Send new parameters to scrollPositionChanged().
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::wheelEvent):
* page/FrameView.h:

Source/WebKit/mac:

FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters
representing the old scroll position and the new position.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _frameOrBoundsChanged]):

LayoutTests:

* fast/events/will-reveal-edges-body-attributes-expected.txt: Added.
* fast/events/will-reveal-edges-body-attributes.html: Added.
* fast/events/will-reveal-edges-event-listeners-expected.txt: Added.
* fast/events/will-reveal-edges-event-listeners.html: Added.
* fast/events/will-reveal-edges-window-attributes-expected.txt: Added.
* fast/events/will-reveal-edges-window-attributes.html: Added.

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

7 years ago[curl] Improve realm string parsing in WWW-Authenticate headers
commit-queue@webkit.org [Thu, 30 Jan 2014 19:02:26 +0000 (19:02 +0000)]
[curl] Improve realm string parsing in WWW-Authenticate headers
https://bugs.webkit.org/show_bug.cgi?id=127421

Patch by Szabolcs David <davidsz@inf.u-szeged.hu> on 2014-01-30
Reviewed by Brent Fulgham.

The realm string contains quotes at the beginning and end - this is the
opposite of the libsoup implementation. Furthermore, if the header is
concatenated from two or more another headers, it contains more incorrect part.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::removeLeadingAndTrailingQuotes):
(WebCore::getProtectionSpace):

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

7 years ago[EFL] Update test expectations for WK1 and WK2 after r162947
commit-queue@webkit.org [Thu, 30 Jan 2014 18:20:53 +0000 (18:20 +0000)]
[EFL] Update test expectations for WK1 and WK2 after r162947
https://bugs.webkit.org/show_bug.cgi?id=127913

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-01-30

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/compositing/repaint/invalidations-on-composited-layers-expected.txt:

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

7 years agoModernize HTTPHeaderMap iteration
andersca@apple.com [Thu, 30 Jan 2014 18:18:48 +0000 (18:18 +0000)]
Modernize HTTPHeaderMap iteration
https://bugs.webkit.org/show_bug.cgi?id=127915

Reviewed by Andreas Kling.

* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::InspectorResourceAgent::willLoadXHR):
(WebCore::InspectorResourceAgent::replayXHR):
* loader/CrossOriginAccessControl.cpp:
(WebCore::isSimpleCrossOriginAccessRequest):
(WebCore::createAccessControlPreflightRequest):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::canReuse):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::updateResponseAfterRevalidation):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::addHTTPHeaderFields):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::setHeaderFields):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getAllResponseHeaders):

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

7 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Thu, 30 Jan 2014 18:06:53 +0000 (18:06 +0000)]
Unreviewed EFL gardening

Add test expectation for tests failing after r160991 and r162605.

* platform/efl-wk2/TestExpectations:

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

7 years agoIDB: Add no-op plumbing for deleteDatabase and deleteRange
beidson@apple.com [Thu, 30 Jan 2014 17:49:42 +0000 (17:49 +0000)]
IDB: Add no-op plumbing for deleteDatabase and deleteRange
https://bugs.webkit.org/show_bug.cgi?id=127912

Reviewed by Alexey Proskuryakov.

Forward the calls to the DatabaseProcess, and handle completion from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::deleteDatabase):
(WebKit::WebIDBServerConnection::didDeleteDatabase):
(WebKit::WebIDBServerConnection::deleteRange):
(WebKit::WebIDBServerConnection::didDeleteRange):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Stub out deleteDatabase, and forward deleteRange to the appropriate UniqueIDBDatabase:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::deleteDatabase):
(WebKit::DatabaseProcessIDBConnection::deleteRange):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Forward the request to the backing store thread, and handle the response from that thread:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::deleteRange):
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
(WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

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

7 years agoWeb Inspector: Implement open/close Console window shortcut
commit-queue@webkit.org [Thu, 30 Jan 2014 17:49:13 +0000 (17:49 +0000)]
Web Inspector: Implement open/close Console window shortcut
https://bugs.webkit.org/show_bug.cgi?id=127896

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-30
Reviewed by Timothy Hatcher.

* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut.prototype.get displayName):
Bug: Option symbol should be displayed as Alternative symbol (\u2387)
in non Mac platforms.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Create keyboard shortcut for toggling console window.

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

7 years ago[GTK] Only disable -ftree-dce optimization when compiling with GCC
zandobersek@gmail.com [Thu, 30 Jan 2014 17:33:53 +0000 (17:33 +0000)]
[GTK] Only disable -ftree-dce optimization when compiling with GCC
https://bugs.webkit.org/show_bug.cgi?id=127911

Reviewed by Carlos Garcia Campos.

.:

* Source/autotools/SetupAutomake.m4: Define the COMPILER_GCC and COMPILER_CLANG Automake macros.
These can be used when compiler-specific flags have to be used. The latter one is not actually needed
at the moment, but is added for the sake of completeness.

Source/JavaScriptCore:

* GNUmakefile.am: Only disable the -ftree-dce optimization when using the GCC compiler.
Some Clang versions/configurations don't support the flag.

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

7 years agopackage-root should copy ./usr from the build products directory
dfarler@apple.com [Thu, 30 Jan 2014 17:17:06 +0000 (17:17 +0000)]
package-root should copy ./usr from the build products directory
https://bugs.webkit.org/show_bug.cgi?id=127878

Reviewed by Daniel Bates.

* Scripts/package-root:
Copy ./usr in addition to the frameworks.

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

7 years ago[GTK] Disable optimizations for JSC that turned out malignant after jsCStack branch...
zandobersek@gmail.com [Thu, 30 Jan 2014 16:33:35 +0000 (16:33 +0000)]
[GTK] Disable optimizations for JSC that turned out malignant after jsCStack branch merge
https://bugs.webkit.org/show_bug.cgi?id=127909

Reviewed by Carlos Garcia Campos.

* GNUmakefile.am: Disable the -fomit-frame-pointer optimization to achieve proper register usage
in operationCallEval. Disable the -ftree-dce optimization since it is causing additional failures
when using GCC 4.8, possibly due to a bug in the compiler itself.

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

7 years agoWebPage::determinePrimarySnapshottedPlugIn is slow
antti@apple.com [Thu, 30 Jan 2014 15:49:54 +0000 (15:49 +0000)]
WebPage::determinePrimarySnapshottedPlugIn is slow
https://bugs.webkit.org/show_bug.cgi?id=127905

Source/WebCore:

Reviewed by Anders Carlsson.

* WebCore.exp.in: New exports
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLPlugInImageElement.h:
(WebCore::HTMLPlugInImageElement>): Add isElementOfType<>

Source/WebKit2:

Reviewed by Anders Carlsson.

PLT before:
132.0ms  0.8% 0,0   WebKit::WebPage::determinePrimarySnapshottedPlugIn()
130.0ms  0.8% 0,0    WebCore::RenderView::hitTest(WebCore::HitTestRequest const&, WebCore::HitTestResult&)

After:
7.0ms    0.0% 0,0   WebKit::WebPage::determinePrimarySnapshottedPlugIn()
3.0ms    0.0% 0,0    WebCore::RenderView::hitTest(WebCore::HitTestRequest const&, WebCore::HitTestResult&)

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):

    Instead of shotgunning the page with hit tests, do a DOM crawl for plugins
    and hit test the centers.

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

7 years ago[SOUP] Fix the build if !ENABLE(WEB_TIMING)
ossy@webkit.org [Thu, 30 Jan 2014 14:04:28 +0000 (14:04 +0000)]
[SOUP] Fix the build if !ENABLE(WEB_TIMING)
https://bugs.webkit.org/show_bug.cgi?id=127906

Reviewed by Gustavo Noronha Silva.

* platform/network/soup/SoupNetworkSession.cpp:

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