[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: http://svn.webkit.org/repository/webkit/trunk@163166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@163167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@163168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@163169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update my contributors.json entry.


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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@163184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=128004

Reviewed by Chris Fleizach.

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

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