Timeline
Apr 5, 2015:
- 10:24 PM Changeset in webkit [182377] by
-
- 2 edits in trunk/Source/WebCore
[Content Filtering] Only pass http(s) requests to -[NEFilterSource willSendRequest:...]
https://bugs.webkit.org/show_bug.cgi?id=143437
Reviewed by Dan Bernstein.
No new tests. We can't test NEFilterSource directly.
- platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest): Immediately allow requests with url schemes other than http and https.
- 9:48 PM Changeset in webkit [182376] by
-
- 1 edit6 copies4 moves6 adds in trunk/LayoutTests
[Content Filtering] Add some additional unblock tests
https://bugs.webkit.org/show_bug.cgi?id=143435
Reviewed by Dan Bernstein.
- contentfiltering/block-after-add-data-then-allow-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-add-data-then-allow-unblock.html: Added.
- contentfiltering/block-after-add-data-then-deny-unblock-expected.html: Renamed from LayoutTests/contentfiltering/allow-after-unblock-request-expected.html.
- contentfiltering/block-after-add-data-then-deny-unblock.html: Added.
- contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-finished-adding-data-then-allow-unblock.html: Renamed from LayoutTests/contentfiltering/allow-after-unblock-request.html.
- contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-finished-adding-data-then-deny-unblock.html: Renamed from LayoutTests/contentfiltering/block-after-unblock-request.html.
- contentfiltering/block-after-response-then-allow-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-response-then-allow-unblock.html: Added.
- contentfiltering/block-after-response-then-deny-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-response-then-deny-unblock.html: Added.
- contentfiltering/block-after-will-send-request-then-allow-unblock-expected.html: Copied from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-will-send-request-then-allow-unblock.html: Added.
- contentfiltering/block-after-will-send-request-then-deny-unblock-expected.html: Renamed from LayoutTests/contentfiltering/block-after-unblock-request-expected.html.
- contentfiltering/block-after-will-send-request-then-deny-unblock.html: Added.
- 9:01 PM Changeset in webkit [182375] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Add String/Array "includes" parameter display string
https://bugs.webkit.org/show_bug.cgi?id=143434
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-04-05
Reviewed by Darin Adler.
- UserInterface/Models/NativeFunctionParameters.js:
- 8:29 PM Changeset in webkit [182374] by
-
- 2 edits in trunk/Source/WebCore
FrameView code uses page() without null checking
https://bugs.webkit.org/show_bug.cgi?id=143425
rdar://problem/18920601
Reviewed by Anders Carlsson.
While we don't have tests that cover this, we are seeing crashes coming in
that indicate the shouldEnableSpeculativeTilingDuringLoading function is
being called when the page is null. This patch adds null checks to all the
places in FrameView that use page() without doing null checking.
- page/FrameView.cpp:
(WebCore::FrameView::layout): If page is null, don't try to do the
auto-sizing logic that involves the textAutosizingWidth value from the page.
(WebCore::FrameView::setFixedVisibleContentRect): Get settings from the
frame rather than the page to avoid possible null-dereference.
(WebCore::FrameView::scrollPositionChanged): Check the page for null when
getting the event throttling delay.
(WebCore::FrameView::updateLayerFlushThrottling): Check the page for null,
and return early if it is null.
(WebCore::shouldEnableSpeculativeTilingDuringLoading): Check the page for
null, and return false if it is null.
(WebCore::FrameView::performPostLayoutTasks): Guard the code that calls
didLayout on the page client by a check if the page is null.
(WebCore::FrameView::pagination): Don't call Page::pagination on a null
page here.
(WebCore::FrameView::visibleContentScaleFactor): Use a scale factor of 1
if the page is null.
(WebCore::FrameView::setVisibleScrollerThumbRect): Don't call through to
the page client if the page is null.
(WebCore::FrameView::scrollbarStyleChanged): Ditto.
(WebCore::FrameView::setScrollPinningBehavior): Check the page for null
before asking it for the scrolling coordinator.
- 7:59 PM Changeset in webkit [182373] by
-
- 4 edits in trunk/Source/WebCore
Free up some bits in RenderObject by moving rarely used bits into a side table
https://bugs.webkit.org/show_bug.cgi?id=143432
Reviewed by Darin Adler.
Add a side table (global hash) on RenderObject to store data that is rarely
used. Move the "isDragging" and "hasReflection" bits there. Re-use one of
those bits for "hasRareData", and leave the other unused (I have plans for it).
- rendering/RenderBlock.cpp:
(WebCore::getBlockRareData): Renamed for consistency.
(WebCore::ensureBlockRareData): Renamed to avoid conflict with RenderObject::ensureRareData().
(WebCore::RenderBlock::cachedFlowThreadContainingBlock):
(WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
(WebCore::RenderBlock::locateFlowThreadContainingBlock):
(WebCore::RenderBlock::paginationStrut):
(WebCore::RenderBlock::pageLogicalOffset):
(WebCore::RenderBlock::setPaginationStrut):
(WebCore::RenderBlock::setPageLogicalOffset):
(WebCore::getRareData): Deleted.
(WebCore::ensureRareData): Deleted.
- rendering/RenderObject.cpp:
(WebCore::RenderObject::~RenderObject): Assert that rare data hasn't been resurrected
since willBeDestroyed().
(WebCore::RenderObject::willBeDestroyed): Clear the rare data.
(WebCore::RenderObject::setIsDragging): If setting, ensure that we have rare data and
set the bit. Otherwise, only clear the bit of we have rare data.
(WebCore::RenderObject::setHasReflection): Ditto.
(WebCore::RenderObject::rareDataMap):
(WebCore::RenderObject::rareData):
(WebCore::RenderObject::ensureRareData):
(WebCore::RenderObject::clearRareData):
- rendering/RenderObject.h:
(WebCore::RenderObject::isDragging): Fast-fail on the hasRareData() bit, then do the
slower lookup in rare data.
(WebCore::RenderObject::hasReflection): Ditto.
(WebCore::RenderObject::setEverHadLayout): Moved up to group with other bit setters.
(WebCore::RenderObject::hasRareData):
(WebCore::RenderObject::setHasRareData):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
(WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
(WebCore::RenderObject::setHasReflection): Deleted. Out of line now.
(WebCore::RenderObject::setIsDragging): Deleted. Ditto.
- 6:56 PM Changeset in webkit [182372] by
-
- 4 edits in trunk/Source/WebInspectorUI
Web Inspector: Regression: Map instances don't expand
https://bugs.webkit.org/show_bug.cgi?id=143428
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-04-05
Reviewed by Brian Burg.
Fix uses of "this" in super() calls. Also fix a style name
that no longer exists and was intended to be inlined.
- UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js:
(WebInspector.IndexedDatabaseObjectStoreTreeElement):
- UserInterface/Views/IndexedDatabaseTreeElement.js:
(WebInspector.IndexedDatabaseTreeElement):
- UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement):
- 6:43 PM Changeset in webkit [182371] by
-
- 2 edits in trunk/Source/WebCore
REGRESSION (r181778): Crash after scrolling Google search result page
https://bugs.webkit.org/show_bug.cgi?id=143431
Reviewed by Simon Fraser.
I can't reproduce this crash, nor was I able to make a regression test,
but the crash data makes it clear this is a null dereference.
- page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Check the result
of Frame::view for null. We know this is only called when there is a
valid FrameView, but it can be called after Frame::m_view is already null.
- 6:32 PM Changeset in webkit [182370] by
-
- 2 edits in trunk/Source/JavaScriptCore
URI encoding/escaping should use efficient string building instead of calling snprintf().
<https://webkit.org/b/143426>
Reviewed by Gavin Barraclough.
I saw 0.5% of main thread time in snprintf() on <http://polymerlabs.github.io/benchmarks/>
which seemed pretty silly. This change gets that down to nothing in favor of using our
existing JSStringBuilder and HexNumber.h facilities.
These APIs are well-exercised by our existing test suite.
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::globalFuncEscape):
- 5:23 PM Changeset in webkit [182369] by
-
- 20 edits12 adds in trunk
[Content Filtering] Tell the filter about requests and redirects
https://bugs.webkit.org/show_bug.cgi?id=143414
rdar://problem/19239549
Reviewed by Darin Adler.
Source/WebCore:
Tests: contentfiltering/allow-after-will-send-request.html
contentfiltering/block-after-will-send-request.html
http/tests/contentfiltering/allow-after-redirect.html
http/tests/contentfiltering/block-after-redirect.html
NEFilterSource supports making filter decisions based on NSURLRequests, so this patch adds support for telling
ContentFilter about the original main resource request as well as redirect requests.
- bindings/js/JSMockContentFilterSettingsCustom.cpp: Updated decisionPoint values to include AfterWillSendRequest and AfterRedirect.
(WebCore::JSMockContentFilterSettings::decisionPoint):
(WebCore::JSMockContentFilterSettings::setDecisionPoint):
- loader/ContentFilter.cpp:
(WebCore::ContentFilter::willSendRequest): Called willSendRequest() on each filter using forEachContentFilterUntilBlocked().
(WebCore::ContentFilter::redirectReceived): Called willSendRequest().
- loader/ContentFilter.h:
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Called ContentFilter::willSendRequest() if there is a content filter.
Asserted that this is not a redirect, and that ContentFilter does not set the request to null.
- loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest): Called redirectReceived() instead of willSendRequest().
- loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::redirectReceived): Renamed from willSendRequest(), since this function is only called during redirects.
(WebCore::CachedRawResource::willSendRequest): Deleted.
- loader/cache/CachedRawResource.h:
- loader/cache/CachedResource.cpp:
(WebCore::CachedResource::redirectReceived): Renamed from willSendRequest(), since this function is only called during redirects.
(WebCore::CachedResource::willSendRequest): Deleted.
- loader/cache/CachedResource.h:
- platform/PlatformContentFilter.h:
- platform/cocoa/NetworkExtensionContentFilter.h:
- platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest): Called responseReceived() if there was a redirectResponse.
Then called -[NEFilterSource willSendRequest:decisionHandler:].
- platform/cocoa/ParentalControlsContentFilter.h:
- platform/spi/cocoa/NEFilterSourceSPI.h: Added a #define for NEFilterSourceOptionsPageData.
- testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest): Added support for willSendRequest.
- testing/MockContentFilter.h: Added decision points for AfterWillSendRequest and AfterRedirect.
- testing/MockContentFilterSettings.h:
- testing/MockContentFilterSettings.idl:
LayoutTests:
- contentfiltering/allow-after-will-send-request-expected.html: Added.
- contentfiltering/allow-after-will-send-request.html: Added.
- contentfiltering/block-after-will-send-request-expected.html: Added.
- contentfiltering/block-after-will-send-request.html: Added.
- http/tests/contentfiltering/allow-after-redirect-expected.html: Added.
- http/tests/contentfiltering/allow-after-redirect.html: Added.
- http/tests/contentfiltering/block-after-redirect-expected.html: Added.
- http/tests/contentfiltering/block-after-redirect.html: Added.
- http/tests/contentfiltering/resources/fail.html: Added.
- http/tests/contentfiltering/resources/pass.html: Added.
- 4:41 PM Changeset in webkit [182368] by
-
- 2 edits in trunk/Source/JavaScriptCore
documentation for ES Promises points to the wrong one
https://bugs.webkit.org/show_bug.cgi?id=143263
Patch by Masataka Yakura <masataka.yakura@gmail.com> on 2015-04-05
Reviewed by Darin Adler.
- features.json:
- 4:31 PM Changeset in webkit [182367] by
-
- 4 edits in trunk/Source/WebCore
Remove DocumentLoader::requestURL().
https://bugs.webkit.org/show_bug.cgi?id=140001
Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-05
Reviewed by Darin Adler.
No new tests, no behavior change.
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::documentURL):
(WebCore::DocumentLoader::requestURL): Deleted.
- loader/DocumentLoader.h:
- loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- 3:24 PM Changeset in webkit [182366] by
-
- 2 edits in trunk/Source/WebKit2
[Mac] Spins seen in WKSetApplicationInformationItem, so it should not be called on the main thread
https://bugs.webkit.org/show_bug.cgi?id=143423
rdar://problem/18773785
Reviewed by Alexey Proskuryakov.
- WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin): Factored out this helper function from updateActivePages below, so
the function below is easier to read.
(WebKit::WebProcess::updateActivePages): Refactored to use the new origin function.
Use dispatch_async to call WKSetApplicationInformationItem without blocking.
- 1:44 PM Changeset in webkit [182365] by
-
- 24 edits in trunk/Source
Use constants of sqlite3 directly for status of SQL result in webdatabase
https://bugs.webkit.org/show_bug.cgi?id=143329
Patch by Gyuyoung Kim <gyuyoung.kim@samsung.com> on 2015-04-05
Reviewed by Darin Adler.
Source/WebCore:
In webdatabase, it has used own constant vairables as well as using sqlite3 constants directly.
It causes to use if~else statement which consumes more cpu cycles compared to switch~case. This
patch makes to use constants of sqlite3. Additionally if~else statment is changed to switch~case
to save cpu cycles.
No new tests, no behavior changes.
- Modules/webdatabase/Database.cpp:
(WebCore::Database::performGetTableNames):
- Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::retrieveTextResultFromDatabase):
(WebCore::setTextValueInDatabase):
(WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded):
- Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasEntryForOriginNoLock):
(WebCore::DatabaseTracker::hasEntryForDatabase):
(WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::databaseNamesForOriginNoLock):
(WebCore::DatabaseTracker::detailsForNameAndOrigin):
(WebCore::DatabaseTracker::setDatabaseDetails):
(WebCore::DatabaseTracker::quotaForOriginNoLock):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::addDatabase):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::deleteDatabase):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
(WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
- Modules/webdatabase/SQLStatementBackend.cpp:
(WebCore::SQLStatementBackend::execute):
- Modules/webdatabase/SQLStatementBackend.h:
- Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
Change to use a reference instead of a pointer in arguemnt of execute().
- loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup):
(WebCore::ApplicationCacheStorage::loadManifestHostHashes):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::calculateQuotaForOrigin):
(WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
(WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
(WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin):
(WebCore::ApplicationCacheStorage::verifySchemaVersion):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::storeUpdatedType):
(WebCore::ApplicationCacheStorage::ensureOriginRecord):
(WebCore::ApplicationCacheStorage::storeNewestCache):
(WebCore::ApplicationCacheStorage::loadCache):
(WebCore::ApplicationCacheStorage::remove):
(WebCore::ApplicationCacheStorage::getManifestURLs):
(WebCore::ApplicationCacheStorage::cacheGroupSize):
(WebCore::ApplicationCacheStorage::deleteCacheGroupRecord):
(WebCore::ApplicationCacheStorage::checkForMaxSizeReached):
(WebCore::ApplicationCacheStorage::checkForDeletedResources):
(WebCore::ApplicationCacheStorage::flatFileAreaSize):
- loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::checkIntegrity):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::pruneUnretainedIcons):
(WebCore::readySQLiteStatement):
(WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
(WebCore::IconDatabase::removePageURLFromSQLDatabase):
(WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
(WebCore::IconDatabase::addIconURLToSQLDatabase):
(WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
(WebCore::IconDatabase::removeIconFromSQLDatabase):
(WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
- platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::setMaximumSize):
- platform/sql/SQLiteDatabase.h:
- platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::getFileNameForNewDatabase):
- platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::step):
(WebCore::SQLiteStatement::returnIntResults):
(WebCore::SQLiteStatement::returnInt64Results):
Source/WebKit:
In webdatabase, it has used own constants vairables as well as using sqlite3 constants directly.
It causes to use if~else statement which consumes more cpu cycles compared to switch~case. This
patch makes to use constants of sqlite3.
- Storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::performImport):
(WebCore::StorageAreaSync::sync):
(WebCore::StorageAreaSync::deleteEmptyDatabase):
- Storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncSetOriginDetails):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::databasePathForOrigin):
- WebKit.vcxproj/WebKit/WebKitCommon.props: Add sqlite include path.
Source/WebKit2:
In webdatabase, it has used own constant variables as well as using sqlite3 constants directly.
If sqlite3 constants are changed in the library, we should modify many files as well. Besides
it can cause to use if~else statement which consumes more cpu cycles compared to switch~case.
- DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::createSQLiteStatement):
(WebKit::SQLiteIDBCursor::resetAndRebindStatement):
(WebKit::SQLiteIDBCursor::bindArguments):
(WebKit::SQLiteIDBCursor::internalAdvanceOnce):
- DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::createOrMigrateRecordsTableIfNecessary):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
- NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::executeSQLStatement):
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::queryWasEverRequested):
(WebKit::NetworkCache::Statistics::addHashesToDatabase):
(WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
- UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::importItems):
(WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
(WebKit::LocalStorageDatabase::databaseIsEmpty):
- UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
(WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
(WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
(WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
(WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
- WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp:
(webkitSoupCookieJarSqliteLoad):
(webkitSoupCookieJarSqliteInsertCookie):
(webkitSoupCookieJarSqliteDeleteCookie):
- 1:17 PM Changeset in webkit [182364] by
-
- 39 edits in trunk/Source
Remove "go ahead and" from comments
https://bugs.webkit.org/show_bug.cgi?id=143421
Reviewed by Darin Adler, Benjamin Poulain.
Remove the phrase "go ahead and" from comments where it doesn't add
anything (which is almost all of them).
Source/JavaScriptCore:
- interpreter/JSStack.cpp:
(JSC::JSStack::growSlowCase):
Source/WebCore:
- Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteOriginLockFor):
- css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSupportedFormat):
- css/CSSPrimitiveValue.h:
- css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
- editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):
- loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
- loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::performURLImport):
- page/PageOverlay.cpp:
(WebCore::PageOverlay::fadeAnimationTimerFired):
- platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollContents):
- platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::create):
- platform/graphics/GraphicsContext.cpp:
- platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
- platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPRefresh):
- rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::blockSelectionGaps):
(WebCore::RenderBlock::absoluteRects):
(WebCore::RenderBlock::absoluteQuads):
(WebCore::RenderBlock::addFocusRingRects):
- rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
- rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::appendRunsForObject):
- rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
- rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects):
- rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange):
- rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
- rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::dirtyRange):
- rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleText):
- rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
- style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):
- xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent):
- xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::append):
Source/WebKit/mac:
- WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView updateScrollers]):
- WebView/WebHTMLView.mm:
(-[WebHTMLView insertText:]):
Source/WebKit2:
- Platform/unix/EnvironmentUtilities.cpp:
(WebKit::EnvironmentUtilities::stripValuesEndingWithString):
- PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didClose):
- UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
- UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
- 11:45 AM Changeset in webkit [182363] by
-
- 8 edits in trunk
Bloom filter should support longer hashes
https://bugs.webkit.org/show_bug.cgi?id=143419
Reviewed by Dan Bernstein.
Source/WebKit2:
Use the hash digest directly in the contents filter instead of going via shortHash.
- NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::hash):
(WebKit::NetworkCache::Key::shortHash): Deleted.
(WebKit::NetworkCache::Key::toShortHash): Deleted.
No longer needed.
- NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::addToContentsFilter):
(WebKit::NetworkCache::Storage::mayContain):
- NetworkProcess/cache/NetworkCacheStorage.h:
Source/WTF:
It currently supports 'unsigned' hash only which is inconvenient and doesn't have enough independent bits for larger filters.
Support arbitrarily sized hashes of type std::array<uint8_t, hashSize> (like SHA1::Digest and MD5::Digest).
- wtf/BloomFilter.h:
(WTF::BloomFilter<keyBits>::keysFromHash):
(WTF::BloomFilter<keyBits>::mayContain):
(WTF::BloomFilter<keyBits>::add):
Tools:
- TestWebKitAPI/Tests/WTF/BloomFilter.cpp:
(TestWebKitAPI::generateRandomDigests):
(TestWebKitAPI::TEST):
- 11:39 AM Changeset in webkit [182362] by
-
- 2 edits in trunk/Source/WebKit2
Network cache Bloom filter is too big
https://bugs.webkit.org/show_bug.cgi?id=143400
Follow-up: Fix an ineffective assert.
- NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::setMaximumSize): Average resource size is closer to 50KB than 50MB.
- 11:35 AM Changeset in webkit [182361] by
-
- 6 edits in trunk/Source/WebKit2
Rename Cache::setMaximumSize to setCapacity
https://bugs.webkit.org/show_bug.cgi?id=143418
Reviewed by Dan Bernstein.
- NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::setCapacity):
(WebKit::NetworkCache::Cache::setMaximumSize): Deleted.
- NetworkProcess/cache/NetworkCache.h:
- NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::update):
(WebKit::NetworkCache::Storage::setCapacity):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::setMaximumSize): Deleted.
- NetworkProcess/cache/NetworkCacheStorage.h:
- NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSetCacheModel):
- 11:18 AM Changeset in webkit [182360] by
-
- 2 edits in trunk/LayoutTests
Skip fast/fixed-layout/fixed-layout.html on Windows.
- platform/win/TestExpectations:
- 9:52 AM Changeset in webkit [182359] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: ObjectTree array index hints are clipped when shown in popover
https://bugs.webkit.org/show_bug.cgi?id=143309
Reviewed by Brian Burg.
- UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name):
Add left margin that equals the width of the expand/collapse icon.
- 8:34 AM Changeset in webkit [182358] by
-
- 2 edits in trunk/LayoutTests
[EFL] Gardening on 5th April. Mark 2 tests to ImageOnlyFailure.
https://bugs.webkit.org/show_bug.cgi?id=143417
Unreviewed. Mark 2 tests to ImageOnlyFailure.
- platform/efl/TestExpectations:
- 8:18 AM Changeset in webkit [182357] by
-
- 3 edits in trunk/Source/WebKit2
Network cache Bloom filter is too big
https://bugs.webkit.org/show_bug.cgi?id=143400
Reviewed by Chris Dumez.
It is currently 1MB.
This patch switches the cache from a counting filter (CountingBloomFilter) to a bit filter (BloomFilter).
It also reduces the filter size from 220 to 218 elements which is good for ~26000 cache entries while
still keeping false positive rate below 1%. The current cache capacity allows around 4000 entries
with typical web contents.
The new filter size is 32KB.
- NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
Turn initialization function into general purpose synchronization function.
(WebKit::NetworkCache::Storage::addToContentsFilter):
Collect newly added hashes so we don't miss entries that were added during synchronization.
(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
(WebKit::NetworkCache::Storage::setMaximumSize):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
(WebKit::NetworkCache::Storage::shrink):
Non-counting Bloom filter does not support removals so this requires a new strategy.
Shrink code now simply deletes entries. The filter is updated by calling synchronize() at the end.
While we could synchronize the filter during traversal it is better to just have one function for that.
(WebKit::NetworkCache::Storage::initialize): Deleted.
- NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::cacheMayContain): Deleted.
- 12:52 AM Changeset in webkit [182356] by
-
- 28 edits in trunk
[Content Filtering] Blocked page is not always displayed when it should be
https://bugs.webkit.org/show_bug.cgi?id=143410
Source/WebCore:
rdar://problem/20211099
Reviewed by Andreas Kling.
These tests now pass: contentfiltering/block-after-add-data.html
contentfiltering/block-after-response.html
There were several problems with how ContentFilter loaded replacement data:
(1) Replacement data was delivered to DocumentLoader as if it were the original document's data. This assumes
that the original data was a UTF-8 encoded HTML document, which is not always true. We had a way to reset
the encoding, but not the content type.
(2) Replacement data was never delivered when the filter blocks in DocumentLoader::responseReceived().
(3) The main resource load was cancelled before the replacement data could be rendered when the filter blocks
in DocumentLoader::dataReceived().
The result was that only when the load was blocked after DocumentLoader::notifyFinished() would the replacement
data be shown properly, and only when problem (1) wasn't occurring.
This patch addresses these issues by using the substitute data mechanism to deliver replacement data. By using
substitute data, we can ensure that the original load is cancelled at the earliest opportunity and that the
replacement data is loaded with the proper content type and encoding.
Accomplishing this required changing the way ContentFilter interacts with DocumentLoader. Instead of placing
ContentFilter hooks throughout DocumentLoader, this patch makes ContentFilter itself the client of the
CachedRawResource for the duration of the filtering. If the filter decides to allow the load, DocumentLoader
adds itself as a client causing CachedRawResource to deliver to it the response and buffered data. If the
filter decides to block the load, DocumentLoader schedules a substitute data load. An added benefit of this
approach is that ContentFilter can reuse CachedRawResource's original data buffer instead of keeping its own.
- loader/ContentFilter.cpp:
(WebCore::ContentFilter::createIfNeeded): Changed to take a DecisionFunction rather than a ResourceResponse and DocumentLoader.
(WebCore::ContentFilter::ContentFilter): Ditto.
(WebCore::ContentFilter::~ContentFilter): Removed ourself as a CachedRawResource client if needed.
(WebCore::ContentFilter::startFilteringMainResource): Became the client of the CachedRawResource in order to start the filtering process.
(WebCore::ContentFilter::unblockHandler): Returned the unblock handler.
(WebCore::ContentFilter::replacementData): Returned the replacement data.
(WebCore::ContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
(WebCore::ContentFilter::responseReceived): Called responseReceived() on each filter using forEachContentFilterUntilBlocked().
(WebCore::ContentFilter::dataReceived): Ditto for dataReceived().
(WebCore::ContentFilter::notifyFinished): Ditto for finishedLoading().
(WebCore::ContentFilter::forEachContentFilterUntilBlocked): For each filter that needs more data, called the function.
If the filter blocked the load, called didDecide() with State::Blocked.
If all filters allowed the load, called didDecide() with State::Allowed.
(WebCore::ContentFilter::didDecide): Set m_state and called m_decisionFunction().
(WebCore::ContentFilter::addData): Deleted.
(WebCore::ContentFilter::finishedAddingData): Deleted.
(WebCore::ContentFilter::needsMoreData): Deleted.
(WebCore::ContentFilter::didBlockData): Deleted.
(WebCore::ContentFilter::getReplacementData): Deleted.
- loader/ContentFilter.h:
(WebCore::ContentFilter::type):
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader): Called ContentFilter::createIfNeeded() if not loading substitute data.
(WebCore::DocumentLoader::finishedLoading): Removed old ContentFilter code.
(WebCore::DocumentLoader::responseReceived): Ditto.
(WebCore::DocumentLoader::commitData): Ditto.
(WebCore::DocumentLoader::dataReceived): Ditto.
(WebCore::DocumentLoader::detachFromFrame): Set m_contentFilter to nullptr.
(WebCore::DocumentLoader::startLoadingMainResource): Called becomeMainResourceClientIfFilterAllows() instead of
becoming m_mainResource's client.
(WebCore::DocumentLoader::clearMainResource): Set m_contentFilter to nullptr.
(WebCore::DocumentLoader::becomeMainResourceClientIfFilterAllows): If ContentFilter is initialized, called
ContentFilter::startFilteringMainResource(). Otherwise added ourself as a client of m_mainResource.
(WebCore::DocumentLoader::installContentFilterUnblockHandler): Added a helper for creating and notifying
FrameLoaderClient of the unblock handler.
(WebCore::DocumentLoader::contentFilterDidDecide): Set m_contentFilter to nullptr. If the content filter
allowed the load, then added ourself as the CachedRawResource's client. Otherwise, installed the unblock handler
and scheduled a substitute data load with the replacement data.
- loader/DocumentLoader.h:
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::prepareForLoadStart): Removed call to PolicyChecker::prepareForLoadStart().
- loader/NavigationScheduler.cpp:
(WebCore::ScheduledSubstituteDataLoad::ScheduledSubstituteDataLoad): Added a ScheduledNavigation subclass that
calls FrameLoader::load() with a FrameLoadRequest containing substitute data.
(WebCore::NavigationScheduler::scheduleSubstituteDataLoad): Scheduled a substitute data load.
- loader/NavigationScheduler.h:
- loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): Reset m_contentFilterUnblockHandler if it couldn't handle the request.
(WebCore::PolicyChecker::prepareForLoadStart): Deleted.
- loader/PolicyChecker.h:
- platform/ContentFilterUnblockHandler.h:
(WebCore::ContentFilterUnblockHandler::unreachableURL):
(WebCore::ContentFilterUnblockHandler::setUnreachableURL):
(WebCore::ContentFilterUnblockHandler::unblockURLScheme): Renamed to ContentFilter::urlScheme().
- platform/PlatformContentFilter.h:
- platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler): Added a helper to wrap the unblock handler with an outer DecisionHandlerFunction.
(WebCore::ContentFilterUnblockHandler::encode): Added m_unreachableURL to the encoding.
(WebCore::ContentFilterUnblockHandler::decode): Ditto for the decoding.
(WebCore::ContentFilterUnblockHandler::canHandleRequest): Changed to call ContentFilter::urlScheme().
- platform/cocoa/NetworkExtensionContentFilter.h:
- platform/cocoa/NetworkExtensionContentFilter.mm:
(replacementDataFromDecisionInfo): Added a helper to extract replacement data from the decisionInfo dictionary.
(WebCore::NetworkExtensionContentFilter::enabled): Renamed from canHandleReponse(); only checks if the filter is enabled.
(WebCore::NetworkExtensionContentFilter::create): Created a new object.
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Created a NEFilterSource immediately when using the modern API.
(WebCore::NetworkExtensionContentFilter::responseReceived): Created a NEFilterSource when using the legacy API.
Called -[NEFilterSource receivedResponse:decisionHandler:] when using the modern API.
(WebCore::NetworkExtensionContentFilter::addData): Stopped buffering the original data.
(WebCore::NetworkExtensionContentFilter::replacementData): Returned a SharedBuffer instead of a char* and int&.
(WebCore::NetworkExtensionContentFilter::canHandleResponse): Deleted.
(WebCore::createNEFilterSource): Deleted.
(WebCore::NetworkExtensionContentFilter::getReplacementData): Deleted.
- platform/cocoa/ParentalControlsContentFilter.h:
- platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::enabled): Renamed from canHandleReponse(); only checks if the filter is enabled.
(WebCore::ParentalControlsContentFilter::create): Created a new object.
(WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Initialized m_filterState to kWFEStateBuffering.
(WebCore::canHandleResponse): Added a helper to check if the response can be filtered.
(WebCore::ParentalControlsContentFilter::responseReceived): If !canHandleResponse(), set m_filterState to kWFEStateAllowed and return.
Otherwise created a new WebFilterEvaluator with the response.
(WebCore::ParentalControlsContentFilter::addData): Called updateFilterState().
(WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
(WebCore::ParentalControlsContentFilter::needsMoreData): Changed to check m_filterState.
(WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
(WebCore::ParentalControlsContentFilter::replacementData): Returned a SharedBuffer instead of a char* and int&.
(WebCore::ParentalControlsContentFilter::updateFilterState): Updated m_filterState by calling -[WebFilterEvaluator filterState].
(WebCore::ParentalControlsContentFilter::canHandleResponse): Deleted.
(WebCore::ParentalControlsContentFilter::getReplacementData): Deleted.
- platform/spi/cocoa/NEFilterSourceSPI.h:
- platform/spi/cocoa/WebFilterEvaluatorSPI.h:
- testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::enabled): Renamed from canHandleReponse(); only checks if the filter is enabled.
(WebCore::MockContentFilter::create): Created a new object.
(WebCore::MockContentFilter::responseReceived): Called maybeDetermineStatus().
(WebCore::MockContentFilter::addData): Stopped buffering the original data.
(WebCore::MockContentFilter::replacementData): Returned a SharedBuffer instead of a char* and int&.
(WebCore::MockContentFilter::unblockHandler): Asserted that we blocked data.
(WebCore::MockContentFilter::canHandleResponse): Deleted.
(WebCore::MockContentFilter::MockContentFilter): Deleted.
(WebCore::MockContentFilter::getReplacementData): Deleted.
- testing/MockContentFilter.h:
- testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::unblockRequestURL): Changed to use a StringBuilder.
Source/WebKit2:
Reviewed by Andreas Kling.
- UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad): Stopped clearing m_contentFilterUnblockHandler here.
(WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Started doing it here instead.
LayoutTests:
Reviewed by Andreas Kling.
- TestExpectations: Unskipped block-after-add-data.html.
- contentfiltering/block-after-add-data-expected.html: Added a passing expectation.
- contentfiltering/block-after-response-expected.html: Ditto.
Apr 4, 2015:
- 11:51 PM Changeset in webkit [182355] by
-
- 3 edits2 adds2 deletes in trunk
AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an AXElement with more than one descendant AXElement
https://bugs.webkit.org/show_bug.cgi?id=136247
Reviewed by Mario Sanchez Prada.
Source/WebCore:
Modify the logic for determining whether an element supports the press action by trying to filter out objects being handled by event delegation.
The heuristic is if an element handles click actions and has more than one of a {static text, image, control, link, heading}, then we think
it's using event delegation, and do not expose the press action.
Test: platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsPressAction):
LayoutTests:
- platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt: Removed.
- platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html: Removed.
- platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt: Added.
- platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html: Added.
- 11:11 PM Changeset in webkit [182354] by
-
- 5 edits in trunk/Source/WebCore
More const in CSSToStyleMap
https://bugs.webkit.org/show_bug.cgi?id=143409
Reviewed by Andreas Kling.
The CSSValues passed to CSSToStyleMap functions can mostly be treated
as |const|, except for CSSImageValues which have special behavior.
This makes it clearer what the inputs and outputs of these
functions are.
- css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeDegrees):
- css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::computeTime):
- css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapAnimationTrigger):
- css/CSSToStyleMap.h:
- 8:09 PM Changeset in webkit [182353] by
-
- 4 edits in trunk/LayoutTests
Fix some bad test results committed earlier.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash-expected.txt:
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash-expected.txt:
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash-expected.txt:
- 8:01 PM Changeset in webkit [182352] by
-
- 2 edits in trunk/Source/WebCore
Tried to fix the build.
- loader/icon/IconController.cpp:
(WebCore::iconsFromLinkElements):
- 6:01 PM Changeset in webkit [182351] by
-
- 26 edits3 deletes in trunk
Streamline icon-related code, mostly unused
https://bugs.webkit.org/show_bug.cgi?id=143306
Reviewed by Antti Koivisto.
Source/WebCore:
I started on this path because Document::iconURLs had a poor implementation,
storing results in a data member with no benefit, using HTMLCollection for
iteration of the children of the head element instead of using the simpler
faster technique we use inside the engine. Then, I discovered this function was
mostly-unused code left over from before the Blink fork. I removed most of it.
We can add this back later if someone finds a use for it, but if we do we
should do a higher quality implementation without the quirks of the old one.
Refactoring also made it clear that logic isn't exactly sensible. There's a
set of rules about what order to return the list in that is not followed by
the code that tries to find the "default touch icon". Later we could add some
more test coverage and tighten up the logic. But the reality is that at this
time, with some small exceptions, icon logic is in the web browsers, not in WebKit.
- CMakeLists.txt: Removed IconURL.cpp.
- WebCore.vcxproj/WebCore.vcxproj: Ditto.
- WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
- WebCore.xcodeproj/project.pbxproj: Ditto.
- dom/DOMAllInOne.cpp: Ditto.
- dom/Document.cpp:
(WebCore::Document::evaluate): Tweaked formatting.
(WebCore::Document::shortcutIconURLs): Removed. Unused function.
(WebCore::Document::iconURLs): Removed. Moved code to IconController.
(WebCore::Document::addIconURL): Removed. Moved code to LinkLoader.
- dom/Document.h: Removed shortcutIconURLs, iconURLs, addIconURL,
and m_iconURLs.
- dom/IconURL.cpp: Removed.
- dom/IconURL.h: Removed everything from this header except for the
IconType enum. Added a FIXME about possibly renaming the header.
- html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement): Pass a reference when creating
the link loading.
(WebCore::HTMLLinkElement::setDisabledState): Access members of the struct
LinkRelElement without "m_" prefix.
(WebCore::HTMLLinkElement::parseAttribute): Changed to use early return style,
and made the part of this for parsing title use a more normal idiom.
(WebCore::HTMLLinkElement::process): Removed many unneeded arguments, made the
logic of the code a little easier to follow.
(WebCore::HTMLLinkElement::removedFrom): Removed a call to a function that had
an empty body.
(WebCore::HTMLLinkElement::iconType): Updated for change to LinkRelElement.
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
- html/HTMLLinkElement.h: More of the same.
- html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute): Initialize data members in the
struct itself. Got rid of "m_" prefix since this is a struct, not a class.
Changed code to use modern for loop; even better would be to eliminate the
splitting into a vector entirely and use StringView (do that next time).
- html/LinkRelAttribute.h: See above.
- html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::relAttributeIsStyleSheet):
Updated for chnages to LinkRelAttribute and give the local variable a clearer name.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::didChangeIcons): Removed.
- loader/FrameLoader.h: Removed didChangeIcons.
- loader/FrameLoaderClient.h: Added include for String since it's no longer
taken care of by IconURLs.h.
- loader/LinkLoader.cpp:
(WebCore::LinkLoader::LinkLoader): Take a reference instead of a pointer.
(WebCore::LinkLoader::linkLoadTimerFired): Use m_client reference instead of pointer.
(WebCore::LinkLoader::linkLoadingErrorTimerFired): Ditto.
(WebCore::LinkLoader::notifyFinished): Use nullptr.
(WebCore::LinkLoader::loadLink): Tweak formatting. Move the dispatchDidChangeIcons
call in here instead of going through Document to FrameLoader and then FrameLoader to
FrameLoaderClient, and passing extra unused arguments, the way the old code did.
Use a reference instead of a pointer for the document.
(WebCore::LinkLoader::released): Removed. Empty function.
- loader/LinkLoader.h: Changed constructor argument to be a reference. Made more
things private. Removed empty released function.
- loader/icon/IconController.cpp:
(WebCore::IconController::IconController): Moved initialization of data members to
the class definition in the header.
(WebCore::iconsFromLinkElements): Added. This function replaces the existing
Document::iconURLs function, but has a simpler implementation and interface.
It focuses on exactly what the code in this file needs. If we want to add some
more features to the icon controller we might make this more complex again.
Even now, building a vector is not necessarily helpful; the only client of this
function ends up extracting only one of the URLs this function returns.
(WebCore::IconController::url): Rewrote this. It's the only function actually
using the icon URLs. This contains a combination of the logic from the various
functions in this class before, including iconURL, urlsForTypes, appendToIconURLs,
and defaultURL. Among other improvements, replaced the unusual code to construct
the icon URL with a call to Document::completeURL.
(WebCore::IconController::startLoader): Refactored a bit to remove a local variable.
(WebCore::IconController::continueLoadWithDecision): Ditto.
- loader/icon/IconController.h: Removed unneeded includes, unneeded use of
WTF_MAKE_NONCOPYABLE (since classes with data members of reference type are
automatically noncopyable), unused fucntions. Also initialize m_waitingForLoadDecision.
- testing/Internals.cpp:
(WebCore::Internals::iconURLs): Removed.
(WebCore::Internals::shortcutIconURLs): Left this in place since it is used by
tests. Changed it to return the actual value from the IconController::url function,
since that's the interface to our icon machinery that is actually exposed on some
platforms. That means this returns only a single URL.
(WebCore::Internals::allIconURLs): Removed.
- testing/Internals.h: Removed allIconURLs and iconURLs.
- testing/Internals.idl: Removed allIconURLs.
LayoutTests:
- fast/dom/icon-url-list-apple-touch-expected.txt: Removed.
- fast/dom/icon-url-list-apple-touch.html: Removed. This tested code that was
not actually used in any WebKit port.
- fast/dom/icon-url-list.html: Updated to expect only a single icon URL;
the icon machinery in WebKit doesn't return arrays at this time. It's better to
test what we actually expose.
- 5:53 PM Changeset in webkit [182350] by
-
- 2 edits in trunk/Source/WebCore
Fix EFL and Gtk build.
- dom/Document.cpp:
(WebCore::Document::didRemoveTouchEventHandler):
- 5:51 PM Changeset in webkit [182349] by
-
- 5 edits6 adds in trunk
Crash under Document::absoluteRegionForEventTargets on build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=143406
rdar://problem/20407080
Reviewed by Ryosuke Niwa.
Source/WebCore:
We failed to remove elements from Document's m_wheelEventTargets HashSet when the
elements were destroyed with wheel handlers still on them. Fix by removing the
node from the set via Node::willBeDeletedFrom().
Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash.html
platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash.html
platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash.html
- dom/Document.cpp:
(WebCore::removeHandlerFromSet): Helper to remove one or all handlers on the given node.
(WebCore::Document::didRemoveWheelEventHandler): Add a parameter to specify whether we're
removing all handlers on the given node.
(WebCore::Document::didRemoveTouchEventHandler): Use removeHandlerFromSet().
- dom/Document.h:
- dom/Node.cpp:
(WebCore::Node::willBeDeletedFrom): Tell the document we're removing all handlers
for this node.
LayoutTests:
Test configurations of elements with different parenting and event handlers adding orders, and multiple handlers on
the same node.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash-expected.txt: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash.html: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash-expected.txt: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash.html: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash-expected.txt: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash.html: Added.
- 5:19 PM Changeset in webkit [182348] by
-
- 2 edits in trunk/Source/WebKit2
[WK2][Cocoa] Add a way to temporarily disable the WebKit Network Cache for testing
https://bugs.webkit.org/show_bug.cgi?id=143392
<rdar://problem/20315669>
Reviewed by Antti Koivisto.
Add a way to temporarily disable the WebKit Network Cache for testing.
It will be used temporarily for comparing page load times with and
without the WebKit network disk cache enabled.
This is in addition to the existing "WebKitNetworkCacheEnabled"
NSUserDefaults:
webkitNetworkCacheIsEnabled = [defaults boolForKey:WebKitNetworkCacheEnabledDefaultsKey]
&& ![defaults boolForKey:WebKitNetworkCacheTemporarilyDisabledForTestingKey];
- UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
- 4:16 PM Changeset in webkit [182347] by
-
- 8 edits in trunk/Source/JavaScriptCore
Logically empty WeakBlocks should not pin down their MarkedBlocks indefinitely.
<https://webkit.org/b/143210>
Reviewed by Geoffrey Garen.
Since a MarkedBlock cannot be destroyed until all the WeakBlocks pointing into it are gone,
we had a little problem where WeakBlocks with only null pointers would still keep their
MarkedBlock alive.
This patch fixes that by detaching WeakBlocks from their MarkedBlock once a sweep discovers
that the WeakBlock contains no pointers to live objects. Ownership of the WeakBlock is passed
to the Heap, which will sweep the list of these detached WeakBlocks as part of a full GC,
destroying them once they're fully dead.
This allows the garbage collector to reclaim the 64kB MarkedBlocks much sooner, and resolves
a mysterious issue where doing two full garbage collections back-to-back would free additional
memory in the second collection.
Management of detached WeakBlocks is implemented as a Vector<WeakBlock*> in Heap, along with
an index of the next block in that vector that needs to be swept. The IncrementalSweeper then
calls into Heap::sweepNextLogicallyEmptyWeakBlock() to sweep one block at a time.
- heap/Heap.h:
- heap/Heap.cpp:
(JSC::Heap::collectAllGarbage): Add a final pass where we sweep the logically empty WeakBlocks
owned by Heap, after everything else has been swept.
(JSC::Heap::notifyIncrementalSweeper): Set up an incremental sweep of logically empty WeakBlocks
after a full garbage collection ends. Note that we don't do this after Eden collections, since
they are unlikely to cause entire WeakBlocks to go empty.
(JSC::Heap::addLogicallyEmptyWeakBlock): Added. Interface for passing ownership of a WeakBlock
to the Heap when it's detached from a WeakSet.
(JSC::Heap::sweepAllLogicallyEmptyWeakBlocks): Helper for collectAllGarbage() that sweeps all
of the logically empty WeakBlocks owned by Heap.
(JSC::Heap::sweepNextLogicallyEmptyWeakBlock): Sweeps one logically empty WeakBlock if needed
and updates the next-logically-empty-weak-block-to-sweep index.
(JSC::Heap::lastChanceToFinalize): call sweepAllLogicallyEmptyWeakBlocks() here, since there
won't be another chance after this.
- heap/IncrementalSweeper.h:
(JSC::IncrementalSweeper::hasWork): Deleted.
- heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::fullSweep):
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock): Restructured IncrementalSweeper a bit to simplify
adding a new sweeping stage for the Heap's logically empty WeakBlocks. sweepNextBlock() is
changed to return a bool (true if there's more work to be done.)
- heap/WeakBlock.cpp:
(JSC::WeakBlock::sweep): This now figures out if the WeakBlock is logically empty, i.e doesn't
contain any pointers to live objects. The answer is stored in a new SweepResult member.
- heap/WeakBlock.h:
(JSC::WeakBlock::isLogicallyEmptyButNotFree): Added. Can be queried after a sweep to determine
if the WeakBlock could be detached from the MarkedBlock.
(JSC::WeakBlock::SweepResult::SweepResult): Deleted in favor of initializing member variables
when declaring them.
- 3:39 PM Changeset in webkit [182346] by
-
- 10 edits2 adds in trunk
REGRESSION (r182215): Feedly crashes when closing article
https://bugs.webkit.org/show_bug.cgi?id=143405
rdar://problem/20382734, rdar://problem/20395497
Reviewed by Tim Horton.
Source/WebCore:
Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
is bad, because it can cause FrameView::layout() to get called in the middle of
RenderObject destruction, which leaves the render tree in a bad state.
Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.
AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
a flag to say that the non-fast region needs to be recomputed, and that schedules
a scrolling tree commit. When the commit happens, we recompute the region. If the
region didn't change, and no other changes are pending, there's no need to commit.
Test: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash.html
- page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionDirty):
(WebCore::AsyncScrollingCoordinator::willCommitTree):
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText): Need to eagerly update
the non-fast scrollable region.
- page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::nonFastScrollableRegionDirty):
- page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
- page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::willCommitTree):
- page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeState):
Source/WebKit2:
Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
is bad, because it can cause FrameView::layout() to get called in the middle of
RenderObject destruction, which leaves the render tree in a bad state.
Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.
AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
a flag to say that the non-fast region needs to be recomputed, and that schedules
a scrolling tree commit. When the commit happens, we recompute the region. If the
region didn't change, and no other changes are pending, there's no need to commit.
- WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::buildTransaction):
- WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers): Outdent #ifdefs.
LayoutTests:
Test that triggers a crash without the fix (thanks to Zalan for the test).
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash-expected.txt: Added.
- platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash.html: Added.
- 12:24 PM Changeset in webkit [182345] by
-
- 11 edits in trunk
Differentiate between composited scrolling, and async scrolling
https://bugs.webkit.org/show_bug.cgi?id=143291
Reviewed by Sam Weinig.
Source/WebCore:
ScrollableArea::usesCompositedScrolling() meant "uses aysnc scrolling", but
FrameView::contentsInCompositedLayer() covered a related concept, that scrolling
happens by moving compositing layers around.
Make the difference between these more explicit by adding ScrollableArea::usesAsyncScrolling(),
which means that scrolling for that ScrollableArea is asynchronous and managed
by a ScrollingCoordinator. This is the meaning that ScrollingCoordinator::computeNonFastScrollableRegion()
understands.
ScrollableArea::usesCompositedScrolling() is now repurposed to mean "scrolling
occurs by moving layers around, not requiring repaint". FrameView::contentsInCompositedLayer()
is renamed to usesCompositedScrolling(), and overrides the base class function.
This only changes behavior in tests that call setScrollingTreeIncludesFrames(true).
- page/FrameView.cpp:
(WebCore::FrameView::useSlowRepaints):
(WebCore::FrameView::usesCompositedScrolling):
(WebCore::FrameView::usesAsyncScrolling):
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::scrollContentsSlowPath):
(WebCore::FrameView::contentsInCompositedLayer): Deleted.
- page/FrameView.h:
- page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
- platform/ScrollableArea.h:
(WebCore::ScrollableArea::usesAsyncScrolling):
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::usesAsyncScrolling):
- rendering/RenderLayer.h:
LayoutTests:
Rebaseline tests that call setScrollingTreeIncludesFrames(true), where those subframes
are now excluded from the non-fast scrollable region.
- platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
- platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
- platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
- 10:16 AM Changeset in webkit [182344] by
-
- 8 edits in trunk
[Streams API] Collecting a ReadableStreamReader should not unlock its stream
https://bugs.webkit.org/show_bug.cgi?id=143333
Reviewed by Benjamin Poulain.
Source/WebCore:
This patch stores as a boolean whether the stream is locked to a reader.
In case the reader forget to unlock the stream, the reader can be collected and destructor called.
In that case, the link between reader and stream will be reset but the stream will remain in locked state.
Covered by new test in streams/readablestreamreader-constructor.html.
- Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::isLocked):
(WebCore::ReadableStream::lock):
(WebCore::ReadableStream::release):
(WebCore::ReadableStream::releaseButKeepLocked): Introduced to cut the link between reader and stream but stil keeping the stream locked.
- Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::~ReadableStreamReader):
- bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::getReader):
- bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::constructJSReadableStreamReader):
LayoutTests:
- streams/readablestreamreader-constructor-expected.txt:
- streams/readablestreamreader-constructor.html:
- 7:32 AM Changeset in webkit [182343] by
-
- 16 edits5 adds in trunk
Implement ES6 Object.getOwnPropertySymbols
https://bugs.webkit.org/show_bug.cgi?id=141106
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
This patch implements
Object.getOwnPropertySymbols.
One technical issue is that, since we use private symbols (such as@Object) in the
privileged JS code inbuiltins/, they should not be exposed.
To distinguish them from the usual symbols, check the targetStringImpl*is a not private name
before adding it into PropertyNameArray.
To check the target
StringImpl*is a private name, we leverage privateToPublic map inBuiltinNames
since all private symbols are held in this map.
- builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutableInternal):
- builtins/BuiltinNames.h:
(JSC::BuiltinNames::isPrivateName):
- runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::isPrivateName):
- runtime/CommonIdentifiers.h:
- runtime/EnumerationMode.h:
(JSC::EnumerationMode::EnumerationMode):
(JSC::EnumerationMode::includeSymbolProperties):
- runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
- runtime/JSLexicalEnvironment.cpp:
(JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):
- runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
- runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
(JSC::objectConstructorGetOwnPropertySymbols):
(JSC::defineProperties):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
- runtime/ObjectConstructor.h:
(JSC::ObjectConstructor::create):
- runtime/Structure.cpp:
(JSC::Structure::getPropertyNamesFromStructure):
- tests/stress/object-get-own-property-symbols-perform-to-object.js: Added.
(compare):
- tests/stress/object-get-own-property-symbols.js: Added.
(forIn):
- tests/stress/symbol-define-property.js: Added.
(testSymbol):
- tests/stress/symbol-seal-and-freeze.js: Added.
- tests/stress/symbol-with-json.js: Added.
LayoutTests:
- js/Object-getOwnPropertyNames-expected.txt:
- js/script-tests/Object-getOwnPropertyNames.js: